@jpkme/diff-review 0.1.12 → 0.1.14

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 (126) hide show
  1. package/README.md +1 -1
  2. package/bin/diff-review.mjs +72 -53
  3. package/lib/acp-policy.mjs +99 -12
  4. package/lib/acp-policy.test.mjs +56 -3
  5. package/lib/acp-shell.mjs +38 -8
  6. package/lib/acp-shell.test.mjs +32 -1
  7. package/lib/agent-login.mjs +105 -105
  8. package/lib/check-report.mjs +1 -0
  9. package/lib/check-report.test.mjs +1 -0
  10. package/lib/extract-cache.test.mjs +162 -162
  11. package/lib/model-label.mjs +263 -263
  12. package/lib/model-label.test.mjs +77 -77
  13. package/lib/models-cache.mjs +75 -75
  14. package/lib/models-cache.test.mjs +50 -50
  15. package/lib/prompt.mjs +8 -6
  16. package/lib/review-prep.mjs +63 -63
  17. package/package.json +1 -1
  18. package/web/build/client/_app/immutable/assets/{0.CLQiq3Ed.css → 0.BKRG1f36.css} +1 -1
  19. package/web/build/client/_app/immutable/assets/0.BKRG1f36.css.br +0 -0
  20. package/web/build/client/_app/immutable/assets/{0.CLQiq3Ed.css.gz → 0.BKRG1f36.css.gz} +0 -0
  21. package/web/build/client/_app/immutable/assets/2.C4whE4xz.css +1 -0
  22. package/web/build/client/_app/immutable/assets/2.C4whE4xz.css.br +0 -0
  23. package/web/build/client/_app/immutable/assets/2.C4whE4xz.css.gz +0 -0
  24. package/web/build/client/_app/immutable/assets/3.BT54aVKb.css +1 -0
  25. package/web/build/client/_app/immutable/assets/3.BT54aVKb.css.br +0 -0
  26. package/web/build/client/_app/immutable/assets/3.BT54aVKb.css.gz +0 -0
  27. package/web/build/client/_app/immutable/assets/storage.C8XGESwn.css +1 -0
  28. package/web/build/client/_app/immutable/assets/storage.C8XGESwn.css.br +0 -0
  29. package/web/build/client/_app/immutable/assets/storage.C8XGESwn.css.gz +0 -0
  30. package/web/build/client/_app/immutable/chunks/C0hrdiUt.js +2 -0
  31. package/web/build/client/_app/immutable/chunks/C0hrdiUt.js.br +0 -0
  32. package/web/build/client/_app/immutable/chunks/C0hrdiUt.js.gz +0 -0
  33. package/web/build/client/_app/immutable/chunks/CpeIO6nz.js +210 -0
  34. package/web/build/client/_app/immutable/chunks/CpeIO6nz.js.br +0 -0
  35. package/web/build/client/_app/immutable/chunks/CpeIO6nz.js.gz +0 -0
  36. package/web/build/client/_app/immutable/chunks/{CPyWH418.js → FOc6rgIW.js} +1 -1
  37. package/web/build/client/_app/immutable/chunks/FOc6rgIW.js.br +2 -0
  38. package/web/build/client/_app/immutable/chunks/FOc6rgIW.js.gz +0 -0
  39. package/web/build/client/_app/immutable/entry/{app.BiBohpyO.js → app.DcAtSJ3n.js} +2 -2
  40. package/web/build/client/_app/immutable/entry/app.DcAtSJ3n.js.br +0 -0
  41. package/web/build/client/_app/immutable/entry/app.DcAtSJ3n.js.gz +0 -0
  42. package/web/build/client/_app/immutable/entry/start.CO5l0Zbx.js +1 -0
  43. package/web/build/client/_app/immutable/entry/start.CO5l0Zbx.js.br +0 -0
  44. package/web/build/client/_app/immutable/entry/start.CO5l0Zbx.js.gz +0 -0
  45. package/web/build/client/_app/immutable/nodes/{1.BzPXaJJj.js → 1.E-Hs7ura.js} +1 -1
  46. package/web/build/client/_app/immutable/nodes/1.E-Hs7ura.js.br +4 -0
  47. package/web/build/client/_app/immutable/nodes/1.E-Hs7ura.js.gz +0 -0
  48. package/web/build/client/_app/immutable/nodes/2.s1_irV1Q.js +10 -0
  49. package/web/build/client/_app/immutable/nodes/2.s1_irV1Q.js.br +0 -0
  50. package/web/build/client/_app/immutable/nodes/2.s1_irV1Q.js.gz +0 -0
  51. package/web/build/client/_app/immutable/nodes/3.pgwe-_5b.js +171 -0
  52. package/web/build/client/_app/immutable/nodes/3.pgwe-_5b.js.br +0 -0
  53. package/web/build/client/_app/immutable/nodes/3.pgwe-_5b.js.gz +0 -0
  54. package/web/build/client/_app/version.json +1 -1
  55. package/web/build/client/_app/version.json.br +0 -0
  56. package/web/build/client/_app/version.json.gz +0 -0
  57. package/web/build/handler.js +3 -3
  58. package/web/build/index.js +3 -3
  59. package/web/build/server/chunks/{0-BYok4D0n.js → 0-DUStDOsr.js} +3 -3
  60. package/web/build/server/chunks/{0-BYok4D0n.js.map → 0-DUStDOsr.js.map} +1 -1
  61. package/web/build/server/chunks/1-BFhhV5JB.js +7 -0
  62. package/web/build/server/chunks/{1-C7zcB0q0.js.map → 1-BFhhV5JB.js.map} +1 -1
  63. package/web/build/server/chunks/2-BZ_MVqj8.js +7 -0
  64. package/web/build/server/chunks/2-BZ_MVqj8.js.map +1 -0
  65. package/web/build/server/chunks/3-BV-TIUp1.js +7 -0
  66. package/web/build/server/chunks/{3-DAAmG6VX.js.map → 3-BV-TIUp1.js.map} +1 -1
  67. package/web/build/server/chunks/{_server.ts-qYVrMYPB.js → _server.ts-CdFoXw36.js} +4 -4
  68. package/web/build/server/chunks/{_server.ts-qYVrMYPB.js.map → _server.ts-CdFoXw36.js.map} +1 -1
  69. package/web/build/server/chunks/{agent-sessions-DSqGavSn.js → agent-sessions-D0WwtWgR.js} +223 -51
  70. package/web/build/server/chunks/agent-sessions-D0WwtWgR.js.map +1 -0
  71. package/web/build/server/chunks/{git-review-CpO_G8z8.js → git-review-CgcBIbvM.js} +7 -7
  72. package/web/build/server/chunks/{git-review-CpO_G8z8.js.map → git-review-CgcBIbvM.js.map} +1 -1
  73. package/web/build/server/chunks/{handler-Di1wJQuU.js → handler-DbxjtK9M.js} +3 -3
  74. package/web/build/server/chunks/{handler-Di1wJQuU.js.map → handler-DbxjtK9M.js.map} +1 -1
  75. package/web/build/server/chunks/{hooks.server-BLOHobEK.js → hooks.server-Dg6gYUqs.js} +3 -3
  76. package/web/build/server/chunks/{hooks.server-BLOHobEK.js.map → hooks.server-Dg6gYUqs.js.map} +1 -1
  77. package/web/build/server/chunks/{index.js-yLYmrAWy.js → index.js-NNne-njN.js} +876 -879
  78. package/web/build/server/chunks/index.js-NNne-njN.js.map +1 -0
  79. package/web/build/server/chunks/{manifest.js-CXj8IIo3.js → manifest.js-V8ViI5bl.js} +9 -9
  80. package/web/build/server/chunks/{manifest.js-CXj8IIo3.js.map → manifest.js-V8ViI5bl.js.map} +1 -1
  81. package/web/build/server/chunks/{remote-1g4ayag-BiJeU0Pk.js → remote-1g4ayag-CCsG2QXw.js} +4 -4
  82. package/web/build/server/chunks/{remote-1g4ayag-BiJeU0Pk.js.map → remote-1g4ayag-CCsG2QXw.js.map} +1 -1
  83. package/web/build/server/chunks/{remote-wh6t6j-CHanXurm.js → remote-wh6t6j-BCvmX37z.js} +5 -5
  84. package/web/build/server/chunks/{remote-wh6t6j-CHanXurm.js.map → remote-wh6t6j-BCvmX37z.js.map} +1 -1
  85. package/web/build/server/chunks/{validate-BsTKyhsq.js → validate-CAQ31C7k.js} +2 -2
  86. package/web/build/server/chunks/{validate-BsTKyhsq.js.map → validate-CAQ31C7k.js.map} +1 -1
  87. package/web/build/client/_app/immutable/assets/0.CLQiq3Ed.css.br +0 -0
  88. package/web/build/client/_app/immutable/assets/2.CKE12GwZ.css +0 -1
  89. package/web/build/client/_app/immutable/assets/2.CKE12GwZ.css.br +0 -0
  90. package/web/build/client/_app/immutable/assets/2.CKE12GwZ.css.gz +0 -0
  91. package/web/build/client/_app/immutable/assets/3.Dx3c_e7d.css +0 -1
  92. package/web/build/client/_app/immutable/assets/3.Dx3c_e7d.css.br +0 -0
  93. package/web/build/client/_app/immutable/assets/3.Dx3c_e7d.css.gz +0 -0
  94. package/web/build/client/_app/immutable/assets/storage.gDV-BhtT.css +0 -1
  95. package/web/build/client/_app/immutable/assets/storage.gDV-BhtT.css.br +0 -0
  96. package/web/build/client/_app/immutable/assets/storage.gDV-BhtT.css.gz +0 -0
  97. package/web/build/client/_app/immutable/chunks/B5ByWcPE.js +0 -2
  98. package/web/build/client/_app/immutable/chunks/B5ByWcPE.js.br +0 -0
  99. package/web/build/client/_app/immutable/chunks/B5ByWcPE.js.gz +0 -0
  100. package/web/build/client/_app/immutable/chunks/CPyWH418.js.br +0 -0
  101. package/web/build/client/_app/immutable/chunks/CPyWH418.js.gz +0 -0
  102. package/web/build/client/_app/immutable/chunks/NwkMsx0h.js +0 -210
  103. package/web/build/client/_app/immutable/chunks/NwkMsx0h.js.br +0 -0
  104. package/web/build/client/_app/immutable/chunks/NwkMsx0h.js.gz +0 -0
  105. package/web/build/client/_app/immutable/entry/app.BiBohpyO.js.br +0 -0
  106. package/web/build/client/_app/immutable/entry/app.BiBohpyO.js.gz +0 -0
  107. package/web/build/client/_app/immutable/entry/start.CjWbsiSO.js +0 -1
  108. package/web/build/client/_app/immutable/entry/start.CjWbsiSO.js.br +0 -0
  109. package/web/build/client/_app/immutable/entry/start.CjWbsiSO.js.gz +0 -0
  110. package/web/build/client/_app/immutable/nodes/1.BzPXaJJj.js.br +0 -2
  111. package/web/build/client/_app/immutable/nodes/1.BzPXaJJj.js.gz +0 -0
  112. package/web/build/client/_app/immutable/nodes/2.Cp6Ttd_9.js +0 -10
  113. package/web/build/client/_app/immutable/nodes/2.Cp6Ttd_9.js.br +0 -0
  114. package/web/build/client/_app/immutable/nodes/2.Cp6Ttd_9.js.gz +0 -0
  115. package/web/build/client/_app/immutable/nodes/3.DLiDQm__.js +0 -171
  116. package/web/build/client/_app/immutable/nodes/3.DLiDQm__.js.br +0 -0
  117. package/web/build/client/_app/immutable/nodes/3.DLiDQm__.js.gz +0 -0
  118. package/web/build/server/chunks/1-C7zcB0q0.js +0 -7
  119. package/web/build/server/chunks/2-v6ejI_0-.js +0 -7
  120. package/web/build/server/chunks/2-v6ejI_0-.js.map +0 -1
  121. package/web/build/server/chunks/3-DAAmG6VX.js +0 -7
  122. package/web/build/server/chunks/agent-sessions-DSqGavSn.js.map +0 -1
  123. package/web/build/server/chunks/index.js-yLYmrAWy.js.map +0 -1
  124. /package/web/build/client/_app/immutable/nodes/{0.Cak4ehiE.js → 0.Dj97JW46.js} +0 -0
  125. /package/web/build/client/_app/immutable/nodes/{0.Cak4ehiE.js.br → 0.Dj97JW46.js.br} +0 -0
  126. /package/web/build/client/_app/immutable/nodes/{0.Cak4ehiE.js.gz → 0.Dj97JW46.js.gz} +0 -0
