@meddleware/dev 0.0.4 → 0.0.6

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 (24) hide show
  1. package/docs/.vitepress/cache/deps/@meddleware_ui.js +614 -0
  2. package/docs/.vitepress/cache/deps/@meddleware_ui.js.map +1 -0
  3. package/docs/.vitepress/cache/deps/_metadata.json +56 -0
  4. package/docs/.vitepress/cache/deps/package.json +3 -0
  5. package/docs/.vitepress/cache/deps/vitepress_n_@vue_devtools-api.js +3808 -0
  6. package/docs/.vitepress/cache/deps/vitepress_n_@vue_devtools-api.js.map +1 -0
  7. package/docs/.vitepress/cache/deps/vitepress_n_@vueuse_core.js +10171 -0
  8. package/docs/.vitepress/cache/deps/vitepress_n_@vueuse_core.js.map +1 -0
  9. package/docs/.vitepress/cache/deps/vitepress_n_@vueuse_integrations_useFocusTrap.js +1225 -0
  10. package/docs/.vitepress/cache/deps/vitepress_n_@vueuse_integrations_useFocusTrap.js.map +1 -0
  11. package/docs/.vitepress/cache/deps/vitepress_n_mark__js_src_vanilla__js.js +1492 -0
  12. package/docs/.vitepress/cache/deps/vitepress_n_mark__js_src_vanilla__js.js.map +1 -0
  13. package/docs/.vitepress/cache/deps/vitepress_n_minisearch.js +1773 -0
  14. package/docs/.vitepress/cache/deps/vitepress_n_minisearch.js.map +1 -0
  15. package/docs/.vitepress/cache/deps/vue.js +2 -0
  16. package/docs/.vitepress/cache/deps/vue.runtime.esm-bundler-Bo_ScjpA.js +8890 -0
  17. package/docs/.vitepress/cache/deps/vue.runtime.esm-bundler-Bo_ScjpA.js.map +1 -0
  18. package/docs/.vitepress/config.ts +1 -4
  19. package/docs/.vitepress/theme/Layout.vue +13 -0
  20. package/docs/.vitepress/theme/custom.css +6 -0
  21. package/docs/.vitepress/theme/index.ts +2 -0
  22. package/docs/index.md +0 -4
  23. package/package.json +2 -2
  24. package/tsconfig.json +1 -1
