lula2 0.3.5 → 0.4.0-nightly.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_app/immutable/chunks/AMsv4DTs.js +1 -0
- package/dist/_app/immutable/chunks/B8sFn9qB.js +2 -0
- package/dist/_app/immutable/chunks/{DFJv6ofC.js → C3_XvBfw.js} +1 -1
- package/dist/_app/immutable/chunks/{FmbgKjwB.js → C3vRXKjP.js} +34 -34
- package/dist/_app/immutable/chunks/{DknPZycG.js → D6AXzSy_.js} +1 -1
- package/dist/_app/immutable/chunks/{vNis_B2V.js → DL7cUWpq.js} +1 -1
- package/dist/_app/immutable/chunks/{BkFSJLu9.js → DPYPcVpy.js} +1 -1
- package/dist/_app/immutable/chunks/{CzIDw1HQ.js → d2wclEM1.js} +2 -2
- package/dist/_app/immutable/chunks/xZlTocHV.js +3 -0
- package/dist/_app/immutable/entry/{app.O-mlZZ4v.js → app.DG0UbF3Y.js} +2 -2
- package/dist/_app/immutable/entry/start.sVNR7Hbg.js +1 -0
- package/dist/_app/immutable/nodes/{0.Cyh-M75F.js → 0.BIF2SnDb.js} +1 -1
- package/dist/_app/immutable/nodes/{1.DuwFpHMY.js → 1.C51hCwd8.js} +1 -1
- package/dist/_app/immutable/nodes/{2.DVgkkGMI.js → 2.i7a08Ot_.js} +1 -1
- package/dist/_app/immutable/nodes/{3.BeLDpIz-.js → 3.BkiMJt_d.js} +1 -1
- package/dist/_app/immutable/nodes/{4.De5bLbFo.js → 4.DIgBotc9.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/ui.js +12 -7
- package/dist/cli/server/index.js +12 -7
- package/dist/cli/server/server.js +12 -7
- package/dist/cli/server/serverState.js +8 -5
- package/dist/cli/server/websocketServer.js +12 -7
- package/dist/index.html +10 -10
- package/dist/index.js +12 -7
- package/package.json +21 -22
- package/src/lib/components/controls/DynamicControlEditor.svelte +2 -2
- package/src/lib/components/controls/MappingCard.svelte +1 -1
- package/src/lib/components/controls/MappingForm.svelte +11 -0
- package/src/lib/components/controls/tabs/MappingsTab.svelte +17 -3
- package/src/stores/compliance.ts +1 -1
- package/dist/_app/immutable/chunks/BhjtS45v.js +0 -2
- package/dist/_app/immutable/chunks/BpWAjoEX.js +0 -3
- package/dist/_app/immutable/chunks/DwdPeWTx.js +0 -1
- package/dist/_app/immutable/entry/start.QE7BJOE3.js +0 -1
|
@@ -1737,7 +1737,7 @@ var init_fileStore = __esm({
|
|
|
1737
1737
|
if (!parsed.id) {
|
|
1738
1738
|
try {
|
|
1739
1739
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
1740
|
-
} catch
|
|
1740
|
+
} catch {
|
|
1741
1741
|
parsed.id = controlId;
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
@@ -1764,7 +1764,7 @@ var init_fileStore = __esm({
|
|
|
1764
1764
|
if (!parsed.id) {
|
|
1765
1765
|
try {
|
|
1766
1766
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
1767
|
-
} catch
|
|
1767
|
+
} catch {
|
|
1768
1768
|
parsed.id = controlId;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
@@ -1982,14 +1982,16 @@ var init_fileStore = __esm({
|
|
|
1982
1982
|
/**
|
|
1983
1983
|
* Delete a single mapping
|
|
1984
1984
|
*/
|
|
1985
|
-
async deleteMapping(
|
|
1985
|
+
async deleteMapping(compositeKey) {
|
|
1986
1986
|
const mappingFiles = this.getAllMappingFiles();
|
|
1987
1987
|
for (const file of mappingFiles) {
|
|
1988
1988
|
try {
|
|
1989
1989
|
const content = readFileSync2(file, "utf8");
|
|
1990
1990
|
let mappings = yaml2.load(content) || [];
|
|
1991
1991
|
const originalLength = mappings.length;
|
|
1992
|
-
mappings = mappings.filter((m) =>
|
|
1992
|
+
mappings = mappings.filter((m) => {
|
|
1993
|
+
return `${m.control_id}:${m.uuid}` !== compositeKey;
|
|
1994
|
+
});
|
|
1993
1995
|
if (mappings.length < originalLength) {
|
|
1994
1996
|
if (mappings.length === 0) {
|
|
1995
1997
|
unlinkSync(file);
|
|
@@ -2791,7 +2793,8 @@ async function loadAllData() {
|
|
|
2791
2793
|
debug(`Loaded ${controls.length} controls from individual files`);
|
|
2792
2794
|
const mappings = await state.fileStore.loadMappings();
|
|
2793
2795
|
for (const mapping of mappings) {
|
|
2794
|
-
|
|
2796
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
2797
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
2795
2798
|
addMappingToIndexes(mapping);
|
|
2796
2799
|
}
|
|
2797
2800
|
debug(`Loaded ${mappings.length} mappings`);
|
|
@@ -4563,7 +4566,8 @@ var WebSocketManager = class {
|
|
|
4563
4566
|
mapping.uuid = crypto2.randomUUID();
|
|
4564
4567
|
}
|
|
4565
4568
|
await state.fileStore.saveMapping(mapping);
|
|
4566
|
-
|
|
4569
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
4570
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
4567
4571
|
const family = mapping.control_id.split("-")[0];
|
|
4568
4572
|
if (!state.mappingsByFamily.has(family)) {
|
|
4569
4573
|
state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
|
|
@@ -4588,7 +4592,8 @@ var WebSocketManager = class {
|
|
|
4588
4592
|
if (payload && payload.uuid) {
|
|
4589
4593
|
const mapping = payload;
|
|
4590
4594
|
await state.fileStore.saveMapping(mapping);
|
|
4591
|
-
|
|
4595
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
4596
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
4592
4597
|
ws.send(
|
|
4593
4598
|
JSON.stringify({
|
|
4594
4599
|
type: "mapping-updated",
|
|
@@ -158,7 +158,7 @@ var FileStore = class {
|
|
|
158
158
|
if (!parsed.id) {
|
|
159
159
|
try {
|
|
160
160
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
161
|
-
} catch
|
|
161
|
+
} catch {
|
|
162
162
|
parsed.id = controlId;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -185,7 +185,7 @@ var FileStore = class {
|
|
|
185
185
|
if (!parsed.id) {
|
|
186
186
|
try {
|
|
187
187
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
188
|
-
} catch
|
|
188
|
+
} catch {
|
|
189
189
|
parsed.id = controlId;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
@@ -403,14 +403,16 @@ var FileStore = class {
|
|
|
403
403
|
/**
|
|
404
404
|
* Delete a single mapping
|
|
405
405
|
*/
|
|
406
|
-
async deleteMapping(
|
|
406
|
+
async deleteMapping(compositeKey) {
|
|
407
407
|
const mappingFiles = this.getAllMappingFiles();
|
|
408
408
|
for (const file of mappingFiles) {
|
|
409
409
|
try {
|
|
410
410
|
const content = readFileSync2(file, "utf8");
|
|
411
411
|
let mappings = yaml2.load(content) || [];
|
|
412
412
|
const originalLength = mappings.length;
|
|
413
|
-
mappings = mappings.filter((m) =>
|
|
413
|
+
mappings = mappings.filter((m) => {
|
|
414
|
+
return `${m.control_id}:${m.uuid}` !== compositeKey;
|
|
415
|
+
});
|
|
414
416
|
if (mappings.length < originalLength) {
|
|
415
417
|
if (mappings.length === 0) {
|
|
416
418
|
unlinkSync(file);
|
|
@@ -1186,7 +1188,8 @@ async function loadAllData() {
|
|
|
1186
1188
|
debug(`Loaded ${controls.length} controls from individual files`);
|
|
1187
1189
|
const mappings = await state.fileStore.loadMappings();
|
|
1188
1190
|
for (const mapping of mappings) {
|
|
1189
|
-
|
|
1191
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
1192
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
1190
1193
|
addMappingToIndexes(mapping);
|
|
1191
1194
|
}
|
|
1192
1195
|
debug(`Loaded ${mappings.length} mappings`);
|
|
@@ -184,7 +184,7 @@ var init_fileStore = __esm({
|
|
|
184
184
|
if (!parsed.id) {
|
|
185
185
|
try {
|
|
186
186
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
187
|
-
} catch
|
|
187
|
+
} catch {
|
|
188
188
|
parsed.id = controlId;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -211,7 +211,7 @@ var init_fileStore = __esm({
|
|
|
211
211
|
if (!parsed.id) {
|
|
212
212
|
try {
|
|
213
213
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
214
|
-
} catch
|
|
214
|
+
} catch {
|
|
215
215
|
parsed.id = controlId;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -429,14 +429,16 @@ var init_fileStore = __esm({
|
|
|
429
429
|
/**
|
|
430
430
|
* Delete a single mapping
|
|
431
431
|
*/
|
|
432
|
-
async deleteMapping(
|
|
432
|
+
async deleteMapping(compositeKey) {
|
|
433
433
|
const mappingFiles = this.getAllMappingFiles();
|
|
434
434
|
for (const file of mappingFiles) {
|
|
435
435
|
try {
|
|
436
436
|
const content = readFileSync2(file, "utf8");
|
|
437
437
|
let mappings = yaml2.load(content) || [];
|
|
438
438
|
const originalLength = mappings.length;
|
|
439
|
-
mappings = mappings.filter((m) =>
|
|
439
|
+
mappings = mappings.filter((m) => {
|
|
440
|
+
return `${m.control_id}:${m.uuid}` !== compositeKey;
|
|
441
|
+
});
|
|
440
442
|
if (mappings.length < originalLength) {
|
|
441
443
|
if (mappings.length === 0) {
|
|
442
444
|
unlinkSync(file);
|
|
@@ -1238,7 +1240,8 @@ async function loadAllData() {
|
|
|
1238
1240
|
debug(`Loaded ${controls.length} controls from individual files`);
|
|
1239
1241
|
const mappings = await state.fileStore.loadMappings();
|
|
1240
1242
|
for (const mapping of mappings) {
|
|
1241
|
-
|
|
1243
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
1244
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
1242
1245
|
addMappingToIndexes(mapping);
|
|
1243
1246
|
}
|
|
1244
1247
|
debug(`Loaded ${mappings.length} mappings`);
|
|
@@ -2143,7 +2146,8 @@ var WebSocketManager = class {
|
|
|
2143
2146
|
mapping.uuid = crypto2.randomUUID();
|
|
2144
2147
|
}
|
|
2145
2148
|
await state.fileStore.saveMapping(mapping);
|
|
2146
|
-
|
|
2149
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
2150
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
2147
2151
|
const family = mapping.control_id.split("-")[0];
|
|
2148
2152
|
if (!state.mappingsByFamily.has(family)) {
|
|
2149
2153
|
state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
|
|
@@ -2168,7 +2172,8 @@ var WebSocketManager = class {
|
|
|
2168
2172
|
if (payload && payload.uuid) {
|
|
2169
2173
|
const mapping = payload;
|
|
2170
2174
|
await state.fileStore.saveMapping(mapping);
|
|
2171
|
-
|
|
2175
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
2176
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
2172
2177
|
ws.send(
|
|
2173
2178
|
JSON.stringify({
|
|
2174
2179
|
type: "mapping-updated",
|
package/dist/index.html
CHANGED
|
@@ -6,28 +6,28 @@
|
|
|
6
6
|
<link rel="icon" href="/lula.png" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
|
|
9
|
-
<link rel="modulepreload" href="/_app/immutable/entry/start.
|
|
10
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
11
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
12
|
-
<link rel="modulepreload" href="/_app/immutable/entry/app.
|
|
9
|
+
<link rel="modulepreload" href="/_app/immutable/entry/start.sVNR7Hbg.js">
|
|
10
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/xZlTocHV.js">
|
|
11
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/B8sFn9qB.js">
|
|
12
|
+
<link rel="modulepreload" href="/_app/immutable/entry/app.DG0UbF3Y.js">
|
|
13
13
|
<link rel="modulepreload" href="/_app/immutable/chunks/DsnmJJEf.js">
|
|
14
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
15
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
16
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
14
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/AMsv4DTs.js">
|
|
15
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/DL7cUWpq.js">
|
|
16
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/DPYPcVpy.js">
|
|
17
17
|
</head>
|
|
18
18
|
<body data-sveltekit-preload-data="hover">
|
|
19
19
|
<div style="display: contents">
|
|
20
20
|
<script>
|
|
21
21
|
{
|
|
22
|
-
|
|
22
|
+
__sveltekit_wgx1o2 = {
|
|
23
23
|
base: ""
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const element = document.currentScript.parentElement;
|
|
27
27
|
|
|
28
28
|
Promise.all([
|
|
29
|
-
import("/_app/immutable/entry/start.
|
|
30
|
-
import("/_app/immutable/entry/app.
|
|
29
|
+
import("/_app/immutable/entry/start.sVNR7Hbg.js"),
|
|
30
|
+
import("/_app/immutable/entry/app.DG0UbF3Y.js")
|
|
31
31
|
]).then(([kit, app]) => {
|
|
32
32
|
kit.start(app, element);
|
|
33
33
|
});
|
package/dist/index.js
CHANGED
|
@@ -1756,7 +1756,7 @@ var init_fileStore = __esm({
|
|
|
1756
1756
|
if (!parsed.id) {
|
|
1757
1757
|
try {
|
|
1758
1758
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
1759
|
-
} catch
|
|
1759
|
+
} catch {
|
|
1760
1760
|
parsed.id = controlId;
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
@@ -1783,7 +1783,7 @@ var init_fileStore = __esm({
|
|
|
1783
1783
|
if (!parsed.id) {
|
|
1784
1784
|
try {
|
|
1785
1785
|
parsed.id = getControlId(parsed, this.baseDir);
|
|
1786
|
-
} catch
|
|
1786
|
+
} catch {
|
|
1787
1787
|
parsed.id = controlId;
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
@@ -2001,14 +2001,16 @@ var init_fileStore = __esm({
|
|
|
2001
2001
|
/**
|
|
2002
2002
|
* Delete a single mapping
|
|
2003
2003
|
*/
|
|
2004
|
-
async deleteMapping(
|
|
2004
|
+
async deleteMapping(compositeKey) {
|
|
2005
2005
|
const mappingFiles = this.getAllMappingFiles();
|
|
2006
2006
|
for (const file of mappingFiles) {
|
|
2007
2007
|
try {
|
|
2008
2008
|
const content = readFileSync2(file, "utf8");
|
|
2009
2009
|
let mappings = yaml2.load(content) || [];
|
|
2010
2010
|
const originalLength = mappings.length;
|
|
2011
|
-
mappings = mappings.filter((m) =>
|
|
2011
|
+
mappings = mappings.filter((m) => {
|
|
2012
|
+
return `${m.control_id}:${m.uuid}` !== compositeKey;
|
|
2013
|
+
});
|
|
2012
2014
|
if (mappings.length < originalLength) {
|
|
2013
2015
|
if (mappings.length === 0) {
|
|
2014
2016
|
unlinkSync(file);
|
|
@@ -2810,7 +2812,8 @@ async function loadAllData() {
|
|
|
2810
2812
|
debug(`Loaded ${controls.length} controls from individual files`);
|
|
2811
2813
|
const mappings = await state.fileStore.loadMappings();
|
|
2812
2814
|
for (const mapping of mappings) {
|
|
2813
|
-
|
|
2815
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
2816
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
2814
2817
|
addMappingToIndexes(mapping);
|
|
2815
2818
|
}
|
|
2816
2819
|
debug(`Loaded ${mappings.length} mappings`);
|
|
@@ -4590,7 +4593,8 @@ var WebSocketManager = class {
|
|
|
4590
4593
|
mapping.uuid = crypto2.randomUUID();
|
|
4591
4594
|
}
|
|
4592
4595
|
await state.fileStore.saveMapping(mapping);
|
|
4593
|
-
|
|
4596
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
4597
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
4594
4598
|
const family = mapping.control_id.split("-")[0];
|
|
4595
4599
|
if (!state.mappingsByFamily.has(family)) {
|
|
4596
4600
|
state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
|
|
@@ -4615,7 +4619,8 @@ var WebSocketManager = class {
|
|
|
4615
4619
|
if (payload && payload.uuid) {
|
|
4616
4620
|
const mapping = payload;
|
|
4617
4621
|
await state.fileStore.saveMapping(mapping);
|
|
4618
|
-
|
|
4622
|
+
const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
|
|
4623
|
+
state.mappingsCache.set(compositeKey, mapping);
|
|
4619
4624
|
ws.send(
|
|
4620
4625
|
JSON.stringify({
|
|
4621
4626
|
type: "mapping-updated",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lula2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-nightly.0",
|
|
4
4
|
"description": "A tool for managing compliance as code in your GitHub repositories.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lula2": "./dist/lula2"
|
|
@@ -33,25 +33,6 @@
|
|
|
33
33
|
"!dist/**/*.test.js*",
|
|
34
34
|
"!dist/**/*.test.d.ts*"
|
|
35
35
|
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"dev": "vite dev --port 5173",
|
|
38
|
-
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
39
|
-
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
40
|
-
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
41
|
-
"build:svelte": "vite build",
|
|
42
|
-
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:exceljs --external:csv-parse",
|
|
43
|
-
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
44
|
-
"preview": "vite preview",
|
|
45
|
-
"prepare": "svelte-kit sync || echo ''",
|
|
46
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
47
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
48
|
-
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
49
|
-
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
50
|
-
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
51
|
-
"test": "npm run test:unit -- --run --coverage",
|
|
52
|
-
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
53
|
-
"test:unit": "vitest"
|
|
54
|
-
},
|
|
55
36
|
"dependencies": {
|
|
56
37
|
"@octokit/rest": "^22.0.0",
|
|
57
38
|
"@types/ws": "^8.18.1",
|
|
@@ -98,7 +79,7 @@
|
|
|
98
79
|
"esbuild": "^0.25.9",
|
|
99
80
|
"eslint": "^9.35.0",
|
|
100
81
|
"eslint-config-prettier": "^10.1.8",
|
|
101
|
-
"eslint-plugin-jsdoc": "^
|
|
82
|
+
"eslint-plugin-jsdoc": "^60.1.0",
|
|
102
83
|
"eslint-plugin-svelte": "^3.12.2",
|
|
103
84
|
"globals": "^16.3.0",
|
|
104
85
|
"husky": "^9.1.7",
|
|
@@ -124,5 +105,23 @@
|
|
|
124
105
|
"main",
|
|
125
106
|
"next"
|
|
126
107
|
]
|
|
108
|
+
},
|
|
109
|
+
"scripts": {
|
|
110
|
+
"dev": "vite dev --port 5173",
|
|
111
|
+
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
112
|
+
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
113
|
+
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
114
|
+
"build:svelte": "vite build",
|
|
115
|
+
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:exceljs --external:csv-parse",
|
|
116
|
+
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
117
|
+
"preview": "vite preview",
|
|
118
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
119
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
120
|
+
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
121
|
+
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
122
|
+
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
123
|
+
"test": "npm run test:unit -- --run --coverage",
|
|
124
|
+
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
125
|
+
"test:unit": "vitest"
|
|
127
126
|
}
|
|
128
|
-
}
|
|
127
|
+
}
|
|
@@ -221,10 +221,10 @@
|
|
|
221
221
|
>
|
|
222
222
|
<div class="flex justify-between items-start mb-2">
|
|
223
223
|
<span class="text-sm font-medium text-gray-900 dark:text-white"
|
|
224
|
-
|
|
224
|
+
>{mapping.uuid}</span
|
|
225
225
|
>
|
|
226
226
|
<button
|
|
227
|
-
onclick={() => navigator.clipboard.writeText(
|
|
227
|
+
onclick={() => navigator.clipboard.writeText(`${mapping.uuid}`)}
|
|
228
228
|
class="text-xs text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300"
|
|
229
229
|
>
|
|
230
230
|
Copy UUID
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import FormField from '../forms/FormField.svelte';
|
|
8
8
|
|
|
9
9
|
interface MappingFormData {
|
|
10
|
+
uuid: string;
|
|
10
11
|
justification: string;
|
|
11
12
|
status: 'planned' | 'implemented' | 'verified';
|
|
12
13
|
source_entries: SourceEntry[];
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
}: Props = $props();
|
|
30
31
|
|
|
31
32
|
let formData = $state<MappingFormData>({
|
|
33
|
+
uuid: initialData.uuid || '',
|
|
32
34
|
justification: initialData.justification || '',
|
|
33
35
|
status: initialData.status || 'planned',
|
|
34
36
|
source_entries: initialData.source_entries || []
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
function handleCancel() {
|
|
50
52
|
// Reset form
|
|
51
53
|
formData = {
|
|
54
|
+
uuid: initialData.uuid || '',
|
|
52
55
|
justification: initialData.justification || '',
|
|
53
56
|
status: initialData.status || 'planned',
|
|
54
57
|
source_entries: initialData.source_entries || []
|
|
@@ -81,6 +84,14 @@
|
|
|
81
84
|
<div class="space-y-8">
|
|
82
85
|
<!-- Main form fields -->
|
|
83
86
|
<div class="grid grid-cols-1 gap-8">
|
|
87
|
+
<FormField
|
|
88
|
+
id="mapping-uuid"
|
|
89
|
+
label="UUID"
|
|
90
|
+
type="text"
|
|
91
|
+
bind:value={formData.uuid}
|
|
92
|
+
placeholder="Enter mapping UUID (leave empty to auto-generate)"
|
|
93
|
+
/>
|
|
94
|
+
|
|
84
95
|
<FormField
|
|
85
96
|
id="mapping-justification"
|
|
86
97
|
label="Justification"
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
// Form state
|
|
23
23
|
let newMappingData = $state({
|
|
24
|
+
uuid: '',
|
|
24
25
|
justification: '',
|
|
25
26
|
status: 'planned' as 'planned' | 'implemented' | 'verified',
|
|
26
27
|
source_entries: [] as { location: string; shasum?: string }[]
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
justification: data.justification,
|
|
35
36
|
status: data.status,
|
|
36
37
|
source_entries: data.source_entries,
|
|
37
|
-
uuid: '' //
|
|
38
|
+
uuid: data.uuid || '' // Use the UUID from form or empty for auto-generation
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
await wsClient.createMapping(mappingData);
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
|
|
51
52
|
function resetMappingForm() {
|
|
52
53
|
newMappingData = {
|
|
54
|
+
uuid: '',
|
|
53
55
|
justification: '',
|
|
54
56
|
status: 'planned',
|
|
55
57
|
source_entries: []
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
editingMapping = { ...mapping };
|
|
63
65
|
showNewMappingForm = true;
|
|
64
66
|
newMappingData = {
|
|
67
|
+
uuid: mapping.uuid,
|
|
65
68
|
justification: mapping.justification,
|
|
66
69
|
status: mapping.status,
|
|
67
70
|
source_entries: mapping.source_entries || []
|
|
@@ -74,12 +77,22 @@
|
|
|
74
77
|
try {
|
|
75
78
|
const updatedMapping = {
|
|
76
79
|
...editingMapping,
|
|
80
|
+
uuid: data.uuid || editingMapping.uuid, // Use form UUID or fallback to original
|
|
77
81
|
justification: data.justification,
|
|
78
82
|
status: data.status,
|
|
79
83
|
source_entries: data.source_entries
|
|
80
84
|
};
|
|
81
85
|
|
|
82
|
-
|
|
86
|
+
const uuidChanged = updatedMapping.uuid !== editingMapping.uuid;
|
|
87
|
+
|
|
88
|
+
if (uuidChanged) {
|
|
89
|
+
const compositeId = `${control.id}:${editingMapping.uuid}`;
|
|
90
|
+
await wsClient.deleteMapping(compositeId);
|
|
91
|
+
await wsClient.createMapping(updatedMapping);
|
|
92
|
+
} else {
|
|
93
|
+
await wsClient.updateMapping(updatedMapping);
|
|
94
|
+
}
|
|
95
|
+
|
|
83
96
|
resetMappingForm();
|
|
84
97
|
} catch (error) {
|
|
85
98
|
console.error('Failed to update mapping:', error);
|
|
@@ -88,7 +101,8 @@
|
|
|
88
101
|
|
|
89
102
|
async function handleDeleteMapping(uuid: string) {
|
|
90
103
|
try {
|
|
91
|
-
|
|
104
|
+
const compositeId = `${control.id}:${uuid}`;
|
|
105
|
+
await wsClient.deleteMapping(compositeId);
|
|
92
106
|
} catch (error) {
|
|
93
107
|
console.error('Failed to delete mapping:', error);
|
|
94
108
|
}
|
package/src/stores/compliance.ts
CHANGED
|
@@ -61,7 +61,7 @@ export const activeFilters = writable<FilterCondition[]>([]);
|
|
|
61
61
|
// All server operations now go through WebSocket
|
|
62
62
|
export const complianceStore = {
|
|
63
63
|
setSearchTerm(term: string) {
|
|
64
|
-
searchTerm.set(term);
|
|
64
|
+
searchTerm.set(term || '');
|
|
65
65
|
},
|
|
66
66
|
|
|
67
67
|
setSelectedControl(control: Control | null) {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var lt=Array.isArray,bn=Array.prototype.indexOf,wn=Array.from,Je=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,mn=Object.getOwnPropertyDescriptors,En=Object.prototype,Tn=Array.prototype,Nt=Object.getPrototypeOf,bt=Object.isExtensible;function Br(e){return typeof e=="function"}const ne=()=>{};function Hr(e){return e()}function ut(e){for(var t=0;t<e.length;t++)e[t]()}function An(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Ur(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const O=2,ft=4,Be=8,be=16,H=32,ue=64,ot=128,N=256,Ve=512,m=1024,D=2048,U=4096,J=8192,we=16384,ct=32768,He=65536,wt=1<<17,xn=1<<18,me=1<<19,Ct=1<<20,Qe=1<<21,_t=1<<22,re=1<<23,se=Symbol("$state"),$r=Symbol("legacy props"),Wr=Symbol(""),dt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ue=3,Re=8;function Ee(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Sn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function On(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Rn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Cn(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function In(){throw new Error("https://svelte.dev/e/hydration_failed")}function It(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function Kr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Pn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ln(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const zr=1,Xr=2,Zr=4,Jr=8,Qr=16,es=1,ts=2,ns=4,rs=8,ss=16,is=4,Fn=1,jn=2,Pt="[",Dt="[!",Mt="]",de={},E=Symbol(),as="http://www.w3.org/1999/xhtml",ls="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function us(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function qn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let b=!1;function je(e){b=e}let y;function M(e){if(e===null)throw $e(),de;return y=e}function We(){return M($(y))}function fs(e){if(b){if($(y)!==null)throw $e(),de;y=e}}function Vn(e=1){if(b){for(var t=e,n=y;t--;)n=$(n);y=n}}function Yn(){for(var e=0,t=y;;){if(t.nodeType===Re){var n=t.data;if(n===Mt){if(e===0)return t;e-=1}else(n===Pt||n===Dt)&&(e+=1)}var r=$(t);t.remove(),t=r}}function os(e){if(!e||e.nodeType!==Re)throw $e(),de;return e.data}function Lt(e){return e===this.v}function Ft(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function jt(e){return!Ft(e,this.v)}let Ie=!1;function cs(){Ie=!0}let g=null;function ve(e){g=e}function Bn(e){return Ge().get(e)}function Hn(e,t){return Ge().set(e,t),t}function Un(e){return Ge().has(e)}function $n(){return Ge()}function Wn(e,t=!1,n){g={p:g,c:null,e:null,s:e,x:null,l:Ie&&!t?{s:null,u:null,$:[]}:null}}function Gn(e){var t=g,n=t.e;if(n!==null){t.e=null;for(var r of n)en(r)}return g=t.p,{}}function Pe(){return!Ie||g!==null&&g.l===null}function Ge(e){return g===null&&Ee(),g.c??=new Map(Kn(g)||void 0)}function Kn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}const zn=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let z=[],pe=[];function qt(){var e=z;z=[],ut(e)}function Vt(){var e=pe;pe=[],ut(e)}function Xn(){return z.length>0||pe.length>0}function De(e){if(z.length===0&&!ke){var t=z;queueMicrotask(()=>{t===z&&qt()})}z.push(e)}function _s(e){pe.length===0&&zn(Vt),pe.push(e)}function Zn(){z.length>0&&qt(),pe.length>0&&Vt()}const Jn=new WeakMap;function Yt(e){var t=p;if(t===null)return v.f|=re,e;if((t.f&ct)===0){if((t.f&ot)===0)throw!t.parent&&e instanceof Error&&Bt(e),e;t.b.error(e)}else ge(e,t)}function ge(e,t){for(;t!==null;){if((t.f&ot)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&Bt(e),e}function Bt(e){const t=Jn.get(e);t&&(Je(e,"message",{value:t.message}),Je(e,"stack",{value:t.stack}))}const Xe=new Set;let w=null,Ze=null,et=new Set,le=[],Ke=null,tt=!1,ke=!1;class L{current=new Map;#i=new Map;#t=new Set;#f=0;#a=null;#c=!1;#s=[];#n=[];#e=[];#r=[];#l=[];#_=[];#o=[];skipped_effects=new Set;process(t){le=[],Ze=null;for(const s of t)this.#d(s);if(this.#s.length===0&&this.#f===0){this.#h();var n=this.#e,r=this.#r;this.#e=[],this.#r=[],this.#l=[],Ze=w,w=null,mt(n),mt(r),w===null?w=this:Xe.delete(this),this.#a?.resolve()}else this.#u(this.#e),this.#u(this.#r),this.#u(this.#l);for(const s of this.#s)ae(s);for(const s of this.#n)ae(s);this.#s=[],this.#n=[]}#d(t){t.f^=m;for(var n=t.first;n!==null;){var r=n.f,s=(r&(H|ue))!==0,i=s&&(r&m)!==0,a=i||(r&J)!==0||this.skipped_effects.has(n);if(!a&&n.fn!==null){if(s)n.f^=m;else if((r&ft)!==0)this.#r.push(n);else if((r&m)===0)if((r&_t)!==0){var u=n.b?.is_pending()?this.#n:this.#s;u.push(n)}else Le(n)&&((n.f&be)!==0&&this.#l.push(n),ae(n));var l=n.first;if(l!==null){n=l;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)n=f.next,f=f.parent}}#u(t){for(const n of t)((n.f&D)!==0?this.#_:this.#o).push(n),x(n,m);t.length=0}capture(t,n){this.#i.has(t)||this.#i.set(t,n),this.current.set(t,t.v)}activate(){w=this}deactivate(){w=null,Ze=null;for(const t of et)if(et.delete(t),t(),w!==null)break}neuter(){this.#c=!0}flush(){le.length>0?nt():this.#h(),w===this&&(this.#f===0&&Xe.delete(this),this.deactivate())}#h(){if(!this.#c)for(const t of this.#t)t();this.#t.clear()}increment(){this.#f+=1}decrement(){if(this.#f-=1,this.#f===0){for(const t of this.#_)x(t,D),ye(t);for(const t of this.#o)x(t,U),ye(t);this.#e=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#t.add(t)}settled(){return(this.#a??=An()).promise}static ensure(){if(w===null){const t=w=new L;Xe.add(w),ke||L.enqueue(()=>{w===t&&t.flush()})}return w}static enqueue(t){De(t)}}function Ht(e){var t=ke;ke=!0;try{var n;for(e&&(nt(),n=e());;){if(Zn(),le.length===0&&!Xn()&&(w?.flush(),le.length===0))return Ke=null,n;nt()}}finally{ke=t}}function nt(){var e=he;tt=!0;try{var t=0;for(xt(!0);le.length>0;){var n=L.ensure();if(t++>1e3){var r,s;Qn()}n.process(le),Z.clear()}}finally{tt=!1,xt(e),Ke=null}}function Qn(){try{Nn()}catch(e){ge(e,Ke)}}let te=null;function mt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(we|J))===0&&Le(r)&&(te=[],ae(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?sn(r):r.fn=null),te?.length>0)){Z.clear();for(const s of te)ae(s);te=[]}}te=null}}function ye(e){for(var t=Ke=e;t.parent!==null;){t=t.parent;var n=t.f;if(tt&&t===p&&(n&be)!==0)return;if((n&(ue|H))!==0){if((n&m)===0)return;t.f^=m}}le.push(t)}function er(e){let t=0,n=Me(0),r;return()=>{_r()&&(Y(n),pt(()=>(t===0&&(r=ee(()=>e(()=>Oe(n)))),t+=1,()=>{De(()=>{t-=1,t===0&&(r?.(),r=void 0,Oe(n))})})))}}var tr=He|me|ot;function nr(e,t,n){new rr(e,t,n)}class rr{parent;#i=!1;#t;#f=b?y:null;#a;#c;#s;#n=null;#e=null;#r=null;#l=null;#_=0;#o=0;#d=!1;#u=null;#h=()=>{this.#u&&Ne(this.#u,this.#_)};#y=er(()=>(this.#u=Me(this.#_),()=>{this.#u=null}));constructor(t,n,r){this.#t=t,this.#a=n,this.#c=r,this.parent=p.b,this.#i=!!this.#a.pending,this.#s=tn(()=>{if(p.b=this,b){const s=this.#f;We(),s.nodeType===Re&&s.data===Dt?this.#w():this.#b()}else{try{this.#n=K(()=>r(this.#t))}catch(s){this.error(s)}this.#o>0?this.#p():this.#i=!1}},tr),b&&(this.#t=y)}#b(){try{this.#n=K(()=>this.#c(this.#t))}catch(t){this.error(t)}this.#i=!1}#w(){const t=this.#a.pending;t&&(this.#e=K(()=>t(this.#t)),L.enqueue(()=>{this.#n=this.#v(()=>(L.ensure(),K(()=>this.#c(this.#t)))),this.#o>0?this.#p():(qe(this.#e,()=>{this.#e=null}),this.#i=!1)}))}is_pending(){return this.#i||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#a.pending}#v(t){var n=p,r=v,s=g;j(this.#s),S(this.#s),ve(this.#s.ctx);try{return t()}catch(i){return Yt(i),null}finally{j(n),S(r),ve(s)}}#p(){const t=this.#a.pending;this.#n!==null&&(this.#l=document.createDocumentFragment(),sr(this.#n,this.#l)),this.#e===null&&(this.#e=K(()=>t(this.#t)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#o+=t,this.#o===0&&(this.#i=!1,this.#e&&qe(this.#e,()=>{this.#e=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(t){this.#g(t),this.#_+=t,et.add(this.#h)}get_effect_pending(){return this.#y(),Y(this.#u)}error(t){var n=this.#a.onerror;let r=this.#a.failed;if(this.#d||!n&&!r)throw t;this.#n&&(I(this.#n),this.#n=null),this.#e&&(I(this.#e),this.#e=null),this.#r&&(I(this.#r),this.#r=null),b&&(M(this.#f),Vn(),M(Yn()));var s=!1,i=!1;const a=()=>{if(s){qn();return}s=!0,i&&Ln(),L.ensure(),this.#_=0,this.#r!==null&&qe(this.#r,()=>{this.#r=null}),this.#i=this.has_pending_snippet(),this.#n=this.#v(()=>(this.#d=!1,K(()=>this.#c(this.#t)))),this.#o>0?this.#p():this.#i=!1};var u=v;try{S(null),i=!0,n?.(t,a),i=!1}catch(l){ge(l,this.#s&&this.#s.parent)}finally{S(u)}r&&De(()=>{this.#r=this.#v(()=>{this.#d=!0;try{return K(()=>{r(this.#t,()=>t,()=>a)})}catch(l){return ge(l,this.#s.parent),null}finally{this.#d=!1}})})}}function sr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:$(n);t.append(n),n=s}}function ir(e,t,n){const r=Pe()?ht:ur;if(t.length===0){n(e.map(r));return}var s=w,i=p,a=ar();Promise.all(t.map(u=>lr(u))).then(u=>{s?.activate(),a();try{n([...e.map(r),...u])}catch(l){(i.f&we)===0&&ge(l,i)}s?.deactivate(),Ut()}).catch(u=>{ge(u,i)})}function ar(){var e=p,t=v,n=g,r=w;return function(){j(e),S(t),ve(n),r?.activate()}}function Ut(){j(null),S(null),ve(null)}function ht(e){var t=O|D,n=v!==null&&(v.f&O)!==0?v:null;return p===null||n!==null&&(n.f&N)!==0?t|=N:p.f|=me,{ctx:g,deps:null,effects:null,equals:Lt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??p,ac:null}}function lr(e,t){let n=p;n===null&&Sn();var r=n.b,s=void 0,i=Me(E),a=null,u=!v;return vr(()=>{try{var l=e();a&&Promise.resolve(l).catch(()=>{})}catch(c){l=Promise.reject(c)}var f=()=>l;s=a?.then(f,f)??Promise.resolve(l),a=s;var o=w,_=r.is_pending();u&&(r.update_pending_count(1),_||o.increment());const d=(c,h=void 0)=>{a=null,_||o.activate(),h?h!==dt&&(i.f|=re,Ne(i,h)):((i.f&re)!==0&&(i.f^=re),Ne(i,c)),u&&(r.update_pending_count(-1),_||o.decrement()),Ut()};if(s.then(d,c=>d(null,c||"unknown")),o)return()=>{queueMicrotask(()=>o.neuter())}}),new Promise(l=>{function f(o){function _(){o===s?l(i):f(s)}o.then(_,_)}f(s)})}function ds(e){const t=ht(e);return un(t),t}function ur(e){const t=ht(e);return t.equals=jt,t}function $t(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)I(t[n])}}function fr(e){for(var t=e.parent;t!==null;){if((t.f&O)===0)return t;t=t.parent}return null}function vt(e){var t,n=p;j(fr(e));try{$t(e),t=_n(e)}finally{j(n)}return t}function Wt(e){var t=vt(e);if(e.equals(t)||(e.v=t,e.wv=on()),!Te){var n=(X||(e.f&N)!==0)&&e.deps!==null?U:m;x(e,n)}}const Z=new Map;function Me(e,t){var n={f:0,v:e,reactions:null,equals:Lt,rv:0,wv:0};return n}function G(e,t){const n=Me(e);return un(n),n}function hs(e,t=!1,n=!0){const r=Me(e);return t||(r.equals=jt),Ie&&n&&g!==null&&g.l!==null&&(g.l.s??=[]).push(r),r}function vs(e,t){return V(e,ee(()=>Y(e))),t}function V(e,t,n=!1){v!==null&&(!C||(v.f&wt)!==0)&&Pe()&&(v.f&(O|be|_t|wt))!==0&&!B?.includes(e)&&Mn();let r=n?Ae(t):t;return Ne(e,r)}function Ne(e,t){if(!e.equals(t)){var n=e.v;Te?Z.set(e,t):Z.set(e,n),e.v=t;var r=L.ensure();r.capture(e,n),(e.f&O)!==0&&((e.f&D)!==0&&vt(e),x(e,(e.f&N)===0?m:U)),e.wv=on(),Gt(e,D),Pe()&&p!==null&&(p.f&m)!==0&&(p.f&(H|ue))===0&&(R===null?wr([e]):R.push(e))}return t}function ps(e,t=1){var n=Y(e),r=t===1?n++:n--;return V(e,n),r}function Oe(e){V(e,e.v+1)}function Gt(e,t){var n=e.reactions;if(n!==null)for(var r=Pe(),s=n.length,i=0;i<s;i++){var a=n[i],u=a.f;if(!(!r&&a===p)){var l=(u&D)===0;l&&x(a,t),(u&O)!==0?Gt(a,U):l&&((u&be)!==0&&te!==null&&te.push(a),ye(a))}}}function Ae(e){if(typeof e!="object"||e===null||se in e)return e;const t=Nt(e);if(t!==En&&t!==Tn)return e;var n=new Map,r=lt(e),s=G(0),i=ie,a=u=>{if(ie===i)return u();var l=v,f=ie;S(null),kt(i);var o=u();return S(l),kt(f),o};return r&&n.set("length",G(e.length)),new Proxy(e,{defineProperty(u,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Pn();var o=n.get(l);return o===void 0?o=a(()=>{var _=G(f.value);return n.set(l,_),_}):V(o,f.value,!0),!0},deleteProperty(u,l){var f=n.get(l);if(f===void 0){if(l in u){const o=a(()=>G(E));n.set(l,o),Oe(s)}}else V(f,E),Oe(s);return!0},get(u,l,f){if(l===se)return e;var o=n.get(l),_=l in u;if(o===void 0&&(!_||Se(u,l)?.writable)&&(o=a(()=>{var c=Ae(_?u[l]:E),h=G(c);return h}),n.set(l,o)),o!==void 0){var d=Y(o);return d===E?void 0:d}return Reflect.get(u,l,f)},getOwnPropertyDescriptor(u,l){var f=Reflect.getOwnPropertyDescriptor(u,l);if(f&&"value"in f){var o=n.get(l);o&&(f.value=Y(o))}else if(f===void 0){var _=n.get(l),d=_?.v;if(_!==void 0&&d!==E)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(u,l){if(l===se)return!0;var f=n.get(l),o=f!==void 0&&f.v!==E||Reflect.has(u,l);if(f!==void 0||p!==null&&(!o||Se(u,l)?.writable)){f===void 0&&(f=a(()=>{var d=o?Ae(u[l]):E,c=G(d);return c}),n.set(l,f));var _=Y(f);if(_===E)return!1}return o},set(u,l,f,o){var _=n.get(l),d=l in u;if(r&&l==="length")for(var c=f;c<_.v;c+=1){var h=n.get(c+"");h!==void 0?V(h,E):c in u&&(h=a(()=>G(E)),n.set(c+"",h))}if(_===void 0)(!d||Se(u,l)?.writable)&&(_=a(()=>G(void 0)),V(_,Ae(f)),n.set(l,_));else{d=_.v!==E;var T=a(()=>Ae(f));V(_,T)}var fe=Reflect.getOwnPropertyDescriptor(u,l);if(fe?.set&&fe.set.call(o,f),!d){if(r&&typeof l=="string"){var Fe=n.get("length"),W=Number(l);Number.isInteger(W)&&W>=Fe.v&&V(Fe,W+1)}Oe(s)}return!0},ownKeys(u){Y(s);var l=Reflect.ownKeys(u).filter(_=>{var d=n.get(_);return d===void 0||d.v!==E});for(var[f,o]of n)o.v!==E&&!(f in u)&&l.push(f);return l},setPrototypeOf(){Dn()}})}function Et(e){try{if(e!==null&&typeof e=="object"&&se in e)return e[se]}catch{}return e}function gs(e,t){return Object.is(Et(e),Et(t))}var Tt,Kt,zt,Xt;function rt(){if(Tt===void 0){Tt=window,Kt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;zt=Se(t,"firstChild").get,Xt=Se(t,"nextSibling").get,bt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),bt(n)&&(n.__t=void 0)}}function Q(e=""){return document.createTextNode(e)}function F(e){return zt.call(e)}function $(e){return Xt.call(e)}function ys(e,t){if(!b)return F(e);var n=F(y);if(n===null)n=y.appendChild(Q());else if(t&&n.nodeType!==Ue){var r=Q();return n?.before(r),M(r),r}return M(n),n}function bs(e,t=!1){if(!b){var n=F(e);return n instanceof Comment&&n.data===""?$(n):n}if(t&&y?.nodeType!==Ue){var r=Q();return y?.before(r),M(r),r}return y}function ws(e,t=1,n=!1){let r=b?y:e;for(var s;t--;)s=r,r=$(r);if(!b)return r;if(n&&r?.nodeType!==Ue){var i=Q();return r===null?s?.after(i):r.before(i),M(i),i}return M(r),r}function Zt(e){e.textContent=""}function ms(){return!1}function Es(e,t){if(t){const n=document.body;e.autofocus=!0,De(()=>{document.activeElement===n&&e.focus()})}}function Ts(e){b&&F(e)!==null&&Zt(e)}let At=!1;function or(){At||(At=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function ze(e){var t=v,n=p;S(null),j(null);try{return e()}finally{S(t),j(n)}}function As(e,t,n,r=n){e.addEventListener(t,()=>ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),or()}function Jt(e){p===null&&v===null&&Rn(),v!==null&&(v.f&N)!==0&&p===null&&On(),Te&&kn()}function cr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function q(e,t,n,r=!0){var s=p;s!==null&&(s.f&J)!==0&&(e|=J);var i={ctx:g,deps:null,nodes_start:null,nodes_end:null,f:e|D,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{ae(i),i.f|=ct}catch(l){throw I(i),l}else t!==null&&ye(i);if(r){var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&me)===0&&(a=a.first),a!==null&&(a.parent=s,s!==null&&cr(a,s),v!==null&&(v.f&O)!==0&&(e&ue)===0)){var u=v;(u.effects??=[]).push(a)}}return i}function _r(){return v!==null&&!C}function Qt(e){const t=q(Be,null,!1);return x(t,m),t.teardown=e,t}function dr(e){Jt();var t=p.f,n=!v&&(t&H)!==0&&(t&ct)===0;if(n){var r=g;(r.e??=[]).push(e)}else return en(e)}function en(e){return q(ft|Ct,e,!1)}function xs(e){return Jt(),q(Be|Ct,e,!0)}function hr(e){L.ensure();const t=q(ue|me,e,!0);return(n={})=>new Promise(r=>{n.outro?qe(t,()=>{I(t),r(void 0)}):(I(t),r(void 0))})}function Ss(e){return q(ft,e,!1)}function ks(e,t){var n=g,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=pt(()=>{e(),!r.ran&&(r.ran=!0,ee(t))})}function Os(){var e=g;pt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&m)!==0&&x(n,U),Le(n)&&ae(n),t.ran=!1}})}function vr(e){return q(_t|me,e,!0)}function pt(e,t=0){return q(Be|t,e,!0)}function Rs(e,t=[],n=[]){ir(t,n,r=>{q(Be,()=>e(...r.map(Y)),!0)})}function tn(e,t=0){var n=q(be|t,e,!0);return n}function K(e,t=!0){return q(H|me,e,!0,t)}function nn(e){var t=e.teardown;if(t!==null){const n=Te,r=v;St(!0),S(null);try{t.call(null)}finally{St(n),S(r)}}}function rn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&ze(()=>{s.abort(dt)});var r=n.next;(n.f&ue)!==0?n.parent=null:I(n,t),n=r}}function pr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&H)===0&&I(t),t=n}}function I(e,t=!0){var n=!1;(t||(e.f&xn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(gr(e.nodes_start,e.nodes_end),n=!0),rn(e,t&&!n),Ye(e,0),x(e,we);var r=e.transitions;if(r!==null)for(const i of r)i.stop();nn(e);var s=e.parent;s!==null&&s.first!==null&&sn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function gr(e,t){for(;e!==null;){var n=e===t?null:$(e);e.remove(),e=n}}function sn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function qe(e,t){var n=[];an(e,n,!0),yr(n,()=>{I(e),t&&t()})}function yr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function an(e,t,n){if((e.f&J)===0){if(e.f^=J,e.transitions!==null)for(const a of e.transitions)(a.is_global||n)&&t.push(a);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&He)!==0||(r.f&H)!==0;an(r,t,i?n:!1),r=s}}}function Ns(e){ln(e,!0)}function ln(e,t){if((e.f&J)!==0){e.f^=J,(e.f&m)===0&&(x(e,D),ye(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&He)!==0||(n.f&H)!==0;ln(n,s?t:!1),n=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}let _e=null;function br(e){var t=_e;try{if(_e=new Set,ee(e),t!==null)for(var n of _e)t.add(n);return _e}finally{_e=t}}function Cs(e){for(var t of br(e))Ne(t,t.v)}let he=!1;function xt(e){he=e}let Te=!1;function St(e){Te=e}let v=null,C=!1;function S(e){v=e}let p=null;function j(e){p=e}let B=null;function un(e){v!==null&&(B===null?B=[e]:B.push(e))}let A=null,k=0,R=null;function wr(e){R=e}let fn=1,Ce=0,ie=Ce;function kt(e){ie=e}let X=!1;function on(){return++fn}function Le(e){var t=e.f;if((t&D)!==0)return!0;if((t&U)!==0){var n=e.deps,r=(t&N)!==0;if(n!==null){var s,i,a=(t&Ve)!==0,u=r&&p!==null&&!X,l=n.length;if((a||u)&&(p===null||(p.f&we)===0)){var f=e,o=f.parent;for(s=0;s<l;s++)i=n[s],(a||!i?.reactions?.includes(f))&&(i.reactions??=[]).push(f);a&&(f.f^=Ve),u&&o!==null&&(o.f&N)===0&&(f.f^=N)}for(s=0;s<l;s++)if(i=n[s],Le(i)&&Wt(i),i.wv>e.wv)return!0}(!r||p!==null&&!X)&&x(e,m)}return!1}function cn(e,t,n=!0){var r=e.reactions;if(r!==null&&!B?.includes(e))for(var s=0;s<r.length;s++){var i=r[s];(i.f&O)!==0?cn(i,t,!1):t===i&&(n?x(i,D):(i.f&m)!==0&&x(i,U),ye(i))}}function _n(e){var t=A,n=k,r=R,s=v,i=X,a=B,u=g,l=C,f=ie,o=e.f;A=null,k=0,R=null,X=(o&N)!==0&&(C||!he||v===null),v=(o&(H|ue))===0?e:null,B=null,ve(e.ctx),C=!1,ie=++Ce,e.ac!==null&&(ze(()=>{e.ac.abort(dt)}),e.ac=null);try{e.f|=Qe;var _=e.fn,d=_(),c=e.deps;if(A!==null){var h;if(Ye(e,k),c!==null&&k>0)for(c.length=k+A.length,h=0;h<A.length;h++)c[k+h]=A[h];else e.deps=c=A;if(!X||(o&O)!==0&&e.reactions!==null)for(h=k;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&k<c.length&&(Ye(e,k),c.length=k);if(Pe()&&R!==null&&!C&&c!==null&&(e.f&(O|U|D))===0)for(h=0;h<R.length;h++)cn(R[h],e);return s!==null&&s!==e&&(Ce++,R!==null&&(r===null?r=R:r.push(...R))),(e.f&re)!==0&&(e.f^=re),d}catch(T){return Yt(T)}finally{e.f^=Qe,A=t,k=n,R=r,v=s,X=i,B=a,ve(u),C=l,ie=f}}function mr(e,t){let n=t.reactions;if(n!==null){var r=bn.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&O)!==0&&(A===null||!A.includes(t))&&(x(t,U),(t.f&(N|Ve))===0&&(t.f^=Ve),$t(t),Ye(t,0))}function Ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)mr(e,n[r])}function ae(e){var t=e.f;if((t&we)===0){x(e,m);var n=p,r=he;p=e,he=!0;try{(t&be)!==0?pr(e):rn(e),nn(e);var s=_n(e);e.teardown=typeof s=="function"?s:null,e.wv=fn;var i}finally{he=r,p=n}}}async function Er(){await Promise.resolve(),Ht()}function Tr(){return L.ensure().settled()}function Y(e){var t=e.f,n=(t&O)!==0;if(_e?.add(e),v!==null&&!C){var r=p!==null&&(p.f&we)!==0;if(!r&&!B?.includes(e)){var s=v.deps;if((v.f&Qe)!==0)e.rv<Ce&&(e.rv=Ce,A===null&&s!==null&&s[k]===e?k++:A===null?A=[e]:(!X||!A.includes(e))&&A.push(e));else{(v.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[v]:i.includes(v)||i.push(v)}}}else if(n&&e.deps===null&&e.effects===null){var a=e,u=a.parent;u!==null&&(u.f&N)===0&&(a.f^=N)}if(Te){if(Z.has(e))return Z.get(e);if(n){a=e;var l=a.v;return((a.f&m)===0&&a.reactions!==null||dn(a))&&(l=vt(a)),Z.set(a,l),l}}else n&&(a=e,Le(a)&&Wt(a));if((e.f&re)!==0)throw e.v;return e.v}function dn(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Z.has(t)||(t.f&O)!==0&&dn(t))return!0;return!1}function ee(e){var t=C;try{return C=!0,e()}finally{C=t}}const Ar=-7169;function x(e,t){e.f=e.f&Ar|t}function Is(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(se in e)st(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&se in n&&st(n)}}}function st(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{st(e[r],t)}catch{}const n=Nt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=mn(n);for(let s in r){const i=r[s].get;if(i)try{i.call(e)}catch{}}}}}function Ps(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const xr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ds(e){return xr.includes(e)}const Sr={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Ms(e){return e=e.toLowerCase(),Sr[e]??e}const kr=["touchstart","touchmove"];function Or(e){return kr.includes(e)}const hn=new Set,it=new Set;function Rr(e,t,n,r={}){function s(i){if(r.capture||xe.call(t,i),!i.cancelBubble)return ze(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?De(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ls(e,t,n,r,s){var i={capture:r,passive:s},a=Rr(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Qt(()=>{t.removeEventListener(e,a,i)})}function Fs(e){for(var t=0;t<e.length;t++)hn.add(e[t]);for(var n of it)n(e)}let Ot=null;function xe(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;Ot=e;var a=0,u=Ot===e&&e.__root;if(u){var l=s.indexOf(u);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=s.indexOf(t);if(f===-1)return;l<=f&&(a=l)}if(i=s[a]||e.target,i!==t){Je(e,"currentTarget",{configurable:!0,get(){return i||n}});var o=v,_=p;S(null),j(null);try{for(var d,c=[];i!==null;){var h=i.assignedSlot||i.parentNode||i.host||null;try{var T=i["__"+r];if(T!=null&&(!i.disabled||e.target===i))if(lt(T)){var[fe,...Fe]=T;fe.apply(i,[e,...Fe])}else T.call(i,e)}catch(W){d?c.push(W):d=W}if(e.cancelBubble||h===t||h===null)break;i=h}if(d){for(let W of c)queueMicrotask(()=>{throw W});throw d}}finally{e.__root=t,delete e.currentTarget,S(o),j(_)}}}function gt(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function P(e,t){var n=p;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function js(e,t){var n=(t&Fn)!==0,r=(t&jn)!==0,s,i=!e.startsWith("<!>");return()=>{if(b)return P(y,null),y;s===void 0&&(s=gt(i?e:"<!>"+e),n||(s=F(s)));var a=r||Kt?document.importNode(s,!0):s.cloneNode(!0);if(n){var u=F(a),l=a.lastChild;P(u,l)}else P(a,a);return a}}function Nr(e,t,n="svg"){var r=!e.startsWith("<!>"),s=`<${n}>${r?e:"<!>"+e}</${n}>`,i;return()=>{if(b)return P(y,null),y;if(!i){var a=gt(s),u=F(a);i=F(u)}var l=i.cloneNode(!0);return P(l,l),l}}function qs(e,t){return Nr(e,t,"svg")}function Vs(e=""){if(!b){var t=Q(e+"");return P(t,t),t}var n=y;return n.nodeType!==Ue&&(n.before(n=Q()),M(n)),P(n,n),n}function Ys(){if(b)return P(y,null),y;var e=document.createDocumentFragment(),t=document.createComment(""),n=Q();return e.append(t,n),P(t,n),e}function Bs(e,t){if(b){p.nodes_end=y,We();return}e!==null&&e.before(t)}let Rt=!0;function Hs(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function vn(e,t){return pn(e,t)}function Cr(e,t){rt(),t.intro=t.intro??!1;const n=t.target,r=b,s=y;try{for(var i=F(n);i&&(i.nodeType!==Re||i.data!==Pt);)i=$(i);if(!i)throw de;je(!0),M(i),We();const a=pn(e,{...t,anchor:i});if(y===null||y.nodeType!==Re||y.data!==Mt)throw $e(),de;return je(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw a;return a!==de&&console.warn("Failed to hydrate: ",a),t.recover===!1&&In(),rt(),Zt(n),je(!1),vn(e,t)}finally{je(r),M(s)}}const oe=new Map;function pn(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:a=!0}){rt();var u=new Set,l=_=>{for(var d=0;d<_.length;d++){var c=_[d];if(!u.has(c)){u.add(c);var h=Or(c);t.addEventListener(c,xe,{passive:h});var T=oe.get(c);T===void 0?(document.addEventListener(c,xe,{passive:h}),oe.set(c,1)):oe.set(c,T+1)}}};l(wn(hn)),it.add(l);var f=void 0,o=hr(()=>{var _=n??t.appendChild(Q());return nr(_,{pending:()=>{}},d=>{if(i){Wn({});var c=g;c.c=i}s&&(r.$$events=s),b&&P(d,null),Rt=a,f=e(d,r)||{},Rt=!0,b&&(p.nodes_end=y),i&&Gn()}),()=>{for(var d of u){t.removeEventListener(d,xe);var c=oe.get(d);--c===0?(document.removeEventListener(d,xe),oe.delete(d)):oe.set(d,c)}it.delete(l),_!==n&&_.parentNode?.removeChild(_)}});return at.set(f,o),f}let at=new WeakMap;function Ir(e,t){const n=at.get(e);return n?(at.delete(e),n(t)):Promise.resolve()}function Us(e,t,...n){var r=e,s=ne,i;tn(()=>{s!==(s=t())&&(i&&(I(i),i=null),i=K(()=>s(r,...n)))},He),b&&(r=y)}function Pr(e){return(t,...n)=>{var r=e(...n),s;if(b)s=y,We();else{var i=r.render().trim(),a=gt(i);s=F(a),t.before(s)}const u=r.setup?.(s);P(s,s),typeof u=="function"&&Qt(u)}}function gn(e,t,n){if(e==null)return t(void 0),n&&n(void 0),ne;const r=ee(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const ce=[];function Dr(e,t){return{subscribe:Mr(e,t).subscribe}}function Mr(e,t=ne){let n=null;const r=new Set;function s(u){if(Ft(e,u)&&(e=u,n)){const l=!ce.length;for(const f of r)f[1](),ce.push(f,e);if(l){for(let f=0;f<ce.length;f+=2)ce[f][0](ce[f+1]);ce.length=0}}}function i(u){s(u(e))}function a(u,l=ne){const f=[u,l];return r.add(f),r.size===1&&(n=t(s,i)||ne),u(e),()=>{r.delete(f),r.size===0&&n&&(n(),n=null)}}return{set:s,update:i,subscribe:a}}function $s(e,t,n){const r=!Array.isArray(e),s=r?[e]:e;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return Dr(n,(a,u)=>{let l=!1;const f=[];let o=0,_=ne;const d=()=>{if(o)return;_();const h=t(r?f[0]:f,a,u);i?a(h):_=typeof h=="function"?h:ne},c=s.map((h,T)=>gn(h,fe=>{f[T]=fe,o&=~(1<<T),l&&d()},()=>{o|=1<<T}));return l=!0,d(),function(){ut(c),_(),l=!1}})}function Ws(e){let t;return gn(e,n=>t=n)(),t}function Lr(){return v===null&&Cn(),(v.ac??=new AbortController).signal}function yn(e){g===null&&Ee(),Ie&&g.l!==null?yt(g).m.push(e):dr(()=>{const t=ee(e);if(typeof t=="function")return t})}function Fr(e){g===null&&Ee(),yn(()=>()=>ee(e))}function jr(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function qr(){const e=g;return e===null&&Ee(),(t,n,r)=>{const s=e.s.$$events?.[t];if(s){const i=lt(s)?s.slice():[s],a=jr(t,n,r);for(const u of i)u.call(e.x,a);return!a.defaultPrevented}return!0}}function Vr(e){g===null&&Ee(),g.l===null&&It(),yt(g).b.push(e)}function Yr(e){g===null&&Ee(),g.l===null&&It(),yt(g).a.push(e)}function yt(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Gs=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:Yr,beforeUpdate:Vr,createEventDispatcher:qr,createRawSnippet:Pr,flushSync:Ht,getAbortSignal:Lr,getAllContexts:$n,getContext:Bn,hasContext:Un,hydrate:Cr,mount:vn,onDestroy:Fr,onMount:yn,setContext:Hn,settled:Tr,tick:Er,unmount:Ir,untrack:ee},Symbol.toStringTag,{value:"Module"}));export{ns as $,qe as A,g as B,xs as C,ut as D,He as E,Hr as F,Is as G,ht as H,cs as I,Rs as J,Hs as K,os as L,Dt as M,Yn as N,M as O,je as P,Ns as Q,ne as R,se as S,hs as T,E as U,gn as V,Ws as W,Qt as X,Je as Y,Se as Z,Kr as _,bs as a,Ds as a$,ur as a0,Ae as a1,Te as a2,p as a3,we as a4,rs as a5,Ie as a6,ts as a7,es as a8,ss as a9,lt as aA,Ne as aB,Xr as aC,J as aD,I as aE,zr as aF,Qr as aG,$ as aH,an as aI,Zt as aJ,yr as aK,Zr as aL,Jr as aM,us as aN,gs as aO,As as aP,ir as aQ,ls as aR,Ps as aS,Rr as aT,Es as aU,Ms as aV,_s as aW,or as aX,as as aY,Nt as aZ,Wr as a_,$r as aa,Me as ab,ps as ac,j as ad,Cr as ae,vn as af,Ht as ag,Ir as ah,Er as ai,Ys as aj,ds as ak,Vs as al,ks as am,Os as an,qs as ao,qr as ap,Ls as aq,Cs as ar,Ur as as,Fs as at,Fr as au,Us as av,F as aw,Re as ax,Mt as ay,wn as az,Bs as b,mn as b0,Ze as b1,Mr as b2,Rt as b3,be as b4,ct as b5,is as b6,ze as b7,Br as b8,gr as b9,$e as ba,de as bb,P as bc,gt as bd,Ft as be,Ts as bf,$s as bg,vs as bh,Gs as bi,ys as c,V as d,Gn as e,js as f,G as g,Y as h,Ss as i,pt as j,ee as k,b as l,We as m,Vn as n,yn as o,Wn as p,De as q,fs as r,ws as s,tn as t,dr as u,Q as v,K as w,w as x,ms as y,y as z};
|