nebula-cms 0.1.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 (241) hide show
  1. package/.claude/settings.local.json +42 -0
  2. package/.github/workflows/ci.yml +31 -0
  3. package/.mcp.json +12 -0
  4. package/.prettierignore +5 -0
  5. package/.prettierrc.cjs +22 -0
  6. package/AGENTS.md +183 -0
  7. package/LICENSE +201 -0
  8. package/README.md +128 -0
  9. package/package.json +74 -0
  10. package/playground/.claude/settings.local.json +5 -0
  11. package/playground/astro.config.mjs +7 -0
  12. package/playground/node_modules/.bin/astro +21 -0
  13. package/playground/node_modules/.bin/rollup +21 -0
  14. package/playground/node_modules/.bin/tsc +21 -0
  15. package/playground/node_modules/.bin/tsserver +21 -0
  16. package/playground/node_modules/.bin/vite +21 -0
  17. package/playground/node_modules/.vite/_svelte_metadata.json +1 -0
  18. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +80 -0
  19. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +7 -0
  20. package/playground/node_modules/.vite/deps/_metadata.json +184 -0
  21. package/playground/node_modules/.vite/deps/astro___aria-query.js +6776 -0
  22. package/playground/node_modules/.vite/deps/astro___aria-query.js.map +7 -0
  23. package/playground/node_modules/.vite/deps/astro___axobject-query.js +3754 -0
  24. package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +7 -0
  25. package/playground/node_modules/.vite/deps/astro___html-escaper.js +34 -0
  26. package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +7 -0
  27. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
  28. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +7 -0
  29. package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js +1005 -0
  30. package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js.map +7 -0
  31. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +8 -0
  32. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +7 -0
  33. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +21 -0
  34. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +7 -0
  35. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +223 -0
  36. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +7 -0
  37. package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js +204 -0
  38. package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js.map +7 -0
  39. package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js +27 -0
  40. package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js.map +7 -0
  41. package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js +4376 -0
  42. package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js.map +7 -0
  43. package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js +688 -0
  44. package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js.map +7 -0
  45. package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js +5099 -0
  46. package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js.map +7 -0
  47. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +23 -0
  48. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +7 -0
  49. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +148 -0
  50. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +7 -0
  51. package/playground/node_modules/.vite/deps/package.json +3 -0
  52. package/playground/node_modules/.vite/deps/smol-toml.js +843 -0
  53. package/playground/node_modules/.vite/deps/smol-toml.js.map +7 -0
  54. package/playground/node_modules/.vite/deps/svelte.js +55 -0
  55. package/playground/node_modules/.vite/deps/svelte.js.map +7 -0
  56. package/playground/node_modules/.vite/deps/svelte___clsx.js +9 -0
  57. package/playground/node_modules/.vite/deps/svelte___clsx.js.map +7 -0
  58. package/playground/node_modules/.vite/deps/svelte_animate.js +57 -0
  59. package/playground/node_modules/.vite/deps/svelte_animate.js.map +7 -0
  60. package/playground/node_modules/.vite/deps/svelte_attachments.js +15 -0
  61. package/playground/node_modules/.vite/deps/svelte_attachments.js.map +7 -0
  62. package/playground/node_modules/.vite/deps/svelte_easing.js +67 -0
  63. package/playground/node_modules/.vite/deps/svelte_easing.js.map +7 -0
  64. package/playground/node_modules/.vite/deps/svelte_events.js +11 -0
  65. package/playground/node_modules/.vite/deps/svelte_events.js.map +7 -0
  66. package/playground/node_modules/.vite/deps/svelte_internal.js +5 -0
  67. package/playground/node_modules/.vite/deps/svelte_internal.js.map +7 -0
  68. package/playground/node_modules/.vite/deps/svelte_internal_client.js +402 -0
  69. package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +7 -0
  70. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +10 -0
  71. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +7 -0
  72. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +8 -0
  73. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +7 -0
  74. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +8 -0
  75. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +7 -0
  76. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +8 -0
  77. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +7 -0
  78. package/playground/node_modules/.vite/deps/svelte_legacy.js +35 -0
  79. package/playground/node_modules/.vite/deps/svelte_legacy.js.map +7 -0
  80. package/playground/node_modules/.vite/deps/svelte_motion.js +545 -0
  81. package/playground/node_modules/.vite/deps/svelte_motion.js.map +7 -0
  82. package/playground/node_modules/.vite/deps/svelte_reactivity.js +29 -0
  83. package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +7 -0
  84. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +127 -0
  85. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +7 -0
  86. package/playground/node_modules/.vite/deps/svelte_store.js +103 -0
  87. package/playground/node_modules/.vite/deps/svelte_store.js.map +7 -0
  88. package/playground/node_modules/.vite/deps/svelte_transition.js +208 -0
  89. package/playground/node_modules/.vite/deps/svelte_transition.js.map +7 -0
  90. package/playground/package.json +16 -0
  91. package/playground/pnpm-lock.yaml +3167 -0
  92. package/playground/src/content/authors/jane-doe.json +8 -0
  93. package/playground/src/content/config/build.toml +2 -0
  94. package/playground/src/content/courses/web-fundamentals.json +29 -0
  95. package/playground/src/content/docs/advanced.mdx +6 -0
  96. package/playground/src/content/docs/intro.md +6 -0
  97. package/playground/src/content/guides/getting-started.mdx +6 -0
  98. package/playground/src/content/posts/hello-world.md +7 -0
  99. package/playground/src/content/products/t-shirt.json +16 -0
  100. package/playground/src/content/recipes/pancakes.mdoc +8 -0
  101. package/playground/src/content/settings/site.yml +2 -0
  102. package/playground/src/content.config.ts +198 -0
  103. package/playground/src/env.d.ts +1 -0
  104. package/playground/src/pages/index.astro +11 -0
  105. package/playground/src/pages/nebula.astro +14 -0
  106. package/pnpm-workspace.yaml +2 -0
  107. package/scripts/subset-icons.mjs +178 -0
  108. package/src/astro/index.ts +295 -0
  109. package/src/client/Admin.svelte +283 -0
  110. package/src/client/components/BackendPicker.svelte +291 -0
  111. package/src/client/components/DraftChip.svelte +46 -0
  112. package/src/client/components/MetadataForm.svelte +56 -0
  113. package/src/client/components/ThemeToggle.svelte +18 -0
  114. package/src/client/components/dialogs/DeleteDraftDialog.svelte +51 -0
  115. package/src/client/components/dialogs/FilenameDialog.svelte +129 -0
  116. package/src/client/components/editor/EditorPane.svelte +227 -0
  117. package/src/client/components/editor/EditorTabs.svelte +81 -0
  118. package/src/client/components/editor/EditorToolbar.svelte +131 -0
  119. package/src/client/components/editor/FormatSelector.svelte +66 -0
  120. package/src/client/components/editor/Toolbar.svelte +17 -0
  121. package/src/client/components/fields/ArrayField.svelte +339 -0
  122. package/src/client/components/fields/ArrayItem.svelte +325 -0
  123. package/src/client/components/fields/BooleanField.svelte +114 -0
  124. package/src/client/components/fields/DateField.svelte +82 -0
  125. package/src/client/components/fields/EnumField.svelte +74 -0
  126. package/src/client/components/fields/FieldWrapper.svelte +96 -0
  127. package/src/client/components/fields/NumberField.svelte +99 -0
  128. package/src/client/components/fields/ObjectField.svelte +121 -0
  129. package/src/client/components/fields/SchemaField.svelte +107 -0
  130. package/src/client/components/fields/StringField.svelte +104 -0
  131. package/src/client/components/sidebar/AdminSidebar.svelte +339 -0
  132. package/src/client/components/sidebar/AdminSidebarSort.svelte +123 -0
  133. package/src/client/css/a11y.css +14 -0
  134. package/src/client/css/btn.css +113 -0
  135. package/src/client/css/dialog.css +29 -0
  136. package/src/client/css/field-input.css +39 -0
  137. package/src/client/css/reset.css +59 -0
  138. package/src/client/css/theme.css +77 -0
  139. package/src/client/index.ts +1 -0
  140. package/src/client/js/drafts/merge.svelte.ts +121 -0
  141. package/src/client/js/drafts/ops.svelte.ts +227 -0
  142. package/src/client/js/drafts/storage.ts +108 -0
  143. package/src/client/js/drafts/workers/diff.ts +40 -0
  144. package/src/client/js/editor/editor.svelte.ts +343 -0
  145. package/src/client/js/editor/languages.ts +98 -0
  146. package/src/client/js/editor/link-wrap.ts +45 -0
  147. package/src/client/js/editor/markdown-shortcuts.ts +261 -0
  148. package/src/client/js/handlers/admin.ts +246 -0
  149. package/src/client/js/state/dialogs.svelte.ts +35 -0
  150. package/src/client/js/state/router.svelte.ts +156 -0
  151. package/src/client/js/state/schema.svelte.ts +140 -0
  152. package/src/client/js/state/state.svelte.ts +334 -0
  153. package/src/client/js/state/theme.svelte.ts +173 -0
  154. package/src/client/js/storage/adapter.ts +102 -0
  155. package/src/client/js/storage/client.ts +150 -0
  156. package/src/client/js/storage/db.ts +36 -0
  157. package/src/client/js/storage/fsa.ts +110 -0
  158. package/src/client/js/storage/github.ts +297 -0
  159. package/src/client/js/storage/storage.ts +83 -0
  160. package/src/client/js/storage/workers/frontmatter.ts +320 -0
  161. package/src/client/js/storage/workers/storage.ts +177 -0
  162. package/src/client/js/storage/workers/toml-parser.ts +106 -0
  163. package/src/client/js/storage/workers/yaml-parser.ts +132 -0
  164. package/src/client/js/utils/file-types.ts +192 -0
  165. package/src/client/js/utils/format.ts +16 -0
  166. package/src/client/js/utils/frontmatter.ts +38 -0
  167. package/src/client/js/utils/schema-utils.ts +295 -0
  168. package/src/client/js/utils/slug.ts +18 -0
  169. package/src/client/js/utils/sort.ts +84 -0
  170. package/src/client/js/utils/stable-stringify.ts +27 -0
  171. package/src/client/js/utils/url-utils.ts +38 -0
  172. package/src/types.ts +25 -0
  173. package/src/virtual.d.ts +22 -0
  174. package/svelte.config.js +4 -0
  175. package/tests/astro/build.test.ts +63 -0
  176. package/tests/astro/index.test.ts +689 -0
  177. package/tests/client/components/Admin.test.ts +446 -0
  178. package/tests/client/components/BackendPicker.test.ts +239 -0
  179. package/tests/client/components/DraftChip.test.ts +53 -0
  180. package/tests/client/components/MetadataForm.test.ts +164 -0
  181. package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +91 -0
  182. package/tests/client/components/dialogs/FilenameDialog.test.ts +209 -0
  183. package/tests/client/components/dialogs/dialog-stubs.ts +19 -0
  184. package/tests/client/components/editor/EditorPane.test.ts +100 -0
  185. package/tests/client/components/editor/EditorTabs.test.ts +253 -0
  186. package/tests/client/components/editor/EditorToolbar.test.ts +252 -0
  187. package/tests/client/components/editor/fixtures.ts +31 -0
  188. package/tests/client/components/fields/ArrayField.test.ts +197 -0
  189. package/tests/client/components/fields/BooleanField.test.ts +206 -0
  190. package/tests/client/components/fields/DateField.test.ts +210 -0
  191. package/tests/client/components/fields/EnumField.test.ts +246 -0
  192. package/tests/client/components/fields/NumberField.test.ts +240 -0
  193. package/tests/client/components/fields/ObjectField.test.ts +157 -0
  194. package/tests/client/components/fields/SchemaField.test.ts +190 -0
  195. package/tests/client/components/fields/StringField.test.ts +223 -0
  196. package/tests/client/components/sidebar/AdminSidebar.test.ts +285 -0
  197. package/tests/client/components/sidebar/AdminSidebarSort.test.ts +135 -0
  198. package/tests/client/components/sidebar/sort-mock.ts +23 -0
  199. package/tests/client/js/drafts/fixtures.ts +22 -0
  200. package/tests/client/js/drafts/merge.test.ts +282 -0
  201. package/tests/client/js/drafts/ops.test.ts +658 -0
  202. package/tests/client/js/drafts/storage.test.ts +200 -0
  203. package/tests/client/js/drafts/workers/diff.test.ts +165 -0
  204. package/tests/client/js/editor/editor.test.ts +616 -0
  205. package/tests/client/js/editor/link-wrap.test.ts +225 -0
  206. package/tests/client/js/editor/markdown-shortcuts.test.ts +370 -0
  207. package/tests/client/js/handlers/admin.test.ts +467 -0
  208. package/tests/client/js/state/router.test.ts +619 -0
  209. package/tests/client/js/state/schema.test.ts +266 -0
  210. package/tests/client/js/state/state.test.ts +328 -0
  211. package/tests/client/js/storage/adapter.test.ts +115 -0
  212. package/tests/client/js/storage/client.test.ts +250 -0
  213. package/tests/client/js/storage/db.test.ts +59 -0
  214. package/tests/client/js/storage/fsa.test.ts +284 -0
  215. package/tests/client/js/storage/github.test.ts +349 -0
  216. package/tests/client/js/storage/mock-port.ts +95 -0
  217. package/tests/client/js/storage/storage.test.ts +77 -0
  218. package/tests/client/js/storage/workers/frontmatter.test.ts +479 -0
  219. package/tests/client/js/storage/workers/storage.test.ts +299 -0
  220. package/tests/client/js/storage/workers/toml-parser.test.ts +169 -0
  221. package/tests/client/js/storage/workers/yaml-parser.test.ts +168 -0
  222. package/tests/client/js/utils/file-types.test.ts +268 -0
  223. package/tests/client/js/utils/frontmatter.test.ts +87 -0
  224. package/tests/client/js/utils/schema-utils.test.ts +318 -0
  225. package/tests/client/js/utils/slug.test.ts +58 -0
  226. package/tests/client/js/utils/sort.test.ts +276 -0
  227. package/tests/client/js/utils/stable-stringify.test.ts +68 -0
  228. package/tests/client/js/utils/url-utils.test.ts +70 -0
  229. package/tests/e2e/backend-connection.test.ts +301 -0
  230. package/tests/e2e/draft-lifecycle.test.ts +388 -0
  231. package/tests/e2e/editing.test.ts +355 -0
  232. package/tests/e2e/github-adapter.test.ts +330 -0
  233. package/tests/e2e/helpers/mock-adapter.ts +166 -0
  234. package/tests/e2e/helpers/test-app.ts +155 -0
  235. package/tests/e2e/navigation.test.ts +358 -0
  236. package/tests/e2e/publishing.test.ts +345 -0
  237. package/tests/e2e/unsaved-changes.test.ts +317 -0
  238. package/tests/setup.ts +2 -0
  239. package/tests/stubs/codemirror.ts +197 -0
  240. package/tsconfig.json +19 -0
  241. package/vitest.config.ts +178 -0
