@parity/ppn 0.6.0 → 0.8.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.
Files changed (53) hide show
  1. package/config/ports.env +9 -0
  2. package/config/versions.env +3 -0
  3. package/dist/cli.js +34 -2
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/bite.d.ts +4 -0
  6. package/dist/commands/bite.js +6 -0
  7. package/dist/commands/bite.js.map +1 -1
  8. package/dist/commands/dashboard.js +45 -2
  9. package/dist/commands/dashboard.js.map +1 -1
  10. package/dist/commands/fetch.js +44 -1
  11. package/dist/commands/fetch.js.map +1 -1
  12. package/dist/commands/fork.js +16 -12
  13. package/dist/commands/fork.js.map +1 -1
  14. package/dist/commands/nginx-conf.js +13 -7
  15. package/dist/commands/nginx-conf.js.map +1 -1
  16. package/dist/commands/service.js +2 -0
  17. package/dist/commands/service.js.map +1 -1
  18. package/dist/commands/start.d.ts +14 -0
  19. package/dist/commands/start.js +27 -1
  20. package/dist/commands/start.js.map +1 -1
  21. package/dist/commands/turn.d.ts +4 -0
  22. package/dist/commands/turn.js +91 -0
  23. package/dist/commands/turn.js.map +1 -0
  24. package/dist/fork/overrides.d.ts +11 -5
  25. package/dist/fork/overrides.js +46 -36
  26. package/dist/fork/overrides.js.map +1 -1
  27. package/dist/fork/shared-relay.d.ts +7 -5
  28. package/dist/fork/shared-relay.js +17 -12
  29. package/dist/fork/shared-relay.js.map +1 -1
  30. package/dist/fork/topology.d.ts +16 -0
  31. package/dist/fork/topology.js +60 -0
  32. package/dist/fork/topology.js.map +1 -0
  33. package/dist/fork/validators.d.ts +25 -14
  34. package/dist/fork/validators.js +82 -43
  35. package/dist/fork/validators.js.map +1 -1
  36. package/dist/lib/eturnal.d.ts +11 -0
  37. package/dist/lib/eturnal.js +35 -0
  38. package/dist/lib/eturnal.js.map +1 -0
  39. package/dist/lib/spawn-stamp.js +2 -12
  40. package/dist/lib/spawn-stamp.js.map +1 -1
  41. package/dist/lib/version.d.ts +52 -0
  42. package/dist/lib/version.js +119 -0
  43. package/dist/lib/version.js.map +1 -0
  44. package/networks/README.md +1 -1
  45. package/package.json +2 -2
  46. package/scripts/dub/service.sh +8 -3
  47. package/scripts/turn.sh +17 -0
  48. package/web/assets/index-D3cDtNic.js +8 -0
  49. package/web/assets/index-DlPqTbMO.css +1 -0
  50. package/web/index.html +2 -2
  51. package/zombienet-configs/local-dev.toml +4 -0
  52. package/web/assets/index-BW4b1s2y.js +0 -7
  53. package/web/assets/index-X3pZpnYk.css +0 -1
@@ -0,0 +1,119 @@
1
+ // What this `ppn` is, and where it came from.
2
+ //
3
+ // Four shapes install it, and which one you are on is the half of a bug report the version
4
+ // number alone does not carry. A dist tarball has `.ppn-dist.json`: the release it was cut
5
+ // for, the commit behind it, when it was built. An npm install has the version CI stamped
6
+ // into package.json at publish. A checkout has neither — the version there is the placeholder
7
+ // the release rewrites, so the commit is the only honest answer. The Docker image has the
8
+ // version the release stamps into package.json, but no .git or dist manifest, so its Dockerfile
9
+ // sets `PPN_INSTALL`.
10
+ import fs from 'node:fs';
11
+ import path from 'node:path';
12
+ import { execFileSync } from 'node:child_process';
13
+ import { packageRoot, workspaceRoot } from '@parity/ppn-network-config';
14
+ /**
15
+ * The manifest `ppn dist` writes into a release tarball, or null when this is not one.
16
+ *
17
+ * Also the spawn stamp's source for the version a network was brought up on, so the two
18
+ * cannot disagree about what a deployed tree is.
19
+ */
20
+ export function distManifest(root) {
21
+ const file = path.join(root, '.ppn-dist.json');
22
+ if (!fs.existsSync(file))
23
+ return null;
24
+ try {
25
+ const m = JSON.parse(fs.readFileSync(file, 'utf-8'));
26
+ return typeof m?.version === 'string' ? m : null;
27
+ }
28
+ catch {
29
+ // A half-written manifest is not worth failing over: the caller falls back to package.json.
30
+ return null;
31
+ }
32
+ }
33
+ /**
34
+ * The version `@parity/ppn` declares.
35
+ *
36
+ * Two layouts, because the package root is not always the package: installed, it *is*
37
+ * @parity/ppn; in a checkout or an unpacked dist it is the private workspace root, with the
38
+ * CLI one level in. Both are checked by name rather than by position, so neither a renamed
39
+ * directory nor the private root's own version can be mistaken for a release.
40
+ */
41
+ export function packageVersion(root) {
42
+ const candidates = [
43
+ path.join(root, 'package.json'),
44
+ path.join(root, 'packages', 'cli', 'package.json'),
45
+ ];
46
+ for (const file of candidates) {
47
+ try {
48
+ const pkg = JSON.parse(fs.readFileSync(file, 'utf-8'));
49
+ if (pkg.name === '@parity/ppn' && typeof pkg.version === 'string')
50
+ return pkg.version;
51
+ }
52
+ catch {
53
+ // Absent or unreadable: try the other layout.
54
+ }
55
+ }
56
+ return 'unknown';
57
+ }
58
+ /**
59
+ * The bare string behind `ppn --version`.
60
+ *
61
+ * Registered on the program while it is being built, so it must not throw the way
62
+ * `packageRoot()` does: a layout this cannot resolve is one where `ppn --help` still has to
63
+ * work, which is the same reason the help's network list is deferred.
64
+ */
65
+ export function shortVersion() {
66
+ try {
67
+ return packageVersion(packageRoot());
68
+ }
69
+ catch {
70
+ return 'unknown';
71
+ }
72
+ }
73
+ function head(cwd) {
74
+ try {
75
+ const out = execFileSync('git', ['rev-parse', '--short', 'HEAD'], {
76
+ cwd,
77
+ encoding: 'utf-8',
78
+ stdio: ['pipe', 'pipe', 'ignore'],
79
+ }).trim();
80
+ return out || undefined;
81
+ }
82
+ catch {
83
+ return undefined;
84
+ }
85
+ }
86
+ export function versionInfo() {
87
+ const root = packageRoot();
88
+ // A dist first: it is the only shape that states its own provenance, and an unpacked
89
+ // release inside a checkout is still a release.
90
+ const dist = distManifest(root);
91
+ const provenance = dist ? { install: 'dist', commit: dist.commit, repo: dist.repo, builtAt: dist.builtAt }
92
+ : process.env.PPN_INSTALL === 'docker' ? { install: 'docker' }
93
+ : fs.existsSync(path.join(root, '.git')) ? { install: 'checkout', commit: head(root) }
94
+ : { install: 'npm' };
95
+ return {
96
+ version: packageVersion(root),
97
+ ...provenance,
98
+ node: process.version,
99
+ platform: `${process.platform} ${process.arch}`,
100
+ packageRoot: root,
101
+ workspace: workspaceRoot(),
102
+ };
103
+ }
104
+ /** One line of identity, then what it is running on and against. */
105
+ export function formatVersion(info) {
106
+ const qualifiers = [
107
+ info.install,
108
+ info.commit ? `commit ${info.commit}` : null,
109
+ // The day is the useful part; the rest of an ISO timestamp is noise on one line.
110
+ info.builtAt ? `built ${info.builtAt.slice(0, 10)}` : null,
111
+ ].filter(Boolean);
112
+ return [
113
+ `ppn ${info.version} (${qualifiers.join(', ')})`,
114
+ `node ${info.node} on ${info.platform}`,
115
+ `package ${info.packageRoot}`,
116
+ `workspace ${info.workspace}`,
117
+ ].join('\n');
118
+ }
119
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/lib/version.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,2FAA2F;AAC3F,2FAA2F;AAC3F,0FAA0F;AAC1F,8FAA8F;AAC9F,0FAA0F;AAC1F,gGAAgG;AAChG,sBAAsB;AAEtB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AA8BxE;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACrD,OAAO,OAAO,CAAC,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAE,CAAkB,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,4FAA4F;QAC5F,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,CAAC;KACnD,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;YACvD,IAAI,GAAG,CAAC,IAAI,KAAK,aAAa,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;gBAAE,OAAO,GAAG,CAAC,OAAO,CAAC;QACxF,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;QAChD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC;QACH,OAAO,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,IAAI,CAAC,GAAW;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;YAChE,GAAG;YACH,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;SAClC,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,GAAG,IAAI,SAAS,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;IAC3B,qFAAqF;IACrF,gDAAgD;IAChD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,UAAU,GACd,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;QACvF,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE;YAC9D,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;gBACtF,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAEvB,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;QAC7B,GAAG,UAAU;QACb,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE;QAC/C,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,aAAa,EAAE;KAC3B,CAAC;AACJ,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,aAAa,CAAC,IAAiB;IAC7C,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI;QAC5C,iFAAiF;QACjF,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;KAC3D,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClB,OAAO;QACL,OAAO,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QAChD,QAAQ,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,QAAQ,EAAE;QACvC,aAAa,IAAI,CAAC,WAAW,EAAE;QAC/B,aAAa,IAAI,CAAC,SAAS,EAAE;KAC9B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -86,7 +86,7 @@ dev validators, and all three are silent:
86
86
  | what | inherited state | why it breaks | what the bite writes |
87
87
  | --- | --- | --- | --- |
88
88
  | cores | ~18 registered parachains, so ~18 cores | the runtime splits 6 validators into 18 groups; 12 come out empty and ours sit on cores no group is assigned to, so nothing backs their blocks | ours on cores 0-N from `ParaScheduler::CoreDescriptors`, groups to match, `num_cores` cut to N (one byte of `Configuration::ActiveConfig`, so `EnabledHostFunction(EccRfc163)` survives) |