@@ -0,0 +1,614 @@
1
+ import { $ as createTextVNode, Cn as withDirectives, Dt as mergeProps, Ft as onMounted, Jt as renderSlot, K as createCommentVNode, Kn as ref, M as Fragment, U as computed, Vt as openBlock, W as createBaseVNode, ar as normalizeClass, cr as toDisplayString, gn as watch, ln as useModel, nr as unref, nt as defineComponent, q as createElementBlock, qt as renderList, sr as normalizeStyle, x as vModelSelect, zt as onUnmounted } from "./vue.runtime.esm-bundler-Bo_ScjpA.js";
2
+ //#region node_modules/@meddleware/ui/dist/ui.js
3
+ function v(e, t) {
4
+ let n;
5
+ return n = e === "transparent" ? {
6
+ "--_bg": "transparent",
7
+ "--_surface": "transparent",
8
+ "--_text": "var(--text)",
9
+ "--_muted": "var(--muted)",
10
+ "--_border": "transparent"
11
+ } : e === "light" ? {
12
+ "--_bg": "var(--mw-panel-light-bg)",
13
+ "--_surface": "var(--mw-panel-light-surface)",
14
+ "--_text": "var(--mw-panel-light-text)",
15
+ "--_muted": "var(--mw-panel-light-muted)",
16
+ "--_border": "var(--mw-panel-light-border)"
17
+ } : {
18
+ "--_bg": "var(--mw-panel-dark-bg)",
19
+ "--_surface": "var(--mw-panel-dark-surface)",
20
+ "--_text": "var(--mw-panel-dark-text)",
21
+ "--_muted": "var(--mw-panel-dark-muted)",
22
+ "--_border": "var(--mw-panel-dark-border)"
23
+ }, t && (t.bg && (n["--_bg"] = t.bg), t.surface && (n["--_surface"] = t.surface), t.text && (n["--_text"] = t.text), t.muted && (n["--_muted"] = t.muted), t.border && (n["--_border"] = t.border)), n;
24
+ }
25
+ var ie = { class: "mw-header__brand" };
26
+ var ae = { class: "mw-header__center" };
27
+ var oe = { class: "mw-header__actions" };
28
+ var se = /*@__PURE__*/ defineComponent({
29
+ __name: "AppHeader",
30
+ props: {
31
+ variant: { default: "dark" },
32
+ colors: {},
33
+ sticky: {
34
+ type: Boolean,
35
+ default: !0
36
+ }
37
+ },
38
+ setup(e) {
39
+ let n = e, a = computed(() => v(n.variant, n.colors));
40
+ return (t, n) => (openBlock(), createElementBlock("header", {
41
+ class: normalizeClass(["mw-header", [`mw-header--${e.variant}`, { "mw-header--sticky": e.sticky }]]),
42
+ style: normalizeStyle(a.value)
43
+ }, [
44
+ createBaseVNode("div", ie, [renderSlot(t.$slots, "brand", {}, void 0, !0)]),
45
+ createBaseVNode("div", ae, [renderSlot(t.$slots, "default", {}, void 0, !0)]),
46
+ createBaseVNode("div", oe, [renderSlot(t.$slots, "actions", {}, void 0, !0)])
47
+ ], 6));
48
+ }
49
+ });
50
+ var y = (e, t) => {
51
+ let n = e.__vccOpts || e;
52
+ for (let [e, r] of t) n[e] = r;
53
+ return n;
54
+ };
55
+ var ce = /*#__PURE__*/ y(se, [["__scopeId", "data-v-9b9826d5"]]);
56
+ var le = {
57
+ key: 0,
58
+ class: "mw-sidebar__head"
59
+ };
60
+ var ue = {
61
+ class: "mw-sidebar__nav",
62
+ "aria-label": "Primary"
63
+ };
64
+ var de = {
65
+ key: 1,
66
+ class: "mw-sidebar__body"
67
+ };
68
+ var b = {
69
+ key: 2,
70
+ class: "mw-sidebar__foot"
71
+ };
72
+ var x = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
73
+ __name: "AppSidebar",
74
+ props: {
75
+ variant: { default: "dark" },
76
+ colors: {},
77
+ width: {}
78
+ },
79
+ setup(e) {
80
+ let a = e, o = computed(() => {
81
+ let e = v(a.variant, a.colors);
82
+ return a.width && (e["--mw-sidebar-width"] = a.width), e;
83
+ });
84
+ return (t, a) => (openBlock(), createElementBlock("aside", {
85
+ class: normalizeClass(["mw-sidebar", `mw-sidebar--${e.variant}`]),
86
+ style: normalizeStyle(o.value)
87
+ }, [
88
+ t.$slots.head ? (openBlock(), createElementBlock("div", le, [renderSlot(t.$slots, "head", {}, void 0, !0)])) : createCommentVNode("", !0),
89
+ createBaseVNode("nav", ue, [renderSlot(t.$slots, "default", {}, void 0, !0)]),
90
+ t.$slots.body ? (openBlock(), createElementBlock("div", de, [renderSlot(t.$slots, "body", {}, void 0, !0)])) : createCommentVNode("", !0),
91
+ t.$slots.foot ? (openBlock(), createElementBlock("div", b, [renderSlot(t.$slots, "foot", {}, void 0, !0)])) : createCommentVNode("", !0)
92
+ ], 6));
93
+ }
94
+ }), [["__scopeId", "data-v-a2b8405c"]]);
95
+ function S(e) {
96
+ if (e) try {
97
+ let t = new URL(e);
98
+ if (t.protocol === "https:" || t.protocol === "http:" && (t.hostname === "localhost" || t.hostname === "127.0.0.1")) return e;
99
+ } catch {}
100
+ }
101
+ var C = { class: "mw-footer__start" };
102
+ var w = { class: "mw-footer__center" };
103
+ var T = { class: "mw-footer__end" };
104
+ var E = ["href"];
105
+ var D = ["href"];
106
+ var O = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
107
+ __name: "AppFooter",
108
+ props: {
109
+ variant: { default: "transparent" },
110
+ colors: {},
111
+ docsUrl: {},
112
+ devUrl: {}
113
+ },
114
+ setup(e) {
115
+ let a = e, o = computed(() => v(a.variant, a.colors));
116
+ return (t, a) => (openBlock(), createElementBlock("footer", {
117
+ class: normalizeClass(["mw-footer", `mw-footer--${e.variant}`]),
118
+ style: normalizeStyle(o.value)
119
+ }, [
120
+ createBaseVNode("div", C, [renderSlot(t.$slots, "start", {}, void 0, !0)]),
121
+ createBaseVNode("div", w, [renderSlot(t.$slots, "default", {}, void 0, !0)]),
122
+ createBaseVNode("div", T, [
123
+ renderSlot(t.$slots, "end", {}, void 0, !0),
124
+ e.docsUrl ? (openBlock(), createElementBlock("a", {
125
+ key: 0,
126
+ href: unref(S)(e.docsUrl),
127
+ target: "_blank",
128
+ rel: "noopener noreferrer",
129
+ class: "mw-footer__docs-link"
130
+ }, "Documentation", 8, E)) : createCommentVNode("", !0),
131
+ e.devUrl ? (openBlock(), createElementBlock("a", {
132
+ key: 1,
133
+ href: unref(S)(e.devUrl),
134
+ target: "_blank",
135
+ rel: "noopener noreferrer",
136
+ "aria-label": "Developer documentation",
137
+ class: "mw-footer__docs-link"
138
+ }, "Developer docs", 8, D)) : createCommentVNode("", !0)
139
+ ])
140
+ ], 6));
141
+ }
142
+ }), [["__scopeId", "data-v-979579a9"]]);
143
+ var k = {
144
+ class: "mw-mode",
145
+ role: "group",
146
+ "aria-label": "Colour mode"
147
+ };
148
+ var A = [
149
+ "aria-pressed",
150
+ "title",
151
+ "onClick"
152
+ ];
153
+ var j = { "aria-hidden": "true" };
154
+ var M = { class: "mw-mode__label" };
155
+ var N = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
156
+ __name: "ColorModeControl",
157
+ props: {
158
+ modelValue: {},
159
+ modes: { default: () => [
160
+ "light",
161
+ "dark",
162
+ "system"
163
+ ] }
164
+ },
165
+ emits: ["update:modelValue"],
166
+ setup(t) {
167
+ let n = {
168
+ light: "Light",
169
+ dark: "Dark",
170
+ system: "System"
171
+ }, a = {
172
+ light: "☀",
173
+ dark: "☾",
174
+ system: "🖵"
175
+ };
176
+ return (o, s) => (openBlock(), createElementBlock("div", k, [(openBlock(!0), createElementBlock(Fragment, null, renderList(t.modes, (e) => (openBlock(), createElementBlock("button", {
177
+ key: e,
178
+ type: "button",
179
+ class: normalizeClass(["mw-mode__btn", { "is-active": t.modelValue === e }]),
180
+ "aria-pressed": t.modelValue === e,
181
+ title: n[e],
182
+ onClick: (t) => o.$emit("update:modelValue", e)
183
+ }, [createBaseVNode("span", j, toDisplayString(a[e]), 1), createBaseVNode("span", M, toDisplayString(n[e]), 1)], 10, A))), 128))]));
184
+ }
185
+ }), [["__scopeId", "data-v-e2ea0d79"]]);
186
+ var P = ["type", "disabled"];
187
+ var F = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
188
+ __name: "UiButton",
189
+ props: {
190
+ variant: { default: "primary" },
191
+ type: { default: "button" },
192
+ disabled: {
193
+ type: Boolean,
194
+ default: !1
195
+ }
196
+ },
197
+ setup(e) {
198
+ return (t, n) => (openBlock(), createElementBlock("button", {
199
+ type: e.type,
200
+ disabled: e.disabled,
201
+ class: normalizeClass(["mw-btn", `mw-btn--${e.variant}`])
202
+ }, [renderSlot(t.$slots, "default", {}, void 0, !0)], 10, P));
203
+ }
204
+ }), [["__scopeId", "data-v-bc33cc23"]]);
205
+ var I = { class: "mw-card" };
206
+ var L = {
207
+ key: 0,
208
+ class: "mw-card__header"
209
+ };
210
+ var R = { class: "mw-card__title" };
211
+ var z = { class: "mw-card__body" };
212
+ var B = {
213
+ key: 1,
214
+ class: "mw-card__footer"
215
+ };
216
+ var V = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
217
+ __name: "UiCard",
218
+ props: { title: {} },
219
+ setup(e) {
220
+ return (t, a) => (openBlock(), createElementBlock("section", I, [
221
+ e.title || t.$slots.header ? (openBlock(), createElementBlock("header", L, [renderSlot(t.$slots, "header", {}, () => [createBaseVNode("h3", R, toDisplayString(e.title), 1)], !0)])) : createCommentVNode("", !0),
222
+ createBaseVNode("div", z, [renderSlot(t.$slots, "default", {}, void 0, !0)]),
223
+ t.$slots.footer ? (openBlock(), createElementBlock("footer", B, [renderSlot(t.$slots, "footer", {}, void 0, !0)])) : createCommentVNode("", !0)
224
+ ]));
225
+ }
226
+ }), [["__scopeId", "data-v-883f87f5"]]);
227
+ var H = { class: "mw-select" };
228
+ var fe = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
229
+ inheritAttrs: !1,
230
+ __name: "UiSelect",
231
+ props: {
232
+ modelValue: {},
233
+ modelModifiers: {}
234
+ },
235
+ emits: ["update:modelValue"],
236
+ setup(e) {
237
+ let t = useModel(e, "modelValue");
238
+ return (e, n) => (openBlock(), createElementBlock("div", H, [withDirectives(createBaseVNode("select", mergeProps(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [renderSlot(e.$slots, "default", {}, void 0, !0)], 16), [[vModelSelect, t.value]]), n[1] ||= createBaseVNode("svg", {
239
+ class: "mw-select__chevron",
240
+ xmlns: "http://www.w3.org/2000/svg",
241
+ width: "12",
242
+ height: "8",
243
+ viewBox: "0 0 12 8",
244
+ "aria-hidden": "true"
245
+ }, [createBaseVNode("path", { d: "M1 1l5 5 5-5" })], -1)]));
246
+ }
247
+ }), [["__scopeId", "data-v-7e206184"]]);
248
+ var pe = ["role"];
249
+ var me = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
250
+ __name: "UiNotice",
251
+ props: { type: {} },
252
+ setup(e) {
253
+ let n = e, i = computed(() => {
254
+ if (n.type === "error") return "alert";
255
+ if (n.type === "ok") return "status";
256
+ });
257
+ return (t, n) => (openBlock(), createElementBlock("p", {
258
+ class: normalizeClass(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
259
+ role: i.value
260
+ }, [renderSlot(t.$slots, "default", {}, void 0, !0)], 10, pe));
261
+ }
262
+ }), [["__scopeId", "data-v-ee7fffb1"]]);
263
+ var he = ["disabled", "aria-current"];
264
+ var ge = {
265
+ key: 0,
266
+ class: "sidebar-item__icon",
267
+ "aria-hidden": "true"
268
+ };
269
+ var _e = { class: "sidebar-item__label" };
270
+ var ve = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
271
+ __name: "SidebarItem",
272
+ props: {
273
+ label: {},
274
+ icon: {},
275
+ active: {
276
+ type: Boolean,
277
+ default: !1
278
+ },
279
+ disabled: {
280
+ type: Boolean,
281
+ default: !1
282
+ }
283
+ },
284
+ setup(e) {
285
+ return (t, a) => (openBlock(), createElementBlock("button", {
286
+ type: "button",
287
+ class: normalizeClass(["sidebar-item", { "is-active": e.active }]),
288
+ disabled: e.disabled,
289
+ "aria-current": e.active ? "page" : void 0
290
+ }, [e.icon ? (openBlock(), createElementBlock("span", ge, toDisplayString(e.icon), 1)) : createCommentVNode("", !0), createBaseVNode("span", _e, toDisplayString(e.label), 1)], 10, he));
291
+ }
292
+ }), [["__scopeId", "data-v-8da2d583"]]);
293
+ var ye = ["aria-label"];
294
+ var be = ["aria-current", "onClick"];
295
+ var U = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
296
+ __name: "AppTabNav",
297
+ props: {
298
+ tabs: {},
299
+ modelValue: {},
300
+ ariaLabel: {}
301
+ },
302
+ emits: ["update:modelValue"],
303
+ setup(t, { emit: n }) {
304
+ let i = n;
305
+ return (n, a) => (openBlock(), createElementBlock("nav", {
306
+ class: "mw-tab-nav",
307
+ "aria-label": t.ariaLabel
308
+ }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(t.tabs, (e) => (openBlock(), createElementBlock("button", {
309
+ key: e.id,
310
+ type: "button",
311
+ class: normalizeClass(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
312
+ "aria-current": t.modelValue === e.id ? "page" : void 0,
313
+ onClick: (t) => i("update:modelValue", e.id)
314
+ }, toDisplayString(e.label), 11, be))), 128))], 8, ye));
315
+ }
316
+ }), [["__scopeId", "data-v-97d31503"]]);
317
+ var xe = { class: "ca-root" };
318
+ var Se = ["title"];
319
+ var Ce = ["title", "aria-label"];
320
+ var we = {
321
+ key: 0,
322
+ class: "ca-icon",
323
+ viewBox: "0 0 24 24",
324
+ width: "1em",
325
+ height: "1em",
326
+ fill: "none",
327
+ stroke: "currentColor",
328
+ "stroke-width": "2",
329
+ "stroke-linecap": "round",
330
+ "stroke-linejoin": "round",
331
+ "aria-hidden": "true"
332
+ };
333
+ var Te = {
334
+ key: 1,
335
+ class: "ca-icon",
336
+ viewBox: "0 0 24 24",
337
+ width: "1em",
338
+ height: "1em",
339
+ fill: "none",
340
+ stroke: "currentColor",
341
+ "stroke-width": "2",
342
+ "stroke-linecap": "round",
343
+ "stroke-linejoin": "round",
344
+ "aria-hidden": "true"
345
+ };
346
+ var Ee = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
347
+ __name: "CopyableAddress",
348
+ props: {
349
+ address: {},
350
+ truncate: {
351
+ type: Boolean,
352
+ default: !0
353
+ },
354
+ chars: { default: () => [6, 4] },
355
+ label: { default: "Copy" }
356
+ },
357
+ setup(e) {
358
+ let n = e, o = ref(!1), s = computed(() => {
359
+ if (!n.truncate) return n.address;
360
+ let [e, t] = n.chars;
361
+ return `${n.address.slice(0, e)}…${n.address.slice(-t)}`;
362
+ });
363
+ async function l() {
364
+ await navigator.clipboard.writeText(n.address), o.value = !0, setTimeout(() => {
365
+ o.value = !1;
366
+ }, 1500);
367
+ }
368
+ return (t, n) => (openBlock(), createElementBlock("span", xe, [createBaseVNode("span", {
369
+ class: "ca-value",
370
+ title: e.address
371
+ }, [renderSlot(t.$slots, "default", {}, () => [createTextVNode(toDisplayString(s.value), 1)], !0)], 8, Se), createBaseVNode("button", {
372
+ type: "button",
373
+ class: normalizeClass(["ca-copy", { "ca-copy--copied": o.value }]),
374
+ title: o.value ? "Copied!" : e.label,
375
+ "aria-label": o.value ? "Copied" : e.label,
376
+ onClick: l
377
+ }, [o.value ? (openBlock(), createElementBlock("svg", we, [...n[0] ||= [createBaseVNode("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (openBlock(), createElementBlock("svg", Te, [...n[1] ||= [createBaseVNode("rect", {
378
+ x: "9",
379
+ y: "9",
380
+ width: "13",
381
+ height: "13",
382
+ rx: "2",
383
+ ry: "2"
384
+ }, null, -1), createBaseVNode("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10, Ce)]));
385
+ }
386
+ }), [["__scopeId", "data-v-b43dabdd"]]);
387
+ var De = ["href", "title"];
388
+ var Oe = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
389
+ __name: "ExplorerLink",
390
+ props: {
391
+ href: {},
392
+ value: {},
393
+ truncate: {
394
+ type: Boolean,
395
+ default: !0
396
+ },
397
+ chars: { default: () => [6, 4] }
398
+ },
399
+ setup(e) {
400
+ let n = e, i = computed(() => {
401
+ if (!n.value) return "";
402
+ if (!n.truncate) return n.value;
403
+ let [e, t] = n.chars;
404
+ return `${n.value.slice(0, e)}…${n.value.slice(-t)}`;
405
+ });
406
+ return (t, n) => (openBlock(), createElementBlock("a", {
407
+ class: "el-root",
408
+ href: unref(S)(e.href),
409
+ target: "_blank",
410
+ rel: "noopener noreferrer",
411
+ title: e.value
412
+ }, [renderSlot(t.$slots, "default", {}, () => [createTextVNode(toDisplayString(i.value), 1)], !0)], 8, De));
413
+ }
414
+ }), [["__scopeId", "data-v-073d1bbe"]]);
415
+ var ke = { class: "copyright-line" };
416
+ var Ae = ["href", "aria-label"];
417
+ var je = { key: 0 };
418
+ var Me = { key: 1 };
419
+ var Ne = {
420
+ key: 2,
421
+ class: "kopimi-symbol"
422
+ };
423
+ var Pe = { class: "text-content" };
424
+ var Fe = { key: 0 };
425
+ var Ie = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
426
+ __name: "CopyrightLine",
427
+ props: {
428
+ organisationName: {},
429
+ year: { default: () => (/* @__PURE__ */ new Date()).getFullYear() },
430
+ rightsStatement: { default: "all" },
431
+ symbolVariant: { default: "copyright" },
432
+ symbolHref: {},
433
+ symbolLabel: {}
434
+ },
435
+ setup(e) {
436
+ let o = e, s = computed(() => o.symbolVariant), c = computed(() => o.symbolHref || (s.value === "kopimi" ? "/legal/powr.broccoli-kopimi.pdf" : s.value === "copyleft" ? "/legal/copyleft.html" : "/legal/copyright.html")), l = computed(() => o.symbolLabel || (s.value === "kopimi" ? "Kopimi legal notice" : s.value === "copyleft" ? "Copyleft legal notice" : "Copyright legal notice")), u = computed(() => o.rightsStatement === "" ? "" : o.rightsStatement === "none" ? "No rights reserved." : o.rightsStatement === "all" || !o.rightsStatement ? "All rights reserved." : o.rightsStatement === "jam" ? "All jams preserved." : o.rightsStatement);
437
+ return (t, o) => (openBlock(), createElementBlock("small", ke, [createBaseVNode("a", {
438
+ href: c.value,
439
+ class: "symbol-link",
440
+ target: "_blank",
441
+ rel: "noopener noreferrer",
442
+ "aria-label": l.value
443
+ }, [s.value === "copyright" ? (openBlock(), createElementBlock("span", je, "©")) : s.value === "copyleft" ? (openBlock(), createElementBlock("span", Me, "🄯")) : s.value === "kopimi" ? (openBlock(), createElementBlock("span", Ne, [...o[0] ||= [createBaseVNode("svg", {
444
+ viewBox: "0 0 24 24",
445
+ width: "1em",
446
+ height: "1em",
447
+ "aria-hidden": "true",
448
+ focusable: "false",
449
+ class: "kopimi-mark"
450
+ }, [createBaseVNode("path", {
451
+ d: "M12 4L22 23H2Z",
452
+ fill: "none",
453
+ stroke: "currentColor",
454
+ "stroke-width": "1.5"
455
+ }), createBaseVNode("text", {
456
+ x: "12",
457
+ y: "18",
458
+ "text-anchor": "middle",
459
+ "dominant-baseline": "middle",
460
+ "font-family": "system-ui, sans-serif",
461
+ "font-size": "11",
462
+ fill: "currentColor"
463
+ }, " C ")], -1)]])) : createCommentVNode("", !0)], 8, Ae), createBaseVNode("span", Pe, [createTextVNode(toDisplayString(e.year) + " " + toDisplayString(e.organisationName) + ".", 1), u.value ? (openBlock(), createElementBlock("span", Fe, toDisplayString(` ${u.value}`), 1)) : createCommentVNode("", !0)])]));
464
+ }
465
+ }), [["__scopeId", "data-v-8e4db6fe"]]);
466
+ var Le = /* @__PURE__ */ new Set([
467
+ "operational",
468
+ "degraded",
469
+ "down",
470
+ "unknown"
471
+ ]);
472
+ function W(e) {
473
+ return typeof e == "string" && Le.has(e);
474
+ }
475
+ function G(e) {
476
+ return W(e) ? e : "unknown";
477
+ }
478
+ function K(e) {
479
+ return typeof e != "string" || e.trim() === "" ? "" : e.replace(/[<>&"]/g, "");
480
+ }
481
+ function Re(e) {
482
+ if (typeof e != "object" || !e) return null;
483
+ let t = e, n = K(t.name);
484
+ return n ? {
485
+ name: n,
486
+ status: G(t.status)
487
+ } : null;
488
+ }
489
+ function ze(e) {
490
+ if (typeof e != "object" || !e) return null;
491
+ let t = e, n = K(t.name);
492
+ if (!n) return null;
493
+ let r = Array.isArray(t.components) ? t.components.map(Re).filter((e) => e !== null) : [];
494
+ return {
495
+ name: n,
496
+ status: G(t.status),
497
+ components: r
498
+ };
499
+ }
500
+ function q(e) {
501
+ if (typeof e != "object" || !e) return null;
502
+ let t = e;
503
+ if (!W(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups)) return null;
504
+ let n = t.groups.map(ze).filter((e) => e !== null);
505
+ return {
506
+ generated_at: t.generated_at,
507
+ overall: t.overall,
508
+ groups: n
509
+ };
510
+ }
511
+ var Be = ["href", "title"];
512
+ var Ve = { class: "status-widget__label" };
513
+ var He = /*#__PURE__*/ y(/* @__PURE__ */ defineComponent({
514
+ __name: "StatusWidget",
515
+ props: {
516
+ apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
517
+ href: { default: "https://status.meddleware.co.uk" },
518
+ pollInterval: { default: 6e4 }
519
+ },
520
+ setup(e) {
521
+ let t = e, n = {
522
+ operational: "ok",
523
+ degraded: "degraded",
524
+ down: "error",
525
+ unknown: "degraded"
526
+ }, a = {
527
+ operational: "All systems operational",
528
+ degraded: "Degraded",
529
+ down: "Major outage",
530
+ unknown: "Status unknown"
531
+ }, o = ref("ok"), s = ref("All systems operational"), l = null;
532
+ async function p() {
533
+ try {
534
+ let e = await fetch(t.apiUrl);
535
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
536
+ let r = q(await e.json());
537
+ if (!r) throw Error("unexpected response shape");
538
+ o.value = n[r.overall], s.value = a[r.overall];
539
+ } catch {
540
+ o.value = "error", s.value = "Status unavailable";
541
+ }
542
+ }
543
+ return onMounted(() => {
544
+ p(), l = setInterval(p, t.pollInterval);
545
+ }), onUnmounted(() => {
546
+ l !== null && clearInterval(l);
547
+ }), (t, n) => (openBlock(), createElementBlock("a", {
548
+ href: unref(S)(e.href),
549
+ target: "_blank",
550
+ rel: "noopener noreferrer",
551
+ class: normalizeClass(["status-widget", `status-widget--${o.value}`]),
552
+ title: `Platform status: ${s.value}`
553
+ }, [n[0] ||= createBaseVNode("span", {
554
+ class: "status-widget__dot",
555
+ "aria-hidden": "true"
556
+ }, null, -1), createBaseVNode("span", Ve, toDisplayString(s.value), 1)], 10, Be));
557
+ }
558
+ }), [["__scopeId", "data-v-6436368e"]]);
559
+ var J = {
560
+ mainnet: "https://suivision.xyz",
561
+ testnet: "https://testnet.suivision.xyz",
562
+ devnet: "https://devnet.suivision.xyz"
563
+ };
564
+ function Ue(e, t, n = "testnet") {
565
+ return `${J[n] ?? J.testnet}/${e}/${t}`;
566
+ }
567
+ var Y = "mw-color-mode";
568
+ var X = ref("system");
569
+ var Z = !1;
570
+ function We() {
571
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
572
+ }
573
+ function Q(e) {
574
+ return e === "dark" || e === "system" && We();
575
+ }
576
+ function $(e) {
577
+ typeof document < "u" && document.documentElement.setAttribute("data-theme", Q(e) ? "dark" : "light");
578
+ }
579
+ function Ge(e = "system") {
580
+ if (!Z) {
581
+ Z = !0;
582
+ let t = null;
583
+ try {
584
+ t = typeof localStorage < "u" ? localStorage.getItem(Y) : null;
585
+ } catch {}
586
+ X.value = t ?? e, $(X.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
587
+ X.value === "system" && $("system");
588
+ }), watch(X, (e) => {
589
+ $(e);
590
+ try {
591
+ typeof localStorage < "u" && localStorage.setItem(Y, e);
592
+ } catch {}
593
+ });
594
+ }
595
+ function t(e) {
596
+ X.value = e;
597
+ }
598
+ function n() {
599
+ t(X.value === "light" ? "dark" : X.value === "dark" ? "system" : "light");
600
+ }
601
+ return {
602
+ mode: X,
603
+ set: t,
604
+ cycle: n,
605
+ isDark: () => Q(X.value)
606
+ };
607
+ }
608
+ function Ke() {
609
+ if (typeof document > "u") return;
610
+ let e = (/* @__PURE__ */ new Date()).getMonth(), t = e >= 2 && e <= 4 ? "spring" : e >= 5 && e <= 7 ? "summer" : e >= 8 && e <= 10 ? "autumn" : "winter";
611
+ document.documentElement.dataset.season = t;
612
+ }
613
+ //#endregion
614
+ export { O as AppFooter, ce as AppHeader, x as AppSidebar, U as AppTabNav, N as ColorModeControl, Ee as CopyableAddress, Ie as CopyrightLine, Oe as ExplorerLink, ve as SidebarItem, He as StatusWidget, F as UiButton, V as UiCard, me as UiNotice, fe as UiSelect, W as isStatusLevel, q as parseSnapshot, S as safeHref, Ue as suiExplorerUrl, Ge as useColorMode, Ke as useSeason };