@@ -0,0 +1,688 @@
1
+ import {
2
+ ReactiveValue
3
+ } from "./chunk-GKDKFWC5.js";
4
+ import {
5
+ on
6
+ } from "./chunk-G3C2FXJT.js";
7
+ import {
8
+ active_reaction,
9
+ get2 as get,
10
+ increment,
11
+ label,
12
+ set,
13
+ set_active_reaction,
14
+ source,
15
+ state,
16
+ tag,
17
+ update_version,
18
+ user_derived
19
+ } from "./chunk-KCUTL6DD.js";
20
+ import {
21
+ true_default
22
+ } from "./chunk-DBPNBGEI.js";
23
+
24
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/date.js
25
+ var inited = false;
26
+ var SvelteDate = class _SvelteDate extends Date {
27
+ #time = state(super.getTime());
28
+ /** @type {Map<keyof Date, Source<unknown>>} */
29
+ #deriveds = /* @__PURE__ */ new Map();
30
+ #reaction = active_reaction;
31
+ /** @param {any[]} params */
32
+ constructor(...params) {
33
+ super(...params);
34
+ if (true_default) {
35
+ tag(this.#time, "SvelteDate.#time");
36
+ }
37
+ if (!inited) this.#init();
38
+ }
39
+ #init() {
40
+ inited = true;
41
+ var proto = _SvelteDate.prototype;
42
+ var date_proto = Date.prototype;
43
+ var methods = (
44
+ /** @type {Array<keyof Date & string>} */
45
+ Object.getOwnPropertyNames(date_proto)
46
+ );
47
+ for (const method of methods) {
48
+ if (method.startsWith("get") || method.startsWith("to") || method === "valueOf") {
49
+ proto[method] = function(...args) {
50
+ if (args.length > 0) {
51
+ get(this.#time);
52
+ return date_proto[method].apply(this, args);
53
+ }
54
+ var d = this.#deriveds.get(method);
55
+ if (d === void 0) {
56
+ const reaction = active_reaction;
57
+ set_active_reaction(this.#reaction);
58
+ d = user_derived(() => {
59
+ get(this.#time);
60
+ return date_proto[method].apply(this, args);
61
+ });
62
+ this.#deriveds.set(method, d);
63
+ set_active_reaction(reaction);
64
+ }
65
+ return get(d);
66
+ };
67
+ }
68
+ if (method.startsWith("set")) {
69
+ proto[method] = function(...args) {
70
+ var result = date_proto[method].apply(this, args);
71
+ set(this.#time, date_proto.getTime.call(this));
72
+ return result;
73
+ };
74
+ }
75
+ }
76
+ }
77
+ };
78
+
79
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/set.js
80
+ var read_methods = ["forEach", "isDisjointFrom", "isSubsetOf", "isSupersetOf"];
81
+ var set_like_methods = ["difference", "intersection", "symmetricDifference", "union"];
82
+ var inited2 = false;
83
+ var SvelteSet = class _SvelteSet extends Set {
84
+ /** @type {Map<T, Source<boolean>>} */
85
+ #sources = /* @__PURE__ */ new Map();
86
+ #version = state(0);
87
+ #size = state(0);
88
+ #update_version = update_version || -1;
89
+ /**
90
+ * @param {Iterable<T> | null | undefined} [value]
91
+ */
92
+ constructor(value) {
93
+ super();
94
+ if (true_default) {
95
+ value = new Set(value);
96
+ tag(this.#version, "SvelteSet version");
97
+ tag(this.#size, "SvelteSet.size");
98
+ }
99
+ if (value) {
100
+ for (var element of value) {
101
+ super.add(element);
102
+ }
103
+ this.#size.v = super.size;
104
+ }
105
+ if (!inited2) this.#init();
106
+ }
107
+ /**
108
+ * If the source is being created inside the same reaction as the SvelteSet instance,
109
+ * we use `state` so that it will not be a dependency of the reaction. Otherwise we
110
+ * use `source` so it will be.
111
+ *
112
+ * @template T
113
+ * @param {T} value
114
+ * @returns {Source<T>}
115
+ */
116
+ #source(value) {
117
+ return update_version === this.#update_version ? state(value) : source(value);
118
+ }
119
+ // We init as part of the first instance so that we can treeshake this class
120
+ #init() {
121
+ inited2 = true;
122
+ var proto = _SvelteSet.prototype;
123
+ var set_proto = Set.prototype;
124
+ for (const method of read_methods) {
125
+ proto[method] = function(...v) {
126
+ get(this.#version);
127
+ return set_proto[method].apply(this, v);
128
+ };
129
+ }
130
+ for (const method of set_like_methods) {
131
+ proto[method] = function(...v) {
132
+ get(this.#version);
133
+ var set2 = (
134
+ /** @type {Set<T>} */
135
+ set_proto[method].apply(this, v)
136
+ );
137
+ return new _SvelteSet(set2);
138
+ };
139
+ }
140
+ }
141
+ /** @param {T} value */
142
+ has(value) {
143
+ var has = super.has(value);
144
+ var sources = this.#sources;
145
+ var s = sources.get(value);
146
+ if (s === void 0) {
147
+ if (!has) {
148
+ get(this.#version);
149
+ return false;
150
+ }
151
+ s = this.#source(true);
152
+ if (true_default) {
153
+ tag(s, `SvelteSet has(${label(value)})`);
154
+ }
155
+ sources.set(value, s);
156
+ }
157
+ get(s);
158
+ return has;
159
+ }
160
+ /** @param {T} value */
161
+ add(value) {
162
+ if (!super.has(value)) {
163
+ super.add(value);
164
+ set(this.#size, super.size);
165
+ increment(this.#version);
166
+ }
167
+ return this;
168
+ }
169
+ /** @param {T} value */
170
+ delete(value) {
171
+ var deleted = super.delete(value);
172
+ var sources = this.#sources;
173
+ var s = sources.get(value);
174
+ if (s !== void 0) {
175
+ sources.delete(value);
176
+ set(s, false);
177
+ }
178
+ if (deleted) {
179
+ set(this.#size, super.size);
180
+ increment(this.#version);
181
+ }
182
+ return deleted;
183
+ }
184
+ clear() {
185
+ if (super.size === 0) {
186
+ return;
187
+ }
188
+ super.clear();
189
+ var sources = this.#sources;
190
+ for (var s of sources.values()) {
191
+ set(s, false);
192
+ }
193
+ sources.clear();
194
+ set(this.#size, 0);
195
+ increment(this.#version);
196
+ }
197
+ keys() {
198
+ return this.values();
199
+ }
200
+ values() {
201
+ get(this.#version);
202
+ return super.values();
203
+ }
204
+ entries() {
205
+ get(this.#version);
206
+ return super.entries();
207
+ }
208
+ [Symbol.iterator]() {
209
+ return this.keys();
210
+ }
211
+ get size() {
212
+ return get(this.#size);
213
+ }
214
+ };
215
+
216
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/map.js
217
+ var SvelteMap = class extends Map {
218
+ /** @type {Map<K, Source<number>>} */
219
+ #sources = /* @__PURE__ */ new Map();
220
+ #version = state(0);
221
+ #size = state(0);
222
+ #update_version = update_version || -1;
223
+ /**
224
+ * @param {Iterable<readonly [K, V]> | null | undefined} [value]
225
+ */
226
+ constructor(value) {
227
+ super();
228
+ if (true_default) {
229
+ value = new Map(value);
230
+ tag(this.#version, "SvelteMap version");
231
+ tag(this.#size, "SvelteMap.size");
232
+ }
233
+ if (value) {
234
+ for (var [key, v] of value) {
235
+ super.set(key, v);
236
+ }
237
+ this.#size.v = super.size;
238
+ }
239
+ }
240
+ /**
241
+ * If the source is being created inside the same reaction as the SvelteMap instance,
242
+ * we use `state` so that it will not be a dependency of the reaction. Otherwise we
243
+ * use `source` so it will be.
244
+ *
245
+ * @template T
246
+ * @param {T} value
247
+ * @returns {Source<T>}
248
+ */
249
+ #source(value) {
250
+ return update_version === this.#update_version ? state(value) : source(value);
251
+ }
252
+ /** @param {K} key */
253
+ has(key) {
254
+ var sources = this.#sources;
255
+ var s = sources.get(key);
256
+ if (s === void 0) {
257
+ if (super.has(key)) {
258
+ s = this.#source(0);
259
+ if (true_default) {
260
+ tag(s, `SvelteMap get(${label(key)})`);
261
+ }
262
+ sources.set(key, s);
263
+ } else {
264
+ get(this.#version);
265
+ return false;
266
+ }
267
+ }
268
+ get(s);
269
+ return true;
270
+ }
271
+ /**
272
+ * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn
273
+ * @param {any} [this_arg]
274
+ */
275
+ forEach(callbackfn, this_arg) {
276
+ this.#read_all();
277
+ super.forEach(callbackfn, this_arg);
278
+ }
279
+ /** @param {K} key */
280
+ get(key) {
281
+ var sources = this.#sources;
282
+ var s = sources.get(key);
283
+ if (s === void 0) {
284
+ if (super.has(key)) {
285
+ s = this.#source(0);
286
+ if (true_default) {
287
+ tag(s, `SvelteMap get(${label(key)})`);
288
+ }
289
+ sources.set(key, s);
290
+ } else {
291
+ get(this.#version);
292
+ return void 0;
293
+ }
294
+ }
295
+ get(s);
296
+ return super.get(key);
297
+ }
298
+ /**
299
+ * @param {K} key
300
+ * @param {V} value
301
+ * */
302
+ set(key, value) {
303
+ var sources = this.#sources;
304
+ var s = sources.get(key);
305
+ var prev_res = super.get(key);
306
+ var res = super.set(key, value);
307
+ var version = this.#version;
308
+ if (s === void 0) {
309
+ s = this.#source(0);
310
+ if (true_default) {
311
+ tag(s, `SvelteMap get(${label(key)})`);
312
+ }
313
+ sources.set(key, s);
314
+ set(this.#size, super.size);
315
+ increment(version);
316
+ } else if (prev_res !== value) {
317
+ increment(s);
318
+ var v_reactions = version.reactions === null ? null : new Set(version.reactions);
319
+ var needs_version_increase = v_reactions === null || !s.reactions?.every(
320
+ (r) => (
321
+ /** @type {NonNullable<typeof v_reactions>} */
322
+ v_reactions.has(r)
323
+ )
324
+ );
325
+ if (needs_version_increase) {
326
+ increment(version);
327
+ }
328
+ }
329
+ return res;
330
+ }
331
+ /** @param {K} key */
332
+ delete(key) {
333
+ var sources = this.#sources;
334
+ var s = sources.get(key);
335
+ var res = super.delete(key);
336
+ if (s !== void 0) {
337
+ sources.delete(key);
338
+ set(s, -1);
339
+ }
340
+ if (res) {
341
+ set(this.#size, super.size);
342
+ increment(this.#version);
343
+ }
344
+ return res;
345
+ }
346
+ clear() {
347
+ if (super.size === 0) {
348
+ return;
349
+ }
350
+ super.clear();
351
+ var sources = this.#sources;
352
+ set(this.#size, 0);
353
+ for (var s of sources.values()) {
354
+ set(s, -1);
355
+ }
356
+ increment(this.#version);
357
+ sources.clear();
358
+ }
359
+ #read_all() {
360
+ get(this.#version);
361
+ var sources = this.#sources;
362
+ if (this.#size.v !== sources.size) {
363
+ for (var key of super.keys()) {
364
+ if (!sources.has(key)) {
365
+ var s = this.#source(0);
366
+ if (true_default) {
367
+ tag(s, `SvelteMap get(${label(key)})`);
368
+ }
369
+ sources.set(key, s);
370
+ }
371
+ }
372
+ }
373
+ for ([, s] of this.#sources) {
374
+ get(s);
375
+ }
376
+ }
377
+ keys() {
378
+ get(this.#version);
379
+ return super.keys();
380
+ }
381
+ values() {
382
+ this.#read_all();
383
+ return super.values();
384
+ }
385
+ entries() {
386
+ this.#read_all();
387
+ return super.entries();
388
+ }
389
+ [Symbol.iterator]() {
390
+ return this.entries();
391
+ }
392
+ get size() {
393
+ get(this.#size);
394
+ return super.size;
395
+ }
396
+ };
397
+
398
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/url-search-params.js
399
+ var REPLACE = /* @__PURE__ */ Symbol();
400
+ var SvelteURLSearchParams = class extends URLSearchParams {
401
+ #version = true_default ? tag(state(0), "SvelteURLSearchParams version") : state(0);
402
+ #url = get_current_url();
403
+ #updating = false;
404
+ #update_url() {
405
+ if (!this.#url || this.#updating) return;
406
+ this.#updating = true;
407
+ const search = this.toString();
408
+ this.#url.search = search && `?${search}`;
409
+ this.#updating = false;
410
+ }
411
+ /**
412
+ * @param {URLSearchParams} params
413
+ * @internal
414
+ */
415
+ [REPLACE](params) {
416
+ if (this.#updating) return;
417
+ this.#updating = true;
418
+ for (const key of [...super.keys()]) {
419
+ super.delete(key);
420
+ }
421
+ for (const [key, value] of params) {
422
+ super.append(key, value);
423
+ }
424
+ increment(this.#version);
425
+ this.#updating = false;
426
+ }
427
+ /**
428
+ * @param {string} name
429
+ * @param {string} value
430
+ * @returns {void}
431
+ */
432
+ append(name, value) {
433
+ super.append(name, value);
434
+ this.#update_url();
435
+ increment(this.#version);
436
+ }
437
+ /**
438
+ * @param {string} name
439
+ * @param {string=} value
440
+ * @returns {void}
441
+ */
442
+ delete(name, value) {
443
+ var has_value = super.has(name, value);
444
+ super.delete(name, value);
445
+ if (has_value) {
446
+ this.#update_url();
447
+ increment(this.#version);
448
+ }
449
+ }
450
+ /**
451
+ * @param {string} name
452
+ * @returns {string|null}
453
+ */
454
+ get(name) {
455
+ get(this.#version);
456
+ return super.get(name);
457
+ }
458
+ /**
459
+ * @param {string} name
460
+ * @returns {string[]}
461
+ */
462
+ getAll(name) {
463
+ get(this.#version);
464
+ return super.getAll(name);
465
+ }
466
+ /**
467
+ * @param {string} name
468
+ * @param {string=} value
469
+ * @returns {boolean}
470
+ */
471
+ has(name, value) {
472
+ get(this.#version);
473
+ return super.has(name, value);
474
+ }
475
+ keys() {
476
+ get(this.#version);
477
+ return super.keys();
478
+ }
479
+ /**
480
+ * @param {string} name
481
+ * @param {string} value
482
+ * @returns {void}
483
+ */
484
+ set(name, value) {
485
+ var previous = super.getAll(name).join("");
486
+ super.set(name, value);
487
+ if (previous !== super.getAll(name).join("")) {
488
+ this.#update_url();
489
+ increment(this.#version);
490
+ }
491
+ }
492
+ sort() {
493
+ super.sort();
494
+ this.#update_url();
495
+ increment(this.#version);
496
+ }
497
+ toString() {
498
+ get(this.#version);
499
+ return super.toString();
500
+ }
501
+ values() {
502
+ get(this.#version);
503
+ return super.values();
504
+ }
505
+ entries() {
506
+ get(this.#version);
507
+ return super.entries();
508
+ }
509
+ [Symbol.iterator]() {
510
+ return this.entries();
511
+ }
512
+ get size() {
513
+ get(this.#version);
514
+ return super.size;
515
+ }
516
+ };
517
+
518
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/url.js
519
+ var current_url = null;
520
+ function get_current_url() {
521
+ return current_url;
522
+ }
523
+ var SvelteURL = class extends URL {
524
+ #protocol = state(super.protocol);
525
+ #username = state(super.username);
526
+ #password = state(super.password);
527
+ #hostname = state(super.hostname);
528
+ #port = state(super.port);
529
+ #pathname = state(super.pathname);
530
+ #hash = state(super.hash);
531
+ #search = state(super.search);
532
+ #searchParams;
533
+ /**
534
+ * @param {string | URL} url
535
+ * @param {string | URL} [base]
536
+ */
537
+ constructor(url, base) {
538
+ url = new URL(url, base);
539
+ super(url);
540
+ if (true_default) {
541
+ tag(this.#protocol, "SvelteURL.protocol");
542
+ tag(this.#username, "SvelteURL.username");
543
+ tag(this.#password, "SvelteURL.password");
544
+ tag(this.#hostname, "SvelteURL.hostname");
545
+ tag(this.#port, "SvelteURL.port");
546
+ tag(this.#pathname, "SvelteURL.pathname");
547
+ tag(this.#hash, "SvelteURL.hash");
548
+ tag(this.#search, "SvelteURL.search");
549
+ }
550
+ current_url = this;
551
+ this.#searchParams = new SvelteURLSearchParams(url.searchParams);
552
+ current_url = null;
553
+ }
554
+ get hash() {
555
+ return get(this.#hash);
556
+ }
557
+ set hash(value) {
558
+ super.hash = value;
559
+ set(this.#hash, super.hash);
560
+ }
561
+ get host() {
562
+ get(this.#hostname);
563
+ get(this.#port);
564
+ return super.host;
565
+ }
566
+ set host(value) {
567
+ super.host = value;
568
+ set(this.#hostname, super.hostname);
569
+ set(this.#port, super.port);
570
+ }
571
+ get hostname() {
572
+ return get(this.#hostname);
573
+ }
574
+ set hostname(value) {
575
+ super.hostname = value;
576
+ set(this.#hostname, super.hostname);
577
+ }
578
+ get href() {
579
+ get(this.#protocol);
580
+ get(this.#username);
581
+ get(this.#password);
582
+ get(this.#hostname);
583
+ get(this.#port);
584
+ get(this.#pathname);
585
+ get(this.#hash);
586
+ get(this.#search);
587
+ return super.href;
588
+ }
589
+ set href(value) {
590
+ super.href = value;
591
+ set(this.#protocol, super.protocol);
592
+ set(this.#username, super.username);
593
+ set(this.#password, super.password);
594
+ set(this.#hostname, super.hostname);
595
+ set(this.#port, super.port);
596
+ set(this.#pathname, super.pathname);
597
+ set(this.#hash, super.hash);
598
+ set(this.#search, super.search);
599
+ this.#searchParams[REPLACE](super.searchParams);
600
+ }
601
+ get password() {
602
+ return get(this.#password);
603
+ }
604
+ set password(value) {
605
+ super.password = value;
606
+ set(this.#password, super.password);
607
+ }
608
+ get pathname() {
609
+ return get(this.#pathname);
610
+ }
611
+ set pathname(value) {
612
+ super.pathname = value;
613
+ set(this.#pathname, super.pathname);
614
+ }
615
+ get port() {
616
+ return get(this.#port);
617
+ }
618
+ set port(value) {
619
+ super.port = value;
620
+ set(this.#port, super.port);
621
+ }
622
+ get protocol() {
623
+ return get(this.#protocol);
624
+ }
625
+ set protocol(value) {
626
+ super.protocol = value;
627
+ set(this.#protocol, super.protocol);
628
+ }
629
+ get search() {
630
+ return get(this.#search);
631
+ }
632
+ set search(value) {
633
+ super.search = value;
634
+ set(this.#search, super.search);
635
+ this.#searchParams[REPLACE](super.searchParams);
636
+ }
637
+ get username() {
638
+ return get(this.#username);
639
+ }
640
+ set username(value) {
641
+ super.username = value;
642
+ set(this.#username, super.username);
643
+ }
644
+ get origin() {
645
+ get(this.#protocol);
646
+ get(this.#hostname);
647
+ get(this.#port);
648
+ return super.origin;
649
+ }
650
+ get searchParams() {
651
+ return this.#searchParams;
652
+ }
653
+ toString() {
654
+ return this.href;
655
+ }
656
+ toJSON() {
657
+ return this.href;
658
+ }
659
+ };
660
+
661
+ // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/media-query.js
662
+ var parenthesis_regex = /\(.+\)/;
663
+ var non_parenthesized_keywords = /* @__PURE__ */ new Set(["all", "print", "screen", "and", "or", "not", "only"]);
664
+ var MediaQuery = class extends ReactiveValue {
665
+ /**
666
+ * @param {string} query A media query string
667
+ * @param {boolean} [fallback] Fallback value for the server
668
+ */
669
+ constructor(query, fallback) {
670
+ let final_query = parenthesis_regex.test(query) || // we need to use `some` here because technically this `window.matchMedia('random,screen')` still returns true
671
+ query.split(/[\s,]+/).some((keyword) => non_parenthesized_keywords.has(keyword.trim())) ? query : `(${query})`;
672
+ const q = window.matchMedia(final_query);
673
+ super(
674
+ () => q.matches,
675
+ (update) => on(q, "change", update)
676
+ );
677
+ }
678
+ };
679
+
680
+ export {
681
+ SvelteDate,
682
+ SvelteSet,
683
+ SvelteMap,
684
+ SvelteURLSearchParams,
685
+ SvelteURL,
686
+ MediaQuery
687
+ };
688
+ //# sourceMappingURL=chunk-JICYXBFU.js.map