@harmonics/lattice-ui 0.1.0 → 0.4.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 +24 -0
- package/README.md +74 -0
- package/dist/define.js +1 -1
- package/dist/{elements-DMimFemm.js → elements-BJBhL4LI.js} +516 -765
- package/dist/hexes-DN9eyQho.js +624 -0
- package/dist/hexes.js +1 -0
- package/dist/index.js +1 -1
- package/dist/types/elements/hexes.d.ts +1 -0
- package/dist/types/hexes.d.ts +41 -0
- package/package.json +6 -2
|
@@ -1,77 +1,78 @@
|
|
|
1
|
+
import { A as e, D as t, a as n, g as r, j as i, l as a, o, s } from "./hexes-DN9eyQho.js";
|
|
1
2
|
//#region ../../node_modules/.bun/solid-js@1.9.17/node_modules/solid-js/dist/solid.js
|
|
2
|
-
var
|
|
3
|
+
var c = {
|
|
3
4
|
context: void 0,
|
|
4
5
|
registry: void 0,
|
|
5
6
|
effects: void 0,
|
|
6
7
|
done: !1,
|
|
7
8
|
getContextId() {
|
|
8
|
-
return
|
|
9
|
+
return l(this.context.count);
|
|
9
10
|
},
|
|
10
11
|
getNextContextId() {
|
|
11
|
-
return
|
|
12
|
+
return l(this.context.count++);
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
return
|
|
15
|
+
function l(e) {
|
|
16
|
+
let t = String(e), n = t.length - 1;
|
|
17
|
+
return c.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
19
|
+
function u(e) {
|
|
20
|
+
c.context = e;
|
|
20
21
|
}
|
|
21
|
-
var
|
|
22
|
+
var d = (e, t) => e === t, f = Symbol("solid-track"), p = { equals: d }, m = null, h = me, g = 1, _ = 2, v = {
|
|
22
23
|
owned: null,
|
|
23
24
|
cleanups: null,
|
|
24
25
|
context: null,
|
|
25
26
|
owner: null
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
let n =
|
|
27
|
+
}, y = null, b = null, x = null, S = null, C = null, ee = 0;
|
|
28
|
+
function w(e, t) {
|
|
29
|
+
let n = x, r = y, i = e.length === 0, a = t === void 0 ? r : t, o = i ? v : {
|
|
29
30
|
owned: null,
|
|
30
31
|
cleanups: null,
|
|
31
32
|
context: a ? a.context : null,
|
|
32
33
|
owner: a
|
|
33
|
-
}, s = i ? e : () => e(() =>
|
|
34
|
-
|
|
34
|
+
}, s = i ? e : () => e(() => O(() => M(o)));
|
|
35
|
+
y = o, x = null;
|
|
35
36
|
try {
|
|
36
|
-
return
|
|
37
|
+
return j(s, !0);
|
|
37
38
|
} finally {
|
|
38
|
-
|
|
39
|
+
x = n, y = r;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
t = t ? Object.assign({},
|
|
42
|
+
function T(e, t) {
|
|
43
|
+
t = t ? Object.assign({}, p, t) : p;
|
|
43
44
|
let n = {
|
|
44
45
|
value: e,
|
|
45
46
|
observers: null,
|
|
46
47
|
observerSlots: null,
|
|
47
48
|
comparator: t.equals || void 0
|
|
48
49
|
};
|
|
49
|
-
return [
|
|
50
|
+
return [ce.bind(n), (e) => (typeof e == "function" && (e = b && b.running && b.sources.has(n) ? e(n.tValue) : e(n.value)), le(n, e))];
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
52
|
+
function E(e, t, n) {
|
|
53
|
+
A(de(e, t, !1, g));
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
let r =
|
|
57
|
-
i && (r.suspense = i), (!n || !n.render) && (r.user = !0),
|
|
55
|
+
function te(e, t, n) {
|
|
56
|
+
h = he;
|
|
57
|
+
let r = de(e, t, !1, g), i = se && ae(se);
|
|
58
|
+
i && (r.suspense = i), (!n || !n.render) && (r.user = !0), C ? C.push(r) : A(r);
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
n = n ? Object.assign({},
|
|
61
|
-
let r =
|
|
62
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0,
|
|
60
|
+
function D(e, t, n) {
|
|
61
|
+
n = n ? Object.assign({}, p, n) : p;
|
|
62
|
+
let r = de(e, t, !0, 0);
|
|
63
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, A(r), ce.bind(r);
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
if (
|
|
66
|
-
let t =
|
|
67
|
-
|
|
65
|
+
function O(e) {
|
|
66
|
+
if (x === null) return e();
|
|
67
|
+
let t = x;
|
|
68
|
+
x = null;
|
|
68
69
|
try {
|
|
69
70
|
return e();
|
|
70
71
|
} finally {
|
|
71
|
-
|
|
72
|
+
x = t;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function ne(e, t, n) {
|
|
75
76
|
let r = Array.isArray(e), i, a = n && n.defer;
|
|
76
77
|
return (n) => {
|
|
77
78
|
let o;
|
|
@@ -80,84 +81,84 @@ function ee(e, t, n) {
|
|
|
80
81
|
for (let t = 0; t < e.length; t++) o[t] = e[t]();
|
|
81
82
|
} else o = e();
|
|
82
83
|
if (a) return a = !1, n;
|
|
83
|
-
let s =
|
|
84
|
+
let s = O(() => t(o, i, n));
|
|
84
85
|
return i = o, s;
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
88
|
+
function k(e) {
|
|
89
|
+
return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e;
|
|
89
90
|
}
|
|
90
|
-
var [
|
|
91
|
-
function
|
|
91
|
+
var [re, ie] = /*@__PURE__*/ T(!1);
|
|
92
|
+
function ae(e) {
|
|
92
93
|
let t;
|
|
93
|
-
return
|
|
94
|
+
return y && y.context && (t = y.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
let t =
|
|
96
|
+
function oe(e) {
|
|
97
|
+
let t = D(e), n = D(() => Se(t()));
|
|
97
98
|
return n.toArray = () => {
|
|
98
99
|
let e = n();
|
|
99
100
|
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
100
101
|
}, n;
|
|
101
102
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
104
|
-
let e =
|
|
103
|
+
var se;
|
|
104
|
+
function ce() {
|
|
105
|
+
let e = b && b.running;
|
|
105
106
|
if (this.sources && (e ? this.tState : this.state)) {
|
|
106
|
-
if ((e ? this.tState : this.state) ===
|
|
107
|
+
if ((e ? this.tState : this.state) === g) A(this);
|
|
107
108
|
else {
|
|
108
|
-
let e =
|
|
109
|
-
|
|
109
|
+
let e = S;
|
|
110
|
+
S = null, j(() => ge(this), !1), S = e;
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
if (
|
|
113
|
+
if (x) {
|
|
113
114
|
let e = this.observers;
|
|
114
|
-
if (!e || e[e.length - 1] !==
|
|
115
|
+
if (!e || e[e.length - 1] !== x) {
|
|
115
116
|
let t = e ? e.length : 0;
|
|
116
|
-
|
|
117
|
+
x.sources ? (x.sources.push(this), x.sourceSlots.push(t)) : (x.sources = [this], x.sourceSlots = [t]), e ? (e.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
|
-
return e &&
|
|
120
|
+
return e && b.sources.has(this) ? this.tValue : this.value;
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
-
let r =
|
|
122
|
+
function le(e, t, n) {
|
|
123
|
+
let r = b && b.running && b.sources.has(e) ? e.tValue : e.value;
|
|
123
124
|
if (!e.comparator || !e.comparator(r, t)) {
|
|
124
|
-
if (
|
|
125
|
-
let r =
|
|
126
|
-
(r || !n &&
|
|
125
|
+
if (b) {
|
|
126
|
+
let r = b.running;
|
|
127
|
+
(r || !n && b.sources.has(e)) && (b.sources.add(e), e.tValue = t), r || (e.value = t);
|
|
127
128
|
} else e.value = t;
|
|
128
|
-
e.observers && e.observers.length &&
|
|
129
|
+
e.observers && e.observers.length && j(() => {
|
|
129
130
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
130
|
-
let n = e.observers[t], r =
|
|
131
|
-
r &&
|
|
131
|
+
let n = e.observers[t], r = b && b.running;
|
|
132
|
+
r && b.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? S.push(n) : C.push(n), n.observers && _e(n)), r ? n.tState = g : n.state = g);
|
|
132
133
|
}
|
|
133
|
-
if (
|
|
134
|
+
if (S.length > 1e6) throw S = [], Error();
|
|
134
135
|
}, !1);
|
|
135
136
|
}
|
|
136
137
|
return t;
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function A(e) {
|
|
139
140
|
if (!e.fn) return;
|
|
140
|
-
|
|
141
|
-
let t =
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
M(e);
|
|
142
|
+
let t = ee;
|
|
143
|
+
ue(e, b && b.running && b.sources.has(e) ? e.tValue : e.value, t), b && !b.running && b.sources.has(e) && queueMicrotask(() => {
|
|
144
|
+
j(() => {
|
|
145
|
+
b && (b.running = !0), x = y = e, ue(e, e.tValue, t), x = y = null;
|
|
145
146
|
}, !1);
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
-
let r, i =
|
|
150
|
-
|
|
149
|
+
function ue(e, t, n) {
|
|
150
|
+
let r, i = y, a = x;
|
|
151
|
+
x = y = e;
|
|
151
152
|
try {
|
|
152
153
|
r = e.fn(t);
|
|
153
154
|
} catch (t) {
|
|
154
|
-
return e.pure && (
|
|
155
|
+
return e.pure && (b && b.running ? (e.tState = g, e.tOwned && e.tOwned.forEach(M), e.tOwned = void 0) : (e.state = g, e.owned && e.owned.forEach(M), e.owned = null)), e.updatedAt = n + 1, xe(t);
|
|
155
156
|
} finally {
|
|
156
|
-
|
|
157
|
+
x = a, y = i;
|
|
157
158
|
}
|
|
158
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
159
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? le(e, r, !0) : b && b.running && e.pure ? (b.sources.has(e) || (e.value = r), b.sources.add(e), e.tValue = r) : e.value = r, e.updatedAt = n);
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
+
function de(e, t, n, r = g, i) {
|
|
161
162
|
let a = {
|
|
162
163
|
fn: e,
|
|
163
164
|
state: r,
|
|
@@ -167,106 +168,106 @@ function le(e, t, n, r = c, i) {
|
|
|
167
168
|
sourceSlots: null,
|
|
168
169
|
cleanups: null,
|
|
169
170
|
value: t,
|
|
170
|
-
owner:
|
|
171
|
-
context:
|
|
171
|
+
owner: y,
|
|
172
|
+
context: y ? y.context : null,
|
|
172
173
|
pure: n
|
|
173
174
|
};
|
|
174
|
-
return
|
|
175
|
+
return b && b.running && (a.state = 0, a.tState = r), y === null || y !== v && (b && b.running && y.pure ? y.tOwned ? y.tOwned.push(a) : y.tOwned = [a] : y.owned ? y.owned.push(a) : y.owned = [a]), a;
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
let t =
|
|
177
|
+
function fe(e) {
|
|
178
|
+
let t = b && b.running;
|
|
178
179
|
if ((t ? e.tState : e.state) === 0) return;
|
|
179
|
-
if ((t ? e.tState : e.state) ===
|
|
180
|
-
if (e.suspense &&
|
|
180
|
+
if ((t ? e.tState : e.state) === _) return ge(e);
|
|
181
|
+
if (e.suspense && O(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
181
182
|
let n = [e];
|
|
182
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
183
|
-
if (t &&
|
|
183
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < ee);) {
|
|
184
|
+
if (t && b.disposed.has(e)) return;
|
|
184
185
|
(t ? e.tState : e.state) && n.push(e);
|
|
185
186
|
}
|
|
186
187
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
187
188
|
if (e = n[r], t) {
|
|
188
189
|
let t = e, i = n[r + 1];
|
|
189
|
-
for (; (t = t.owner) && t !== i;) if (
|
|
190
|
+
for (; (t = t.owner) && t !== i;) if (b.disposed.has(t)) return;
|
|
190
191
|
}
|
|
191
|
-
if ((t ? e.tState : e.state) ===
|
|
192
|
-
else if ((t ? e.tState : e.state) ===
|
|
193
|
-
let t =
|
|
194
|
-
|
|
192
|
+
if ((t ? e.tState : e.state) === g) A(e);
|
|
193
|
+
else if ((t ? e.tState : e.state) === _) {
|
|
194
|
+
let t = S;
|
|
195
|
+
S = null, j(() => ge(e, n[0]), !1), S = t;
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
-
if (
|
|
199
|
+
function j(e, t) {
|
|
200
|
+
if (S) return e();
|
|
200
201
|
let n = !1;
|
|
201
|
-
t || (
|
|
202
|
+
t || (S = []), C ? n = !0 : C = [], ee++;
|
|
202
203
|
try {
|
|
203
204
|
let t = e();
|
|
204
|
-
return
|
|
205
|
+
return pe(n), t;
|
|
205
206
|
} catch (e) {
|
|
206
|
-
n || (
|
|
207
|
+
n || (C = null), S = null, xe(e);
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
-
if (
|
|
210
|
+
function pe(e) {
|
|
211
|
+
if (S &&= (me(S), null), e) return;
|
|
211
212
|
let t;
|
|
212
|
-
if (
|
|
213
|
-
if (!
|
|
214
|
-
let e =
|
|
215
|
-
|
|
216
|
-
for (let e of
|
|
217
|
-
|
|
218
|
-
for (let e of n)
|
|
213
|
+
if (b) {
|
|
214
|
+
if (!b.promises.size && !b.queue.size) {
|
|
215
|
+
let e = b.sources, n = b.disposed;
|
|
216
|
+
C.push.apply(C, b.effects), t = b.resolve;
|
|
217
|
+
for (let e of C) "tState" in e && (e.state = e.tState), delete e.tState;
|
|
218
|
+
b = null, j(() => {
|
|
219
|
+
for (let e of n) M(e);
|
|
219
220
|
for (let t of e) {
|
|
220
|
-
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++)
|
|
221
|
+
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++) M(t.owned[e]);
|
|
221
222
|
t.tOwned && (t.owned = t.tOwned), delete t.tValue, delete t.tOwned, t.tState = 0;
|
|
222
223
|
}
|
|
223
|
-
|
|
224
|
+
ie(!1);
|
|
224
225
|
}, !1);
|
|
225
|
-
} else if (
|
|
226
|
-
|
|
226
|
+
} else if (b.running) {
|
|
227
|
+
b.running = !1, b.effects.push.apply(b.effects, C), C = null, ie(!0);
|
|
227
228
|
return;
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
|
-
let n =
|
|
231
|
-
|
|
231
|
+
let n = C;
|
|
232
|
+
C = null, n.length && j(() => h(n), !1), t && t();
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
-
for (let t = 0; t < e.length; t++)
|
|
234
|
+
function me(e) {
|
|
235
|
+
for (let t = 0; t < e.length; t++) fe(e[t]);
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
-
let
|
|
238
|
-
for (
|
|
239
|
-
let
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
if (
|
|
243
|
-
if (
|
|
244
|
-
|
|
237
|
+
function he(e) {
|
|
238
|
+
let t, n = 0;
|
|
239
|
+
for (t = 0; t < e.length; t++) {
|
|
240
|
+
let r = e[t];
|
|
241
|
+
r.user ? e[n++] = r : fe(r);
|
|
242
|
+
}
|
|
243
|
+
if (c.context) {
|
|
244
|
+
if (c.count) {
|
|
245
|
+
c.effects ||= [], c.effects.push(...e.slice(0, n));
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
u();
|
|
248
249
|
}
|
|
249
|
-
for (
|
|
250
|
+
for (c.effects && (c.done || !c.count) && (e = [...c.effects, ...e], n += c.effects.length, delete c.effects), t = 0; t < n; t++) fe(e[t]);
|
|
250
251
|
}
|
|
251
|
-
function
|
|
252
|
-
let n =
|
|
252
|
+
function ge(e, t) {
|
|
253
|
+
let n = b && b.running;
|
|
253
254
|
n ? e.tState = 0 : e.state = 0;
|
|
254
255
|
for (let r = 0; r < e.sources.length; r += 1) {
|
|
255
256
|
let i = e.sources[r];
|
|
256
257
|
if (i.sources) {
|
|
257
258
|
let e = n ? i.tState : i.state;
|
|
258
|
-
e ===
|
|
259
|
+
e === g ? i !== t && (!i.updatedAt || i.updatedAt < ee) && fe(i) : e === _ && ge(i, t);
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
-
let t =
|
|
263
|
+
function _e(e) {
|
|
264
|
+
let t = b && b.running;
|
|
264
265
|
for (let n = 0; n < e.observers.length; n += 1) {
|
|
265
266
|
let r = e.observers[n];
|
|
266
|
-
(t ? !r.tState : !r.state) && (t ? r.tState =
|
|
267
|
+
(t ? !r.tState : !r.state) && (t ? r.tState = _ : r.state = _, r.pure ? S.push(r) : C.push(r), r.observers && _e(r));
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
+
function M(e) {
|
|
270
271
|
let t;
|
|
271
272
|
if (e.sources) for (; e.sources.length;) {
|
|
272
273
|
let t = e.sources.pop(), n = e.sourceSlots.pop(), r = t.observers;
|
|
@@ -276,49 +277,49 @@ function E(e) {
|
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
279
|
if (e.tOwned) {
|
|
279
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
280
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) M(e.tOwned[t]);
|
|
280
281
|
delete e.tOwned;
|
|
281
282
|
}
|
|
282
|
-
if (
|
|
283
|
+
if (b && b.running && e.pure) ve(e, !0);
|
|
283
284
|
else if (e.owned) {
|
|
284
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
285
|
+
for (t = e.owned.length - 1; t >= 0; t--) M(e.owned[t]);
|
|
285
286
|
e.owned = null;
|
|
286
287
|
}
|
|
287
288
|
if (e.cleanups) {
|
|
288
289
|
for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
|
|
289
290
|
e.cleanups = null;
|
|
290
291
|
}
|
|
291
|
-
|
|
292
|
+
b && b.running ? e.tState = 0 : e.state = 0;
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
-
if (t || (e.tState = 0,
|
|
294
|
+
function ve(e, t) {
|
|
295
|
+
if (t || (e.tState = 0, b.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++) ve(e.owned[t]);
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
+
function ye(e) {
|
|
297
298
|
return e instanceof Error ? e : Error(typeof e == "string" ? e : "Unknown error", { cause: e });
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function be(e, t, n) {
|
|
300
301
|
try {
|
|
301
302
|
for (let n of t) n(e);
|
|
302
303
|
} catch (e) {
|
|
303
|
-
|
|
304
|
+
xe(e, n && n.owner || null);
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
-
let n =
|
|
307
|
+
function xe(e, t = y) {
|
|
308
|
+
let n = m && t && t.context && t.context[m], r = ye(e);
|
|
308
309
|
if (!n) throw r;
|
|
309
|
-
|
|
310
|
+
C ? C.push({
|
|
310
311
|
fn() {
|
|
311
|
-
|
|
312
|
+
be(r, n, t);
|
|
312
313
|
},
|
|
313
|
-
state:
|
|
314
|
-
}) :
|
|
314
|
+
state: g
|
|
315
|
+
}) : be(r, n, t);
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
-
if (typeof e == "function" && !e.length) return
|
|
317
|
+
function Se(e) {
|
|
318
|
+
if (typeof e == "function" && !e.length) return Se(e());
|
|
318
319
|
if (Array.isArray(e)) {
|
|
319
320
|
let t = [];
|
|
320
321
|
for (let n = 0; n < e.length; n++) {
|
|
321
|
-
let r =
|
|
322
|
+
let r = Se(e[n]);
|
|
322
323
|
if (Array.isArray(r)) {
|
|
323
324
|
if (r.length < 32768) t.push.apply(t, r);
|
|
324
325
|
else for (let e = 0; e < r.length; e++) t.push(r[e]);
|
|
@@ -328,87 +329,87 @@ function be(e) {
|
|
|
328
329
|
}
|
|
329
330
|
return e;
|
|
330
331
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
332
|
+
var Ce = Symbol("fallback");
|
|
333
|
+
function we(e) {
|
|
333
334
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
let r = [],
|
|
337
|
-
return
|
|
338
|
-
let
|
|
339
|
-
return
|
|
340
|
-
let e, t,
|
|
341
|
-
if (
|
|
342
|
-
else if (
|
|
343
|
-
for (
|
|
344
|
-
|
|
336
|
+
function Te(e, t, n = {}) {
|
|
337
|
+
let r = [], i = [], a = [], o = 0, s = t.length > 1 ? [] : null;
|
|
338
|
+
return k(() => we(a)), () => {
|
|
339
|
+
let c = e() || [], l = c.length, u, d;
|
|
340
|
+
return c[f], O(() => {
|
|
341
|
+
let e, t, f, m, h, g, _, v, y;
|
|
342
|
+
if (l === 0) o !== 0 && (we(a), a = [], r = [], i = [], o = 0, s &&= []), n.fallback && (r = [Ce], i[0] = w((e) => (a[0] = e, n.fallback())), o = 1);
|
|
343
|
+
else if (o === 0) {
|
|
344
|
+
for (i = Array(l), d = 0; d < l; d++) r[d] = c[d], i[d] = w(p);
|
|
345
|
+
o = l;
|
|
345
346
|
} else {
|
|
346
|
-
for (
|
|
347
|
-
for (
|
|
348
|
-
for (e = /* @__PURE__ */ new Map(), t = Array(
|
|
349
|
-
for (
|
|
350
|
-
for (
|
|
351
|
-
|
|
347
|
+
for (f = Array(l), m = Array(l), s && (h = Array(l)), g = 0, _ = Math.min(o, l); g < _ && r[g] === c[g]; g++);
|
|
348
|
+
for (_ = o - 1, v = l - 1; _ >= g && v >= g && r[_] === c[v]; _--, v--) f[v] = i[_], m[v] = a[_], s && (h[v] = s[_]);
|
|
349
|
+
for (e = /* @__PURE__ */ new Map(), t = Array(v + 1), d = v; d >= g; d--) y = c[d], u = e.get(y), t[d] = u === void 0 ? -1 : u, e.set(y, d);
|
|
350
|
+
for (u = g; u <= _; u++) y = r[u], d = e.get(y), d !== void 0 && d !== -1 ? (f[d] = i[u], m[d] = a[u], s && (h[d] = s[u]), d = t[d], e.set(y, d)) : a[u]();
|
|
351
|
+
for (d = g; d < l; d++) d in f ? (i[d] = f[d], a[d] = m[d], s && (s[d] = h[d], s[d](d))) : i[d] = w(p);
|
|
352
|
+
i = i.slice(0, o = l), r = c.slice(0);
|
|
352
353
|
}
|
|
353
|
-
return
|
|
354
|
+
return i;
|
|
354
355
|
});
|
|
355
356
|
function p(e) {
|
|
356
|
-
if (
|
|
357
|
-
let [e, n] =
|
|
358
|
-
return
|
|
357
|
+
if (a[d] = e, s) {
|
|
358
|
+
let [e, n] = T(d);
|
|
359
|
+
return s[d] = n, t(c[d], e);
|
|
359
360
|
}
|
|
360
|
-
return t(
|
|
361
|
+
return t(c[d]);
|
|
361
362
|
}
|
|
362
363
|
};
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
-
let r = [],
|
|
366
|
-
return
|
|
367
|
-
let
|
|
368
|
-
return
|
|
369
|
-
if (
|
|
370
|
-
for (r[0] ===
|
|
371
|
-
for (;
|
|
372
|
-
return
|
|
365
|
+
function Ee(e, t, n = {}) {
|
|
366
|
+
let r = [], i = [], a = [], o = [], s = 0, c;
|
|
367
|
+
return k(() => we(a)), () => {
|
|
368
|
+
let l = e() || [], u = l.length;
|
|
369
|
+
return l[f], O(() => {
|
|
370
|
+
if (u === 0) return s !== 0 && (we(a), a = [], r = [], i = [], s = 0, o = []), n.fallback && (r = [Ce], i[0] = w((e) => (a[0] = e, n.fallback())), s = 1), i;
|
|
371
|
+
for (r[0] === Ce && (a[0](), a = [], r = [], i = [], s = 0), c = 0; c < u; c++) c < r.length && r[c] !== l[c] ? o[c](() => l[c]) : c >= r.length && (i[c] = w(d));
|
|
372
|
+
for (; c < r.length; c++) a[c]();
|
|
373
|
+
return s = o.length = a.length = u, r = l.slice(0), i = i.slice(0, s);
|
|
373
374
|
});
|
|
374
|
-
function
|
|
375
|
-
|
|
376
|
-
let [n, r] =
|
|
377
|
-
return
|
|
375
|
+
function d(e) {
|
|
376
|
+
a[c] = e;
|
|
377
|
+
let [n, r] = T(l[c]);
|
|
378
|
+
return o[c] = r, t(n, c);
|
|
378
379
|
}
|
|
379
380
|
};
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
382
|
+
function N(e, t) {
|
|
383
|
+
return O(() => e(t || {}));
|
|
383
384
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
385
|
+
var De = (e) => `Stale read from <${e}>.`;
|
|
386
|
+
function Oe(e) {
|
|
386
387
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
387
|
-
return
|
|
388
|
+
return D(Te(() => e.each, e.children, t || void 0));
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
+
function ke(e) {
|
|
390
391
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
391
|
-
return
|
|
392
|
+
return D(Ee(() => e.each, e.children, t || void 0));
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
-
let t = e.keyed, n =
|
|
395
|
-
return
|
|
394
|
+
function Ae(e) {
|
|
395
|
+
let t = e.keyed, n = D(() => e.when, void 0, void 0), r = t ? n : D(n, void 0, { equals: (e, t) => !e == !t });
|
|
396
|
+
return D(() => {
|
|
396
397
|
let i = r();
|
|
397
398
|
if (i) {
|
|
398
399
|
let a = e.children;
|
|
399
|
-
return typeof a == "function" && a.length > 0 ?
|
|
400
|
-
if (!
|
|
400
|
+
return typeof a == "function" && a.length > 0 ? O(() => a(t ? i : () => {
|
|
401
|
+
if (!O(r)) throw De("Show");
|
|
401
402
|
return n();
|
|
402
403
|
})) : a;
|
|
403
404
|
}
|
|
404
405
|
return e.fallback;
|
|
405
406
|
}, void 0, void 0);
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
-
let t =
|
|
408
|
+
function je(e) {
|
|
409
|
+
let t = oe(() => e.children), n = D(() => {
|
|
409
410
|
let e = t(), n = Array.isArray(e) ? e : [e], r = () => void 0;
|
|
410
411
|
for (let e = 0; e < n.length; e++) {
|
|
411
|
-
let t = e, i = n[e], a = r, o =
|
|
412
|
+
let t = e, i = n[e], a = r, o = D(() => a() ? void 0 : i.when, void 0, void 0), s = i.keyed ? o : D(o, void 0, { equals: (e, t) => !e == !t });
|
|
412
413
|
r = () => a() || (s() ? [
|
|
413
414
|
t,
|
|
414
415
|
o,
|
|
@@ -417,22 +418,22 @@ function ke(e) {
|
|
|
417
418
|
}
|
|
418
419
|
return r;
|
|
419
420
|
});
|
|
420
|
-
return
|
|
421
|
+
return D(() => {
|
|
421
422
|
let t = n()();
|
|
422
423
|
if (!t) return e.fallback;
|
|
423
424
|
let [r, i, a] = t, o = a.children;
|
|
424
|
-
return typeof o == "function" && o.length > 0 ?
|
|
425
|
-
if (
|
|
425
|
+
return typeof o == "function" && o.length > 0 ? O(() => o(a.keyed ? i() : () => {
|
|
426
|
+
if (O(n)()?.[0] !== r) throw De("Match");
|
|
426
427
|
return i();
|
|
427
428
|
})) : o;
|
|
428
429
|
}, void 0, void 0);
|
|
429
430
|
}
|
|
430
|
-
function
|
|
431
|
+
function Me(e) {
|
|
431
432
|
return e;
|
|
432
433
|
}
|
|
433
434
|
//#endregion
|
|
434
435
|
//#region ../../node_modules/.bun/solid-js@1.9.17/node_modules/solid-js/web/dist/web.js
|
|
435
|
-
function
|
|
436
|
+
function Ne(e, t, n) {
|
|
436
437
|
let r = n.length, i = t.length, a = r, o = 0, s = 0, c = t[i - 1].nextSibling, l = null;
|
|
437
438
|
for (; o < i || s < a;) if (t[o] === n[s]) o++, s++;
|
|
438
439
|
else {
|
|
@@ -464,33 +465,33 @@ function je(e, t, n) {
|
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
+
function Pe(e, t, n, r = {}) {
|
|
468
469
|
let i;
|
|
469
|
-
return
|
|
470
|
-
i = r, t === document ? e() :
|
|
470
|
+
return w((r) => {
|
|
471
|
+
i = r, t === document ? e() : I(t, e(), !n && t.firstChild ? null : void 0, n);
|
|
471
472
|
}, r.owner), () => {
|
|
472
473
|
i(), t.textContent = "";
|
|
473
474
|
};
|
|
474
475
|
}
|
|
475
|
-
function
|
|
476
|
+
function P(e, t, n, r) {
|
|
476
477
|
let i, a = () => {
|
|
477
478
|
let t = r ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
478
479
|
return t.innerHTML = e, n ? t.content.firstChild.firstChild : r ? t.firstChild : t.content.firstChild;
|
|
479
|
-
}, o = t ? () =>
|
|
480
|
+
}, o = t ? () => O(() => document.importNode(i ||= a(), !0)) : () => (i ||= a()).cloneNode(!0);
|
|
480
481
|
return o.cloneNode = o, o;
|
|
481
482
|
}
|
|
482
|
-
function
|
|
483
|
-
|
|
483
|
+
function F(e, t, n) {
|
|
484
|
+
Fe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
484
485
|
}
|
|
485
|
-
function
|
|
486
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function") return
|
|
487
|
-
|
|
486
|
+
function I(e, t, n, r) {
|
|
487
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return Ie(e, t, r, n);
|
|
488
|
+
E((r) => Ie(e, t(), r, n), r);
|
|
488
489
|
}
|
|
489
|
-
function
|
|
490
|
-
return !!
|
|
490
|
+
function Fe(e) {
|
|
491
|
+
return !!c.context && !c.done && (!e || e.isConnected);
|
|
491
492
|
}
|
|
492
|
-
function
|
|
493
|
-
let a =
|
|
493
|
+
function Ie(e, t, n, r, i) {
|
|
494
|
+
let a = Fe(e);
|
|
494
495
|
if (a) {
|
|
495
496
|
!n && (n = [...e.childNodes]);
|
|
496
497
|
let t = [];
|
|
@@ -507,19 +508,19 @@ function Pe(e, t, n, r, i) {
|
|
|
507
508
|
if (a || o === "number" && (t = t.toString(), t === n)) return n;
|
|
508
509
|
if (s) {
|
|
509
510
|
let i = n[0];
|
|
510
|
-
i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n =
|
|
511
|
+
i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = L(e, n, r, i);
|
|
511
512
|
} else n = n !== "" && typeof n == "string" ? e.firstChild.data = t : e.textContent = t;
|
|
512
513
|
} else if (t == null || o === "boolean") {
|
|
513
514
|
if (a) return n;
|
|
514
|
-
n =
|
|
515
|
-
} else if (o === "function") return
|
|
515
|
+
n = L(e, n, r);
|
|
516
|
+
} else if (o === "function") return E(() => {
|
|
516
517
|
let i = t();
|
|
517
518
|
for (; typeof i == "function";) i = i();
|
|
518
|
-
n =
|
|
519
|
+
n = Ie(e, i, n, r);
|
|
519
520
|
}), () => n;
|
|
520
521
|
else if (Array.isArray(t)) {
|
|
521
522
|
let o = [], c = n && Array.isArray(n);
|
|
522
|
-
if (
|
|
523
|
+
if (Le(o, t, n, i)) return E(() => n = Ie(e, o, n, r, !0)), () => n;
|
|
523
524
|
if (a) {
|
|
524
525
|
if (!o.length) return n;
|
|
525
526
|
if (r === void 0) return n = [...e.childNodes];
|
|
@@ -530,30 +531,30 @@ function Pe(e, t, n, r, i) {
|
|
|
530
531
|
return n = i;
|
|
531
532
|
}
|
|
532
533
|
if (o.length === 0) {
|
|
533
|
-
if (n =
|
|
534
|
-
} else c ? n.length === 0 ?
|
|
534
|
+
if (n = L(e, n, r), s) return n;
|
|
535
|
+
} else c ? n.length === 0 ? Re(e, o, r) : Ne(e, n, o) : (n && L(e), Re(e, o));
|
|
535
536
|
n = o;
|
|
536
537
|
} else if (t.nodeType) {
|
|
537
538
|
if (a && t.parentNode) return n = s ? [t] : t;
|
|
538
539
|
if (Array.isArray(n)) {
|
|
539
|
-
if (s) return n =
|
|
540
|
-
|
|
540
|
+
if (s) return n = L(e, n, r, t);
|
|
541
|
+
L(e, n, null, t);
|
|
541
542
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
542
543
|
n = t;
|
|
543
544
|
}
|
|
544
545
|
return n;
|
|
545
546
|
}
|
|
546
|
-
function
|
|
547
|
+
function Le(e, t, n, r) {
|
|
547
548
|
let i = !1;
|
|
548
549
|
for (let a = 0, o = t.length; a < o; a++) {
|
|
549
550
|
let o = t[a], s = n && n[e.length], c;
|
|
550
551
|
if (o != null && o !== !0 && o !== !1) {
|
|
551
552
|
if ((c = typeof o) == "object" && o.nodeType) e.push(o);
|
|
552
|
-
else if (Array.isArray(o)) i =
|
|
553
|
+
else if (Array.isArray(o)) i = Le(e, o, s) || i;
|
|
553
554
|
else if (c === "function") {
|
|
554
555
|
if (r) {
|
|
555
556
|
for (; typeof o == "function";) o = o();
|
|
556
|
-
i =
|
|
557
|
+
i = Le(e, Array.isArray(o) ? o : [o], Array.isArray(s) ? s : [s]) || i;
|
|
557
558
|
} else e.push(o), i = !0;
|
|
558
559
|
} else {
|
|
559
560
|
let t = String(o);
|
|
@@ -563,10 +564,10 @@ function Fe(e, t, n, r) {
|
|
|
563
564
|
}
|
|
564
565
|
return i;
|
|
565
566
|
}
|
|
566
|
-
function
|
|
567
|
+
function Re(e, t, n = null) {
|
|
567
568
|
for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
|
|
568
569
|
}
|
|
569
|
-
function
|
|
570
|
+
function L(e, t, n, r) {
|
|
570
571
|
if (n === void 0) return e.textContent = "";
|
|
571
572
|
let i = r || document.createTextNode("");
|
|
572
573
|
if (t.length) {
|
|
@@ -583,8 +584,8 @@ function j(e, t, n, r) {
|
|
|
583
584
|
}
|
|
584
585
|
//#endregion
|
|
585
586
|
//#region src/draw.ts
|
|
586
|
-
var
|
|
587
|
-
function
|
|
587
|
+
var ze = (e) => `M ${e.map((e) => `${e.x} ${e.y}`).join(" L ")} Z`, Be = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, Ve = Math.sqrt(3), He = (e) => `M${e.map((e) => `${Math.round(e.x * 100) / 100} ${Math.round(e.y * 100) / 100}`).join("L")}Z`;
|
|
588
|
+
function Ue(e, t = {
|
|
588
589
|
x: 0,
|
|
589
590
|
y: 0
|
|
590
591
|
}) {
|
|
@@ -596,13 +597,13 @@ function Be(e, t = {
|
|
|
596
597
|
let t = e * Math.PI / 180;
|
|
597
598
|
return Math.abs(n * Math.cos(t) + r * Math.sin(t));
|
|
598
599
|
});
|
|
599
|
-
return Math.max(...i) / (
|
|
600
|
+
return Math.max(...i) / (Ve / 2);
|
|
600
601
|
}
|
|
601
|
-
var
|
|
602
|
-
function
|
|
603
|
-
let t =
|
|
602
|
+
var We = /* @__PURE__ */ new Map();
|
|
603
|
+
function Ge(e) {
|
|
604
|
+
let t = We.get(e);
|
|
604
605
|
if (t) return t;
|
|
605
|
-
let n = 120 / e, r = n *
|
|
606
|
+
let n = 120 / e, r = n * Ve / 2, i = (e, t) => ({
|
|
606
607
|
x: r * t,
|
|
607
608
|
y: n * e + n / 2 * t
|
|
608
609
|
}), a = [];
|
|
@@ -619,7 +620,7 @@ function He(e) {
|
|
|
619
620
|
x: r.reduce((e, t) => e + t.x, 0) / 3 / 120,
|
|
620
621
|
y: r.reduce((e, t) => e + t.y, 0) / 3 / 120
|
|
621
622
|
};
|
|
622
|
-
|
|
623
|
+
Ue(o) < .999 && a.push({
|
|
623
624
|
corners: r,
|
|
624
625
|
mid: o,
|
|
625
626
|
i: n,
|
|
@@ -627,25 +628,25 @@ function He(e) {
|
|
|
627
628
|
k: e
|
|
628
629
|
});
|
|
629
630
|
}
|
|
630
|
-
return
|
|
631
|
+
return We.set(e, a), a;
|
|
631
632
|
}
|
|
632
|
-
var
|
|
633
|
-
let t = Math.round(e.x /
|
|
633
|
+
var R = 1 / 16, Ke = () => R * Ve / 2, qe = (e) => {
|
|
634
|
+
let t = Math.round(e.x / Ke()), n = Math.round((e.y - R / 2 * t) / R);
|
|
634
635
|
return {
|
|
635
|
-
x:
|
|
636
|
-
y:
|
|
636
|
+
x: Ke() * t,
|
|
637
|
+
y: R * n + R / 2 * t
|
|
637
638
|
};
|
|
638
|
-
},
|
|
639
|
+
}, z = (e, t) => (n) => Ue(n, qe(e)) < Math.max(1, Math.round(t / R)) * R - 1e-6, Je = (e, t, n) => (r) => ((r.x - e.x) / t) ** 2 + ((r.y - e.y) / n) ** 2 < 1, B = (e, t) => (n) => e.slice(1).some((r, i) => {
|
|
639
640
|
let a = e[i], o = r.x - a.x, s = r.y - a.y, c = Math.max(0, Math.min(1, ((n.x - a.x) * o + (n.y - a.y) * s) / (o * o + s * s)));
|
|
640
641
|
return Math.hypot(n.x - (a.x + c * o), n.y - (a.y + c * s)) < t;
|
|
641
|
-
}),
|
|
642
|
+
}), V = (e, t, n, r = 16) => Array.from({ length: r + 1 }, (i, a) => {
|
|
642
643
|
let o = a / r, s = 1 - o;
|
|
643
644
|
return {
|
|
644
645
|
x: s * s * e.x + 2 * s * o * t.x + o * o * n.x,
|
|
645
646
|
y: s * s * e.y + 2 * s * o * t.y + o * o * n.y
|
|
646
647
|
};
|
|
647
|
-
}),
|
|
648
|
-
let n = e.map(
|
|
648
|
+
}), H = (...e) => (t) => e.every((e) => e(t)), Ye = (e) => (t) => !e(t), U = (...e) => (t) => e.some((e) => e(t)), Xe = (e) => (t) => {
|
|
649
|
+
let n = e.map(qe);
|
|
649
650
|
return n.slice(1).some((e, r) => {
|
|
650
651
|
let i = n[r], a = e.x - i.x, o = e.y - i.y, s = ((t.x - i.x) * a + (t.y - i.y) * o) / (a * a + o * o);
|
|
651
652
|
if (s < 0 || s > 1) return !1;
|
|
@@ -653,9 +654,9 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
653
654
|
x: t.x - (i.x + s * a),
|
|
654
655
|
y: t.y - (i.y + s * o)
|
|
655
656
|
};
|
|
656
|
-
return (Math.abs(a) < 1e-9 ? c.x * Math.sign(i.x || 1) > 0 : c.y > 0) && Math.hypot(c.x, c.y) <
|
|
657
|
+
return (Math.abs(a) < 1e-9 ? c.x * Math.sign(i.x || 1) > 0 : c.y > 0) && Math.hypot(c.x, c.y) < Ke() * .999;
|
|
657
658
|
});
|
|
658
|
-
},
|
|
659
|
+
}, Ze = (e, t) => {
|
|
659
660
|
let n = t * Math.tan(Math.PI / 6);
|
|
660
661
|
return [
|
|
661
662
|
{
|
|
@@ -668,34 +669,34 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
668
669
|
y: e.y - n
|
|
669
670
|
}
|
|
670
671
|
];
|
|
671
|
-
},
|
|
672
|
-
x: e *
|
|
673
|
-
y:
|
|
674
|
-
}),
|
|
675
|
-
x: r.x - n *
|
|
676
|
-
y: r.y - t *
|
|
677
|
-
}),
|
|
678
|
-
x: e *
|
|
679
|
-
y:
|
|
680
|
-
}, .14)),
|
|
672
|
+
}, W = (e) => U(e(-1), e(1)), Qe = -.18, G = .34, K = (e) => ({
|
|
673
|
+
x: e * G,
|
|
674
|
+
y: Qe
|
|
675
|
+
}), $e = (e) => (t) => Math.hypot(t.x - e.x, t.y - e.y) < R * .58, q = (e, t, n = 0) => (r) => e({
|
|
676
|
+
x: r.x - n * Ke(),
|
|
677
|
+
y: r.y - t * R - n * R / 2
|
|
678
|
+
}), et = (e, t, n = 0) => e.map(([e, r]) => [e, q(r, t, n)]), tt = (e, t, n = 0) => e > 0 && (e + n) % t < .16, J = (e, t) => e % t / t, nt = (e, t) => Math.floor(e / t) % 2, rt = (e, t = .04) => Xe(Ze({
|
|
679
|
+
x: e * G,
|
|
680
|
+
y: Qe + t
|
|
681
|
+
}, .14)), it = (e, t) => U(z({
|
|
681
682
|
x: e.x - .07 * t,
|
|
682
683
|
y: e.y - .04 * t
|
|
683
|
-
}, .09 * t),
|
|
684
|
+
}, .09 * t), z({
|
|
684
685
|
x: e.x + .07 * t,
|
|
685
686
|
y: e.y - .04 * t
|
|
686
|
-
}, .09 * t), (n) => n.y > e.y - .04 * t && n.y < e.y + .2 * t && Math.abs(n.x - e.x) < .16 * t * (1 - (n.y - e.y + .04 * t) / (.24 * t))),
|
|
687
|
+
}, .09 * t), (n) => n.y > e.y - .04 * t && n.y < e.y + .2 * t && Math.abs(n.x - e.x) < .16 * t * (1 - (n.y - e.y + .04 * t) / (.24 * t))), at = [
|
|
687
688
|
{
|
|
688
689
|
name: "Happy",
|
|
689
690
|
idle: "Bobs, blinks, cheeks glow",
|
|
690
691
|
at: (e) => {
|
|
691
|
-
let t =
|
|
692
|
-
return
|
|
693
|
-
["ink",
|
|
694
|
-
["glint",
|
|
695
|
-
x: e *
|
|
692
|
+
let t = tt(e, 3.4, 1), n = e > 0 && J(e, 2.4) < .5 ? .11 : .09;
|
|
693
|
+
return et([
|
|
694
|
+
["ink", W((e) => t ? rt(e) : z(K(e), .15))],
|
|
695
|
+
["glint", W((e) => t ? () => !1 : $e({
|
|
696
|
+
x: e * G + .05,
|
|
696
697
|
y: -.22999999999999998
|
|
697
698
|
}))],
|
|
698
|
-
["ink",
|
|
699
|
+
["ink", B(V({
|
|
699
700
|
x: -.4,
|
|
700
701
|
y: .2
|
|
701
702
|
}, {
|
|
@@ -705,45 +706,45 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
705
706
|
x: .4,
|
|
706
707
|
y: .2
|
|
707
708
|
}), .045)],
|
|
708
|
-
["blush",
|
|
709
|
+
["blush", W((e) => z({
|
|
709
710
|
x: e * .6,
|
|
710
711
|
y: .1
|
|
711
712
|
}, n))]
|
|
712
|
-
], e > 0 &&
|
|
713
|
+
], e > 0 && J(e, 1.2) < .5 ? -1 : 0);
|
|
713
714
|
}
|
|
714
715
|
},
|
|
715
716
|
{
|
|
716
717
|
name: "Laughing",
|
|
717
718
|
idle: "Shakes with each ha",
|
|
718
719
|
at: (e) => {
|
|
719
|
-
let t = e > 0 &&
|
|
720
|
-
return
|
|
721
|
-
["ink",
|
|
722
|
-
x: e *
|
|
720
|
+
let t = e > 0 && J(e, 1.8) < .6 ? nt(e, .12) : 0, n = t ? .04 : 0;
|
|
721
|
+
return et([
|
|
722
|
+
["ink", W((e) => B(V({
|
|
723
|
+
x: e * G - .13,
|
|
723
724
|
y: -.12
|
|
724
725
|
}, {
|
|
725
|
-
x: e *
|
|
726
|
+
x: e * G,
|
|
726
727
|
y: -.36
|
|
727
728
|
}, {
|
|
728
|
-
x: e *
|
|
729
|
+
x: e * G + .13,
|
|
729
730
|
y: -.12
|
|
730
731
|
}), .04))],
|
|
731
|
-
["ink",
|
|
732
|
+
["ink", H(Je({
|
|
732
733
|
x: 0,
|
|
733
734
|
y: .16
|
|
734
735
|
}, .42, .36 + n), (e) => e.y > .16)],
|
|
735
|
-
["tongue",
|
|
736
|
+
["tongue", H(Je({
|
|
736
737
|
x: 0,
|
|
737
738
|
y: .16
|
|
738
|
-
}, .42, .36 + n),
|
|
739
|
+
}, .42, .36 + n), Je({
|
|
739
740
|
x: 0,
|
|
740
741
|
y: .5 + n
|
|
741
742
|
}, .22, .12))],
|
|
742
|
-
["glint",
|
|
743
|
+
["glint", H(Je({
|
|
743
744
|
x: 0,
|
|
744
745
|
y: .16
|
|
745
746
|
}, .42, .36), (e) => e.y > .16 && e.y < .22)],
|
|
746
|
-
["blush",
|
|
747
|
+
["blush", W((e) => z({
|
|
747
748
|
x: e * .62,
|
|
748
749
|
y: .06
|
|
749
750
|
}, .09))]
|
|
@@ -754,21 +755,21 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
754
755
|
name: "Sad",
|
|
755
756
|
idle: "A tear runs down; the lip trembles",
|
|
756
757
|
at: (e) => {
|
|
757
|
-
let t =
|
|
758
|
+
let t = tt(e, 4.2, 2), n = .06 + (e > 0 ? J(e, 2) : 0) * .5, r = e > 0 ? nt(e, .2) : 0;
|
|
758
759
|
return [
|
|
759
|
-
["ink",
|
|
760
|
-
["glint",
|
|
761
|
-
x: e *
|
|
760
|
+
["ink", W((e) => t ? rt(e) : z(K(e), .13))],
|
|
761
|
+
["glint", W((e) => t ? () => !1 : $e({
|
|
762
|
+
x: e * G + .04,
|
|
762
763
|
y: -.22
|
|
763
764
|
}))],
|
|
764
|
-
["ink",
|
|
765
|
+
["ink", W((e) => B([{
|
|
765
766
|
x: e * .52,
|
|
766
767
|
y: -.36
|
|
767
768
|
}, {
|
|
768
769
|
x: e * .2,
|
|
769
770
|
y: -.46
|
|
770
771
|
}], .035))],
|
|
771
|
-
["ink",
|
|
772
|
+
["ink", q(B(V({
|
|
772
773
|
x: -.3,
|
|
773
774
|
y: .46
|
|
774
775
|
}, {
|
|
@@ -778,10 +779,10 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
778
779
|
x: .3,
|
|
779
780
|
y: .46
|
|
780
781
|
}), .04), r)],
|
|
781
|
-
["tear",
|
|
782
|
+
["tear", U(z({
|
|
782
783
|
x: -.34,
|
|
783
784
|
y: n
|
|
784
|
-
}, .06),
|
|
785
|
+
}, .06), z({
|
|
785
786
|
x: -.34,
|
|
786
787
|
y: n + .12
|
|
787
788
|
}, .08))]
|
|
@@ -797,11 +798,11 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
797
798
|
-1,
|
|
798
799
|
0,
|
|
799
800
|
1
|
|
800
|
-
][Math.floor(
|
|
801
|
+
][Math.floor(J(e, 3.2) * 4)] : 0, n = e > 0 && J(e, 1.6) < .18 ? -1 : 0;
|
|
801
802
|
return [
|
|
802
|
-
["ink",
|
|
803
|
-
["ink",
|
|
804
|
-
["ink",
|
|
803
|
+
["ink", W((e) => H(z(K(e), .19), Ye(z(K(e), .14))))],
|
|
804
|
+
["ink", W((e) => q(z(K(e), .07), 0, t))],
|
|
805
|
+
["ink", W((e) => q(B(V({
|
|
805
806
|
x: e * .52,
|
|
806
807
|
y: -.42
|
|
807
808
|
}, {
|
|
@@ -811,10 +812,10 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
811
812
|
x: e * .16,
|
|
812
813
|
y: -.44
|
|
813
814
|
}), .035), n))],
|
|
814
|
-
["ink",
|
|
815
|
+
["ink", H(z({
|
|
815
816
|
x: 0,
|
|
816
817
|
y: .36
|
|
817
|
-
}, .17),
|
|
818
|
+
}, .17), Ye(z({
|
|
818
819
|
x: 0,
|
|
819
820
|
y: .36
|
|
820
821
|
}, .09)))]
|
|
@@ -825,16 +826,16 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
825
826
|
name: "Angry",
|
|
826
827
|
idle: "Fumes and shakes",
|
|
827
828
|
at: (e) => {
|
|
828
|
-
let t = e > 0 &&
|
|
829
|
-
["ink",
|
|
830
|
-
["ink",
|
|
829
|
+
let t = e > 0 && J(e, 2) < .4 ? nt(e, .07) ? 1 : -1 : 0, n = +(e > 0 && J(e, 2) > .5), r = e > 0 ? J(e, 1) : -1, i = [
|
|
830
|
+
["ink", W((e) => H(z(K(e), .15), (t) => t.y > -.26 + .4 * (-e * (t.x - e * G))))],
|
|
831
|
+
["ink", W((e) => q(B([{
|
|
831
832
|
x: e * .58,
|
|
832
833
|
y: -.44
|
|
833
834
|
}, {
|
|
834
835
|
x: e * .12,
|
|
835
836
|
y: -.28
|
|
836
837
|
}], .045), n))],
|
|
837
|
-
["ink",
|
|
838
|
+
["ink", B(V({
|
|
838
839
|
x: -.32,
|
|
839
840
|
y: .42
|
|
840
841
|
}, {
|
|
@@ -845,10 +846,10 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
845
846
|
y: .42
|
|
846
847
|
}), .045)]
|
|
847
848
|
];
|
|
848
|
-
return r >= 0 && i.push(["tear",
|
|
849
|
+
return r >= 0 && i.push(["tear", W((e) => z({
|
|
849
850
|
x: e * (.5 + r * .04),
|
|
850
851
|
y: -.46 - r * .14
|
|
851
|
-
}, .05 + r * .03))]),
|
|
852
|
+
}, .05 + r * .03))]), et(i, 0, t);
|
|
852
853
|
}
|
|
853
854
|
},
|
|
854
855
|
{
|
|
@@ -862,28 +863,28 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
862
863
|
0,
|
|
863
864
|
1,
|
|
864
865
|
1
|
|
865
|
-
][Math.floor(
|
|
866
|
+
][Math.floor(J(e, 3) * 6)] : 0, n = e > 0 ? J(e, 2.2) : 0, r = e > 0 && nt(e, .3) ? -1 : 1;
|
|
866
867
|
return [
|
|
867
|
-
["ink",
|
|
868
|
-
["glint",
|
|
869
|
-
x: e *
|
|
868
|
+
["ink", W((e) => q(z(K(e), .14), 0, t))],
|
|
869
|
+
["glint", W((e) => q($e({
|
|
870
|
+
x: e * G + .04,
|
|
870
871
|
y: -.22999999999999998
|
|
871
872
|
}), 0, t))],
|
|
872
|
-
["ink",
|
|
873
|
+
["ink", W((e) => B([{
|
|
873
874
|
x: e * .54,
|
|
874
875
|
y: -.38
|
|
875
876
|
}, {
|
|
876
877
|
x: e * .16,
|
|
877
878
|
y: -.5
|
|
878
879
|
}], .035))],
|
|
879
|
-
["ink",
|
|
880
|
+
["ink", B(Array.from({ length: 9 }, (e, t) => ({
|
|
880
881
|
x: -.4 + t * .1,
|
|
881
882
|
y: .36 + (t % 2 == 0 ? .04 : -.04) * r
|
|
882
883
|
})), .035)],
|
|
883
|
-
["tear",
|
|
884
|
+
["tear", U(z({
|
|
884
885
|
x: .66,
|
|
885
886
|
y: -.46 + n * .3
|
|
886
|
-
}, .06),
|
|
887
|
+
}, .06), z({
|
|
887
888
|
x: .66,
|
|
888
889
|
y: -.34 + n * .3
|
|
889
890
|
}, .08))]
|
|
@@ -894,14 +895,14 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
894
895
|
name: "Sleepy",
|
|
895
896
|
idle: "Breathes in its bubble",
|
|
896
897
|
at: (e) => {
|
|
897
|
-
let t = e > 0 ?
|
|
898
|
-
["ink",
|
|
899
|
-
let t =
|
|
900
|
-
x: e *
|
|
898
|
+
let t = e > 0 ? J(e, 3) : .3, n = t > .92, r = .13 + Math.sin(Math.PI * Math.min(1, t / .92)) * .09, i = e > 0 ? J(e, 2.4) : 0, a = [
|
|
899
|
+
["ink", W((e) => {
|
|
900
|
+
let t = Ze({
|
|
901
|
+
x: e * G,
|
|
901
902
|
y: -.13
|
|
902
903
|
}, .16), n = Math.tan(Math.PI / 6), r = (t, r) => {
|
|
903
|
-
let i = e * (
|
|
904
|
-
return
|
|
904
|
+
let i = e * (G + t), a = -.13 - t * n;
|
|
905
|
+
return Xe([{
|
|
905
906
|
x: i,
|
|
906
907
|
y: a + .02
|
|
907
908
|
}, {
|
|
@@ -909,31 +910,31 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
909
910
|
y: a + .02 + r
|
|
910
911
|
}]);
|
|
911
912
|
};
|
|
912
|
-
return
|
|
913
|
+
return U(Xe(t), r(.04, .05), r(.09, .06), r(.14, .05));
|
|
913
914
|
})],
|
|
914
|
-
["blush",
|
|
915
|
+
["blush", W((e) => z({
|
|
915
916
|
x: e * .56,
|
|
916
917
|
y: .16
|
|
917
918
|
}, .09))],
|
|
918
|
-
["ink",
|
|
919
|
+
["ink", H(z({
|
|
919
920
|
x: 0,
|
|
920
921
|
y: .42
|
|
921
|
-
}, .12),
|
|
922
|
+
}, .12), Ye(z({
|
|
922
923
|
x: 0,
|
|
923
924
|
y: .42
|
|
924
925
|
}, .06)))],
|
|
925
|
-
["tear",
|
|
926
|
+
["tear", U(z({
|
|
926
927
|
x: .42,
|
|
927
928
|
y: -.44 - i * .1
|
|
928
|
-
}, .04),
|
|
929
|
+
}, .04), z({
|
|
929
930
|
x: .5,
|
|
930
931
|
y: -.58 - i * .1
|
|
931
932
|
}, .06))]
|
|
932
933
|
];
|
|
933
|
-
return n || a.push(["tear",
|
|
934
|
+
return n || a.push(["tear", H(z({
|
|
934
935
|
x: .2,
|
|
935
936
|
y: .18
|
|
936
|
-
}, r),
|
|
937
|
+
}, r), Ye(z({
|
|
937
938
|
x: .2,
|
|
938
939
|
y: .18
|
|
939
940
|
}, r - .06)))]), a;
|
|
@@ -943,24 +944,24 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
943
944
|
name: "Wink",
|
|
944
945
|
idle: "Winks again",
|
|
945
946
|
at: (e) => {
|
|
946
|
-
let t = e > 0 &&
|
|
947
|
+
let t = e > 0 && J(e, 2.6) > .7 && J(e, 2.6) < .85, n = e > 0 && J(e, 2.6) < .3 ? .11 : .09;
|
|
947
948
|
return [
|
|
948
|
-
["ink",
|
|
949
|
-
["glint",
|
|
949
|
+
["ink", z(K(-1), .15)],
|
|
950
|
+
["glint", $e({
|
|
950
951
|
x: -.34 + .05,
|
|
951
952
|
y: -.22999999999999998
|
|
952
953
|
})],
|
|
953
|
-
t ? ["ink",
|
|
954
|
+
t ? ["ink", z(K(1), .15)] : ["ink", B(V({
|
|
954
955
|
x: .19000000000000003,
|
|
955
|
-
y:
|
|
956
|
+
y: Qe
|
|
956
957
|
}, {
|
|
957
|
-
x:
|
|
958
|
+
x: G,
|
|
958
959
|
y: -.3
|
|
959
960
|
}, {
|
|
960
961
|
x: .49,
|
|
961
|
-
y:
|
|
962
|
+
y: Qe
|
|
962
963
|
}), .04)],
|
|
963
|
-
["ink",
|
|
964
|
+
["ink", B(V({
|
|
964
965
|
x: -.3,
|
|
965
966
|
y: .32
|
|
966
967
|
}, {
|
|
@@ -970,7 +971,7 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
970
971
|
x: .38,
|
|
971
972
|
y: .22
|
|
972
973
|
}), .045)],
|
|
973
|
-
["blush",
|
|
974
|
+
["blush", z({
|
|
974
975
|
x: .6,
|
|
975
976
|
y: .1
|
|
976
977
|
}, n)]
|
|
@@ -981,11 +982,11 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
981
982
|
name: "Smitten",
|
|
982
983
|
idle: "Hearts beat",
|
|
983
984
|
at: (e) => {
|
|
984
|
-
let t = e > 0 ?
|
|
985
|
-
return [["blush",
|
|
986
|
-
x: e *
|
|
987
|
-
y:
|
|
988
|
-
}, n))], ["ink",
|
|
985
|
+
let t = e > 0 ? J(e, 1.1) : .9, n = t < .12 || t > .24 && t < .36 ? 1.3 : 1;
|
|
986
|
+
return [["blush", W((e) => it({
|
|
987
|
+
x: e * G,
|
|
988
|
+
y: Qe
|
|
989
|
+
}, n))], ["ink", B(V({
|
|
989
990
|
x: -.34,
|
|
990
991
|
y: .24
|
|
991
992
|
}, {
|
|
@@ -997,30 +998,30 @@ var N = 1 / 16, Ue = () => N * M / 2, We = (e) => {
|
|
|
997
998
|
}), .045)]];
|
|
998
999
|
}
|
|
999
1000
|
}
|
|
1000
|
-
],
|
|
1001
|
+
], ot = (e, t) => {
|
|
1001
1002
|
let n = "plate";
|
|
1002
1003
|
for (let [r, i] of e) i(t) && (n = r);
|
|
1003
1004
|
return n;
|
|
1004
|
-
},
|
|
1005
|
-
function
|
|
1006
|
-
let r =
|
|
1007
|
-
|
|
1008
|
-
let i = r.map((t) =>
|
|
1005
|
+
}, st = (e) => e.k === 0 ? "right" : "left";
|
|
1006
|
+
function ct(e, t, n) {
|
|
1007
|
+
let r = Ge(t);
|
|
1008
|
+
R = 1 / t;
|
|
1009
|
+
let i = r.map((t) => ot(e, t.mid)), a = r.map(() => "top"), o = Math.max(1, Math.round(.035 / R)), s = (t, n) => ot(e, {
|
|
1009
1010
|
x: t.mid.x,
|
|
1010
|
-
y: t.mid.y - n *
|
|
1011
|
+
y: t.mid.y - n * R
|
|
1011
1012
|
});
|
|
1012
1013
|
return r.forEach((e, t) => {
|
|
1013
1014
|
let r = i[t];
|
|
1014
1015
|
if (n === "raised" && r === "plate") for (let n = 1; n <= o; n++) {
|
|
1015
1016
|
let r = s(e, n);
|
|
1016
1017
|
if (r !== "plate" && r !== "glint") {
|
|
1017
|
-
i[t] = r, a[t] =
|
|
1018
|
+
i[t] = r, a[t] = st(e);
|
|
1018
1019
|
break;
|
|
1019
1020
|
}
|
|
1020
1021
|
}
|
|
1021
1022
|
else if (n === "carved" && r !== "plate" && r !== "glint") {
|
|
1022
1023
|
for (let n = 1; n <= o; n++) if (s(e, n) === "plate") {
|
|
1023
|
-
a[t] =
|
|
1024
|
+
a[t] = st(e);
|
|
1024
1025
|
break;
|
|
1025
1026
|
}
|
|
1026
1027
|
} else if (n === "cubes" && r !== "plate" && r !== "glint") {
|
|
@@ -1033,8 +1034,8 @@ function it(e, t, n) {
|
|
|
1033
1034
|
[e.i + 1, e.j + 1],
|
|
1034
1035
|
[e.i + 1, e.j]
|
|
1035
1036
|
]).find(([e, t]) => ((t - e) % 3 + 3) % 3 == 0), r = {
|
|
1036
|
-
x:
|
|
1037
|
-
y:
|
|
1037
|
+
x: Ve / 2 * R * n[1],
|
|
1038
|
+
y: R * n[0] + R / 2 * n[1]
|
|
1038
1039
|
}, i = (Math.atan2(e.mid.x - r.x, -(e.mid.y - r.y)) * 180 / Math.PI + 360) % 360;
|
|
1039
1040
|
a[t] = i < 60 || i >= 300 ? "top" : i < 180 ? "right" : "left";
|
|
1040
1041
|
}
|
|
@@ -1043,7 +1044,7 @@ function it(e, t, n) {
|
|
|
1043
1044
|
shades: a
|
|
1044
1045
|
};
|
|
1045
1046
|
}
|
|
1046
|
-
function
|
|
1047
|
+
function lt(e, t, n) {
|
|
1047
1048
|
let r = /* @__PURE__ */ new Map();
|
|
1048
1049
|
return e.forEach((e, i) => {
|
|
1049
1050
|
let a = t[i], o = n?.[i] ?? "top", s = `${a}:${o}`, c = r.get(s) ?? {
|
|
@@ -1051,7 +1052,7 @@ function at(e, t, n) {
|
|
|
1051
1052
|
shade: o,
|
|
1052
1053
|
d: []
|
|
1053
1054
|
};
|
|
1054
|
-
c.d.push(
|
|
1055
|
+
c.d.push(He(e.corners)), r.set(s, c);
|
|
1055
1056
|
}), [...r.values()].map((e) => ({
|
|
1056
1057
|
ink: e.ink,
|
|
1057
1058
|
shade: e.shade,
|
|
@@ -1060,29 +1061,29 @@ function at(e, t, n) {
|
|
|
1060
1061
|
}
|
|
1061
1062
|
//#endregion
|
|
1062
1063
|
//#region src/faceDrawing.tsx
|
|
1063
|
-
var
|
|
1064
|
-
function
|
|
1064
|
+
var ut = /*#__PURE__*/ P("<svg><path class=facet></svg>", !1, !0, !1), dt = 16, ft = 1400, pt = 300, mt = 100;
|
|
1065
|
+
function ht(e, t) {
|
|
1065
1066
|
let n = (e) => ({
|
|
1066
1067
|
x: e.x,
|
|
1067
1068
|
y: e.y - t
|
|
1068
1069
|
}), [, , r, i, a] = e;
|
|
1069
1070
|
return {
|
|
1070
|
-
shade:
|
|
1071
|
+
shade: He([
|
|
1071
1072
|
a,
|
|
1072
1073
|
i,
|
|
1073
1074
|
n(i),
|
|
1074
1075
|
n(a)
|
|
1075
1076
|
]),
|
|
1076
|
-
shadow:
|
|
1077
|
+
shadow: He([
|
|
1077
1078
|
i,
|
|
1078
1079
|
r,
|
|
1079
1080
|
n(r),
|
|
1080
1081
|
n(i)
|
|
1081
1082
|
]),
|
|
1082
|
-
top:
|
|
1083
|
+
top: He(e.map(n))
|
|
1083
1084
|
};
|
|
1084
1085
|
}
|
|
1085
|
-
var
|
|
1086
|
+
var gt = {
|
|
1086
1087
|
happy: "Happy",
|
|
1087
1088
|
content: "Happy",
|
|
1088
1089
|
asleep: "Sleepy",
|
|
@@ -1090,43 +1091,43 @@ var ft = {
|
|
|
1090
1091
|
distressed: "Worried",
|
|
1091
1092
|
puzzled: "Surprised",
|
|
1092
1093
|
relieved: "Laughing"
|
|
1093
|
-
},
|
|
1094
|
-
function
|
|
1095
|
-
let n =
|
|
1096
|
-
return
|
|
1097
|
-
}
|
|
1098
|
-
function
|
|
1099
|
-
let t = () =>
|
|
1100
|
-
|
|
1101
|
-
n === void 0 || e === n || t() || (r(!0), clearTimeout(i), i = setTimeout(() => r(!1),
|
|
1094
|
+
}, _t = (e) => at.find((t) => t.name.toLowerCase() === e.trim().toLowerCase()), vt = (e) => _t(gt[e]) ?? at[0], yt = _t("Laughing");
|
|
1095
|
+
function bt(e, t) {
|
|
1096
|
+
let n = ct(e.at(t), dt, "raised");
|
|
1097
|
+
return lt(Ge(dt), n.inks, n.shades);
|
|
1098
|
+
}
|
|
1099
|
+
function xt(e) {
|
|
1100
|
+
let t = () => Be() || (e.still?.() ?? !1), [n, r] = T(!1), i;
|
|
1101
|
+
te(ne(e.pulse, (e, n) => {
|
|
1102
|
+
n === void 0 || e === n || t() || (r(!0), clearTimeout(i), i = setTimeout(() => r(!1), ft));
|
|
1102
1103
|
}));
|
|
1103
|
-
let [a, o] =
|
|
1104
|
-
|
|
1104
|
+
let [a, o] = T(0);
|
|
1105
|
+
te(() => {
|
|
1105
1106
|
if (t()) {
|
|
1106
1107
|
o(0);
|
|
1107
1108
|
return;
|
|
1108
1109
|
}
|
|
1109
|
-
let e = performance.now(), n = setInterval(() => o((performance.now() - e) / 1e3),
|
|
1110
|
-
|
|
1111
|
-
}),
|
|
1112
|
-
let s =
|
|
1113
|
-
return
|
|
1114
|
-
n && !t() && (u(
|
|
1115
|
-
})),
|
|
1110
|
+
let e = performance.now(), n = setInterval(() => o((performance.now() - e) / 1e3), mt);
|
|
1111
|
+
k(() => clearInterval(n));
|
|
1112
|
+
}), k(() => clearTimeout(i));
|
|
1113
|
+
let s = D(() => n() ? yt : e.expression()), c = D(() => bt(s(), a())), [l, u] = T(), d;
|
|
1114
|
+
return te(ne(s, (e, n) => {
|
|
1115
|
+
n && !t() && (u(bt(n, a())), clearTimeout(d), d = setTimeout(() => u(void 0), pt));
|
|
1116
|
+
})), k(() => clearTimeout(d)), {
|
|
1116
1117
|
face: c,
|
|
1117
1118
|
leaving: l
|
|
1118
1119
|
};
|
|
1119
1120
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
1121
|
+
function St(e) {
|
|
1122
|
+
return N(ke, {
|
|
1122
1123
|
get each() {
|
|
1123
1124
|
return e.drawing;
|
|
1124
1125
|
},
|
|
1125
1126
|
children: (e) => (() => {
|
|
1126
|
-
var t =
|
|
1127
|
-
return
|
|
1127
|
+
var t = ut();
|
|
1128
|
+
return E((n) => {
|
|
1128
1129
|
var r = e().ink, i = e().shade, a = e().d;
|
|
1129
|
-
return r !== n.e &&
|
|
1130
|
+
return r !== n.e && F(t, "data-ink", n.e = r), i !== n.t && F(t, "data-shade", n.t = i), a !== n.a && F(t, "d", n.a = a), n;
|
|
1130
1131
|
}, {
|
|
1131
1132
|
e: void 0,
|
|
1132
1133
|
t: void 0,
|
|
@@ -1137,18 +1138,18 @@ function vt(e) {
|
|
|
1137
1138
|
}
|
|
1138
1139
|
//#endregion
|
|
1139
1140
|
//#region src/elements/face.css?inline
|
|
1140
|
-
var yt = ".face .plate-top{fill:var(--color-tree-raised);stroke:color-mix(in srgb, var(--color-tree-wood-0) 60%, var(--sky));stroke-width:var(--tree-rule-width);stroke-linejoin:round}.face .plate-shade{fill:color-mix(in srgb, var(--color-tree-wood-0) 45%, var(--sky))}.face .plate-shadow{fill:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--sky))}.face .facet{--ink:color-mix(in srgb, var(--color-tree-wood-0) 40%, var(--color-tree-ink));fill:var(--ink);stroke:var(--ink);stroke-width:var(--tree-rule-width);stroke-linejoin:round;vector-effect:non-scaling-stroke}.face .facet[data-ink=plate]{fill:none;stroke:color-mix(in srgb, var(--color-tree-wood-0) 14%, var(--color-tree-raised))}.face .facet[data-ink=glint]{--ink:var(--color-tree-raised)}.face .facet[data-ink=blush]{--ink:color-mix(in srgb, var(--color-tree-alert) 55%, var(--color-tree-raised))}.face .facet[data-ink=tear]{--ink:var(--color-tree-wood-2)}.face .facet[data-ink=tongue]{--ink:color-mix(in srgb, var(--color-tree-alert) 75%, var(--color-tree-raised))}.face .facet[data-shade=left]{fill:color-mix(in srgb, var(--ink) 72%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--ink) 72%, var(--color-tree-ink))}.face .facet[data-shade=right]{fill:color-mix(in srgb, var(--ink) 48%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--ink) 48%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=top]{fill:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=left]{fill:color-mix(in srgb, var(--color-tree-wood-0) 35%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--color-tree-wood-0) 35%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=right]{fill:var(--color-tree-ink);stroke:var(--color-tree-ink)}.face .face-leaving{animation:.3s ease-in forwards face-sink}@keyframes face-sink{to{opacity:0;transform:translateY(var(--space-tree-2))}}@media (prefers-reduced-motion:reduce){.face .face-leaving{animation:none}}", bt = ":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}}", xt = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", St = typeof HTMLElement > "u" ? class {} : HTMLElement, Ct = bt.replaceAll(":root", ":host");
|
|
1141
|
-
function
|
|
1141
|
+
var Ct = ".face .plate-top{fill:var(--color-tree-raised);stroke:color-mix(in srgb, var(--color-tree-wood-0) 60%, var(--sky));stroke-width:var(--tree-rule-width);stroke-linejoin:round}.face .plate-shade{fill:color-mix(in srgb, var(--color-tree-wood-0) 45%, var(--sky))}.face .plate-shadow{fill:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--sky))}.face .facet{--ink:color-mix(in srgb, var(--color-tree-wood-0) 40%, var(--color-tree-ink));fill:var(--ink);stroke:var(--ink);stroke-width:var(--tree-rule-width);stroke-linejoin:round;vector-effect:non-scaling-stroke}.face .facet[data-ink=plate]{fill:none;stroke:color-mix(in srgb, var(--color-tree-wood-0) 14%, var(--color-tree-raised))}.face .facet[data-ink=glint]{--ink:var(--color-tree-raised)}.face .facet[data-ink=blush]{--ink:color-mix(in srgb, var(--color-tree-alert) 55%, var(--color-tree-raised))}.face .facet[data-ink=tear]{--ink:var(--color-tree-wood-2)}.face .facet[data-ink=tongue]{--ink:color-mix(in srgb, var(--color-tree-alert) 75%, var(--color-tree-raised))}.face .facet[data-shade=left]{fill:color-mix(in srgb, var(--ink) 72%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--ink) 72%, var(--color-tree-ink))}.face .facet[data-shade=right]{fill:color-mix(in srgb, var(--ink) 48%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--ink) 48%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=top]{fill:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--color-tree-wood-0) 70%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=left]{fill:color-mix(in srgb, var(--color-tree-wood-0) 35%, var(--color-tree-ink));stroke:color-mix(in srgb, var(--color-tree-wood-0) 35%, var(--color-tree-ink))}.face .facet[data-ink=ink][data-shade=right]{fill:var(--color-tree-ink);stroke:var(--color-tree-ink)}.face .face-leaving{animation:.3s ease-in forwards face-sink}@keyframes face-sink{to{opacity:0;transform:translateY(var(--space-tree-2))}}@media (prefers-reduced-motion:reduce){.face .face-leaving{animation:none}}", wt = ":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}}", Tt = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", Et = typeof HTMLElement > "u" ? class {} : HTMLElement, Dt = wt.replaceAll(":root", ":host");
|
|
1142
|
+
function Ot(e) {
|
|
1142
1143
|
let t;
|
|
1143
|
-
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${
|
|
1144
|
+
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${Dt}\n${Tt}\n${e}`)), t);
|
|
1144
1145
|
}
|
|
1145
|
-
function
|
|
1146
|
+
function kt(e, t) {
|
|
1146
1147
|
typeof customElements < "u" && (customElements.get(e) || customElements.define(e, t));
|
|
1147
1148
|
}
|
|
1148
|
-
var
|
|
1149
|
+
var Y = (e, t) => {
|
|
1149
1150
|
let n = typeof e == "number" ? e : Number.parseFloat(String(e ?? ""));
|
|
1150
1151
|
return Number.isFinite(n) ? n : t;
|
|
1151
|
-
},
|
|
1152
|
+
}, At = (e) => typeof e == "boolean" ? e : e != null && e !== "false", jt = class extends Et {
|
|
1152
1153
|
dispose;
|
|
1153
1154
|
connectedCallback() {
|
|
1154
1155
|
for (let e of this.inputs) if (Object.hasOwn(this, e)) {
|
|
@@ -1157,7 +1158,7 @@ var K = (e, t) => {
|
|
|
1157
1158
|
}
|
|
1158
1159
|
if (this.dispose) return;
|
|
1159
1160
|
let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
|
|
1160
|
-
e.adoptedStyleSheets = [this.sheet()], this.dispose =
|
|
1161
|
+
e.adoptedStyleSheets = [this.sheet()], this.dispose = Pe(() => this.draw(), e);
|
|
1161
1162
|
}
|
|
1162
1163
|
disconnectedCallback() {
|
|
1163
1164
|
this.dispose?.(), this.dispose = void 0;
|
|
@@ -1169,17 +1170,17 @@ var K = (e, t) => {
|
|
|
1169
1170
|
composed: !0
|
|
1170
1171
|
}));
|
|
1171
1172
|
}
|
|
1172
|
-
},
|
|
1173
|
+
}, Mt = /*#__PURE__*/ P("<svg class=face part=face><path class=plate-shade></path><path class=plate-shadow></path><path class=plate-top></path><g transform=\"translate(0 -10)\"><g>"), Nt = /*#__PURE__*/ P("<svg><g class=face-leaving></svg>", !1, !0, !1), Pt = "lattice-face", Ft = Object.keys(gt), It = (e) => Ft.includes(e), Lt = 10, Rt = 2, X = 120 * Ve / 2, zt = ht([
|
|
1173
1174
|
{
|
|
1174
1175
|
x: 0,
|
|
1175
1176
|
y: -120
|
|
1176
1177
|
},
|
|
1177
1178
|
{
|
|
1178
|
-
x:
|
|
1179
|
+
x: X,
|
|
1179
1180
|
y: -60
|
|
1180
1181
|
},
|
|
1181
1182
|
{
|
|
1182
|
-
x:
|
|
1183
|
+
x: X,
|
|
1183
1184
|
y: 60
|
|
1184
1185
|
},
|
|
1185
1186
|
{
|
|
@@ -1187,19 +1188,19 @@ var K = (e, t) => {
|
|
|
1187
1188
|
y: 120
|
|
1188
1189
|
},
|
|
1189
1190
|
{
|
|
1190
|
-
x: -
|
|
1191
|
+
x: -X,
|
|
1191
1192
|
y: 60
|
|
1192
1193
|
},
|
|
1193
1194
|
{
|
|
1194
|
-
x: -
|
|
1195
|
+
x: -X,
|
|
1195
1196
|
y: -60
|
|
1196
1197
|
}
|
|
1197
|
-
],
|
|
1198
|
-
x: -
|
|
1199
|
-
y: -120 -
|
|
1200
|
-
width: 2 * (
|
|
1201
|
-
height: 240 +
|
|
1202
|
-
},
|
|
1198
|
+
], Lt), Z = {
|
|
1199
|
+
x: -X - Rt,
|
|
1200
|
+
y: -120 - Lt - Rt,
|
|
1201
|
+
width: 2 * (X + Rt),
|
|
1202
|
+
height: 240 + Lt + 4
|
|
1203
|
+
}, Bt = Ot(`${Ct}\n.plate-top { vector-effect: non-scaling-stroke; }`), Vt = class e extends jt {
|
|
1203
1204
|
static observedAttributes = [
|
|
1204
1205
|
"mood",
|
|
1205
1206
|
"expression",
|
|
@@ -1210,19 +1211,19 @@ var K = (e, t) => {
|
|
|
1210
1211
|
"decorative"
|
|
1211
1212
|
];
|
|
1212
1213
|
inputs = e.observedAttributes;
|
|
1213
|
-
moodSignal =
|
|
1214
|
-
expressionSignal =
|
|
1215
|
-
pulseSignal =
|
|
1216
|
-
stillSignal =
|
|
1217
|
-
sizeSignal =
|
|
1218
|
-
labelSignal =
|
|
1219
|
-
decorativeSignal =
|
|
1214
|
+
moodSignal = T("happy");
|
|
1215
|
+
expressionSignal = T("");
|
|
1216
|
+
pulseSignal = T(0);
|
|
1217
|
+
stillSignal = T(!1);
|
|
1218
|
+
sizeSignal = T(96);
|
|
1219
|
+
labelSignal = T("");
|
|
1220
|
+
decorativeSignal = T(!1);
|
|
1220
1221
|
get mood() {
|
|
1221
1222
|
return this.moodSignal[0]();
|
|
1222
1223
|
}
|
|
1223
1224
|
set mood(e) {
|
|
1224
1225
|
let t = String(e ?? "").toLowerCase();
|
|
1225
|
-
this.moodSignal[1](
|
|
1226
|
+
this.moodSignal[1](It(t) ? t : "happy");
|
|
1226
1227
|
}
|
|
1227
1228
|
get expression() {
|
|
1228
1229
|
return this.expressionSignal[0]();
|
|
@@ -1234,19 +1235,19 @@ var K = (e, t) => {
|
|
|
1234
1235
|
return this.pulseSignal[0]();
|
|
1235
1236
|
}
|
|
1236
1237
|
set pulse(e) {
|
|
1237
|
-
this.pulseSignal[1](
|
|
1238
|
+
this.pulseSignal[1](Y(e, 0));
|
|
1238
1239
|
}
|
|
1239
1240
|
get still() {
|
|
1240
1241
|
return this.stillSignal[0]();
|
|
1241
1242
|
}
|
|
1242
1243
|
set still(e) {
|
|
1243
|
-
this.stillSignal[1](
|
|
1244
|
+
this.stillSignal[1](At(e));
|
|
1244
1245
|
}
|
|
1245
1246
|
get size() {
|
|
1246
1247
|
return this.sizeSignal[0]();
|
|
1247
1248
|
}
|
|
1248
1249
|
set size(e) {
|
|
1249
|
-
this.sizeSignal[1](Math.max(1,
|
|
1250
|
+
this.sizeSignal[1](Math.max(1, Y(e, 96)));
|
|
1250
1251
|
}
|
|
1251
1252
|
get label() {
|
|
1252
1253
|
return this.labelSignal[0]();
|
|
@@ -1258,37 +1259,37 @@ var K = (e, t) => {
|
|
|
1258
1259
|
return this.decorativeSignal[0]();
|
|
1259
1260
|
}
|
|
1260
1261
|
set decorative(e) {
|
|
1261
|
-
this.decorativeSignal[1](
|
|
1262
|
+
this.decorativeSignal[1](At(e));
|
|
1262
1263
|
}
|
|
1263
1264
|
attributeChangedCallback(e, t, n) {
|
|
1264
1265
|
e === "still" || e === "decorative" ? Reflect.set(this, e, n) : Reflect.set(this, e, n ?? "");
|
|
1265
1266
|
}
|
|
1266
1267
|
sheet() {
|
|
1267
|
-
return
|
|
1268
|
+
return Bt();
|
|
1268
1269
|
}
|
|
1269
1270
|
draw() {
|
|
1270
|
-
let e =
|
|
1271
|
+
let e = D(() => _t(this.expression) ?? vt(this.mood)), { face: t, leaving: n } = xt({
|
|
1271
1272
|
expression: e,
|
|
1272
1273
|
pulse: () => this.pulse,
|
|
1273
1274
|
still: () => this.still
|
|
1274
1275
|
}), r = () => this.label || `A ${e().name.toLowerCase()} face`, i = this;
|
|
1275
1276
|
return (() => {
|
|
1276
|
-
var e =
|
|
1277
|
-
return
|
|
1277
|
+
var e = Mt(), a = e.firstChild, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling, l = c.firstChild;
|
|
1278
|
+
return I(c, N(Ae, {
|
|
1278
1279
|
get when() {
|
|
1279
1280
|
return n();
|
|
1280
1281
|
},
|
|
1281
1282
|
children: (e) => (() => {
|
|
1282
|
-
var t =
|
|
1283
|
-
return
|
|
1283
|
+
var t = Nt();
|
|
1284
|
+
return I(t, N(St, { get drawing() {
|
|
1284
1285
|
return e();
|
|
1285
1286
|
} })), t;
|
|
1286
1287
|
})()
|
|
1287
|
-
}), l),
|
|
1288
|
+
}), l), I(l, N(St, { get drawing() {
|
|
1288
1289
|
return t();
|
|
1289
|
-
} })),
|
|
1290
|
-
var n = i.size, c = i.size *
|
|
1291
|
-
return n !== t.e &&
|
|
1290
|
+
} })), E((t) => {
|
|
1291
|
+
var n = i.size, c = i.size * Z.height / Z.width, l = `${Z.x} ${Z.y} ${Z.width} ${Z.height}`, u = i.decorative ? void 0 : "img", d = i.decorative ? void 0 : r(), f = i.decorative ? "true" : void 0, p = zt.shade, m = zt.shadow, h = zt.top;
|
|
1292
|
+
return n !== t.e && F(e, "width", t.e = n), c !== t.t && F(e, "height", t.t = c), l !== t.a && F(e, "viewBox", t.a = l), u !== t.o && F(e, "role", t.o = u), d !== t.i && F(e, "aria-label", t.i = d), f !== t.n && F(e, "aria-hidden", t.n = f), p !== t.s && F(a, "d", t.s = p), m !== t.h && F(o, "d", t.h = m), h !== t.r && F(s, "d", t.r = h), t;
|
|
1292
1293
|
}, {
|
|
1293
1294
|
e: void 0,
|
|
1294
1295
|
t: void 0,
|
|
@@ -1302,7 +1303,7 @@ var K = (e, t) => {
|
|
|
1302
1303
|
}), e;
|
|
1303
1304
|
})();
|
|
1304
1305
|
}
|
|
1305
|
-
},
|
|
1306
|
+
}, Ht = () => kt(Pt, Vt), Ut = /*#__PURE__*/ P("<svg class=mark-shears viewBox=\"0 0 16 16\"aria-hidden=true><path class=shears-blade part=shears-blade></path><path class=shears-blade part=shears-blade></path><path class=shears-handle part=shears-handle></path><path class=shears-handle part=shears-handle>"), Wt = /*#__PURE__*/ P("<svg class=mark-done viewBox=\"0 0 16 16\"aria-hidden=true><path class=done-cell part=done-cell></path><path class=done-check part=done-check d=\"M 4.3 8.4 L 7 9.96 L 11.8 7.19\">"), Gt = (e, t, n) => {
|
|
1306
1307
|
let r = n * Math.sqrt(3) / 2;
|
|
1307
1308
|
return [
|
|
1308
1309
|
{
|
|
@@ -1331,7 +1332,7 @@ var K = (e, t) => {
|
|
|
1331
1332
|
}
|
|
1332
1333
|
];
|
|
1333
1334
|
};
|
|
1334
|
-
function
|
|
1335
|
+
function Kt() {
|
|
1335
1336
|
let e = (e, t) => [
|
|
1336
1337
|
e,
|
|
1337
1338
|
{
|
|
@@ -1348,16 +1349,16 @@ function Bt() {
|
|
|
1348
1349
|
}
|
|
1349
1350
|
];
|
|
1350
1351
|
return (() => {
|
|
1351
|
-
var t =
|
|
1352
|
-
return
|
|
1353
|
-
var o =
|
|
1352
|
+
var t = Ut(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, a = i.nextSibling;
|
|
1353
|
+
return E((t) => {
|
|
1354
|
+
var o = ze(e({
|
|
1354
1355
|
x: 4.6,
|
|
1355
1356
|
y: 10
|
|
1356
|
-
}, 1)), s =
|
|
1357
|
+
}, 1)), s = ze(e({
|
|
1357
1358
|
x: 11.4,
|
|
1358
1359
|
y: 10
|
|
1359
|
-
}, -1)), c =
|
|
1360
|
-
return o !== t.e &&
|
|
1360
|
+
}, -1)), c = ze(Gt(4.6, 12.6, 2.6)), l = ze(Gt(11.4, 12.6, 2.6));
|
|
1361
|
+
return o !== t.e && F(n, "d", t.e = o), s !== t.t && F(r, "d", t.t = s), c !== t.a && F(i, "d", t.a = c), l !== t.o && F(a, "d", t.o = l), t;
|
|
1361
1362
|
}, {
|
|
1362
1363
|
e: void 0,
|
|
1363
1364
|
t: void 0,
|
|
@@ -1366,19 +1367,19 @@ function Bt() {
|
|
|
1366
1367
|
}), t;
|
|
1367
1368
|
})();
|
|
1368
1369
|
}
|
|
1369
|
-
function
|
|
1370
|
+
function qt() {
|
|
1370
1371
|
return (() => {
|
|
1371
|
-
var e =
|
|
1372
|
-
return
|
|
1372
|
+
var e = Wt(), t = e.firstChild;
|
|
1373
|
+
return E(() => F(t, "d", ze(Gt(8, 8, 7)))), e;
|
|
1373
1374
|
})();
|
|
1374
1375
|
}
|
|
1375
1376
|
//#endregion
|
|
1376
1377
|
//#region src/elements/icon.css?inline
|
|
1377
|
-
var
|
|
1378
|
+
var Jt = ":host{width:var(--lattice-icon-size,var(--space-tree-4));height:var(--lattice-icon-size,var(--space-tree-4))}span{width:100%;height:100%;display:block}svg{width:100%;height:100%}.mark-shears,.mark-done{stroke:currentColor;stroke-width:1.3px;stroke-linejoin:miter}.shears-blade{fill:currentColor}.shears-handle,.done-cell,.done-check{fill:none}.done-check{stroke-width:1.6px}", Yt = /*#__PURE__*/ P("<span part=icon>"), Xt = /*#__PURE__*/ P("<span part=icon role=img>"), Zt = "lattice-icon", Qt = ["shears", "done"], $t = Ot(Jt), en = class e extends jt {
|
|
1378
1379
|
static observedAttributes = ["name", "label"];
|
|
1379
1380
|
inputs = e.observedAttributes;
|
|
1380
|
-
nameSignal =
|
|
1381
|
-
labelSignal =
|
|
1381
|
+
nameSignal = T("shears");
|
|
1382
|
+
labelSignal = T("");
|
|
1382
1383
|
get name() {
|
|
1383
1384
|
return this.nameSignal[0]();
|
|
1384
1385
|
}
|
|
@@ -1395,296 +1396,46 @@ var Ht = ":host{width:var(--lattice-icon-size,var(--space-tree-4));height:var(--
|
|
|
1395
1396
|
Reflect.set(this, e, n ?? "");
|
|
1396
1397
|
}
|
|
1397
1398
|
sheet() {
|
|
1398
|
-
return
|
|
1399
|
+
return $t();
|
|
1399
1400
|
}
|
|
1400
1401
|
draw() {
|
|
1401
1402
|
let e = () => {
|
|
1402
1403
|
let e = this;
|
|
1403
|
-
return
|
|
1404
|
-
return [
|
|
1404
|
+
return N(je, { get children() {
|
|
1405
|
+
return [N(Me, {
|
|
1405
1406
|
get when() {
|
|
1406
1407
|
return e.name === "done";
|
|
1407
1408
|
},
|
|
1408
1409
|
get children() {
|
|
1409
|
-
return
|
|
1410
|
+
return N(qt, {});
|
|
1410
1411
|
}
|
|
1411
|
-
}),
|
|
1412
|
+
}), N(Me, {
|
|
1412
1413
|
get when() {
|
|
1413
1414
|
return e.name === "shears";
|
|
1414
1415
|
},
|
|
1415
1416
|
get children() {
|
|
1416
|
-
return
|
|
1417
|
+
return N(Kt, {});
|
|
1417
1418
|
}
|
|
1418
1419
|
})];
|
|
1419
1420
|
} });
|
|
1420
1421
|
}, t = this;
|
|
1421
|
-
return
|
|
1422
|
+
return N(Ae, {
|
|
1422
1423
|
get when() {
|
|
1423
1424
|
return t.label;
|
|
1424
1425
|
},
|
|
1425
1426
|
get fallback() {
|
|
1426
1427
|
return (() => {
|
|
1427
|
-
var t =
|
|
1428
|
-
return
|
|
1428
|
+
var t = Yt();
|
|
1429
|
+
return I(t, e), t;
|
|
1429
1430
|
})();
|
|
1430
1431
|
},
|
|
1431
1432
|
children: (t) => (() => {
|
|
1432
|
-
var n =
|
|
1433
|
-
return
|
|
1433
|
+
var n = Xt();
|
|
1434
|
+
return I(n, e), E(() => F(n, "aria-label", t())), n;
|
|
1434
1435
|
})()
|
|
1435
1436
|
});
|
|
1436
1437
|
}
|
|
1437
|
-
},
|
|
1438
|
-
width: 76.21,
|
|
1439
|
-
height: 132,
|
|
1440
|
-
half: 38.11
|
|
1441
|
-
}, Qt = {
|
|
1442
|
-
sky: "M 76.21 66.00 L 38.11 88.00 L -0.00 66.00 L 0.00 22.00 L 38.11 0.00 L 76.21 22.00 Z M 38.11 132.00 L 0.00 154.00 L -38.11 132.00 L -38.11 88.00 L -0.00 66.00 L 38.11 88.00 Z M 114.32 132.00 L 76.21 154.00 L 38.11 132.00 L 38.11 88.00 L 76.21 66.00 L 114.32 88.00 Z",
|
|
1443
|
-
earth: "M 76.21 66.00 L 38.11 88.00 L -0.00 66.00 L 0.00 22.00 L 38.11 0.00 L 76.21 22.00 Z M 38.11 44.00 L 76.21 66.00 M 57.16 55.00 L 57.16 77.00 L 38.11 66.00 Z M 38.11 44.00 L 38.11 88.00 M 38.11 66.00 L 19.05 77.00 L 19.05 55.00 Z M 38.11 44.00 L -0.00 66.00 M 19.05 55.00 L -0.00 44.00 L 19.05 33.00 Z M 38.11 44.00 L 0.00 22.00 M 19.05 33.00 L 19.05 11.00 L 38.11 22.00 Z M 38.11 44.00 L 38.11 0.00 M 38.11 22.00 L 57.16 11.00 L 57.16 33.00 Z M 38.11 44.00 L 76.21 22.00 M 57.16 33.00 L 76.21 44.00 L 57.16 55.00 Z M 38.11 132.00 L 0.00 154.00 L -38.11 132.00 L -38.11 88.00 L -0.00 66.00 L 38.11 88.00 Z M 0.00 110.00 L 38.11 132.00 M 19.05 121.00 L 19.05 143.00 L 0.00 132.00 Z M 0.00 110.00 L 0.00 154.00 M 0.00 132.00 L -19.05 143.00 L -19.05 121.00 Z M 0.00 110.00 L -38.11 132.00 M -19.05 121.00 L -38.11 110.00 L -19.05 99.00 Z M 0.00 110.00 L -38.11 88.00 M -19.05 99.00 L -19.05 77.00 L -0.00 88.00 Z M 0.00 110.00 L -0.00 66.00 M -0.00 88.00 L 19.05 77.00 L 19.05 99.00 Z M 0.00 110.00 L 38.11 88.00 M 19.05 99.00 L 38.11 110.00 L 19.05 121.00 Z M 114.32 132.00 L 76.21 154.00 L 38.11 132.00 L 38.11 88.00 L 76.21 66.00 L 114.32 88.00 Z M 76.21 110.00 L 114.32 132.00 M 95.26 121.00 L 95.26 143.00 L 76.21 132.00 Z M 76.21 110.00 L 76.21 154.00 M 76.21 132.00 L 57.16 143.00 L 57.16 121.00 Z M 76.21 110.00 L 38.11 132.00 M 57.16 121.00 L 38.11 110.00 L 57.16 99.00 Z M 76.21 110.00 L 38.11 88.00 M 57.16 99.00 L 57.16 77.00 L 76.21 88.00 Z M 76.21 110.00 L 76.21 66.00 M 76.21 88.00 L 95.26 77.00 L 95.26 99.00 Z M 76.21 110.00 L 114.32 88.00 M 95.26 99.00 L 114.32 110.00 L 95.26 121.00 Z"
|
|
1444
|
-
}, $t = 44, { width: X } = Zt, Z = X / 2;
|
|
1445
|
-
function en(e) {
|
|
1446
|
-
return {
|
|
1447
|
-
x: X * (e.q + e.r / 2),
|
|
1448
|
-
y: 66 * e.r
|
|
1449
|
-
};
|
|
1450
|
-
}
|
|
1451
|
-
function tn(e) {
|
|
1452
|
-
return {
|
|
1453
|
-
x: Z * e.j,
|
|
1454
|
-
y: $t * e.i + 22 * e.j
|
|
1455
|
-
};
|
|
1456
|
-
}
|
|
1457
|
-
function nn(e) {
|
|
1458
|
-
let t = tn(e);
|
|
1459
|
-
return {
|
|
1460
|
-
x: t.x,
|
|
1461
|
-
y: 22 + t.y
|
|
1462
|
-
};
|
|
1463
|
-
}
|
|
1464
|
-
function rn(e) {
|
|
1465
|
-
let { i: t, j: n } = e;
|
|
1466
|
-
return e.k === 0 ? [
|
|
1467
|
-
{
|
|
1468
|
-
i: t,
|
|
1469
|
-
j: n
|
|
1470
|
-
},
|
|
1471
|
-
{
|
|
1472
|
-
i: t,
|
|
1473
|
-
j: n + 1
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
i: t + 1,
|
|
1477
|
-
j: n
|
|
1478
|
-
}
|
|
1479
|
-
] : [
|
|
1480
|
-
{
|
|
1481
|
-
i: t,
|
|
1482
|
-
j: n + 1
|
|
1483
|
-
},
|
|
1484
|
-
{
|
|
1485
|
-
i: t + 1,
|
|
1486
|
-
j: n + 1
|
|
1487
|
-
},
|
|
1488
|
-
{
|
|
1489
|
-
i: t + 1,
|
|
1490
|
-
j: n
|
|
1491
|
-
}
|
|
1492
|
-
];
|
|
1493
|
-
}
|
|
1494
|
-
function an(e, t) {
|
|
1495
|
-
let n = e - Z, r = 2 / 3 * ((t - 44) / $t), i = Math.sqrt(3) / 3 * (n / $t) - r / 2, a = -i - r, o = Math.round(i), s = Math.round(r), c = Math.round(a), l = Math.abs(o - i), u = Math.abs(s - r), d = Math.abs(c - a);
|
|
1496
|
-
return l > u && l > d ? o = -s - c : u > d && (s = -o - c), {
|
|
1497
|
-
q: o + 0,
|
|
1498
|
-
r: s + 0
|
|
1499
|
-
};
|
|
1500
|
-
}
|
|
1501
|
-
function on(e, t) {
|
|
1502
|
-
let n = Math.round(e / Z);
|
|
1503
|
-
return {
|
|
1504
|
-
i: Math.round((t - 22 - 22 * n) / $t) + 0,
|
|
1505
|
-
j: n + 0
|
|
1506
|
-
};
|
|
1507
|
-
}
|
|
1508
|
-
function sn(e) {
|
|
1509
|
-
return {
|
|
1510
|
-
i: e.r - e.q,
|
|
1511
|
-
j: 1 + 2 * e.q + e.r
|
|
1512
|
-
};
|
|
1513
|
-
}
|
|
1514
|
-
function cn(e) {
|
|
1515
|
-
let { i: t, j: n } = sn(e);
|
|
1516
|
-
return [
|
|
1517
|
-
{
|
|
1518
|
-
i: t,
|
|
1519
|
-
j: n,
|
|
1520
|
-
k: 0
|
|
1521
|
-
},
|
|
1522
|
-
{
|
|
1523
|
-
i: t - 1,
|
|
1524
|
-
j: n,
|
|
1525
|
-
k: 0
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
i: t,
|
|
1529
|
-
j: n - 1,
|
|
1530
|
-
k: 0
|
|
1531
|
-
},
|
|
1532
|
-
{
|
|
1533
|
-
i: t - 1,
|
|
1534
|
-
j: n,
|
|
1535
|
-
k: 1
|
|
1536
|
-
},
|
|
1537
|
-
{
|
|
1538
|
-
i: t,
|
|
1539
|
-
j: n - 1,
|
|
1540
|
-
k: 1
|
|
1541
|
-
},
|
|
1542
|
-
{
|
|
1543
|
-
i: t - 1,
|
|
1544
|
-
j: n - 1,
|
|
1545
|
-
k: 1
|
|
1546
|
-
}
|
|
1547
|
-
];
|
|
1548
|
-
}
|
|
1549
|
-
function ln(e) {
|
|
1550
|
-
let { i: t, j: n } = e;
|
|
1551
|
-
return e.k === 0 ? [
|
|
1552
|
-
{
|
|
1553
|
-
i: t - 1,
|
|
1554
|
-
j: n,
|
|
1555
|
-
k: 1
|
|
1556
|
-
},
|
|
1557
|
-
{
|
|
1558
|
-
i: t,
|
|
1559
|
-
j: n,
|
|
1560
|
-
k: 1
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
i: t,
|
|
1564
|
-
j: n - 1,
|
|
1565
|
-
k: 1
|
|
1566
|
-
}
|
|
1567
|
-
] : [
|
|
1568
|
-
{
|
|
1569
|
-
i: t,
|
|
1570
|
-
j: n + 1,
|
|
1571
|
-
k: 0
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
i: t + 1,
|
|
1575
|
-
j: n,
|
|
1576
|
-
k: 0
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
i: t,
|
|
1580
|
-
j: n,
|
|
1581
|
-
k: 0
|
|
1582
|
-
}
|
|
1583
|
-
];
|
|
1584
|
-
}
|
|
1585
|
-
var un = (e) => `${e.i},${e.j},${e.k}`, dn = (e) => `${e.i},${e.j}`, fn = (e) => e.kind === "cell" ? cn(e.at) : [e.at], pn = /* @__PURE__ */ new WeakMap();
|
|
1586
|
-
function mn(e) {
|
|
1587
|
-
let t = pn.get(e);
|
|
1588
|
-
return t || (t = e.parts.flatMap(fn), pn.set(e, t)), t;
|
|
1589
|
-
}
|
|
1590
|
-
function hn(e) {
|
|
1591
|
-
let t = e.flatMap(fn).flatMap((e) => rn(e).map(nn)), n = {
|
|
1592
|
-
x: t.reduce((e, t) => e + t.x, 0) / t.length,
|
|
1593
|
-
y: t.reduce((e, t) => e + t.y, 0) / t.length
|
|
1594
|
-
};
|
|
1595
|
-
return e.some((e) => e.kind === "cell") ? sn(an(n.x, n.y)) : on(n.x, n.y);
|
|
1596
|
-
}
|
|
1597
|
-
var gn = (e, t) => ({
|
|
1598
|
-
id: e,
|
|
1599
|
-
parts: t,
|
|
1600
|
-
pivot: hn(t)
|
|
1601
|
-
});
|
|
1602
|
-
function _n(e) {
|
|
1603
|
-
let t = /* @__PURE__ */ new Map();
|
|
1604
|
-
e.parts.forEach((e, n) => {
|
|
1605
|
-
for (let r of fn(e)) t.set(un(r), n);
|
|
1606
|
-
});
|
|
1607
|
-
let n = [];
|
|
1608
|
-
for (let [e, r] of t) {
|
|
1609
|
-
let [i, a, o] = e.split(",").map(Number), s = {
|
|
1610
|
-
i,
|
|
1611
|
-
j: a,
|
|
1612
|
-
k: o
|
|
1613
|
-
};
|
|
1614
|
-
for (let e of ln(s)) {
|
|
1615
|
-
let i = t.get(un(e));
|
|
1616
|
-
if (i === void 0 || i <= r) continue;
|
|
1617
|
-
let a = new Set(rn(s).map(dn)), o = rn(e).filter((e) => a.has(dn(e)));
|
|
1618
|
-
o.length === 2 && n.push([nn(o[0]), nn(o[1])]);
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
return n;
|
|
1622
|
-
}
|
|
1623
|
-
function vn(e, t) {
|
|
1624
|
-
let n = (e) => Math.round(e * 100) / 100, r = (e) => `M${e.map((e) => `${n(e.x)} ${n(e.y)}`).join("L")}Z`, i = (e) => ({
|
|
1625
|
-
x: e.x,
|
|
1626
|
-
y: e.y - t
|
|
1627
|
-
}), a = /* @__PURE__ */ new Map(), o = (e, t, n) => {
|
|
1628
|
-
let r = `${e}:${t}`, i = a.get(r) ?? {
|
|
1629
|
-
tone: t,
|
|
1630
|
-
kind: e,
|
|
1631
|
-
d: []
|
|
1632
|
-
};
|
|
1633
|
-
i.d.push(n), a.set(r, i);
|
|
1634
|
-
};
|
|
1635
|
-
for (let t of e.parts) if (t.kind === "cell") {
|
|
1636
|
-
let { x: e, y: n } = en(t.at), a = (t, r) => ({
|
|
1637
|
-
x: e + t,
|
|
1638
|
-
y: n + r
|
|
1639
|
-
}), [s, c, l] = [
|
|
1640
|
-
a(0, 66),
|
|
1641
|
-
a(Z, 88),
|
|
1642
|
-
a(X, 66)
|
|
1643
|
-
];
|
|
1644
|
-
o("shade", t.tone, r([
|
|
1645
|
-
s,
|
|
1646
|
-
c,
|
|
1647
|
-
i(c),
|
|
1648
|
-
i(s)
|
|
1649
|
-
])), o("shadow", t.tone, r([
|
|
1650
|
-
c,
|
|
1651
|
-
l,
|
|
1652
|
-
i(l),
|
|
1653
|
-
i(c)
|
|
1654
|
-
])), o("top", t.tone, r([
|
|
1655
|
-
a(Z, 0),
|
|
1656
|
-
a(X, 22),
|
|
1657
|
-
a(X, 66),
|
|
1658
|
-
a(Z, 88),
|
|
1659
|
-
a(0, 66),
|
|
1660
|
-
a(0, 22)
|
|
1661
|
-
].map(i)));
|
|
1662
|
-
} else {
|
|
1663
|
-
let e = rn(t.at).map(nn), n = e[2], a = e[1];
|
|
1664
|
-
o(t.at.k === 0 ? "shadow" : "shade", t.tone, r([
|
|
1665
|
-
n,
|
|
1666
|
-
a,
|
|
1667
|
-
i(a),
|
|
1668
|
-
i(n)
|
|
1669
|
-
])), o("top", t.tone, r(e.map(i)));
|
|
1670
|
-
}
|
|
1671
|
-
let s = [
|
|
1672
|
-
"shade",
|
|
1673
|
-
"shadow",
|
|
1674
|
-
"top"
|
|
1675
|
-
];
|
|
1676
|
-
return {
|
|
1677
|
-
faces: [...a.values()].sort((e, t) => s.indexOf(e.kind) - s.indexOf(t.kind) || e.tone - t.tone).map((e) => ({
|
|
1678
|
-
tone: e.tone,
|
|
1679
|
-
kind: e.kind,
|
|
1680
|
-
d: e.d.join("")
|
|
1681
|
-
})),
|
|
1682
|
-
seams: _n(e).map(([e, r]) => `M${n(e.x)} ${n(e.y - t)}L${n(r.x)} ${n(r.y - t)}`).join("")
|
|
1683
|
-
};
|
|
1684
|
-
}
|
|
1685
|
-
//#endregion
|
|
1686
|
-
//#region src/elements/shapes.ts
|
|
1687
|
-
var yn = 8, Q = (e, t, n) => ({
|
|
1438
|
+
}, tn = () => kt(Zt, en), nn = ".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)}.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}", rn = 8, Q = (e, t, n) => ({
|
|
1688
1439
|
kind: "cell",
|
|
1689
1440
|
at: {
|
|
1690
1441
|
q: e,
|
|
@@ -1699,7 +1450,7 @@ var yn = 8, Q = (e, t, n) => ({
|
|
|
1699
1450
|
k: n
|
|
1700
1451
|
},
|
|
1701
1452
|
tone: r
|
|
1702
|
-
}),
|
|
1453
|
+
}), an = [
|
|
1703
1454
|
{
|
|
1704
1455
|
q: 1,
|
|
1705
1456
|
r: 0
|
|
@@ -1724,7 +1475,7 @@ var yn = 8, Q = (e, t, n) => ({
|
|
|
1724
1475
|
q: 1,
|
|
1725
1476
|
r: -1
|
|
1726
1477
|
}
|
|
1727
|
-
],
|
|
1478
|
+
], on = {
|
|
1728
1479
|
cell: (e) => [Q(0, 0, e)],
|
|
1729
1480
|
pair: (e) => [Q(0, 0, e), Q(1, 0, e)],
|
|
1730
1481
|
line: (e) => [
|
|
@@ -1732,7 +1483,7 @@ var yn = 8, Q = (e, t, n) => ({
|
|
|
1732
1483
|
Q(0, 0, e),
|
|
1733
1484
|
Q(1, 0, e)
|
|
1734
1485
|
],
|
|
1735
|
-
flower: (e) => [Q(0, 0, e), ...
|
|
1486
|
+
flower: (e) => [Q(0, 0, e), ...an.map((t) => Q(t.q, t.r, e))],
|
|
1736
1487
|
triangle: (e) => [$(0, 0, 0, e)],
|
|
1737
1488
|
diamond: (e) => [$(0, 0, 0, e), $(0, 0, 1, e)],
|
|
1738
1489
|
trapezoid: (e) => [
|
|
@@ -1746,12 +1497,12 @@ var yn = 8, Q = (e, t, n) => ({
|
|
|
1746
1497
|
$(1, 0, 0, e),
|
|
1747
1498
|
$(0, 0, 1, e)
|
|
1748
1499
|
],
|
|
1749
|
-
hexagon: (e) =>
|
|
1500
|
+
hexagon: (e) => t({
|
|
1750
1501
|
q: 0,
|
|
1751
1502
|
r: 0
|
|
1752
1503
|
}).map((t) => $(t.i, t.j, t.k, e))
|
|
1753
|
-
},
|
|
1754
|
-
function
|
|
1504
|
+
}, sn = Object.keys(on), cn = (e) => Math.min(7, Math.max(0, Math.round(Number.isFinite(e) ? e : 0))), ln = (e) => typeof e == "number" && Number.isInteger(e);
|
|
1505
|
+
function un(e, t) {
|
|
1755
1506
|
let n = e;
|
|
1756
1507
|
if (typeof n == "string") try {
|
|
1757
1508
|
n = JSON.parse(n);
|
|
@@ -1760,11 +1511,11 @@ function Tn(e, t) {
|
|
|
1760
1511
|
}
|
|
1761
1512
|
return Array.isArray(n) ? n.flatMap((e) => {
|
|
1762
1513
|
if (typeof e != "object" || !e) return [];
|
|
1763
|
-
let { kind: n, at: r, tone: i } = e, a =
|
|
1764
|
-
return n === "cell" && r &&
|
|
1514
|
+
let { kind: n, at: r, tone: i } = e, a = cn(typeof i == "number" ? i : t);
|
|
1515
|
+
return n === "cell" && r && ln(r.q) && ln(r.r) ? [Q(r.q, r.r, a)] : n === "tri" && r && ln(r.i) && ln(r.j) && (r.k === 0 || r.k === 1) ? [$(r.i, r.j, r.k, a)] : [];
|
|
1765
1516
|
}) : [];
|
|
1766
1517
|
}
|
|
1767
|
-
function
|
|
1518
|
+
function dn(e, t, i = 2) {
|
|
1768
1519
|
if (e.length === 0) return {
|
|
1769
1520
|
faces: [],
|
|
1770
1521
|
seams: "",
|
|
@@ -1775,20 +1526,20 @@ function En(e, t, n = 2) {
|
|
|
1775
1526
|
height: 0
|
|
1776
1527
|
}
|
|
1777
1528
|
};
|
|
1778
|
-
let
|
|
1779
|
-
x:
|
|
1780
|
-
y:
|
|
1781
|
-
width: Math.max(...
|
|
1782
|
-
height: Math.max(...
|
|
1529
|
+
let c = r("shape", e), l = s(c).flatMap((e) => o(e).map(n)), u = l.map((e) => e.x), d = l.map((e) => e.y), f = Math.min(...u) - i, p = Math.min(...d) - t - i, m = {
|
|
1530
|
+
x: f,
|
|
1531
|
+
y: p,
|
|
1532
|
+
width: Math.max(...u) + i - f,
|
|
1533
|
+
height: Math.max(...d) + i - p
|
|
1783
1534
|
};
|
|
1784
1535
|
return {
|
|
1785
|
-
...
|
|
1786
|
-
box:
|
|
1536
|
+
...a(c, t),
|
|
1537
|
+
box: m
|
|
1787
1538
|
};
|
|
1788
1539
|
}
|
|
1789
1540
|
//#endregion
|
|
1790
1541
|
//#region src/elements/woods.css?inline
|
|
1791
|
-
var
|
|
1542
|
+
var fn = ".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)}", pn = /*#__PURE__*/ P("<svg class=\"shape woods\"part=shape><path class=seams>"), mn = /*#__PURE__*/ P("<svg><path></svg>", !1, !0, !1), hn = "lattice-shape", gn = (e) => Object.hasOwn(on, e), _n = Ot(`${fn}\n${nn}`), vn = class e extends jt {
|
|
1792
1543
|
static observedAttributes = [
|
|
1793
1544
|
"shape",
|
|
1794
1545
|
"parts",
|
|
@@ -1798,22 +1549,22 @@ var Dn = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\
|
|
|
1798
1549
|
"label"
|
|
1799
1550
|
];
|
|
1800
1551
|
inputs = e.observedAttributes;
|
|
1801
|
-
shapeSignal =
|
|
1802
|
-
partsSignal =
|
|
1803
|
-
toneSignal =
|
|
1804
|
-
liftSignal =
|
|
1805
|
-
scaleSignal =
|
|
1806
|
-
labelSignal =
|
|
1552
|
+
shapeSignal = T("cell");
|
|
1553
|
+
partsSignal = T();
|
|
1554
|
+
toneSignal = T(0);
|
|
1555
|
+
liftSignal = T(8);
|
|
1556
|
+
scaleSignal = T(1);
|
|
1557
|
+
labelSignal = T("");
|
|
1807
1558
|
get shape() {
|
|
1808
1559
|
return this.shapeSignal[0]();
|
|
1809
1560
|
}
|
|
1810
1561
|
set shape(e) {
|
|
1811
1562
|
let t = String(e ?? "").toLowerCase();
|
|
1812
|
-
this.shapeSignal[1](
|
|
1563
|
+
this.shapeSignal[1](gn(t) ? t : "cell");
|
|
1813
1564
|
}
|
|
1814
1565
|
get parts() {
|
|
1815
1566
|
let e = this.partsSignal[0]();
|
|
1816
|
-
return e === void 0 ?
|
|
1567
|
+
return e === void 0 ? on[this.shape](this.tone) : un(e, this.tone);
|
|
1817
1568
|
}
|
|
1818
1569
|
set parts(e) {
|
|
1819
1570
|
this.partsSignal[1](() => e === null || e === "" ? void 0 : e);
|
|
@@ -1822,19 +1573,19 @@ var Dn = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\
|
|
|
1822
1573
|
return this.toneSignal[0]();
|
|
1823
1574
|
}
|
|
1824
1575
|
set tone(e) {
|
|
1825
|
-
this.toneSignal[1](
|
|
1576
|
+
this.toneSignal[1](cn(Y(e, 0)));
|
|
1826
1577
|
}
|
|
1827
1578
|
get lift() {
|
|
1828
1579
|
return this.liftSignal[0]();
|
|
1829
1580
|
}
|
|
1830
1581
|
set lift(e) {
|
|
1831
|
-
this.liftSignal[1](Math.max(0,
|
|
1582
|
+
this.liftSignal[1](Math.max(0, Y(e, 8)));
|
|
1832
1583
|
}
|
|
1833
1584
|
get scale() {
|
|
1834
1585
|
return this.scaleSignal[0]();
|
|
1835
1586
|
}
|
|
1836
1587
|
set scale(e) {
|
|
1837
|
-
let t =
|
|
1588
|
+
let t = Y(e, 1);
|
|
1838
1589
|
this.scaleSignal[1](t > 0 ? t : 1);
|
|
1839
1590
|
}
|
|
1840
1591
|
get label() {
|
|
@@ -1847,30 +1598,30 @@ var Dn = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\
|
|
|
1847
1598
|
e === "parts" ? this.parts = n : Reflect.set(this, e, n ?? "");
|
|
1848
1599
|
}
|
|
1849
1600
|
sheet() {
|
|
1850
|
-
return
|
|
1601
|
+
return _n();
|
|
1851
1602
|
}
|
|
1852
1603
|
draw() {
|
|
1853
|
-
let e =
|
|
1604
|
+
let e = D(() => dn(this.parts, this.lift)), t = () => e().box, n = this;
|
|
1854
1605
|
return (() => {
|
|
1855
|
-
var r =
|
|
1856
|
-
return
|
|
1606
|
+
var r = pn(), i = r.firstChild;
|
|
1607
|
+
return I(r, N(Oe, {
|
|
1857
1608
|
get each() {
|
|
1858
1609
|
return e().faces;
|
|
1859
1610
|
},
|
|
1860
1611
|
children: (e) => (() => {
|
|
1861
|
-
var t =
|
|
1862
|
-
return
|
|
1612
|
+
var t = mn();
|
|
1613
|
+
return E((n) => {
|
|
1863
1614
|
var r = `flat-${e.kind}`, i = e.tone, a = e.d;
|
|
1864
|
-
return r !== n.e &&
|
|
1615
|
+
return r !== n.e && F(t, "class", n.e = r), i !== n.t && F(t, "data-tone", n.t = i), a !== n.a && F(t, "d", n.a = a), n;
|
|
1865
1616
|
}, {
|
|
1866
1617
|
e: void 0,
|
|
1867
1618
|
t: void 0,
|
|
1868
1619
|
a: void 0
|
|
1869
1620
|
}), t;
|
|
1870
1621
|
})()
|
|
1871
|
-
}), i),
|
|
1622
|
+
}), i), E((a) => {
|
|
1872
1623
|
var o = t().width * n.scale, s = t().height * n.scale, c = `${t().x} ${t().y} ${t().width} ${t().height}`, l = n.label ? "img" : void 0, u = n.label || void 0, d = n.label ? void 0 : "true", f = e().seams;
|
|
1873
|
-
return o !== a.e &&
|
|
1624
|
+
return o !== a.e && F(r, "width", a.e = o), s !== a.t && F(r, "height", a.t = s), c !== a.a && F(r, "viewBox", a.a = c), l !== a.o && F(r, "role", a.o = l), u !== a.i && F(r, "aria-label", a.i = u), d !== a.n && F(r, "aria-hidden", a.n = d), f !== a.s && F(i, "d", a.s = f), a;
|
|
1874
1625
|
}, {
|
|
1875
1626
|
e: void 0,
|
|
1876
1627
|
t: void 0,
|
|
@@ -1882,13 +1633,13 @@ var Dn = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\
|
|
|
1882
1633
|
}), r;
|
|
1883
1634
|
})();
|
|
1884
1635
|
}
|
|
1885
|
-
},
|
|
1886
|
-
function
|
|
1887
|
-
let [e, t] =
|
|
1636
|
+
}, yn = () => kt(hn, vn), bn = ":host{touch-action:none;cursor:crosshair;display:block;position:relative}:host([disabled]){cursor:auto;pointer-events:none}.trail{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.blade{fill:none;stroke:var(--color-tree-alert);stroke-width:var(--tree-rule-thick-width);stroke-linecap:round;stroke-linejoin:round}", xn = 220;
|
|
1637
|
+
function Sn() {
|
|
1638
|
+
let [e, t] = T([]), n, r = () => {
|
|
1888
1639
|
let i = performance.now();
|
|
1889
|
-
t((e) => e.filter((e) => i - e.at <
|
|
1640
|
+
t((e) => e.filter((e) => i - e.at < xn)), n = e().length > 0 ? requestAnimationFrame(r) : void 0;
|
|
1890
1641
|
};
|
|
1891
|
-
return
|
|
1642
|
+
return k(() => {
|
|
1892
1643
|
n !== void 0 && cancelAnimationFrame(n);
|
|
1893
1644
|
}), {
|
|
1894
1645
|
points: () => e().map((e) => `${e.p.x},${e.p.y}`).join(" "),
|
|
@@ -1902,24 +1653,24 @@ function Ln() {
|
|
|
1902
1653
|
}
|
|
1903
1654
|
//#endregion
|
|
1904
1655
|
//#region src/elements/shears.tsx
|
|
1905
|
-
var
|
|
1656
|
+
var Cn = /*#__PURE__*/ P("<svg class=trail part=trail aria-hidden=true><polyline class=blade>"), wn = "shears-pad", Tn = Ot(bn), En = class e extends jt {
|
|
1906
1657
|
static observedAttributes = ["disabled"];
|
|
1907
1658
|
inputs = e.observedAttributes;
|
|
1908
|
-
disabledSignal =
|
|
1659
|
+
disabledSignal = T(!1);
|
|
1909
1660
|
get disabled() {
|
|
1910
1661
|
return this.disabledSignal[0]();
|
|
1911
1662
|
}
|
|
1912
1663
|
set disabled(e) {
|
|
1913
|
-
this.disabledSignal[1](
|
|
1664
|
+
this.disabledSignal[1](At(e));
|
|
1914
1665
|
}
|
|
1915
1666
|
attributeChangedCallback(e, t, n) {
|
|
1916
1667
|
this.disabled = n;
|
|
1917
1668
|
}
|
|
1918
1669
|
sheet() {
|
|
1919
|
-
return
|
|
1670
|
+
return Tn();
|
|
1920
1671
|
}
|
|
1921
1672
|
draw() {
|
|
1922
|
-
let e =
|
|
1673
|
+
let e = Sn(), t, n, r = (e) => {
|
|
1923
1674
|
let t = this.getBoundingClientRect();
|
|
1924
1675
|
return {
|
|
1925
1676
|
x: e.clientX - t.left,
|
|
@@ -1948,25 +1699,25 @@ var Rn = /*#__PURE__*/ O("<svg class=trail part=trail aria-hidden=true><polyline
|
|
|
1948
1699
|
["pointercancel", o]
|
|
1949
1700
|
];
|
|
1950
1701
|
for (let [e, t] of s) this.addEventListener(e, t);
|
|
1951
|
-
return
|
|
1702
|
+
return k(() => {
|
|
1952
1703
|
for (let [e, t] of s) this.removeEventListener(e, t);
|
|
1953
1704
|
}), (() => {
|
|
1954
|
-
var t =
|
|
1955
|
-
return
|
|
1705
|
+
var t = Cn(), n = t.firstChild;
|
|
1706
|
+
return E(() => F(n, "points", e.points())), t;
|
|
1956
1707
|
})();
|
|
1957
1708
|
}
|
|
1958
|
-
},
|
|
1709
|
+
}, Dn = () => kt(wn, En), On = ":host{background:var(--color-tree-sky);display:block;position:relative}:host([kind=earth]){background:var(--color-tree-earth)}.sky{width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.line{fill:none;stroke:var(--color-tree-lattice-sky);stroke-width:var(--tree-rule-width)}:host([kind=earth]) .line{stroke:var(--color-tree-lattice-earth)}", kn = /*#__PURE__*/ P("<svg class=sky part=sky aria-hidden=true><defs><pattern patternUnits=userSpaceOnUse><path class=line></path></pattern></defs><rect width=100% height=100%>"), An = "hex-sky", jn = Ot(On), Mn = 0, Nn = class t extends jt {
|
|
1959
1710
|
static observedAttributes = [
|
|
1960
1711
|
"kind",
|
|
1961
1712
|
"scale",
|
|
1962
1713
|
"x",
|
|
1963
1714
|
"y"
|
|
1964
1715
|
];
|
|
1965
|
-
inputs =
|
|
1966
|
-
kindSignal =
|
|
1967
|
-
scaleSignal =
|
|
1968
|
-
xSignal =
|
|
1969
|
-
ySignal =
|
|
1716
|
+
inputs = t.observedAttributes;
|
|
1717
|
+
kindSignal = T("sky");
|
|
1718
|
+
scaleSignal = T(1);
|
|
1719
|
+
xSignal = T(0);
|
|
1720
|
+
ySignal = T(0);
|
|
1970
1721
|
get kind() {
|
|
1971
1722
|
return this.kindSignal[0]();
|
|
1972
1723
|
}
|
|
@@ -1977,47 +1728,47 @@ var Rn = /*#__PURE__*/ O("<svg class=trail part=trail aria-hidden=true><polyline
|
|
|
1977
1728
|
return this.scaleSignal[0]();
|
|
1978
1729
|
}
|
|
1979
1730
|
set scale(e) {
|
|
1980
|
-
let t =
|
|
1731
|
+
let t = Y(e, 1);
|
|
1981
1732
|
this.scaleSignal[1](t > 0 ? t : 1);
|
|
1982
1733
|
}
|
|
1983
1734
|
get x() {
|
|
1984
1735
|
return this.xSignal[0]();
|
|
1985
1736
|
}
|
|
1986
1737
|
set x(e) {
|
|
1987
|
-
this.xSignal[1](
|
|
1738
|
+
this.xSignal[1](Y(e, 0));
|
|
1988
1739
|
}
|
|
1989
1740
|
get y() {
|
|
1990
1741
|
return this.ySignal[0]();
|
|
1991
1742
|
}
|
|
1992
1743
|
set y(e) {
|
|
1993
|
-
this.ySignal[1](
|
|
1744
|
+
this.ySignal[1](Y(e, 0));
|
|
1994
1745
|
}
|
|
1995
1746
|
attributeChangedCallback(e, t, n) {
|
|
1996
1747
|
Reflect.set(this, e, n ?? "");
|
|
1997
1748
|
}
|
|
1998
1749
|
sheet() {
|
|
1999
|
-
return
|
|
1750
|
+
return jn();
|
|
2000
1751
|
}
|
|
2001
1752
|
draw() {
|
|
2002
|
-
let
|
|
1753
|
+
let t = `${An}-${++Mn}`, n = this;
|
|
2003
1754
|
return (() => {
|
|
2004
|
-
var
|
|
2005
|
-
return
|
|
2006
|
-
var
|
|
2007
|
-
return
|
|
1755
|
+
var r = kn(), a = r.firstChild, o = a.firstChild, s = o.firstChild, c = a.nextSibling;
|
|
1756
|
+
return F(o, "id", t), F(c, "fill", `url(#${t})`), E((t) => {
|
|
1757
|
+
var r = e.width, a = e.height, c = `translate(${n.x} ${n.y}) scale(${n.scale})`, l = i[n.kind];
|
|
1758
|
+
return r !== t.e && F(o, "width", t.e = r), a !== t.t && F(o, "height", t.t = a), c !== t.a && F(o, "patternTransform", t.a = c), l !== t.o && F(s, "d", t.o = l), t;
|
|
2008
1759
|
}, {
|
|
2009
1760
|
e: void 0,
|
|
2010
1761
|
t: void 0,
|
|
2011
1762
|
a: void 0,
|
|
2012
1763
|
o: void 0
|
|
2013
|
-
}),
|
|
1764
|
+
}), r;
|
|
2014
1765
|
})();
|
|
2015
1766
|
}
|
|
2016
|
-
},
|
|
1767
|
+
}, Pn = () => kt(An, Nn);
|
|
2017
1768
|
//#endregion
|
|
2018
1769
|
//#region src/elements/index.ts
|
|
2019
|
-
function
|
|
2020
|
-
|
|
1770
|
+
function Fn() {
|
|
1771
|
+
Ht(), Pn(), yn(), Dn(), tn();
|
|
2021
1772
|
}
|
|
2022
1773
|
//#endregion
|
|
2023
|
-
export {
|
|
1774
|
+
export { Pt as _, wn as a, Ht as b, vn as c, sn as d, rn as f, tn as g, en as h, Pn as i, hn as l, Zt as m, Nn as n, En as o, Qt as p, An as r, Dn as s, Fn as t, yn as u, Vt as v, at as x, Ft as y };
|