@@ -7037,965 +7037,953 @@ function create_replacer(transport) {
7037
7037
  return replacer;
7038
7038
  }
7039
7039
 
7040
+ //#region node_modules/@sveltejs/kit/src/utils/array.js
7040
7041
  /**
7041
- * `$env/dynamic/public`
7042
- * @type {Record<string, string>}
7042
+ * Removes nullish values from an array.
7043
+ *
7044
+ * @template T
7045
+ * @param {Array<T>} arr
7043
7046
  */
7044
- var public_env = {};
7045
- /** @type {(environment: Record<string, string>) => void} */
7046
- function set_private_env(environment) {}
7047
- /** @type {(environment: Record<string, string>) => void} */
7048
- function set_public_env(environment) {
7049
- public_env = environment;
7050
- }
7051
- //#endregion
7052
- //#region \0virtual:__sveltekit/server
7053
- var read_implementation = null;
7054
- function set_read_implementation(fn) {
7055
- read_implementation = fn;
7047
+ function compact(arr) {
7048
+ return arr.filter(
7049
+ /** @returns {val is NonNullable<T>} */
7050
+ (val) => val != null
7051
+ );
7056
7052
  }
7057
7053
  //#endregion
7058
- //#region node_modules/svelte/src/internal/client/dom/elements/events.js
7059
- /**
7060
- * Used on elements, as a map of event type -> event handler,
7061
- * and on events themselves to track which element handled an event
7062
- */
7063
- var event_symbol = Symbol("events");
7064
- /** @type {Set<string>} */
7065
- var all_registered_events = /* @__PURE__ */ new Set();
7066
- /** @type {Set<(events: Array<string>) => void>} */
7067
- var root_event_handles = /* @__PURE__ */ new Set();
7068
- var last_propagated_event = null;
7054
+ //#region node_modules/@sveltejs/kit/src/runtime/telemetry/noop.js
7069
7055
  /**
7070
- * @this {EventTarget}
7071
- * @param {Event} event
7072
- * @returns {void}
7056
+ * @type {Span}
7073
7057
  */
7074
- function handle_event_propagation(event) {
7075
- var handler_element = this;
7076
- var owner_document = handler_element.ownerDocument;
7077
- var event_name = event.type;
7078
- var path = event.composedPath?.() || [];
7079
- var current_target = path[0] || event.target;
7080
- last_propagated_event = event;
7081
- var path_idx = 0;
7082
- var handled_at = last_propagated_event === event && event[event_symbol];
7083
- if (handled_at) {
7084
- var at_idx = path.indexOf(handled_at);
7085
- if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
7086
- event[event_symbol] = handler_element;
7087
- return;
7088
- }
7089
- var handler_idx = path.indexOf(handler_element);
7090
- if (handler_idx === -1) return;
7091
- if (at_idx <= handler_idx) path_idx = at_idx;
7092
- }
7093
- current_target = path[path_idx] || event.target;
7094
- if (current_target === handler_element) return;
7095
- define_property(event, "currentTarget", {
7096
- configurable: true,
7097
- get() {
7098
- return current_target || owner_document;
7099
- }
7100
- });
7101
- var previous_reaction = active_reaction;
7102
- var previous_effect = active_effect;
7103
- set_active_reaction(null);
7104
- set_active_effect(null);
7105
- try {
7106
- /**
7107
- * @type {unknown}
7108
- */
7109
- var throw_error;
7110
- /**
7111
- * @type {unknown[]}
7112
- */
7113
- var other_errors = [];
7114
- while (current_target !== null) {
7115
- if (current_target === handler_element) break;
7116
- try {
7117
- var delegated = current_target[event_symbol]?.[event_name];
7118
- if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
7119
- } catch (error) {
7120
- if (throw_error) other_errors.push(error);
7121
- else throw_error = error;
7122
- }
7123
- if (event.cancelBubble) break;
7124
- path_idx++;
7125
- current_target = path_idx < path.length ? path[path_idx] : null;
7126
- }
7127
- if (throw_error) {
7128
- for (let error of other_errors) queueMicrotask(() => {
7129
- throw error;
7130
- });
7131
- throw throw_error;
7132
- }
7133
- } finally {
7134
- event[event_symbol] = handler_element;
7135
- delete event.currentTarget;
7136
- set_active_reaction(previous_reaction);
7137
- set_active_effect(previous_effect);
7058
+ var noop_span = {
7059
+ spanContext() {
7060
+ return noop_span_context;
7061
+ },
7062
+ setAttribute() {
7063
+ return this;
7064
+ },
7065
+ setAttributes() {
7066
+ return this;
7067
+ },
7068
+ addEvent() {
7069
+ return this;
7070
+ },
7071
+ setStatus() {
7072
+ return this;
7073
+ },
7074
+ updateName() {
7075
+ return this;
7076
+ },
7077
+ end() {
7078
+ return this;
7079
+ },
7080
+ isRecording() {
7081
+ return false;
7082
+ },
7083
+ recordException() {
7084
+ return this;
7085
+ },
7086
+ addLink() {
7087
+ return this;
7088
+ },
7089
+ addLinks() {
7090
+ return this;
7138
7091
  }
7139
- }
7140
- //#endregion
7141
- //#region node_modules/svelte/src/internal/client/dom/template.js
7092
+ };
7142
7093
  /**
7143
- * @param {TemplateNode} start
7144
- * @param {TemplateNode | null} end
7094
+ * @type {SpanContext}
7145
7095
  */
7146
- function assign_nodes(start, end) {
7147
- var effect = active_effect;
7148
- if (effect.nodes === null) effect.nodes = {
7149
- start,
7150
- end,
7151
- a: null,
7152
- t: null
7153
- };
7154
- }
7096
+ var noop_span_context = {
7097
+ traceId: "",
7098
+ spanId: "",
7099
+ traceFlags: 0
7100
+ };
7101
+ //#endregion
7102
+ //#region node_modules/@sveltejs/kit/src/utils/hash.js
7155
7103
  /**
7156
- * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
7157
- * Transitions will play during the initial render unless the `intro` option is set to `false`.
7158
- *
7159
- * @template {Record<string, any>} Props
7160
- * @template {Record<string, any>} Exports
7161
- * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
7162
- * @param {MountOptions<Props>} options
7163
- * @returns {Exports}
7104
+ * Hash using djb2
7105
+ * @param {import('types').StrictBody[]} values
7164
7106
  */
7165
- function mount(component, options) {
7166
- return _mount(component, options);
7107
+ function hash(...values) {
7108
+ let hash = 5381;
7109
+ for (const value of values) if (typeof value === "string") {
7110
+ let i = value.length;
7111
+ while (i) hash = hash * 33 ^ value.charCodeAt(--i);
7112
+ } else if (ArrayBuffer.isView(value)) {
7113
+ const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
7114
+ let i = buffer.length;
7115
+ while (i) hash = hash * 33 ^ buffer[--i];
7116
+ } else throw new TypeError("value must be a string or TypedArray");
7117
+ return (hash >>> 0).toString(36);
7167
7118
  }
7119
+ //#endregion
7120
+ //#region node_modules/@sveltejs/kit/src/utils/exports.js
7168
7121
  /**
7169
- * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
7170
- *
7171
- * @template {Record<string, any>} Props
7172
- * @template {Record<string, any>} Exports
7173
- * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
7174
- * @param {{} extends Props ? {
7175
- * target: Document | Element | ShadowRoot;
7176
- * props?: Props;
7177
- * events?: Record<string, (e: any) => any>;
7178
- * context?: Map<any, any>;
7179
- * intro?: boolean;
7180
- * recover?: boolean;
7181
- * transformError?: (error: unknown) => unknown;
7182
- * } : {
7183
- * target: Document | Element | ShadowRoot;
7184
- * props: Props;
7185
- * events?: Record<string, (e: any) => any>;
7186
- * context?: Map<any, any>;
7187
- * intro?: boolean;
7188
- * recover?: boolean;
7189
- * transformError?: (error: unknown) => unknown;
7190
- * }} options
7191
- * @returns {Exports}
7122
+ * @param {Set<string>} expected
7192
7123
  */
7193
- function hydrate(component, options) {
7194
- init_operations();
7195
- options.intro = options.intro ?? false;
7196
- const target = options.target;
7197
- const was_hydrating = hydrating;
7198
- const previous_hydrate_node = hydrate_node;
7199
- try {
7200
- var anchor = /* @__PURE__ */ get_first_child(target);
7201
- while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
7202
- if (!anchor) throw HYDRATION_ERROR;
7203
- set_hydrating(true);
7204
- set_hydrate_node(anchor);
7205
- const instance = _mount(component, {
7206
- ...options,
7207
- anchor
7208
- });
7209
- set_hydrating(false);
7210
- return instance;
7211
- } catch (error) {
7212
- if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
7213
- if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
7214
- if (options.recover === false) hydration_failed();
7215
- init_operations();
7216
- clear_text_content(target);
7217
- set_hydrating(false);
7218
- return mount(component, options);
7219
- } finally {
7220
- set_hydrating(was_hydrating);
7221
- set_hydrate_node(previous_hydrate_node);
7124
+ function validator(expected) {
7125
+ /**
7126
+ * @param {any} module
7127
+ * @param {string} [file]
7128
+ */
7129
+ function validate(module, file) {
7130
+ if (!module) return;
7131
+ for (const key in module) {
7132
+ if (key[0] === "_" || expected.has(key)) continue;
7133
+ const values = [...expected.values()];
7134
+ const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
7135
+ throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
7136
+ }
7222
7137
  }
7138
+ return validate;
7223
7139
  }
7224
- /** @type {Map<EventTarget, Map<string, number>>} */
7225
- var listeners = /* @__PURE__ */ new Map();
7226
7140
  /**
7227
- * @template {Record<string, any>} Exports
7228
- * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
7229
- * @param {MountOptions} options
7230
- * @returns {Exports}
7141
+ * @param {string} key
7142
+ * @param {string} ext
7143
+ * @returns {string | void}
7231
7144
  */
7232
- function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
7233
- init_operations();
7234
- /** @type {Exports} */
7235
- var component = void 0;
7236
- var unmount = component_root(() => {
7237
- var anchor_node = anchor ?? target.appendChild(create_text());
7238
- boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
7239
- push$1({});
7240
- var ctx = component_context;
7241
- if (context) ctx.c = context;
7242
- if (events)
7243
- /** @type {any} */ props.$$events = events;
7244
- if (hydrating) assign_nodes(anchor_node, null);
7245
- component = Component(anchor_node, props) || {};
7246
- if (hydrating) {
7247
- /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
7248
- if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
7249
- hydration_mismatch();
7250
- throw HYDRATION_ERROR;
7251
- }
7252
- }
7253
- pop$1();
7254
- }, transformError);
7255
- /** @type {Set<string>} */
7256
- var registered_events = /* @__PURE__ */ new Set();
7257
- /** @param {Array<string>} events */
7258
- var event_handle = (events) => {
7259
- for (var i = 0; i < events.length; i++) {
7260
- var event_name = events[i];
7261
- if (registered_events.has(event_name)) continue;
7262
- registered_events.add(event_name);
7263
- var passive = is_passive_event(event_name);
7264
- for (const node of [target, document]) {
7265
- var counts = listeners.get(node);
7266
- if (counts === void 0) {
7267
- counts = /* @__PURE__ */ new Map();
7268
- listeners.set(node, counts);
7269
- }
7270
- var count = counts.get(event_name);
7271
- if (count === void 0) {
7272
- node.addEventListener(event_name, handle_event_propagation, { passive });
7273
- counts.set(event_name, 1);
7274
- } else counts.set(event_name, count + 1);
7275
- }
7276
- }
7277
- };
7278
- event_handle(array_from(all_registered_events));
7279
- root_event_handles.add(event_handle);
7280
- return () => {
7281
- for (var event_name of registered_events) for (const node of [target, document]) {
7282
- var counts = listeners.get(node);
7283
- var count = counts.get(event_name);
7284
- if (--count == 0) {
7285
- node.removeEventListener(event_name, handle_event_propagation);
7286
- counts.delete(event_name);
7287
- if (counts.size === 0) listeners.delete(node);
7288
- } else counts.set(event_name, count);
7289
- }
7290
- root_event_handles.delete(event_handle);
7291
- if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
7292
- };
7293
- });
7294
- mounted_components.set(component, unmount);
7295
- return component;
7145
+ function hint_for_supported_files(key, ext = ".js") {
7146
+ const supported_files = [];
7147
+ if (valid_layout_exports.has(key)) supported_files.push(`+layout${ext}`);
7148
+ if (valid_page_exports.has(key)) supported_files.push(`+page${ext}`);
7149
+ if (valid_layout_server_exports.has(key)) supported_files.push(`+layout.server${ext}`);
7150
+ if (valid_page_server_exports.has(key)) supported_files.push(`+page.server${ext}`);
7151
+ if (valid_server_exports.has(key)) supported_files.push(`+server${ext}`);
7152
+ if (supported_files.length > 0) return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
7153
+ }
7154
+ var valid_layout_exports = /* @__PURE__ */ new Set([
7155
+ "load",
7156
+ "prerender",
7157
+ "csr",
7158
+ "ssr",
7159
+ "trailingSlash",
7160
+ "config"
7161
+ ]);
7162
+ var valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
7163
+ var valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
7164
+ var valid_page_server_exports = /* @__PURE__ */ new Set([
7165
+ ...valid_layout_server_exports,
7166
+ "actions",
7167
+ "entries"
7168
+ ]);
7169
+ var valid_server_exports = /* @__PURE__ */ new Set([
7170
+ "GET",
7171
+ "POST",
7172
+ "PATCH",
7173
+ "PUT",
7174
+ "DELETE",
7175
+ "OPTIONS",
7176
+ "HEAD",
7177
+ "fallback",
7178
+ "prerender",
7179
+ "trailingSlash",
7180
+ "config",
7181
+ "entries"
7182
+ ]);
7183
+ var validate_layout_exports = validator(valid_layout_exports);
7184
+ var validate_page_exports = validator(valid_page_exports);
7185
+ var validate_layout_server_exports = validator(valid_layout_server_exports);
7186
+ var validate_page_server_exports = validator(valid_page_server_exports);
7187
+
7188
+ //#region node_modules/@sveltejs/kit/src/runtime/pathname.js
7189
+ var DATA_SUFFIX = "/__data.json";
7190
+ var HTML_DATA_SUFFIX = ".html__data.json";
7191
+ /** @param {string} pathname */
7192
+ function has_data_suffix(pathname) {
7193
+ return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);
7296
7194
  }