89
- | HRMP / DMP | channel heads from a relay snapshot newer than the parachain ones | messages delivered in that window are pruned from the relay but counted in its `mqc_head`, so cumulus panics `HRMP head mismatch` and builds no block at all | every channel touching one of our paras (read off the relay's own indexes) keeps its `Hrmp::HrmpChannels` entry with `mqc_head` cleared and counters zeroed, its `HrmpChannelContents` emptied and the recipient's `HrmpChannelDigests` emptied; `Dmp::DownwardMessageQueueHeads` zeroed per para; the parachain's own `ParachainSystem::LastDmqMqcHead` zeroed and `LastHrmpMqcHeads` emptied to match — both halves or neither. Channels stay open, which matters on a relay without sudo where nothing could reopen them |
89
+ | HRMP / DMP | channel heads from a relay snapshot newer than the parachain ones | messages delivered in that window are pruned from the relay but counted in its `mqc_head`, so cumulus panics `HRMP head mismatch` and builds no block at all | every channel touching one of our paras (read off the relay's own indexes) keeps its `Hrmp::HrmpChannels` entry with `mqc_head` cleared and counters zeroed, its `HrmpChannelContents` emptied and the recipient's `HrmpChannelDigests` emptied; `Dmp::DownwardMessageQueueHeads` zeroed and `Dmp::DownwardMessageQueues` emptied per para; the parachain's own `ParachainSystem::LastDmqMqcHead` zeroed and `LastHrmpMqcHeads` emptied to match — both halves or neither. Channels stay open, which matters on a relay without sudo where nothing could reopen them |
90
90
  | stored-data proofs | Bulletin's `RetentionPeriod` of 201,600 against a chain at ~1.5M | `pallet-transaction-storage` asserts a periodic proof of historical data a bite does not carry, so no block can be built | `RetentionPeriod` pushed past any height we fork, applied only to a runtime that has the pallet |
91
91
 
92
92
  Two things that are *not* part of this, both established by trying them: `Paras::Parachains` is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parity/ppn",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "Spin up a local Polkadot ecosystem: fetch, generate, fork and run a network",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "commander": "^15.0.0",
21
21
  "polkadot-api": "^1.23.3",
22
22
  "toml": "^4.2.0",
23
- "@parity/ppn-network-config": "0.6.0"
23
+ "@parity/ppn-network-config": "0.8.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^24.0.0",
@@ -112,9 +112,14 @@ export CHAIN_WRITER_SIGNER_SURI="${PPN_DUB_ATTESTER_URI:-${PPN_IDENTITY_ATTESTER
112
112
  # signing into a proxy call that People Chain has no registration for.
113
113
  export INVITER_SIGNER_SURI="${PPN_INVITER_SURI:-//Bob}"
114
114
 
115
- # turn-api signs short-lived TURN credentials. Base64, not hex — it rejects hex with "invalid
116
- # base64 encoding". Local-only: nothing outside this machine can use a credential minted here.
117
- export TURN_SECRET="${TURN_SECRET:-AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=}"
115
+ # turn-api signs credentials for the eturnal relay and returns ICE_SERVERS with them. Resolved
116
+ # by the same code that configures eturnal, so the secret and hosts match (docs/TURN.md).
117
+ if [[ "$ROLE" == "all-in-one" ]]; then
118
+ ENTRY="$PROJECT_DIR/bin/ppn.mjs"
119
+ [[ -f "$ENTRY" ]] || ENTRY="$PROJECT_DIR/dist/bin.js"
120
+ TURN_ENV=$(node "$ENTRY" service dub-turn-env) || { echo "[$ROLE] could not resolve TURN_SECRET/ICE_SERVERS" >&2; exit 1; }
121
+ eval "$TURN_ENV"
122
+ fi
118
123
 
119
124
  # Where all-in-one serves /docs from. A ServeDir, so it needs a directory rather than the two
120
125
  # loose files the old gateway mapped by hand; `ppn fetch` fills it from the backend's tree at
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+ # zombienet's custom_processes exec a command path, so this launcher has to exist.
3
+ # The logic lives in `ppn service turn` — see docs/TURN.md.
4
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ ENTRY="$ROOT/bin/ppn.mjs"
6
+ [[ -f "$ENTRY" ]] || ENTRY="$ROOT/dist/bin.js"
7
+
8
+ # A leftover eturnal from a previous run holds the ports. Its listeners only: a bare `lsof -i
9
+ # :3478` also matches browsers connected to some other TURN server.
10
+ source "$ROOT/scripts/lib/workspace.sh"
11
+ source "$ROOT/config/ports.env"
12
+ [[ -f "$PPN_WS/config/ports.local.env" ]] && source "$PPN_WS/config/ports.local.env"
13
+ for port in "$TURN_PORT" "$TURN_PROXY_PORT"; do
14
+ lsof -ti "tcp:$port" -sTCP:LISTEN -a -c beam 2>/dev/null | xargs kill 2>/dev/null || true
15
+ done
16
+
17
+ exec node "$ENTRY" service turn
@@ -0,0 +1,8 @@
1
+ var Ri=Object.defineProperty;var kn=e=>{throw TypeError(e)};var Li=(e,t,r)=>t in e?Ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var me=(e,t,r)=>Li(e,typeof t!="symbol"?t+"":t,r),Vr=(e,t,r)=>t.has(e)||kn("Cannot "+r);var l=(e,t,r)=>(Vr(e,t,"read from private field"),r?r.call(e):t.get(e)),R=(e,t,r)=>t.has(e)?kn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),N=(e,t,r,n)=>(Vr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),H=(e,t,r)=>(Vr(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const In=!1;var Fn=Array.isArray,Pi=Array.prototype.indexOf,Or=Array.prototype.includes,Fr=Array.from,Di=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,Ii=Object.getOwnPropertyDescriptors,Fi=Object.prototype,ji=Array.prototype,jn=Object.getPrototypeOf,En=Object.isExtensible;const $i=()=>{};function Hi(e){for(var t=0;t<e.length;t++)e[t]()}function $n(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}function vr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const ae=2,$t=4,jr=8,Hn=1<<24,Fe=16,Me=32,et=64,Qr=128,Ce=512,ie=1024,te=2048,$e=4096,de=8192,Ne=16384,qt=32768,Xr=1<<25,yt=65536,Cr=1<<17,Ui=1<<18,zt=1<<19,Vi=1<<20,Be=1<<25,bt=65536,Nr=1<<21,Mt=1<<22,ft=1<<23,yr=Symbol("$state"),Bi=Symbol(""),br=Symbol("attributes"),en=Symbol("class"),qi=Symbol("style"),Jt=Symbol("text"),kr=Symbol("form reset"),hr=new class extends Error{constructor(){super(...arguments);me(this,"name","StaleReactionError");me(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Un(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function zi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Yi(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Wi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Gi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ji(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Zi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function es(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ts=1,rs=2,Vn=4,ns=8,is=16,ss=1,as=2,ne=Symbol("uninitialized"),os="http://www.w3.org/1999/xhtml";function ls(){console.warn("https://svelte.dev/e/derived_inert")}function fs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Bn(e){return e===this.v}function us(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function qn(e){return!us(e,this.v)}let cs=!1,le=null;function Ht(e){le=e}function rt(e,t=!1,r){le={p:le,i:!1,c:null,e:null,s:e,x:null,r:j,l:null}}function nt(e){var t=le,r=t.e;if(r!==null){t.e=null;for(var n of r)ci(n)}return t.i=!0,le=t.p,{}}function zn(){return!0}let ct=[];function Yn(){var e=ct;ct=[],Hi(e)}function Ze(e){if(ct.length===0&&!nr){var t=ct;queueMicrotask(()=>{t===ct&&Yn()})}ct.push(e)}function ds(){for(;ct.length>0;)Yn()}function Wn(e){var t=j;if(t===null)return P.f|=ft,e;if((t.f&qt)===0&&(t.f&$t)===0)throw e;lt(e,t)}function lt(e,t){if(!(t!==null&&(t.f&Ne)!==0)){for(;t!==null;){if((t.f&Qr)!==0){if((t.f&qt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}const vs=-7169;function Q(e,t){e.f=e.f&vs|t}function vn(e){(e.f&Ce)!==0||e.deps===null?Q(e,ie):Q(e,$e)}function Gn(e){if(e!==null)for(const t of e)(t.f&ae)===0||(t.f&bt)===0||(t.f^=bt,Gn(t.deps))}function Kn(e,t,r){(e.f&te)!==0?t.add(e):(e.f&$e)!==0&&r.add(e),Gn(e.deps),Q(e,ie)}let Sn=!1;function hs(){Sn||(Sn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r[kr])==null||t.call(r)})},{capture:!0}))}function Yt(e){var t=P,r=j;Re(null),Ye(null);try{return e()}finally{Re(t),Ye(r)}}function ps(e,t,r,n=r){e.addEventListener(t,()=>Yt(r));const i=e[kr];i?e[kr]=()=>{i(),n(!0)}:e[kr]=()=>n(!0),hs()}function _s(e){let t=0,r=Et(0),n;return()=>{mn()&&(u(r),xn(()=>(t===0&&(n=gr(()=>e(()=>ir(r)))),t+=1,()=>{Ze(()=>{t-=1,t===0&&(n==null||n(),n=void 0,ir(r))})})))}}var gs=yt|zt;function ms(e,t,r,n){new ws(e,t,r,n)}var Se,dn,Te,ht,he,Ae,ce,xe,We,pt,at,Rt,lr,fr,Ge,Pr,Y,xs,ys,tn,bs,rn,Er,Sr,nn,sn;class ws{constructor(t,r,n,i){R(this,Y);me(this,"parent");me(this,"is_pending",!1);me(this,"transform_error");R(this,Se);R(this,dn,null);R(this,Te);R(this,ht);R(this,he);R(this,Ae,null);R(this,ce,null);R(this,xe,null);R(this,We,null);R(this,pt,0);R(this,at,0);R(this,Rt,!1);R(this,lr,new Set);R(this,fr,new Set);R(this,Ge,null);R(this,Pr,_s(()=>(N(this,Ge,Et(l(this,pt))),()=>{N(this,Ge,null)})));var s;N(this,Se,t),N(this,Te,r),N(this,ht,a=>{var f=j;f.b=this,f.f|=Qr,n(a)}),this.parent=j.b,this.transform_error=i??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),N(this,he,$r(()=>{H(this,Y,rn).call(this)},gs))}defer_effect(t){Kn(t,l(this,lr),l(this,fr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!l(this,Te).pending}update_pending_count(t,r){H(this,Y,nn).call(this,t,r),N(this,pt,l(this,pt)+t),!(!l(this,Ge)||l(this,Rt))&&(N(this,Rt,!0),Ze(()=>{N(this,Rt,!1),l(this,Ge)&&Ut(l(this,Ge),l(this,pt))}))}get_effect_pending(){return l(this,Pr).call(this),u(l(this,Ge))}error(t){if(!l(this,Te).onerror&&!l(this,Te).failed)throw t;T!=null&&T.is_fork?(l(this,Ae)&&T.skip_effect(l(this,Ae)),l(this,ce)&&T.skip_effect(l(this,ce)),l(this,xe)&&T.skip_effect(l(this,xe)),T.oncommit(()=>{H(this,Y,sn).call(this,t)})):H(this,Y,sn).call(this,t)}}Se=new WeakMap,dn=new WeakMap,Te=new WeakMap,ht=new WeakMap,he=new WeakMap,Ae=new WeakMap,ce=new WeakMap,xe=new WeakMap,We=new WeakMap,pt=new WeakMap,at=new WeakMap,Rt=new WeakMap,lr=new WeakMap,fr=new WeakMap,Ge=new WeakMap,Pr=new WeakMap,Y=new WeakSet,xs=function(){try{N(this,Ae,Oe(()=>l(this,ht).call(this,l(this,Se))))}catch(t){this.error(t)}},ys=function(t){const r=l(this,Te).failed,{reset:n,invoke_onerror:i}=H(this,Y,tn).call(this,t);Ze(i),r&&N(this,xe,Oe(()=>{r(l(this,Se),()=>t,()=>n)}))},tn=function(t){var r=!1,n=!1;const i=()=>{if(r){fs();return}r=!0,n&&es(),l(this,xe)!==null&&wt(l(this,xe),()=>{N(this,xe,null)}),H(this,Y,Sr).call(this,()=>{H(this,Y,rn).call(this)})};return{reset:i,invoke_onerror:()=>{var a,f;try{n=!0,(f=(a=l(this,Te)).onerror)==null||f.call(a,t,i),n=!1}catch(o){lt(o,l(this,he)&&l(this,he).parent)}}}},bs=function(){const t=l(this,Te).pending;t&&(this.is_pending=!0,N(this,ce,Oe(()=>t(l(this,Se)))),Ze(()=>{var r=N(this,We,document.createDocumentFragment()),n=Xe();r.append(n),N(this,Ae,H(this,Y,Sr).call(this,()=>Oe(()=>l(this,ht).call(this,n)))),l(this,at)===0&&(l(this,Se).before(r),N(this,We,null),wt(l(this,ce),()=>{N(this,ce,null)}),H(this,Y,Er).call(this,T))}))},rn=function(){try{if(this.is_pending=this.has_pending_snippet(),N(this,at,0),N(this,pt,0),N(this,Ae,Oe(()=>{l(this,ht).call(this,l(this,Se))})),l(this,at)>0){var t=N(this,We,document.createDocumentFragment());bn(l(this,Ae),t);const r=l(this,Te).pending;N(this,ce,Oe(()=>r(l(this,Se))))}else H(this,Y,Er).call(this,T)}catch(r){this.error(r)}},Er=function(t){this.is_pending=!1,t.transfer_effects(l(this,lr),l(this,fr))},Sr=function(t){var r=j,n=P,i=le;Ye(l(this,he)),Re(l(this,he)),Ht(l(this,he).ctx);try{return kt.ensure(),t()}catch(s){return Wn(s),null}finally{Ye(r),Re(n),Ht(i)}},nn=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&H(n=this.parent,Y,nn).call(n,t,r);return}N(this,at,l(this,at)+t),l(this,at)===0&&(H(this,Y,Er).call(this,r),l(this,ce)&&wt(l(this,ce),()=>{N(this,ce,null)}),l(this,We)&&(l(this,Se).before(l(this,We)),N(this,We,null)))},sn=function(t){l(this,Ae)&&(ge(l(this,Ae)),N(this,Ae,null)),l(this,ce)&&(ge(l(this,ce)),N(this,ce,null)),l(this,xe)&&(ge(l(this,xe)),N(this,xe,null));let r=l(this,Te).failed;const n=i=>{const{reset:s,invoke_onerror:a}=H(this,Y,tn).call(this,i);a(),r&&N(this,xe,H(this,Y,Sr).call(this,()=>{try{return Oe(()=>{var f=j;f.b=this,f.f|=Qr,r(l(this,Se),()=>i,()=>s)})}catch(f){return lt(f,l(this,he).parent),null}}))};Ze(()=>{var i;try{i=this.transform_error(t)}catch(s){lt(s,l(this,he)&&l(this,he).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(n,s=>lt(s,l(this,he)&&l(this,he).parent)):n(i)})};function ks(e,t,r,n){const i=hn;var s=e.filter(_=>!_.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var f=j,o=Es(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(_=>_.promise)):null;function v(_){if((f.f&Ne)===0){o();try{n([...a,..._])}catch(p){lt(p,f)}Mr()}}var m=Jn();if(r.length===0){c.then(()=>v([])).finally(m);return}function d(){Promise.all(r.map(_=>Ss(_))).then(v).catch(_=>lt(_,f)).finally(m)}c?c.then(()=>{o(),d(),Mr()}):d()}function Es(){var e=j,t=P,r=le,n=T;return function(s=!0){Ye(e),Re(t),Ht(r),s&&(e.f&Ne)===0&&(n==null||n.activate(),n==null||n.apply())}}function Mr(e=!0){Ye(null),Re(null),Ht(null),e&&(T==null||T.deactivate())}function Jn(){var e=j,t=e.b,r=T,n=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,r),r.increment(n,e),()=>{t==null||t.update_pending_count(-1,r),r.decrement(n,e)}}function hn(e){var t=ae|te;return j!==null&&(j.f|=zt),{ctx:le,deps:null,effects:null,equals:Bn,f:t,fn:e,reactions:null,rv:0,v:ne,wv:0,parent:j,ac:null}}const Zt=Symbol("obsolete");function Ss(e,t,r){let n=j;n===null&&zi();var i=void 0,s=Et(ne),a=!P,f=new Set;return Vs(()=>{var _,p;var o=j,c=$n();i=c.promise;try{Promise.resolve(e()).then(c.resolve,g=>{g!==hr&&c.reject(g)}).finally(Mr)}catch(g){c.reject(g),Mr()}var v=T;if(a){if((o.f&qt)!==0)var m=Jn();if((_=n.b)!=null&&_.is_rendered())(p=v.async_deriveds.get(o))==null||p.reject(Zt);else for(const g of f.values())g.reject(Zt);f.add(c),v.async_deriveds.set(o,c)}const d=(g,h=void 0)=>{m==null||m(),f.delete(c),h!==Zt&&(v.activate(),h?(s.f|=ft,Ut(s,h)):((s.f&ft)!==0&&(s.f^=ft),Ut(s,g)),v.deactivate())};c.promise.then(d,g=>d(null,g||"unknown"))}),ui(()=>{for(const o of f)o.reject(Zt)}),new Promise(o=>{function c(v){function m(){v===i?o(s):c(i)}v.then(m,m)}c(i)})}function K(e){const t=hn(e);return _i(t),t}function Ts(e){const t=hn(e);return t.equals=qn,t}function As(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}function pn(e){var t,r=j,n=e.parent;if(!ut&&n!==null&&e.v!==ne&&(n.f&(Ne|de))!==0)return ls(),e.v;Ye(n);try{e.f&=~bt,As(e),t=xi(e)}finally{Ye(r)}return t}function Zn(e){var t=pn(e);if(!e.equals(t)&&(e.wv=mi(),(!(T!=null&&T.is_fork)||e.deps===null)&&(T!==null?(T.capture(e,t,!0),rr==null||rr.capture(e,t,!0)):e.v=t,e.deps===null))){Q(e,ie);return}ut||(oe!==null?(mn()||T!=null&&T.is_fork)&&oe.set(e,t):vn(e))}function Os(e){var t;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),r.ac!==null&&Yt(()=>{r.ac.abort(hr),r.ac=null}),r.fn!==null&&(r.teardown=$i),sr(r,0),yn(r))}function Qn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Bt(t)}let Br=null,Ot=null,T=null,rr=null,oe=null,an=null,nr=!1,qr=!1,Nt=null,Tr=null;var Tn=0;let Cs=1;var Lt,ot,_t,Pt,Dt,It,Ke,Ft,pe,ur,Je,De,He,jt,gt,B,on,Qt,ln,Xn,ei,Ct,Ns,Xt;const Dr=class Dr{constructor(){R(this,B);me(this,"id",Cs++);R(this,Lt,!1);me(this,"linked",!0);R(this,ot,null);R(this,_t,null);me(this,"async_deriveds",new Map);me(this,"current",new Map);me(this,"previous",new Map);R(this,Pt,new Set);R(this,Dt,new Set);R(this,It,0);R(this,Ke,new Map);R(this,Ft,null);R(this,pe,[]);R(this,ur,[]);R(this,Je,new Set);R(this,De,new Set);R(this,He,new Map);R(this,jt,new Set);me(this,"is_fork",!1);R(this,gt,!1);Ot===null?Br=Ot=this:(N(Ot,_t,this),N(this,ot,Ot)),Ot=this}skip_effect(t){l(this,He).has(t)||l(this,He).set(t,{d:[],m:[]}),l(this,jt).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=l(this,He).get(t);if(n){l(this,He).delete(t);for(var i of n.d)Q(i,te),r(i);for(i of n.m)Q(i,$e),r(i)}l(this,jt).add(t)}capture(t,r,n=!1){t.v!==ne&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ft)===0&&(this.current.set(t,[r,n]),oe==null||oe.set(t,r)),this.is_fork||(t.v=r)}activate(){T=this}deactivate(){T=null,oe=null}flush(){try{qr=!0,T=this,H(this,B,Qt).call(this)}finally{Tn=0,an=null,Nt=null,Tr=null,qr=!1,T=null,oe=null,qe.clear()}}discard(){var t;for(const r of l(this,Dt))r(this);l(this,Dt).clear();for(const r of this.async_deriveds.values())r.reject(Zt);H(this,B,Xt).call(this),(t=l(this,Ft))==null||t.resolve()}register_created_effect(t){l(this,ur).push(t)}increment(t,r){if(N(this,It,l(this,It)+1),t){let n=l(this,Ke).get(r)??0;l(this,Ke).set(r,n+1)}}decrement(t,r){if(N(this,It,l(this,It)-1),t){let n=l(this,Ke).get(r)??0;n===1?l(this,Ke).delete(r):l(this,Ke).set(r,n-1)}l(this,gt)||(N(this,gt,!0),Ze(()=>{N(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)l(this,Je).add(n);for(const n of r)l(this,De).add(n);t.clear(),r.clear()}oncommit(t){l(this,Pt).add(t)}ondiscard(t){l(this,Dt).add(t)}settled(){return(l(this,Ft)??N(this,Ft,$n())).promise}static ensure(){if(T===null){const t=T=new Dr;!qr&&!nr&&Ze(()=>{l(t,Lt)||t.flush()})}return T}apply(){{oe=null;return}}schedule(t){var i;if(an=t,(i=t.b)!=null&&i.is_pending&&(t.f&($t|jr|Hn))!==0&&(t.f&qt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Nt!==null&&r===j&&(P===null||(P.f&ae)===0))return;if((n&(et|Me))!==0){if((n&ie)===0)return;r.f^=ie}}l(this,pe).push(r)}};Lt=new WeakMap,ot=new WeakMap,_t=new WeakMap,Pt=new WeakMap,Dt=new WeakMap,It=new WeakMap,Ke=new WeakMap,Ft=new WeakMap,pe=new WeakMap,ur=new WeakMap,Je=new WeakMap,De=new WeakMap,He=new WeakMap,jt=new WeakMap,gt=new WeakMap,B=new WeakSet,on=function(){if(this.is_fork)return!0;for(const n of l(this,Ke).keys()){for(var t=n,r=!1;t.parent!==null;){if(l(this,He).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Qt=function(){var o,c,v,m;N(this,Lt,!0),Tn++>1e3&&(H(this,B,Xt).call(this),Rs());for(const d of l(this,Je))l(this,De).delete(d),Q(d,te),this.schedule(d);for(const d of l(this,De))Q(d,$e),this.schedule(d);const t=l(this,pe);N(this,pe,[]),this.apply();var r=Nt=[],n=[],i=Tr=[];for(const d of t)try{H(this,B,ln).call(this,d,r,n)}catch(_){throw ni(d),H(this,B,on).call(this)||this.discard(),_}if(T=null,i.length>0){var s=Dr.ensure();for(const d of i)s.schedule(d)}if(Nt=null,Tr=null,H(this,B,on).call(this)){H(this,B,Ct).call(this,n),H(this,B,Ct).call(this,r);for(const[d,_]of l(this,He))ri(d,_);i.length>0&&H(o=T,B,Qt).call(o);return}const a=H(this,B,Xn).call(this);if(a){H(this,B,Ct).call(this,n),H(this,B,Ct).call(this,r),H(c=a,B,ei).call(c,this);return}l(this,Je).clear(),l(this,De).clear();for(const d of l(this,Pt))d(this);l(this,Pt).clear(),rr=this,An(n),An(r),rr=null,(v=l(this,Ft))==null||v.resolve();var f=T;if(l(this,It)===0&&(l(this,pe).length===0||f!==null)&&H(this,B,Xt).call(this),l(this,pe).length>0)if(f!==null){const d=f;l(d,pe).push(...l(this,pe).filter(_=>!l(d,pe).includes(_)))}else f=this;f!==null&&(qe.clear(),H(m=f,B,Qt).call(m))},ln=function(t,r,n){t.f^=ie;for(var i=t.first;i!==null;){var s=i.f,a=(s&(Me|et))!==0,f=a&&(s&ie)!==0,o=f||(s&de)!==0||l(this,He).has(i);if(!o&&i.fn!==null){a?i.f^=ie:(s&$t)!==0?r.push(i):_r(i)&&((s&Fe)!==0&&l(this,De).add(i),Bt(i));var c=i.first;if(c!==null){i=c;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},Xn=function(){for(var t=l(this,ot);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=l(t,ot)}return null},ei=function(t){var n;for(const[i,s]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,s);for(const[i,s]of t.async_deriveds){const a=this.async_deriveds.get(i);a&&s.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(l(t,Je),l(t,De));const r=i=>{var s=i.reactions;if(s!==null&&!((i.f&ae)!==0&&(i.f&(te|$e))===0))for(const o of s){var a=o.f;if((a&ae)!==0)r(o);else{var f=o;a&(Mt|Fe)&&!this.async_deriveds.has(f)&&(l(this,De).delete(f),Q(f,te),this.schedule(f))}}};for(const i of this.current.keys())r(i);this.oncommit(()=>t.discard()),H(n=t,B,Xt).call(n),T=this,H(this,B,Qt).call(this)},Ct=function(t){for(var r=0;r<t.length;r+=1)Kn(t[r],l(this,Je),l(this,De))},Ns=function(){var m;for(let d=Br;d!==null;d=l(d,_t)){var t=d.id<this.id,r=[];for(const[_,[p,g]]of this.current){if(d.current.has(_)){var n=d.current.get(_)[0];if(t&&p!==n)d.current.set(_,[p,g]);else continue}r.push(_)}if(t)for(const[_,p]of this.async_deriveds){const g=d.async_deriveds.get(_);g&&p.promise.then(g.resolve).catch(g.reject)}var i=[...d.current.keys()].filter(_=>!d.current.get(_)[1]);if(!(!l(d,Lt)||i.length===0)){var s=i.filter(_=>!this.current.has(_));if(s.length===0)t&&d.discard();else if(r.length>0){if(t)for(const _ of l(this,jt))d.unskip_effect(_,p=>{var g;(p.f&(Fe|Mt))!==0?d.schedule(p):H(g=d,B,Ct).call(g,[p])});d.activate();var a=new Set,f=new Map;for(var o of r)ti(o,s,a,f);f=new Map;var c=[...d.current].filter(([_,p])=>{const g=this.current.get(_);return g?g[0]!==p[0]||g[1]!==p[1]:!0}).map(([_])=>_);if(c.length>0)for(const _ of l(this,ur))(_.f&(Ne|de|Cr))===0&&_n(_,c,f)&&((_.f&(Mt|Fe))!==0?(Q(_,te),d.schedule(_)):l(d,Je).add(_));if(l(d,pe).length>0&&!l(d,gt)){d.apply();for(var v of l(d,pe))H(m=d,B,ln).call(m,v,[],[]);N(d,pe,[])}d.deactivate()}}}},Xt=function(){if(this.linked){var t=l(this,ot),r=l(this,_t);t===null?Br=r:N(t,_t,r),r===null?Ot=t:N(r,ot,t),this.linked=!1}};let kt=Dr;function Ms(e){var t=nr;nr=!0;try{for(var r;;){if(ds(),T===null)return r;T.flush()}}finally{nr=t}}function Rs(){try{Ji()}catch(e){lt(e,an)}}let Pe=null;function An(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Ne|de))===0&&_r(n)&&(Pe=new Set,Bt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&vi(n),(Pe==null?void 0:Pe.size)>0)){qe.clear();for(const i of Pe){if((i.f&(Ne|de))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Pe.has(a)&&(Pe.delete(a),s.push(a)),a=a.parent;for(let f=s.length-1;f>=0;f--){const o=s[f];(o.f&(Ne|de))===0&&Bt(o)}}Pe.clear()}}Pe=null}}function ti(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&ae)!==0?ti(i,t,r,n):(s&(Mt|Fe))!==0&&(s&te)===0&&_n(i,t,n)&&(Q(i,te),gn(i))}}function _n(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Or.call(t,i))return!0;if((i.f&ae)!==0&&_n(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function gn(e){T.schedule(e)}function ri(e,t){if(!((e.f&Me)!==0&&(e.f&ie)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),Q(e,ie);for(var r=e.first;r!==null;)ri(r,t),r=r.next}}function ni(e){Q(e,ie);for(var t=e.first;t!==null;)ni(t),t=t.next}let Rr=new Set;const qe=new Map;let ii=!1;function Et(e,t){var r={f:0,v:e,reactions:null,equals:Bn,rv:0,wv:0};return r}function G(e,t){const r=Et(e);return _i(r),r}function Ls(e,t=!1,r=!0){const n=Et(e);return t||(n.equals=qn),n}function q(e,t,r=!1){P!==null&&(!je||(P.f&Cr)!==0)&&zn()&&(P.f&(ae|Fe|Mt|Cr))!==0&&(ze===null||!ze.has(e))&&Xi();let n=r?Qe(t):t;return Ut(e,n,Tr)}function Ut(e,t,r=null){if(!e.equals(t)){ut?qe.set(e,t):qe.has(e)||qe.set(e,e.v);var n=kt.ensure();if(n.capture(e,t),(e.f&ae)!==0){const i=e;(e.f&te)!==0&&pn(i),oe===null&&vn(i)}e.wv=mi(),si(e,te,r),j!==null&&(j.f&ie)!==0&&(j.f&(Me|et))===0&&(Ee===null?zs([e]):Ee.push(e)),!n.is_fork&&Rr.size>0&&!ii&&Ps()}return t}function Ps(){ii=!1;for(const e of Rr){(e.f&ie)!==0&&Q(e,$e);let t;try{t=_r(e)}catch{t=!0}t&&Bt(e)}Rr.clear()}function ir(e){q(e,e.v+1)}function si(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var a=n[s],f=a.f,o=(f&te)===0;if(o&&Q(a,t),(f&Cr)!==0)Rr.add(a);else if((f&ae)!==0){var c=a;oe==null||oe.delete(c),(f&bt)===0&&(f&Ce&&(j===null||(j.f&Nr)===0)&&(a.f|=bt),si(c,$e,r))}else if(o){var v=a;(f&Fe)!==0&&Pe!==null&&Pe.add(v),r!==null?r.push(v):gn(v)}}}function Qe(e){if(typeof e!="object"||e===null||yr in e)return e;const t=jn(e);if(t!==Fi&&t!==ji)return e;var r=new Map,n=Fn(e),i=G(0),s=xt,a=f=>{if(xt===s)return f();var o=P,c=xt;Re(null),Nn(s);var v=f();return Re(o),Nn(c),v};return n&&r.set("length",G(e.length)),new Proxy(e,{defineProperty(f,o,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Zi();var v=r.get(o);return v===void 0?a(()=>{var m=G(c.value);return r.set(o,m),m}):q(v,c.value,!0),!0},deleteProperty(f,o){var c=r.get(o);if(c===void 0){if(o in f){const v=a(()=>G(ne));r.set(o,v),ir(i)}}else q(c,ne),ir(i);return!0},get(f,o,c){var _;if(o===yr)return e;var v=r.get(o),m=o in f;if(v===void 0&&(!m||(_=tr(f,o))!=null&&_.writable)&&(v=a(()=>{var p=Qe(m?f[o]:ne),g=G(p);return g}),r.set(o,v)),v!==void 0){var d=u(v);return d===ne?void 0:d}return Reflect.get(f,o,c)},getOwnPropertyDescriptor(f,o){var c=Reflect.getOwnPropertyDescriptor(f,o);if(c&&"value"in c){var v=r.get(o);v&&(c.value=u(v))}else if(c===void 0){var m=r.get(o),d=m==null?void 0:m.v;if(m!==void 0&&d!==ne)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,o){var d;if(o===yr)return!0;var c=r.get(o),v=c!==void 0&&c.v!==ne||Reflect.has(f,o);if(c!==void 0||j!==null&&(!v||(d=tr(f,o))!=null&&d.writable)){c===void 0&&(c=a(()=>{var _=v?Qe(f[o]):ne,p=G(_);return p}),r.set(o,c));var m=u(c);if(m===ne)return!1}return v},set(f,o,c,v){var b;var m=r.get(o),d=o in f;if(n&&o==="length")for(var _=c;_<m.v;_+=1){var p=r.get(_+"");p!==void 0?q(p,ne):_ in f&&(p=a(()=>G(ne)),r.set(_+"",p))}if(m===void 0)(!d||(b=tr(f,o))!=null&&b.writable)&&(m=a(()=>G(void 0)),q(m,Qe(c)),r.set(o,m));else{d=m.v!==ne;var g=a(()=>Qe(c));q(m,g)}var h=Reflect.getOwnPropertyDescriptor(f,o);if(h!=null&&h.set&&h.set.call(v,c),!d){if(n&&typeof o=="string"){var w=r.get("length"),O=Number(o);Number.isInteger(O)&&O>=w.v&&q(w,O+1)}ir(i)}return!0},ownKeys(f){u(i);var o=Reflect.ownKeys(f).filter(m=>{var d=r.get(m);return d===void 0||d.v!==ne});for(var[c,v]of r)v.v!==ne&&!(c in f)&&o.push(c);return o},setPrototypeOf(){Qi()}})}var On,ai,oi,li;function Ds(){if(On===void 0){On=window,ai=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;oi=tr(t,"firstChild").get,li=tr(t,"nextSibling").get,En(e)&&(e[en]=void 0,e[br]=null,e[qi]=void 0,e.__e=void 0),En(r)&&(r[Jt]=void 0)}}function Xe(e=""){return document.createTextNode(e)}function Vt(e){return oi.call(e)}function pr(e){return li.call(e)}function y(e,t){return Vt(e)}function se(e,t=!1){{var r=Vt(e);return r instanceof Comment&&r.data===""?pr(r):r}}function L(e,t=1,r=!1){let n=e;for(;t--;)n=pr(n);return n}function Is(e){e.textContent=""}function fi(){return!1}function Fs(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function js(e){j===null&&(P===null&&Ki(),Gi()),ut&&Wi()}function $s(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function it(e,t){var r=j;r!==null&&(r.f&de)!==0&&(e|=de);var n={ctx:le,deps:null,nodes:null,f:e|te|Ce,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};T==null||T.register_created_effect(n);var i=n;if((e&$t)!==0)Nt!==null?Nt.push(n):kt.ensure().schedule(n);else if(t!==null){try{Bt(n)}catch(a){throw ge(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&zt)===0&&(i=i.first,(e&Fe)!==0&&(e&yt)!==0&&i!==null&&(i.f|=yt))}if(i!==null&&(i.parent=r,r!==null&&$s(i,r),P!==null&&(P.f&ae)!==0&&(e&et)===0)){var s=P;(s.effects??(s.effects=[])).push(i)}return n}function mn(){return P!==null&&!je}function ui(e){const t=it(jr,null);return Q(t,ie),t.teardown=e,t}function wn(e){js();var t=j.f,r=!P&&(t&Me)!==0&&le!==null&&!le.i;if(r){var n=le;(n.e??(n.e=[])).push(e)}else return ci(e)}function ci(e){return it($t|Vi,e)}function Hs(e){kt.ensure();const t=it(et|zt,e);return(r={})=>new Promise(n=>{r.outro?wt(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Us(e){return it($t,e)}function Vs(e){return it(Mt|zt,e)}function xn(e,t=0){return it(jr|t,e)}function z(e,t=[],r=[],n=[]){ks(n,t,r,i=>{it(jr,()=>{e(...i.map(u))})})}function $r(e,t=0){var r=it(Fe|t,e);return r}function Oe(e){return it(Me|zt,e)}function di(e){var t=e.teardown;if(t!==null){const r=ut,n=P;Cn(!0),Re(null);try{t.call(null)}finally{Cn(r),Re(n)}}}function yn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Yt(()=>{i.abort(hr)});var n=r.next;(r.f&et)!==0?r.parent=null:ge(r,t),r=n}}function Bs(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Me)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&Ui)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(qs(e.nodes.start,e.nodes.end),r=!0),e.f|=Xr,yn(e,t&&!r),sr(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();di(e),e.f^=Xr,e.f|=Ne;var i=e.parent;i!==null&&i.first!==null&&vi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function qs(e,t){for(;e!==null;){var r=e===t?null:pr(e);e.remove(),e=r}}function vi(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function wt(e,t,r=!0){var n=[];hi(e,n,!0);var i=()=>{r&&ge(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var f of n)f.out(a)}else i()}function hi(e,t,r){if((e.f&de)===0){e.f^=de;var n=e.nodes&&e.nodes.t;if(n!==null)for(const f of n)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var s=i.next;if((i.f&et)===0){var a=(i.f&yt)!==0||(i.f&Me)!==0&&(e.f&Fe)!==0;hi(i,t,a?r:!1)}i=s}}}function Lr(e){pi(e,!0)}function pi(e,t){if((e.f&de)!==0){e.f^=de,(e.f&ie)===0&&(Q(e,te),kt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&yt)!==0||(r.f&Me)!==0;pi(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function bn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:pr(r);t.append(r),r=i}}let Ar=!1,ut=!1;function Cn(e){ut=e}let P=null,je=!1;function Re(e){P=e}let j=null;function Ye(e){j=e}let ze=null;function _i(e){P!==null&&(ze??(ze=new Set)).add(e)}let _e=null,we=0,Ee=null;function zs(e){Ee=e}let gi=1,dt=0,xt=dt;function Nn(e){xt=e}function mi(){return++gi}function _r(e){var t=e.f;if((t&te)!==0)return!0;if(t&ae&&(e.f&=~bt),(t&$e)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(_r(s)&&Zn(s),s.wv>e.wv)return!0}(t&Ce)!==0&&oe===null&&Q(e,ie)}return!1}function wi(e,t,r=!0){var n=e.reactions;if(n!==null&&!(ze!==null&&ze.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&ae)!==0?wi(s,t,!1):t===s&&(r?Q(s,te):(s.f&ie)!==0&&Q(s,$e),gn(s))}}function xi(e){var g;var t=_e,r=we,n=Ee,i=P,s=ze,a=le,f=je,o=xt,c=e.f;_e=null,we=0,Ee=null,P=(c&(Me|et))===0?e:null,ze=null,Ht(e.ctx),je=!1,xt=++dt,e.ac!==null&&(Yt(()=>{e.ac.abort(hr)}),e.ac=null);try{e.f|=Nr;var v=e.fn,m=v();e.f|=qt;var d=e.deps,_=T==null?void 0:T.is_fork;if(_e!==null){var p;if(_||sr(e,we),d!==null&&we>0)for(d.length=we+_e.length,p=0;p<_e.length;p++)d[we+p]=_e[p];else e.deps=d=_e;if(mn()&&(e.f&Ce)!==0)for(p=we;p<d.length;p++)((g=d[p]).reactions??(g.reactions=[])).push(e)}else!_&&d!==null&&we<d.length&&(sr(e,we),d.length=we);if(zn()&&Ee!==null&&!je&&d!==null&&(e.f&(ae|$e|te))===0)for(p=0;p<Ee.length;p++)wi(Ee[p],e);if(i!==null&&i!==e){if(dt++,i.deps!==null)for(let h=0;h<r;h+=1)i.deps[h].rv=dt;if(t!==null)for(const h of t)h.rv=dt;Ee!==null&&(n===null?n=Ee:n.push(...Ee))}return(e.f&ft)!==0&&(e.f^=ft),m}catch(h){return Wn(h)}finally{e.f^=Nr,_e=t,we=r,Ee=n,P=i,ze=s,Ht(a),je=f,xt=o}}function Ys(e,t){let r=t.reactions;if(r!==null){var n=Pi.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&ae)!==0&&(_e===null||!Or.call(_e,t))){var s=t;(s.f&Ce)!==0&&(s.f^=Ce,s.f&=~bt),s.v!==ne&&vn(s),s.ac!==null&&Yt(()=>{s.ac.abort(hr),s.ac=null,Q(s,te)}),Os(s),sr(s,0)}}function sr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ys(e,r[n])}function Bt(e){var t=e.f;if((t&Ne)===0){Q(e,ie);var r=j,n=Ar;j=e,Ar=(t&(Me|et))===0;try{(t&(Fe|Hn))!==0?Bs(e):yn(e),di(e);var i=xi(e);e.teardown=typeof i=="function"?i:null,e.wv=gi;var s;In&&cs&&(e.f&te)!==0&&e.deps}finally{Ar=n,j=r}}}async function Ws(){await Promise.resolve(),Ms()}function u(e){var t=e.f,r=(t&ae)!==0;if(P!==null&&!je){var n=j!==null&&(j.f&Ne)!==0;if(!n&&(ze===null||!ze.has(e))){var i=P.deps;if((P.f&Nr)!==0)e.rv<dt&&(e.rv=dt,_e===null&&i!==null&&i[we]===e?we++:_e===null?_e=[e]:_e.push(e));else{P.deps??(P.deps=[]),Or.call(P.deps,e)||P.deps.push(e);var s=e.reactions;s===null?e.reactions=[P]:Or.call(s,P)||s.push(P)}}}if(ut&&qe.has(e))return qe.get(e);if(r){var a=e;if(ut){var f=a.v;return((a.f&ie)===0&&a.reactions!==null||bi(a))&&(f=pn(a)),qe.set(a,f),f}var o=(a.f&Ce)===0&&!je&&P!==null&&(Ar||(P.f&Ce)!==0),c=(a.f&qt)===0;_r(a)&&(o&&(a.f|=Ce),Zn(a)),o&&!c&&(Qn(a),yi(a))}if(oe!=null&&oe.has(e))return oe.get(e);if((e.f&ft)!==0)throw e.v;return e.v}function yi(e){if(e.f|=Ce,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&ae)!==0&&(t.f&Ce)===0&&(Qn(t),yi(t))}function bi(e){if(e.v===ne)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(qe.has(t)||(t.f&ae)!==0&&bi(t))return!0;return!1}function gr(e){var t=je;try{return je=!0,e()}finally{je=t}}const Gs=["touchstart","touchmove"];function Ks(e){return Gs.includes(e)}const vt=Symbol("events"),ki=new Set,fn=new Set;function Js(e,t,r,n={}){function i(s){if(n.capture||un.call(t,s),!s.cancelBubble)return Yt(()=>r==null?void 0:r.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ze(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function wr(e,t,r,n,i){var s={capture:n,passive:i},a=Js(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ui(()=>{t.removeEventListener(e,a,s)})}function St(e,t,r){(t[vt]??(t[vt]={}))[e]=r}function Wt(e){for(var t=0;t<e.length;t++)ki.add(e[t]);for(var r of fn)r(e)}let zr=null,Yr=!1;function un(e){var g,h;var t=this,r=t.ownerDocument,n=e.type,i=((g=e.composedPath)==null?void 0:g.call(e))||[],s=i[0]||e.target;zr=e,Yr||(Yr=!0,setTimeout(()=>{Yr=!1,zr=null}));var a=0,f=zr===e&&e[vt];if(f){var o=i.indexOf(f);if(o!==-1&&(t===document||t===window)){e[vt]=t;return}var c=i.indexOf(t);if(c===-1)return;o<=c&&(a=o)}if(s=i[a]||e.target,s!==t){Di(e,"currentTarget",{configurable:!0,get(){return s||r}});var v=P,m=j;Re(null),Ye(null);try{for(var d,_=[];s!==null&&s!==t;){try{var p=(h=s[vt])==null?void 0:h[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(w){d?_.push(w):d=w}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let w of _)queueMicrotask(()=>{throw w});throw d}}finally{e[vt]=t,delete e.currentTarget,Re(v),Ye(m)}}}var Pn;const Wr=((Pn=globalThis==null?void 0:globalThis.window)==null?void 0:Pn.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Zs(e){return(Wr==null?void 0:Wr.createHTML(e))??e}function Ei(e){var t=Fs("template");return t.innerHTML=Zs(e.replaceAll("<!>","<!---->")),t.content}function ar(e,t){var r=j;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function D(e,t){var r=(t&ss)!==0,n=(t&as)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ei(s?e:"<!>"+e),r||(i=Vt(i)));var a=n||ai?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=Vt(a),o=a.lastChild;ar(f,o)}else ar(a,a);return a}}function Qs(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,s;return()=>{if(!s){var a=Ei(i),f=Vt(a);s=Vt(f)}var o=s.cloneNode(!0);return ar(o,o),o}}function Si(e,t){return Qs(e,t,"svg")}function Xs(e=""){{var t=Xe(e+"");return ar(t,t),t}}function tt(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Xe();return e.append(t,r),ar(t,r),e}function S(e,t){e!==null&&e.before(t)}function F(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Jt]??(e[Jt]=e.nodeValue))&&(e[Jt]=r,e.nodeValue=`${r}`)}function ea(e,t){return ta(e,t)}const xr=new Map;function ta(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:f}){Ds();var o=void 0,c=Hs(()=>{var v=r??t.appendChild(Xe());ms(v,{pending:()=>{}},_=>{rt({});var p=le;s&&(p.c=s),i&&(n.$$events=i),o=e(_,n)||{},nt()},f);var m=new Set,d=_=>{for(var p=0;p<_.length;p++){var g=_[p];if(!m.has(g)){m.add(g);var h=Ks(g);for(const b of[t,document]){var w=xr.get(b);w===void 0&&(w=new Map,xr.set(b,w));var O=w.get(g);O===void 0?(b.addEventListener(g,un,{passive:h}),w.set(g,1)):w.set(g,O+1)}}}};return d(Fr(ki)),fn.add(d),()=>{var h;for(var _ of m)for(const w of[t,document]){var p=xr.get(w),g=p.get(_);--g==0?(w.removeEventListener(_,un),p.delete(_),p.size===0&&xr.delete(w)):p.set(_,g)}fn.delete(d),v!==r&&((h=v.parentNode)==null||h.removeChild(v))}});return ra.set(o,c),o}let ra=new WeakMap;var Ie,Ue,ye,mt,cr,dr,Ir;class Ti{constructor(t,r=!0){me(this,"anchor");R(this,Ie,new Map);R(this,Ue,new Map);R(this,ye,new Map);R(this,mt,new Set);R(this,cr,!0);R(this,dr,t=>{if(l(this,Ie).has(t)){var r=l(this,Ie).get(t),n=l(this,Ue).get(r);if(n)Lr(n),l(this,mt).delete(r);else{var i=l(this,ye).get(r);i&&(Lr(i.effect),l(this,Ue).set(r,i.effect),l(this,ye).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of l(this,Ie)){if(l(this,Ie).delete(s),s===t)break;const f=l(this,ye).get(a);f&&(ge(f.effect),l(this,ye).delete(a))}for(const[s,a]of l(this,Ue)){if(s===r||l(this,mt).has(s))continue;const f=()=>{if(Array.from(l(this,Ie).values()).includes(s)){var c=document.createDocumentFragment();bn(a,c),c.append(Xe()),l(this,ye).set(s,{effect:a,fragment:c})}else ge(a);l(this,mt).delete(s),l(this,Ue).delete(s)};l(this,cr)||!n?(l(this,mt).add(s),wt(a,f,!1)):f()}}});R(this,Ir,t=>{l(this,Ie).delete(t);const r=Array.from(l(this,Ie).values());for(const[n,i]of l(this,ye))r.includes(n)||(ge(i.effect),l(this,ye).delete(n))});this.anchor=t,N(this,cr,r)}ensure(t,r){var n=T,i=fi();if(r&&!l(this,Ue).has(t)&&!l(this,ye).has(t))if(i){var s=document.createDocumentFragment(),a=Xe();s.append(a),l(this,ye).set(t,{effect:Oe(()=>r(a)),fragment:s})}else l(this,Ue).set(t,Oe(()=>r(this.anchor)));if(l(this,Ie).set(n,t),i){for(const[f,o]of l(this,Ue))f===t?n.unskip_effect(o):n.skip_effect(o);for(const[f,o]of l(this,ye))f===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(l(this,dr)),n.ondiscard(l(this,Ir))}else l(this,dr).call(this,n)}}Ie=new WeakMap,Ue=new WeakMap,ye=new WeakMap,mt=new WeakMap,cr=new WeakMap,dr=new WeakMap,Ir=new WeakMap;function J(e,t,r=!1){var n=new Ti(e),i=r?yt:0;function s(a,f){n.ensure(a,f)}$r(()=>{var a=!1;t((f,o=0)=>{a=!0,s(o,f)}),a||s(-1,null)},i)}function or(e,t){return t}function na(e,t,r){for(var n=[],i=t.length,s,a=t.length,f=0;f<i;f++){let m=t[f];wt(m,()=>{if(s){if(s.pending.delete(m),s.done.add(m),s.pending.size===0){var d=e.outrogroups;cn(e,Fr(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var o=n.length===0&&r!==null&&e.pending.size===0;if(o){var c=r,v=c.parentNode;Is(v),v.append(c),e.items.clear()}cn(e,t,!o)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function cn(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const f of a)n.add(e.items.get(f).e)}for(var i=0;i<t.length;i++){var s=t[i];if(n!=null&&n.has(s)){s.f|=Be;const a=document.createDocumentFragment();bn(s,a)}else ge(t[i],r)}}var Mn;function be(e,t,r,n,i,s=null){var a=e,f=new Map,o=(t&Vn)!==0;if(o){var c=e;a=c.appendChild(Xe())}var v=null,m=Ts(()=>{var b=r();return Fn(b)?b:b==null?[]:Fr(b)}),d,_=new Map,p=!0;function g(b){(O.effect.f&Ne)===0&&(O.pending.delete(b),O.fallback=v,ia(O,d,a,t,n),v!==null&&(d.length===0?(v.f&Be)===0?Lr(v):(v.f^=Be,er(v,null,a)):wt(v,()=>{v=null})))}function h(b){O.pending.delete(b)}var w=$r(()=>{d=u(m);for(var b=d.length,A=new Set,M=T,U=fi(),I=0;I<b;I+=1){var V=d[I],x=n(V,I),k=p?null:f.get(x);k?(k.v&&Ut(k.v,V),k.i&&Ut(k.i,I),U&&M.unskip_effect(k.e)):(k=sa(f,p?a:Mn??(Mn=Xe()),V,x,I,i,t,r),p||(k.e.f|=Be),f.set(x,k)),A.add(x)}if(b===0&&s&&!v&&(p?v=Oe(()=>s(a)):(v=Oe(()=>s(Mn??(Mn=Xe()))),v.f|=Be)),b>A.size&&Yi(),!p)if(_.set(M,A),U){for(const[$,W]of f)A.has($)||M.skip_effect(W.e);M.oncommit(g),M.ondiscard(h)}else g(M);u(m)}),O={effect:w,items:f,pending:_,outrogroups:null,fallback:v};p=!1}function Kt(e){for(;e!==null&&(e.f&Me)===0;)e=e.next;return e}function ia(e,t,r,n,i){var k,$,W,ue,ke,X,ee,fe,Le;var s=(n&ns)!==0,a=t.length,f=e.items,o=Kt(e.effect.first),c,v=null,m,d=[],_=[],p,g,h,w;if(s)for(w=0;w<a;w+=1)p=t[w],g=i(p,w),h=f.get(g).e,(h.f&Be)===0&&(($=(k=h.nodes)==null?void 0:k.a)==null||$.measure(),(m??(m=new Set)).add(h));for(w=0;w<a;w+=1){if(p=t[w],g=i(p,w),h=f.get(g).e,e.outrogroups!==null)for(const ve of e.outrogroups)ve.pending.delete(h),ve.done.delete(h);if((h.f&de)!==0&&(Lr(h),s&&((ue=(W=h.nodes)==null?void 0:W.a)==null||ue.unfix(),(m??(m=new Set)).delete(h))),(h.f&Be)!==0)if(h.f^=Be,h===o)er(h,null,r);else{var O=v?v.next:o;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),st(e,v,h),st(e,h,O),er(h,O,r),v=h,d=[],_=[],o=Kt(v.next);continue}if(h!==o){if(c!==void 0&&c.has(h)){if(d.length<_.length){var b=_[0],A;v=b.prev;var M=d[0],U=d[d.length-1];for(A=0;A<d.length;A+=1)er(d[A],b,r);for(A=0;A<_.length;A+=1)c.delete(_[A]);st(e,M.prev,U.next),st(e,v,M),st(e,U,b),o=b,v=U,w-=1,d=[],_=[]}else c.delete(h),er(h,o,r),st(e,h.prev,h.next),st(e,h,v===null?e.effect.first:v.next),st(e,v,h),v=h;continue}for(d=[],_=[];o!==null&&o!==h;)(c??(c=new Set)).add(o),_.push(o),o=Kt(o.next);if(o===null)continue}(h.f&Be)===0&&d.push(h),v=h,o=Kt(h.next)}if(e.outrogroups!==null){for(const ve of e.outrogroups)ve.pending.size===0&&(cn(e,Fr(ve.done)),(ke=e.outrogroups)==null||ke.delete(ve));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||c!==void 0){var I=[];if(c!==void 0)for(h of c)(h.f&de)===0&&I.push(h);for(;o!==null;)(o.f&de)===0&&o!==e.fallback&&I.push(o),o=Kt(o.next);var V=I.length;if(V>0){var x=(n&Vn)!==0&&a===0?r:null;if(s){for(w=0;w<V;w+=1)(ee=(X=I[w].nodes)==null?void 0:X.a)==null||ee.measure();for(w=0;w<V;w+=1)(Le=(fe=I[w].nodes)==null?void 0:fe.a)==null||Le.fix()}na(e,I,x)}}s&&Ze(()=>{var ve,At;if(m!==void 0)for(h of m)(At=(ve=h.nodes)==null?void 0:ve.a)==null||At.apply()})}function sa(e,t,r,n,i,s,a,f){var o=(a&ts)!==0?(a&is)===0?Ls(r,!1,!1):Et(r):null,c=(a&rs)!==0?Et(i):null;return{v:o,i:c,e:Oe(()=>(s(t,o??r,c??i,f),()=>{e.delete(n)}))}}function er(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&Be)===0?t.nodes.start:r;n!==null;){var a=pr(n);if(s.before(n),n===i)return;n=a}}function st(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function aa(e,t,r){var n=new Ti(e);$r(()=>{var i=t()??null;n.ensure(i,i&&(s=>r(s,i)))},yt)}function Ai(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Ai(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oa(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Ai(e))&&(n&&(n+=" "),n+=t);return n}function la(e){return typeof e=="object"?oa(e):e??""}function fa(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function Tt(e,t,r,n,i,s){var a=e[en];if(a!==r||a===void 0){var f=fa(r);f==null?e.removeAttribute("class"):e.className=f,e[en]=r}return s}const ua=Symbol("is custom element"),ca=Symbol("is html");function Ve(e,t,r,n){var i=da(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[Bi]=r),r==null?e.removeAttribute(t):typeof r!="string"&&va(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function da(e){return e[br]??(e[br]={[ua]:e.nodeName.includes("-"),[ca]:e.namespaceURI===os})}var Rn=new Map;function va(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Ii(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=jn(i)}return r}function ha(e,t,r=t){var n=new WeakSet;ps(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Gr(e)?Kr(s):s,r(s),T!==null&&n.add(T),await Ws(),s!==(s=t())){var a=e.selectionStart,f=e.selectionEnd,o=e.value.length;if(e.value=s??"",f!==null){var c=e.value.length;a===f&&f===o&&c>o?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(f,c))}}}),gr(t)==null&&e.value&&(r(Gr(e)?Kr(e.value):e.value),T!==null&&n.add(T)),xn(()=>{var i=t();if(e===document.activeElement){var s=T;if(n.has(s))return}Gr(e)&&i===Kr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Gr(e){var t=e.type;return t==="number"||t==="range"}function Kr(e){return e===""?null:+e}function Jr(e,t){return e===t||(e==null?void 0:e[yr])===t}function pa(e={},t,r,n){var i=le.r,s=j;return Us(()=>{var a,f;return xn(()=>{a=f,f=[],gr(()=>{Jr(r(...f),e)||(t(e,...f),a&&Jr(r(...a),e)&&t(null,...a))})}),()=>{let o=s;for(;o!==i&&o.parent!==null&&o.parent.f&Xr;)o=o.parent;const c=()=>{f&&Jr(r(...f),e)&&t(null,...f)},v=o.teardown;o.teardown=()=>{c(),v==null||v()}}}),e}function _a(e){le===null&&Un(),wn(()=>{const t=gr(e);if(typeof t=="function")return t})}function ga(e){le===null&&Un(),_a(()=>()=>gr(e))}const ma="5";var Dn;typeof window<"u"&&((Dn=window.__svelte??(window.__svelte={})).v??(Dn.v=new Set)).add(ma);async function Gt(e){const t=await fetch(e);if(!t.ok)throw new Error(`${e}: HTTP ${t.status}`);return t.json()}const wa=()=>Gt("/api/network"),xa=()=>Gt("/api/health"),ya=()=>Gt("/api/provenance"),ba=()=>Gt("/api/logs"),ka=e=>new EventSource(`/api/logs/${e}`),Ea=()=>Gt("/api/actions");async function Sa(e,t){const r=`chain=${encodeURIComponent(e)}`,n=t instanceof File?await fetch(`/api/actions/upgrade?${r}`,{method:"POST",body:t}):await fetch(`/api/actions/upgrade?${r}&path=${encodeURIComponent(t.path)}`,{method:"POST"});if(n.status===409)throw new Error("another action is still running");if(!n.ok){const s=await n.json().catch(()=>null);throw new Error((s==null?void 0:s.error)??`upgrade rejected: HTTP ${n.status}`)}const{events:i}=await n.json();return i}const Ta=()=>Gt("/api/addresses"),Z=Qe({model:null,health:{},provenance:null,actions:null,error:null});async function Aa(){try{Z.model=await wa(),Z.provenance=await ya().catch(()=>null),Z.actions=await Ea().catch(()=>null),await Ln(),setInterval(Ln,5e3)}catch(e){Z.error=e.message}}async function Ln(){try{const e=await xa();Z.health=Object.fromEntries(e.map(t=>[t.id,t]))}catch{}}var Oa=D(`<div role="region"><div class="mb-2">Drop the runtime for <span class="font-medium text-fg-primary"> </span> here, pick a file,
2
+ or give a path on this machine (e.g. a runtime repo's <code class="font-mono">target/release/wbuild/…/*.compact.compressed.wasm</code>):</div> <div class="flex flex-wrap items-center gap-2"><input type="file" accept=".wasm" class="text-xs"/> <form class="flex min-w-0 flex-1 gap-2"><input type="text" placeholder="/path/to/runtime.compact.compressed.wasm" class="min-w-0 flex-1 rounded-medium bg-surface-container px-2.5 py-1.5 font-mono text-xs text-fg-primary placeholder:text-fg-tertiary"/> <button type="submit" class="cursor-pointer rounded-medium bg-surface-container px-3 py-1.5 text-xs font-medium text-fg-secondary transition-colors hover:text-fg-primary">upgrade</button></form></div></div>`),Ca=D("<div> </div>"),Na=D('<div class="mt-1.5 text-xs font-medium text-status-ok">Upgrade applied.</div>'),Ma=D('<div class="mt-1.5 text-xs font-medium text-status-err">Upgrade failed — the log above says why.</div>'),Ra=D('<div class="max-h-48 overflow-auto whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-fg-secondary"></div> <!>',1),La=D('<div class="mt-1 rounded-nested bg-surface-nested p-3"><!></div>');function Pa(e,t){rt(t,!0);let r=G(Qe([])),n=G("idle"),i=G(""),s=G(!1);async function a(p){q(n,"running"),q(r,[],!0);try{const g=await Sa(t.chain,p),h=new EventSource(g);h.onmessage=w=>u(r).push(w.data),h.addEventListener("done",w=>{q(n,w.data==="ok"?"ok":"error",!0),h.close()})}catch(g){q(n,"error"),u(r).push(g.message)}}function f(p){var h;const g=(h=p.target.files)==null?void 0:h[0];g&&a(g)}function o(p){var h,w;p.preventDefault(),q(s,!1);const g=(w=(h=p.dataTransfer)==null?void 0:h.files)==null?void 0:w[0];g&&a(g)}function c(p){p.preventDefault(),u(i).trim()&&a({path:u(i).trim()})}var v=La(),m=y(v);{var d=p=>{var g=Oa(),h=y(g),w=L(y(h)),O=y(w),b=L(h,2),A=y(b),M=L(A,2),U=y(M),I=L(U,2);z(V=>{Tt(g,1,`rounded-medium border border-dashed p-3 text-xs transition-colors
3
+ ${u(s)?"border-fg-secondary text-fg-primary":"border-divider text-fg-secondary"}`),F(O,t.chain),I.disabled=V},[()=>!u(i).trim()]),wr("dragover",g,V=>{V.preventDefault(),q(s,!0)}),wr("dragleave",g,()=>q(s,!1)),wr("drop",g,o),St("change",A,f),wr("submit",M,c),ha(U,()=>u(i),V=>q(i,V)),S(p,g)},_=p=>{var g=Ra(),h=se(g);be(h,21,()=>u(r),or,(A,M)=>{var U=Ca(),I=y(U);z(()=>F(I,u(M))),S(A,U)});var w=L(h,2);{var O=A=>{var M=Na();S(A,M)},b=A=>{var M=Ma();S(A,M)};J(w,A=>{u(n)==="ok"?A(O):u(n)==="error"&&A(b,1)})}S(p,g)};J(m,p=>{u(n)==="idle"?p(d):p(_,-1)})}S(e,v),nt()}Wt(["change"]);var Da=D('<a class="inline-flex items-center gap-1 text-sm font-medium text-fg-primary underline-offset-3 hover:underline" target="_blank" rel="noreferrer"> <svg class="h-3 w-3 text-fg-tertiary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>'),Ia=D('<span class="text-sm font-medium text-fg-primary"> </span>'),Fa=Si('<svg class="h-3.5 w-3.5 text-status-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"></path></svg>'),ja=Si('<svg class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>'),$a=D('<span class="text-status-err">down</span>'),Ha=D('<code class="font-mono text-fg-secondary"> </code>'),Ua=D('<code class="font-mono"> </code>'),Va=D('<a class="text-xs text-fg-link underline underline-offset-3 hover:text-fg-primary" target="_blank" rel="noreferrer"> </a>'),Ba=D('<button class="cursor-pointer rounded-medium bg-surface-nested px-2.5 py-1 text-xs font-medium text-fg-secondary transition-colors hover:bg-selection-hover hover:text-fg-primary">runtime-upgrade</button>'),qa=D('<div class="col-span-7 pb-3 pl-6"><!></div>'),za=D('<div class="col-span-7 grid grid-cols-subgrid items-center border-b border-divider py-2.5 last:border-0"><span></span> <!> <span class="inline-flex min-w-0 items-center gap-1.5"><code class="truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer rounded p-0.5 text-fg-tertiary transition-colors hover:text-fg-primary" title="copy"><!></button></span> <span class="text-right text-xs tabular-nums text-fg-tertiary"><!></span> <span class="inline-flex items-center gap-2 text-xs text-fg-tertiary"><!> <!></span> <span></span> <span class="inline-flex items-center justify-end gap-3"><!> <!></span> <!></div>');function Ya(e,t){rt(t,!0);const r=K(()=>Z.health[t.entry.id]),n=K(()=>t.entry.id==="relay-alice"?"relay":!t.entry.id.startsWith("relay-")&&"paraId"in t.entry?t.entry.id:null),i=K(()=>{var E;return(((E=Z.actions)==null?void 0:E.enabled)??!1)&&u(n)!==null}),s=K(()=>t.entry.protocol==="ws"?t.entry.links.pjs??null:t.entry.url),a=K(()=>{var E;return(E=u(r))!=null&&E.runtime?`${u(r).runtime.specName}/${u(r).runtime.specVersion}`:null}),f=K(()=>{var E,C;return((C=(E=u(r))==null?void 0:E.clientVersion)==null?void 0:C.split("-")[0])??null});let o=G(!1),c=G(!1);async function v(){await navigator.clipboard.writeText(t.entry.url),q(o,!0),setTimeout(()=>q(o,!1),1200)}var m=za(),d=y(m),_=L(d,2);{var p=E=>{var C=Da(),re=y(C);z(()=>{Ve(C,"href",u(s)),Ve(C,"title",t.entry.protocol==="ws"?"open in polkadot.js Apps":"open"),F(re,`${t.entry.label??""} `)}),S(E,C)},g=E=>{var C=Ia(),re=y(C);z(()=>F(re,t.entry.label)),S(E,C)};J(_,E=>{u(s)?E(p):E(g,-1)})}var h=L(_,2),w=y(h),O=y(w),b=L(w,2),A=y(b);{var M=E=>{var C=Fa();S(E,C)},U=E=>{var C=ja();S(E,C)};J(A,E=>{u(o)?E(M):E(U,-1)})}var I=L(h,2),V=y(I);{var x=E=>{var C=Xs();z(re=>F(C,`#${re??""}`),[()=>u(r).block.toLocaleString()]),S(E,C)},k=E=>{var C=$a();S(E,C)};J(V,E=>{var C,re;((C=u(r))==null?void 0:C.status)==="ok"&&u(r).block!==void 0?E(x):((re=u(r))==null?void 0:re.status)==="down"&&E(k,1)})}var $=L(I,2),W=y($);{var ue=E=>{var C=Ha(),re=y(C);z(()=>{Ve(C,"title",`runtime ${u(r).runtime.specName??""} spec ${u(r).runtime.specVersion??""}, impl ${u(r).runtime.implVersion??""}, tx ${u(r).runtime.transactionVersion??""}`),F(re,u(a))}),S(E,C)};J(W,E=>{u(a)&&E(ue)})}var ke=L(W,2);{var X=E=>{var C=Ua(),re=y(C);z(()=>{Ve(C,"title",`node binary ${u(r).clientVersion??""}`),F(re,u(f))}),S(E,C)};J(ke,E=>{u(f)&&E(X)})}var ee=L($,4),fe=y(ee);be(fe,17,()=>Object.entries(t.entry.links??{}),or,(E,C)=>{var re=K(()=>vr(u(C),2));let Hr=()=>u(re)[0],Ni=()=>u(re)[1];var Ur=Va(),Mi=y(Ur);z(()=>{Ve(Ur,"href",Ni()),F(Mi,Hr())}),S(E,Ur)});var Le=L(fe,2);{var ve=E=>{var C=Ba();St("click",C,()=>q(c,!u(c))),S(E,C)};J(Le,E=>{u(i)&&E(ve)})}var At=L(ee,2);{var mr=E=>{var C=qa(),re=y(C);Pa(re,{get chain(){return u(n)}}),S(E,C)};J(At,E=>{u(c)&&u(i)&&E(mr)})}z(()=>{var E,C;Tt(d,1,`h-2 w-2 rounded-full
4
+ ${((E=u(r))==null?void 0:E.status)==="ok"?"bg-status-ok":((C=u(r))==null?void 0:C.status)==="down"?"bg-status-err":"bg-fg-tertiary"}`),Ve(w,"title",t.entry.url),F(O,t.entry.url)}),St("click",b,v),S(e,m),nt()}Wt(["click"]);var Wa=D('<div class="flex items-center gap-3 border-b border-divider px-4 py-2.5 last:border-0"><span class="w-64 shrink-0 truncate text-sm font-medium text-fg-primary"> </span> <code class="min-w-0 flex-1 truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer text-xs text-fg-tertiary transition-colors hover:text-fg-primary"> </button></div>'),Ga=D('<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary">DotNS contracts on Asset Hub</h2> <div class="overflow-hidden rounded-container bg-surface-container shadow-1"></div>',1),Ka=D('<div class="p-8 text-center text-fg-tertiary">No DotNS address manifest in this workspace — `ppn fetch` downloads it for genesis networks.</div>');function Ja(e,t){rt(t,!0);let r=G(null),n=G(null);Ta().then(c=>q(r,c,!0));async function i(c){await navigator.clipboard.writeText(c),q(n,c,!0),setTimeout(()=>q(n,null),1200)}var s=tt(),a=se(s);{var f=c=>{var v=Ga(),m=L(se(v),2);be(m,21,()=>Object.entries(u(r).dotns),([d,_])=>d,(d,_)=>{var p=K(()=>vr(u(_),2));let g=()=>u(p)[0],h=()=>u(p)[1];var w=Wa(),O=y(w),b=y(O),A=L(O,2),M=y(A),U=L(A,2),I=y(U);z(()=>{F(b,g()),F(M,h()),F(I,u(n)===h()?"copied":"copy")}),St("click",U,()=>i(h())),S(d,w)}),S(c,v)},o=c=>{var v=Ka();S(c,v)};J(a,c=>{var v;(v=u(r))!=null&&v.dotns?c(f):u(r)&&c(o,1)})}S(e,s),nt()}Wt(["click"]);var Za=D('<div class="flex items-center gap-3 border-b border-divider px-4 py-2.5"><span class="w-40 shrink-0 text-sm font-medium text-fg-primary"> </span> <code class="min-w-0 flex-1 truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer text-xs text-fg-tertiary transition-colors hover:text-fg-primary"> </button></div>'),Qa=D('<h2 class="mb-2 mt-6 flex items-center gap-2 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary"><span></span> TURN / STUN</h2> <div class="overflow-hidden rounded-container bg-surface-container shadow-1"><!> <div class="flex items-center gap-3 px-4 py-2.5"><span class="w-40 shrink-0 text-sm font-medium text-fg-primary">Credentials</span> <code class="min-w-0 flex-1 truncate font-mono text-xs text-fg-secondary"> </code> <span class="shrink-0 text-xs text-fg-tertiary">Bearer DUB JWT</span></div></div>',1);function Xa(e,t){rt(t,!0);const r=K(()=>{var c;return((c=Z.model)==null?void 0:c.ice)??null}),n=K(()=>u(r)?Z.health[u(r).id]:void 0);let i=G(null);async function s(c){await navigator.clipboard.writeText(c),q(i,c,!0),setTimeout(()=>q(i,null),1200)}var a=tt(),f=se(a);{var o=c=>{var v=Qa(),m=se(v),d=y(m),_=L(m,2),p=y(_);be(p,17,()=>u(r).servers,O=>O.id,(O,b)=>{var A=Za(),M=y(A),U=y(M),I=L(M,2),V=y(I),x=L(I,2),k=y(x);z(()=>{F(U,u(b).label),Ve(I,"title",u(b).url),F(V,u(b).url),F(k,u(i)===u(b).url?"copied":"copy")}),St("click",x,()=>s(u(b).url)),S(O,A)});var g=L(p,2),h=L(y(g),2),w=y(h);z(()=>{var O,b,A,M;Tt(d,1,`h-2 w-2 rounded-full
5
+ ${((O=u(n))==null?void 0:O.status)==="ok"?"bg-status-ok":((b=u(n))==null?void 0:b.status)==="down"?"bg-status-err":"bg-fg-tertiary"}`),Ve(d,"title",((A=u(n))==null?void 0:A.error)??((M=u(n))==null?void 0:M.status)??"not probed yet"),Ve(h,"title",u(r).credentialsUrl),F(w,`POST ${u(r).credentialsUrl??""}`)}),S(c,v)};J(f,c=>{u(r)&&c(o)})}S(e,a),nt()}Wt(["click"]);var eo=D(`<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary"> </h2> <div class="grid grid-cols-[0.6rem_max-content_minmax(0,max-content)_max-content_max-content_1fr_max-content]
6
+ items-center gap-x-5 overflow-hidden rounded-container bg-surface-container px-4 shadow-1"></div>`,1),to=D("<!> <!> <!>",1);function ro(e,t){rt(t,!0);const r=K(()=>{var v;return((v=Z.model)==null?void 0:v.chains.filter(m=>m.paraId===null))??[]}),n=K(()=>{var v;return((v=Z.model)==null?void 0:v.chains.filter(m=>m.paraId!==null))??[]}),i=K(()=>Z.model?[["Relay",u(r)],["Parachains",u(n)],["Services",Z.model.services]]:[]);var s=to(),a=se(s);{var f=v=>{var m=tt(),d=se(m);be(d,17,()=>u(i),([_,p])=>_,(_,p)=>{var g=K(()=>vr(u(p),2));let h=()=>u(g)[0],w=()=>u(g)[1];var O=tt(),b=se(O);{var A=M=>{var U=eo(),I=se(U),V=y(I),x=L(I,2);be(x,21,w,k=>k.id,(k,$)=>{Ya(k,{get entry(){return u($)}})}),z(()=>F(V,h())),S(M,U)};J(b,M=>{w().length&&M(A)})}S(_,O)}),S(v,m)};J(a,v=>{Z.model&&v(f)})}var o=L(a,2);Xa(o,{});var c=L(o,2);Ja(c,{}),S(e,s),nt()}var no=D('<div class="p-8 text-center text-fg-tertiary">No provenance stamp — run `ppn fetch` from a version that writes one.</div>'),io=D('<th class="px-3 py-1.5 text-left font-medium text-fg-tertiary"> </th>'),so=D('<tr class="odd:bg-surface-nested"><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5"><code class="font-mono text-xs text-fg-secondary"> </code></td><td class="px-3 py-1.5"><code> </code></td><td class="px-3 py-1.5 font-mono text-xs text-fg-secondary"> </td><td class="px-3 py-1.5 font-mono text-xs text-fg-tertiary"> </td></tr>'),ao=D('<h2 class="mb-3 mt-7 text-[15px] font-semibold leading-tight text-fg-secondary"> </h2> <div class="overflow-x-auto rounded-container bg-surface-container shadow-1"><table class="w-full border-collapse text-[13px]"><thead><tr></tr></thead><tbody></tbody></table></div>',1);function oo(e,t){rt(t,!0);const r=K(()=>{var o;return((o=Z.provenance)==null?void 0:o.provenance)??null}),n=K(()=>u(r)?[["Node binaries",u(r).binaries??[]],["Runtimes",u(r).runtimes??[]],["Toolchain",u(r).toolchain??[]]].filter(([,o])=>o.length>0):[]);var i=tt(),s=se(i);{var a=o=>{var c=no();S(o,c)},f=o=>{var c=tt(),v=se(c);be(v,17,()=>u(n),([m,d])=>m,(m,d)=>{var _=K(()=>vr(u(d),2));let p=()=>u(_)[0],g=()=>u(_)[1];var h=ao(),w=se(h),O=y(w),b=L(w,2),A=y(b),M=y(A),U=y(M);be(U,20,()=>["name","source","pinned","resolved","version","sha256"],or,(V,x)=>{var k=io(),$=y(k);z(()=>F($,x)),S(V,k)});var I=L(M);be(I,21,g,V=>V.name,(V,x)=>{var k=so(),$=y(k),W=y($),ue=L($),ke=y(ue),X=L(ue),ee=y(X),fe=y(ee),Le=L(X),ve=y(Le),At=y(ve),mr=L(Le),E=y(mr),C=L(mr),re=y(C);z(Hr=>{F(W,u(x).name),F(ke,u(x).repo),F(fe,u(x).pinned),Tt(ve,1,`font-mono text-xs ${u(x).pinned!==u(x).resolved?"font-medium text-fg-primary":"text-fg-secondary"}`),F(At,u(x).resolved),F(E,u(x).version??"—"),Ve(C,"title",u(x).sha256),F(re,`${Hr??""}…`)},[()=>u(x).sha256.slice(0,16)]),S(V,k)}),z(()=>F(O,p())),S(m,h)}),S(o,c)};J(s,o=>{u(r)?o(f,-1):o(a)})}S(e,i),nt()}function Oi(e){return e.replace(/^#\/?/,"").split("/")}function lo(e,t,r){const n=Oi(e)[0];return t.includes(n)?n:r}function fo(e){const t=Oi(e);if(t[0]!=="logs"||!t[1])return null;try{return decodeURIComponent(t[1])}catch{return null}}function Ci(e,t){return t?`#${e}/${encodeURIComponent(t)}`:`#${e}`}var uo=D('<div class="p-8 text-center text-fg-tertiary">No logs yet — is the network running?</div>'),co=D("<button> </button>"),vo=D('<div class="px-3 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-tertiary"> </div> <!>',1),ho=D("<div> </div>"),po=D('<div class="grid min-h-[60vh] grid-cols-[260px_1fr] gap-3"><div class="max-h-[75vh] overflow-y-auto rounded-container bg-surface-container p-2 shadow-1"></div> <div class="max-h-[75vh] overflow-auto whitespace-pre-wrap break-all rounded-container bg-surface-container p-3.5 font-mono text-xs leading-relaxed text-fg-secondary shadow-1"></div></div>');function _o(e,t){rt(t,!0);let r=G(null),n=G(null),i=G(Qe([])),s=G(null),a=null;const f=()=>fo(location.hash);ba().then(p=>{q(r,p,!0);const g=[...p.chains,...p.services,...p.scripts],h=f(),w=(h&&g.includes(h)?h:null)??g[0];w&&o(w)}),wn(()=>{const p=()=>{const g=f();g&&g!==u(n)&&u(r)&&[...u(r).chains,...u(r).services,...u(r).scripts].includes(g)&&o(g)};return window.addEventListener("hashchange",p),()=>window.removeEventListener("hashchange",p)});function o(p){q(n,p,!0);const g=Ci("logs",p);location.hash!==g&&history.replaceState(null,"",g),q(i,[],!0),a==null||a.close(),a=ka(p),a.onmessage=h=>{const w=/error|panic|fatal/i.test(h.data)?"e":/warn/i.test(h.data)?"w":"",O=u(s)&&u(s).scrollTop+u(s).clientHeight>=u(s).scrollHeight-40;u(i).push({text:h.data,sev:w}),u(i).length>2e3&&u(i).splice(0,u(i).length-2e3),O&&requestAnimationFrame(()=>u(s)&&(u(s).scrollTop=u(s).scrollHeight))}}ga(()=>a==null?void 0:a.close());const c=K(()=>u(r)?[["Chains",u(r).chains],["Services",u(r).services],["One-off scripts",u(r).scripts]]:[]);var v=tt(),m=se(v);{var d=p=>{var g=uo();S(p,g)},_=p=>{var g=po(),h=y(g);be(h,21,()=>u(c),or,(O,b)=>{var A=K(()=>vr(u(b),2));let M=()=>u(A)[0],U=()=>u(A)[1];var I=tt(),V=se(I);{var x=k=>{var $=vo(),W=se($),ue=y(W),ke=L(W,2);be(ke,16,U,X=>X,(X,ee)=>{var fe=co(),Le=y(fe);z(()=>{Tt(fe,1,`block w-full cursor-pointer rounded-medium px-3 py-1.5 text-left text-[13px] transition-colors
7
+ ${ee===u(n)?"bg-surface-nested font-medium text-fg-primary":"text-fg-secondary hover:bg-selection-hover"}`),F(Le,ee)}),St("click",fe,()=>o(ee)),S(X,fe)}),z(()=>F(ue,M())),S(k,$)};J(V,k=>{U().length&&k(x)})}S(O,I)});var w=L(h,2);be(w,21,()=>u(i),or,(O,b)=>{var A=ho(),M=y(A);z(()=>{Tt(A,1,la(u(b).sev==="e"?"text-status-err":u(b).sev==="w"?"text-status-warn":"")),F(M,u(b).text)}),S(O,A)}),pa(w,O=>q(s,O),()=>u(s)),S(p,g)};J(m,p=>{u(r)&&!u(r).chains.length&&!u(r).services.length&&!u(r).scripts.length?p(d):u(r)&&p(_,1)})}S(e,v),nt()}Wt(["click"]);var Zr=D("<span> </span>"),go=D('<span class="rounded-full bg-surface-nested px-2.5 py-0.5 text-xs font-medium text-fg-secondary"> </span> <!>',1),mo=D("<span> </span> <!>",1),wo=D("<button> </button>"),xo=D('<div class="p-8 text-center text-fg-tertiary"> </div>'),yo=D('<div class="mx-auto max-w-[1200px] bg-surface-main px-4 py-8 font-sans text-fg-primary sm:px-12"><header class="mb-8"><h1 class="text-[22px] font-semibold leading-tight"> </h1> <div class="mt-1.5 flex flex-wrap gap-4 text-[13px] text-fg-tertiary"><!> <!> <!></div></header> <nav class="mb-6 flex gap-1"></nav> <!></div>');function bo(e,t){rt(t,!0);const r={overview:ro,provenance:oo,logs:_o},n=Object.keys(r),i=()=>lo(location.hash,n,"overview");let s=G(Qe(i()));const a=K(()=>r[u(s)]);function f(x){location.hash=Ci(x)}wn(()=>{const x=()=>q(s,i(),!0);return window.addEventListener("hashchange",x),()=>window.removeEventListener("hashchange",x)});const o=K(()=>{var x;return((x=Z.provenance)==null?void 0:x.spawn)??null}),c=K(()=>{var x,k;return((k=(x=Z.provenance)==null?void 0:x.provenance)==null?void 0:k.fetchedAt)??null});Aa();var v=yo(),m=y(v),d=y(m),_=y(d),p=L(d,2),g=y(p);{var h=x=>{var k=go(),$=se(k),W=y($),ue=L($,2);{var ke=X=>{var ee=Zr(),fe=y(ee);z(Le=>F(fe,`bitten ${Le??""} from ${new URL(u(o).bite.source).host??""}`),[()=>new Date(u(o).bite.at).toLocaleString()]),S(X,ee)};J(ue,X=>{var ee;(ee=u(o))!=null&&ee.bite&&X(ke)})}z(()=>F(W,u(o)?u(o).mode:Z.model.network.genesis?"genesis":"fork-only")),S(x,k)};J(g,x=>{(u(o)||Z.model)&&x(h)})}var w=L(g,2);{var O=x=>{var k=mo(),$=se(k),W=y($),ue=L($,2);{var ke=X=>{var ee=Zr(),fe=y(ee);z(()=>F(fe,`ppn ${u(o).ppnVersion??""}`)),S(X,ee)};J(ue,X=>{u(o).ppnVersion&&X(ke)})}z(X=>F(W,`spawned ${X??""}`),[()=>new Date(u(o).spawnedAt).toLocaleString()]),S(x,k)};J(w,x=>{u(o)&&x(O)})}var b=L(w,2);{var A=x=>{var k=Zr(),$=y(k);z(W=>F($,`artifacts fetched ${W??""}`),[()=>new Date(u(c)).toLocaleString()]),S(x,k)};J(b,x=>{u(c)&&x(A)})}var M=L(m,2);be(M,20,()=>Object.keys(r),x=>x,(x,k)=>{var $=wo(),W=y($);z(()=>{Tt($,1,`cursor-pointer rounded-t-lg border-b-2 px-3.5 py-2 text-sm font-medium transition-colors
8
+ ${u(s)===k?"border-fg-primary text-fg-primary":"border-transparent text-fg-secondary hover:text-fg-primary"}`),F(W,k)}),St("click",$,()=>f(k)),S(x,$)});var U=L(M,2);{var I=x=>{var k=xo(),$=y(k);z(()=>F($,`Cannot reach the dashboard API: ${Z.error??""}`)),S(x,k)},V=x=>{var k=tt(),$=se(k);aa($,()=>u(a),(W,ue)=>{ue(W,{})}),S(x,k)};J(U,x=>{Z.error?x(I):x(V,-1)})}z(()=>{var x;return F(_,((x=Z.model)==null?void 0:x.network.displayName)??"Product Preview Network")}),S(e,v),nt()}Wt(["click"]);ea(bo,{target:document.getElementById("app")});
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Inter", system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface-main:#fafaf9;--color-surface-container:#fff;--color-surface-nested:#f5f5f4;--color-selection-hover:#e7e5e4;--color-fg-primary:#1c1917;--color-fg-secondary:#57534e;--color-fg-tertiary:#a8a29e;--color-fg-link:#44403c;--color-status-ok:#16a34a;--color-status-err:#dc2626;--color-status-warn:#d97706;--radius-container:16px;--radius-nested:12px;--radius-medium:10px;--color-divider:#0000000d}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static{position:static}.col-span-7{grid-column:span 7/span 7}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\[75vh\]{max-height:75vh}.min-h-\[60vh\]{min-height:60vh}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-40{width:calc(var(--spacing) * 40)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.max-w-\[1200px\]{max-width:1200px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.grid-cols-\[0\.6rem_max-content_minmax\(0\,max-content\)_max-content_max-content_1fr_max-content\]{grid-template-columns:.6rem max-content minmax(0,max-content) max-content max-content 1fr max-content}.grid-cols-\[260px_1fr\]{grid-template-columns:260px 1fr}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-container{border-radius:var(--radius-container)}.rounded-full{border-radius:3.40282e38px}.rounded-medium{border-radius:var(--radius-medium)}.rounded-nested{border-radius:var(--radius-nested)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-divider{border-color:var(--color-divider)}.border-fg-primary{border-color:var(--color-fg-primary)}.border-fg-secondary{border-color:var(--color-fg-secondary)}.border-transparent{border-color:#0000}.bg-fg-tertiary{background-color:var(--color-fg-tertiary)}.bg-status-err{background-color:var(--color-status-err)}.bg-status-ok{background-color:var(--color-status-ok)}.bg-surface-container{background-color:var(--color-surface-container)}.bg-surface-main{background-color:var(--color-surface-main)}.bg-surface-nested{background-color:var(--color-surface-nested)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-8{padding:calc(var(--spacing) * 8)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-1{padding-bottom:var(--spacing)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[22px\]{font-size:22px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-fg-link{color:var(--color-fg-link)}.text-fg-primary{color:var(--color-fg-primary)}.text-fg-secondary{color:var(--color-fg-secondary)}.text-fg-tertiary{color:var(--color-fg-tertiary)}.text-status-err{color:var(--color-status-err)}.text-status-ok{color:var(--color-status-ok)}.text-status-warn{color:var(--color-status-warn)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-3{text-underline-offset:3px}.shadow-1{--tw-shadow:0 1px 3px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.placeholder\:text-fg-tertiary::placeholder{color:var(--color-fg-tertiary)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.odd\:bg-surface-nested:nth-child(odd){background-color:var(--color-surface-nested)}@media(hover:hover){.hover\:bg-selection-hover:hover{background-color:var(--color-selection-hover)}.hover\:text-fg-primary:hover{color:var(--color-fg-primary)}.hover\:underline:hover{text-decoration-line:underline}}@media(min-width:40rem){.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}}@media(prefers-color-scheme:dark){:root{--color-surface-main:#131211;--color-surface-container:#1e1c1b;--color-surface-nested:#292524;--color-selection-hover:#33302e;--color-fg-primary:#fafaf9;--color-fg-secondary:#d6d3d1;--color-fg-tertiary:#78716c;--color-fg-link:#e7e5e4;--shadow-1:0 1px 3px #0006;--color-divider:#ffffff0f}}:focus-visible{outline:2px solid var(--color-fg-secondary);outline-offset:2px}body{background:var(--color-surface-main)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/web/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>PPN</title>
7
- <script type="module" crossorigin src="/assets/index-BW4b1s2y.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-X3pZpnYk.css">
7
+ <script type="module" crossorigin src="/assets/index-D3cDtNic.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-DlPqTbMO.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="app"></div>
@@ -236,6 +236,10 @@ env = [
236
236
  { name = "INVITER_ADDRESS", value = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty" },
237
237
  ]
238
238
 
239
+ [[custom_processes]]
240
+ name = "turn"
241
+ command = "{{SCRIPTS}}/turn.sh"
242
+
239
243
  [[custom_processes]]
240
244
  name = "patch-bootnodes"
241
245
  command = "{{SCRIPTS}}/patch-bootnodes.sh"
@@ -1,7 +0,0 @@
1
- var Ri=Object.defineProperty;var En=e=>{throw TypeError(e)};var Li=(e,t,r)=>t in e?Ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var me=(e,t,r)=>Li(e,typeof t!="symbol"?t+"":t,r),Ur=(e,t,r)=>t.has(e)||En("Cannot "+r);var l=(e,t,r)=>(Ur(e,t,"read from private field"),r?r.call(e):t.get(e)),M=(e,t,r)=>t.has(e)?En("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),C=(e,t,r,n)=>(Ur(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),I=(e,t,r)=>(Ur(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const Fn=!1;var In=Array.isArray,Pi=Array.prototype.indexOf,Or=Array.prototype.includes,Ir=Array.from,Di=Object.defineProperty,er=Object.getOwnPropertyDescriptor,Fi=Object.getOwnPropertyDescriptors,Ii=Object.prototype,ji=Array.prototype,jn=Object.getPrototypeOf,kn=Object.isExtensible;const $i=()=>{};function Hi(e){for(var t=0;t<e.length;t++)e[t]()}function $n(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}function dr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const se=2,It=4,jr=8,Hn=1<<24,Ie=16,Ne=32,Xe=64,Qr=128,Oe=512,ie=1024,te=2048,$e=4096,de=8192,Ce=16384,Bt=32768,Xr=1<<25,xt=65536,Cr=1<<17,Vi=1<<18,zt=1<<19,Ui=1<<20,Ue=1<<25,bt=65536,Mr=1<<21,Ct=1<<22,st=1<<23,xr=Symbol("$state"),qi=Symbol(""),br=Symbol("attributes"),en=Symbol("class"),Bi=Symbol("style"),Kt=Symbol("text"),Er=Symbol("form reset"),vr=new class extends Error{constructor(){super(...arguments);me(this,"name","StaleReactionError");me(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Vn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function zi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Yi(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Wi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Gi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Zi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ji(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function es(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ts=1,rs=2,Un=4,ns=8,is=16,ss=1,as=2,ne=Symbol("uninitialized"),os="http://www.w3.org/1999/xhtml";function ls(){console.warn("https://svelte.dev/e/derived_inert")}function fs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function qn(e){return e===this.v}function us(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Bn(e){return!us(e,this.v)}let cs=!1,oe=null;function jt(e){oe=e}function lt(e,t=!1,r){oe={p:oe,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function ft(e){var t=oe,r=t.e;if(r!==null){t.e=null;for(var n of r)ci(n)}return t.i=!0,oe=t.p,{}}function zn(){return!0}let ct=[];function Yn(){var e=ct;ct=[],Hi(e)}function Ze(e){if(ct.length===0&&!rr){var t=ct;queueMicrotask(()=>{t===ct&&Yn()})}ct.push(e)}function ds(){for(;ct.length>0;)Yn()}function Wn(e){var t=D;if(t===null)return R.f|=st,e;if((t.f&Bt)===0&&(t.f&It)===0)throw e;it(e,t)}function it(e,t){if(!(t!==null&&(t.f&Ce)!==0)){for(;t!==null;){if((t.f&Qr)!==0){if((t.f&Bt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}const vs=-7169;function G(e,t){e.f=e.f&vs|t}function vn(e){(e.f&Oe)!==0||e.deps===null?G(e,ie):G(e,$e)}function Gn(e){if(e!==null)for(const t of e)(t.f&se)===0||(t.f&bt)===0||(t.f^=bt,Gn(t.deps))}function Kn(e,t,r){(e.f&te)!==0?t.add(e):(e.f&$e)!==0&&r.add(e),Gn(e.deps),G(e,ie)}let Sn=!1;function hs(){Sn||(Sn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r[Er])==null||t.call(r)})},{capture:!0}))}function Yt(e){var t=R,r=D;Re(null),ze(null);try{return e()}finally{Re(t),ze(r)}}function ps(e,t,r,n=r){e.addEventListener(t,()=>Yt(r));const i=e[Er];i?e[Er]=()=>{i(),n(!0)}:e[Er]=()=>n(!0),hs()}function _s(e){let t=0,r=kt(0),n;return()=>{mn()&&(c(r),yn(()=>(t===0&&(n=_r(()=>e(()=>nr(r)))),t+=1,()=>{Ze(()=>{t-=1,t===0&&(n==null||n(),n=void 0,nr(r))})})))}}var gs=xt|zt;function ms(e,t,r,n){new ws(e,t,r,n)}var ke,dn,Se,ht,he,Te,ce,ye,Ye,pt,rt,Mt,or,lr,We,Pr,Y,ys,xs,tn,bs,rn,kr,Sr,nn,sn;class ws{constructor(t,r,n,i){M(this,Y);me(this,"parent");me(this,"is_pending",!1);me(this,"transform_error");M(this,ke);M(this,dn,null);M(this,Se);M(this,ht);M(this,he);M(this,Te,null);M(this,ce,null);M(this,ye,null);M(this,Ye,null);M(this,pt,0);M(this,rt,0);M(this,Mt,!1);M(this,or,new Set);M(this,lr,new Set);M(this,We,null);M(this,Pr,_s(()=>(C(this,We,kt(l(this,pt))),()=>{C(this,We,null)})));var s;C(this,ke,t),C(this,Se,r),C(this,ht,a=>{var f=D;f.b=this,f.f|=Qr,n(a)}),this.parent=D.b,this.transform_error=i??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),C(this,he,$r(()=>{I(this,Y,rn).call(this)},gs))}defer_effect(t){Kn(t,l(this,or),l(this,lr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!l(this,Se).pending}update_pending_count(t,r){I(this,Y,nn).call(this,t,r),C(this,pt,l(this,pt)+t),!(!l(this,We)||l(this,Mt))&&(C(this,Mt,!0),Ze(()=>{C(this,Mt,!1),l(this,We)&&$t(l(this,We),l(this,pt))}))}get_effect_pending(){return l(this,Pr).call(this),c(l(this,We))}error(t){if(!l(this,Se).onerror&&!l(this,Se).failed)throw t;E!=null&&E.is_fork?(l(this,Te)&&E.skip_effect(l(this,Te)),l(this,ce)&&E.skip_effect(l(this,ce)),l(this,ye)&&E.skip_effect(l(this,ye)),E.oncommit(()=>{I(this,Y,sn).call(this,t)})):I(this,Y,sn).call(this,t)}}ke=new WeakMap,dn=new WeakMap,Se=new WeakMap,ht=new WeakMap,he=new WeakMap,Te=new WeakMap,ce=new WeakMap,ye=new WeakMap,Ye=new WeakMap,pt=new WeakMap,rt=new WeakMap,Mt=new WeakMap,or=new WeakMap,lr=new WeakMap,We=new WeakMap,Pr=new WeakMap,Y=new WeakSet,ys=function(){try{C(this,Te,Ae(()=>l(this,ht).call(this,l(this,ke))))}catch(t){this.error(t)}},xs=function(t){const r=l(this,Se).failed,{reset:n,invoke_onerror:i}=I(this,Y,tn).call(this,t);Ze(i),r&&C(this,ye,Ae(()=>{r(l(this,ke),()=>t,()=>n)}))},tn=function(t){var r=!1,n=!1;const i=()=>{if(r){fs();return}r=!0,n&&es(),l(this,ye)!==null&&wt(l(this,ye),()=>{C(this,ye,null)}),I(this,Y,Sr).call(this,()=>{I(this,Y,rn).call(this)})};return{reset:i,invoke_onerror:()=>{var a,f;try{n=!0,(f=(a=l(this,Se)).onerror)==null||f.call(a,t,i),n=!1}catch(o){it(o,l(this,he)&&l(this,he).parent)}}}},bs=function(){const t=l(this,Se).pending;t&&(this.is_pending=!0,C(this,ce,Ae(()=>t(l(this,ke)))),Ze(()=>{var r=C(this,Ye,document.createDocumentFragment()),n=Qe();r.append(n),C(this,Te,I(this,Y,Sr).call(this,()=>Ae(()=>l(this,ht).call(this,n)))),l(this,rt)===0&&(l(this,ke).before(r),C(this,Ye,null),wt(l(this,ce),()=>{C(this,ce,null)}),I(this,Y,kr).call(this,E))}))},rn=function(){try{if(this.is_pending=this.has_pending_snippet(),C(this,rt,0),C(this,pt,0),C(this,Te,Ae(()=>{l(this,ht).call(this,l(this,ke))})),l(this,rt)>0){var t=C(this,Ye,document.createDocumentFragment());bn(l(this,Te),t);const r=l(this,Se).pending;C(this,ce,Ae(()=>r(l(this,ke))))}else I(this,Y,kr).call(this,E)}catch(r){this.error(r)}},kr=function(t){this.is_pending=!1,t.transfer_effects(l(this,or),l(this,lr))},Sr=function(t){var r=D,n=R,i=oe;ze(l(this,he)),Re(l(this,he)),jt(l(this,he).ctx);try{return Et.ensure(),t()}catch(s){return Wn(s),null}finally{ze(r),Re(n),jt(i)}},nn=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&I(n=this.parent,Y,nn).call(n,t,r);return}C(this,rt,l(this,rt)+t),l(this,rt)===0&&(I(this,Y,kr).call(this,r),l(this,ce)&&wt(l(this,ce),()=>{C(this,ce,null)}),l(this,Ye)&&(l(this,ke).before(l(this,Ye)),C(this,Ye,null)))},sn=function(t){l(this,Te)&&(ge(l(this,Te)),C(this,Te,null)),l(this,ce)&&(ge(l(this,ce)),C(this,ce,null)),l(this,ye)&&(ge(l(this,ye)),C(this,ye,null));let r=l(this,Se).failed;const n=i=>{const{reset:s,invoke_onerror:a}=I(this,Y,tn).call(this,i);a(),r&&C(this,ye,I(this,Y,Sr).call(this,()=>{try{return Ae(()=>{var f=D;f.b=this,f.f|=Qr,r(l(this,ke),()=>i,()=>s)})}catch(f){return it(f,l(this,he).parent),null}}))};Ze(()=>{var i;try{i=this.transform_error(t)}catch(s){it(s,l(this,he)&&l(this,he).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(n,s=>it(s,l(this,he)&&l(this,he).parent)):n(i)})};function Es(e,t,r,n){const i=hn;var s=e.filter(_=>!_.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var f=D,o=ks(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(_=>_.promise)):null;function v(_){if((f.f&Ce)===0){o();try{n([...a,..._])}catch(p){it(p,f)}Nr()}}var m=Zn();if(r.length===0){u.then(()=>v([])).finally(m);return}function d(){Promise.all(r.map(_=>Ss(_))).then(v).catch(_=>it(_,f)).finally(m)}u?u.then(()=>{o(),d(),Nr()}):d()}function ks(){var e=D,t=R,r=oe,n=E;return function(s=!0){ze(e),Re(t),jt(r),s&&(e.f&Ce)===0&&(n==null||n.activate(),n==null||n.apply())}}function Nr(e=!0){ze(null),Re(null),jt(null),e&&(E==null||E.deactivate())}function Zn(){var e=D,t=e.b,r=E,n=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,r),r.increment(n,e),()=>{t==null||t.update_pending_count(-1,r),r.decrement(n,e)}}function hn(e){var t=se|te;return D!==null&&(D.f|=zt),{ctx:oe,deps:null,effects:null,equals:qn,f:t,fn:e,reactions:null,rv:0,v:ne,wv:0,parent:D,ac:null}}const Zt=Symbol("obsolete");function Ss(e,t,r){let n=D;n===null&&zi();var i=void 0,s=kt(ne),a=!R,f=new Set;return Us(()=>{var _,p;var o=D,u=$n();i=u.promise;try{Promise.resolve(e()).then(u.resolve,g=>{g!==vr&&u.reject(g)}).finally(Nr)}catch(g){u.reject(g),Nr()}var v=E;if(a){if((o.f&Bt)!==0)var m=Zn();if((_=n.b)!=null&&_.is_rendered())(p=v.async_deriveds.get(o))==null||p.reject(Zt);else for(const g of f.values())g.reject(Zt);f.add(u),v.async_deriveds.set(o,u)}const d=(g,h=void 0)=>{m==null||m(),f.delete(u),h!==Zt&&(v.activate(),h?(s.f|=st,$t(s,h)):((s.f&st)!==0&&(s.f^=st),$t(s,g)),v.deactivate())};u.promise.then(d,g=>d(null,g||"unknown"))}),ui(()=>{for(const o of f)o.reject(Zt)}),new Promise(o=>{function u(v){function m(){v===i?o(s):u(i)}v.then(m,m)}u(i)})}function X(e){const t=hn(e);return _i(t),t}function Ts(e){const t=hn(e);return t.equals=Bn,t}function As(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}function pn(e){var t,r=D,n=e.parent;if(!at&&n!==null&&e.v!==ne&&(n.f&(Ce|de))!==0)return ls(),e.v;ze(n);try{e.f&=~bt,As(e),t=yi(e)}finally{ze(r)}return t}function Jn(e){var t=pn(e);if(!e.equals(t)&&(e.wv=mi(),(!(E!=null&&E.is_fork)||e.deps===null)&&(E!==null?(E.capture(e,t,!0),tr==null||tr.capture(e,t,!0)):e.v=t,e.deps===null))){G(e,ie);return}at||(ae!==null?(mn()||E!=null&&E.is_fork)&&ae.set(e,t):vn(e))}function Os(e){var t;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),r.ac!==null&&Yt(()=>{r.ac.abort(vr),r.ac=null}),r.fn!==null&&(r.teardown=$i),ir(r,0),xn(r))}function Qn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Vt(t)}let qr=null,Tt=null,E=null,tr=null,ae=null,an=null,rr=!1,Br=!1,Ot=null,Tr=null;var Tn=0;let Cs=1;var Nt,nt,_t,Rt,Lt,Pt,Ge,Dt,pe,fr,Ke,De,He,Ft,gt,V,on,Jt,ln,Xn,ei,At,Ms,Qt;const Dr=class Dr{constructor(){M(this,V);me(this,"id",Cs++);M(this,Nt,!1);me(this,"linked",!0);M(this,nt,null);M(this,_t,null);me(this,"async_deriveds",new Map);me(this,"current",new Map);me(this,"previous",new Map);M(this,Rt,new Set);M(this,Lt,new Set);M(this,Pt,0);M(this,Ge,new Map);M(this,Dt,null);M(this,pe,[]);M(this,fr,[]);M(this,Ke,new Set);M(this,De,new Set);M(this,He,new Map);M(this,Ft,new Set);me(this,"is_fork",!1);M(this,gt,!1);Tt===null?qr=Tt=this:(C(Tt,_t,this),C(this,nt,Tt)),Tt=this}skip_effect(t){l(this,He).has(t)||l(this,He).set(t,{d:[],m:[]}),l(this,Ft).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=l(this,He).get(t);if(n){l(this,He).delete(t);for(var i of n.d)G(i,te),r(i);for(i of n.m)G(i,$e),r(i)}l(this,Ft).add(t)}capture(t,r,n=!1){t.v!==ne&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&st)===0&&(this.current.set(t,[r,n]),ae==null||ae.set(t,r)),this.is_fork||(t.v=r)}activate(){E=this}deactivate(){E=null,ae=null}flush(){try{Br=!0,E=this,I(this,V,Jt).call(this)}finally{Tn=0,an=null,Ot=null,Tr=null,Br=!1,E=null,ae=null,qe.clear()}}discard(){var t;for(const r of l(this,Lt))r(this);l(this,Lt).clear();for(const r of this.async_deriveds.values())r.reject(Zt);I(this,V,Qt).call(this),(t=l(this,Dt))==null||t.resolve()}register_created_effect(t){l(this,fr).push(t)}increment(t,r){if(C(this,Pt,l(this,Pt)+1),t){let n=l(this,Ge).get(r)??0;l(this,Ge).set(r,n+1)}}decrement(t,r){if(C(this,Pt,l(this,Pt)-1),t){let n=l(this,Ge).get(r)??0;n===1?l(this,Ge).delete(r):l(this,Ge).set(r,n-1)}l(this,gt)||(C(this,gt,!0),Ze(()=>{C(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)l(this,Ke).add(n);for(const n of r)l(this,De).add(n);t.clear(),r.clear()}oncommit(t){l(this,Rt).add(t)}ondiscard(t){l(this,Lt).add(t)}settled(){return(l(this,Dt)??C(this,Dt,$n())).promise}static ensure(){if(E===null){const t=E=new Dr;!Br&&!rr&&Ze(()=>{l(t,Nt)||t.flush()})}return E}apply(){{ae=null;return}}schedule(t){var i;if(an=t,(i=t.b)!=null&&i.is_pending&&(t.f&(It|jr|Hn))!==0&&(t.f&Bt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Ot!==null&&r===D&&(R===null||(R.f&se)===0))return;if((n&(Xe|Ne))!==0){if((n&ie)===0)return;r.f^=ie}}l(this,pe).push(r)}};Nt=new WeakMap,nt=new WeakMap,_t=new WeakMap,Rt=new WeakMap,Lt=new WeakMap,Pt=new WeakMap,Ge=new WeakMap,Dt=new WeakMap,pe=new WeakMap,fr=new WeakMap,Ke=new WeakMap,De=new WeakMap,He=new WeakMap,Ft=new WeakMap,gt=new WeakMap,V=new WeakSet,on=function(){if(this.is_fork)return!0;for(const n of l(this,Ge).keys()){for(var t=n,r=!1;t.parent!==null;){if(l(this,He).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Jt=function(){var o,u,v,m;C(this,Nt,!0),Tn++>1e3&&(I(this,V,Qt).call(this),Rs());for(const d of l(this,Ke))l(this,De).delete(d),G(d,te),this.schedule(d);for(const d of l(this,De))G(d,$e),this.schedule(d);const t=l(this,pe);C(this,pe,[]),this.apply();var r=Ot=[],n=[],i=Tr=[];for(const d of t)try{I(this,V,ln).call(this,d,r,n)}catch(_){throw ni(d),I(this,V,on).call(this)||this.discard(),_}if(E=null,i.length>0){var s=Dr.ensure();for(const d of i)s.schedule(d)}if(Ot=null,Tr=null,I(this,V,on).call(this)){I(this,V,At).call(this,n),I(this,V,At).call(this,r);for(const[d,_]of l(this,He))ri(d,_);i.length>0&&I(o=E,V,Jt).call(o);return}const a=I(this,V,Xn).call(this);if(a){I(this,V,At).call(this,n),I(this,V,At).call(this,r),I(u=a,V,ei).call(u,this);return}l(this,Ke).clear(),l(this,De).clear();for(const d of l(this,Rt))d(this);l(this,Rt).clear(),tr=this,An(n),An(r),tr=null,(v=l(this,Dt))==null||v.resolve();var f=E;if(l(this,Pt)===0&&(l(this,pe).length===0||f!==null)&&I(this,V,Qt).call(this),l(this,pe).length>0)if(f!==null){const d=f;l(d,pe).push(...l(this,pe).filter(_=>!l(d,pe).includes(_)))}else f=this;f!==null&&(qe.clear(),I(m=f,V,Jt).call(m))},ln=function(t,r,n){t.f^=ie;for(var i=t.first;i!==null;){var s=i.f,a=(s&(Ne|Xe))!==0,f=a&&(s&ie)!==0,o=f||(s&de)!==0||l(this,He).has(i);if(!o&&i.fn!==null){a?i.f^=ie:(s&It)!==0?r.push(i):pr(i)&&((s&Ie)!==0&&l(this,De).add(i),Vt(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},Xn=function(){for(var t=l(this,nt);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=l(t,nt)}return null},ei=function(t){var n;for(const[i,s]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,s);for(const[i,s]of t.async_deriveds){const a=this.async_deriveds.get(i);a&&s.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(l(t,Ke),l(t,De));const r=i=>{var s=i.reactions;if(s!==null&&!((i.f&se)!==0&&(i.f&(te|$e))===0))for(const o of s){var a=o.f;if((a&se)!==0)r(o);else{var f=o;a&(Ct|Ie)&&!this.async_deriveds.has(f)&&(l(this,De).delete(f),G(f,te),this.schedule(f))}}};for(const i of this.current.keys())r(i);this.oncommit(()=>t.discard()),I(n=t,V,Qt).call(n),E=this,I(this,V,Jt).call(this)},At=function(t){for(var r=0;r<t.length;r+=1)Kn(t[r],l(this,Ke),l(this,De))},Ms=function(){var m;for(let d=qr;d!==null;d=l(d,_t)){var t=d.id<this.id,r=[];for(const[_,[p,g]]of this.current){if(d.current.has(_)){var n=d.current.get(_)[0];if(t&&p!==n)d.current.set(_,[p,g]);else continue}r.push(_)}if(t)for(const[_,p]of this.async_deriveds){const g=d.async_deriveds.get(_);g&&p.promise.then(g.resolve).catch(g.reject)}var i=[...d.current.keys()].filter(_=>!d.current.get(_)[1]);if(!(!l(d,Nt)||i.length===0)){var s=i.filter(_=>!this.current.has(_));if(s.length===0)t&&d.discard();else if(r.length>0){if(t)for(const _ of l(this,Ft))d.unskip_effect(_,p=>{var g;(p.f&(Ie|Ct))!==0?d.schedule(p):I(g=d,V,At).call(g,[p])});d.activate();var a=new Set,f=new Map;for(var o of r)ti(o,s,a,f);f=new Map;var u=[...d.current].filter(([_,p])=>{const g=this.current.get(_);return g?g[0]!==p[0]||g[1]!==p[1]:!0}).map(([_])=>_);if(u.length>0)for(const _ of l(this,fr))(_.f&(Ce|de|Cr))===0&&_n(_,u,f)&&((_.f&(Ct|Ie))!==0?(G(_,te),d.schedule(_)):l(d,Ke).add(_));if(l(d,pe).length>0&&!l(d,gt)){d.apply();for(var v of l(d,pe))I(m=d,V,ln).call(m,v,[],[]);C(d,pe,[])}d.deactivate()}}}},Qt=function(){if(this.linked){var t=l(this,nt),r=l(this,_t);t===null?qr=r:C(t,_t,r),r===null?Tt=t:C(r,nt,t),this.linked=!1}};let Et=Dr;function Ns(e){var t=rr;rr=!0;try{for(var r;;){if(ds(),E===null)return r;E.flush()}}finally{rr=t}}function Rs(){try{Zi()}catch(e){it(e,an)}}let Pe=null;function An(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Ce|de))===0&&pr(n)&&(Pe=new Set,Vt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&vi(n),(Pe==null?void 0:Pe.size)>0)){qe.clear();for(const i of Pe){if((i.f&(Ce|de))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Pe.has(a)&&(Pe.delete(a),s.push(a)),a=a.parent;for(let f=s.length-1;f>=0;f--){const o=s[f];(o.f&(Ce|de))===0&&Vt(o)}}Pe.clear()}}Pe=null}}function ti(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&se)!==0?ti(i,t,r,n):(s&(Ct|Ie))!==0&&(s&te)===0&&_n(i,t,n)&&(G(i,te),gn(i))}}function _n(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Or.call(t,i))return!0;if((i.f&se)!==0&&_n(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function gn(e){E.schedule(e)}function ri(e,t){if(!((e.f&Ne)!==0&&(e.f&ie)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),G(e,ie);for(var r=e.first;r!==null;)ri(r,t),r=r.next}}function ni(e){G(e,ie);for(var t=e.first;t!==null;)ni(t),t=t.next}let Rr=new Set;const qe=new Map;let ii=!1;function kt(e,t){var r={f:0,v:e,reactions:null,equals:qn,rv:0,wv:0};return r}function Z(e,t){const r=kt(e);return _i(r),r}function Ls(e,t=!1,r=!0){const n=kt(e);return t||(n.equals=Bn),n}function B(e,t,r=!1){R!==null&&(!je||(R.f&Cr)!==0)&&zn()&&(R.f&(se|Ie|Ct|Cr))!==0&&(Be===null||!Be.has(e))&&Xi();let n=r?Je(t):t;return $t(e,n,Tr)}function $t(e,t,r=null){if(!e.equals(t)){at?qe.set(e,t):qe.has(e)||qe.set(e,e.v);var n=Et.ensure();if(n.capture(e,t),(e.f&se)!==0){const i=e;(e.f&te)!==0&&pn(i),ae===null&&vn(i)}e.wv=mi(),si(e,te,r),D!==null&&(D.f&ie)!==0&&(D.f&(Ne|Xe))===0&&(Ee===null?zs([e]):Ee.push(e)),!n.is_fork&&Rr.size>0&&!ii&&Ps()}return t}function Ps(){ii=!1;for(const e of Rr){(e.f&ie)!==0&&G(e,$e);let t;try{t=pr(e)}catch{t=!0}t&&Vt(e)}Rr.clear()}function nr(e){B(e,e.v+1)}function si(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var a=n[s],f=a.f,o=(f&te)===0;if(o&&G(a,t),(f&Cr)!==0)Rr.add(a);else if((f&se)!==0){var u=a;ae==null||ae.delete(u),(f&bt)===0&&(f&Oe&&(D===null||(D.f&Mr)===0)&&(a.f|=bt),si(u,$e,r))}else if(o){var v=a;(f&Ie)!==0&&Pe!==null&&Pe.add(v),r!==null?r.push(v):gn(v)}}}function Je(e){if(typeof e!="object"||e===null||xr in e)return e;const t=jn(e);if(t!==Ii&&t!==ji)return e;var r=new Map,n=In(e),i=Z(0),s=yt,a=f=>{if(yt===s)return f();var o=R,u=yt;Re(null),Mn(s);var v=f();return Re(o),Mn(u),v};return n&&r.set("length",Z(e.length)),new Proxy(e,{defineProperty(f,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ji();var v=r.get(o);return v===void 0?a(()=>{var m=Z(u.value);return r.set(o,m),m}):B(v,u.value,!0),!0},deleteProperty(f,o){var u=r.get(o);if(u===void 0){if(o in f){const v=a(()=>Z(ne));r.set(o,v),nr(i)}}else B(u,ne),nr(i);return!0},get(f,o,u){var _;if(o===xr)return e;var v=r.get(o),m=o in f;if(v===void 0&&(!m||(_=er(f,o))!=null&&_.writable)&&(v=a(()=>{var p=Je(m?f[o]:ne),g=Z(p);return g}),r.set(o,v)),v!==void 0){var d=c(v);return d===ne?void 0:d}return Reflect.get(f,o,u)},getOwnPropertyDescriptor(f,o){var u=Reflect.getOwnPropertyDescriptor(f,o);if(u&&"value"in u){var v=r.get(o);v&&(u.value=c(v))}else if(u===void 0){var m=r.get(o),d=m==null?void 0:m.v;if(m!==void 0&&d!==ne)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(f,o){var d;if(o===xr)return!0;var u=r.get(o),v=u!==void 0&&u.v!==ne||Reflect.has(f,o);if(u!==void 0||D!==null&&(!v||(d=er(f,o))!=null&&d.writable)){u===void 0&&(u=a(()=>{var _=v?Je(f[o]):ne,p=Z(_);return p}),r.set(o,u));var m=c(u);if(m===ne)return!1}return v},set(f,o,u,v){var T;var m=r.get(o),d=o in f;if(n&&o==="length")for(var _=u;_<m.v;_+=1){var p=r.get(_+"");p!==void 0?B(p,ne):_ in f&&(p=a(()=>Z(ne)),r.set(_+"",p))}if(m===void 0)(!d||(T=er(f,o))!=null&&T.writable)&&(m=a(()=>Z(void 0)),B(m,Je(u)),r.set(o,m));else{d=m.v!==ne;var g=a(()=>Je(u));B(m,g)}var h=Reflect.getOwnPropertyDescriptor(f,o);if(h!=null&&h.set&&h.set.call(v,u),!d){if(n&&typeof o=="string"){var w=r.get("length"),N=Number(o);Number.isInteger(N)&&N>=w.v&&B(w,N+1)}nr(i)}return!0},ownKeys(f){c(i);var o=Reflect.ownKeys(f).filter(m=>{var d=r.get(m);return d===void 0||d.v!==ne});for(var[u,v]of r)v.v!==ne&&!(u in f)&&o.push(u);return o},setPrototypeOf(){Qi()}})}var On,ai,oi,li;function Ds(){if(On===void 0){On=window,ai=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;oi=er(t,"firstChild").get,li=er(t,"nextSibling").get,kn(e)&&(e[en]=void 0,e[br]=null,e[Bi]=void 0,e.__e=void 0),kn(r)&&(r[Kt]=void 0)}}function Qe(e=""){return document.createTextNode(e)}function Ht(e){return oi.call(e)}function hr(e){return li.call(e)}function x(e,t){return Ht(e)}function fe(e,t=!1){{var r=Ht(e);return r instanceof Comment&&r.data===""?hr(r):r}}function P(e,t=1,r=!1){let n=e;for(;t--;)n=hr(n);return n}function Fs(e){e.textContent=""}function fi(){return!1}function Is(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function js(e){D===null&&(R===null&&Ki(),Gi()),at&&Wi()}function $s(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function et(e,t){var r=D;r!==null&&(r.f&de)!==0&&(e|=de);var n={ctx:oe,deps:null,nodes:null,f:e|te|Oe,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};E==null||E.register_created_effect(n);var i=n;if((e&It)!==0)Ot!==null?Ot.push(n):Et.ensure().schedule(n);else if(t!==null){try{Vt(n)}catch(a){throw ge(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&zt)===0&&(i=i.first,(e&Ie)!==0&&(e&xt)!==0&&i!==null&&(i.f|=xt))}if(i!==null&&(i.parent=r,r!==null&&$s(i,r),R!==null&&(R.f&se)!==0&&(e&Xe)===0)){var s=R;(s.effects??(s.effects=[])).push(i)}return n}function mn(){return R!==null&&!je}function ui(e){const t=et(jr,null);return G(t,ie),t.teardown=e,t}function wn(e){js();var t=D.f,r=!R&&(t&Ne)!==0&&oe!==null&&!oe.i;if(r){var n=oe;(n.e??(n.e=[])).push(e)}else return ci(e)}function ci(e){return et(It|Ui,e)}function Hs(e){Et.ensure();const t=et(Xe|zt,e);return(r={})=>new Promise(n=>{r.outro?wt(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Vs(e){return et(It,e)}function Us(e){return et(Ct|zt,e)}function yn(e,t=0){return et(jr|t,e)}function z(e,t=[],r=[],n=[]){Es(n,t,r,i=>{et(jr,()=>{e(...i.map(c))})})}function $r(e,t=0){var r=et(Ie|t,e);return r}function Ae(e){return et(Ne|zt,e)}function di(e){var t=e.teardown;if(t!==null){const r=at,n=R;Cn(!0),Re(null);try{t.call(null)}finally{Cn(r),Re(n)}}}function xn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Yt(()=>{i.abort(vr)});var n=r.next;(r.f&Xe)!==0?r.parent=null:ge(r,t),r=n}}function qs(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Ne)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&Vi)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Bs(e.nodes.start,e.nodes.end),r=!0),e.f|=Xr,xn(e,t&&!r),ir(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();di(e),e.f^=Xr,e.f|=Ce;var i=e.parent;i!==null&&i.first!==null&&vi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Bs(e,t){for(;e!==null;){var r=e===t?null:hr(e);e.remove(),e=r}}function vi(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function wt(e,t,r=!0){var n=[];hi(e,n,!0);var i=()=>{r&&ge(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var f of n)f.out(a)}else i()}function hi(e,t,r){if((e.f&de)===0){e.f^=de;var n=e.nodes&&e.nodes.t;if(n!==null)for(const f of n)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var s=i.next;if((i.f&Xe)===0){var a=(i.f&xt)!==0||(i.f&Ne)!==0&&(e.f&Ie)!==0;hi(i,t,a?r:!1)}i=s}}}function Lr(e){pi(e,!0)}function pi(e,t){if((e.f&de)!==0){e.f^=de,(e.f&ie)===0&&(G(e,te),Et.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&xt)!==0||(r.f&Ne)!==0;pi(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function bn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:hr(r);t.append(r),r=i}}let Ar=!1,at=!1;function Cn(e){at=e}let R=null,je=!1;function Re(e){R=e}let D=null;function ze(e){D=e}let Be=null;function _i(e){R!==null&&(Be??(Be=new Set)).add(e)}let _e=null,we=0,Ee=null;function zs(e){Ee=e}let gi=1,dt=0,yt=dt;function Mn(e){yt=e}function mi(){return++gi}function pr(e){var t=e.f;if((t&te)!==0)return!0;if(t&se&&(e.f&=~bt),(t&$e)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(pr(s)&&Jn(s),s.wv>e.wv)return!0}(t&Oe)!==0&&ae===null&&G(e,ie)}return!1}function wi(e,t,r=!0){var n=e.reactions;if(n!==null&&!(Be!==null&&Be.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&se)!==0?wi(s,t,!1):t===s&&(r?G(s,te):(s.f&ie)!==0&&G(s,$e),gn(s))}}function yi(e){var g;var t=_e,r=we,n=Ee,i=R,s=Be,a=oe,f=je,o=yt,u=e.f;_e=null,we=0,Ee=null,R=(u&(Ne|Xe))===0?e:null,Be=null,jt(e.ctx),je=!1,yt=++dt,e.ac!==null&&(Yt(()=>{e.ac.abort(vr)}),e.ac=null);try{e.f|=Mr;var v=e.fn,m=v();e.f|=Bt;var d=e.deps,_=E==null?void 0:E.is_fork;if(_e!==null){var p;if(_||ir(e,we),d!==null&&we>0)for(d.length=we+_e.length,p=0;p<_e.length;p++)d[we+p]=_e[p];else e.deps=d=_e;if(mn()&&(e.f&Oe)!==0)for(p=we;p<d.length;p++)((g=d[p]).reactions??(g.reactions=[])).push(e)}else!_&&d!==null&&we<d.length&&(ir(e,we),d.length=we);if(zn()&&Ee!==null&&!je&&d!==null&&(e.f&(se|$e|te))===0)for(p=0;p<Ee.length;p++)wi(Ee[p],e);if(i!==null&&i!==e){if(dt++,i.deps!==null)for(let h=0;h<r;h+=1)i.deps[h].rv=dt;if(t!==null)for(const h of t)h.rv=dt;Ee!==null&&(n===null?n=Ee:n.push(...Ee))}return(e.f&st)!==0&&(e.f^=st),m}catch(h){return Wn(h)}finally{e.f^=Mr,_e=t,we=r,Ee=n,R=i,Be=s,jt(a),je=f,yt=o}}function Ys(e,t){let r=t.reactions;if(r!==null){var n=Pi.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&se)!==0&&(_e===null||!Or.call(_e,t))){var s=t;(s.f&Oe)!==0&&(s.f^=Oe,s.f&=~bt),s.v!==ne&&vn(s),s.ac!==null&&Yt(()=>{s.ac.abort(vr),s.ac=null,G(s,te)}),Os(s),ir(s,0)}}function ir(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ys(e,r[n])}function Vt(e){var t=e.f;if((t&Ce)===0){G(e,ie);var r=D,n=Ar;D=e,Ar=(t&(Ne|Xe))===0;try{(t&(Ie|Hn))!==0?qs(e):xn(e),di(e);var i=yi(e);e.teardown=typeof i=="function"?i:null,e.wv=gi;var s;Fn&&cs&&(e.f&te)!==0&&e.deps}finally{Ar=n,D=r}}}async function Ws(){await Promise.resolve(),Ns()}function c(e){var t=e.f,r=(t&se)!==0;if(R!==null&&!je){var n=D!==null&&(D.f&Ce)!==0;if(!n&&(Be===null||!Be.has(e))){var i=R.deps;if((R.f&Mr)!==0)e.rv<dt&&(e.rv=dt,_e===null&&i!==null&&i[we]===e?we++:_e===null?_e=[e]:_e.push(e));else{R.deps??(R.deps=[]),Or.call(R.deps,e)||R.deps.push(e);var s=e.reactions;s===null?e.reactions=[R]:Or.call(s,R)||s.push(R)}}}if(at&&qe.has(e))return qe.get(e);if(r){var a=e;if(at){var f=a.v;return((a.f&ie)===0&&a.reactions!==null||bi(a))&&(f=pn(a)),qe.set(a,f),f}var o=(a.f&Oe)===0&&!je&&R!==null&&(Ar||(R.f&Oe)!==0),u=(a.f&Bt)===0;pr(a)&&(o&&(a.f|=Oe),Jn(a)),o&&!u&&(Qn(a),xi(a))}if(ae!=null&&ae.has(e))return ae.get(e);if((e.f&st)!==0)throw e.v;return e.v}function xi(e){if(e.f|=Oe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&se)!==0&&(t.f&Oe)===0&&(Qn(t),xi(t))}function bi(e){if(e.v===ne)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(qe.has(t)||(t.f&se)!==0&&bi(t))return!0;return!1}function _r(e){var t=je;try{return je=!0,e()}finally{je=t}}const Gs=["touchstart","touchmove"];function Ks(e){return Gs.includes(e)}const vt=Symbol("events"),Ei=new Set,fn=new Set;function Zs(e,t,r,n={}){function i(s){if(n.capture||un.call(t,s),!s.cancelBubble)return Yt(()=>r==null?void 0:r.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ze(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function wr(e,t,r,n,i){var s={capture:n,passive:i},a=Zs(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ui(()=>{t.removeEventListener(e,a,s)})}function Ut(e,t,r){(t[vt]??(t[vt]={}))[e]=r}function gr(e){for(var t=0;t<e.length;t++)Ei.add(e[t]);for(var r of fn)r(e)}let zr=null,Yr=!1;function un(e){var g,h;var t=this,r=t.ownerDocument,n=e.type,i=((g=e.composedPath)==null?void 0:g.call(e))||[],s=i[0]||e.target;zr=e,Yr||(Yr=!0,setTimeout(()=>{Yr=!1,zr=null}));var a=0,f=zr===e&&e[vt];if(f){var o=i.indexOf(f);if(o!==-1&&(t===document||t===window)){e[vt]=t;return}var u=i.indexOf(t);if(u===-1)return;o<=u&&(a=o)}if(s=i[a]||e.target,s!==t){Di(e,"currentTarget",{configurable:!0,get(){return s||r}});var v=R,m=D;Re(null),ze(null);try{for(var d,_=[];s!==null&&s!==t;){try{var p=(h=s[vt])==null?void 0:h[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(w){d?_.push(w):d=w}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let w of _)queueMicrotask(()=>{throw w});throw d}}finally{e[vt]=t,delete e.currentTarget,Re(v),ze(m)}}}var Pn;const Wr=((Pn=globalThis==null?void 0:globalThis.window)==null?void 0:Pn.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Js(e){return(Wr==null?void 0:Wr.createHTML(e))??e}function ki(e){var t=Is("template");return t.innerHTML=Js(e.replaceAll("<!>","<!---->")),t.content}function sr(e,t){var r=D;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var r=(t&ss)!==0,n=(t&as)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=ki(s?e:"<!>"+e),r||(i=Ht(i)));var a=n||ai?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=Ht(a),o=a.lastChild;sr(f,o)}else sr(a,a);return a}}function Qs(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,s;return()=>{if(!s){var a=ki(i),f=Ht(a);s=Ht(f)}var o=s.cloneNode(!0);return sr(o,o),o}}function Si(e,t){return Qs(e,t,"svg")}function Xs(e=""){{var t=Qe(e+"");return sr(t,t),t}}function ot(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Qe();return e.append(t,r),sr(t,r),e}function S(e,t){e!==null&&e.before(t)}function $(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Kt]??(e[Kt]=e.nodeValue))&&(e[Kt]=r,e.nodeValue=`${r}`)}function ea(e,t){return ta(e,t)}const yr=new Map;function ta(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:f}){Ds();var o=void 0,u=Hs(()=>{var v=r??t.appendChild(Qe());ms(v,{pending:()=>{}},_=>{lt({});var p=oe;s&&(p.c=s),i&&(n.$$events=i),o=e(_,n)||{},ft()},f);var m=new Set,d=_=>{for(var p=0;p<_.length;p++){var g=_[p];if(!m.has(g)){m.add(g);var h=Ks(g);for(const T of[t,document]){var w=yr.get(T);w===void 0&&(w=new Map,yr.set(T,w));var N=w.get(g);N===void 0?(T.addEventListener(g,un,{passive:h}),w.set(g,1)):w.set(g,N+1)}}}};return d(Ir(Ei)),fn.add(d),()=>{var h;for(var _ of m)for(const w of[t,document]){var p=yr.get(w),g=p.get(_);--g==0?(w.removeEventListener(_,un),p.delete(_),p.size===0&&yr.delete(w)):p.set(_,g)}fn.delete(d),v!==r&&((h=v.parentNode)==null||h.removeChild(v))}});return ra.set(o,u),o}let ra=new WeakMap;var Fe,Ve,xe,mt,ur,cr,Fr;class Ti{constructor(t,r=!0){me(this,"anchor");M(this,Fe,new Map);M(this,Ve,new Map);M(this,xe,new Map);M(this,mt,new Set);M(this,ur,!0);M(this,cr,t=>{if(l(this,Fe).has(t)){var r=l(this,Fe).get(t),n=l(this,Ve).get(r);if(n)Lr(n),l(this,mt).delete(r);else{var i=l(this,xe).get(r);i&&(Lr(i.effect),l(this,Ve).set(r,i.effect),l(this,xe).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of l(this,Fe)){if(l(this,Fe).delete(s),s===t)break;const f=l(this,xe).get(a);f&&(ge(f.effect),l(this,xe).delete(a))}for(const[s,a]of l(this,Ve)){if(s===r||l(this,mt).has(s))continue;const f=()=>{if(Array.from(l(this,Fe).values()).includes(s)){var u=document.createDocumentFragment();bn(a,u),u.append(Qe()),l(this,xe).set(s,{effect:a,fragment:u})}else ge(a);l(this,mt).delete(s),l(this,Ve).delete(s)};l(this,ur)||!n?(l(this,mt).add(s),wt(a,f,!1)):f()}}});M(this,Fr,t=>{l(this,Fe).delete(t);const r=Array.from(l(this,Fe).values());for(const[n,i]of l(this,xe))r.includes(n)||(ge(i.effect),l(this,xe).delete(n))});this.anchor=t,C(this,ur,r)}ensure(t,r){var n=E,i=fi();if(r&&!l(this,Ve).has(t)&&!l(this,xe).has(t))if(i){var s=document.createDocumentFragment(),a=Qe();s.append(a),l(this,xe).set(t,{effect:Ae(()=>r(a)),fragment:s})}else l(this,Ve).set(t,Ae(()=>r(this.anchor)));if(l(this,Fe).set(n,t),i){for(const[f,o]of l(this,Ve))f===t?n.unskip_effect(o):n.skip_effect(o);for(const[f,o]of l(this,xe))f===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(l(this,cr)),n.ondiscard(l(this,Fr))}else l(this,cr).call(this,n)}}Fe=new WeakMap,Ve=new WeakMap,xe=new WeakMap,mt=new WeakMap,ur=new WeakMap,cr=new WeakMap,Fr=new WeakMap;function J(e,t,r=!1){var n=new Ti(e),i=r?xt:0;function s(a,f){n.ensure(a,f)}$r(()=>{var a=!1;t((f,o=0)=>{a=!0,s(o,f)}),a||s(-1,null)},i)}function ar(e,t){return t}function na(e,t,r){for(var n=[],i=t.length,s,a=t.length,f=0;f<i;f++){let m=t[f];wt(m,()=>{if(s){if(s.pending.delete(m),s.done.add(m),s.pending.size===0){var d=e.outrogroups;cn(e,Ir(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var o=n.length===0&&r!==null&&e.pending.size===0;if(o){var u=r,v=u.parentNode;Fs(v),v.append(u),e.items.clear()}cn(e,t,!o)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function cn(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const f of a)n.add(e.items.get(f).e)}for(var i=0;i<t.length;i++){var s=t[i];if(n!=null&&n.has(s)){s.f|=Ue;const a=document.createDocumentFragment();bn(s,a)}else ge(t[i],r)}}var Nn;function Me(e,t,r,n,i,s=null){var a=e,f=new Map,o=(t&Un)!==0;if(o){var u=e;a=u.appendChild(Qe())}var v=null,m=Ts(()=>{var T=r();return In(T)?T:T==null?[]:Ir(T)}),d,_=new Map,p=!0;function g(T){(N.effect.f&Ce)===0&&(N.pending.delete(T),N.fallback=v,ia(N,d,a,t,n),v!==null&&(d.length===0?(v.f&Ue)===0?Lr(v):(v.f^=Ue,Xt(v,null,a)):wt(v,()=>{v=null})))}function h(T){N.pending.delete(T)}var w=$r(()=>{d=c(m);for(var T=d.length,A=new Set,L=E,U=fi(),H=0;H<T;H+=1){var q=d[H],y=n(q,H),k=p?null:f.get(y);k?(k.v&&$t(k.v,q),k.i&&$t(k.i,H),U&&L.unskip_effect(k.e)):(k=sa(f,p?a:Nn??(Nn=Qe()),q,y,H,i,t,r),p||(k.e.f|=Ue),f.set(y,k)),A.add(y)}if(T===0&&s&&!v&&(p?v=Ae(()=>s(a)):(v=Ae(()=>s(Nn??(Nn=Qe()))),v.f|=Ue)),T>A.size&&Yi(),!p)if(_.set(L,A),U){for(const[j,W]of f)A.has(j)||L.skip_effect(W.e);L.oncommit(g),L.ondiscard(h)}else g(L);c(m)}),N={effect:w,items:f,pending:_,outrogroups:null,fallback:v};p=!1}function Gt(e){for(;e!==null&&(e.f&Ne)===0;)e=e.next;return e}function ia(e,t,r,n,i){var k,j,W,ue,be,K,Q,le,Le;var s=(n&ns)!==0,a=t.length,f=e.items,o=Gt(e.effect.first),u,v=null,m,d=[],_=[],p,g,h,w;if(s)for(w=0;w<a;w+=1)p=t[w],g=i(p,w),h=f.get(g).e,(h.f&Ue)===0&&((j=(k=h.nodes)==null?void 0:k.a)==null||j.measure(),(m??(m=new Set)).add(h));for(w=0;w<a;w+=1){if(p=t[w],g=i(p,w),h=f.get(g).e,e.outrogroups!==null)for(const ve of e.outrogroups)ve.pending.delete(h),ve.done.delete(h);if((h.f&de)!==0&&(Lr(h),s&&((ue=(W=h.nodes)==null?void 0:W.a)==null||ue.unfix(),(m??(m=new Set)).delete(h))),(h.f&Ue)!==0)if(h.f^=Ue,h===o)Xt(h,null,r);else{var N=v?v.next:o;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),tt(e,v,h),tt(e,h,N),Xt(h,N,r),v=h,d=[],_=[],o=Gt(v.next);continue}if(h!==o){if(u!==void 0&&u.has(h)){if(d.length<_.length){var T=_[0],A;v=T.prev;var L=d[0],U=d[d.length-1];for(A=0;A<d.length;A+=1)Xt(d[A],T,r);for(A=0;A<_.length;A+=1)u.delete(_[A]);tt(e,L.prev,U.next),tt(e,v,L),tt(e,U,T),o=T,v=U,w-=1,d=[],_=[]}else u.delete(h),Xt(h,o,r),tt(e,h.prev,h.next),tt(e,h,v===null?e.effect.first:v.next),tt(e,v,h),v=h;continue}for(d=[],_=[];o!==null&&o!==h;)(u??(u=new Set)).add(o),_.push(o),o=Gt(o.next);if(o===null)continue}(h.f&Ue)===0&&d.push(h),v=h,o=Gt(h.next)}if(e.outrogroups!==null){for(const ve of e.outrogroups)ve.pending.size===0&&(cn(e,Ir(ve.done)),(be=e.outrogroups)==null||be.delete(ve));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||u!==void 0){var H=[];if(u!==void 0)for(h of u)(h.f&de)===0&&H.push(h);for(;o!==null;)(o.f&de)===0&&o!==e.fallback&&H.push(o),o=Gt(o.next);var q=H.length;if(q>0){var y=(n&Un)!==0&&a===0?r:null;if(s){for(w=0;w<q;w+=1)(Q=(K=H[w].nodes)==null?void 0:K.a)==null||Q.measure();for(w=0;w<q;w+=1)(Le=(le=H[w].nodes)==null?void 0:le.a)==null||Le.fix()}na(e,H,y)}}s&&Ze(()=>{var ve,St;if(m!==void 0)for(h of m)(St=(ve=h.nodes)==null?void 0:ve.a)==null||St.apply()})}function sa(e,t,r,n,i,s,a,f){var o=(a&ts)!==0?(a&is)===0?Ls(r,!1,!1):kt(r):null,u=(a&rs)!==0?kt(i):null;return{v:o,i:u,e:Ae(()=>(s(t,o??r,u??i,f),()=>{e.delete(n)}))}}function Xt(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&Ue)===0?t.nodes.start:r;n!==null;){var a=hr(n);if(s.before(n),n===i)return;n=a}}function tt(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function aa(e,t,r){var n=new Ti(e);$r(()=>{var i=t()??null;n.ensure(i,i&&(s=>r(s,i)))},xt)}function Ai(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Ai(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oa(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Ai(e))&&(n&&(n+=" "),n+=t);return n}function la(e){return typeof e=="object"?oa(e):e??""}function fa(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function qt(e,t,r,n,i,s){var a=e[en];if(a!==r||a===void 0){var f=fa(r);f==null?e.removeAttribute("class"):e.className=f,e[en]=r}return s}const ua=Symbol("is custom element"),ca=Symbol("is html");function ut(e,t,r,n){var i=da(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[qi]=r),r==null?e.removeAttribute(t):typeof r!="string"&&va(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function da(e){return e[br]??(e[br]={[ua]:e.nodeName.includes("-"),[ca]:e.namespaceURI===os})}var Rn=new Map;function va(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Fi(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=jn(i)}return r}function ha(e,t,r=t){var n=new WeakSet;ps(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Gr(e)?Kr(s):s,r(s),E!==null&&n.add(E),await Ws(),s!==(s=t())){var a=e.selectionStart,f=e.selectionEnd,o=e.value.length;if(e.value=s??"",f!==null){var u=e.value.length;a===f&&f===o&&u>o?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(f,u))}}}),_r(t)==null&&e.value&&(r(Gr(e)?Kr(e.value):e.value),E!==null&&n.add(E)),yn(()=>{var i=t();if(e===document.activeElement){var s=E;if(n.has(s))return}Gr(e)&&i===Kr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Gr(e){var t=e.type;return t==="number"||t==="range"}function Kr(e){return e===""?null:+e}function Zr(e,t){return e===t||(e==null?void 0:e[xr])===t}function pa(e={},t,r,n){var i=oe.r,s=D;return Vs(()=>{var a,f;return yn(()=>{a=f,f=[],_r(()=>{Zr(r(...f),e)||(t(e,...f),a&&Zr(r(...a),e)&&t(null,...a))})}),()=>{let o=s;for(;o!==i&&o.parent!==null&&o.parent.f&Xr;)o=o.parent;const u=()=>{f&&Zr(r(...f),e)&&t(null,...f)},v=o.teardown;o.teardown=()=>{u(),v==null||v()}}}),e}function _a(e){oe===null&&Vn(),wn(()=>{const t=_r(e);if(typeof t=="function")return t})}function ga(e){oe===null&&Vn(),_a(()=>()=>_r(e))}const ma="5";var Dn;typeof window<"u"&&((Dn=window.__svelte??(window.__svelte={})).v??(Dn.v=new Set)).add(ma);async function Wt(e){const t=await fetch(e);if(!t.ok)throw new Error(`${e}: HTTP ${t.status}`);return t.json()}const wa=()=>Wt("/api/network"),ya=()=>Wt("/api/health"),xa=()=>Wt("/api/provenance"),ba=()=>Wt("/api/logs"),Ea=e=>new EventSource(`/api/logs/${e}`),ka=()=>Wt("/api/actions");async function Sa(e,t){const r=`chain=${encodeURIComponent(e)}`,n=t instanceof File?await fetch(`/api/actions/upgrade?${r}`,{method:"POST",body:t}):await fetch(`/api/actions/upgrade?${r}&path=${encodeURIComponent(t.path)}`,{method:"POST"});if(n.status===409)throw new Error("another action is still running");if(!n.ok){const s=await n.json().catch(()=>null);throw new Error((s==null?void 0:s.error)??`upgrade rejected: HTTP ${n.status}`)}const{events:i}=await n.json();return i}const Ta=()=>Wt("/api/addresses"),ee=Je({model:null,health:{},provenance:null,actions:null,error:null});async function Aa(){try{ee.model=await wa(),ee.provenance=await xa().catch(()=>null),ee.actions=await ka().catch(()=>null),await Ln(),setInterval(Ln,5e3)}catch(e){ee.error=e.message}}async function Ln(){try{const e=await ya();ee.health=Object.fromEntries(e.map(t=>[t.id,t]))}catch{}}var Oa=F(`<div role="region"><div class="mb-2">Drop the runtime for <span class="font-medium text-fg-primary"> </span> here, pick a file,
2
- or give a path on this machine (e.g. a runtime repo's <code class="font-mono">target/release/wbuild/…/*.compact.compressed.wasm</code>):</div> <div class="flex flex-wrap items-center gap-2"><input type="file" accept=".wasm" class="text-xs"/> <form class="flex min-w-0 flex-1 gap-2"><input type="text" placeholder="/path/to/runtime.compact.compressed.wasm" class="min-w-0 flex-1 rounded-medium bg-surface-container px-2.5 py-1.5 font-mono text-xs text-fg-primary placeholder:text-fg-tertiary"/> <button type="submit" class="cursor-pointer rounded-medium bg-surface-container px-3 py-1.5 text-xs font-medium text-fg-secondary transition-colors hover:text-fg-primary">upgrade</button></form></div></div>`),Ca=F("<div> </div>"),Ma=F('<div class="mt-1.5 text-xs font-medium text-status-ok">Upgrade applied.</div>'),Na=F('<div class="mt-1.5 text-xs font-medium text-status-err">Upgrade failed — the log above says why.</div>'),Ra=F('<div class="max-h-48 overflow-auto whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-fg-secondary"></div> <!>',1),La=F('<div class="mt-1 rounded-nested bg-surface-nested p-3"><!></div>');function Pa(e,t){lt(t,!0);let r=Z(Je([])),n=Z("idle"),i=Z(""),s=Z(!1);async function a(p){B(n,"running"),B(r,[],!0);try{const g=await Sa(t.chain,p),h=new EventSource(g);h.onmessage=w=>c(r).push(w.data),h.addEventListener("done",w=>{B(n,w.data==="ok"?"ok":"error",!0),h.close()})}catch(g){B(n,"error"),c(r).push(g.message)}}function f(p){var h;const g=(h=p.target.files)==null?void 0:h[0];g&&a(g)}function o(p){var h,w;p.preventDefault(),B(s,!1);const g=(w=(h=p.dataTransfer)==null?void 0:h.files)==null?void 0:w[0];g&&a(g)}function u(p){p.preventDefault(),c(i).trim()&&a({path:c(i).trim()})}var v=La(),m=x(v);{var d=p=>{var g=Oa(),h=x(g),w=P(x(h)),N=x(w),T=P(h,2),A=x(T),L=P(A,2),U=x(L),H=P(U,2);z(q=>{qt(g,1,`rounded-medium border border-dashed p-3 text-xs transition-colors
3
- ${c(s)?"border-fg-secondary text-fg-primary":"border-divider text-fg-secondary"}`),$(N,t.chain),H.disabled=q},[()=>!c(i).trim()]),wr("dragover",g,q=>{q.preventDefault(),B(s,!0)}),wr("dragleave",g,()=>B(s,!1)),wr("drop",g,o),Ut("change",A,f),wr("submit",L,u),ha(U,()=>c(i),q=>B(i,q)),S(p,g)},_=p=>{var g=Ra(),h=fe(g);Me(h,21,()=>c(r),ar,(A,L)=>{var U=Ca(),H=x(U);z(()=>$(H,c(L))),S(A,U)});var w=P(h,2);{var N=A=>{var L=Ma();S(A,L)},T=A=>{var L=Na();S(A,L)};J(w,A=>{c(n)==="ok"?A(N):c(n)==="error"&&A(T,1)})}S(p,g)};J(m,p=>{c(n)==="idle"?p(d):p(_,-1)})}S(e,v),ft()}gr(["change"]);var Da=F('<a class="inline-flex items-center gap-1 text-sm font-medium text-fg-primary underline-offset-3 hover:underline" target="_blank" rel="noreferrer"> <svg class="h-3 w-3 text-fg-tertiary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>'),Fa=F('<span class="text-sm font-medium text-fg-primary"> </span>'),Ia=Si('<svg class="h-3.5 w-3.5 text-status-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"></path></svg>'),ja=Si('<svg class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>'),$a=F('<span class="text-status-err">down</span>'),Ha=F('<code class="font-mono text-fg-secondary"> </code>'),Va=F('<code class="font-mono"> </code>'),Ua=F('<a class="text-xs text-fg-link underline underline-offset-3 hover:text-fg-primary" target="_blank" rel="noreferrer"> </a>'),qa=F('<button class="cursor-pointer rounded-medium bg-surface-nested px-2.5 py-1 text-xs font-medium text-fg-secondary transition-colors hover:bg-selection-hover hover:text-fg-primary">runtime-upgrade</button>'),Ba=F('<div class="col-span-7 pb-3 pl-6"><!></div>'),za=F('<div class="col-span-7 grid grid-cols-subgrid items-center border-b border-divider py-2.5 last:border-0"><span></span> <!> <span class="inline-flex min-w-0 items-center gap-1.5"><code class="truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer rounded p-0.5 text-fg-tertiary transition-colors hover:text-fg-primary" title="copy"><!></button></span> <span class="text-right text-xs tabular-nums text-fg-tertiary"><!></span> <span class="inline-flex items-center gap-2 text-xs text-fg-tertiary"><!> <!></span> <span></span> <span class="inline-flex items-center justify-end gap-3"><!> <!></span> <!></div>');function Ya(e,t){lt(t,!0);const r=X(()=>ee.health[t.entry.id]),n=X(()=>t.entry.id==="relay-alice"?"relay":!t.entry.id.startsWith("relay-")&&"paraId"in t.entry?t.entry.id:null),i=X(()=>{var b;return(((b=ee.actions)==null?void 0:b.enabled)??!1)&&c(n)!==null}),s=X(()=>t.entry.protocol==="ws"?t.entry.links.pjs??null:t.entry.url),a=X(()=>{var b;return(b=c(r))!=null&&b.runtime?`${c(r).runtime.specName}/${c(r).runtime.specVersion}`:null}),f=X(()=>{var b,O;return((O=(b=c(r))==null?void 0:b.clientVersion)==null?void 0:O.split("-")[0])??null});let o=Z(!1),u=Z(!1);async function v(){await navigator.clipboard.writeText(t.entry.url),B(o,!0),setTimeout(()=>B(o,!1),1200)}var m=za(),d=x(m),_=P(d,2);{var p=b=>{var O=Da(),re=x(O);z(()=>{ut(O,"href",c(s)),ut(O,"title",t.entry.protocol==="ws"?"open in polkadot.js Apps":"open"),$(re,`${t.entry.label??""} `)}),S(b,O)},g=b=>{var O=Fa(),re=x(O);z(()=>$(re,t.entry.label)),S(b,O)};J(_,b=>{c(s)?b(p):b(g,-1)})}var h=P(_,2),w=x(h),N=x(w),T=P(w,2),A=x(T);{var L=b=>{var O=Ia();S(b,O)},U=b=>{var O=ja();S(b,O)};J(A,b=>{c(o)?b(L):b(U,-1)})}var H=P(h,2),q=x(H);{var y=b=>{var O=Xs();z(re=>$(O,`#${re??""}`),[()=>c(r).block.toLocaleString()]),S(b,O)},k=b=>{var O=$a();S(b,O)};J(q,b=>{var O,re;((O=c(r))==null?void 0:O.status)==="ok"&&c(r).block!==void 0?b(y):((re=c(r))==null?void 0:re.status)==="down"&&b(k,1)})}var j=P(H,2),W=x(j);{var ue=b=>{var O=Ha(),re=x(O);z(()=>{ut(O,"title",`runtime ${c(r).runtime.specName??""} spec ${c(r).runtime.specVersion??""}, impl ${c(r).runtime.implVersion??""}, tx ${c(r).runtime.transactionVersion??""}`),$(re,c(a))}),S(b,O)};J(W,b=>{c(a)&&b(ue)})}var be=P(W,2);{var K=b=>{var O=Va(),re=x(O);z(()=>{ut(O,"title",`node binary ${c(r).clientVersion??""}`),$(re,c(f))}),S(b,O)};J(be,b=>{c(f)&&b(K)})}var Q=P(j,4),le=x(Q);Me(le,17,()=>Object.entries(t.entry.links??{}),ar,(b,O)=>{var re=X(()=>dr(c(O),2));let Hr=()=>c(re)[0],Mi=()=>c(re)[1];var Vr=Ua(),Ni=x(Vr);z(()=>{ut(Vr,"href",Mi()),$(Ni,Hr())}),S(b,Vr)});var Le=P(le,2);{var ve=b=>{var O=qa();Ut("click",O,()=>B(u,!c(u))),S(b,O)};J(Le,b=>{c(i)&&b(ve)})}var St=P(Q,2);{var mr=b=>{var O=Ba(),re=x(O);Pa(re,{get chain(){return c(n)}}),S(b,O)};J(St,b=>{c(u)&&c(i)&&b(mr)})}z(()=>{var b,O;qt(d,1,`h-2 w-2 rounded-full
4
- ${((b=c(r))==null?void 0:b.status)==="ok"?"bg-status-ok":((O=c(r))==null?void 0:O.status)==="down"?"bg-status-err":"bg-fg-tertiary"}`),ut(w,"title",t.entry.url),$(N,t.entry.url)}),Ut("click",T,v),S(e,m),ft()}gr(["click"]);var Wa=F('<div class="flex items-center gap-3 border-b border-divider px-4 py-2.5 last:border-0"><span class="w-64 shrink-0 truncate text-sm font-medium text-fg-primary"> </span> <code class="min-w-0 flex-1 truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer text-xs text-fg-tertiary transition-colors hover:text-fg-primary"> </button></div>'),Ga=F('<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary">DotNS contracts on Asset Hub</h2> <div class="overflow-hidden rounded-container bg-surface-container shadow-1"></div>',1),Ka=F('<div class="p-8 text-center text-fg-tertiary">No DotNS address manifest in this workspace — `ppn fetch` downloads it for genesis networks.</div>');function Za(e,t){lt(t,!0);let r=Z(null),n=Z(null);Ta().then(u=>B(r,u,!0));async function i(u){await navigator.clipboard.writeText(u),B(n,u,!0),setTimeout(()=>B(n,null),1200)}var s=ot(),a=fe(s);{var f=u=>{var v=Ga(),m=P(fe(v),2);Me(m,21,()=>Object.entries(c(r).dotns),([d,_])=>d,(d,_)=>{var p=X(()=>dr(c(_),2));let g=()=>c(p)[0],h=()=>c(p)[1];var w=Wa(),N=x(w),T=x(N),A=P(N,2),L=x(A),U=P(A,2),H=x(U);z(()=>{$(T,g()),$(L,h()),$(H,c(n)===h()?"copied":"copy")}),Ut("click",U,()=>i(h())),S(d,w)}),S(u,v)},o=u=>{var v=Ka();S(u,v)};J(a,u=>{var v;(v=c(r))!=null&&v.dotns?u(f):c(r)&&u(o,1)})}S(e,s),ft()}gr(["click"]);var Ja=F(`<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary"> </h2> <div class="grid grid-cols-[0.6rem_max-content_minmax(0,max-content)_max-content_max-content_1fr_max-content]
5
- items-center gap-x-5 overflow-hidden rounded-container bg-surface-container px-4 shadow-1"></div>`,1),Qa=F("<!> <!>",1);function Xa(e,t){lt(t,!0);const r=X(()=>{var u;return((u=ee.model)==null?void 0:u.chains.filter(v=>v.paraId===null))??[]}),n=X(()=>{var u;return((u=ee.model)==null?void 0:u.chains.filter(v=>v.paraId!==null))??[]}),i=X(()=>ee.model?[["Relay",c(r)],["Parachains",c(n)],["Services",ee.model.services]]:[]);var s=Qa(),a=fe(s);{var f=u=>{var v=ot(),m=fe(v);Me(m,17,()=>c(i),([d,_])=>d,(d,_)=>{var p=X(()=>dr(c(_),2));let g=()=>c(p)[0],h=()=>c(p)[1];var w=ot(),N=fe(w);{var T=A=>{var L=Ja(),U=fe(L),H=x(U),q=P(U,2);Me(q,21,h,y=>y.id,(y,k)=>{Ya(y,{get entry(){return c(k)}})}),z(()=>$(H,g())),S(A,L)};J(N,A=>{h().length&&A(T)})}S(d,w)}),S(u,v)};J(a,u=>{ee.model&&u(f)})}var o=P(a,2);Za(o,{}),S(e,s),ft()}var eo=F('<div class="p-8 text-center text-fg-tertiary">No provenance stamp — run `ppn fetch` from a version that writes one.</div>'),to=F('<th class="px-3 py-1.5 text-left font-medium text-fg-tertiary"> </th>'),ro=F('<tr class="odd:bg-surface-nested"><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5"><code class="font-mono text-xs text-fg-secondary"> </code></td><td class="px-3 py-1.5"><code> </code></td><td class="px-3 py-1.5 font-mono text-xs text-fg-secondary"> </td><td class="px-3 py-1.5 font-mono text-xs text-fg-tertiary"> </td></tr>'),no=F('<h2 class="mb-3 mt-7 text-[15px] font-semibold leading-tight text-fg-secondary"> </h2> <div class="overflow-x-auto rounded-container bg-surface-container shadow-1"><table class="w-full border-collapse text-[13px]"><thead><tr></tr></thead><tbody></tbody></table></div>',1);function io(e,t){lt(t,!0);const r=X(()=>{var o;return((o=ee.provenance)==null?void 0:o.provenance)??null}),n=X(()=>c(r)?[["Node binaries",c(r).binaries??[]],["Runtimes",c(r).runtimes??[]],["Toolchain",c(r).toolchain??[]]].filter(([,o])=>o.length>0):[]);var i=ot(),s=fe(i);{var a=o=>{var u=eo();S(o,u)},f=o=>{var u=ot(),v=fe(u);Me(v,17,()=>c(n),([m,d])=>m,(m,d)=>{var _=X(()=>dr(c(d),2));let p=()=>c(_)[0],g=()=>c(_)[1];var h=no(),w=fe(h),N=x(w),T=P(w,2),A=x(T),L=x(A),U=x(L);Me(U,20,()=>["name","source","pinned","resolved","version","sha256"],ar,(q,y)=>{var k=to(),j=x(k);z(()=>$(j,y)),S(q,k)});var H=P(L);Me(H,21,g,q=>q.name,(q,y)=>{var k=ro(),j=x(k),W=x(j),ue=P(j),be=x(ue),K=P(ue),Q=x(K),le=x(Q),Le=P(K),ve=x(Le),St=x(ve),mr=P(Le),b=x(mr),O=P(mr),re=x(O);z(Hr=>{$(W,c(y).name),$(be,c(y).repo),$(le,c(y).pinned),qt(ve,1,`font-mono text-xs ${c(y).pinned!==c(y).resolved?"font-medium text-fg-primary":"text-fg-secondary"}`),$(St,c(y).resolved),$(b,c(y).version??"—"),ut(O,"title",c(y).sha256),$(re,`${Hr??""}…`)},[()=>c(y).sha256.slice(0,16)]),S(q,k)}),z(()=>$(N,p())),S(m,h)}),S(o,u)};J(s,o=>{c(r)?o(f,-1):o(a)})}S(e,i),ft()}function Oi(e){return e.replace(/^#\/?/,"").split("/")}function so(e,t,r){const n=Oi(e)[0];return t.includes(n)?n:r}function ao(e){const t=Oi(e);if(t[0]!=="logs"||!t[1])return null;try{return decodeURIComponent(t[1])}catch{return null}}function Ci(e,t){return t?`#${e}/${encodeURIComponent(t)}`:`#${e}`}var oo=F('<div class="p-8 text-center text-fg-tertiary">No logs yet — is the network running?</div>'),lo=F("<button> </button>"),fo=F('<div class="px-3 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-tertiary"> </div> <!>',1),uo=F("<div> </div>"),co=F('<div class="grid min-h-[60vh] grid-cols-[260px_1fr] gap-3"><div class="max-h-[75vh] overflow-y-auto rounded-container bg-surface-container p-2 shadow-1"></div> <div class="max-h-[75vh] overflow-auto whitespace-pre-wrap break-all rounded-container bg-surface-container p-3.5 font-mono text-xs leading-relaxed text-fg-secondary shadow-1"></div></div>');function vo(e,t){lt(t,!0);let r=Z(null),n=Z(null),i=Z(Je([])),s=Z(null),a=null;const f=()=>ao(location.hash);ba().then(p=>{B(r,p,!0);const g=[...p.chains,...p.services,...p.scripts],h=f(),w=(h&&g.includes(h)?h:null)??g[0];w&&o(w)}),wn(()=>{const p=()=>{const g=f();g&&g!==c(n)&&c(r)&&[...c(r).chains,...c(r).services,...c(r).scripts].includes(g)&&o(g)};return window.addEventListener("hashchange",p),()=>window.removeEventListener("hashchange",p)});function o(p){B(n,p,!0);const g=Ci("logs",p);location.hash!==g&&history.replaceState(null,"",g),B(i,[],!0),a==null||a.close(),a=Ea(p),a.onmessage=h=>{const w=/error|panic|fatal/i.test(h.data)?"e":/warn/i.test(h.data)?"w":"",N=c(s)&&c(s).scrollTop+c(s).clientHeight>=c(s).scrollHeight-40;c(i).push({text:h.data,sev:w}),c(i).length>2e3&&c(i).splice(0,c(i).length-2e3),N&&requestAnimationFrame(()=>c(s)&&(c(s).scrollTop=c(s).scrollHeight))}}ga(()=>a==null?void 0:a.close());const u=X(()=>c(r)?[["Chains",c(r).chains],["Services",c(r).services],["One-off scripts",c(r).scripts]]:[]);var v=ot(),m=fe(v);{var d=p=>{var g=oo();S(p,g)},_=p=>{var g=co(),h=x(g);Me(h,21,()=>c(u),ar,(N,T)=>{var A=X(()=>dr(c(T),2));let L=()=>c(A)[0],U=()=>c(A)[1];var H=ot(),q=fe(H);{var y=k=>{var j=fo(),W=fe(j),ue=x(W),be=P(W,2);Me(be,16,U,K=>K,(K,Q)=>{var le=lo(),Le=x(le);z(()=>{qt(le,1,`block w-full cursor-pointer rounded-medium px-3 py-1.5 text-left text-[13px] transition-colors
6
- ${Q===c(n)?"bg-surface-nested font-medium text-fg-primary":"text-fg-secondary hover:bg-selection-hover"}`),$(Le,Q)}),Ut("click",le,()=>o(Q)),S(K,le)}),z(()=>$(ue,L())),S(k,j)};J(q,k=>{U().length&&k(y)})}S(N,H)});var w=P(h,2);Me(w,21,()=>c(i),ar,(N,T)=>{var A=uo(),L=x(A);z(()=>{qt(A,1,la(c(T).sev==="e"?"text-status-err":c(T).sev==="w"?"text-status-warn":"")),$(L,c(T).text)}),S(N,A)}),pa(w,N=>B(s,N),()=>c(s)),S(p,g)};J(m,p=>{c(r)&&!c(r).chains.length&&!c(r).services.length&&!c(r).scripts.length?p(d):c(r)&&p(_,1)})}S(e,v),ft()}gr(["click"]);var Jr=F("<span> </span>"),ho=F('<span class="rounded-full bg-surface-nested px-2.5 py-0.5 text-xs font-medium text-fg-secondary"> </span> <!>',1),po=F("<span> </span> <!>",1),_o=F("<button> </button>"),go=F('<div class="p-8 text-center text-fg-tertiary"> </div>'),mo=F('<div class="mx-auto max-w-[1200px] bg-surface-main px-4 py-8 font-sans text-fg-primary sm:px-12"><header class="mb-8"><h1 class="text-[22px] font-semibold leading-tight"> </h1> <div class="mt-1.5 flex flex-wrap gap-4 text-[13px] text-fg-tertiary"><!> <!> <!></div></header> <nav class="mb-6 flex gap-1"></nav> <!></div>');function wo(e,t){lt(t,!0);const r={overview:Xa,provenance:io,logs:vo},n=Object.keys(r),i=()=>so(location.hash,n,"overview");let s=Z(Je(i()));const a=X(()=>r[c(s)]);function f(y){location.hash=Ci(y)}wn(()=>{const y=()=>B(s,i(),!0);return window.addEventListener("hashchange",y),()=>window.removeEventListener("hashchange",y)});const o=X(()=>{var y;return((y=ee.provenance)==null?void 0:y.spawn)??null}),u=X(()=>{var y,k;return((k=(y=ee.provenance)==null?void 0:y.provenance)==null?void 0:k.fetchedAt)??null});Aa();var v=mo(),m=x(v),d=x(m),_=x(d),p=P(d,2),g=x(p);{var h=y=>{var k=ho(),j=fe(k),W=x(j),ue=P(j,2);{var be=K=>{var Q=Jr(),le=x(Q);z(Le=>$(le,`bitten ${Le??""} from ${new URL(c(o).bite.source).host??""}`),[()=>new Date(c(o).bite.at).toLocaleString()]),S(K,Q)};J(ue,K=>{var Q;(Q=c(o))!=null&&Q.bite&&K(be)})}z(()=>$(W,c(o)?c(o).mode:ee.model.network.genesis?"genesis":"fork-only")),S(y,k)};J(g,y=>{(c(o)||ee.model)&&y(h)})}var w=P(g,2);{var N=y=>{var k=po(),j=fe(k),W=x(j),ue=P(j,2);{var be=K=>{var Q=Jr(),le=x(Q);z(()=>$(le,`ppn ${c(o).ppnVersion??""}`)),S(K,Q)};J(ue,K=>{c(o).ppnVersion&&K(be)})}z(K=>$(W,`spawned ${K??""}`),[()=>new Date(c(o).spawnedAt).toLocaleString()]),S(y,k)};J(w,y=>{c(o)&&y(N)})}var T=P(w,2);{var A=y=>{var k=Jr(),j=x(k);z(W=>$(j,`artifacts fetched ${W??""}`),[()=>new Date(c(u)).toLocaleString()]),S(y,k)};J(T,y=>{c(u)&&y(A)})}var L=P(m,2);Me(L,20,()=>Object.keys(r),y=>y,(y,k)=>{var j=_o(),W=x(j);z(()=>{qt(j,1,`cursor-pointer rounded-t-lg border-b-2 px-3.5 py-2 text-sm font-medium transition-colors
7
- ${c(s)===k?"border-fg-primary text-fg-primary":"border-transparent text-fg-secondary hover:text-fg-primary"}`),$(W,k)}),Ut("click",j,()=>f(k)),S(y,j)});var U=P(L,2);{var H=y=>{var k=go(),j=x(k);z(()=>$(j,`Cannot reach the dashboard API: ${ee.error??""}`)),S(y,k)},q=y=>{var k=ot(),j=fe(k);aa(j,()=>c(a),(W,ue)=>{ue(W,{})}),S(y,k)};J(U,y=>{ee.error?y(H):y(q,-1)})}z(()=>{var y;return $(_,((y=ee.model)==null?void 0:y.network.displayName)??"Product Preview Network")}),S(e,v),ft()}gr(["click"]);ea(wo,{target:document.getElementById("app")});