@demiurgejs/core 0.2.0-beta.1 → 0.2.0-beta.3
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/README.md +2 -0
- package/dist/adapter/testing.d.ts +33 -0
- package/dist/adapter/testing.d.ts.map +1 -0
- package/dist/adapter/testing.js +251 -0
- package/dist/adapter/testing.js.map +1 -0
- package/dist/browser/file-router.d.ts.map +1 -1
- package/dist/chunks/document-shell-WoM8yZlR.js +35 -0
- package/dist/chunks/document-shell-WoM8yZlR.js.map +1 -0
- package/dist/chunks/image-codec-Di53WpcH.js +141 -0
- package/dist/chunks/image-codec-Di53WpcH.js.map +1 -0
- package/dist/chunks/images-Edar3eU1.js +339 -0
- package/dist/chunks/images-Edar3eU1.js.map +1 -0
- package/dist/chunks/request-metadata-DaIYq4Ea.js +677 -0
- package/dist/chunks/request-metadata-DaIYq4Ea.js.map +1 -0
- package/dist/chunks/streaming-D0fGAuiO.js +469 -0
- package/dist/chunks/streaming-D0fGAuiO.js.map +1 -0
- package/dist/chunks/{testing-DBjVCN5v.js → testing-CRflAw4X.js} +1300 -1139
- package/dist/chunks/testing-CRflAw4X.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +63 -54
- package/dist/cli.js.map +1 -1
- package/dist/data/cache.d.ts +8 -0
- package/dist/data/cache.d.ts.map +1 -1
- package/dist/data/idempotency.d.ts.map +1 -1
- package/dist/data/index.d.ts +3 -1
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/testing.d.ts.map +1 -1
- package/dist/data/testing.js +94 -72
- package/dist/data/testing.js.map +1 -1
- package/dist/data/tiered.d.ts +7 -0
- package/dist/data/tiered.d.ts.map +1 -0
- package/dist/document/deferred-scripts.d.ts +11 -0
- package/dist/document/deferred-scripts.d.ts.map +1 -0
- package/dist/document/hydration.d.ts.map +1 -1
- package/dist/document/index.d.ts +4 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/render.d.ts.map +1 -1
- package/dist/document/scripts.d.ts +12 -1
- package/dist/document/scripts.d.ts.map +1 -1
- package/dist/document/trusted-types.d.ts +10 -0
- package/dist/document/trusted-types.d.ts.map +1 -0
- package/dist/edge/assets.d.ts +14 -0
- package/dist/edge/assets.d.ts.map +1 -0
- package/dist/edge/index.d.ts +19 -0
- package/dist/edge/index.d.ts.map +1 -0
- package/dist/edge/index.js +286 -0
- package/dist/edge/index.js.map +1 -0
- package/dist/edge/stores.d.ts +8 -0
- package/dist/edge/stores.d.ts.map +1 -0
- package/dist/edge/streaming.d.ts +7 -0
- package/dist/edge/streaming.d.ts.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +895 -556
- package/dist/index.js.map +1 -1
- package/dist/internal/testing.js +6 -6
- package/dist/kv/index.d.ts +5 -0
- package/dist/kv/index.d.ts.map +1 -0
- package/dist/kv/index.js +126 -0
- package/dist/kv/index.js.map +1 -0
- package/dist/kv/rate-limit-store.d.ts +8 -0
- package/dist/kv/rate-limit-store.d.ts.map +1 -0
- package/dist/kv/store.d.ts +28 -0
- package/dist/kv/store.d.ts.map +1 -0
- package/dist/node/font.d.ts +5 -0
- package/dist/node/font.d.ts.map +1 -0
- package/dist/node/http.d.ts.map +1 -1
- package/dist/node/image.d.ts +15 -0
- package/dist/node/image.d.ts.map +1 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +25 -23
- package/dist/node/index.js.map +1 -1
- package/dist/node/static.d.ts.map +1 -1
- package/dist/node/streaming.d.ts.map +1 -1
- package/dist/platform/analytics.d.ts +58 -5
- package/dist/platform/analytics.d.ts.map +1 -1
- package/dist/platform/font-assets.d.ts +19 -0
- package/dist/platform/font-assets.d.ts.map +1 -0
- package/dist/platform/fonts.d.ts +14 -4
- package/dist/platform/fonts.d.ts.map +1 -1
- package/dist/platform/image-codec.d.ts +15 -0
- package/dist/platform/image-codec.d.ts.map +1 -0
- package/dist/platform/image-url.d.ts +17 -0
- package/dist/platform/image-url.d.ts.map +1 -0
- package/dist/platform/image.d.ts +8 -0
- package/dist/platform/image.d.ts.map +1 -0
- package/dist/platform/images.d.ts +15 -0
- package/dist/platform/images.d.ts.map +1 -1
- package/dist/platform/index.d.ts +13 -6
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/observability.d.ts +2 -1
- package/dist/platform/observability.d.ts.map +1 -1
- package/dist/platform/web-vitals-client.d.ts +32 -0
- package/dist/platform/web-vitals-client.d.ts.map +1 -0
- package/dist/platform/web-vitals.d.ts +78 -0
- package/dist/platform/web-vitals.d.ts.map +1 -0
- package/dist/redis/index.d.ts +5 -0
- package/dist/redis/index.d.ts.map +1 -0
- package/dist/redis/index.js +209 -0
- package/dist/redis/index.js.map +1 -0
- package/dist/redis/rate-limit-store.d.ts +8 -0
- package/dist/redis/rate-limit-store.d.ts.map +1 -0
- package/dist/redis/store.d.ts +8 -0
- package/dist/redis/store.d.ts.map +1 -0
- package/dist/route/action.d.ts.map +1 -1
- package/dist/route/middleware.d.ts.map +1 -1
- package/dist/route/response.d.ts.map +1 -1
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/manifest.d.ts +1 -0
- package/dist/router/manifest.d.ts.map +1 -1
- package/dist/security/cookies.d.ts +26 -0
- package/dist/security/cookies.d.ts.map +1 -0
- package/dist/security/env.d.ts.map +1 -1
- package/dist/security/fetch-metadata.d.ts +29 -0
- package/dist/security/fetch-metadata.d.ts.map +1 -0
- package/dist/security/index.d.ts +5 -1
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/policy.d.ts +2 -27
- package/dist/security/policy.d.ts.map +1 -1
- package/dist/security/rate-limit.d.ts +6 -3
- package/dist/security/rate-limit.d.ts.map +1 -1
- package/dist/security/request.d.ts.map +1 -1
- package/dist/security/types.d.ts +82 -6
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/verification.d.ts.map +1 -1
- package/dist/server/document-shell.d.ts +12 -0
- package/dist/server/document-shell.d.ts.map +1 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/request-handler.d.ts +6 -2
- package/dist/server/request-handler.d.ts.map +1 -1
- package/dist/static/images.d.ts +13 -0
- package/dist/static/images.d.ts.map +1 -0
- package/dist/static/index.d.ts +8 -0
- package/dist/static/index.d.ts.map +1 -1
- package/dist/static/index.js +421 -313
- package/dist/static/index.js.map +1 -1
- package/dist/static/vercel.d.ts +3 -0
- package/dist/static/vercel.d.ts.map +1 -1
- package/dist/vite/index.d.ts +3 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +1041 -652
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/plugin.d.ts +9 -0
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/vite/policy-verification.d.ts.map +1 -1
- package/dist/vite/route-audit.d.ts +50 -0
- package/dist/vite/route-audit.d.ts.map +1 -0
- package/package.json +34 -3
- package/dist/chunks/request-metadata-DwEO1EAS.js +0 -477
- package/dist/chunks/request-metadata-DwEO1EAS.js.map +0 -1
- package/dist/chunks/streaming-Ci6vf3BB.js +0 -353
- package/dist/chunks/streaming-Ci6vf3BB.js.map +0 -1
- package/dist/chunks/testing-DBjVCN5v.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,184 +1,186 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { g as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as V } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as re, useState as F, useRef as z, useEffect as P, useMemo as ne, createElement as w, useContext as oe, Component as ae } from "react";
|
|
3
|
+
import { g as ie, H as se, h as U, i as ce, j as I } from "./chunks/request-metadata-DaIYq4Ea.js";
|
|
4
|
+
import { F as xr, k as Cr, l as Ir, m as Nr, n as Lr, d as Pr, o as Dr, q as Or, t as Mr, u as Fr, v as zr, p as Ur, a as Br, w as _r, x as jr } from "./chunks/request-metadata-DaIYq4Ea.js";
|
|
5
|
+
import { z as B, x as ue, A as le, B as fe, C as de, D as he, R as me, E as D, F as pe, y as W, G as ge, i as q, H as we, N as _, I as ye, J as ve, K as be, L as Se, O as Ee, P as Re, Q as Te, S as ke } from "./chunks/testing-CRflAw4X.js";
|
|
6
|
+
import { T as Vr, U as Wr, V as qr, W as Gr, X as Kr, Y as Jr, Z as Yr, _ as Zr, $ as Xr, a0 as Qr, a1 as en, u as tn, a2 as rn, d as nn, c as on, q as an, f as sn, e as cn, a3 as un, a4 as ln, a5 as fn, a6 as dn, a7 as hn, a8 as mn, a9 as pn, aa as gn, ab as wn, ac as yn, h as vn, ad as bn, ae as Sn, af as En, ag as Rn, ah as Tn, ai as kn, aj as An, ak as $n, m as xn, al as Cn, am as In, an as Nn, ao as Ln, ap as Pn, aq as Dn, s as On, ar as Mn, w as Fn, as as zn, at as Un, au as Bn, av as _n, aw as jn, ax as Hn, v as Vn, g as Wn, a as qn } from "./chunks/testing-CRflAw4X.js";
|
|
7
|
+
import { k as Ae } from "./chunks/images-Edar3eU1.js";
|
|
8
|
+
import { d as Kn, l as Jn, m as Yn, n as Zn, f as Xn, o as Qn, q as eo, a as to, s as ro, t as no, b as oo, h as ao, j as io, r as so } from "./chunks/images-Edar3eU1.js";
|
|
7
9
|
import "react-dom/server";
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const t = e.now ?? Date.now, r = e.defaultTtl ??
|
|
10
|
+
const $e = "24h", xe = 1e4;
|
|
11
|
+
function Yt(e = {}) {
|
|
12
|
+
const t = e.now ?? Date.now, r = e.defaultTtl ?? $e, n = e.maximumEntries ?? xe;
|
|
11
13
|
if (!Number.isSafeInteger(n) || n <= 0)
|
|
12
14
|
throw new Error(
|
|
13
15
|
"Demiurge idempotency maximumEntries must be a positive integer."
|
|
14
16
|
);
|
|
15
|
-
const
|
|
16
|
-
if (!Number.isFinite(
|
|
17
|
+
const o = B(r);
|
|
18
|
+
if (!Number.isFinite(o))
|
|
17
19
|
throw new Error("Demiurge idempotency defaultTtl must be finite.");
|
|
18
|
-
const
|
|
20
|
+
const a = /* @__PURE__ */ new Map();
|
|
19
21
|
return {
|
|
20
|
-
async run(
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const d =
|
|
24
|
-
if (d && (d.pending || d.expiresAt >
|
|
22
|
+
async run(i) {
|
|
23
|
+
const s = ue(i.key), l = t();
|
|
24
|
+
Ce(a, l);
|
|
25
|
+
const d = a.get(s);
|
|
26
|
+
if (d && (d.pending || d.expiresAt > l))
|
|
25
27
|
return {
|
|
26
|
-
key:
|
|
28
|
+
key: s,
|
|
27
29
|
replayed: !0,
|
|
28
30
|
value: await d.value
|
|
29
31
|
};
|
|
30
|
-
if (
|
|
32
|
+
if (a.size >= n && Ie(a), a.size >= n)
|
|
31
33
|
throw new Error(
|
|
32
34
|
"Demiurge idempotency store is at capacity with in-flight mutations."
|
|
33
35
|
);
|
|
34
|
-
const p = Promise.resolve().then(
|
|
36
|
+
const p = Promise.resolve().then(i.fn), c = {
|
|
35
37
|
expiresAt: Number.POSITIVE_INFINITY,
|
|
36
38
|
pending: !0,
|
|
37
39
|
value: p
|
|
38
40
|
};
|
|
39
|
-
|
|
41
|
+
a.set(s, c);
|
|
40
42
|
try {
|
|
41
|
-
const
|
|
42
|
-
return c.pending = !1, c.expiresAt = t() +
|
|
43
|
-
key:
|
|
43
|
+
const f = await p;
|
|
44
|
+
return c.pending = !1, c.expiresAt = t() + B(i.ttl ?? r), {
|
|
45
|
+
key: s,
|
|
44
46
|
replayed: !1,
|
|
45
|
-
value:
|
|
47
|
+
value: f
|
|
46
48
|
};
|
|
47
|
-
} catch (
|
|
48
|
-
throw
|
|
49
|
+
} catch (f) {
|
|
50
|
+
throw a.get(s) === c && a.delete(s), f;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function Ce(e, t) {
|
|
54
56
|
for (const [r, n] of e)
|
|
55
57
|
!n.pending && n.expiresAt <= t && e.delete(r);
|
|
56
58
|
}
|
|
57
|
-
function
|
|
59
|
+
function Ie(e) {
|
|
58
60
|
for (const [t, r] of e)
|
|
59
61
|
if (!r.pending) {
|
|
60
62
|
e.delete(t);
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
|
-
function
|
|
66
|
+
function Zt(e, t) {
|
|
65
67
|
return e.run(t);
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function Xt(e) {
|
|
68
70
|
return {
|
|
69
71
|
entries: e
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
function
|
|
74
|
+
function Qt(e) {
|
|
73
75
|
return [
|
|
74
76
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
75
77
|
`<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"' : ""}>`,
|
|
76
|
-
...e.entries.map(
|
|
78
|
+
...e.entries.map(Le),
|
|
77
79
|
"</urlset>",
|
|
78
80
|
""
|
|
79
81
|
].join(`
|
|
80
82
|
`);
|
|
81
83
|
}
|
|
82
|
-
function
|
|
84
|
+
function er(e) {
|
|
83
85
|
return e;
|
|
84
86
|
}
|
|
85
|
-
function
|
|
87
|
+
function tr(e) {
|
|
86
88
|
return e;
|
|
87
89
|
}
|
|
88
|
-
function
|
|
90
|
+
function rr(e) {
|
|
89
91
|
const t = [];
|
|
90
92
|
for (const r of e.rules ?? []) {
|
|
91
|
-
for (const n of
|
|
93
|
+
for (const n of A(r.userAgent))
|
|
92
94
|
t.push(`User-agent: ${n}`);
|
|
93
|
-
for (const n of
|
|
95
|
+
for (const n of A(r.allow))
|
|
94
96
|
t.push(`Allow: ${n}`);
|
|
95
|
-
for (const n of
|
|
97
|
+
for (const n of A(r.disallow))
|
|
96
98
|
t.push(`Disallow: ${n}`);
|
|
97
99
|
t.push("");
|
|
98
100
|
}
|
|
99
101
|
e.host && t.push(`Host: ${e.host}`);
|
|
100
|
-
for (const r of
|
|
102
|
+
for (const r of A(e.sitemap))
|
|
101
103
|
t.push(`Sitemap: ${r}`);
|
|
102
104
|
return `${t.join(`
|
|
103
105
|
`).replace(/\n+$/, "")}
|
|
104
106
|
`;
|
|
105
107
|
}
|
|
106
|
-
function
|
|
107
|
-
const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820",
|
|
108
|
-
return
|
|
109
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" role="img" aria-label="${
|
|
110
|
-
` <rect width="100%" height="100%" fill="${
|
|
111
|
-
|
|
112
|
-
` <text x="72" y="${
|
|
113
|
-
|
|
108
|
+
function Ne(e) {
|
|
109
|
+
const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820", o = e.foreground ?? "#ffffff", a = N(e.title, 120), i = e.subtitle ? N(e.subtitle, 160) : void 0, s = e.brand ? N(e.brand, 80) : void 0;
|
|
110
|
+
return Oe(t, r), [
|
|
111
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" role="img" aria-label="${E(a)}">`,
|
|
112
|
+
` <rect width="100%" height="100%" fill="${E(n)}" />`,
|
|
113
|
+
s ? ` <text x="72" y="96" fill="${E(o)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="32" font-weight="700">${R(s)}</text>` : null,
|
|
114
|
+
` <text x="72" y="${i ? 300 : 340}" fill="${E(o)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="76" font-weight="800">${R(a)}</text>`,
|
|
115
|
+
i ? ` <text x="72" y="392" fill="${E(o)}" fill-opacity="0.78" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="38" font-weight="500">${R(i)}</text>` : null,
|
|
114
116
|
"</svg>"
|
|
115
|
-
].filter((
|
|
117
|
+
].filter((l) => !!l).join(`
|
|
116
118
|
`);
|
|
117
119
|
}
|
|
118
|
-
function
|
|
119
|
-
return new Response(
|
|
120
|
+
function nr(e) {
|
|
121
|
+
return new Response(Ne(e), {
|
|
120
122
|
headers: {
|
|
121
123
|
"cache-control": "public, max-age=31536000, immutable",
|
|
122
124
|
"content-type": "image/svg+xml; charset=utf-8"
|
|
123
125
|
}
|
|
124
126
|
});
|
|
125
127
|
}
|
|
126
|
-
function
|
|
128
|
+
function Le(e) {
|
|
127
129
|
return [
|
|
128
130
|
" <url>",
|
|
129
|
-
` <loc>${
|
|
130
|
-
e.lastModified ? ` <lastmod>${
|
|
131
|
+
` <loc>${R(e.url)}</loc>`,
|
|
132
|
+
e.lastModified ? ` <lastmod>${R(Pe(e.lastModified))}</lastmod>` : null,
|
|
131
133
|
e.changeFrequency ? ` <changefreq>${e.changeFrequency}</changefreq>` : null,
|
|
132
|
-
e.priority !== void 0 ? ` <priority>${
|
|
134
|
+
e.priority !== void 0 ? ` <priority>${De(e.priority)}</priority>` : null,
|
|
133
135
|
...(e.alternates ?? []).map(
|
|
134
|
-
(t) => ` <xhtml:link rel="alternate" hreflang="${
|
|
136
|
+
(t) => ` <xhtml:link rel="alternate" hreflang="${E(t.hrefLang)}" href="${E(t.href)}" />`
|
|
135
137
|
),
|
|
136
138
|
" </url>"
|
|
137
139
|
].filter((t) => !!t).join(`
|
|
138
140
|
`);
|
|
139
141
|
}
|
|
140
|
-
function
|
|
142
|
+
function Pe(e) {
|
|
141
143
|
return e instanceof Date ? e.toISOString() : e;
|
|
142
144
|
}
|
|
143
|
-
function
|
|
145
|
+
function De(e) {
|
|
144
146
|
if (e < 0 || e > 1)
|
|
145
147
|
throw new Error("Sitemap entry priority must be between 0 and 1.");
|
|
146
148
|
return String(e);
|
|
147
149
|
}
|
|
148
|
-
function
|
|
150
|
+
function A(e) {
|
|
149
151
|
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
150
152
|
}
|
|
151
|
-
function
|
|
153
|
+
function R(e) {
|
|
152
154
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
153
155
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
156
|
+
function E(e) {
|
|
157
|
+
return R(e).replaceAll('"', """).replaceAll("'", "'");
|
|
156
158
|
}
|
|
157
|
-
function
|
|
159
|
+
function N(e, t) {
|
|
158
160
|
return e.length > t ? `${e.slice(0, t - 3)}...` : e;
|
|
159
161
|
}
|
|
160
|
-
function
|
|
162
|
+
function Oe(e, t) {
|
|
161
163
|
if (!Number.isSafeInteger(e) || e <= 0)
|
|
162
164
|
throw new Error("OG image width must be a positive integer.");
|
|
163
165
|
if (!Number.isSafeInteger(t) || t <= 0)
|
|
164
166
|
throw new Error("OG image height must be a positive integer.");
|
|
165
167
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
168
|
+
function or(e) {
|
|
169
|
+
return le(
|
|
168
170
|
async (t) => {
|
|
169
171
|
const r = e.input ? await e.input(t) : void 0, n = {
|
|
170
172
|
...t,
|
|
171
173
|
input: r
|
|
172
|
-
},
|
|
174
|
+
}, o = async () => await Me(
|
|
173
175
|
await e.handler(n),
|
|
174
176
|
t
|
|
175
177
|
);
|
|
176
178
|
if (!e.idempotency)
|
|
177
|
-
return await
|
|
178
|
-
const
|
|
179
|
+
return await o();
|
|
180
|
+
const a = typeof e.idempotency.key == "function" ? e.idempotency.key(n) : e.idempotency.key;
|
|
179
181
|
return (await e.idempotency.store.run({
|
|
180
|
-
fn:
|
|
181
|
-
key:
|
|
182
|
+
fn: o,
|
|
183
|
+
key: a,
|
|
182
184
|
ttl: e.idempotency.ttl
|
|
183
185
|
})).value;
|
|
184
186
|
},
|
|
@@ -189,7 +191,7 @@ function kt(e) {
|
|
|
189
191
|
}
|
|
190
192
|
);
|
|
191
193
|
}
|
|
192
|
-
const
|
|
194
|
+
const ar = {
|
|
193
195
|
async formData({ request: e }) {
|
|
194
196
|
return await e.formData();
|
|
195
197
|
},
|
|
@@ -200,10 +202,10 @@ const It = {
|
|
|
200
202
|
return await e.text();
|
|
201
203
|
}
|
|
202
204
|
};
|
|
203
|
-
async function
|
|
204
|
-
return e instanceof Response ? e : await
|
|
205
|
+
async function Me(e, t) {
|
|
206
|
+
return e instanceof Response ? e : await fe(e, t);
|
|
205
207
|
}
|
|
206
|
-
function
|
|
208
|
+
function ir(e) {
|
|
207
209
|
return typeof e == "function" ? {
|
|
208
210
|
kind: "page",
|
|
209
211
|
render: { mode: "ssr" },
|
|
@@ -216,10 +218,10 @@ function Tt(e) {
|
|
|
216
218
|
view: e.view
|
|
217
219
|
};
|
|
218
220
|
}
|
|
219
|
-
function
|
|
221
|
+
function sr(e) {
|
|
220
222
|
return e;
|
|
221
223
|
}
|
|
222
|
-
const
|
|
224
|
+
const cr = {
|
|
223
225
|
hmac(e) {
|
|
224
226
|
return {
|
|
225
227
|
kind: "response",
|
|
@@ -227,7 +229,7 @@ const zt = {
|
|
|
227
229
|
const r = new Uint8Array(await t.request.arrayBuffer()), n = t.request.headers.get(
|
|
228
230
|
e.header ?? "x-webhook-signature"
|
|
229
231
|
);
|
|
230
|
-
return n ? await
|
|
232
|
+
return n ? await Fe(r, n, e) ? await e.handler({
|
|
231
233
|
...t,
|
|
232
234
|
rawBody: r,
|
|
233
235
|
text: () => new TextDecoder().decode(r)
|
|
@@ -243,15 +245,15 @@ const zt = {
|
|
|
243
245
|
};
|
|
244
246
|
}
|
|
245
247
|
};
|
|
246
|
-
async function
|
|
247
|
-
const n = r.algorithm ?? "SHA-256",
|
|
248
|
+
async function Fe(e, t, r) {
|
|
249
|
+
const n = r.algorithm ?? "SHA-256", o = r.encoding ?? "hex", a = ze(
|
|
248
250
|
t,
|
|
249
251
|
n,
|
|
250
252
|
r.prefix
|
|
251
|
-
),
|
|
252
|
-
if (!
|
|
253
|
+
), i = Ue(a, o);
|
|
254
|
+
if (!i)
|
|
253
255
|
return !1;
|
|
254
|
-
const
|
|
256
|
+
const s = await globalThis.crypto.subtle.importKey(
|
|
255
257
|
"raw",
|
|
256
258
|
new TextEncoder().encode(r.secret),
|
|
257
259
|
{
|
|
@@ -263,16 +265,16 @@ async function Ae(e, t, r) {
|
|
|
263
265
|
);
|
|
264
266
|
return await globalThis.crypto.subtle.verify(
|
|
265
267
|
"HMAC",
|
|
266
|
-
o,
|
|
267
268
|
s,
|
|
269
|
+
i,
|
|
268
270
|
Uint8Array.from(e).buffer
|
|
269
271
|
);
|
|
270
272
|
}
|
|
271
|
-
function
|
|
272
|
-
const n = e.trim(),
|
|
273
|
-
return
|
|
273
|
+
function ze(e, t, r) {
|
|
274
|
+
const n = e.trim(), o = r === void 0 ? `${t.toLowerCase().replace("-", "")}=` : r;
|
|
275
|
+
return o !== !1 && n.startsWith(o) ? n.slice(o.length).trim() : n;
|
|
274
276
|
}
|
|
275
|
-
function
|
|
277
|
+
function Ue(e, t) {
|
|
276
278
|
if (t === "hex")
|
|
277
279
|
return /^(?:[0-9a-f]{2})+$/i.test(e) ? Uint8Array.from(
|
|
278
280
|
e.match(/.{2}/g) ?? [],
|
|
@@ -289,47 +291,110 @@ function xe(e, t) {
|
|
|
289
291
|
return null;
|
|
290
292
|
}
|
|
291
293
|
}
|
|
292
|
-
|
|
294
|
+
const Be = /^[!#$%&'*+\-.^_`|~A-Za-z0-9]+$/, _e = {
|
|
295
|
+
host: "__Host-",
|
|
296
|
+
none: "",
|
|
297
|
+
secure: "__Secure-"
|
|
298
|
+
}, j = 4096;
|
|
299
|
+
function O(e, t = "host") {
|
|
300
|
+
return `${_e[t]}${e}`;
|
|
301
|
+
}
|
|
302
|
+
function je(e) {
|
|
303
|
+
const t = e.scope ?? "host", r = O(e.name, t), n = [], o = (a, i) => {
|
|
304
|
+
n.push({ code: a, message: i, name: r });
|
|
305
|
+
};
|
|
306
|
+
if (Be.test(e.name) || o(
|
|
307
|
+
"cookie-name-invalid",
|
|
308
|
+
`Cookie name ${JSON.stringify(e.name)} contains a character that a cookie name cannot hold. Use letters, digits, or the token characters that RFC 6265 allows.`
|
|
309
|
+
), (e.name.startsWith("__Host-") || e.name.startsWith("__Secure-")) && o(
|
|
310
|
+
"cookie-name-carries-prefix",
|
|
311
|
+
`Cookie name ${JSON.stringify(e.name)} already carries a prefix. Remove the prefix from name and declare scope ${JSON.stringify(t === "none" ? "host" : t)} instead.`
|
|
312
|
+
), t !== "none" && e.secure === !1 && o(
|
|
313
|
+
"cookie-scope-requires-secure",
|
|
314
|
+
`Cookie ${r} uses scope ${JSON.stringify(t)}, so it requires Secure. Remove secure: false, or declare scope "none" for a cookie that a browser must accept over plain HTTP.`
|
|
315
|
+
), t === "host" && e.domain !== void 0 && o(
|
|
316
|
+
"cookie-domain-not-allowed",
|
|
317
|
+
`Cookie ${r} uses scope "host", so it cannot carry a Domain attribute. Remove domain, or declare scope "secure" to share the cookie with subdomains.`
|
|
318
|
+
), t === "host" && e.path !== void 0 && e.path !== "/" && o(
|
|
319
|
+
"cookie-path-not-allowed",
|
|
320
|
+
`Cookie ${r} uses scope "host", so it requires Path=/. Remove path, or declare scope "secure" for a cookie that a path must limit.`
|
|
321
|
+
), e.sameSite === "None" && e.secure === !1 && o(
|
|
322
|
+
"cookie-same-site-none-requires-secure",
|
|
323
|
+
`Cookie ${r} declares SameSite=None, so it requires Secure. Remove secure: false, or declare a SameSite policy of "Lax" or "Strict".`
|
|
324
|
+
), e.maxAge !== void 0 && (!Number.isInteger(e.maxAge) || e.maxAge < 0) && o(
|
|
325
|
+
"cookie-max-age-invalid",
|
|
326
|
+
`Cookie ${r} declares maxAge ${JSON.stringify(e.maxAge)}. Use a whole number of seconds that is zero or greater.`
|
|
327
|
+
), n.length === 0) {
|
|
328
|
+
const a = new TextEncoder().encode(G(e, t, r)).length;
|
|
329
|
+
a > j && o(
|
|
330
|
+
"cookie-too-large",
|
|
331
|
+
`Cookie ${r} serializes to ${a} bytes, and a browser drops a cookie above ${j} bytes. Store the payload on the server and keep an identifier in the cookie.`
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
return n;
|
|
335
|
+
}
|
|
336
|
+
function ur(e, t = "host") {
|
|
337
|
+
if (typeof document > "u")
|
|
338
|
+
return;
|
|
339
|
+
const r = typeof e == "string" ? { name: e, scope: t } : e;
|
|
340
|
+
return de(document.cookie).get(
|
|
341
|
+
O(r.name, r.scope ?? "host")
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function lr(e) {
|
|
345
|
+
const t = je(e);
|
|
346
|
+
if (t.length > 0)
|
|
347
|
+
throw new Error(
|
|
348
|
+
`Demiurge rejected a cookie declaration. ${t.map((n) => n.message).join(" ")}`
|
|
349
|
+
);
|
|
350
|
+
const r = e.scope ?? "host";
|
|
351
|
+
return G(e, r, O(e.name, r));
|
|
352
|
+
}
|
|
353
|
+
function G(e, t, r) {
|
|
354
|
+
const n = [`${r}=${encodeURIComponent(e.value)}`], o = t === "host" ? "/" : e.path ?? "/";
|
|
355
|
+
return n.push(`Path=${o}`), t !== "host" && e.domain !== void 0 && n.push(`Domain=${e.domain}`), e.expires && n.push(`Expires=${e.expires.toUTCString()}`), e.maxAge !== void 0 && n.push(`Max-Age=${e.maxAge}`), n.push(`SameSite=${e.sameSite ?? "Lax"}`), (e.httpOnly ?? !0) && n.push("HttpOnly"), (t !== "none" || (e.secure ?? !0)) && n.push("Secure"), n.join("; ");
|
|
356
|
+
}
|
|
357
|
+
class He extends Error {
|
|
293
358
|
issues;
|
|
294
359
|
constructor(t) {
|
|
295
|
-
super(
|
|
360
|
+
super(Ye(t)), this.name = "EnvValidationError", this.issues = t;
|
|
296
361
|
}
|
|
297
362
|
}
|
|
298
|
-
function
|
|
363
|
+
function fr(e) {
|
|
299
364
|
return e;
|
|
300
365
|
}
|
|
301
|
-
function
|
|
366
|
+
function dr(e, t) {
|
|
302
367
|
const r = [], n = {};
|
|
303
|
-
for (const
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
if (
|
|
307
|
-
n[
|
|
368
|
+
for (const o of Object.keys(e)) {
|
|
369
|
+
const a = e[o], i = t[String(o)];
|
|
370
|
+
if (i === void 0 || i === "") {
|
|
371
|
+
if (a.optional) {
|
|
372
|
+
n[o] = void 0;
|
|
308
373
|
continue;
|
|
309
374
|
}
|
|
310
375
|
r.push({
|
|
311
376
|
code: "missing",
|
|
312
|
-
key: String(
|
|
313
|
-
message: `Environment variable ${String(
|
|
377
|
+
key: String(o),
|
|
378
|
+
message: `Environment variable ${String(o)} is required.`
|
|
314
379
|
});
|
|
315
380
|
continue;
|
|
316
381
|
}
|
|
317
382
|
try {
|
|
318
|
-
n[
|
|
319
|
-
} catch (
|
|
383
|
+
n[o] = a.parse(String(o), i);
|
|
384
|
+
} catch (s) {
|
|
320
385
|
r.push({
|
|
321
386
|
code: "invalid",
|
|
322
|
-
key: String(
|
|
323
|
-
message:
|
|
387
|
+
key: String(o),
|
|
388
|
+
message: s instanceof Error ? s.message : `Environment variable ${String(o)} is invalid.`
|
|
324
389
|
});
|
|
325
390
|
}
|
|
326
391
|
}
|
|
327
392
|
if (r.length)
|
|
328
|
-
throw new
|
|
393
|
+
throw new He(r);
|
|
329
394
|
return n;
|
|
330
395
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
396
|
+
function Ve(e = {}) {
|
|
397
|
+
return T(e, !1, (t, r) => {
|
|
333
398
|
if (r === "true" || r === "1")
|
|
334
399
|
return !0;
|
|
335
400
|
if (r === "false" || r === "0")
|
|
@@ -337,8 +402,8 @@ function Ie(e = {}) {
|
|
|
337
402
|
throw new Error(`Environment variable ${t} must be true, false, 1, or 0.`);
|
|
338
403
|
});
|
|
339
404
|
}
|
|
340
|
-
function
|
|
341
|
-
return
|
|
405
|
+
function We(e, t = {}) {
|
|
406
|
+
return T(t, !1, (r, n) => {
|
|
342
407
|
if (e.includes(n))
|
|
343
408
|
return n;
|
|
344
409
|
throw new Error(
|
|
@@ -346,8 +411,8 @@ function Te(e, t = {}) {
|
|
|
346
411
|
);
|
|
347
412
|
});
|
|
348
413
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
414
|
+
function qe(e = {}) {
|
|
415
|
+
return T(e, !1, (t, r) => {
|
|
351
416
|
if (!/^-?\d+$/.test(r))
|
|
352
417
|
throw new Error(`Environment variable ${t} must be an integer.`);
|
|
353
418
|
const n = Number(r);
|
|
@@ -364,22 +429,22 @@ function Ce(e = {}) {
|
|
|
364
429
|
return n;
|
|
365
430
|
});
|
|
366
431
|
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
432
|
+
function Ge(e = {}) {
|
|
433
|
+
return T(
|
|
369
434
|
e,
|
|
370
435
|
!0,
|
|
371
|
-
(t, r) =>
|
|
436
|
+
(t, r) => K(t, r, e)
|
|
372
437
|
);
|
|
373
438
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
439
|
+
function Ke(e = {}) {
|
|
440
|
+
return T(
|
|
376
441
|
e,
|
|
377
442
|
!1,
|
|
378
|
-
(t, r) =>
|
|
443
|
+
(t, r) => K(t, r, e)
|
|
379
444
|
);
|
|
380
445
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
446
|
+
function Je(e = {}) {
|
|
447
|
+
return T(e, !1, (t, r) => {
|
|
383
448
|
let n;
|
|
384
449
|
try {
|
|
385
450
|
n = new URL(r);
|
|
@@ -393,32 +458,32 @@ function Ne(e = {}) {
|
|
|
393
458
|
return n;
|
|
394
459
|
});
|
|
395
460
|
}
|
|
396
|
-
const
|
|
397
|
-
boolean:
|
|
398
|
-
enum:
|
|
399
|
-
integer:
|
|
400
|
-
secret:
|
|
401
|
-
string:
|
|
402
|
-
url:
|
|
461
|
+
const hr = {
|
|
462
|
+
boolean: Ve,
|
|
463
|
+
enum: We,
|
|
464
|
+
integer: qe,
|
|
465
|
+
secret: Ge,
|
|
466
|
+
string: Ke,
|
|
467
|
+
url: Je
|
|
403
468
|
};
|
|
404
|
-
function
|
|
469
|
+
function T(e, t, r) {
|
|
405
470
|
return {
|
|
406
471
|
optional: e.optional ?? !1,
|
|
407
472
|
parse: r,
|
|
408
473
|
sensitive: t
|
|
409
474
|
};
|
|
410
475
|
}
|
|
411
|
-
function
|
|
476
|
+
function K(e, t, r) {
|
|
412
477
|
if (r.minLength !== void 0 && t.length < r.minLength)
|
|
413
478
|
throw new Error(
|
|
414
479
|
`Environment variable ${e} must be at least ${r.minLength} characters.`
|
|
415
480
|
);
|
|
416
481
|
return t;
|
|
417
482
|
}
|
|
418
|
-
function
|
|
483
|
+
function Ye(e) {
|
|
419
484
|
return e.length === 1 ? e[0].message : `Environment validation failed with ${e.length} issues.`;
|
|
420
485
|
}
|
|
421
|
-
function
|
|
486
|
+
function mr(e = {}) {
|
|
422
487
|
return async function(r) {
|
|
423
488
|
if (r.method.toUpperCase() !== "POST")
|
|
424
489
|
return new Response(null, {
|
|
@@ -427,25 +492,25 @@ function Lt(e = {}) {
|
|
|
427
492
|
},
|
|
428
493
|
status: 405
|
|
429
494
|
});
|
|
430
|
-
const n =
|
|
495
|
+
const n = Xe(r);
|
|
431
496
|
if (n)
|
|
432
497
|
return n;
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
return
|
|
436
|
-
e.maxBodySize !== void 0 && (r =
|
|
437
|
-
let
|
|
498
|
+
const o = Qe(e, r);
|
|
499
|
+
if (o)
|
|
500
|
+
return o;
|
|
501
|
+
e.maxBodySize !== void 0 && (r = he({ maxBodySize: e.maxBodySize }, r));
|
|
502
|
+
let a;
|
|
438
503
|
try {
|
|
439
|
-
|
|
440
|
-
} catch (
|
|
441
|
-
return
|
|
504
|
+
a = await r.json();
|
|
505
|
+
} catch (s) {
|
|
506
|
+
return s instanceof me ? new Response("Security report body too large.", { status: 413 }) : new Response("Invalid security report JSON.", {
|
|
442
507
|
status: 400
|
|
443
508
|
});
|
|
444
509
|
}
|
|
445
|
-
const
|
|
446
|
-
for (let
|
|
447
|
-
await e.onReport?.(s
|
|
448
|
-
index:
|
|
510
|
+
const i = et(a);
|
|
511
|
+
for (let s = 0; s < i.length; s += 1)
|
|
512
|
+
await e.onReport?.(i[s], {
|
|
513
|
+
index: s,
|
|
449
514
|
request: r
|
|
450
515
|
});
|
|
451
516
|
return new Response(null, {
|
|
@@ -453,20 +518,20 @@ function Lt(e = {}) {
|
|
|
453
518
|
});
|
|
454
519
|
};
|
|
455
520
|
}
|
|
456
|
-
const
|
|
521
|
+
const Ze = /* @__PURE__ */ new Set([
|
|
457
522
|
"application/csp-report",
|
|
458
523
|
"application/reports+json"
|
|
459
524
|
]);
|
|
460
|
-
function
|
|
525
|
+
function Xe(e) {
|
|
461
526
|
const t = e.headers.get("content-type");
|
|
462
527
|
if (!t)
|
|
463
528
|
return null;
|
|
464
529
|
const r = t.split(";", 1)[0]?.trim().toLowerCase();
|
|
465
|
-
return r &&
|
|
530
|
+
return r && Ze.has(r) ? null : new Response("Unsupported security report Content-Type.", {
|
|
466
531
|
status: 415
|
|
467
532
|
});
|
|
468
533
|
}
|
|
469
|
-
function
|
|
534
|
+
function Qe(e, t) {
|
|
470
535
|
if (e.maxBodySize === void 0)
|
|
471
536
|
return null;
|
|
472
537
|
const r = t.headers.get("content-length");
|
|
@@ -477,32 +542,32 @@ function Pe(e, t) {
|
|
|
477
542
|
status: 400
|
|
478
543
|
});
|
|
479
544
|
const n = Number(r);
|
|
480
|
-
return Number.isSafeInteger(n) ? n >
|
|
545
|
+
return Number.isSafeInteger(n) ? n > D(e.maxBodySize) ? new Response("Security report body too large.", {
|
|
481
546
|
status: 413
|
|
482
547
|
}) : null : new Response("Invalid Content-Length.", {
|
|
483
548
|
status: 400
|
|
484
549
|
});
|
|
485
550
|
}
|
|
486
|
-
function
|
|
487
|
-
return Array.isArray(e) ? e :
|
|
551
|
+
function et(e) {
|
|
552
|
+
return Array.isArray(e) ? e : tt(e) && "csp-report" in e ? [e["csp-report"]] : [e];
|
|
488
553
|
}
|
|
489
|
-
function
|
|
554
|
+
function tt(e) {
|
|
490
555
|
return typeof e == "object" && e !== null;
|
|
491
556
|
}
|
|
492
|
-
function
|
|
557
|
+
function pr(e, t) {
|
|
493
558
|
const r = {}, n = [];
|
|
494
|
-
let
|
|
495
|
-
for (const [
|
|
496
|
-
const
|
|
497
|
-
r[
|
|
559
|
+
let o = 0;
|
|
560
|
+
for (const [a, i] of Object.entries(t.files)) {
|
|
561
|
+
const s = e.getAll(a).filter(ot);
|
|
562
|
+
r[a] = s, i.required && s.length === 0 && n.push({
|
|
498
563
|
code: "file-missing",
|
|
499
|
-
field:
|
|
500
|
-
message: `Upload field ${
|
|
564
|
+
field: a,
|
|
565
|
+
message: `Upload field ${a} requires at least one file.`
|
|
501
566
|
});
|
|
502
|
-
for (const
|
|
503
|
-
|
|
567
|
+
for (const l of s)
|
|
568
|
+
o += l.size, rt(a, l, i, n);
|
|
504
569
|
}
|
|
505
|
-
return t.maxTotalSize !== void 0 &&
|
|
570
|
+
return t.maxTotalSize !== void 0 && o > D(t.maxTotalSize) && n.push({
|
|
506
571
|
code: "total-upload-too-large",
|
|
507
572
|
field: "*",
|
|
508
573
|
message: `Uploaded files exceed the maximum total size of ${t.maxTotalSize}.`
|
|
@@ -510,27 +575,27 @@ function Mt(e, t) {
|
|
|
510
575
|
files: r,
|
|
511
576
|
issues: n,
|
|
512
577
|
ok: n.length === 0,
|
|
513
|
-
totalSize:
|
|
578
|
+
totalSize: o
|
|
514
579
|
};
|
|
515
580
|
}
|
|
516
|
-
function
|
|
517
|
-
r.maxSize !== void 0 && t.size >
|
|
581
|
+
function rt(e, t, r, n) {
|
|
582
|
+
r.maxSize !== void 0 && t.size > D(r.maxSize) && n.push({
|
|
518
583
|
code: "file-too-large",
|
|
519
584
|
field: e,
|
|
520
585
|
message: `Upload field ${e} contains ${t.name || "a file"} larger than ${r.maxSize}.`
|
|
521
|
-
}), r.types?.length && !
|
|
586
|
+
}), r.types?.length && !nt(t.type, r.types) && n.push({
|
|
522
587
|
code: "file-type-not-allowed",
|
|
523
588
|
field: e,
|
|
524
589
|
message: `Upload field ${e} contains ${t.name || "a file"} with disallowed type ${t.type || "unknown"}.`
|
|
525
590
|
});
|
|
526
591
|
}
|
|
527
|
-
function
|
|
592
|
+
function nt(e, t) {
|
|
528
593
|
return t.some((r) => r.endsWith("/*") ? e.startsWith(r.slice(0, -1)) : e === r);
|
|
529
594
|
}
|
|
530
|
-
function
|
|
595
|
+
function ot(e) {
|
|
531
596
|
return e instanceof File;
|
|
532
597
|
}
|
|
533
|
-
function
|
|
598
|
+
function at(e, t) {
|
|
534
599
|
const r = t.headers.get("origin");
|
|
535
600
|
if (!r)
|
|
536
601
|
return {
|
|
@@ -539,7 +604,7 @@ function He(e, t) {
|
|
|
539
604
|
origin: r,
|
|
540
605
|
reason: e.allowMissingOrigin ? void 0 : "missing-origin"
|
|
541
606
|
};
|
|
542
|
-
const n =
|
|
607
|
+
const n = J(r);
|
|
543
608
|
if (!n)
|
|
544
609
|
return {
|
|
545
610
|
allowed: !1,
|
|
@@ -547,28 +612,28 @@ function He(e, t) {
|
|
|
547
612
|
origin: r,
|
|
548
613
|
reason: "invalid-origin"
|
|
549
614
|
};
|
|
550
|
-
const
|
|
615
|
+
const o = it(e, n, t);
|
|
551
616
|
return {
|
|
552
|
-
allowed:
|
|
617
|
+
allowed: o,
|
|
553
618
|
expected: e.origins,
|
|
554
619
|
origin: n,
|
|
555
|
-
reason:
|
|
620
|
+
reason: o ? void 0 : "origin-not-allowed"
|
|
556
621
|
};
|
|
557
622
|
}
|
|
558
|
-
function
|
|
559
|
-
return !e ||
|
|
623
|
+
function gr(e, t) {
|
|
624
|
+
return !e || at(e, t).allowed ? null : new Response("WebSocket origin not allowed.", {
|
|
560
625
|
status: 403
|
|
561
626
|
});
|
|
562
627
|
}
|
|
563
|
-
function
|
|
628
|
+
function it(e, t, r) {
|
|
564
629
|
return e.origins === "same-origin" ? t === new URL(r.url).origin : e.origins.some(
|
|
565
|
-
(n) =>
|
|
630
|
+
(n) => st(n, t)
|
|
566
631
|
);
|
|
567
632
|
}
|
|
568
|
-
function
|
|
569
|
-
return e === "null" ? t === "null" :
|
|
633
|
+
function st(e, t) {
|
|
634
|
+
return e === "null" ? t === "null" : J(e) === t;
|
|
570
635
|
}
|
|
571
|
-
function
|
|
636
|
+
function J(e) {
|
|
572
637
|
if (e === "null")
|
|
573
638
|
return e;
|
|
574
639
|
try {
|
|
@@ -586,122 +651,122 @@ function P(e) {
|
|
|
586
651
|
return null;
|
|
587
652
|
}
|
|
588
653
|
}
|
|
589
|
-
function
|
|
590
|
-
const t =
|
|
654
|
+
function ct(e) {
|
|
655
|
+
const t = W(e.routes), r = e.loadNavigationData ?? Z;
|
|
591
656
|
return function() {
|
|
592
|
-
const [
|
|
657
|
+
const [o, a] = F(() => $()), [i, s] = F(
|
|
593
658
|
() => e.initialMatch ?? { status: "loading" }
|
|
594
|
-
),
|
|
595
|
-
|
|
659
|
+
), l = z(!!e.initialMatch), d = z(0);
|
|
660
|
+
P(() => {
|
|
596
661
|
function c() {
|
|
597
|
-
|
|
662
|
+
a($());
|
|
598
663
|
}
|
|
599
664
|
return window.addEventListener("popstate", c), () => window.removeEventListener("popstate", c);
|
|
600
|
-
}, []),
|
|
601
|
-
let c = !1,
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
return
|
|
665
|
+
}, []), P(() => {
|
|
666
|
+
let c = !1, f = !1;
|
|
667
|
+
const h = ++d.current, v = new AbortController(), S = () => !c && h === d.current;
|
|
668
|
+
if (l.current && lt(e.initialMatch) === o.pathname)
|
|
669
|
+
return l.current = !1, () => {
|
|
605
670
|
c = !0;
|
|
606
671
|
};
|
|
607
|
-
|
|
608
|
-
|
|
672
|
+
s({ status: "loading" }), ge(t, o.pathname).then((m) => {
|
|
673
|
+
S() && !f && m && s({ loading: m, status: "loading" });
|
|
609
674
|
}).catch(() => {
|
|
610
675
|
});
|
|
611
|
-
const
|
|
612
|
-
return Promise.resolve(r(
|
|
613
|
-
(
|
|
676
|
+
const b = new Request(o.href, { signal: v.signal });
|
|
677
|
+
return Promise.resolve(r(b)).then(
|
|
678
|
+
(m) => q(
|
|
614
679
|
t,
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
680
|
+
o.pathname,
|
|
681
|
+
b,
|
|
682
|
+
m,
|
|
618
683
|
void 0,
|
|
619
684
|
{ documentContributions: !1 }
|
|
620
685
|
)
|
|
621
|
-
).then((
|
|
622
|
-
|
|
623
|
-
}).catch(async (
|
|
624
|
-
if (
|
|
686
|
+
).then((m) => {
|
|
687
|
+
f = !0, S() && s(m);
|
|
688
|
+
}).catch(async (m) => {
|
|
689
|
+
if (f = !0, !S() || v.signal.aborted)
|
|
625
690
|
return;
|
|
626
|
-
const
|
|
691
|
+
const k = await we(
|
|
627
692
|
t,
|
|
628
|
-
|
|
693
|
+
o.pathname
|
|
629
694
|
);
|
|
630
|
-
|
|
631
|
-
Error:
|
|
632
|
-
error:
|
|
633
|
-
pathname:
|
|
695
|
+
S() && s({
|
|
696
|
+
Error: k,
|
|
697
|
+
error: m,
|
|
698
|
+
pathname: o.pathname,
|
|
634
699
|
status: "error"
|
|
635
700
|
});
|
|
636
701
|
}), () => {
|
|
637
|
-
c = !0,
|
|
702
|
+
c = !0, v.abort();
|
|
638
703
|
};
|
|
639
|
-
}, [
|
|
640
|
-
const p =
|
|
704
|
+
}, [o.pathname, o.search]);
|
|
705
|
+
const p = ne(
|
|
641
706
|
() => ({
|
|
642
707
|
navigation: e.navigation ?? "server",
|
|
643
708
|
push(c) {
|
|
644
|
-
const
|
|
709
|
+
const f = $();
|
|
645
710
|
window.history.pushState(null, "", c);
|
|
646
|
-
const
|
|
647
|
-
|
|
711
|
+
const h = $();
|
|
712
|
+
a(h), f.pathname === h.pathname && f.search === h.search && f.hash !== h.hash && pt(h.hash);
|
|
648
713
|
}
|
|
649
714
|
}),
|
|
650
715
|
[]
|
|
651
716
|
);
|
|
652
|
-
return
|
|
717
|
+
return w(X.Provider, {
|
|
653
718
|
value: p,
|
|
654
|
-
children:
|
|
655
|
-
key: `${
|
|
719
|
+
children: w(dt, {
|
|
720
|
+
key: `${o.pathname}${o.search}`,
|
|
656
721
|
Loading: e.loading,
|
|
657
722
|
NotFound: e.notFound,
|
|
658
|
-
match:
|
|
723
|
+
match: i
|
|
659
724
|
})
|
|
660
725
|
});
|
|
661
726
|
};
|
|
662
727
|
}
|
|
663
|
-
function
|
|
664
|
-
const r = t.getAttribute(
|
|
728
|
+
function ut(e, t) {
|
|
729
|
+
const r = t.getAttribute(ce);
|
|
665
730
|
return e.status === "not-found" ? r === "not-found" : e.status === "ready" && r === null;
|
|
666
731
|
}
|
|
667
|
-
function
|
|
732
|
+
function lt(e) {
|
|
668
733
|
if (e)
|
|
669
734
|
return e.status === "ready" ? e.match.pathname : e.status === "loading" ? void 0 : e.pathname;
|
|
670
735
|
}
|
|
671
|
-
async function
|
|
736
|
+
async function wr(e) {
|
|
672
737
|
const t = e.root ?? document.getElementById("root");
|
|
673
738
|
if (!t)
|
|
674
739
|
throw new Error(
|
|
675
740
|
"Demiurge expected a #root element in the framework document."
|
|
676
741
|
);
|
|
677
|
-
const r =
|
|
742
|
+
const r = W(e.routes), n = e.loadNavigationData ?? Z, o = e.initialData ?? ie(document), a = await q(
|
|
678
743
|
r,
|
|
679
744
|
window.location.pathname,
|
|
680
745
|
new Request(window.location.href),
|
|
681
|
-
|
|
746
|
+
o ?? await n(new Request(window.location.href)),
|
|
682
747
|
void 0,
|
|
683
748
|
{ documentContributions: !1 }
|
|
684
|
-
),
|
|
685
|
-
|
|
749
|
+
), i = ut(a, t), s = ct(
|
|
750
|
+
i ? {
|
|
686
751
|
...e,
|
|
687
|
-
initialMatch:
|
|
752
|
+
initialMatch: a,
|
|
688
753
|
loadNavigationData: n,
|
|
689
|
-
navigation:
|
|
754
|
+
navigation: o?.navigation ?? e.navigation
|
|
690
755
|
} : {
|
|
691
756
|
...e,
|
|
692
757
|
loadNavigationData: n,
|
|
693
|
-
navigation:
|
|
758
|
+
navigation: o?.navigation ?? e.navigation
|
|
694
759
|
}
|
|
695
|
-
), { createRoot:
|
|
760
|
+
), { createRoot: l, hydrateRoot: d } = ft(
|
|
696
761
|
await import("react-dom/client")
|
|
697
762
|
);
|
|
698
|
-
if (
|
|
699
|
-
d(t,
|
|
763
|
+
if (i && t.hasAttribute(se)) {
|
|
764
|
+
d(t, w(s)), U();
|
|
700
765
|
return;
|
|
701
766
|
}
|
|
702
|
-
t.replaceChildren(),
|
|
767
|
+
t.replaceChildren(), l(t).render(w(s)), U();
|
|
703
768
|
}
|
|
704
|
-
function
|
|
769
|
+
function ft(e) {
|
|
705
770
|
const t = typeof e.createRoot == "function" && typeof e.hydrateRoot == "function" ? e : e.default;
|
|
706
771
|
if (!t || typeof t.createRoot != "function" || typeof t.hydrateRoot != "function")
|
|
707
772
|
throw new Error(
|
|
@@ -709,57 +774,57 @@ function Ye(e) {
|
|
|
709
774
|
);
|
|
710
775
|
return t;
|
|
711
776
|
}
|
|
712
|
-
function
|
|
713
|
-
const t =
|
|
714
|
-
return /* @__PURE__ */
|
|
777
|
+
function yr(e) {
|
|
778
|
+
const t = wt(), r = pe(e);
|
|
779
|
+
return /* @__PURE__ */ V(
|
|
715
780
|
"a",
|
|
716
781
|
{
|
|
717
782
|
className: e.className,
|
|
718
783
|
href: r,
|
|
719
784
|
onClick: (n) => {
|
|
720
|
-
t.navigation === "server" &&
|
|
785
|
+
t.navigation === "server" && gt(n) && (n.preventDefault(), t.push(r));
|
|
721
786
|
},
|
|
722
787
|
children: e.children
|
|
723
788
|
}
|
|
724
789
|
);
|
|
725
790
|
}
|
|
726
|
-
function
|
|
791
|
+
function dt({
|
|
727
792
|
Loading: e,
|
|
728
793
|
NotFound: t,
|
|
729
794
|
match: r
|
|
730
795
|
}) {
|
|
731
796
|
if (r.status === "loading") {
|
|
732
797
|
const c = r.loading ?? e;
|
|
733
|
-
return c ?
|
|
798
|
+
return c ? w(c) : null;
|
|
734
799
|
}
|
|
735
800
|
if (r.status === "not-found") {
|
|
736
|
-
const c = r.notFound ?? t ??
|
|
801
|
+
const c = r.notFound ?? t ?? Te;
|
|
737
802
|
return r.layouts.reduceRight(
|
|
738
|
-
(
|
|
739
|
-
children:
|
|
803
|
+
(f, h) => w(h, {
|
|
804
|
+
children: f,
|
|
740
805
|
path: {},
|
|
741
806
|
pathname: r.pathname
|
|
742
807
|
}),
|
|
743
|
-
|
|
808
|
+
w(c, { pathname: r.pathname })
|
|
744
809
|
);
|
|
745
810
|
}
|
|
746
811
|
if (r.status === "error")
|
|
747
|
-
return r.Error ?
|
|
812
|
+
return r.Error ? w(r.Error, {
|
|
748
813
|
error: r.error,
|
|
749
814
|
pathname: r.pathname,
|
|
750
|
-
status:
|
|
815
|
+
status: Y(r.error)
|
|
751
816
|
}) : null;
|
|
752
|
-
const { data: n, error:
|
|
753
|
-
(c,
|
|
817
|
+
const { data: n, error: o, page: a, layouts: i, path: s, pathname: l } = r.match, d = w(a, { data: n, path: s, pathname: l }), p = i.reduceRight(
|
|
818
|
+
(c, f) => w(f, { path: s, pathname: l, children: c }),
|
|
754
819
|
d
|
|
755
820
|
);
|
|
756
|
-
return
|
|
757
|
-
Error:
|
|
821
|
+
return w(ht, {
|
|
822
|
+
Error: o,
|
|
758
823
|
children: p,
|
|
759
|
-
pathname:
|
|
824
|
+
pathname: l
|
|
760
825
|
});
|
|
761
826
|
}
|
|
762
|
-
class
|
|
827
|
+
class ht extends ae {
|
|
763
828
|
static getDerivedStateFromError(t) {
|
|
764
829
|
return { error: t };
|
|
765
830
|
}
|
|
@@ -768,17 +833,17 @@ class Qe extends G {
|
|
|
768
833
|
this.state.error !== void 0 && t.pathname !== this.props.pathname && this.setState({ error: void 0 });
|
|
769
834
|
}
|
|
770
835
|
render() {
|
|
771
|
-
return this.state.error !== void 0 ? this.props.Error ?
|
|
836
|
+
return this.state.error !== void 0 ? this.props.Error ? w(this.props.Error, {
|
|
772
837
|
error: this.state.error,
|
|
773
838
|
pathname: this.props.pathname,
|
|
774
|
-
status:
|
|
839
|
+
status: Y(this.state.error)
|
|
775
840
|
}) : null : this.props.children;
|
|
776
841
|
}
|
|
777
842
|
}
|
|
778
|
-
function
|
|
779
|
-
return
|
|
843
|
+
function Y(e) {
|
|
844
|
+
return ke(e) ? e.status : 500;
|
|
780
845
|
}
|
|
781
|
-
function
|
|
846
|
+
function $() {
|
|
782
847
|
return {
|
|
783
848
|
hash: window.location.hash,
|
|
784
849
|
href: window.location.href,
|
|
@@ -786,42 +851,42 @@ function E() {
|
|
|
786
851
|
search: window.location.search
|
|
787
852
|
};
|
|
788
853
|
}
|
|
789
|
-
async function
|
|
854
|
+
async function Z(e) {
|
|
790
855
|
const t = new Headers(e.headers);
|
|
791
|
-
t.set("accept", "application/json"), t.set(
|
|
856
|
+
t.set("accept", "application/json"), t.set(_, ye);
|
|
792
857
|
const r = await fetch(new Request(e, {
|
|
793
858
|
credentials: "same-origin",
|
|
794
859
|
headers: t
|
|
795
|
-
})), n = r.headers.get(
|
|
796
|
-
if (n ===
|
|
797
|
-
const
|
|
798
|
-
if (
|
|
860
|
+
})), n = r.headers.get(_);
|
|
861
|
+
if (n === ve) {
|
|
862
|
+
const o = await r.json();
|
|
863
|
+
if (o.hasData !== !0)
|
|
799
864
|
throw new Error("Demiurge received malformed navigation route data.");
|
|
800
|
-
return { data:
|
|
865
|
+
return { data: o.data, hasData: !0 };
|
|
801
866
|
}
|
|
802
|
-
if (n ===
|
|
867
|
+
if (n === be)
|
|
803
868
|
return { hasData: !0 };
|
|
804
|
-
if (n ===
|
|
805
|
-
const
|
|
869
|
+
if (n === Se || !r.ok) {
|
|
870
|
+
const o = await mt(r), a = Ee.includes(
|
|
806
871
|
r.status
|
|
807
872
|
) ? r.status : 500;
|
|
808
|
-
throw
|
|
809
|
-
detail: typeof
|
|
810
|
-
title: typeof
|
|
873
|
+
throw Re(a, {
|
|
874
|
+
detail: typeof o?.detail == "string" ? o.detail : void 0,
|
|
875
|
+
title: typeof o?.title == "string" ? o.title : void 0
|
|
811
876
|
});
|
|
812
877
|
}
|
|
813
878
|
throw new Error(
|
|
814
879
|
"Demiurge expected a navigation data response from the application server."
|
|
815
880
|
);
|
|
816
881
|
}
|
|
817
|
-
async function
|
|
882
|
+
async function mt(e) {
|
|
818
883
|
try {
|
|
819
884
|
return await e.json();
|
|
820
885
|
} catch {
|
|
821
886
|
return;
|
|
822
887
|
}
|
|
823
888
|
}
|
|
824
|
-
function
|
|
889
|
+
function pt(e) {
|
|
825
890
|
queueMicrotask(() => {
|
|
826
891
|
if (!e) {
|
|
827
892
|
window.scrollTo?.(0, 0);
|
|
@@ -836,205 +901,162 @@ function Je(e) {
|
|
|
836
901
|
document.getElementById(t)?.scrollIntoView?.();
|
|
837
902
|
});
|
|
838
903
|
}
|
|
839
|
-
function
|
|
904
|
+
function gt(e) {
|
|
840
905
|
return e.button === 0 && !e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey;
|
|
841
906
|
}
|
|
842
|
-
const
|
|
907
|
+
const X = re({
|
|
843
908
|
navigation: "document",
|
|
844
909
|
push(e) {
|
|
845
910
|
window.location.href = e;
|
|
846
911
|
}
|
|
847
912
|
});
|
|
848
|
-
function
|
|
849
|
-
return
|
|
850
|
-
}
|
|
851
|
-
const rt = "/_demiurge/image";
|
|
852
|
-
function jt(e) {
|
|
853
|
-
return e;
|
|
854
|
-
}
|
|
855
|
-
function Bt(e, t = {}) {
|
|
856
|
-
return B(e, t) !== null;
|
|
913
|
+
function wt() {
|
|
914
|
+
return oe(X);
|
|
857
915
|
}
|
|
858
|
-
function
|
|
859
|
-
const
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
height:
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
width: o
|
|
876
|
-
};
|
|
877
|
-
}), s = i[0];
|
|
878
|
-
return {
|
|
879
|
-
alt: e.alt,
|
|
880
|
-
decoding: "async",
|
|
881
|
-
fetchPriority: e.priority ? "high" : void 0,
|
|
882
|
-
height: e.height,
|
|
883
|
-
loading: e.priority ? "eager" : "lazy",
|
|
884
|
-
sizes: e.sizes,
|
|
885
|
-
source: r,
|
|
886
|
-
src: s.src,
|
|
887
|
-
srcSet: i.map((o) => `${o.src} ${o.width}w`).join(", "),
|
|
888
|
-
variants: i,
|
|
889
|
-
width: e.width
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
function B(e, t) {
|
|
893
|
-
if (e.startsWith("/") && !e.startsWith("//"))
|
|
894
|
-
return t.local === !1 ? null : { kind: "local", src: e };
|
|
895
|
-
let r;
|
|
896
|
-
try {
|
|
897
|
-
r = new URL(e);
|
|
898
|
-
} catch {
|
|
899
|
-
return null;
|
|
900
|
-
}
|
|
901
|
-
return r.protocol !== "https:" && r.protocol !== "http:" ? null : nt(r, t.remote ?? []) ? { kind: "remote", src: r.toString() } : null;
|
|
902
|
-
}
|
|
903
|
-
function nt(e, t) {
|
|
904
|
-
return t.some(
|
|
905
|
-
(r) => typeof r == "string" ? at(e, r) : it(e, r)
|
|
916
|
+
function vr({ className: e, id: t, policy: r, ...n }) {
|
|
917
|
+
const o = Ae(n, r);
|
|
918
|
+
return /* @__PURE__ */ V(
|
|
919
|
+
"img",
|
|
920
|
+
{
|
|
921
|
+
alt: o.alt,
|
|
922
|
+
className: e,
|
|
923
|
+
decoding: o.decoding,
|
|
924
|
+
fetchPriority: o.fetchPriority,
|
|
925
|
+
height: o.height,
|
|
926
|
+
id: t,
|
|
927
|
+
loading: o.loading,
|
|
928
|
+
sizes: o.sizes,
|
|
929
|
+
src: o.src,
|
|
930
|
+
srcSet: o.srcSet,
|
|
931
|
+
width: o.width
|
|
932
|
+
}
|
|
906
933
|
);
|
|
907
934
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
return t.protocol && e.protocol !== t.protocol || e.hostname !== t.hostname || t.port !== void 0 && e.port !== t.port ? !1 : t.pathname ? ot(e.pathname, t.pathname) : !0;
|
|
917
|
-
}
|
|
918
|
-
function ot(e, t) {
|
|
919
|
-
return t.endsWith("*") ? e.startsWith(t.slice(0, -1)) : e === t;
|
|
920
|
-
}
|
|
921
|
-
function $(e, t) {
|
|
922
|
-
if (!Number.isInteger(t) || t <= 0)
|
|
923
|
-
throw new Error(`Image ${e} must be a positive integer.`);
|
|
924
|
-
}
|
|
925
|
-
function st(e) {
|
|
926
|
-
if (e !== void 0 && (!Number.isInteger(e) || e < 1 || e > 100))
|
|
927
|
-
throw new Error("Image quality must be an integer between 1 and 100.");
|
|
928
|
-
}
|
|
929
|
-
function ct(e, t) {
|
|
930
|
-
const r = t ?? [e, e * 2], n = [...new Set(r)];
|
|
931
|
-
for (const a of n)
|
|
932
|
-
$("width", a);
|
|
933
|
-
return n.sort((a, i) => a - i);
|
|
934
|
-
}
|
|
935
|
-
function ut({
|
|
936
|
-
format: e,
|
|
937
|
-
optimizerPath: t,
|
|
938
|
-
quality: r,
|
|
939
|
-
src: n,
|
|
940
|
-
width: a
|
|
941
|
-
}) {
|
|
942
|
-
const i = new URLSearchParams({
|
|
943
|
-
src: n,
|
|
944
|
-
w: String(a)
|
|
945
|
-
});
|
|
946
|
-
return r !== void 0 && i.set("q", String(r)), e !== "auto" && i.set("f", e), `${t}?${i.toString()}`;
|
|
947
|
-
}
|
|
948
|
-
const Ht = {
|
|
949
|
-
google(e) {
|
|
935
|
+
const yt = "https://js.sentry-cdn.com", br = {
|
|
936
|
+
/**
|
|
937
|
+
* Plausible loads one script and posts events to its own API. The snippet
|
|
938
|
+
* carries configuration in `data-domain`, so no inline code is involved.
|
|
939
|
+
* `endpoint` accepts a same-origin path prefix for a proxied deployment.
|
|
940
|
+
*/
|
|
941
|
+
plausible(e) {
|
|
942
|
+
const t = vt(e.domain), r = H(e.endpoint ?? "https://plausible.io");
|
|
950
943
|
return {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
kind: "
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
944
|
+
consent: e.consent ?? !1,
|
|
945
|
+
domain: t,
|
|
946
|
+
kind: "analytics",
|
|
947
|
+
needs: {
|
|
948
|
+
connect: [r.source],
|
|
949
|
+
script: [r.source]
|
|
950
|
+
},
|
|
951
|
+
provider: "plausible",
|
|
952
|
+
scripts: [
|
|
953
|
+
I({
|
|
954
|
+
dataApi: `${r.base}/api/event`,
|
|
955
|
+
dataDomain: t,
|
|
956
|
+
defer: !0,
|
|
957
|
+
needs: { connect: [r.source] },
|
|
958
|
+
purpose: "analytics",
|
|
959
|
+
src: `${r.base}/js/script.js`,
|
|
960
|
+
strategy: e.strategy ?? "afterInteractive"
|
|
961
|
+
})
|
|
962
|
+
]
|
|
958
963
|
};
|
|
959
964
|
},
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
965
|
+
/**
|
|
966
|
+
* The Sentry loader script carries the DSN in its own filename, so a page
|
|
967
|
+
* needs no inline configuration call. Events go to the DSN host, which is
|
|
968
|
+
* why the integration also declares a `connect-src` need.
|
|
969
|
+
*/
|
|
970
|
+
sentry(e) {
|
|
971
|
+
const t = Et(e.dsn), r = St(
|
|
972
|
+
e.loaderHost ?? yt,
|
|
973
|
+
"Sentry loader host"
|
|
974
|
+
);
|
|
963
975
|
return {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
kind: "
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
976
|
+
consent: e.consent ?? !1,
|
|
977
|
+
ingestOrigin: t.origin,
|
|
978
|
+
kind: "analytics",
|
|
979
|
+
needs: {
|
|
980
|
+
connect: [t.origin],
|
|
981
|
+
script: [r]
|
|
982
|
+
},
|
|
983
|
+
projectId: t.projectId,
|
|
984
|
+
provider: "sentry",
|
|
985
|
+
scripts: [
|
|
986
|
+
I({
|
|
987
|
+
crossOrigin: "anonymous",
|
|
988
|
+
needs: { connect: [t.origin] },
|
|
989
|
+
purpose: "error-monitoring",
|
|
990
|
+
src: `${r}/${t.publicKey}.min.js`,
|
|
991
|
+
// Errors thrown before the app is interactive are the ones an
|
|
992
|
+
// application can least afford to lose.
|
|
993
|
+
strategy: e.strategy ?? "beforeInteractive"
|
|
994
|
+
})
|
|
995
|
+
]
|
|
971
996
|
};
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
}));
|
|
986
|
-
}
|
|
987
|
-
function Wt(e) {
|
|
988
|
-
return e.filter((t) => t.source === "local" && t.src).map((t) => {
|
|
989
|
-
const r = t.src;
|
|
990
|
-
return [
|
|
991
|
-
"@font-face {",
|
|
992
|
-
` font-family: "${N(t.family)}";`,
|
|
993
|
-
` src: url("${N(r)}") format("${ft(r)}");`,
|
|
994
|
-
` font-style: ${t.style};`,
|
|
995
|
-
` font-weight: ${t.weight};`,
|
|
996
|
-
` font-display: ${t.display};`,
|
|
997
|
-
"}"
|
|
998
|
-
].join(`
|
|
999
|
-
`);
|
|
1000
|
-
}).join(`
|
|
1001
|
-
`);
|
|
1002
|
-
}
|
|
1003
|
-
function lt(e) {
|
|
1004
|
-
return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "font/woff" : "font/woff2";
|
|
1005
|
-
}
|
|
1006
|
-
function ft(e) {
|
|
1007
|
-
return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "woff" : "woff2";
|
|
1008
|
-
}
|
|
1009
|
-
function N(e) {
|
|
1010
|
-
return e.replace(/[\\"]/g, "\\$&");
|
|
1011
|
-
}
|
|
1012
|
-
const Gt = {
|
|
1013
|
-
plausible(e) {
|
|
1014
|
-
const t = dt(e.domain), r = mt(e.endpoint ?? "https://plausible.io");
|
|
997
|
+
},
|
|
998
|
+
/**
|
|
999
|
+
* OpenTelemetry publishes no hosted browser loader. Browser instrumentation
|
|
1000
|
+
* is application code bundled from npm packages, so this helper describes
|
|
1001
|
+
* the part a policy has to know about: the OTLP endpoint the exporter posts
|
|
1002
|
+
* to, and an optional same-origin entry script that starts the SDK.
|
|
1003
|
+
*/
|
|
1004
|
+
openTelemetry(e) {
|
|
1005
|
+
const t = H(e.endpoint), r = e.script;
|
|
1006
|
+
if (r !== void 0 && !r.startsWith("/"))
|
|
1007
|
+
throw new Error(
|
|
1008
|
+
"OpenTelemetry browser instrumentation must be a same-origin script path."
|
|
1009
|
+
);
|
|
1015
1010
|
return {
|
|
1016
|
-
connectSrc: r.origin,
|
|
1017
1011
|
consent: e.consent ?? !1,
|
|
1018
|
-
|
|
1012
|
+
endpoint: t.base || "/",
|
|
1019
1013
|
kind: "analytics",
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1014
|
+
needs: r ? { connect: [t.source], script: ["'self'"] } : { connect: [t.source] },
|
|
1015
|
+
provider: "opentelemetry",
|
|
1016
|
+
scripts: r ? [
|
|
1017
|
+
I({
|
|
1018
|
+
needs: { connect: [t.source] },
|
|
1019
|
+
purpose: "observability",
|
|
1020
|
+
src: r,
|
|
1021
|
+
strategy: e.strategy ?? "module"
|
|
1022
|
+
})
|
|
1023
|
+
] : []
|
|
1028
1024
|
};
|
|
1025
|
+
},
|
|
1026
|
+
/** Merges the CSP needs of every integration into one route policy. */
|
|
1027
|
+
policy(...e) {
|
|
1028
|
+
const t = {};
|
|
1029
|
+
for (const r of e)
|
|
1030
|
+
for (const n of ["connect", "img", "script"]) {
|
|
1031
|
+
const o = r.needs[n];
|
|
1032
|
+
!o || o.length === 0 || (t[n] = [.../* @__PURE__ */ new Set([...t[n] ?? [], ...o])]);
|
|
1033
|
+
}
|
|
1034
|
+
return { security: { needs: t } };
|
|
1035
|
+
},
|
|
1036
|
+
/** Collects the script contributions of every integration. */
|
|
1037
|
+
scripts(...e) {
|
|
1038
|
+
return e.flatMap((t) => [...t.scripts]);
|
|
1029
1039
|
}
|
|
1030
1040
|
};
|
|
1031
|
-
function
|
|
1041
|
+
function vt(e) {
|
|
1032
1042
|
const t = e.trim();
|
|
1033
1043
|
if (!t || t.includes("/") || t.includes(" "))
|
|
1034
1044
|
throw new Error("Analytics domain must be a hostname without a path.");
|
|
1035
1045
|
return t;
|
|
1036
1046
|
}
|
|
1037
|
-
function
|
|
1047
|
+
function H(e) {
|
|
1048
|
+
if (e.startsWith("/")) {
|
|
1049
|
+
if (e.startsWith("//"))
|
|
1050
|
+
throw new Error("Analytics endpoint must not be a scheme-relative URL.");
|
|
1051
|
+
return {
|
|
1052
|
+
base: e === "/" ? "" : e.replace(/\/+$/, ""),
|
|
1053
|
+
source: "'self'"
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
const t = bt(e);
|
|
1057
|
+
return { base: t.origin, source: t.origin };
|
|
1058
|
+
}
|
|
1059
|
+
function bt(e) {
|
|
1038
1060
|
let t;
|
|
1039
1061
|
try {
|
|
1040
1062
|
t = new URL(e);
|
|
@@ -1045,132 +1067,449 @@ function mt(e) {
|
|
|
1045
1067
|
throw new Error("Analytics endpoint must use HTTPS.");
|
|
1046
1068
|
return t;
|
|
1047
1069
|
}
|
|
1048
|
-
function
|
|
1070
|
+
function St(e, t) {
|
|
1071
|
+
let r;
|
|
1072
|
+
try {
|
|
1073
|
+
r = new URL(e);
|
|
1074
|
+
} catch {
|
|
1075
|
+
throw new Error(`${t} must be an absolute URL.`);
|
|
1076
|
+
}
|
|
1077
|
+
if (r.protocol !== "https:")
|
|
1078
|
+
throw new Error(`${t} must use HTTPS.`);
|
|
1079
|
+
return r.origin;
|
|
1080
|
+
}
|
|
1081
|
+
function Et(e) {
|
|
1082
|
+
let t;
|
|
1083
|
+
try {
|
|
1084
|
+
t = new URL(e);
|
|
1085
|
+
} catch {
|
|
1086
|
+
throw new Error("Sentry DSN must be an absolute URL.");
|
|
1087
|
+
}
|
|
1088
|
+
if (t.protocol !== "https:")
|
|
1089
|
+
throw new Error("Sentry DSN must use HTTPS.");
|
|
1090
|
+
const r = t.pathname.replace(/^\//, "");
|
|
1091
|
+
if (!t.username || t.password)
|
|
1092
|
+
throw new Error(
|
|
1093
|
+
"Sentry DSN must carry a public key and no secret key."
|
|
1094
|
+
);
|
|
1095
|
+
if (!/^[A-Za-z0-9_-]+$/.test(r))
|
|
1096
|
+
throw new Error("Sentry DSN must end with a project identifier.");
|
|
1097
|
+
return {
|
|
1098
|
+
origin: t.origin,
|
|
1099
|
+
projectId: r,
|
|
1100
|
+
publicKey: t.username
|
|
1101
|
+
};
|
|
1102
|
+
}
|
|
1103
|
+
function Sr(e = {}) {
|
|
1049
1104
|
return {
|
|
1050
1105
|
async request(t) {
|
|
1051
|
-
await
|
|
1106
|
+
await x({ kind: "request", signal: t }, e);
|
|
1052
1107
|
},
|
|
1053
1108
|
async serverStart(t = {}) {
|
|
1054
|
-
await
|
|
1109
|
+
await x({ kind: "server-start", signal: t }, e);
|
|
1055
1110
|
},
|
|
1056
1111
|
async trace(t) {
|
|
1057
|
-
await
|
|
1112
|
+
await x({ kind: "trace", signal: t }, e);
|
|
1058
1113
|
},
|
|
1059
1114
|
async reportWebVitals(t) {
|
|
1060
|
-
await
|
|
1115
|
+
await x({ kind: "web-vital", signal: t }, e);
|
|
1061
1116
|
}
|
|
1062
1117
|
};
|
|
1063
1118
|
}
|
|
1064
|
-
async function
|
|
1119
|
+
async function x(e, t) {
|
|
1065
1120
|
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);
|
|
1066
1121
|
}
|
|
1122
|
+
const Rt = [
|
|
1123
|
+
"CLS",
|
|
1124
|
+
"FCP",
|
|
1125
|
+
"FID",
|
|
1126
|
+
"INP",
|
|
1127
|
+
"LCP",
|
|
1128
|
+
"TTFB"
|
|
1129
|
+
], L = [
|
|
1130
|
+
"CLS",
|
|
1131
|
+
"FCP",
|
|
1132
|
+
"INP",
|
|
1133
|
+
"LCP",
|
|
1134
|
+
"TTFB"
|
|
1135
|
+
], Tt = new Set(Rt), kt = /* @__PURE__ */ new Set([
|
|
1136
|
+
"back-forward",
|
|
1137
|
+
"back-forward-cache",
|
|
1138
|
+
"navigate",
|
|
1139
|
+
"prerender",
|
|
1140
|
+
"reload",
|
|
1141
|
+
"restore"
|
|
1142
|
+
]), At = /* @__PURE__ */ new Set([
|
|
1143
|
+
"good",
|
|
1144
|
+
"needs-improvement",
|
|
1145
|
+
"poor"
|
|
1146
|
+
]);
|
|
1147
|
+
function $t(e) {
|
|
1148
|
+
return typeof e == "string" && Tt.has(e);
|
|
1149
|
+
}
|
|
1150
|
+
function xt(e) {
|
|
1151
|
+
return typeof e == "string" && kt.has(e);
|
|
1152
|
+
}
|
|
1153
|
+
function Ct(e) {
|
|
1154
|
+
return typeof e == "string" && At.has(e);
|
|
1155
|
+
}
|
|
1156
|
+
const It = {
|
|
1157
|
+
CLS: { good: 0.1, poor: 0.25 },
|
|
1158
|
+
FCP: { good: 1800, poor: 3e3 },
|
|
1159
|
+
FID: { good: 100, poor: 300 },
|
|
1160
|
+
INP: { good: 200, poor: 500 },
|
|
1161
|
+
LCP: { good: 2500, poor: 4e3 },
|
|
1162
|
+
TTFB: { good: 800, poor: 1800 }
|
|
1163
|
+
};
|
|
1164
|
+
function Nt(e, t) {
|
|
1165
|
+
const r = It[e];
|
|
1166
|
+
return t <= r.good ? "good" : t > r.poor ? "poor" : "needs-improvement";
|
|
1167
|
+
}
|
|
1168
|
+
const Q = 32;
|
|
1169
|
+
function Er(e) {
|
|
1170
|
+
const t = Dt(e.endpoint), r = Ot(e.metrics), n = Mt(e.sampleRate);
|
|
1171
|
+
return {
|
|
1172
|
+
endpoint: t.url,
|
|
1173
|
+
kind: "web-vitals",
|
|
1174
|
+
metrics: r,
|
|
1175
|
+
needs: { connect: [t.source] },
|
|
1176
|
+
sampleRate: n
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
function Rr(...e) {
|
|
1180
|
+
const t = /* @__PURE__ */ new Set();
|
|
1181
|
+
for (const r of e)
|
|
1182
|
+
for (const n of r.needs.connect ?? [])
|
|
1183
|
+
t.add(n);
|
|
1184
|
+
return t.size === 0 ? { security: { needs: {} } } : { security: { needs: { connect: [...t] } } };
|
|
1185
|
+
}
|
|
1186
|
+
async function Tr(e, t = {}) {
|
|
1187
|
+
const r = t.maxMetrics ?? Q;
|
|
1188
|
+
let n;
|
|
1189
|
+
try {
|
|
1190
|
+
n = await e.json();
|
|
1191
|
+
} catch {
|
|
1192
|
+
return { ok: !1, reason: "unreadable-body" };
|
|
1193
|
+
}
|
|
1194
|
+
return Lt(n, r);
|
|
1195
|
+
}
|
|
1196
|
+
function Lt(e, t = Q) {
|
|
1197
|
+
if (!ee(e) || !Array.isArray(e.metrics))
|
|
1198
|
+
return { ok: !1, reason: "invalid-payload" };
|
|
1199
|
+
if (e.metrics.length > t)
|
|
1200
|
+
return { ok: !1, reason: "too-many-metrics" };
|
|
1201
|
+
const r = [];
|
|
1202
|
+
for (const n of e.metrics) {
|
|
1203
|
+
const o = Pt(n);
|
|
1204
|
+
if (!o)
|
|
1205
|
+
return { ok: !1, reason: "invalid-payload" };
|
|
1206
|
+
r.push(o);
|
|
1207
|
+
}
|
|
1208
|
+
return { metrics: r, ok: !0 };
|
|
1209
|
+
}
|
|
1210
|
+
function Pt(e) {
|
|
1211
|
+
if (!ee(e))
|
|
1212
|
+
return;
|
|
1213
|
+
const { id: t, name: r, navigationType: n, rating: o, url: a, value: i } = e;
|
|
1214
|
+
if (!(typeof t != "string" || t.length === 0 || t.length > 128) && !(!$t(r) || !xt(n)) && Ct(o) && !(typeof a != "string" || a.length === 0 || a.length > 2048) && !(typeof i != "number" || !Number.isFinite(i) || i < 0))
|
|
1215
|
+
return { id: t, name: r, navigationType: n, rating: o, url: a, value: i };
|
|
1216
|
+
}
|
|
1217
|
+
function ee(e) {
|
|
1218
|
+
return typeof e == "object" && e !== null;
|
|
1219
|
+
}
|
|
1220
|
+
function Dt(e) {
|
|
1221
|
+
if (e.startsWith("/")) {
|
|
1222
|
+
if (e.startsWith("//"))
|
|
1223
|
+
throw new Error(
|
|
1224
|
+
"The web vitals endpoint must not be a scheme-relative URL."
|
|
1225
|
+
);
|
|
1226
|
+
return { source: "'self'", url: e };
|
|
1227
|
+
}
|
|
1228
|
+
let t;
|
|
1229
|
+
try {
|
|
1230
|
+
t = new URL(e);
|
|
1231
|
+
} catch {
|
|
1232
|
+
throw new Error(
|
|
1233
|
+
"The web vitals endpoint must be a same-origin path or an absolute URL."
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
if (t.protocol !== "https:")
|
|
1237
|
+
throw new Error("The web vitals endpoint must use HTTPS.");
|
|
1238
|
+
return { source: t.origin, url: t.href };
|
|
1239
|
+
}
|
|
1240
|
+
function Ot(e) {
|
|
1241
|
+
if (!e)
|
|
1242
|
+
return L;
|
|
1243
|
+
const t = [];
|
|
1244
|
+
for (const r of e) {
|
|
1245
|
+
if (!L.includes(r))
|
|
1246
|
+
throw new Error(
|
|
1247
|
+
`The browser collector does not measure ${JSON.stringify(r)}. Demiurge collects ${L.join(", ")}.`
|
|
1248
|
+
);
|
|
1249
|
+
t.includes(r) || t.push(r);
|
|
1250
|
+
}
|
|
1251
|
+
if (t.length === 0)
|
|
1252
|
+
throw new Error("A web vitals integration must collect one metric or more.");
|
|
1253
|
+
return t;
|
|
1254
|
+
}
|
|
1255
|
+
function Mt(e) {
|
|
1256
|
+
if (e === void 0)
|
|
1257
|
+
return 1;
|
|
1258
|
+
if (!Number.isFinite(e) || e < 0 || e > 1)
|
|
1259
|
+
throw new Error("The web vitals sample rate must be between 0 and 1.");
|
|
1260
|
+
return e;
|
|
1261
|
+
}
|
|
1262
|
+
const Ft = 1e3, zt = 5e3, Ut = 40;
|
|
1263
|
+
function Bt(e, t = {}) {
|
|
1264
|
+
if (typeof window > "u" || typeof PerformanceObserver > "u")
|
|
1265
|
+
return () => {
|
|
1266
|
+
};
|
|
1267
|
+
const r = t.random ?? Math.random;
|
|
1268
|
+
if (e.sampleRate < 1 && r() >= e.sampleRate)
|
|
1269
|
+
return () => {
|
|
1270
|
+
};
|
|
1271
|
+
const n = t.transport ?? _t, o = new Set(e.metrics), a = [], i = [], s = /* @__PURE__ */ new Set();
|
|
1272
|
+
let l = jt(), d = 0, p = 0, c = 0, f = 0, h, v, S = !1;
|
|
1273
|
+
const b = (u, g) => {
|
|
1274
|
+
if (S || s.has(u))
|
|
1275
|
+
return;
|
|
1276
|
+
s.add(u);
|
|
1277
|
+
const y = {
|
|
1278
|
+
id: `${u}-${Date.now()}-${Math.floor(r() * 1e9)}`,
|
|
1279
|
+
name: u,
|
|
1280
|
+
navigationType: l,
|
|
1281
|
+
rating: Nt(u, g),
|
|
1282
|
+
url: window.location.href,
|
|
1283
|
+
value: Math.round(g * 1e3) / 1e3
|
|
1284
|
+
};
|
|
1285
|
+
i.push(y), t.onReport?.(y);
|
|
1286
|
+
}, m = () => {
|
|
1287
|
+
if (S || (h !== void 0 && b("LCP", h), v !== void 0 && b("INP", v), o.has("CLS") && b("CLS", d), i.length === 0))
|
|
1288
|
+
return;
|
|
1289
|
+
const u = i.splice(0, i.length);
|
|
1290
|
+
n(e.endpoint, { metrics: u });
|
|
1291
|
+
}, k = () => {
|
|
1292
|
+
document.visibilityState === "hidden" && m();
|
|
1293
|
+
}, M = (u) => {
|
|
1294
|
+
u.persisted && (l = "back-forward-cache", s.clear(), d = 0, p = 0, c = 0, f = 0, h = void 0, v = void 0, o.has("FCP") && b("FCP", performance.now() - u.timeStamp));
|
|
1295
|
+
};
|
|
1296
|
+
if (o.has("TTFB")) {
|
|
1297
|
+
const u = te();
|
|
1298
|
+
u && u.responseStart > 0 && b("TTFB", u.responseStart);
|
|
1299
|
+
}
|
|
1300
|
+
return o.has("FCP") && C(a, { buffered: !0, type: "paint" }, (u) => {
|
|
1301
|
+
for (const g of u)
|
|
1302
|
+
g.name === "first-contentful-paint" && b("FCP", g.startTime);
|
|
1303
|
+
}), o.has("LCP") && C(
|
|
1304
|
+
a,
|
|
1305
|
+
{ buffered: !0, type: "largest-contentful-paint" },
|
|
1306
|
+
(u) => {
|
|
1307
|
+
const g = u.at(-1);
|
|
1308
|
+
g && (h = g.startTime);
|
|
1309
|
+
}
|
|
1310
|
+
), o.has("CLS") && C(a, { buffered: !0, type: "layout-shift" }, (u) => {
|
|
1311
|
+
for (const g of u) {
|
|
1312
|
+
const y = g;
|
|
1313
|
+
if (y.hadRecentInput)
|
|
1314
|
+
continue;
|
|
1315
|
+
p > 0 && y.startTime - f < Ft && y.startTime - c < zt ? p += y.value : (p = y.value, c = y.startTime), f = y.startTime, d = Math.max(d, p);
|
|
1316
|
+
}
|
|
1317
|
+
}), o.has("INP") && C(
|
|
1318
|
+
a,
|
|
1319
|
+
{
|
|
1320
|
+
buffered: !0,
|
|
1321
|
+
durationThreshold: Ut,
|
|
1322
|
+
type: "event"
|
|
1323
|
+
},
|
|
1324
|
+
(u) => {
|
|
1325
|
+
for (const g of u)
|
|
1326
|
+
v = Math.max(v ?? 0, g.duration);
|
|
1327
|
+
}
|
|
1328
|
+
), document.addEventListener("visibilitychange", k), window.addEventListener("pagehide", m), window.addEventListener("pageshow", M), () => {
|
|
1329
|
+
m(), S = !0;
|
|
1330
|
+
for (const u of a)
|
|
1331
|
+
u.disconnect();
|
|
1332
|
+
document.removeEventListener("visibilitychange", k), window.removeEventListener("pagehide", m), window.removeEventListener("pageshow", M);
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
function kr({ integration: e, onReport: t, transport: r }) {
|
|
1336
|
+
return P(
|
|
1337
|
+
() => Bt(e, { onReport: t, transport: r }),
|
|
1338
|
+
[e, t, r]
|
|
1339
|
+
), null;
|
|
1340
|
+
}
|
|
1341
|
+
function _t(e, t) {
|
|
1342
|
+
const r = JSON.stringify(t);
|
|
1343
|
+
if (typeof navigator < "u" && typeof navigator.sendBeacon == "function") {
|
|
1344
|
+
const n = new Blob([r], { type: "application/json" });
|
|
1345
|
+
if (navigator.sendBeacon(e, n))
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
fetch(e, {
|
|
1349
|
+
body: r,
|
|
1350
|
+
headers: { "content-type": "application/json" },
|
|
1351
|
+
keepalive: !0,
|
|
1352
|
+
method: "POST"
|
|
1353
|
+
}).catch(() => {
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
function C(e, t, r) {
|
|
1357
|
+
try {
|
|
1358
|
+
const n = new PerformanceObserver((o) => r(o.getEntries()));
|
|
1359
|
+
n.observe(t), e.push(n);
|
|
1360
|
+
} catch {
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
function te() {
|
|
1365
|
+
if (!(typeof performance > "u"))
|
|
1366
|
+
return performance.getEntriesByType("navigation")[0];
|
|
1367
|
+
}
|
|
1368
|
+
function jt() {
|
|
1369
|
+
const e = te();
|
|
1370
|
+
return e?.type === "back_forward" ? "back-forward" : e?.type === "reload" || e?.type === "prerender" ? e.type : "navigate";
|
|
1371
|
+
}
|
|
1067
1372
|
export {
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1373
|
+
L as COLLECTED_WEB_VITAL_NAMES,
|
|
1374
|
+
Vr as CacheNotFoundError,
|
|
1375
|
+
He as EnvValidationError,
|
|
1376
|
+
xr as FRAMEWORK_TRUSTED_TYPES_POLICY,
|
|
1377
|
+
Ee as HTTP_ERROR_STATUSES,
|
|
1378
|
+
Wr as HttpError,
|
|
1379
|
+
vr as Image,
|
|
1380
|
+
yr as Link,
|
|
1381
|
+
Cr as Script,
|
|
1382
|
+
Rt as WEB_VITAL_NAMES,
|
|
1383
|
+
It as WEB_VITAL_THRESHOLDS,
|
|
1384
|
+
kr as WebVitals,
|
|
1385
|
+
or as action,
|
|
1386
|
+
ar as actionInput,
|
|
1387
|
+
br as analytics,
|
|
1388
|
+
qr as applyFetchMetadataVary,
|
|
1389
|
+
Ir as assertAdapterCapabilities,
|
|
1390
|
+
Gr as auditScriptDependencies,
|
|
1391
|
+
Kr as cacheNotFound,
|
|
1392
|
+
Nr as checkAdapterCapabilities,
|
|
1393
|
+
Jr as checkFetchMetadata,
|
|
1394
|
+
at as checkWebSocketOrigin,
|
|
1395
|
+
Bt as collectWebVitals,
|
|
1396
|
+
Yr as createCache,
|
|
1397
|
+
Zr as createCorsHeaders,
|
|
1398
|
+
Xr as createCsrfCookie,
|
|
1399
|
+
Qr as createCsrfToken,
|
|
1400
|
+
ct as createFileRouter,
|
|
1401
|
+
Lr as createFrameworkScriptUrl,
|
|
1402
|
+
en as createInvalidation,
|
|
1403
|
+
tn as createMemoryCache,
|
|
1404
|
+
rn as createMemoryCacheStore,
|
|
1405
|
+
Yt as createMemoryIdempotencyStore,
|
|
1406
|
+
nn as createMemoryRateLimitStore,
|
|
1407
|
+
on as createRequestHandler,
|
|
1408
|
+
lr as createSecureCookie,
|
|
1409
|
+
an as createSecurityAudit,
|
|
1410
|
+
sn as createSecurityHeaders,
|
|
1411
|
+
mr as createSecurityReportHandler,
|
|
1412
|
+
cn as cspHash,
|
|
1413
|
+
un as cspNonce,
|
|
1414
|
+
Kn as defaultFontPath,
|
|
1415
|
+
Pr as defineAdapter,
|
|
1416
|
+
fr as defineEnvSchema,
|
|
1417
|
+
Jn as defineFonts,
|
|
1418
|
+
Yn as defineImages,
|
|
1419
|
+
Sr as defineInstrumentation,
|
|
1420
|
+
Dr as defineLinks,
|
|
1421
|
+
ln as defineMetadata,
|
|
1422
|
+
sr as defineMiddleware,
|
|
1423
|
+
tr as defineOgImage,
|
|
1424
|
+
er as defineRobots,
|
|
1425
|
+
fn as defineRoutePolicy,
|
|
1426
|
+
Or as defineScripts,
|
|
1427
|
+
dn as defineSecurityPolicy,
|
|
1428
|
+
Xt as defineSitemap,
|
|
1429
|
+
hn as defineTags,
|
|
1430
|
+
Er as defineWebVitals,
|
|
1431
|
+
mn as enforceAllowedMethods,
|
|
1432
|
+
pn as enforceCsrfProtection,
|
|
1433
|
+
gn as enforceFetchMetadataPolicy,
|
|
1434
|
+
wn as enforceRateLimit,
|
|
1435
|
+
yn as enforceRequestSecurity,
|
|
1436
|
+
gr as enforceWebSocketOrigin,
|
|
1437
|
+
hr as env,
|
|
1438
|
+
Zn as font,
|
|
1439
|
+
Xn as fontAssetFileName,
|
|
1440
|
+
Qn as fontAssetUrl,
|
|
1441
|
+
eo as fontLinks,
|
|
1442
|
+
to as fontMediaType,
|
|
1443
|
+
ro as fontPreloadLinks,
|
|
1444
|
+
no as fontSources,
|
|
1445
|
+
oo as fontStylesheetUrl,
|
|
1446
|
+
Mr as getScriptWorker,
|
|
1447
|
+
vn as handleRequestWithManifest,
|
|
1448
|
+
pe as href,
|
|
1449
|
+
bn as html,
|
|
1450
|
+
Re as httpError,
|
|
1451
|
+
wr as hydrateFileRouter,
|
|
1452
|
+
ao as isAllowedImageSource,
|
|
1453
|
+
Sn as isCacheNotFoundError,
|
|
1454
|
+
ke as isHttpError,
|
|
1455
|
+
En as issueCsrfToken,
|
|
1456
|
+
Rn as json,
|
|
1457
|
+
Tn as jsonl,
|
|
1458
|
+
kn as link,
|
|
1459
|
+
An as mergeRoutePolicies,
|
|
1460
|
+
$n as mergeRouteSecurityPolicies,
|
|
1461
|
+
xn as mergeSecurityPolicies,
|
|
1462
|
+
Cn as meta,
|
|
1134
1463
|
Fr as modulePreload,
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1464
|
+
In as notFound,
|
|
1465
|
+
ir as page,
|
|
1466
|
+
D as parseBodySize,
|
|
1467
|
+
B as parseCacheDuration,
|
|
1468
|
+
de as parseCookieHeader,
|
|
1469
|
+
io as parseImageOptimizerRequest,
|
|
1470
|
+
Nn as parseRateLimitWindow,
|
|
1471
|
+
Lt as parseWebVitalsBeacon,
|
|
1472
|
+
Ae as planImageTransform,
|
|
1473
|
+
zr as preconnect,
|
|
1474
|
+
Ur as preload,
|
|
1475
|
+
Ln as query,
|
|
1476
|
+
ur as readSecureCookie,
|
|
1477
|
+
Tr as readWebVitalsBeacon,
|
|
1478
|
+
Pn as redirect,
|
|
1479
|
+
so as renderFontFaceCss,
|
|
1480
|
+
nr as renderOgImageResponse,
|
|
1481
|
+
Ne as renderOgImageSvg,
|
|
1482
|
+
Br as renderPageResponse,
|
|
1483
|
+
rr as renderRobots,
|
|
1484
|
+
Qt as renderSitemap,
|
|
1485
|
+
_r as resolveLinks,
|
|
1486
|
+
Dn as resolveMetadata,
|
|
1487
|
+
jr as resolveScripts,
|
|
1488
|
+
le as response,
|
|
1489
|
+
Zt as runIdempotentMutation,
|
|
1490
|
+
I as script,
|
|
1491
|
+
O as secureCookieName,
|
|
1492
|
+
On as security,
|
|
1493
|
+
_t as sendWebVitalsBeacon,
|
|
1494
|
+
ue as serializeCacheKey,
|
|
1495
|
+
Mn as serializeCacheNamespace,
|
|
1496
|
+
Fn as serializeCacheTag,
|
|
1497
|
+
zn as serverTiming,
|
|
1498
|
+
Un as sse,
|
|
1499
|
+
U as startDeferredScripts,
|
|
1500
|
+
Bn as stream,
|
|
1501
|
+
_n as structuredData,
|
|
1502
|
+
jn as tag,
|
|
1503
|
+
Hn as text,
|
|
1504
|
+
fe as toResponse,
|
|
1505
|
+
Vn as validateCorsPolicy,
|
|
1506
|
+
dr as validateEnv,
|
|
1507
|
+
Wn as validateRateLimitPolicy,
|
|
1508
|
+
qn as validateRouteModules,
|
|
1509
|
+
je as validateSecureCookie,
|
|
1510
|
+
pr as validateUploads,
|
|
1511
|
+
Nt as webVitalRating,
|
|
1512
|
+
Rr as webVitalsPolicy,
|
|
1513
|
+
cr as webhook
|
|
1175
1514
|
};
|
|
1176
1515
|
//# sourceMappingURL=index.js.map
|