7195
+ /** @param {string} pathname */
7196
+ function add_data_suffix(pathname) {
7197
+ if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX);
7198
+ return pathname.replace(/\/$/, "") + DATA_SUFFIX;
7199
+ }
7200
+ /** @param {string} pathname */
7201
+ function strip_data_suffix(pathname) {
7202
+ if (pathname.endsWith(HTML_DATA_SUFFIX)) return pathname.slice(0, -16) + ".html";
7203
+ return pathname.slice(0, -12);
7204
+ }
7205
+ var ROUTE_SUFFIX = "/__route.js";
7297
7206
  /**
7298
- * References of the components that were mounted or hydrated.
7299
- * Uses a `WeakMap` to avoid memory leaks.
7207
+ * @param {string} pathname
7208
+ * @returns {boolean}
7300
7209
  */
7301
- var mounted_components = /* @__PURE__ */ new WeakMap();
7210
+ function has_resolution_suffix(pathname) {
7211
+ return pathname.endsWith(ROUTE_SUFFIX);
7212
+ }
7302
7213
  /**
7303
- * Unmounts a component that was previously mounted using `mount` or `hydrate`.
7304
- *
7305
- * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
7306
- *
7307
- * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
7308
- *
7309
- * ```js
7310
- * import { mount, unmount } from 'svelte';
7311
- * import App from './App.svelte';
7312
- *
7313
- * const app = mount(App, { target: document.body });
7314
- *
7315
- * // later...
7316
- * unmount(app, { outro: true });
7317
- * ```
7318
- * @param {Record<string, any>} component
7319
- * @param {{ outro?: boolean }} [options]
7320
- * @returns {Promise<void>}
7214
+ * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint
7215
+ * @param {string} pathname
7216
+ * @returns {string}
7321
7217
  */
