@demiurgejs/core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as H } from "react/jsx-runtime";
2
2
  import { createContext as W, useState as I, useRef as k, useEffect as C, useMemo as _, createElement as f, useContext as V, Component as G } from "react";
3
- import { e as K, H as Y, f as Z } from "./chunks/ssr-O3d7Q73U.js";
4
- import { r as mr } from "./chunks/ssr-O3d7Q73U.js";
5
- import { e as Q, t as X, p as D, s as J, g as ee, c as L, l as te, i as O, j as re, N as z, k as ne, m as ae, n as ie, o as se, H as oe, q as ce, B as ue, u as le, v as fe, w as de, x as he, y as me, R as pe, z as A } from "./chunks/testing-BBnJ5WUR.js";
6
- import { A as gr, C as wr, D as yr, E as vr, F as br, G as Sr, I as Er, J as Rr, b as $r, K as xr, d as Ar, L as Tr, M as Ir, O as kr, P as Cr, Q as Dr, S as zr, T as Pr, U as Lr, V as Or, W as Nr, h as Ur, X as Mr, Y as Fr, Z as jr, _ as qr, $ as Br, a0 as Hr, a1 as Wr, a2 as _r, a3 as Vr, a4 as Gr, a5 as Kr, a6 as Yr, a7 as Zr, a8 as Qr, a9 as Xr, aa as Jr, ab as en, ac as tn, ad as rn, ae as nn, af as an, ag as sn, ah as on, ai as cn, aj as un, ak as ln, al as fn, am as dn, an as hn, ao as mn } from "./chunks/testing-BBnJ5WUR.js";
7
- import { a as gn, c as wn, d as yn } from "./chunks/index-BnX9Qxbm.js";
3
+ import { e as K, H as Y, f as Z } from "./chunks/ssr-BJejKlkZ.js";
4
+ import { r as pr } from "./chunks/ssr-BJejKlkZ.js";
5
+ import { g as Q, t as X, p as D, s as J, i as ee, c as P, l as te, j as L, k as re, N as z, m as ne, n as ae, o as ie, q as oe, H as se, u as ce, B as ue, v as le, w as fe, x as de, y as he, z as me, R as pe, A } from "./chunks/testing-DR3eQAvY.js";
6
+ import { C as wr, D as yr, E as vr, F as br, G as Sr, I as Er, J as Rr, K as $r, b as xr, L as Ar, d as Tr, M as Ir, O as kr, P as Cr, Q as Dr, S as zr, T as Or, U as Pr, V as Lr, W as Nr, X as Ur, h as Mr, Y as Fr, Z as jr, _ as qr, $ as Br, a0 as Hr, a1 as Wr, a2 as _r, a3 as Vr, a4 as Gr, a5 as Kr, a6 as Yr, a7 as Zr, a8 as Qr, a9 as Xr, aa as Jr, ab as en, ac as tn, ad as rn, ae as nn, af as an, ag as on, ah as sn, ai as cn, aj as un, ak as ln, al as fn, am as dn, an as hn, ao as mn, ap as pn } from "./chunks/testing-DR3eQAvY.js";
7
+ import { a as wn, c as yn, d as vn } from "./chunks/index-BnX9Qxbm.js";
8
8
  import "react-dom/server";
