@le-space/build-journey 0.0.0-stage → 0.12.12
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/README.md +124 -2
- package/package.json +36 -4
- package/src/BuildJourney.svelte +1252 -0
- package/src/index.mjs +3 -0
- package/src/model.mjs +421 -0
|
@@ -0,0 +1,1252 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// The build of a sealed image as an event of its own: a full-screen view
|
|
3
|
+
// with its stations, the small steps of the current one with their LEDs,
|
|
4
|
+
// the picture of what flows where, the evidence with links to check it,
|
|
5
|
+
// the time left and when it ends. It can shrink to a slim bar. While it
|
|
6
|
+
// runs the screen stays on (Wake Lock), leaving the page asks first, and
|
|
7
|
+
// the tab's title carries the progress. At the end: the finale; when it
|
|
8
|
+
// stopped: where, and the reason the app hands in. Everything shown is
|
|
9
|
+
// what the build reported (model.mjs withFacts); nothing is interpreted.
|
|
10
|
+
//
|
|
11
|
+
// Each app keeps its own words: `text(key, vars)` answers every text (the
|
|
12
|
+
// keys are listed in the README), so an app's catalogue stays the one
|
|
13
|
+
// place for them.
|
|
14
|
+
import { onDestroy } from 'svelte';
|
|
15
|
+
import {
|
|
16
|
+
BUILD_STATIONS,
|
|
17
|
+
HARDWARE,
|
|
18
|
+
LINKS,
|
|
19
|
+
PLACES,
|
|
20
|
+
evidence,
|
|
21
|
+
fetchPercent,
|
|
22
|
+
fetchRate,
|
|
23
|
+
flowNow,
|
|
24
|
+
journey,
|
|
25
|
+
marksNow,
|
|
26
|
+
minutes,
|
|
27
|
+
onPath,
|
|
28
|
+
pathOf,
|
|
29
|
+
reported,
|
|
30
|
+
short,
|
|
31
|
+
substeps
|
|
32
|
+
} from './model.mjs';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @type {{
|
|
36
|
+
* view: { station: string, since: number, done: boolean, failed: boolean, minimized?: boolean, facts?: import('./model.mjs').Facts, fetchPct?: number | null },
|
|
37
|
+
* text: (key: string, vars?: Record<string, string | number>) => string,
|
|
38
|
+
* stations?: import('./model.mjs').Station[],
|
|
39
|
+
* locale?: string,
|
|
40
|
+
* builder?: import('./model.mjs').BuilderPin,
|
|
41
|
+
* links?: import('./model.mjs').EvidenceLinks,
|
|
42
|
+
* hardware?: readonly { key: string, href: string }[] | null,
|
|
43
|
+
* places?: Record<string, readonly number[]>,
|
|
44
|
+
* lines?: readonly (readonly string[])[],
|
|
45
|
+
* reason?: string | null,
|
|
46
|
+
* hint?: string | null,
|
|
47
|
+
* uploadHosts?: number | null,
|
|
48
|
+
* simple?: boolean,
|
|
49
|
+
* finaleEvidence?: boolean,
|
|
50
|
+
* wakeLock?: boolean,
|
|
51
|
+
* miniAt?: 'top' | 'bottom',
|
|
52
|
+
* openHref?: string | null,
|
|
53
|
+
* testid?: string,
|
|
54
|
+
* cover?: import('svelte').Snippet,
|
|
55
|
+
* onminimize?: () => void,
|
|
56
|
+
* onexpand?: () => void,
|
|
57
|
+
* onclose?: () => void,
|
|
58
|
+
* oncertificate?: (() => void) | null
|
|
59
|
+
* }}
|
|
60
|
+
*/
|
|
61
|
+
let {
|
|
62
|
+
view,
|
|
63
|
+
text,
|
|
64
|
+
stations: all = BUILD_STATIONS,
|
|
65
|
+
locale = undefined,
|
|
66
|
+
builder = null,
|
|
67
|
+
links = {},
|
|
68
|
+
hardware = HARDWARE,
|
|
69
|
+
places = PLACES,
|
|
70
|
+
lines = LINKS,
|
|
71
|
+
reason = null,
|
|
72
|
+
hint = null,
|
|
73
|
+
uploadHosts = null,
|
|
74
|
+
simple = false,
|
|
75
|
+
finaleEvidence = true,
|
|
76
|
+
wakeLock = true,
|
|
77
|
+
miniAt = 'bottom',
|
|
78
|
+
openHref = null,
|
|
79
|
+
testid = 'build-journey',
|
|
80
|
+
cover = undefined,
|
|
81
|
+
onminimize = () => {},
|
|
82
|
+
onexpand = () => {},
|
|
83
|
+
onclose = () => {},
|
|
84
|
+
oncertificate = null
|
|
85
|
+
} = $props();
|
|
86
|
+
|
|
87
|
+
let now = $state(Date.now());
|
|
88
|
+
const tick = setInterval(() => (now = Date.now()), 1000);
|
|
89
|
+
onDestroy(() => clearInterval(tick));
|
|
90
|
+
|
|
91
|
+
const facts = $derived(view.facts ?? {});
|
|
92
|
+
const fetchPct = $derived(view.fetchPct ?? null);
|
|
93
|
+
const j = $derived(
|
|
94
|
+
journey({ stations: all, station: view.station, since: view.since, now, facts, fetchPct, done: view.done })
|
|
95
|
+
);
|
|
96
|
+
const pct = $derived(Math.round(j.share * 100));
|
|
97
|
+
const running = $derived(!view.done && !view.failed);
|
|
98
|
+
const current = $derived(all[Math.min(j.index, all.length - 1)]?.key ?? view.station);
|
|
99
|
+
const shown = $derived(
|
|
100
|
+
all.map((s, i) => ({
|
|
101
|
+
key: s.key,
|
|
102
|
+
n: i + 1,
|
|
103
|
+
done: view.done || i < j.index,
|
|
104
|
+
active: !view.done && i === j.index
|
|
105
|
+
}))
|
|
106
|
+
);
|
|
107
|
+
const steps = $derived(substeps({ stations: all, station: current, facts, done: view.done }));
|
|
108
|
+
const flow = $derived(flowNow({ stations: all, station: current, facts, fetchPct }));
|
|
109
|
+
// A key or a report travels alone, drawn as itself; pieces as dots.
|
|
110
|
+
const carried = $derived(flow.kind === 'key' || flow.kind === 'report');
|
|
111
|
+
// What happened where: keys, checks, measurements, signatures (marksNow).
|
|
112
|
+
const marks = $derived(marksNow({ stations: all, station: current, facts, builder, done: view.done }));
|
|
113
|
+
/** The marks of a place, and the one whose words stand under it: what happens now, else the latest. @param {string} p */
|
|
114
|
+
const marksAt = (p) => marks.filter((m) => m.at === p);
|
|
115
|
+
/** @param {string} p */
|
|
116
|
+
const noteAt = (p) => {
|
|
117
|
+
const here = marksAt(p);
|
|
118
|
+
return here.find((m) => m.now) ?? here[here.length - 1];
|
|
119
|
+
};
|
|
120
|
+
const fetched = $derived(current === 'fetch' ? (fetchPercent(facts) ?? fetchPct) : null);
|
|
121
|
+
const rate = $derived(fetchRate(facts, now));
|
|
122
|
+
const ends = $derived(new Date(j.ends).toLocaleTimeString(locale, { hour: '2-digit', minute: '2-digit' }));
|
|
123
|
+
const proofs = $derived(evidence(facts, builder, links));
|
|
124
|
+
const hasReport = $derived(reported(proofs).length > 0);
|
|
125
|
+
// An app without these words (an empty text) shows nothing in their place.
|
|
126
|
+
const noneText = $derived(running ? text('evidenceNone') : text('evidenceNoneStopped'));
|
|
127
|
+
const mib = (/** @type {number} */ b) => Math.round(b / 1048576);
|
|
128
|
+
const st = (/** @type {string} */ key, /** @type {string} */ part) => text(`stations.${key}.${part}`);
|
|
129
|
+
|
|
130
|
+
/** What a small step adds: connections confirmed, bytes and speed, the upload's host and try. @param {string} key */
|
|
131
|
+
const extra = (key) => {
|
|
132
|
+
if (key === 'lanes' && facts.attested) return text('attested', { count: facts.attested });
|
|
133
|
+
if (key === 'bytes' && facts.size) {
|
|
134
|
+
const amount = text('mib', { got: mib(facts.got ?? 0), size: mib(facts.size) });
|
|
135
|
+
return rate
|
|
136
|
+
? `${amount} · ${text('rate', { rate: rate.toLocaleString(locale, { maximumFractionDigits: 1 }) })}`
|
|
137
|
+
: amount;
|
|
138
|
+
}
|
|
139
|
+
if (key === 'upload' && facts.host && current === 'store') {
|
|
140
|
+
const host = String(facts.host).replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
141
|
+
const tries = facts.attempt ?? 1;
|
|
142
|
+
return tries > 1
|
|
143
|
+
? `${text('attempt', { n: tries, of: uploadHosts ?? tries })} · ${host}`
|
|
144
|
+
: host;
|
|
145
|
+
}
|
|
146
|
+
return '';
|
|
147
|
+
};
|
|
148
|
+
const retrying = $derived(current === 'store' && (facts.attempt ?? 1) > 1 && !facts.processed);
|
|
149
|
+
|
|
150
|
+
// The picture: where each place sits, and the path the data takes now.
|
|
151
|
+
const pathD = $derived(pathOf(flow.path, places));
|
|
152
|
+
const ids = $derived({ title: `${testid}-title` });
|
|
153
|
+
|
|
154
|
+
// The screen stays on while it runs, and comes back on after the tab was hidden.
|
|
155
|
+
/** @type {any} */
|
|
156
|
+
let lock = null;
|
|
157
|
+
async function wake() {
|
|
158
|
+
try {
|
|
159
|
+
lock = (await /** @type {any} */ (navigator).wakeLock?.request('screen')) ?? null;
|
|
160
|
+
} catch {
|
|
161
|
+
lock = null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
$effect(() => {
|
|
165
|
+
if (!running || !wakeLock) return;
|
|
166
|
+
wake();
|
|
167
|
+
const visible = () => document.visibilityState === 'visible' && wake();
|
|
168
|
+
document.addEventListener('visibilitychange', visible);
|
|
169
|
+
return () => {
|
|
170
|
+
document.removeEventListener('visibilitychange', visible);
|
|
171
|
+
lock?.release?.()?.catch?.(() => {});
|
|
172
|
+
lock = null;
|
|
173
|
+
};
|
|
174
|
+
});
|
|
175
|
+
// When the page was away, say for how long: a phone may stop a hidden tab.
|
|
176
|
+
let hiddenAt = 0;
|
|
177
|
+
let away = $state(0);
|
|
178
|
+
$effect(() => {
|
|
179
|
+
if (!running) return;
|
|
180
|
+
const seen = () => {
|
|
181
|
+
if (document.visibilityState === 'hidden') hiddenAt = Date.now();
|
|
182
|
+
else if (hiddenAt) {
|
|
183
|
+
const s = Math.round((Date.now() - hiddenAt) / 1000);
|
|
184
|
+
hiddenAt = 0;
|
|
185
|
+
if (s >= 5) away = s;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
document.addEventListener('visibilitychange', seen);
|
|
189
|
+
return () => document.removeEventListener('visibilitychange', seen);
|
|
190
|
+
});
|
|
191
|
+
// Leaving the page would stop the build: the browser asks first.
|
|
192
|
+
$effect(() => {
|
|
193
|
+
if (!running) return;
|
|
194
|
+
const leave = text('leave');
|
|
195
|
+
const ask = (/** @type {BeforeUnloadEvent} */ e) => {
|
|
196
|
+
e.preventDefault();
|
|
197
|
+
e.returnValue = leave;
|
|
198
|
+
return leave;
|
|
199
|
+
};
|
|
200
|
+
window.addEventListener('beforeunload', ask);
|
|
201
|
+
return () => window.removeEventListener('beforeunload', ask);
|
|
202
|
+
});
|
|
203
|
+
// The tab's title carries the progress, and gets its own back afterwards.
|
|
204
|
+
const before = typeof document === 'undefined' ? '' : document.title;
|
|
205
|
+
$effect(() => {
|
|
206
|
+
document.title = running ? text('tab', { pct }) : before;
|
|
207
|
+
});
|
|
208
|
+
onDestroy(() => {
|
|
209
|
+
if (typeof document !== 'undefined') document.title = before;
|
|
210
|
+
});
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
{#snippet check(/** @type {number} */ size)}
|
|
214
|
+
<svg
|
|
215
|
+
width={size}
|
|
216
|
+
height={size}
|
|
217
|
+
viewBox="0 0 24 24"
|
|
218
|
+
fill="none"
|
|
219
|
+
stroke="currentColor"
|
|
220
|
+
stroke-width="2.5"
|
|
221
|
+
stroke-linecap="round"
|
|
222
|
+
stroke-linejoin="round"
|
|
223
|
+
aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg
|
|
224
|
+
>
|
|
225
|
+
{/snippet}
|
|
226
|
+
|
|
227
|
+
{#snippet value(/** @type {import('./model.mjs').Evidence} */ p)}
|
|
228
|
+
{#if p.href}<a href={p.href} target="_blank" rel="noopener noreferrer"><code>{short(p.value)}</code></a
|
|
229
|
+
>{:else}<code>{short(p.value)}</code>{/if}
|
|
230
|
+
{/snippet}
|
|
231
|
+
|
|
232
|
+
{#if view.minimized && running}
|
|
233
|
+
<div class="bj-mini" class:top={miniAt === 'top'} role="status" data-testid="{testid}-mini">
|
|
234
|
+
<span class="dot pulse" aria-hidden="true"></span>
|
|
235
|
+
<strong>{st(current, 'mini')}</strong>
|
|
236
|
+
<span class="bar"><span class="fill shimmer" style="width: {pct}%"></span></span>
|
|
237
|
+
<span>{pct} % · {text('left', { minutes: minutes(j.left) })}</span>
|
|
238
|
+
<button type="button" onclick={onexpand} data-testid="{testid}-expand">{text('expand')}</button>
|
|
239
|
+
</div>
|
|
240
|
+
{:else}
|
|
241
|
+
<div
|
|
242
|
+
class="bj-overlay"
|
|
243
|
+
role="dialog"
|
|
244
|
+
aria-modal="true"
|
|
245
|
+
aria-labelledby={ids.title}
|
|
246
|
+
data-testid={testid}
|
|
247
|
+
data-station={current}
|
|
248
|
+
data-state={view.done ? 'done' : view.failed ? 'stopped' : 'running'}
|
|
249
|
+
>
|
|
250
|
+
{#if cover}
|
|
251
|
+
{@render cover()}
|
|
252
|
+
{:else if view.done}
|
|
253
|
+
<div class="finale" data-testid="{testid}-done">
|
|
254
|
+
<div class="big pop" aria-hidden="true">
|
|
255
|
+
<span class="spark s1"></span><span class="spark s2"></span><span class="spark s3"></span><span
|
|
256
|
+
class="spark s4"
|
|
257
|
+
></span>
|
|
258
|
+
<span class="spin ring"></span>
|
|
259
|
+
{@render check(52)}
|
|
260
|
+
</div>
|
|
261
|
+
<h2 id={ids.title}>{text('doneTitle')}</h2>
|
|
262
|
+
<p>{text('doneText')}</p>
|
|
263
|
+
{#if !simple && finaleEvidence && hasReport}
|
|
264
|
+
<ul class="proofs-inline" data-testid="{testid}-done-evidence">
|
|
265
|
+
{#each reported(proofs) as p (p.key)}
|
|
266
|
+
<li>
|
|
267
|
+
<span class="led on" aria-hidden="true"></span>
|
|
268
|
+
<span>{text(`evidence.${p.key}`)}{#if p.ok}{' · '}<em>{text('matches')}</em>{/if}</span>
|
|
269
|
+
{@render value(p)}
|
|
270
|
+
</li>
|
|
271
|
+
{/each}
|
|
272
|
+
</ul>
|
|
273
|
+
{/if}
|
|
274
|
+
<p class="row center">
|
|
275
|
+
{#if openHref}<a
|
|
276
|
+
class="cta"
|
|
277
|
+
href={openHref}
|
|
278
|
+
target="_blank"
|
|
279
|
+
rel="noopener noreferrer"
|
|
280
|
+
data-testid="{testid}-open">{text('open')}</a
|
|
281
|
+
>{/if}
|
|
282
|
+
{#if oncertificate}<button
|
|
283
|
+
type="button"
|
|
284
|
+
class="secondary"
|
|
285
|
+
onclick={oncertificate}
|
|
286
|
+
data-testid="{testid}-certificate">{text('showCertificate')}</button
|
|
287
|
+
>{/if}
|
|
288
|
+
<button
|
|
289
|
+
type="button"
|
|
290
|
+
class={openHref ? 'link' : 'cta'}
|
|
291
|
+
onclick={onclose}
|
|
292
|
+
data-testid="{testid}-close">{text('close')}</button
|
|
293
|
+
>
|
|
294
|
+
</p>
|
|
295
|
+
</div>
|
|
296
|
+
{:else}
|
|
297
|
+
<div class="journey">
|
|
298
|
+
<div class="top">
|
|
299
|
+
<div>
|
|
300
|
+
<p class="kicker">{text('kicker')}</p>
|
|
301
|
+
<h2 id={ids.title}>{text('title')}</h2>
|
|
302
|
+
</div>
|
|
303
|
+
{#if running}
|
|
304
|
+
<button type="button" class="ghost" onclick={onminimize} data-testid="{testid}-minimize"
|
|
305
|
+
>{text('minimize')}</button
|
|
306
|
+
>
|
|
307
|
+
{:else}
|
|
308
|
+
<button type="button" class="ghost" onclick={onclose} data-testid="{testid}-close"
|
|
309
|
+
>{text('close')}</button
|
|
310
|
+
>
|
|
311
|
+
{/if}
|
|
312
|
+
</div>
|
|
313
|
+
<ol class="stations" style="--n: {all.length}">
|
|
314
|
+
{#each shown as s (s.key)}
|
|
315
|
+
<li
|
|
316
|
+
class:done={s.done}
|
|
317
|
+
class:active={s.active}
|
|
318
|
+
aria-current={s.active ? 'step' : undefined}
|
|
319
|
+
data-testid="{testid}-station-{s.key}"
|
|
320
|
+
data-state={s.done ? 'done' : s.active ? (running ? 'active' : 'stopped') : 'next'}
|
|
321
|
+
>
|
|
322
|
+
<span class="circle" class:pulse={s.active && running} class:stop={s.active && !running}>
|
|
323
|
+
{#if s.done}{@render check(26)}{:else}{s.n}{/if}
|
|
324
|
+
{#if s.active && running}<span class="ring spin" aria-hidden="true"></span>{/if}
|
|
325
|
+
</span>
|
|
326
|
+
<span class="label">{st(s.key, 'label')}</span>
|
|
327
|
+
<span class="dur">{st(s.key, 'duration')}</span>
|
|
328
|
+
</li>
|
|
329
|
+
{/each}
|
|
330
|
+
</ol>
|
|
331
|
+
<div class="leds" aria-hidden="true">
|
|
332
|
+
{#each shown as s (s.key)}<span
|
|
333
|
+
class="led"
|
|
334
|
+
class:on={s.done}
|
|
335
|
+
class:blink={s.active && running}
|
|
336
|
+
class:off={s.active && !running}
|
|
337
|
+
></span>{/each}
|
|
338
|
+
</div>
|
|
339
|
+
<div class="grid" class:single={simple}>
|
|
340
|
+
<div class="col">
|
|
341
|
+
<div class="now" aria-live="polite">
|
|
342
|
+
{#if view.failed}
|
|
343
|
+
<p class="step">{text('stoppedAt', { n: j.index + 1, station: st(current, 'label') })}</p>
|
|
344
|
+
<h3>{text('failedTitle')}</h3>
|
|
345
|
+
{#if reason}
|
|
346
|
+
<p class="reason" role="alert" data-testid="{testid}-reason">{reason}</p>
|
|
347
|
+
{/if}
|
|
348
|
+
<p>{text('failedText')}</p>
|
|
349
|
+
{:else}
|
|
350
|
+
<p class="step">{text('step', { n: j.index + 1, of: all.length })} · {st(current, 'duration')}</p>
|
|
351
|
+
<h3 data-testid="{testid}-stage">{st(current, 'title')}</h3>
|
|
352
|
+
<p>{st(current, 'text')}</p>
|
|
353
|
+
{#if !simple}
|
|
354
|
+
<ul class="subs" data-testid="{testid}-substeps">
|
|
355
|
+
{#each steps as s (s.key)}
|
|
356
|
+
<li class={s.state} data-state={s.state}>
|
|
357
|
+
<span
|
|
358
|
+
class="led"
|
|
359
|
+
class:on={s.state === 'done'}
|
|
360
|
+
class:blink={s.state === 'active'}
|
|
361
|
+
aria-hidden="true"
|
|
362
|
+
></span>
|
|
363
|
+
<span
|
|
364
|
+
>{text(`sub.${s.key}`)}{#if extra(s.key)}<small class="extra">{extra(s.key)}</small
|
|
365
|
+
>{/if}</span
|
|
366
|
+
>
|
|
367
|
+
</li>
|
|
368
|
+
{/each}
|
|
369
|
+
</ul>
|
|
370
|
+
{/if}
|
|
371
|
+
{#if retrying}<p class="small" data-testid="{testid}-retry">{text('retryNote')}</p>{/if}
|
|
372
|
+
{#if fetched != null}
|
|
373
|
+
<span class="bar big-bar"><span class="fill gold shimmer" style="width: {fetched}%"></span></span>
|
|
374
|
+
<p class="small" data-testid="{testid}-fetched">{text('fetched', { pct: fetched })}</p>
|
|
375
|
+
{/if}
|
|
376
|
+
{/if}
|
|
377
|
+
</div>
|
|
378
|
+
{#if running}
|
|
379
|
+
<figure class="flow" data-testid="{testid}-flow" data-what={flow.what}>
|
|
380
|
+
<figcaption>
|
|
381
|
+
{text('flowTitle')}: <strong>{text(`flow.${flow.what}`)}</strong>{#if flow.share != null}<span
|
|
382
|
+
class="extra">{Math.round(flow.share * 100)} %</span
|
|
383
|
+
>{/if}
|
|
384
|
+
</figcaption>
|
|
385
|
+
<svg viewBox="0 0 720 250" role="img" aria-label="{text('flowTitle')}: {text(`flow.${flow.what}`)}">
|
|
386
|
+
{#each lines as [a, b] (a + b)}
|
|
387
|
+
{#if places[a] && places[b]}
|
|
388
|
+
<line
|
|
389
|
+
x1={places[a][0]}
|
|
390
|
+
y1={places[a][1]}
|
|
391
|
+
x2={places[b][0]}
|
|
392
|
+
y2={places[b][1]}
|
|
393
|
+
class:hot={onPath(flow.path, a, b)}
|
|
394
|
+
/>
|
|
395
|
+
{/if}
|
|
396
|
+
{/each}
|
|
397
|
+
{#key pathD + flow.kind}
|
|
398
|
+
{#if !carried}
|
|
399
|
+
{#each [0, 0.6, 1.2] as delay (delay)}
|
|
400
|
+
<circle r="6" class="packet" opacity="0"
|
|
401
|
+
><set attributeName="opacity" to="1" begin="{delay}s" /><animateMotion
|
|
402
|
+
dur="1.8s"
|
|
403
|
+
begin="{delay}s"
|
|
404
|
+
repeatCount="indefinite"
|
|
405
|
+
path={pathD}
|
|
406
|
+
/></circle
|
|
407
|
+
>
|
|
408
|
+
{/each}
|
|
409
|
+
{/if}
|
|
410
|
+
{/key}
|
|
411
|
+
{#each Object.entries(places) as [p, [cx, cy]] (p)}
|
|
412
|
+
{@const note = noteAt(p)}
|
|
413
|
+
<g class="place" class:hot={flow.path.includes(p)}>
|
|
414
|
+
<rect x={cx - 86} y={cy - 18} width="172" height="36" rx="10" />
|
|
415
|
+
<circle cx={cx - 70} {cy} r="5" class="lamp" class:blink={flow.path.includes(p)} />
|
|
416
|
+
<text x={cx - 58} y={cy + 5}>{text(`places.${p}`)}</text>
|
|
417
|
+
{#each marksAt(p) as m, i (m.kind)}
|
|
418
|
+
<g
|
|
419
|
+
transform="translate({cx + 72 - i * 27} {cy - 18})"
|
|
420
|
+
data-testid="{testid}-mark-{p}-{m.kind}"
|
|
421
|
+
data-state={m.now ? 'now' : m.ok === false ? 'bad' : 'done'}
|
|
422
|
+
>
|
|
423
|
+
<g class="mark {m.kind}" class:live={m.now} class:failed={m.ok === false}>
|
|
424
|
+
<title>{text(m.label, m.vars)}</title>
|
|
425
|
+
<circle r="11" />
|
|
426
|
+
{@render icon(m.kind)}
|
|
427
|
+
</g>
|
|
428
|
+
</g>
|
|
429
|
+
{/each}
|
|
430
|
+
{#if note && text(note.label, note.vars)}
|
|
431
|
+
<text class="note" class:live={note.now} class:failed={note.ok === false} x={cx} y={cy + 34} text-anchor="middle"
|
|
432
|
+
>{text(note.label, note.vars)}{note.ok === true ? ' ✓' : note.ok === false ? ' ✗' : ''}</text
|
|
433
|
+
>
|
|
434
|
+
{/if}
|
|
435
|
+
</g>
|
|
436
|
+
{/each}
|
|
437
|
+
{#if carried}
|
|
438
|
+
<!-- A key or a report travels alone, as itself, above the places. -->
|
|
439
|
+
{#key pathD + flow.kind}
|
|
440
|
+
<g class="carrier {flow.kind}" data-testid="{testid}-carrier" data-kind={flow.kind} opacity="0"
|
|
441
|
+
><set attributeName="opacity" to="1" begin="0s" /><circle r="13" />{@render icon(flow.kind === 'key' ? 'key' : 'attest')}<animateMotion
|
|
442
|
+
dur="2.4s"
|
|
443
|
+
repeatCount="indefinite"
|
|
444
|
+
path={pathD}
|
|
445
|
+
/></g
|
|
446
|
+
>
|
|
447
|
+
{/key}
|
|
448
|
+
{/if}
|
|
449
|
+
</svg>
|
|
450
|
+
{#if marks.length}
|
|
451
|
+
<!-- The same notes as words, for a narrow screen and for a screen reader. -->
|
|
452
|
+
<ul class="marks-list" data-testid="{testid}-marks">
|
|
453
|
+
{#each marks as m (m.at + m.kind)}
|
|
454
|
+
{#if text(m.label, m.vars)}
|
|
455
|
+
<li class:live={m.now} class:failed={m.ok === false} data-kind={m.kind}>
|
|
456
|
+
<svg viewBox="-12 -12 24 24" aria-hidden="true" class="mark {m.kind}"><circle r="11" />{@render icon(m.kind)}</svg>
|
|
457
|
+
<span>{text(`places.${m.at}`)}: {text(m.label, m.vars)}{m.ok === true ? ' ✓' : m.ok === false ? ' ✗' : ''}</span>
|
|
458
|
+
</li>
|
|
459
|
+
{/if}
|
|
460
|
+
{/each}
|
|
461
|
+
</ul>
|
|
462
|
+
{/if}
|
|
463
|
+
{#if flow.share != null}<span class="bar"
|
|
464
|
+
><span class="fill" style="width: {Math.round(flow.share * 100)}%"></span></span
|
|
465
|
+
>{/if}
|
|
466
|
+
</figure>
|
|
467
|
+
{/if}
|
|
468
|
+
</div>
|
|
469
|
+
{#if !simple}
|
|
470
|
+
<aside class="proofs" data-testid="{testid}-evidence">
|
|
471
|
+
<h4>{text('evidenceTitle')}</h4>
|
|
472
|
+
{#if proofs.length}
|
|
473
|
+
<ul>
|
|
474
|
+
{#each proofs as p (p.key)}
|
|
475
|
+
<li class="pop" data-key={p.key}>
|
|
476
|
+
<span class="led on" aria-hidden="true"></span>
|
|
477
|
+
<span class="what"
|
|
478
|
+
>{text(`evidence.${p.key}`)}{#if p.ok}{' · '}<em>{text('matches')}</em>{/if}</span
|
|
479
|
+
>
|
|
480
|
+
{@render value(p)}
|
|
481
|
+
</li>
|
|
482
|
+
{/each}
|
|
483
|
+
</ul>
|
|
484
|
+
{/if}
|
|
485
|
+
{#if !hasReport && noneText}
|
|
486
|
+
<p class="small">{noneText}</p>
|
|
487
|
+
{/if}
|
|
488
|
+
{#if hardware?.length}
|
|
489
|
+
<h4>{text('hardwareTitle')}</h4>
|
|
490
|
+
<ul>
|
|
491
|
+
{#each hardware as h (h.key)}<li>
|
|
492
|
+
<span class="led on" aria-hidden="true"></span><a
|
|
493
|
+
href={h.href}
|
|
494
|
+
target="_blank"
|
|
495
|
+
rel="noopener noreferrer">{text(`hardware.${h.key}`)}</a
|
|
496
|
+
>
|
|
497
|
+
</li>{/each}
|
|
498
|
+
</ul>
|
|
499
|
+
{/if}
|
|
500
|
+
</aside>
|
|
501
|
+
{/if}
|
|
502
|
+
</div>
|
|
503
|
+
{#if running}
|
|
504
|
+
<div class="total">
|
|
505
|
+
<p class="row between">
|
|
506
|
+
<strong data-testid="{testid}-share">{text('share', { pct })}</strong>
|
|
507
|
+
<span>{text('left', { minutes: minutes(j.left) })} · {text('endsAt', { time: ends })}</span>
|
|
508
|
+
</p>
|
|
509
|
+
<span class="bar"><span class="fill shimmer" style="width: {pct}%"></span></span>
|
|
510
|
+
{#if away && text('cameBack', { seconds: away })}
|
|
511
|
+
<p class="warn" role="status" data-testid="{testid}-away">{text('cameBack', { seconds: away })}</p>
|
|
512
|
+
{/if}
|
|
513
|
+
{#if hint}<p class="small" data-testid="{testid}-hint">{hint}</p>{/if}
|
|
514
|
+
<p class="small">{text('keepOpen')}</p>
|
|
515
|
+
</div>
|
|
516
|
+
{/if}
|
|
517
|
+
</div>
|
|
518
|
+
{/if}
|
|
519
|
+
</div>
|
|
520
|
+
{/if}
|
|
521
|
+
|
|
522
|
+
{#snippet icon(/** @type {string} */ kind)}
|
|
523
|
+
<g class="glyph">
|
|
524
|
+
{#if kind === 'key'}
|
|
525
|
+
<circle cx="-3" cy="0" r="3.2" /><path d="M0.2 0H6.5M4.2 0v3M6.5 0v2.4" />
|
|
526
|
+
{:else if kind === 'attest'}
|
|
527
|
+
<path d="M0 -6.5L5.2 -4.4V0.4C5.2 3.6 2.6 5.6 0 6.6C-2.6 5.6 -5.2 3.6 -5.2 0.4V-4.4Z" /><path d="M-2.3 0.2L-0.6 1.9L2.5 -1.4" />
|
|
528
|
+
{:else if kind === 'measure'}
|
|
529
|
+
<path d="M-5.6 3A5.8 5.8 0 1 1 5.6 3" /><path d="M0 2.2L3 -3" /><circle cx="0" cy="2.2" r="1" />
|
|
530
|
+
{:else if kind === 'sign'}
|
|
531
|
+
<path d="M-4.6 4.6L-3.9 1.6L2.6 -4.9L4.9 -2.6L-1.6 3.9Z" />
|
|
532
|
+
{:else}
|
|
533
|
+
<path d="M-4.2 0.2L-1.2 3.2L4.6 -3" />
|
|
534
|
+
{/if}
|
|
535
|
+
</g>
|
|
536
|
+
{/snippet}
|
|
537
|
+
|
|
538
|
+
<style>
|
|
539
|
+
.bj-overlay {
|
|
540
|
+
position: fixed;
|
|
541
|
+
inset: 0;
|
|
542
|
+
z-index: 50;
|
|
543
|
+
overflow-y: auto;
|
|
544
|
+
background: #0f2a2e;
|
|
545
|
+
color: #f6f2ea;
|
|
546
|
+
display: flex;
|
|
547
|
+
justify-content: center;
|
|
548
|
+
align-items: flex-start;
|
|
549
|
+
padding: clamp(1rem, 4vw, 3rem) 1rem;
|
|
550
|
+
box-sizing: border-box;
|
|
551
|
+
text-align: left;
|
|
552
|
+
}
|
|
553
|
+
.journey,
|
|
554
|
+
.finale {
|
|
555
|
+
width: 100%;
|
|
556
|
+
max-width: 68rem;
|
|
557
|
+
display: flex;
|
|
558
|
+
flex-direction: column;
|
|
559
|
+
gap: 2rem;
|
|
560
|
+
}
|
|
561
|
+
.top {
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-wrap: wrap;
|
|
564
|
+
justify-content: space-between;
|
|
565
|
+
align-items: flex-start;
|
|
566
|
+
gap: 1rem;
|
|
567
|
+
}
|
|
568
|
+
.kicker {
|
|
569
|
+
margin: 0;
|
|
570
|
+
font-size: 0.8rem;
|
|
571
|
+
letter-spacing: 0.08em;
|
|
572
|
+
text-transform: uppercase;
|
|
573
|
+
color: #5eead4;
|
|
574
|
+
}
|
|
575
|
+
h2,
|
|
576
|
+
h3 {
|
|
577
|
+
color: #f6f2ea;
|
|
578
|
+
}
|
|
579
|
+
h2 {
|
|
580
|
+
margin: 0.4rem 0 0;
|
|
581
|
+
font-size: clamp(1.8rem, 4vw, 2.6rem);
|
|
582
|
+
line-height: 1.1;
|
|
583
|
+
font-weight: 700;
|
|
584
|
+
}
|
|
585
|
+
h3 {
|
|
586
|
+
margin: 0;
|
|
587
|
+
font-size: clamp(1.4rem, 3vw, 1.9rem);
|
|
588
|
+
font-weight: 600;
|
|
589
|
+
}
|
|
590
|
+
button {
|
|
591
|
+
font: inherit;
|
|
592
|
+
min-height: 2.75rem;
|
|
593
|
+
}
|
|
594
|
+
.ghost {
|
|
595
|
+
padding: 0.6rem 1.1rem;
|
|
596
|
+
border-radius: 999px;
|
|
597
|
+
border: 1px solid rgba(246, 242, 234, 0.35);
|
|
598
|
+
background: transparent;
|
|
599
|
+
color: inherit;
|
|
600
|
+
cursor: pointer;
|
|
601
|
+
}
|
|
602
|
+
.stations {
|
|
603
|
+
list-style: none;
|
|
604
|
+
margin: 0;
|
|
605
|
+
padding: 0;
|
|
606
|
+
display: grid;
|
|
607
|
+
grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
|
|
608
|
+
gap: 0.75rem;
|
|
609
|
+
}
|
|
610
|
+
@media (max-width: 720px) {
|
|
611
|
+
.stations {
|
|
612
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
613
|
+
row-gap: 1.25rem;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
.stations li {
|
|
617
|
+
display: flex;
|
|
618
|
+
flex-direction: column;
|
|
619
|
+
align-items: center;
|
|
620
|
+
gap: 0.5rem;
|
|
621
|
+
text-align: center;
|
|
622
|
+
}
|
|
623
|
+
.circle {
|
|
624
|
+
position: relative;
|
|
625
|
+
width: 4rem;
|
|
626
|
+
height: 4rem;
|
|
627
|
+
border-radius: 50%;
|
|
628
|
+
border: 2px solid rgba(246, 242, 234, 0.25);
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
justify-content: center;
|
|
632
|
+
font-weight: 700;
|
|
633
|
+
font-size: 1.2rem;
|
|
634
|
+
color: rgba(246, 242, 234, 0.65);
|
|
635
|
+
box-sizing: border-box;
|
|
636
|
+
}
|
|
637
|
+
.active .circle {
|
|
638
|
+
background: #f6f2ea;
|
|
639
|
+
color: #0f2a2e;
|
|
640
|
+
border-color: #f6f2ea;
|
|
641
|
+
}
|
|
642
|
+
.active .circle.stop {
|
|
643
|
+
background: transparent;
|
|
644
|
+
color: #fecaca;
|
|
645
|
+
border-color: #f87171;
|
|
646
|
+
}
|
|
647
|
+
.done .circle {
|
|
648
|
+
background: #0f766e;
|
|
649
|
+
border-color: #0f766e;
|
|
650
|
+
color: #f6f2ea;
|
|
651
|
+
animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
|
|
652
|
+
}
|
|
653
|
+
.ring {
|
|
654
|
+
position: absolute;
|
|
655
|
+
inset: -7px;
|
|
656
|
+
border-radius: 50%;
|
|
657
|
+
border: 2px dashed #5eead4;
|
|
658
|
+
}
|
|
659
|
+
.label {
|
|
660
|
+
font-weight: 600;
|
|
661
|
+
}
|
|
662
|
+
.dur {
|
|
663
|
+
font-size: 0.8rem;
|
|
664
|
+
color: rgba(246, 242, 234, 0.7);
|
|
665
|
+
}
|
|
666
|
+
.leds {
|
|
667
|
+
display: flex;
|
|
668
|
+
gap: 0.5rem;
|
|
669
|
+
justify-content: center;
|
|
670
|
+
}
|
|
671
|
+
.now {
|
|
672
|
+
background: rgba(246, 242, 234, 0.06);
|
|
673
|
+
border: 1px solid rgba(246, 242, 234, 0.14);
|
|
674
|
+
border-radius: 20px;
|
|
675
|
+
padding: 1.5rem;
|
|
676
|
+
display: flex;
|
|
677
|
+
flex-direction: column;
|
|
678
|
+
gap: 0.75rem;
|
|
679
|
+
}
|
|
680
|
+
.now p {
|
|
681
|
+
margin: 0;
|
|
682
|
+
line-height: 1.55;
|
|
683
|
+
max-width: 48rem;
|
|
684
|
+
color: rgba(246, 242, 234, 0.9);
|
|
685
|
+
}
|
|
686
|
+
.now .step {
|
|
687
|
+
font-size: 0.8rem;
|
|
688
|
+
letter-spacing: 0.08em;
|
|
689
|
+
text-transform: uppercase;
|
|
690
|
+
color: #f5c76b;
|
|
691
|
+
}
|
|
692
|
+
.total {
|
|
693
|
+
display: flex;
|
|
694
|
+
flex-direction: column;
|
|
695
|
+
gap: 0.6rem;
|
|
696
|
+
}
|
|
697
|
+
.led {
|
|
698
|
+
display: inline-block;
|
|
699
|
+
flex: none;
|
|
700
|
+
width: 0.6rem;
|
|
701
|
+
height: 0.6rem;
|
|
702
|
+
border-radius: 50%;
|
|
703
|
+
background: rgba(246, 242, 234, 0.2);
|
|
704
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
|
|
705
|
+
}
|
|
706
|
+
.led.on {
|
|
707
|
+
background: #34d399;
|
|
708
|
+
box-shadow: 0 0 8px #34d399;
|
|
709
|
+
}
|
|
710
|
+
.led.blink {
|
|
711
|
+
background: #f5c76b;
|
|
712
|
+
box-shadow: 0 0 10px #f5c76b;
|
|
713
|
+
animation: blink 0.9s steps(2, start) infinite;
|
|
714
|
+
}
|
|
715
|
+
.led.off {
|
|
716
|
+
background: #f87171;
|
|
717
|
+
box-shadow: 0 0 8px #f87171;
|
|
718
|
+
}
|
|
719
|
+
.grid {
|
|
720
|
+
display: grid;
|
|
721
|
+
grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
|
|
722
|
+
gap: 1.25rem;
|
|
723
|
+
align-items: start;
|
|
724
|
+
}
|
|
725
|
+
.grid.single {
|
|
726
|
+
grid-template-columns: 1fr;
|
|
727
|
+
}
|
|
728
|
+
@media (max-width: 860px) {
|
|
729
|
+
.grid {
|
|
730
|
+
grid-template-columns: 1fr;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
.col {
|
|
734
|
+
display: flex;
|
|
735
|
+
flex-direction: column;
|
|
736
|
+
gap: 1.25rem;
|
|
737
|
+
min-width: 0;
|
|
738
|
+
}
|
|
739
|
+
.subs {
|
|
740
|
+
list-style: none;
|
|
741
|
+
margin: 0.25rem 0 0;
|
|
742
|
+
padding: 0;
|
|
743
|
+
display: grid;
|
|
744
|
+
gap: 0.45rem;
|
|
745
|
+
}
|
|
746
|
+
.subs li {
|
|
747
|
+
display: grid;
|
|
748
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
749
|
+
column-gap: 0.6rem;
|
|
750
|
+
align-items: baseline;
|
|
751
|
+
color: rgba(246, 242, 234, 0.9);
|
|
752
|
+
}
|
|
753
|
+
.subs li.next {
|
|
754
|
+
color: rgba(246, 242, 234, 0.5);
|
|
755
|
+
}
|
|
756
|
+
.subs small {
|
|
757
|
+
color: #f5c76b;
|
|
758
|
+
}
|
|
759
|
+
.extra::before {
|
|
760
|
+
content: ' · ';
|
|
761
|
+
color: rgba(246, 242, 234, 0.5);
|
|
762
|
+
}
|
|
763
|
+
.flow {
|
|
764
|
+
margin: 0;
|
|
765
|
+
background: rgba(246, 242, 234, 0.04);
|
|
766
|
+
border: 1px solid rgba(246, 242, 234, 0.12);
|
|
767
|
+
border-radius: 20px;
|
|
768
|
+
padding: 1rem 1.25rem;
|
|
769
|
+
display: flex;
|
|
770
|
+
flex-direction: column;
|
|
771
|
+
gap: 0.6rem;
|
|
772
|
+
}
|
|
773
|
+
.flow figcaption {
|
|
774
|
+
font-size: 0.9rem;
|
|
775
|
+
color: rgba(246, 242, 234, 0.85);
|
|
776
|
+
}
|
|
777
|
+
.flow svg {
|
|
778
|
+
width: 100%;
|
|
779
|
+
height: auto;
|
|
780
|
+
}
|
|
781
|
+
.flow line {
|
|
782
|
+
stroke: rgba(246, 242, 234, 0.15);
|
|
783
|
+
stroke-width: 2;
|
|
784
|
+
stroke-dasharray: 4 6;
|
|
785
|
+
}
|
|
786
|
+
.flow line.hot {
|
|
787
|
+
stroke: rgba(94, 234, 212, 0.55);
|
|
788
|
+
stroke-dasharray: none;
|
|
789
|
+
}
|
|
790
|
+
.flow .packet {
|
|
791
|
+
fill: #f5c76b;
|
|
792
|
+
filter: drop-shadow(0 0 4px #f5c76b);
|
|
793
|
+
}
|
|
794
|
+
.carrier circle,
|
|
795
|
+
.mark > circle {
|
|
796
|
+
fill: #0f2a2e;
|
|
797
|
+
stroke: #f5c76b;
|
|
798
|
+
stroke-width: 1.6;
|
|
799
|
+
}
|
|
800
|
+
.carrier.key circle {
|
|
801
|
+
filter: drop-shadow(0 0 6px #f5c76b);
|
|
802
|
+
}
|
|
803
|
+
.carrier.report circle {
|
|
804
|
+
stroke: #5eead4;
|
|
805
|
+
filter: drop-shadow(0 0 6px #5eead4);
|
|
806
|
+
}
|
|
807
|
+
.glyph * {
|
|
808
|
+
fill: none;
|
|
809
|
+
stroke: #f6f2ea;
|
|
810
|
+
stroke-width: 1.5;
|
|
811
|
+
stroke-linecap: round;
|
|
812
|
+
stroke-linejoin: round;
|
|
813
|
+
}
|
|
814
|
+
.carrier.key .glyph *,
|
|
815
|
+
.mark.key .glyph *,
|
|
816
|
+
.mark.sign .glyph * {
|
|
817
|
+
stroke: #f5c76b;
|
|
818
|
+
}
|
|
819
|
+
.carrier.report .glyph *,
|
|
820
|
+
.mark.attest .glyph *,
|
|
821
|
+
.mark.measure .glyph *,
|
|
822
|
+
.mark.store .glyph * {
|
|
823
|
+
stroke: #5eead4;
|
|
824
|
+
}
|
|
825
|
+
.mark > circle {
|
|
826
|
+
stroke: rgba(94, 234, 212, 0.7);
|
|
827
|
+
}
|
|
828
|
+
.mark.key > circle,
|
|
829
|
+
.mark.sign > circle {
|
|
830
|
+
stroke: rgba(245, 199, 107, 0.8);
|
|
831
|
+
}
|
|
832
|
+
.mark {
|
|
833
|
+
transform-box: fill-box;
|
|
834
|
+
transform-origin: center;
|
|
835
|
+
animation: pop 0.5s ease-out both;
|
|
836
|
+
}
|
|
837
|
+
.mark.live > circle {
|
|
838
|
+
animation: blink 1.2s ease-in-out infinite;
|
|
839
|
+
}
|
|
840
|
+
.mark.failed > circle {
|
|
841
|
+
stroke: #f87171;
|
|
842
|
+
}
|
|
843
|
+
.mark.failed .glyph * {
|
|
844
|
+
stroke: #f87171;
|
|
845
|
+
}
|
|
846
|
+
.place .note {
|
|
847
|
+
fill: rgba(94, 234, 212, 0.95);
|
|
848
|
+
font-size: 12px;
|
|
849
|
+
font-weight: 600;
|
|
850
|
+
}
|
|
851
|
+
.place .note.live {
|
|
852
|
+
fill: #f5c76b;
|
|
853
|
+
}
|
|
854
|
+
.place .note.failed {
|
|
855
|
+
fill: #f87171;
|
|
856
|
+
}
|
|
857
|
+
.marks-list {
|
|
858
|
+
display: none;
|
|
859
|
+
list-style: none;
|
|
860
|
+
margin: 0;
|
|
861
|
+
padding: 0;
|
|
862
|
+
flex-direction: column;
|
|
863
|
+
gap: 0.35rem;
|
|
864
|
+
font-size: 0.85rem;
|
|
865
|
+
color: rgba(94, 234, 212, 0.95);
|
|
866
|
+
}
|
|
867
|
+
.marks-list li {
|
|
868
|
+
display: flex;
|
|
869
|
+
align-items: center;
|
|
870
|
+
gap: 0.5rem;
|
|
871
|
+
}
|
|
872
|
+
.marks-list li.live {
|
|
873
|
+
color: #f5c76b;
|
|
874
|
+
}
|
|
875
|
+
.marks-list li.failed {
|
|
876
|
+
color: #f87171;
|
|
877
|
+
}
|
|
878
|
+
.marks-list svg {
|
|
879
|
+
width: 22px;
|
|
880
|
+
height: 22px;
|
|
881
|
+
flex: none;
|
|
882
|
+
overflow: visible;
|
|
883
|
+
}
|
|
884
|
+
@media (max-width: 640px) {
|
|
885
|
+
.marks-list {
|
|
886
|
+
display: flex;
|
|
887
|
+
}
|
|
888
|
+
.place .note {
|
|
889
|
+
display: none;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
.place rect {
|
|
893
|
+
fill: #133a3f;
|
|
894
|
+
stroke: rgba(246, 242, 234, 0.2);
|
|
895
|
+
}
|
|
896
|
+
.place.hot rect {
|
|
897
|
+
stroke: #5eead4;
|
|
898
|
+
}
|
|
899
|
+
.place text {
|
|
900
|
+
fill: #f6f2ea;
|
|
901
|
+
font-size: 13px;
|
|
902
|
+
font-weight: 600;
|
|
903
|
+
}
|
|
904
|
+
.lamp {
|
|
905
|
+
fill: rgba(246, 242, 234, 0.25);
|
|
906
|
+
}
|
|
907
|
+
.lamp.blink {
|
|
908
|
+
fill: #34d399;
|
|
909
|
+
animation: blink 0.9s steps(2, start) infinite;
|
|
910
|
+
}
|
|
911
|
+
.proofs {
|
|
912
|
+
background: rgba(246, 242, 234, 0.04);
|
|
913
|
+
border: 1px solid rgba(246, 242, 234, 0.12);
|
|
914
|
+
border-radius: 20px;
|
|
915
|
+
padding: 1.1rem 1.25rem;
|
|
916
|
+
min-width: 0;
|
|
917
|
+
display: flex;
|
|
918
|
+
flex-direction: column;
|
|
919
|
+
gap: 0.6rem;
|
|
920
|
+
}
|
|
921
|
+
.proofs h4 {
|
|
922
|
+
margin: 0;
|
|
923
|
+
font-size: 0.8rem;
|
|
924
|
+
letter-spacing: 0.08em;
|
|
925
|
+
text-transform: uppercase;
|
|
926
|
+
color: #5eead4;
|
|
927
|
+
}
|
|
928
|
+
.proofs ul + h4,
|
|
929
|
+
.proofs p + h4 {
|
|
930
|
+
margin-top: 0.6rem;
|
|
931
|
+
}
|
|
932
|
+
.proofs ul,
|
|
933
|
+
.proofs-inline {
|
|
934
|
+
list-style: none;
|
|
935
|
+
margin: 0;
|
|
936
|
+
padding: 0;
|
|
937
|
+
display: grid;
|
|
938
|
+
gap: 0.55rem;
|
|
939
|
+
}
|
|
940
|
+
.proofs li,
|
|
941
|
+
.proofs-inline li {
|
|
942
|
+
display: grid;
|
|
943
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
944
|
+
column-gap: 0.55rem;
|
|
945
|
+
align-items: baseline;
|
|
946
|
+
font-size: 0.85rem;
|
|
947
|
+
}
|
|
948
|
+
.proofs li > a,
|
|
949
|
+
.proofs li > code,
|
|
950
|
+
.proofs-inline li > a,
|
|
951
|
+
.proofs-inline li > code {
|
|
952
|
+
grid-column: 2;
|
|
953
|
+
}
|
|
954
|
+
.proofs .what {
|
|
955
|
+
color: rgba(246, 242, 234, 0.8);
|
|
956
|
+
}
|
|
957
|
+
em {
|
|
958
|
+
color: #34d399;
|
|
959
|
+
font-style: normal;
|
|
960
|
+
font-weight: 600;
|
|
961
|
+
}
|
|
962
|
+
a {
|
|
963
|
+
color: #5eead4;
|
|
964
|
+
}
|
|
965
|
+
code {
|
|
966
|
+
font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
967
|
+
font-size: 0.8rem;
|
|
968
|
+
overflow-wrap: anywhere;
|
|
969
|
+
color: #5eead4;
|
|
970
|
+
}
|
|
971
|
+
.row {
|
|
972
|
+
display: flex;
|
|
973
|
+
flex-wrap: wrap;
|
|
974
|
+
align-items: center;
|
|
975
|
+
gap: 0.75rem;
|
|
976
|
+
margin: 0;
|
|
977
|
+
}
|
|
978
|
+
.between {
|
|
979
|
+
justify-content: space-between;
|
|
980
|
+
}
|
|
981
|
+
.center {
|
|
982
|
+
justify-content: center;
|
|
983
|
+
}
|
|
984
|
+
.reason {
|
|
985
|
+
padding: 0.75rem 1rem;
|
|
986
|
+
border-radius: 12px;
|
|
987
|
+
background: rgba(248, 113, 113, 0.14);
|
|
988
|
+
border: 1px solid rgba(248, 113, 113, 0.4);
|
|
989
|
+
color: #fecaca !important;
|
|
990
|
+
overflow-wrap: anywhere;
|
|
991
|
+
}
|
|
992
|
+
.warn {
|
|
993
|
+
margin: 0;
|
|
994
|
+
padding: 0.6rem 0.9rem;
|
|
995
|
+
border-radius: 12px;
|
|
996
|
+
background: rgba(245, 199, 107, 0.15);
|
|
997
|
+
color: #f5c76b;
|
|
998
|
+
font-size: 0.9rem;
|
|
999
|
+
}
|
|
1000
|
+
.small {
|
|
1001
|
+
margin: 0;
|
|
1002
|
+
font-size: 0.85rem;
|
|
1003
|
+
color: rgba(246, 242, 234, 0.72);
|
|
1004
|
+
}
|
|
1005
|
+
.bar {
|
|
1006
|
+
display: block;
|
|
1007
|
+
height: 10px;
|
|
1008
|
+
border-radius: 999px;
|
|
1009
|
+
background: rgba(246, 242, 234, 0.15);
|
|
1010
|
+
overflow: hidden;
|
|
1011
|
+
}
|
|
1012
|
+
.big-bar {
|
|
1013
|
+
height: 14px;
|
|
1014
|
+
max-width: 48rem;
|
|
1015
|
+
}
|
|
1016
|
+
.fill {
|
|
1017
|
+
display: block;
|
|
1018
|
+
height: 100%;
|
|
1019
|
+
border-radius: 999px;
|
|
1020
|
+
background-color: #5eead4;
|
|
1021
|
+
transition: width 1s ease;
|
|
1022
|
+
}
|
|
1023
|
+
.fill.gold {
|
|
1024
|
+
background-color: #f5c76b;
|
|
1025
|
+
}
|
|
1026
|
+
.finale {
|
|
1027
|
+
align-items: center;
|
|
1028
|
+
text-align: center;
|
|
1029
|
+
max-width: 44rem;
|
|
1030
|
+
padding-top: 3rem;
|
|
1031
|
+
}
|
|
1032
|
+
.finale p {
|
|
1033
|
+
margin: 0;
|
|
1034
|
+
line-height: 1.55;
|
|
1035
|
+
color: rgba(246, 242, 234, 0.9);
|
|
1036
|
+
}
|
|
1037
|
+
.proofs-inline {
|
|
1038
|
+
text-align: left;
|
|
1039
|
+
width: 100%;
|
|
1040
|
+
}
|
|
1041
|
+
.big {
|
|
1042
|
+
position: relative;
|
|
1043
|
+
width: 7rem;
|
|
1044
|
+
height: 7rem;
|
|
1045
|
+
border-radius: 50%;
|
|
1046
|
+
background: #0f766e;
|
|
1047
|
+
display: flex;
|
|
1048
|
+
align-items: center;
|
|
1049
|
+
justify-content: center;
|
|
1050
|
+
color: #fff;
|
|
1051
|
+
}
|
|
1052
|
+
.big .ring {
|
|
1053
|
+
inset: -10px;
|
|
1054
|
+
border: 3px dashed #f5c76b;
|
|
1055
|
+
}
|
|
1056
|
+
.cta {
|
|
1057
|
+
display: inline-flex;
|
|
1058
|
+
align-items: center;
|
|
1059
|
+
padding: 0.8rem 1.5rem;
|
|
1060
|
+
min-height: 2.75rem;
|
|
1061
|
+
box-sizing: border-box;
|
|
1062
|
+
border-radius: 999px;
|
|
1063
|
+
background: #f6f2ea;
|
|
1064
|
+
color: #0f2a2e;
|
|
1065
|
+
font-weight: 600;
|
|
1066
|
+
border: none;
|
|
1067
|
+
cursor: pointer;
|
|
1068
|
+
text-decoration: none;
|
|
1069
|
+
}
|
|
1070
|
+
.secondary {
|
|
1071
|
+
padding: 0.8rem 1.5rem;
|
|
1072
|
+
border-radius: 999px;
|
|
1073
|
+
border: 1px solid #f6f2ea;
|
|
1074
|
+
background: transparent;
|
|
1075
|
+
color: #f6f2ea;
|
|
1076
|
+
font-weight: 600;
|
|
1077
|
+
cursor: pointer;
|
|
1078
|
+
}
|
|
1079
|
+
.link {
|
|
1080
|
+
background: none;
|
|
1081
|
+
border: none;
|
|
1082
|
+
color: rgba(246, 242, 234, 0.8);
|
|
1083
|
+
text-decoration: underline;
|
|
1084
|
+
cursor: pointer;
|
|
1085
|
+
}
|
|
1086
|
+
.bj-mini {
|
|
1087
|
+
position: fixed;
|
|
1088
|
+
left: 0;
|
|
1089
|
+
right: 0;
|
|
1090
|
+
bottom: 0;
|
|
1091
|
+
z-index: 40;
|
|
1092
|
+
display: flex;
|
|
1093
|
+
flex-wrap: wrap;
|
|
1094
|
+
align-items: center;
|
|
1095
|
+
gap: 0.75rem 1rem;
|
|
1096
|
+
padding: 0.7rem 1.25rem;
|
|
1097
|
+
background: #0f3d3a;
|
|
1098
|
+
color: #f6f2ea;
|
|
1099
|
+
}
|
|
1100
|
+
.bj-mini.top {
|
|
1101
|
+
position: sticky;
|
|
1102
|
+
top: 0;
|
|
1103
|
+
bottom: auto;
|
|
1104
|
+
}
|
|
1105
|
+
.bj-mini .bar {
|
|
1106
|
+
flex: 1 1 10rem;
|
|
1107
|
+
height: 6px;
|
|
1108
|
+
min-width: 6rem;
|
|
1109
|
+
}
|
|
1110
|
+
.bj-mini button {
|
|
1111
|
+
padding: 0.4rem 0.9rem;
|
|
1112
|
+
border-radius: 999px;
|
|
1113
|
+
border: 1px solid #5eead4;
|
|
1114
|
+
background: transparent;
|
|
1115
|
+
color: inherit;
|
|
1116
|
+
cursor: pointer;
|
|
1117
|
+
}
|
|
1118
|
+
.dot {
|
|
1119
|
+
width: 0.75rem;
|
|
1120
|
+
height: 0.75rem;
|
|
1121
|
+
border-radius: 50%;
|
|
1122
|
+
background: #5eead4;
|
|
1123
|
+
}
|
|
1124
|
+
.spark {
|
|
1125
|
+
position: absolute;
|
|
1126
|
+
width: 8px;
|
|
1127
|
+
height: 8px;
|
|
1128
|
+
border-radius: 2px;
|
|
1129
|
+
bottom: 0;
|
|
1130
|
+
animation: rise 2.4s ease-out infinite;
|
|
1131
|
+
}
|
|
1132
|
+
.s1 {
|
|
1133
|
+
left: -2.5rem;
|
|
1134
|
+
background: #5eead4;
|
|
1135
|
+
}
|
|
1136
|
+
.s2 {
|
|
1137
|
+
left: 1rem;
|
|
1138
|
+
background: #f5c76b;
|
|
1139
|
+
animation-delay: 0.5s;
|
|
1140
|
+
}
|
|
1141
|
+
.s3 {
|
|
1142
|
+
right: 1rem;
|
|
1143
|
+
background: #5eead4;
|
|
1144
|
+
animation-delay: 1s;
|
|
1145
|
+
}
|
|
1146
|
+
.s4 {
|
|
1147
|
+
right: -2.5rem;
|
|
1148
|
+
background: #f5c76b;
|
|
1149
|
+
animation-delay: 1.5s;
|
|
1150
|
+
}
|
|
1151
|
+
.pulse {
|
|
1152
|
+
animation: pulse 1.8s ease-out infinite;
|
|
1153
|
+
}
|
|
1154
|
+
.spin {
|
|
1155
|
+
animation: spin 6s linear infinite;
|
|
1156
|
+
}
|
|
1157
|
+
.pop {
|
|
1158
|
+
animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
|
|
1159
|
+
}
|
|
1160
|
+
.shimmer {
|
|
1161
|
+
background-image: linear-gradient(
|
|
1162
|
+
90deg,
|
|
1163
|
+
rgba(255, 255, 255, 0) 0,
|
|
1164
|
+
rgba(255, 255, 255, 0.45) 50%,
|
|
1165
|
+
rgba(255, 255, 255, 0) 100%
|
|
1166
|
+
);
|
|
1167
|
+
background-size: 200px 100%;
|
|
1168
|
+
background-repeat: no-repeat;
|
|
1169
|
+
animation: shimmer 1.6s linear infinite;
|
|
1170
|
+
}
|
|
1171
|
+
@keyframes blink {
|
|
1172
|
+
to {
|
|
1173
|
+
opacity: 0.25;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
@keyframes pulse {
|
|
1177
|
+
0% {
|
|
1178
|
+
box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5);
|
|
1179
|
+
}
|
|
1180
|
+
70% {
|
|
1181
|
+
box-shadow: 0 0 0 18px rgba(94, 234, 212, 0);
|
|
1182
|
+
}
|
|
1183
|
+
100% {
|
|
1184
|
+
box-shadow: 0 0 0 0 rgba(94, 234, 212, 0);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
@keyframes spin {
|
|
1188
|
+
to {
|
|
1189
|
+
transform: rotate(360deg);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
@keyframes pop {
|
|
1193
|
+
0% {
|
|
1194
|
+
transform: scale(0.6);
|
|
1195
|
+
opacity: 0;
|
|
1196
|
+
}
|
|
1197
|
+
60% {
|
|
1198
|
+
transform: scale(1.08);
|
|
1199
|
+
opacity: 1;
|
|
1200
|
+
}
|
|
1201
|
+
100% {
|
|
1202
|
+
transform: scale(1);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
@keyframes shimmer {
|
|
1206
|
+
0% {
|
|
1207
|
+
background-position: -200px 0;
|
|
1208
|
+
}
|
|
1209
|
+
100% {
|
|
1210
|
+
background-position: 200px 0;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
@keyframes rise {
|
|
1214
|
+
0% {
|
|
1215
|
+
transform: translateY(0);
|
|
1216
|
+
opacity: 1;
|
|
1217
|
+
}
|
|
1218
|
+
100% {
|
|
1219
|
+
transform: translateY(-140px);
|
|
1220
|
+
opacity: 0;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1224
|
+
.pulse,
|
|
1225
|
+
.spin,
|
|
1226
|
+
.pop,
|
|
1227
|
+
.shimmer,
|
|
1228
|
+
.done .circle,
|
|
1229
|
+
.led.blink,
|
|
1230
|
+
.lamp.blink,
|
|
1231
|
+
.mark,
|
|
1232
|
+
.mark.live > circle {
|
|
1233
|
+
animation: none;
|
|
1234
|
+
}
|
|
1235
|
+
.packet,
|
|
1236
|
+
.carrier,
|
|
1237
|
+
.spark {
|
|
1238
|
+
display: none;
|
|
1239
|
+
}
|
|
1240
|
+
.fill {
|
|
1241
|
+
transition: none;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
@media print {
|
|
1245
|
+
.bj-overlay {
|
|
1246
|
+
position: static;
|
|
1247
|
+
background: none;
|
|
1248
|
+
color: inherit;
|
|
1249
|
+
padding: 0;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
</style>
|