7322
- function unmount(component, options) {
7323
- const fn = mounted_components.get(component);
7324
- if (fn) {
7325
- mounted_components.delete(component);
7326
- return fn(options);
7327
- }
7328
- return Promise.resolve();
7218
+ function add_resolution_suffix(pathname) {
7219
+ return pathname.replace(/\/$/, "") + ROUTE_SUFFIX;
7329
7220
  }
7330
- //#endregion
7331
- //#region node_modules/svelte/src/legacy/legacy-client.js
7332
- /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
7333
7221
  /**
7334
- * Takes the component function and returns a Svelte 4 compatible component constructor.
7335
- *
7336
- * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
7337
- *
7338
- * @template {Record<string, any>} Props
7339
- * @template {Record<string, any>} Exports
7340
- * @template {Record<string, any>} Events
7341
- * @template {Record<string, any>} Slots
7342
- *
7343
- * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
7344
- * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
7222
+ * @param {string} pathname
7223
+ * @returns {string}
7345
7224
  */
7346
- function asClassComponent$1(component) {
7347
- return class extends Svelte4Component {
7348
- /** @param {any} options */
7349
- constructor(options) {
7350
- super({
7351
- component,
7352
- ...options
7353
- });
7354
- }
7355
- };
7225
+ function strip_resolution_suffix(pathname) {
7226
+ return pathname.slice(0, -11);
7356
7227
  }
7228
+ var internal = new URL("sveltekit-internal://");
7357
7229
  /**
7358
- * Support using the component as both a class and function during the transition period
7359
- * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
7230
+ * @param {string} base
7231
+ * @param {string} path
7360
7232
  */
7361
- var Svelte4Component = class {
7362
- /** @type {any} */
7363
- #events;
7364
- /** @type {Record<string, any>} */
7365
- #instance;
7366
- /**
7367
- * @param {ComponentConstructorOptions & {
7368
- * component: any;
7369
- * }} options
7370
- */
7371
- constructor(options) {
7372
- var sources = /* @__PURE__ */ new Map();
7373
- /**
7374
- * @param {string | symbol} key
7375
- * @param {unknown} value
7376
- */
7377
- var add_source = (key, value) => {
7378
- var s = /* @__PURE__ */ mutable_source(value, false, false);
7379
- sources.set(key, s);
7380
- return s;
7381
- };
7382
- const props = new Proxy({
7383
- ...options.props || {},
7384
- $$events: {}
7385
- }, {
7386
- get(target, prop) {
7387
- return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
7388
- },
7389
- has(target, prop) {
7390
- if (prop === LEGACY_PROPS) return true;
7391
- get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
7392
- return Reflect.has(target, prop);
7393
- },
7394
- set(target, prop, value) {
7395
- set(sources.get(prop) ?? add_source(prop, value), value);
7396
- return Reflect.set(target, prop, value);
7397
- }
7398
- });
7399
- this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
7400
- target: options.target,
7401
- anchor: options.anchor,
7402
- props,
7403
- context: options.context,
7404
- intro: options.intro ?? false,
7405
- recover: options.recover,
7406
- transformError: options.transformError
7407
- });
7408
- if (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) flushSync();
7409
- this.#events = props.$$events;
7410
- for (const key of Object.keys(this.#instance)) {
7411
- if (key === "$set" || key === "$destroy" || key === "$on") continue;
7412
- define_property(this, key, {
7413
- get() {
7414
- return this.#instance[key];
7415
- },
7416
- /** @param {any} value */
7417
- set(value) {
7418
- this.#instance[key] = value;
7419
- },
7420
- enumerable: true
7421
- });
7422
- }
7423
- this.#instance.$set = (next) => {
7424
- Object.assign(props, next);
7425
- };
7426
- this.#instance.$destroy = () => {
7427
- unmount(this.#instance);
7428
- };
7429
- }
7430
- /** @param {Record<string, any>} props */
7431
- $set(props) {
7432
- this.#instance.$set(props);
7433
- }
7434
- /**
7435
- * @param {string} event
7436
- * @param {(...args: any[]) => any} callback
7437
- * @returns {any}
7438
- */
7439
- $on(event, callback) {
7440
- this.#events[event] = this.#events[event] || [];
7441
- /** @param {any[]} args */
7442
- const cb = (...args) => callback.call(this, ...args);
7443
- this.#events[event].push(cb);
7444
- return () => {
7445
- this.#events[event] = this.#events[event].filter(
7446
- /** @param {any} fn */
7447
- (fn) => fn !== cb
7448
- );
7449
- };
7450
- }
7451
- $destroy() {
7452
- this.#instance.$destroy();
7453
- }
7454
- };
7455
- //#endregion
7456
- //#region node_modules/svelte/src/legacy/legacy-server.js
7457
- /** @import { SvelteComponent } from '../index.js' */
7458
- /** @import { Csp } from '#server' */
7459
- /** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
7233
+ function resolve(base, path) {
7234
+ if (path[0] === "/" && path[1] === "/") return path;
7235
+ let url = new URL(base, internal);
7236
+ url = new URL(path, url);
7237
+ return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
7238
+ }
7460
7239
  /**
7461
- * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
7462
- *
7463
- * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
7464
- *
7465
- * @template {Record<string, any>} Props
7466
- * @template {Record<string, any>} Exports
7467
- * @template {Record<string, any>} Events
7468
- * @template {Record<string, any>} Slots
7469
- *
7470
- * @param {SvelteComponent<Props, Events, Slots>} component
7471
- * @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}
7240
+ * @param {string} path
7241
+ * @param {import('types').TrailingSlash} trailing_slash
7472
7242
  */