9
- function Nt(e) {
9
+ function Ut(e) {
10
10
  return {
11
11
  entries: e
12
12
  };
13
13
  }
14
- function Ut(e) {
14
+ function Mt(e) {
15
15
  return [
16
16
  '<?xml version="1.0" encoding="UTF-8"?>',
17
17
  `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"${e.entries.some((r) => r.alternates?.length) ? ' xmlns:xhtml="http://www.w3.org/1999/xhtml"' : ""}>`,
@@ -21,13 +21,13 @@ function Ut(e) {
21
21
  ].join(`
22
22
  `);
23
23
  }
24
- function Mt(e) {
25
- return e;
26
- }
27
24
  function Ft(e) {
28
25
  return e;
29
26
  }
30
27
  function jt(e) {
28
+ return e;
29
+ }
30
+ function qt(e) {
31
31
  const t = [];
32
32
  for (const r of e.rules ?? []) {
33
33
  for (const n of b(r.userAgent))
@@ -46,18 +46,18 @@ function jt(e) {
46
46
  `;
47
47
  }
48
48
  function ge(e) {
49
- const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820", a = e.foreground ?? "#ffffff", i = $(e.title, 120), o = e.subtitle ? $(e.subtitle, 160) : void 0, s = e.brand ? $(e.brand, 80) : void 0;
49
+ const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820", a = e.foreground ?? "#ffffff", i = $(e.title, 120), s = e.subtitle ? $(e.subtitle, 160) : void 0, o = e.brand ? $(e.brand, 80) : void 0;
50
50
  return be(t, r), [
51
51
  `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" role="img" aria-label="${p(i)}">`,
52
52
  ` <rect width="100%" height="100%" fill="${p(n)}" />`,
53
- s ? ` <text x="72" y="96" fill="${p(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="32" font-weight="700">${w(s)}</text>` : null,
54
- ` <text x="72" y="${o ? 300 : 340}" fill="${p(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="76" font-weight="800">${w(i)}</text>`,
55
- o ? ` <text x="72" y="392" fill="${p(a)}" fill-opacity="0.78" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="38" font-weight="500">${w(o)}</text>` : null,
53
+ o ? ` <text x="72" y="96" fill="${p(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="32" font-weight="700">${w(o)}</text>` : null,
54
+ ` <text x="72" y="${s ? 300 : 340}" fill="${p(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="76" font-weight="800">${w(i)}</text>`,
55
+ s ? ` <text x="72" y="392" fill="${p(a)}" fill-opacity="0.78" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="38" font-weight="500">${w(s)}</text>` : null,
56
56
  "</svg>"
57
57
  ].filter((u) => !!u).join(`
58
58
  `);
59
59
  }
60
- function qt(e) {
60
+ function Bt(e) {
61
61
  return new Response(ge(e), {
62
62
  headers: {
63
63
  "cache-control": "public, max-age=31536000, immutable",
@@ -105,7 +105,7 @@ function be(e, t) {
105
105
  if (!Number.isSafeInteger(t) || t <= 0)
106
106
  throw new Error("OG image height must be a positive integer.");
107
107
  }
108
- function Bt(e) {
108
+ function Ht(e) {
109
109
  return Q(
110
110
  async (t) => {
111
111
  const r = e.input ? await e.input(t) : void 0, n = {
@@ -131,7 +131,7 @@ function Bt(e) {
131
131
  }
132
132
  );
133
133
  }
134
- const Ht = {
134
+ const Wt = {
135
135
  async formData({ request: e }) {
136
136
  return await e.formData();
137
137
  },
@@ -145,7 +145,7 @@ const Ht = {
145
145
  async function Se(e, t) {
146
146
  return e instanceof Response ? e : await X(e, t);
147
147
  }
148
- function Wt(e) {
148
+ function _t(e) {
149
149
  return typeof e == "function" ? {
150
150
  kind: "page",
151
151
  render: { mode: "ssr" },
@@ -158,7 +158,7 @@ function Wt(e) {
158
158
  view: e.view
159
159
  };
160
160
  }
161
- const _t = {
161
+ const Vt = {
162
162
  hmac(e) {
163
163
  return {
164
164
  kind: "response",
@@ -187,10 +187,10 @@ async function Ee(e, t, r) {
187
187
  t,
188
188
  n,
189
189
  r.prefix
190
- ), o = $e(i, a);
191
- if (!o)
190
+ ), s = $e(i, a);
191
+ if (!s)
192
192
  return !1;
193
- const s = await globalThis.crypto.subtle.importKey(
193
+ const o = await globalThis.crypto.subtle.importKey(
194
194
  "raw",
195
195
  new TextEncoder().encode(r.secret),
196
196
  {
@@ -202,8 +202,8 @@ async function Ee(e, t, r) {
202
202
  );
203
203
  return await globalThis.crypto.subtle.verify(
204
204
  "HMAC",
205
- s,
206
205
  o,
206
+ s,
207
207
  Uint8Array.from(e).buffer
208
208
  );
209
209
  }
@@ -229,7 +229,7 @@ function $e(e, t) {
229
229
  }
230
230
  }
231
231
  const xe = "24h", Ae = 1e4;
232
- function Vt(e = {}) {
232
+ function Gt(e = {}) {
233
233
  const t = e.now ?? Date.now, r = e.defaultTtl ?? xe, n = e.maximumEntries ?? Ae;
234
234
  if (!Number.isSafeInteger(n) || n <= 0)
235
235
  throw new Error(
@@ -240,13 +240,13 @@ function Vt(e = {}) {
240
240
  throw new Error("Demiurge idempotency defaultTtl must be finite.");
241
241
  const i = /* @__PURE__ */ new Map();
242
242
  return {
243
- async run(o) {
244
- const s = J(o.key), u = t();
243
+ async run(s) {
244
+ const o = J(s.key), u = t();
245
245
  Te(i, u);
246
- const d = i.get(s);
246
+ const d = i.get(o);
247
247
  if (d && (d.pending || d.expiresAt > u))
248
248
  return {
249
- key: s,
249
+ key: o,
250
250
  replayed: !0,
251
251
  value: await d.value
252
252
  };
@@ -254,21 +254,21 @@ function Vt(e = {}) {
254
254
  throw new Error(
255
255
  "Demiurge idempotency store is at capacity with in-flight mutations."
256
256
  );
257
- const g = Promise.resolve().then(o.fn), c = {
257
+ const g = Promise.resolve().then(s.fn), c = {
258
258
  expiresAt: Number.POSITIVE_INFINITY,
259
259
  pending: !0,
260
260
  value: g
261
261
  };
262
- i.set(s, c);
262
+ i.set(o, c);
263
263
  try {
264
264
  const l = await g;
265
- return c.pending = !1, c.expiresAt = t() + D(o.ttl ?? r), {
266
- key: s,
265
+ return c.pending = !1, c.expiresAt = t() + D(s.ttl ?? r), {
266
+ key: o,
267
267
  replayed: !1,
268
268
  value: l
269
269
  };
270
270
  } catch (l) {
271
- throw i.get(s) === c && i.delete(s), l;
271
+ throw i.get(o) === c && i.delete(o), l;
272
272
  }
273
273
  }
274
274
  };
@@ -284,13 +284,13 @@ function Ie(e) {
284
284
  return;
285
285
  }
286
286
  }
287
- function Gt(e, t) {
287
+ function Kt(e, t) {
288
288
  return e.run(t);
289
289
  }
290
290
  function ke(e) {
291
- const t = L(e.routes), r = e.loadNavigationData ?? U;
291
+ const t = P(e.routes), r = e.loadNavigationData ?? U;
292
292
  return function() {
293
- const [a, i] = I(() => S()), [o, s] = I(
293
+ const [a, i] = I(() => S()), [s, o] = I(
294
294
  () => e.initialMatch ?? { status: "loading" }
295
295
  ), u = k(!!e.initialMatch), d = k(0);
296
296
  C(() => {
@@ -305,13 +305,13 @@ function ke(e) {
305
305
  return u.current = !1, () => {
306
306
  c = !0;
307
307
  };
308
- s({ status: "loading" }), te(t, a.pathname).then((m) => {
309
- v() && !l && m && s({ loading: m, status: "loading" });
308
+ o({ status: "loading" }), te(t, a.pathname).then((m) => {
309
+ v() && !l && m && o({ loading: m, status: "loading" });
310
310
  }).catch(() => {
311
311
  });
312
312
  const T = new Request(a.href, { signal: R.signal });
313
313
  return Promise.resolve(r(T)).then(
314
- (m) => O(
314
+ (m) => L(
315
315
  t,
316
316
  a.pathname,
317
317
  T,
@@ -320,7 +320,7 @@ function ke(e) {
320
320
  { documentContributions: !1 }
321
321
  )
322
322
  ).then((m) => {
323
- l = !0, v() && s(m);
323
+ l = !0, v() && o(m);
324
324
  }).catch(async (m) => {
325
325
  if (l = !0, !v() || R.signal.aborted)
326
326
  return;
@@ -328,7 +328,7 @@ function ke(e) {
328
328
  t,
329
329
  a.pathname
330
330
  );
331
- v() && s({
331
+ v() && o({
332
332
  Error: B,
333
333
  error: m,
334
334
  pathname: a.pathname,
@@ -345,18 +345,18 @@ function ke(e) {
345
345
  const l = S();
346
346
  window.history.pushState(null, "", c);
347
347
  const h = S();
348
- i(h), l.pathname === h.pathname && l.search === h.search && l.hash !== h.hash && Oe(h.hash);
348
+ i(h), l.pathname === h.pathname && l.search === h.search && l.hash !== h.hash && Ne(h.hash);
349
349
  }
350
350
  }),
351
351
  []
352
352
  );
353
353
  return f(M.Provider, {
354
354
  value: g,
355
- children: f(ze, {
355
+ children: f(Oe, {
356
356
  key: `${a.pathname}${a.search}`,
357
357
  Loading: e.loading,
358
358
  NotFound: e.notFound,
359
- match: o
359
+ match: s
360
360
  })
361
361
  });
362
362
  };
@@ -369,21 +369,21 @@ function De(e) {
369
369
  if (e)
370
370
  return e.status === "ready" ? e.match.pathname : e.status === "loading" ? void 0 : e.pathname;
371
371
  }
372
- async function Kt(e) {
372
+ async function Yt(e) {
373
373
  const t = e.root ?? document.getElementById("root");
374
374
  if (!t)
375
375
  throw new Error(
376
376
  "Demiurge expected a #root element in the framework document."
377
377
  );
378
- const r = L(e.routes), n = e.loadNavigationData ?? U, a = e.initialData ?? K(document), i = await O(
378
+ const r = P(e.routes), n = e.loadNavigationData ?? U, a = e.initialData ?? K(document), i = await L(
379
379
  r,
380
380
  window.location.pathname,
381
381
  new Request(window.location.href),
382
382
  a ?? await n(new Request(window.location.href)),
383
383
  void 0,
384
384
  { documentContributions: !1 }
385
- ), o = Ce(i, t), s = ke(
386
- o ? {
385
+ ), s = Ce(i, t), o = ke(
386
+ s ? {
387
387
  ...e,
388
388
  initialMatch: i,
389
389
  loadNavigationData: n,
@@ -393,28 +393,38 @@ async function Kt(e) {
393
393
  loadNavigationData: n,
394
394
  navigation: a?.navigation ?? e.navigation
395
395
  }
396
- ), { createRoot: u, hydrateRoot: d } = await import("react-dom/client");
397
- if (o && t.hasAttribute(Y)) {
398
- d(t, f(s));
396
+ ), { createRoot: u, hydrateRoot: d } = ze(
397
+ await import("react-dom/client")
398
+ );
399
+ if (s && t.hasAttribute(Y)) {
400
+ d(t, f(o));
399
401
  return;
400
402
  }
401
- t.replaceChildren(), u(t).render(f(s));
403
+ t.replaceChildren(), u(t).render(f(o));
402
404
  }
403
- function Yt(e) {
404
- const t = Ue(), r = ee(e);
405
+ function ze(e) {
406
+ const t = typeof e.createRoot == "function" && typeof e.hydrateRoot == "function" ? e : e.default;
407
+ if (!t || typeof t.createRoot != "function" || typeof t.hydrateRoot != "function")
408
+ throw new Error(
409
+ "Demiurge could not load the React DOM client from the Vite module."
410
+ );
411
+ return t;
412
+ }
413
+ function Zt(e) {
414
+ const t = Me(), r = ee(e);
405
415
  return /* @__PURE__ */ H(
406
416
  "a",
407
417
  {
408
418
  className: e.className,
409
419
  href: r,
410
420
  onClick: (n) => {
411
- t.navigation === "server" && Ne(n) && (n.preventDefault(), t.push(r));
421
+ t.navigation === "server" && Ue(n) && (n.preventDefault(), t.push(r));
412
422
  },
413
423
  children: e.children
414
424
  }
415
425
  );
416
426
  }
417
- function ze({
427
+ function Oe({
418
428
  Loading: e,
419
429
  NotFound: t,
420
430
  match: r
@@ -440,8 +450,8 @@ function ze({
440
450
  pathname: r.pathname,
441
451
  status: N(r.error)
442
452
  }) : null;
443
- const { data: n, error: a, page: i, layouts: o, path: s, pathname: u } = r.match, d = f(i, { data: n, path: s, pathname: u }), g = o.reduceRight(
444
- (c, l) => f(l, { path: s, pathname: u, children: c }),
453
+ const { data: n, error: a, page: i, layouts: s, path: o, pathname: u } = r.match, d = f(i, { data: n, path: o, pathname: u }), g = s.reduceRight(
454
+ (c, l) => f(l, { path: o, pathname: u, children: c }),
445
455
  d
446
456
  );
447
457
  return f(Pe, {
@@ -492,8 +502,8 @@ async function U(e) {
492
502
  }
493
503
  if (n === ie)
494
504
  return { hasData: !0 };
495
- if (n === se || !r.ok) {
496
- const a = await Le(r), i = oe.includes(
505
+ if (n === oe || !r.ok) {
506
+ const a = await Le(r), i = se.includes(
497
507
  r.status
498
508
  ) ? r.status : 500;
499
509
  throw ce(i, {
@@ -512,7 +522,7 @@ async function Le(e) {
512
522
  return;
513
523
  }
514
524
  }
515
- function Oe(e) {
525
+ function Ne(e) {
516
526
  queueMicrotask(() => {
517
527
  if (!e) {
518
528
  window.scrollTo?.(0, 0);
@@ -527,7 +537,7 @@ function Oe(e) {
527
537
  document.getElementById(t)?.scrollIntoView?.();
528
538
  });
529
539
  }
530
- function Ne(e) {
540
+ function Ue(e) {
531
541
  return e.button === 0 && !e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey;
532
542
  }
533
543
  const M = W({
@@ -536,36 +546,36 @@ const M = W({
536
546
  window.location.href = e;
537
547
  }
538
548
  });
539
- function Ue() {
549
+ function Me() {
540
550
  return V(M);
541
551
  }
542
- const Me = "/_demiurge/image";
543
- function Zt(e) {
552
+ const Fe = "/_demiurge/image";
553
+ function Qt(e) {
544
554
  return e;
545
555
  }
546
- function Qt(e, t = {}) {
556
+ function Xt(e, t = {}) {
547
557
  return F(e, t) !== null;
548
558
  }
549
- function Xt(e, t = {}) {
559
+ function Jt(e, t = {}) {
550
560
  const r = F(e.src, t);
551
561
  if (!r)
552
562
  throw new Error(`Image source "${e.src}" is not allowed by the image policy.`);
553
- x("width", e.width), x("height", e.height), He(e.quality);
554
- const n = e.format ?? "auto", i = We(e.width, e.widths).map((s) => {
555
- const u = Math.round(e.height / e.width * s);
563
+ x("width", e.width), x("height", e.height), We(e.quality);
564
+ const n = e.format ?? "auto", i = _e(e.width, e.widths).map((o) => {
565
+ const u = Math.round(e.height / e.width * o);
556
566
  return {
557
567
  format: n,
558
568
  height: u,
559
- src: _e({
569
+ src: Ve({
560
570
  format: n,
561
- optimizerPath: t.optimizerPath ?? Me,
571
+ optimizerPath: t.optimizerPath ?? Fe,
562
572
  quality: e.quality,
563
573
  src: e.src,
564
- width: s
574
+ width: o
565
575
  }),
566
- width: s
576
+ width: o
567
577
  };
568
- }), o = i[0];
578
+ }), s = i[0];
569
579
  return {
570
580
  alt: e.alt,
571
581
  decoding: "async",
@@ -574,8 +584,8 @@ function Xt(e, t = {}) {
574
584
  loading: e.priority ? "eager" : "lazy",
575
585
  sizes: e.sizes,
576
586
  source: r,
577
- src: o.src,
578
- srcSet: i.map((s) => `${s.src} ${s.width}w`).join(", "),
587
+ src: s.src,
588
+ srcSet: i.map((o) => `${o.src} ${o.width}w`).join(", "),
579
589
  variants: i,
580
590
  width: e.width
581
591
  };
@@ -589,41 +599,41 @@ function F(e, t) {
589
599
  } catch {
590
600
  return null;
591
601
  }
592
- return r.protocol !== "https:" && r.protocol !== "http:" ? null : Fe(r, t.remote ?? []) ? { kind: "remote", src: r.toString() } : null;
602
+ return r.protocol !== "https:" && r.protocol !== "http:" ? null : je(r, t.remote ?? []) ? { kind: "remote", src: r.toString() } : null;
593
603
  }
594
- function Fe(e, t) {
604
+ function je(e, t) {
595
605
  return t.some(
596
- (r) => typeof r == "string" ? je(e, r) : qe(e, r)
606
+ (r) => typeof r == "string" ? qe(e, r) : Be(e, r)
597
607
  );
598
608
  }
599
- function je(e, t) {
609
+ function qe(e, t) {
600
610
  try {
601
611
  return e.origin === new URL(t).origin;
602
612
  } catch {
603
613
  return !1;
604
614
  }
605
615
  }
606
- function qe(e, t) {
607
- return t.protocol && e.protocol !== t.protocol || e.hostname !== t.hostname || t.port !== void 0 && e.port !== t.port ? !1 : t.pathname ? Be(e.pathname, t.pathname) : !0;
608
- }
609
616
  function Be(e, t) {
617
+ return t.protocol && e.protocol !== t.protocol || e.hostname !== t.hostname || t.port !== void 0 && e.port !== t.port ? !1 : t.pathname ? He(e.pathname, t.pathname) : !0;
618
+ }
619
+ function He(e, t) {
610
620
  return t.endsWith("*") ? e.startsWith(t.slice(0, -1)) : e === t;
611
621
  }
612
622
  function x(e, t) {
613
623
  if (!Number.isInteger(t) || t <= 0)
614
624
  throw new Error(`Image ${e} must be a positive integer.`);
615
625
  }
616
- function He(e) {
626
+ function We(e) {
617
627
  if (e !== void 0 && (!Number.isInteger(e) || e < 1 || e > 100))
618
628
  throw new Error("Image quality must be an integer between 1 and 100.");
619
629
  }
620
- function We(e, t) {
630
+ function _e(e, t) {
621
631
  const r = t ?? [e, e * 2], n = [...new Set(r)];
622
632
  for (const a of n)
623
633
  x("width", a);
624
634
  return n.sort((a, i) => a - i);
625
635
  }
626
- function _e({
636
+ function Ve({
627
637
  format: e,
628
638
  optimizerPath: t,
629
639
  quality: r,
@@ -636,7 +646,7 @@ function _e({
636
646
  });
637
647
  return r !== void 0 && i.set("q", String(r)), e !== "auto" && i.set("f", e), `${t}?${i.toString()}`;
638
648
  }
639
- const Jt = {
649
+ const er = {
640
650
  google(e) {
641
651
  return {
642
652
  display: e.display ?? "swap",
@@ -662,26 +672,26 @@ const Jt = {
662
672
  };
663
673
  }
664
674
  };
665
- function er(e) {
675
+ function tr(e) {
666
676
  return [...e];
667
677
  }
668
- function tr(e) {
678
+ function rr(e) {
669
679
  return e.filter((t) => t.src).map((t) => ({
670
680
  as: "font",
671
681
  crossOrigin: "anonymous",
672
682
  href: t.src,
673
683
  kind: "link",
674
684
  rel: "preload",
675
- type: Ve(t.src)
685
+ type: Ge(t.src)
676
686
  }));
677
687
  }
678
- function rr(e) {
688
+ function nr(e) {
679
689
  return e.filter((t) => t.source === "local" && t.src).map((t) => {
680
690
  const r = t.src;
681
691
  return [
682
692
  "@font-face {",
683
- ` font-family: "${P(t.family)}";`,
684
- ` src: url("${P(r)}") format("${Ge(r)}");`,
693
+ ` font-family: "${O(t.family)}";`,
694
+ ` src: url("${O(r)}") format("${Ke(r)}");`,
685
695
  ` font-style: ${t.style};`,
686
696
  ` font-weight: ${t.weight};`,
687
697
  ` font-display: ${t.display};`,
@@ -691,18 +701,18 @@ function rr(e) {
691
701
  }).join(`
692
702
  `);
693
703
  }
694
- function Ve(e) {
704
+ function Ge(e) {
695
705
  return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "font/woff" : "font/woff2";
696
706
  }
697
- function Ge(e) {
707
+ function Ke(e) {
698
708
  return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "woff" : "woff2";
699
709
  }
700
- function P(e) {
710
+ function O(e) {
701
711
  return e.replace(/[\\"]/g, "\\$&");
702
712
  }
703
- const nr = {
713
+ const ar = {
704
714
  plausible(e) {
705
- const t = Ke(e.domain), r = Ye(e.endpoint ?? "https://plausible.io");
715
+ const t = Ye(e.domain), r = Ze(e.endpoint ?? "https://plausible.io");
706
716
  return {
707
717
  connectSrc: r.origin,
708
718
  consent: e.consent ?? !1,
@@ -719,13 +729,13 @@ const nr = {
719
729
  };
720
730
  }
721
731
  };
722
- function Ke(e) {
732
+ function Ye(e) {
723
733
  const t = e.trim();
724
734
  if (!t || t.includes("/") || t.includes(" "))
725
735
  throw new Error("Analytics domain must be a hostname without a path.");
726
736
  return t;
727
737
  }
728
- function Ye(e) {
738
+ function Ze(e) {
729
739
  let t;
730
740
  try {
731
741
  t = new URL(e);
@@ -736,7 +746,7 @@ function Ye(e) {
736
746
  throw new Error("Analytics endpoint must use HTTPS.");
737
747
  return t;
738
748
  }
739
- function ar(e = {}) {
749
+ function ir(e = {}) {
740
750
  return {
741
751
  async request(t) {
742
752
  await E({ kind: "request", signal: t }, e);
@@ -755,20 +765,20 @@ function ar(e = {}) {
755
765
  async function E(e, t) {
756
766
  await t.onEvent?.(e), e.kind === "request" ? await t.request?.(e.signal) : e.kind === "server-start" ? await t.serverStart?.(e.signal) : e.kind === "trace" ? await t.trace?.(e.signal) : await t.webVitals?.(e.signal);
757
767
  }
758
- const Ze = /* @__PURE__ */ new Set(["DELETE", "PATCH", "POST", "PUT"]);
759
- function ir(e = {}) {
760
- const t = [], r = e.document, n = r ? Je(r.policy, r.headers, t) : {};
761
- r && Qe(r.policy, t);
762
- const a = e.route ? ot(e.route, t) : void 0;
763
- return r?.scripts && (et(
768
+ const Qe = /* @__PURE__ */ new Set(["DELETE", "PATCH", "POST", "PUT"]);
769
+ function or(e = {}) {
770
+ const t = [], r = e.document, n = r ? et(r.policy, r.headers, t) : {};
771
+ r && Xe(r.policy, t);
772
+ const a = e.route ? ct(e.route, t) : void 0;
773
+ return r?.scripts && (tt(
764
774
  r.policy.csp,
765
775
  r.scripts,
766
776
  r.headers,
767
777
  t
768
778
  ), r.scriptDependencies && t.push(
769
- ...Xe(
779
+ ...Je(
770
780
  r.scripts,
771
- tt(r.scriptDependencies)
781
+ rt(r.scriptDependencies)
772
782
  )
773
783
  )), {
774
784
  findings: t,
@@ -776,7 +786,7 @@ function ir(e = {}) {
776
786
  route: a
777
787
  };
778
788
  }
779
- function Qe(e, t) {
789
+ function Xe(e, t) {
780
790
  if (!e.trustedTypes || e.trustedTypes.mode !== "report-only")
781
791
  return;
782
792
  const r = e.csp || void 0, n = !!r?.reportUri?.length, a = e.headers?.reportingEndpoints, i = !!(r?.reportTo && a && a[r.reportTo]);
@@ -786,10 +796,10 @@ function Qe(e, t) {
786
796
  severity: "warning"
787
797
  });
788
798
  }
789
- function Xe(e, t = {}) {
799
+ function Je(e, t = {}) {
790
800
  const r = t.requirePurpose ?? !0, n = [];
791
801
  for (const a of e) {
792
- const i = lt(a);
802
+ const i = ft(a);
793
803
  i && (r && !a.purpose && n.push({
794
804
  code: "script-purpose-missing",
795
805
  message: `Third-party script ${a.src} should declare a purpose for audits and consent flows.`,
@@ -802,7 +812,7 @@ function Xe(e, t = {}) {
802
812
  code: "script-third-party-before-interactive",
803
813
  message: `Third-party script ${a.src} runs before the app is interactive and should be justified by policy.`,
804
814
  severity: "warning"
805
- }), ft(i) && n.push({
815
+ }), dt(i) && n.push({
806
816
  code: "script-gtm-wide-trust-boundary",
807
817
  message: "Google Tag Manager can load additional scripts at runtime and should be treated as a wide trust boundary.",
808
818
  severity: "warning"
@@ -810,7 +820,7 @@ function Xe(e, t = {}) {
810
820
  }
811
821
  return n;
812
822
  }
813
- function Je(e, t, r) {
823
+ function et(e, t, r) {
814
824
  try {
815
825
  return Object.fromEntries(de(e, t));
816
826
  } catch (n) {
@@ -821,12 +831,12 @@ function Je(e, t, r) {
821
831
  }), {};
822
832
  }
823
833
  }
824
- function et(e, t, r, n) {
834
+ function tt(e, t, r, n) {
825
835
  if (!e)
826
836
  return;
827
- const a = rt(e);
837
+ const a = nt(e);
828
838
  for (const i of t) {
829
- if (nt(a) && !i.nonce) {
839
+ if (at(a) && !i.nonce) {
830
840
  n.push({
831
841
  code: "csp-script-missing-nonce",
832
842
  message: `Document script ${i.src} needs a nonce for the effective script-src policy.`,
@@ -834,26 +844,26 @@ function et(e, t, r, n) {
834
844
  });
835
845
  continue;
836
846
  }
837
- i.nonce && r?.nonce && i.nonce === r.nonce || at(a, i.src) || n.push({
847
+ i.nonce && r?.nonce && i.nonce === r.nonce || it(a, i.src) || n.push({
838
848
  code: "csp-script-src-blocked",
839
849
  message: `Document script ${i.src} is not allowed by the effective script-src policy.`,
840
850
  severity: "error"
841
851
  });
842
852
  }
843
853
  }
844
- function tt(e) {
854
+ function rt(e) {
845
855
  return typeof e == "boolean" ? {} : e;
846
856
  }
847
- function rt(e) {
857
+ function nt(e) {
848
858
  return e.scriptSrc ?? e.defaultSrc ?? [];
849
859
  }
850
- function nt(e) {
860
+ function at(e) {
851
861
  return e.some((t) => t.includes("'nonce-{nonce}'"));
852
862
  }
853
- function at(e, t) {
854
- return e.includes("*") ? !0 : e.includes("'none'") || e.some((r) => r.startsWith("'nonce-")) ? !1 : e.includes("'self'") && it(t) || t.startsWith("https:") && e.includes("https:") || t.startsWith("http:") && e.includes("http:") ? !0 : e.some((r) => st(r, t));
863
+ function it(e, t) {
864
+ return e.includes("*") ? !0 : e.includes("'none'") || e.some((r) => r.startsWith("'nonce-")) ? !1 : e.includes("'self'") && ot(t) || t.startsWith("https:") && e.includes("https:") || t.startsWith("http:") && e.includes("http:") ? !0 : e.some((r) => st(r, t));
855
865
  }
856
- function it(e) {
866
+ function ot(e) {
857
867
  return e.startsWith("/") && !e.startsWith("//");
858
868
  }
859
869
  function st(e, t) {
@@ -866,14 +876,14 @@ function st(e, t) {
866
876
  return !1;
867
877
  }
868
878
  }
869
- function ot(e, t) {
870
- return ct(e.cors, t), ut(e.method, e.security, t), {
879
+ function ct(e, t) {
880
+ return ut(e.cors, t), lt(e.method, e.security, t), {
871
881
  cors: e.cors,
872
882
  method: e.method,
873
883
  security: e.security
874
884
  };
875
885
  }
876
- function ct(e, t) {
886
+ function ut(e, t) {
877
887
  if (e)
878
888
  try {
879
889
  he(e);
@@ -885,8 +895,8 @@ function ct(e, t) {
885
895
  });
886
896
  }
887
897
  }
888
- function ut(e, t, r) {
889
- Ze.has(e) && (t?.csrf === !1 && r.push({
898
+ function lt(e, t, r) {
899
+ Qe.has(e) && (t?.csrf === !1 && r.push({
890
900
  code: "csrf-disabled",
891
901
  message: "CSRF protection is explicitly disabled for this unsafe route.",
892
902
  severity: "info"
@@ -900,7 +910,7 @@ function ut(e, t, r) {
900
910
  severity: "warning"
901
911
  }));
902
912
  }
903
- function lt(e) {
913
+ function ft(e) {
904
914
  try {
905
915
  const t = new URL(e.src);
906
916
  if (t.protocol === "http:" || t.protocol === "https:")
@@ -910,23 +920,23 @@ function lt(e) {
910
920
  }
911
921
  return null;
912
922
  }
913
- function ft(e) {
923
+ function dt(e) {
914
924
  return e.hostname === "www.googletagmanager.com" && (e.pathname === "/gtm.js" || e.pathname === "/ns.html");
915
925
  }
916
- class dt extends Error {
926
+ class ht extends Error {
917
927
  issues;
918
928
  constructor(t) {
919
- super(vt(t)), this.name = "EnvValidationError", this.issues = t;
929
+ super(bt(t)), this.name = "EnvValidationError", this.issues = t;
920
930
  }
921
931
  }
922
932
  function sr(e) {
923
933
  return e;
924
934
  }
925
- function or(e, t) {
935
+ function cr(e, t) {
926
936
  const r = [], n = {};
927
937
  for (const a of Object.keys(e)) {
928
- const i = e[a], o = t[String(a)];
929
- if (o === void 0 || o === "") {
938
+ const i = e[a], s = t[String(a)];
939
+ if (s === void 0 || s === "") {
930
940
  if (i.optional) {
931
941
  n[a] = void 0;
932
942
  continue;
@@ -939,20 +949,20 @@ function or(e, t) {
939
949
  continue;
940
950
  }
941
951
  try {
942
- n[a] = i.parse(String(a), o);
943
- } catch (s) {
952
+ n[a] = i.parse(String(a), s);
953
+ } catch (o) {
944
954
  r.push({
945
955
  code: "invalid",
946
956
  key: String(a),
947
- message: s instanceof Error ? s.message : `Environment variable ${String(a)} is invalid.`
957
+ message: o instanceof Error ? o.message : `Environment variable ${String(a)} is invalid.`
948
958
  });
949
959
  }
950
960
  }
951
961
  if (r.length)
952
- throw new dt(r);
962
+ throw new ht(r);
953
963
  return n;
954
964
  }
955
- function ht(e = {}) {
965
+ function mt(e = {}) {
956
966
  return y(e, !1, (t, r) => {
957
967
  if (r === "true" || r === "1")
958
968
  return !0;
@@ -961,7 +971,7 @@ function ht(e = {}) {
961
971
  throw new Error(`Environment variable ${t} must be true, false, 1, or 0.`);
962
972
  });
963
973
  }
964
- function mt(e, t = {}) {
974
+ function pt(e, t = {}) {
965
975
  return y(t, !1, (r, n) => {
966
976
  if (e.includes(n))
967
977
  return n;
@@ -970,7 +980,7 @@ function mt(e, t = {}) {
970
980
  );
971
981
  });
972
982
  }
973
- function pt(e = {}) {
983
+ function gt(e = {}) {
974
984
  return y(e, !1, (t, r) => {
975
985
  if (!/^-?\d+$/.test(r))
976
986
  throw new Error(`Environment variable ${t} must be an integer.`);
@@ -988,21 +998,21 @@ function pt(e = {}) {
988
998
  return n;
989
999
  });
990
1000
  }
991
- function gt(e = {}) {
1001
+ function wt(e = {}) {
992
1002
  return y(
993
1003
  e,
994
1004
  !0,
995
1005
  (t, r) => j(t, r, e)
996
1006
  );
997
1007
  }
998
- function wt(e = {}) {
1008
+ function yt(e = {}) {
999
1009
  return y(
1000
1010
  e,
1001
1011
  !1,
1002
1012
  (t, r) => j(t, r, e)
1003
1013
  );
1004
1014
  }
1005
- function yt(e = {}) {
1015
+ function vt(e = {}) {
1006
1016
  return y(e, !1, (t, r) => {
1007
1017
  let n;
1008
1018
  try {
@@ -1017,13 +1027,13 @@ function yt(e = {}) {
1017
1027
  return n;
1018
1028
  });
1019
1029
  }
1020
- const cr = {
1021
- boolean: ht,
1022
- enum: mt,
1023
- integer: pt,
1024
- secret: gt,
1025
- string: wt,
1026
- url: yt
1030
+ const ur = {
1031
+ boolean: mt,
1032
+ enum: pt,
1033
+ integer: gt,
1034
+ secret: wt,
1035
+ string: yt,
1036
+ url: vt
1027
1037
  };
1028
1038
  function y(e, t, r) {
1029
1039
  return {
@@ -1039,10 +1049,10 @@ function j(e, t, r) {
1039
1049
  );
1040
1050
  return t;
1041
1051
  }
1042
- function vt(e) {
1052
+ function bt(e) {
1043
1053
  return e.length === 1 ? e[0].message : `Environment validation failed with ${e.length} issues.`;
1044
1054
  }
1045
- function ur(e = {}) {
1055
+ function lr(e = {}) {
1046
1056
  return async function(r) {
1047
1057
  if (r.method.toUpperCase() !== "POST")
1048
1058
  return new Response(null, {
@@ -1051,25 +1061,25 @@ function ur(e = {}) {
1051
1061
  },
1052
1062
  status: 405
1053
1063
  });
1054
- const n = St(r);
1064
+ const n = Et(r);
1055
1065
  if (n)
1056
1066
  return n;
1057
- const a = Et(e, r);
1067
+ const a = Rt(e, r);
1058
1068
  if (a)
1059
1069
  return a;
1060
1070
  e.maxBodySize !== void 0 && (r = me({ maxBodySize: e.maxBodySize }, r));
1061
1071
  let i;
1062
1072
  try {
1063
1073
  i = await r.json();
1064
- } catch (s) {
1065
- return s instanceof pe ? new Response("Security report body too large.", { status: 413 }) : new Response("Invalid security report JSON.", {
1074
+ } catch (o) {
1075
+ return o instanceof pe ? new Response("Security report body too large.", { status: 413 }) : new Response("Invalid security report JSON.", {
1066
1076
  status: 400
1067
1077
  });
1068
1078
  }
1069
- const o = Rt(i);
1070
- for (let s = 0; s < o.length; s += 1)
1071
- await e.onReport?.(o[s], {
1072
- index: s,
1079
+ const s = $t(i);
1080
+ for (let o = 0; o < s.length; o += 1)
1081
+ await e.onReport?.(s[o], {
1082
+ index: o,
1073
1083
  request: r
1074
1084
  });
1075
1085
  return new Response(null, {
@@ -1077,20 +1087,20 @@ function ur(e = {}) {
1077
1087
  });
1078
1088
  };
1079
1089
  }
1080
- const bt = /* @__PURE__ */ new Set([
1090
+ const St = /* @__PURE__ */ new Set([
1081
1091
  "application/csp-report",
1082
1092
  "application/reports+json"
1083
1093
  ]);
1084
- function St(e) {
1094
+ function Et(e) {
1085
1095
  const t = e.headers.get("content-type");
1086
1096
  if (!t)
1087
1097
  return null;
1088
1098
  const r = t.split(";", 1)[0]?.trim().toLowerCase();
1089
- return r && bt.has(r) ? null : new Response("Unsupported security report Content-Type.", {
1099
+ return r && St.has(r) ? null : new Response("Unsupported security report Content-Type.", {
1090
1100
  status: 415
1091
1101
  });
1092
1102
  }
1093
- function Et(e, t) {
1103
+ function Rt(e, t) {
1094
1104
  if (e.maxBodySize === void 0)
1095
1105
  return null;
1096
1106
  const r = t.headers.get("content-length");
@@ -1107,24 +1117,24 @@ function Et(e, t) {
1107
1117
  status: 400
1108
1118
  });
1109
1119
  }
1110
- function Rt(e) {
1111
- return Array.isArray(e) ? e : $t(e) && "csp-report" in e ? [e["csp-report"]] : [e];
1112
- }
1113
1120
  function $t(e) {
1121
+ return Array.isArray(e) ? e : xt(e) && "csp-report" in e ? [e["csp-report"]] : [e];
1122
+ }
1123
+ function xt(e) {
1114
1124
  return typeof e == "object" && e !== null;
1115
1125
  }
1116
- function lr(e, t) {
1126
+ function fr(e, t) {
1117
1127
  const r = {}, n = [];
1118
1128
  let a = 0;
1119
- for (const [i, o] of Object.entries(t.files)) {
1120
- const s = e.getAll(i).filter(Tt);
1121
- r[i] = s, o.required && s.length === 0 && n.push({
1129
+ for (const [i, s] of Object.entries(t.files)) {
1130
+ const o = e.getAll(i).filter(It);
1131
+ r[i] = o, s.required && o.length === 0 && n.push({
1122
1132
  code: "file-missing",
1123
1133
  field: i,
1124
1134
  message: `Upload field ${i} requires at least one file.`
1125
1135
  });
1126
- for (const u of s)
1127
- a += u.size, xt(i, u, o, n);
1136
+ for (const u of o)
1137
+ a += u.size, At(i, u, s, n);
1128
1138
  }
1129
1139
  return t.maxTotalSize !== void 0 && a > A(t.maxTotalSize) && n.push({
1130
1140
  code: "total-upload-too-large",
@@ -1137,24 +1147,24 @@ function lr(e, t) {
1137
1147
  totalSize: a
1138
1148
  };
1139
1149
  }
1140
- function xt(e, t, r, n) {
1150
+ function At(e, t, r, n) {
1141
1151
  r.maxSize !== void 0 && t.size > A(r.maxSize) && n.push({
1142
1152
  code: "file-too-large",
1143
1153
  field: e,
1144
1154
  message: `Upload field ${e} contains ${t.name || "a file"} larger than ${r.maxSize}.`
1145
- }), r.types?.length && !At(t.type, r.types) && n.push({
1155
+ }), r.types?.length && !Tt(t.type, r.types) && n.push({
1146
1156
  code: "file-type-not-allowed",
1147
1157
  field: e,
1148
1158
  message: `Upload field ${e} contains ${t.name || "a file"} with disallowed type ${t.type || "unknown"}.`
1149
1159
  });
1150
1160
  }
1151
- function At(e, t) {
1161
+ function Tt(e, t) {
1152
1162
  return t.some((r) => r.endsWith("/*") ? e.startsWith(r.slice(0, -1)) : e === r);
1153
1163
  }
1154
- function Tt(e) {
1164
+ function It(e) {
1155
1165
  return e instanceof File;
1156
1166
  }
1157
- function It(e, t) {
1167
+ function kt(e, t) {
1158
1168
  const r = t.headers.get("origin");
1159
1169
  if (!r)
1160
1170
  return {
@@ -1171,7 +1181,7 @@ function It(e, t) {
1171
1181
  origin: r,
1172
1182
  reason: "invalid-origin"
1173
1183
  };
1174
- const a = kt(e, n, t);
1184
+ const a = Ct(e, n, t);
1175
1185
  return {
1176
1186
  allowed: a,
1177
1187
  expected: e.origins,
@@ -1179,17 +1189,17 @@ function It(e, t) {
1179
1189
  reason: a ? void 0 : "origin-not-allowed"
1180
1190
  };
1181
1191
  }
1182
- function fr(e, t) {
1183
- return !e || It(e, t).allowed ? null : new Response("WebSocket origin not allowed.", {
1192
+ function dr(e, t) {
1193
+ return !e || kt(e, t).allowed ? null : new Response("WebSocket origin not allowed.", {
1184
1194
  status: 403
1185
1195
  });
1186
1196
  }
1187
- function kt(e, t, r) {
1197
+ function Ct(e, t, r) {
1188
1198
  return e.origins === "same-origin" ? t === new URL(r.url).origin : e.origins.some(
1189
- (n) => Ct(n, t)
1199
+ (n) => Dt(n, t)
1190
1200
  );
1191
1201
  }
1192
- function Ct(e, t) {
1202
+ function Dt(e, t) {
1193
1203
  return e === "null" ? t === "null" : q(e) === t;
1194
1204
  }
1195
1205
  function q(e) {
@@ -1211,108 +1221,108 @@ function q(e) {
1211
1221
  }
1212
1222
  }
1213
1223
  export {
1214
- dt as EnvValidationError,
1215
- oe as HTTP_ERROR_STATUSES,
1216
- gr as HttpError,
1217
- Yt as Link,
1218
- Bt as action,
1219
- Ht as actionInput,
1220
- nr as analytics,
1221
- gn as assertAdapterCapabilities,
1222
- Xe as auditScriptDependencies,
1223
- wn as checkAdapterCapabilities,
1224
- It as checkWebSocketOrigin,
1225
- wr as createCache,
1226
- yr as createCorsHeaders,
1227
- vr as createCsrfCookie,
1228
- br as createCsrfToken,
1224
+ ht as EnvValidationError,
1225
+ se as HTTP_ERROR_STATUSES,
1226
+ wr as HttpError,
1227
+ Zt as Link,
1228
+ Ht as action,
1229
+ Wt as actionInput,
1230
+ ar as analytics,
1231
+ wn as assertAdapterCapabilities,
1232
+ Je as auditScriptDependencies,
1233
+ yn as checkAdapterCapabilities,
1234
+ kt as checkWebSocketOrigin,
1235
+ yr as createCache,
1236
+ vr as createCorsHeaders,
1237
+ br as createCsrfCookie,
1238
+ Sr as createCsrfToken,
1229
1239
  ke as createFileRouter,
1230
- Sr as createInvalidation,
1231
- Er as createMemoryCache,
1232
- Rr as createMemoryCacheStore,
1233
- Vt as createMemoryIdempotencyStore,
1234
- $r as createMemoryRateLimitStore,
1235
- xr as createRequestHandler,
1236
- ir as createSecurityAudit,
1240
+ Er as createInvalidation,
1241
+ Rr as createMemoryCache,
1242
+ $r as createMemoryCacheStore,
1243
+ Gt as createMemoryIdempotencyStore,
1244
+ xr as createMemoryRateLimitStore,
1245
+ Ar as createRequestHandler,
1246
+ or as createSecurityAudit,
1237
1247
  de as createSecurityHeaders,
1238
- ur as createSecurityReportHandler,
1239
- Ar as cspHash,
1240
- yn as defineAdapter,
1248
+ lr as createSecurityReportHandler,
1249
+ Tr as cspHash,
1250
+ vn as defineAdapter,
1241
1251
  sr as defineEnvSchema,
1242
- er as defineFonts,
1243
- Zt as defineImages,
1244
- ar as defineInstrumentation,
1245
- Tr as defineLinks,
1246
- Ir as defineMetadata,
1247
- Ft as defineOgImage,
1248
- Mt as defineRobots,
1249
- kr as defineRoutePolicy,
1250
- Cr as defineScripts,
1251
- Dr as defineSecurityPolicy,
1252
- Nt as defineSitemap,
1253
- zr as defineTags,
1252
+ tr as defineFonts,
1253
+ Qt as defineImages,
1254
+ ir as defineInstrumentation,
1255
+ Ir as defineLinks,
1256
+ kr as defineMetadata,
1257
+ jt as defineOgImage,
1258
+ Ft as defineRobots,
1259
+ Cr as defineRoutePolicy,
1260
+ Dr as defineScripts,
1261
+ zr as defineSecurityPolicy,
1262
+ Ut as defineSitemap,
1263
+ Or as defineTags,
1254
1264
  Pr as enforceAllowedMethods,
1255
1265
  Lr as enforceCsrfProtection,
1256
- Or as enforceRateLimit,
1257
- Nr as enforceRequestSecurity,
1258
- fr as enforceWebSocketOrigin,
1259
- cr as env,
1260
- Jt as font,
1261
- tr as fontPreloadLinks,
1262
- Ur as handleRequestWithManifest,
1266
+ Nr as enforceRateLimit,
1267
+ Ur as enforceRequestSecurity,
1268
+ dr as enforceWebSocketOrigin,
1269
+ ur as env,
1270
+ er as font,
1271
+ rr as fontPreloadLinks,
1272
+ Mr as handleRequestWithManifest,
1263
1273
  ee as href,
1264
- Mr as html,
1274
+ Fr as html,
1265
1275
  ce as httpError,
1266
- Kt as hydrateFileRouter,
1267
- Qt as isAllowedImageSource,
1276
+ Yt as hydrateFileRouter,
1277
+ Xt as isAllowedImageSource,
1268
1278
  le as isHttpError,
1269
- Fr as issueCsrfToken,
1270
- jr as json,
1271
- qr as jsonl,
1272
- Br as link,
1273
- Hr as mergeRoutePolicies,
1274
- Wr as mergeRouteSecurityPolicies,
1275
- _r as mergeSecurityPolicies,
1276
- Vr as meta,
1277
- Gr as modulePreload,
1278
- Kr as notFound,
1279
- Wt as page,
1279
+ jr as issueCsrfToken,
1280
+ qr as json,
1281
+ Br as jsonl,
1282
+ Hr as link,
1283
+ Wr as mergeRoutePolicies,
1284
+ _r as mergeRouteSecurityPolicies,
1285
+ Vr as mergeSecurityPolicies,
1286
+ Gr as meta,
1287
+ Kr as modulePreload,
1288
+ Yr as notFound,
1289
+ _t as page,
1280
1290
  A as parseBodySize,
1281
1291
  D as parseCacheDuration,
1282
- Yr as parseCookieHeader,
1283
- Zr as parseRateLimitWindow,
1284
- Xt as planImageTransform,
1285
- Qr as preconnect,
1286
- Xr as preload,
1287
- Jr as query,
1288
- en as redirect,
1289
- rr as renderFontFaceCss,
1290
- qt as renderOgImageResponse,
1292
+ Zr as parseCookieHeader,
1293
+ Qr as parseRateLimitWindow,
1294
+ Jt as planImageTransform,
1295
+ Xr as preconnect,
1296
+ Jr as preload,
1297
+ en as query,
1298
+ tn as redirect,
1299
+ nr as renderFontFaceCss,
1300
+ Bt as renderOgImageResponse,
1291
1301
  ge as renderOgImageSvg,
1292
- mr as renderPageResponse,
1293
- jt as renderRobots,
1294
- Ut as renderSitemap,
1295
- tn as resolveLinks,
1296
- rn as resolveMetadata,
1297
- nn as resolveScripts,
1302
+ pr as renderPageResponse,
1303
+ qt as renderRobots,
1304
+ Mt as renderSitemap,
1305
+ rn as resolveLinks,
1306
+ nn as resolveMetadata,
1307
+ an as resolveScripts,
1298
1308
  Q as response,
1299
- Gt as runIdempotentMutation,
1309
+ Kt as runIdempotentMutation,
1300
1310
  fe as script,
1301
- an as security,
1311
+ on as security,
1302
1312
  J as serializeCacheKey,
1303
1313
  sn as serializeCacheNamespace,
1304
- on as serializeCacheTag,
1305
- cn as serverTiming,
1306
- un as sse,
1307
- ln as stream,
1308
- fn as structuredData,
1309
- dn as tag,
1310
- hn as text,
1314
+ cn as serializeCacheTag,
1315
+ un as serverTiming,
1316
+ ln as sse,
1317
+ fn as stream,
1318
+ dn as structuredData,
1319
+ hn as tag,
1320
+ mn as text,
1311
1321
  X as toResponse,
1312
1322
  he as validateCorsPolicy,
1313
- or as validateEnv,
1314
- mn as validateRateLimitPolicy,
1315
- lr as validateUploads,
1316
- _t as webhook
1323
+ cr as validateEnv,
1324
+ pn as validateRateLimitPolicy,
1325
+ fr as validateUploads,
1326
+ Vt as webhook
1317
1327
  };
1318
1328
  //# sourceMappingURL=index.js.map