7473
- function asClassComponent(component) {
7474
- const component_constructor = asClassComponent$1(component);
7475
- /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */
7476
- const _render = (props, { context, csp, transformError } = {}) => {
7477
- const result = render(component, {
7478
- props,
7479
- context,
7480
- csp,
7481
- transformError
7482
- });
7483
- const munged = Object.defineProperties({}, {
7484
- css: { value: {
7485
- code: "",
7486
- map: null
7487
- } },
7488
- head: { get: () => result.head },
7489
- html: { get: () => result.body },
7490
- then: {
7491
- /**
7492
- * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
7493
- *
7494
- * @template TResult1
7495
- * @template [TResult2=never]
7496
- * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
7497
- * @param { (reason: unknown) => TResult2 } onrejected
7498
- */
7499
- value: (onfulfilled, onrejected) => {
7500
- if (!async_mode_flag) {
7501
- const user_result = onfulfilled({
7502
- css: munged.css,
7503
- head: munged.head,
7504
- html: munged.html
7505
- });
7506
- return Promise.resolve(user_result);
7507
- }
7508
- return result.then((result) => {
7509
- return onfulfilled({
7510
- css: munged.css,
7511
- head: result.head,
7512
- html: result.body,
7513
- hashes: result.hashes
7514
- });
7515
- }, onrejected);
7516
- } }
7517
- });
7518
- return munged;
7519
- };
7520
- component_constructor.render = _render;
7521
- return component_constructor;
7243
+ function normalize_path(path, trailing_slash) {
7244
+ if (path === "/" || trailing_slash === "ignore") return path;
7245
+ if (trailing_slash === "never") return path.endsWith("/") ? path.slice(0, -1) : path;
7246
+ else if (trailing_slash === "always" && !path.endsWith("/")) return path + "/";
7247
+ return path;
7522
7248
  }
7523
- //#endregion
7524
- //#region .svelte-kit/generated/root.svelte
7525
- function Root($$renderer, $$props) {
7526
- $$renderer.component(($$renderer) => {
7527
- let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;
7528
- setContext("__svelte__", stores);
7529
- stores.page.set(page);
7530
- const Pyramid_1 = derived(() => constructors[1]);
7531
- if (constructors[1]) {
7532
- $$renderer.push("<!--[0-->");
7533
- const Pyramid_0 = constructors[0];
7534
- if (Pyramid_0) {
7535
- $$renderer.push("<!--[-->");
7536
- Pyramid_0($$renderer, {
7537
- data: data_0,
7538
- form,
7539
- params: page.params,
7540
- children: ($$renderer) => {
7541
- if (Pyramid_1()) {
7542
- $$renderer.push("<!--[-->");
7543
- Pyramid_1()($$renderer, {
7544
- data: data_1,
7545
- form,
7546
- params: page.params
7547
- });
7548
- $$renderer.push("<!--]-->");
7549
- } else {
7550
- $$renderer.push("<!--[!-->");
7551
- $$renderer.push("<!--]-->");
7552
- }
7553
- },
7554
- $$slots: { default: true }
7555
- });
7556
- $$renderer.push("<!--]-->");
7557
- } else {
7558
- $$renderer.push("<!--[!-->");
7559
- $$renderer.push("<!--]-->");
7560
- }
7561
- } else {
7562
- $$renderer.push("<!--[-1-->");
7563
- const Pyramid_0 = constructors[0];
7564
- if (Pyramid_0) {
7565
- $$renderer.push("<!--[-->");
7566
- Pyramid_0($$renderer, {
7567
- data: data_0,
7568
- form,
7569
- params: page.params
7570
- });
7571
- $$renderer.push("<!--]-->");
7572
- } else {
7573
- $$renderer.push("<!--[!-->");
7574
- $$renderer.push("<!--]-->");
7575
- }
7576
- }
7577
- $$renderer.push(`<!--]--> `);
7578
- $$renderer.push("<!--[-1-->");
7579
- $$renderer.push(`<!--]-->`);
7580
- });
7249
+ /**
7250
+ * Decode pathname excluding %25 to prevent further double decoding of params
7251
+ * @param {string} pathname
7252
+ */
7253
+ function decode_pathname(pathname) {
7254
+ return pathname.split("%25").map(decodeURI).join("%25");
7581
7255
  }
7582
- //#endregion
7583
- //#region .svelte-kit/generated/root.js
7584
- var root_default = asClassComponent(Root);
7585
- //#endregion
7586
- //#region .svelte-kit/generated/shared/error-template.js
7587
- var error_template_default = ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
7588
- //#endregion
7589
- //#region .svelte-kit/generated/server/internal.js
7590
- var options = {
7591
- app_template_contains_nonce: false,
7592
- async: true,
7593
- csp: {
7594
- "mode": "auto",
7595
- "directives": {
7596
- "upgrade-insecure-requests": false,
7597
- "block-all-mixed-content": false
7256
+ /** @param {Record<string, string>} params */
7257
+ function decode_params(params) {
7258
+ for (const key in params) params[key] = decodeURIComponent(params[key]);
7259
+ return params;
7260
+ }
7261
+ /**
7262
+ * @param {URL} url
7263
+ * @param {() => void} callback
7264
+ * @param {(search_param: string) => void} search_params_callback
7265
+ * @param {boolean} [allow_hash]
7266
+ */
7267
+ function make_trackable(url, callback, search_params_callback, allow_hash = false) {
7268
+ const tracked = new URL(url);
7269
+ Object.defineProperty(tracked, "searchParams", {
7270
+ value: new Proxy(tracked.searchParams, { get(obj, key) {
7271
+ if (key === "get" || key === "getAll" || key === "has") return (param, ...rest) => {
7272
+ search_params_callback(param);
7273
+ return obj[key](param, ...rest);
7274
+ };
7275
+ callback();
7276
+ const value = Reflect.get(obj, key);
7277
+ return typeof value === "function" ? value.bind(obj) : value;
7278
+ } }),
7279
+ enumerable: true,
7280
+ configurable: true
7281
+ });
7282
+ /**
7283
+ * URL properties that could change during the lifetime of the page,
7284
+ * which excludes things like `origin`
7285
+ * @type {(keyof URL)[]}
7286
+ */
7287
+ const tracked_url_properties = [
7288
+ "href",
7289
+ "pathname",
7290
+ "search",
7291
+ "toString",
7292
+ "toJSON"
7293
+ ];
7294
+ if (allow_hash) tracked_url_properties.push("hash");
7295
+ for (const property of tracked_url_properties) Object.defineProperty(tracked, property, {
7296
+ get() {
7297
+ callback();
7298
+ return url[property];
7598
7299
  },
7599
- "reportOnly": {
7600
- "upgrade-insecure-requests": false,
7601
- "block-all-mixed-content": false
7602
- }
7603
- },
7604
- csrf_check_origin: true,
7605
- csrf_trusted_origins: [],
7606
- embedded: false,
7607
- env_public_prefix: "PUBLIC_",
7608
- env_private_prefix: "",
7609
- hash_routing: false,
7610
- hooks: null,
7611
- preload_strategy: "modulepreload",
7612
- root: root_default,
7613
- service_worker: false,
7614
- service_worker_options: void 0,
7615
- server_error_boundaries: false,
7616
- templates: {
7617
- app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"es\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='7' fill='%236ea8fe'/></svg>\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
7618
- error: error_template_default
7619
- },
7620
- version_hash: "p94gvk"
7621
- };
7622
- async function get_hooks() {
7623
- let handle;
7624
- let handleFetch;
7625
- let handleError;
7626
- let handleValidationError;
7627
- let init;
7628
- ({handle, handleFetch, handleError, handleValidationError, init} = await import('./hooks.server-BLOHobEK.js'));
7629
- let reroute;
7630
- let transport;
7631
- return {
7632
- handle,
7633
- handleFetch,
7634
- handleError,
7635
- handleValidationError,
7636
- init,
7637
- reroute,
7638
- transport
7300
+ enumerable: true,
7301
+ configurable: true
7302
+ });
7303
+ tracked[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7304
+ return inspect(url, opts);
7305
+ };
7306
+ tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7307
+ return inspect(url.searchParams, opts);
7639
7308
  };
7309
+ if (!allow_hash) disable_hash(tracked);
7310
+ return tracked;
7640
7311
  }
7641
-
7642
- //#region node_modules/@sveltejs/kit/src/utils/array.js
7643
7312
  /**
7644
- * Removes nullish values from an array.
7645
- *
7646
- * @template T
7647
- * @param {Array<T>} arr
7313
+ * Disallow access to `url.hash` on the server and in `load`
7314
+ * @param {URL} url
7648
7315
  */
7649
- function compact(arr) {
7650
- return arr.filter(
7651
- /** @returns {val is NonNullable<T>} */
7652
- (val) => val != null
7653
- );
7316
+ function disable_hash(url) {
7317
+ allow_nodejs_console_log(url);
7318
+ Object.defineProperty(url, "hash", { get() {
7319
+ throw new Error("Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead");
7320
+ } });
7654
7321
  }
7655
- //#endregion
7656
- //#region node_modules/@sveltejs/kit/src/runtime/telemetry/noop.js
7657
7322
  /**
7658
- * @type {Span}
7323
+ * Disallow access to `url.search` and `url.searchParams` during prerendering
7324
+ * @param {URL} url
7659
7325
  */
7660
- var noop_span = {
7661
- spanContext() {
7662
- return noop_span_context;
7663
- },
7664
- setAttribute() {
7665
- return this;
7666
- },
7667
- setAttributes() {
7668
- return this;
7669
- },
7670
- addEvent() {
7671
- return this;
7672
- },
7673
- setStatus() {
7674
- return this;
7675
- },
7676
- updateName() {
7677
- return this;
7678
- },
7679
- end() {
7680
- return this;
7681
- },
7682
- isRecording() {
7683
- return false;
7684
- },
7685
- recordException() {
7686
- return this;
7687
- },
7688
- addLink() {
7689
- return this;
7690
- },
7691
- addLinks() {
7692
- return this;
7693
- }
7694
- };
7326
+ function disable_search(url) {
7327
+ allow_nodejs_console_log(url);
7328
+ for (const property of ["search", "searchParams"]) Object.defineProperty(url, property, { get() {
7329
+ throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
7330
+ } });
7331
+ }
7695
7332
  /**
7696
- * @type {SpanContext}
7333
+ * Allow URL to be console logged, bypassing disabled properties.
7334
+ * @param {URL} url
7697
7335
  */
7698
- var noop_span_context = {
7699
- traceId: "",
7700
- spanId: "",
7701
- traceFlags: 0
7702
- };
7703
- //#endregion
7704
- //#region node_modules/@sveltejs/kit/src/utils/hash.js
7336
+ function allow_nodejs_console_log(url) {
7337
+ url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7338
+ return inspect(new URL(url), opts);
7339
+ };
7340
+ }
7705
7341
  /**
7706
- * Hash using djb2
7707
- * @param {import('types').StrictBody[]} values
7342
+ * @param {RegExpMatchArray} match
7343
+ * @param {import('types').RouteParam[]} params
7344
+ * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
7708
7345
  */
7709
- function hash(...values) {
7710
- let hash = 5381;
7711
- for (const value of values) if (typeof value === "string") {
7712
- let i = value.length;
7713
- while (i) hash = hash * 33 ^ value.charCodeAt(--i);
7714
- } else if (ArrayBuffer.isView(value)) {
7715
- const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
7716
- let i = buffer.length;
7717
- while (i) hash = hash * 33 ^ buffer[--i];
7718
- } else throw new TypeError("value must be a string or TypedArray");
7719
- return (hash >>> 0).toString(36);
7346
+ function exec(match, params, matchers) {
7347
+ /** @type {Record<string, string>} */
7348
+ const result = {};
7349
+ const values = match.slice(1);
7350
+ const values_needing_match = values.filter((value) => value !== void 0);
7351
+ let buffered = 0;
7352
+ for (let i = 0; i < params.length; i += 1) {
7353
+ const param = params[i];
7354
+ let value = values[i - buffered];
7355
+ if (param.chained && param.rest && buffered) {
7356
+ value = values.slice(i - buffered, i + 1).filter((s) => s).join("/");
7357
+ buffered = 0;
7358
+ }
7359
+ if (value === void 0) if (param.rest) value = "";
7360
+ else continue;
7361
+ if (!param.matcher || matchers[param.matcher](value)) {
7362
+ result[param.name] = value;
7363
+ const next_param = params[i + 1];
7364
+ const next_value = values[i + 1];
7365
+ if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) buffered = 0;
7366
+ if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) buffered = 0;
7367
+ continue;
7368
+ }
7369
+ if (param.optional && param.chained) {
7370
+ buffered++;
7371
+ continue;
7372
+ }
7373
+ return;
7374
+ }
7375
+ if (buffered) return;
7376
+ return result;
7377
+ }
7378
+ /**
7379
+ * Find the first route that matches the given path
7380
+ * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
7381
+ * @param {string} path - The decoded pathname to match
7382
+ * @param {Route[]} routes
7383
+ * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
7384
+ * @returns {{ route: Route, params: Record<string, string> } | null}
7385
+ */
7386
+ function find_route(path, routes, matchers) {
7387
+ for (const route of routes) {
7388
+ const match = route.pattern.exec(path);
7389
+ if (!match) continue;
7390
+ const matched = exec(match, route.params, matchers);
7391
+ if (matched) return {
7392
+ route,
7393
+ params: decode_params(matched)
7394
+ };
7395
+ }
7396
+ return null;
7397
+ }
7398
+
7399
+ //#region \0virtual:__sveltekit/server
7400
+ var read_implementation = null;
7401
+ function set_read_implementation(fn) {
7402
+ read_implementation = fn;
7720
7403
  }
7721
7404
  //#endregion
7722
- //#region node_modules/@sveltejs/kit/src/utils/exports.js
7405
+ //#region node_modules/svelte/src/internal/client/dom/elements/events.js
7723
7406
  /**
7724
- * @param {Set<string>} expected
7407
+ * Used on elements, as a map of event type -> event handler,
7408
+ * and on events themselves to track which element handled an event
7725
7409
  */
7726
- function validator(expected) {
7727
- /**
7728
- * @param {any} module
7729
- * @param {string} [file]
7730
- */
7731
- function validate(module, file) {
7732
- if (!module) return;
7733
- for (const key in module) {
7734
- if (key[0] === "_" || expected.has(key)) continue;
7735
- const values = [...expected.values()];
7736
- const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
7737
- throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
7410
+ var event_symbol = Symbol("events");
7411
+ /** @type {Set<string>} */
7412
+ var all_registered_events = /* @__PURE__ */ new Set();
7413
+ /** @type {Set<(events: Array<string>) => void>} */
7414
+ var root_event_handles = /* @__PURE__ */ new Set();
7415
+ var last_propagated_event = null;
7416
+ /**
7417
+ * @this {EventTarget}
7418
+ * @param {Event} event
7419
+ * @returns {void}
7420
+ */
7421
+ function handle_event_propagation(event) {
7422
+ var handler_element = this;
7423
+ var owner_document = handler_element.ownerDocument;
7424
+ var event_name = event.type;
7425
+ var path = event.composedPath?.() || [];
7426
+ var current_target = path[0] || event.target;
7427
+ last_propagated_event = event;
7428
+ var path_idx = 0;
7429
+ var handled_at = last_propagated_event === event && event[event_symbol];
7430
+ if (handled_at) {
7431
+ var at_idx = path.indexOf(handled_at);
7432
+ if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
7433
+ event[event_symbol] = handler_element;
7434
+ return;
7738
7435
  }
7436
+ var handler_idx = path.indexOf(handler_element);
7437
+ if (handler_idx === -1) return;
7438
+ if (at_idx <= handler_idx) path_idx = at_idx;
7439
+ }
7440
+ current_target = path[path_idx] || event.target;
7441
+ if (current_target === handler_element) return;
7442
+ define_property(event, "currentTarget", {
7443
+ configurable: true,
7444
+ get() {
7445
+ return current_target || owner_document;
7446
+ }
7447
+ });
7448
+ var previous_reaction = active_reaction;
7449
+ var previous_effect = active_effect;
7450
+ set_active_reaction(null);
7451
+ set_active_effect(null);
7452
+ try {
7453
+ /**
7454
+ * @type {unknown}
7455
+ */
7456
+ var throw_error;
7457
+ /**
7458
+ * @type {unknown[]}
7459
+ */
7460
+ var other_errors = [];
7461
+ while (current_target !== null) {
7462
+ if (current_target === handler_element) break;
7463
+ try {
7464
+ var delegated = current_target[event_symbol]?.[event_name];
7465
+ if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
7466
+ } catch (error) {
7467
+ if (throw_error) other_errors.push(error);
7468
+ else throw_error = error;
7469
+ }
7470
+ if (event.cancelBubble) break;
7471
+ path_idx++;
7472
+ current_target = path_idx < path.length ? path[path_idx] : null;
7473
+ }
7474
+ if (throw_error) {
7475
+ for (let error of other_errors) queueMicrotask(() => {
7476
+ throw error;
7477
+ });
7478
+ throw throw_error;
7479
+ }
7480
+ } finally {
7481
+ event[event_symbol] = handler_element;
7482
+ delete event.currentTarget;
7483
+ set_active_reaction(previous_reaction);
7484
+ set_active_effect(previous_effect);
7739
7485
  }
7740
- return validate;
7741
7486
  }
7487
+ //#endregion
7488
+ //#region node_modules/svelte/src/internal/client/dom/template.js
7742
7489
  /**
7743
- * @param {string} key
7744
- * @param {string} ext
7745
- * @returns {string | void}
7490
+ * @param {TemplateNode} start
7491
+ * @param {TemplateNode | null} end
7746
7492
  */
7747
- function hint_for_supported_files(key, ext = ".js") {
7748
- const supported_files = [];
7749
- if (valid_layout_exports.has(key)) supported_files.push(`+layout${ext}`);
7750
- if (valid_page_exports.has(key)) supported_files.push(`+page${ext}`);
7751
- if (valid_layout_server_exports.has(key)) supported_files.push(`+layout.server${ext}`);
7752
- if (valid_page_server_exports.has(key)) supported_files.push(`+page.server${ext}`);
7753
- if (valid_server_exports.has(key)) supported_files.push(`+server${ext}`);
7754
- if (supported_files.length > 0) return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
7755
- }
7756
- var valid_layout_exports = /* @__PURE__ */ new Set([
7757
- "load",
7758
- "prerender",
7759
- "csr",
7760
- "ssr",
7761
- "trailingSlash",
7762
- "config"
7763
- ]);
7764
- var valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
7765
- var valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
7766
- var valid_page_server_exports = /* @__PURE__ */ new Set([
7767
- ...valid_layout_server_exports,
7768
- "actions",
7769
- "entries"
7770
- ]);
7771
- var valid_server_exports = /* @__PURE__ */ new Set([
7772
- "GET",
7773
- "POST",
7774
- "PATCH",
7775
- "PUT",
7776
- "DELETE",
7777
- "OPTIONS",
7778
- "HEAD",
7779
- "fallback",
7780
- "prerender",
7781
- "trailingSlash",
7782
- "config",
7783
- "entries"
7784
- ]);
7785
- var validate_layout_exports = validator(valid_layout_exports);
7786
- var validate_page_exports = validator(valid_page_exports);
7787
- var validate_layout_server_exports = validator(valid_layout_server_exports);
7788
- var validate_page_server_exports = validator(valid_page_server_exports);
7789
-
7790
- //#region node_modules/@sveltejs/kit/src/runtime/pathname.js
7791
- var DATA_SUFFIX = "/__data.json";
7792
- var HTML_DATA_SUFFIX = ".html__data.json";
7793
- /** @param {string} pathname */
7794
- function has_data_suffix(pathname) {
7795
- return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);
7796
- }
7797
- /** @param {string} pathname */
7798
- function add_data_suffix(pathname) {
7799
- if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX);
7800
- return pathname.replace(/\/$/, "") + DATA_SUFFIX;
7801
- }
7802
- /** @param {string} pathname */
7803
- function strip_data_suffix(pathname) {
7804
- if (pathname.endsWith(HTML_DATA_SUFFIX)) return pathname.slice(0, -16) + ".html";
7805
- return pathname.slice(0, -12);
7493
+ function assign_nodes(start, end) {
7494
+ var effect = active_effect;
7495
+ if (effect.nodes === null) effect.nodes = {
7496
+ start,
7497
+ end,
7498
+ a: null,
7499
+ t: null
7500
+ };
7806
7501
  }
7807
- var ROUTE_SUFFIX = "/__route.js";
7808
7502
  /**
7809
- * @param {string} pathname
7810
- * @returns {boolean}
7503
+ * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
7504
+ * Transitions will play during the initial render unless the `intro` option is set to `false`.
7505
+ *
7506
+ * @template {Record<string, any>} Props
7507
+ * @template {Record<string, any>} Exports
7508
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
7509
+ * @param {MountOptions<Props>} options
7510
+ * @returns {Exports}
7811
7511
  */
7812
- function has_resolution_suffix(pathname) {
7813
- return pathname.endsWith(ROUTE_SUFFIX);
7512
+ function mount(component, options) {
7513
+ return _mount(component, options);
7814
7514
  }
7815
7515
  /**
7816
- * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint
7817
- * @param {string} pathname
7818
- * @returns {string}
7516
+ * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
7517
+ *
7518
+ * @template {Record<string, any>} Props
7519
+ * @template {Record<string, any>} Exports
7520
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
7521
+ * @param {{} extends Props ? {
7522
+ * target: Document | Element | ShadowRoot;
7523
+ * props?: Props;
7524
+ * events?: Record<string, (e: any) => any>;
7525
+ * context?: Map<any, any>;
7526
+ * intro?: boolean;
7527
+ * recover?: boolean;
7528
+ * transformError?: (error: unknown) => unknown;
7529
+ * } : {
7530
+ * target: Document | Element | ShadowRoot;
7531
+ * props: Props;
7532
+ * events?: Record<string, (e: any) => any>;
7533
+ * context?: Map<any, any>;
7534
+ * intro?: boolean;
7535
+ * recover?: boolean;
7536
+ * transformError?: (error: unknown) => unknown;
7537
+ * }} options
7538
+ * @returns {Exports}
7819
7539
  */
7820
- function add_resolution_suffix(pathname) {
7821
- return pathname.replace(/\/$/, "") + ROUTE_SUFFIX;
7540
+ function hydrate(component, options) {
7541
+ init_operations();
7542
+ options.intro = options.intro ?? false;
7543
+ const target = options.target;
7544
+ const was_hydrating = hydrating;
7545
+ const previous_hydrate_node = hydrate_node;
7546
+ try {
7547
+ var anchor = /* @__PURE__ */ get_first_child(target);
7548
+ while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
7549
+ if (!anchor) throw HYDRATION_ERROR;
7550
+ set_hydrating(true);
7551
+ set_hydrate_node(anchor);
7552
+ const instance = _mount(component, {
7553
+ ...options,
7554
+ anchor
7555
+ });
7556
+ set_hydrating(false);
7557
+ return instance;
7558
+ } catch (error) {
7559
+ if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
7560
+ if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
7561
+ if (options.recover === false) hydration_failed();
7562
+ init_operations();
7563
+ clear_text_content(target);
7564
+ set_hydrating(false);
7565
+ return mount(component, options);
7566
+ } finally {
7567
+ set_hydrating(was_hydrating);
7568
+ set_hydrate_node(previous_hydrate_node);
7569
+ }
7822
7570
  }
7571
+ /** @type {Map<EventTarget, Map<string, number>>} */
7572
+ var listeners = /* @__PURE__ */ new Map();
7823
7573
  /**
7824
- * @param {string} pathname
7825
- * @returns {string}
7574
+ * @template {Record<string, any>} Exports
7575
+ * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
7576
+ * @param {MountOptions} options
7577
+ * @returns {Exports}
7826
7578
  */
7827
- function strip_resolution_suffix(pathname) {
7828
- return pathname.slice(0, -11);
7579
+ function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
7580
+ init_operations();
7581
+ /** @type {Exports} */
7582
+ var component = void 0;
7583
+ var unmount = component_root(() => {
7584
+ var anchor_node = anchor ?? target.appendChild(create_text());
7585
+ boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
7586
+ push$1({});
7587
+ var ctx = component_context;
7588
+ if (context) ctx.c = context;
7589
+ if (events)
7590
+ /** @type {any} */ props.$$events = events;
7591
+ if (hydrating) assign_nodes(anchor_node, null);
7592
+ component = Component(anchor_node, props) || {};
7593
+ if (hydrating) {
7594
+ /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
7595
+ if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
7596
+ hydration_mismatch();
7597
+ throw HYDRATION_ERROR;
7598
+ }
7599
+ }
7600
+ pop$1();
7601
+ }, transformError);
7602
+ /** @type {Set<string>} */
7603
+ var registered_events = /* @__PURE__ */ new Set();
7604
+ /** @param {Array<string>} events */
7605
+ var event_handle = (events) => {
7606
+ for (var i = 0; i < events.length; i++) {
7607
+ var event_name = events[i];
7608
+ if (registered_events.has(event_name)) continue;
7609
+ registered_events.add(event_name);
7610
+ var passive = is_passive_event(event_name);
7611
+ for (const node of [target, document]) {
7612
+ var counts = listeners.get(node);
7613
+ if (counts === void 0) {
7614
+ counts = /* @__PURE__ */ new Map();
7615
+ listeners.set(node, counts);
7616
+ }
7617
+ var count = counts.get(event_name);
7618
+ if (count === void 0) {
7619
+ node.addEventListener(event_name, handle_event_propagation, { passive });
7620
+ counts.set(event_name, 1);
7621
+ } else counts.set(event_name, count + 1);
7622
+ }
7623
+ }
7624
+ };
7625
+ event_handle(array_from(all_registered_events));
7626
+ root_event_handles.add(event_handle);
7627
+ return () => {
7628
+ for (var event_name of registered_events) for (const node of [target, document]) {
7629
+ var counts = listeners.get(node);
7630
+ var count = counts.get(event_name);
7631
+ if (--count == 0) {
7632
+ node.removeEventListener(event_name, handle_event_propagation);
7633
+ counts.delete(event_name);
7634
+ if (counts.size === 0) listeners.delete(node);
7635
+ } else counts.set(event_name, count);
7636
+ }
7637
+ root_event_handles.delete(event_handle);
7638
+ if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
7639
+ };
7640
+ });
7641
+ mounted_components.set(component, unmount);
7642
+ return component;
7829
7643
  }
7830
- var internal = new URL("sveltekit-internal://");
7831
7644
  /**
7832
- * @param {string} base
7833
- * @param {string} path
7645
+ * References of the components that were mounted or hydrated.
7646
+ * Uses a `WeakMap` to avoid memory leaks.
7834
7647
  */
7835
- function resolve(base, path) {
7836
- if (path[0] === "/" && path[1] === "/") return path;
7837
- let url = new URL(base, internal);
7838
- url = new URL(path, url);
7839
- return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
7840
- }
7648
+ var mounted_components = /* @__PURE__ */ new WeakMap();
7841
7649
  /**
7842
- * @param {string} path
7843
- * @param {import('types').TrailingSlash} trailing_slash
7650
+ * Unmounts a component that was previously mounted using `mount` or `hydrate`.
7651
+ *
7652
+ * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
7653
+ *
7654
+ * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
7655
+ *
7656
+ * ```js
7657
+ * import { mount, unmount } from 'svelte';
7658
+ * import App from './App.svelte';
7659
+ *
7660
+ * const app = mount(App, { target: document.body });
7661
+ *
7662
+ * // later...
7663
+ * unmount(app, { outro: true });
7664
+ * ```
7665
+ * @param {Record<string, any>} component
7666
+ * @param {{ outro?: boolean }} [options]
7667
+ * @returns {Promise<void>}
7844
7668
  */
7845
- function normalize_path(path, trailing_slash) {
7846
- if (path === "/" || trailing_slash === "ignore") return path;
7847
- if (trailing_slash === "never") return path.endsWith("/") ? path.slice(0, -1) : path;
7848
- else if (trailing_slash === "always" && !path.endsWith("/")) return path + "/";
7849
- return path;
7669
+ function unmount(component, options) {
7670
+ const fn = mounted_components.get(component);
7671
+ if (fn) {
7672
+ mounted_components.delete(component);
7673
+ return fn(options);
7674
+ }
7675
+ return Promise.resolve();
7850
7676
  }
7677
+ //#endregion
7678
+ //#region node_modules/svelte/src/legacy/legacy-client.js
7679
+ /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
7851
7680
  /**
7852
- * Decode pathname excluding %25 to prevent further double decoding of params
7853
- * @param {string} pathname
7681
+ * Takes the component function and returns a Svelte 4 compatible component constructor.
7682
+ *
7683
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
7684
+ *
7685
+ * @template {Record<string, any>} Props
7686
+ * @template {Record<string, any>} Exports
7687
+ * @template {Record<string, any>} Events
7688
+ * @template {Record<string, any>} Slots
7689
+ *
7690
+ * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
7691
+ * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
7854
7692
  */
7855
- function decode_pathname(pathname) {
7856
- return pathname.split("%25").map(decodeURI).join("%25");
7857
- }
7858
- /** @param {Record<string, string>} params */
7859
- function decode_params(params) {
7860
- for (const key in params) params[key] = decodeURIComponent(params[key]);
7861
- return params;
7693
+ function asClassComponent$1(component) {
7694
+ return class extends Svelte4Component {
7695
+ /** @param {any} options */
7696
+ constructor(options) {
7697
+ super({
7698
+ component,
7699
+ ...options
7700
+ });
7701
+ }
7702
+ };
7862
7703
  }
7863
7704
  /**
7864
- * @param {URL} url
7865
- * @param {() => void} callback
7866
- * @param {(search_param: string) => void} search_params_callback
7867
- * @param {boolean} [allow_hash]
7705
+ * Support using the component as both a class and function during the transition period
7706
+ * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
7868
7707
  */
7869
- function make_trackable(url, callback, search_params_callback, allow_hash = false) {
7870
- const tracked = new URL(url);
7871
- Object.defineProperty(tracked, "searchParams", {
7872
- value: new Proxy(tracked.searchParams, { get(obj, key) {
7873
- if (key === "get" || key === "getAll" || key === "has") return (param, ...rest) => {
7874
- search_params_callback(param);
7875
- return obj[key](param, ...rest);
7876
- };
7877
- callback();
7878
- const value = Reflect.get(obj, key);
7879
- return typeof value === "function" ? value.bind(obj) : value;
7880
- } }),
7881
- enumerable: true,
7882
- configurable: true
7883
- });
7708
+ var Svelte4Component = class {
7709
+ /** @type {any} */
7710
+ #events;
7711
+ /** @type {Record<string, any>} */
7712
+ #instance;
7884
7713
  /**
7885
- * URL properties that could change during the lifetime of the page,
7886
- * which excludes things like `origin`
7887
- * @type {(keyof URL)[]}
7714
+ * @param {ComponentConstructorOptions & {
7715
+ * component: any;
7716
+ * }} options
7888
7717
  */
7889
- const tracked_url_properties = [
7890
- "href",
7891
- "pathname",
7892
- "search",
7893
- "toString",
7894
- "toJSON"
7895
- ];
7896
- if (allow_hash) tracked_url_properties.push("hash");
7897
- for (const property of tracked_url_properties) Object.defineProperty(tracked, property, {
7898
- get() {
7899
- callback();
7900
- return url[property];
7901
- },
7902
- enumerable: true,
7903
- configurable: true
7904
- });
7905
- tracked[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7906
- return inspect(url, opts);
7907
- };
7908
- tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7909
- return inspect(url.searchParams, opts);
7910
- };
7911
- if (!allow_hash) disable_hash(tracked);
7912
- return tracked;
7913
- }
7914
- /**
7915
- * Disallow access to `url.hash` on the server and in `load`
7916
- * @param {URL} url
7917
- */
7918
- function disable_hash(url) {
7919
- allow_nodejs_console_log(url);
7920
- Object.defineProperty(url, "hash", { get() {
7921
- throw new Error("Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead");
7922
- } });
7923
- }
7924
- /**
7925
- * Disallow access to `url.search` and `url.searchParams` during prerendering
7926
- * @param {URL} url
7927
- */
7928
- function disable_search(url) {
7929
- allow_nodejs_console_log(url);
7930
- for (const property of ["search", "searchParams"]) Object.defineProperty(url, property, { get() {
7931
- throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
7932
- } });
7933
- }
7718
+ constructor(options) {
7719
+ var sources = /* @__PURE__ */ new Map();
7720
+ /**
7721
+ * @param {string | symbol} key
7722
+ * @param {unknown} value
7723
+ */
7724
+ var add_source = (key, value) => {
7725
+ var s = /* @__PURE__ */ mutable_source(value, false, false);
7726
+ sources.set(key, s);
7727
+ return s;
7728
+ };
7729
+ const props = new Proxy({
7730
+ ...options.props || {},
7731
+ $$events: {}
7732
+ }, {
7733
+ get(target, prop) {
7734
+ return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
7735
+ },
7736
+ has(target, prop) {
7737
+ if (prop === LEGACY_PROPS) return true;
7738
+ get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
7739
+ return Reflect.has(target, prop);
7740
+ },
7741
+ set(target, prop, value) {
7742
+ set(sources.get(prop) ?? add_source(prop, value), value);
7743
+ return Reflect.set(target, prop, value);
7744
+ }
7745
+ });
7746
+ this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
7747
+ target: options.target,
7748
+ anchor: options.anchor,
7749
+ props,
7750
+ context: options.context,
7751
+ intro: options.intro ?? false,
7752
+ recover: options.recover,
7753
+ transformError: options.transformError
7754
+ });
7755
+ if (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) flushSync();
7756
+ this.#events = props.$$events;
7757
+ for (const key of Object.keys(this.#instance)) {
7758
+ if (key === "$set" || key === "$destroy" || key === "$on") continue;
7759
+ define_property(this, key, {
7760
+ get() {
7761
+ return this.#instance[key];
7762
+ },
7763
+ /** @param {any} value */
7764
+ set(value) {
7765
+ this.#instance[key] = value;
7766
+ },
7767
+ enumerable: true
7768
+ });
7769
+ }
7770
+ this.#instance.$set = (next) => {
7771
+ Object.assign(props, next);
7772
+ };
7773
+ this.#instance.$destroy = () => {
7774
+ unmount(this.#instance);
7775
+ };
7776
+ }
7777
+ /** @param {Record<string, any>} props */
7778
+ $set(props) {
7779
+ this.#instance.$set(props);
7780
+ }
7781
+ /**
7782
+ * @param {string} event
7783
+ * @param {(...args: any[]) => any} callback
7784
+ * @returns {any}
7785
+ */
7786
+ $on(event, callback) {
7787
+ this.#events[event] = this.#events[event] || [];
7788
+ /** @param {any[]} args */
7789
+ const cb = (...args) => callback.call(this, ...args);
7790
+ this.#events[event].push(cb);
7791
+ return () => {
7792
+ this.#events[event] = this.#events[event].filter(
7793
+ /** @param {any} fn */
7794
+ (fn) => fn !== cb
7795
+ );
7796
+ };
7797
+ }
7798
+ $destroy() {
7799
+ this.#instance.$destroy();
7800
+ }
7801
+ };
7802
+ //#endregion
7803
+ //#region node_modules/svelte/src/legacy/legacy-server.js
7804
+ /** @import { SvelteComponent } from '../index.js' */
7805
+ /** @import { Csp } from '#server' */
7806
+ /** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
7934
7807
  /**
7935
- * Allow URL to be console logged, bypassing disabled properties.
7936
- * @param {URL} url
7808
+ * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
7809
+ *
7810
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
7811
+ *
7812
+ * @template {Record<string, any>} Props
7813
+ * @template {Record<string, any>} Exports
7814
+ * @template {Record<string, any>} Events
7815
+ * @template {Record<string, any>} Slots
7816
+ *
7817
+ * @param {SvelteComponent<Props, Events, Slots>} component
7818
+ * @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}
7937
7819
  */
7938
- function allow_nodejs_console_log(url) {
7939
- url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
7940
- return inspect(new URL(url), opts);
7820
+ function asClassComponent(component) {
7821
+ const component_constructor = asClassComponent$1(component);
7822
+ /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */
7823
+ const _render = (props, { context, csp, transformError } = {}) => {
7824
+ const result = render(component, {
7825
+ props,
7826
+ context,
7827
+ csp,
7828
+ transformError
7829
+ });
7830
+ const munged = Object.defineProperties({}, {
7831
+ css: { value: {
7832
+ code: "",
7833
+ map: null
7834
+ } },
7835
+ head: { get: () => result.head },
7836
+ html: { get: () => result.body },
7837
+ then: {
7838
+ /**
7839
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
7840
+ *
7841
+ * @template TResult1
7842
+ * @template [TResult2=never]
7843
+ * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
7844
+ * @param { (reason: unknown) => TResult2 } onrejected
7845
+ */
7846
+ value: (onfulfilled, onrejected) => {
7847
+ if (!async_mode_flag) {
7848
+ const user_result = onfulfilled({
7849
+ css: munged.css,
7850
+ head: munged.head,
7851
+ html: munged.html
7852
+ });
7853
+ return Promise.resolve(user_result);
7854
+ }
7855
+ return result.then((result) => {
7856
+ return onfulfilled({
7857
+ css: munged.css,
7858
+ head: result.head,
7859
+ html: result.body,
7860
+ hashes: result.hashes
7861
+ });
7862
+ }, onrejected);
7863
+ } }
7864
+ });
7865
+ return munged;
7941
7866
  };
7867
+ component_constructor.render = _render;
7868
+ return component_constructor;
7942
7869
  }
7943
- /**
7944
- * @param {RegExpMatchArray} match
7945
- * @param {import('types').RouteParam[]} params
7946
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
7947
- */
7948
- function exec(match, params, matchers) {
7949
- /** @type {Record<string, string>} */
7950
- const result = {};
7951
- const values = match.slice(1);
7952
- const values_needing_match = values.filter((value) => value !== void 0);
7953
- let buffered = 0;
7954
- for (let i = 0; i < params.length; i += 1) {
7955
- const param = params[i];
7956
- let value = values[i - buffered];
7957
- if (param.chained && param.rest && buffered) {
7958
- value = values.slice(i - buffered, i + 1).filter((s) => s).join("/");
7959
- buffered = 0;
7960
- }
7961
- if (value === void 0) if (param.rest) value = "";
7962
- else continue;
7963
- if (!param.matcher || matchers[param.matcher](value)) {
7964
- result[param.name] = value;
7965
- const next_param = params[i + 1];
7966
- const next_value = values[i + 1];
7967
- if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) buffered = 0;
7968
- if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) buffered = 0;
7969
- continue;
7970
- }
7971
- if (param.optional && param.chained) {
7972
- buffered++;
7973
- continue;
7870
+ //#endregion
7871
+ //#region .svelte-kit/generated/root.svelte
7872
+ function Root($$renderer, $$props) {
7873
+ $$renderer.component(($$renderer) => {
7874
+ let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;
7875
+ setContext("__svelte__", stores);
7876
+ stores.page.set(page);
7877
+ const Pyramid_1 = derived(() => constructors[1]);
7878
+ if (constructors[1]) {
7879
+ $$renderer.push("<!--[0-->");
7880
+ const Pyramid_0 = constructors[0];
7881
+ if (Pyramid_0) {
7882
+ $$renderer.push("<!--[-->");
7883
+ Pyramid_0($$renderer, {
7884
+ data: data_0,
7885
+ form,
7886
+ params: page.params,
7887
+ children: ($$renderer) => {
7888
+ if (Pyramid_1()) {
7889
+ $$renderer.push("<!--[-->");
7890
+ Pyramid_1()($$renderer, {
7891
+ data: data_1,
7892
+ form,
7893
+ params: page.params
7894
+ });
7895
+ $$renderer.push("<!--]-->");
7896
+ } else {
7897
+ $$renderer.push("<!--[!-->");
7898
+ $$renderer.push("<!--]-->");
7899
+ }
7900
+ },
7901
+ $$slots: { default: true }
7902
+ });
7903
+ $$renderer.push("<!--]-->");
7904
+ } else {
7905
+ $$renderer.push("<!--[!-->");
7906
+ $$renderer.push("<!--]-->");
7907
+ }
7908
+ } else {
7909
+ $$renderer.push("<!--[-1-->");
7910
+ const Pyramid_0 = constructors[0];
7911
+ if (Pyramid_0) {
7912
+ $$renderer.push("<!--[-->");
7913
+ Pyramid_0($$renderer, {
7914
+ data: data_0,
7915
+ form,
7916
+ params: page.params
7917
+ });
7918
+ $$renderer.push("<!--]-->");
7919
+ } else {
7920
+ $$renderer.push("<!--[!-->");
7921
+ $$renderer.push("<!--]-->");
7922
+ }
7974
7923
  }
7975
- return;
7976
- }
7977
- if (buffered) return;
7978
- return result;
7924
+ $$renderer.push(`<!--]--> `);
7925
+ $$renderer.push("<!--[-1-->");
7926
+ $$renderer.push(`<!--]-->`);
7927
+ });
7979
7928
  }
7980
- /**
7981
- * Find the first route that matches the given path
7982
- * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
7983
- * @param {string} path - The decoded pathname to match
7984
- * @param {Route[]} routes
7985
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
7986
- * @returns {{ route: Route, params: Record<string, string> } | null}
7987
- */
7988
- function find_route(path, routes, matchers) {
7989
- for (const route of routes) {
7990
- const match = route.pattern.exec(path);
7991
- if (!match) continue;
7992
- const matched = exec(match, route.params, matchers);
7993
- if (matched) return {
7994
- route,
7995
- params: decode_params(matched)
7996
- };
7997
- }
7998
- return null;
7929
+ //#endregion
7930
+ //#region .svelte-kit/generated/root.js
7931
+ var root_default = asClassComponent(Root);
7932
+ //#endregion
7933
+ //#region .svelte-kit/generated/shared/error-template.js
7934
+ var error_template_default = ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
7935
+ //#endregion
7936
+ //#region .svelte-kit/generated/server/internal.js
7937
+ var options = {
7938
+ app_template_contains_nonce: false,
7939
+ async: true,
7940
+ csp: {
7941
+ "mode": "auto",
7942
+ "directives": {
7943
+ "upgrade-insecure-requests": false,
7944
+ "block-all-mixed-content": false
7945
+ },
7946
+ "reportOnly": {
7947
+ "upgrade-insecure-requests": false,
7948
+ "block-all-mixed-content": false
7949
+ }
7950
+ },
7951
+ csrf_check_origin: true,
7952
+ csrf_trusted_origins: [],
7953
+ embedded: false,
7954
+ env_public_prefix: "PUBLIC_",
7955
+ env_private_prefix: "",
7956
+ hash_routing: false,
7957
+ hooks: null,
7958
+ preload_strategy: "modulepreload",
7959
+ root: root_default,
7960
+ service_worker: false,
7961
+ service_worker_options: void 0,
7962
+ server_error_boundaries: false,
7963
+ templates: {
7964
+ app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"es\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='7' fill='%236ea8fe'/></svg>\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
7965
+ error: error_template_default
7966
+ },
7967
+ version_hash: "14zvmq9"
7968
+ };
7969
+ async function get_hooks() {
7970
+ let handle;
7971
+ let handleFetch;
7972
+ let handleError;
7973
+ let handleValidationError;
7974
+ let init;
7975
+ ({handle, handleFetch, handleError, handleValidationError, init} = await import('./hooks.server-Dg6gYUqs.js'));
7976
+ let reroute;
7977
+ let transport;
7978
+ return {
7979
+ handle,
7980
+ handleFetch,
7981
+ handleError,
7982
+ handleValidationError,
7983
+ init,
7984
+ reroute,
7985
+ transport
7986
+ };
7999
7987
  }
8000
7988
 
8001
7989
  var cookie = {};
@@ -8321,6 +8309,15 @@ var NULL_BODY_STATUS = [
8321
8309
  304
8322
8310
  ];
8323
8311
  var IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
8312
+ /**
8313
+ * `$env/dynamic/public`
8314
+ * @type {Record<string, string>}
8315
+ */
8316
+ var public_env = {};
8317
+ /** @type {(environment: Record<string, string>) => void} */
8318
+ function set_public_env(environment) {
8319
+ public_env = environment;
8320
+ }
8324
8321
  //#endregion
8325
8322
  //#region node_modules/@sveltejs/kit/src/utils/misc.js
8326
8323
  var s = JSON.stringify;
@@ -11713,7 +11710,7 @@ var Server = class {
11713
11710
  */
11714
11711
  async init({ env, read }) {
11715
11712
  const { env_public_prefix, env_private_prefix } = this.#options;
11716
- set_private_env(filter_env(env, env_private_prefix, env_public_prefix));
11713
+ filter_env(env, env_private_prefix, env_public_prefix);
11717
11714
  set_public_env(filter_env(env, env_public_prefix, env_private_prefix));
11718
11715
  if (read) {
11719
11716
  /** @param {string} file */
@@ -11779,4 +11776,4 @@ var Server = class {
11779
11776
  };
11780
11777
 
11781
11778
  export { HttpError as H, MUTATIVE_METHODS as M, SvelteKitError as S, __exportAll as _, Server as a, stringify_remote_arg as b, create_remote_key as c, error as e, get_request_store as g, handle_error_and_jsonify as h, init_remote_functions as i, noop as n, splitCookiesString as s, with_request_store as w };
11782
- //# sourceMappingURL=index.js-yLYmrAWy.js.map
11779
+ //# sourceMappingURL=index.js-NNne-njN.js.map