@absolutejs/absolute 0.20.0-beta.130 → 0.20.0-beta.131
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/CHANGELOG.md +21 -0
- package/changelog.json +41 -0
- package/dist/angular/browser.js +406 -396
- package/dist/angular/browser.js.map +4 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -3
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -4
- package/dist/angular/index.js +560 -701
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +197 -338
- package/dist/angular/server.js.map +5 -5
- package/dist/build/buildWorker.js +27 -35
- package/dist/build.js +3833 -5876
- package/dist/build.js.map +4 -4
- package/dist/cli/{add-9sa7e3vd.js → add-hvqeg5sz.js} +23 -25
- package/dist/cli/{analyze-c1sep5y9.js → analyze-c2x2aym5.js} +6 -7
- package/dist/cli/androidEmulatorController-j73a1br6.js +22 -0
- package/dist/cli/{androidNativeWatcher-dnp95nk2.js → androidNativeWatcher-ctbnsr1v.js} +11 -14
- package/dist/cli/{api-2hd8cahp.js → api-rk13rfd9.js} +11 -13
- package/dist/cli/{build-857rc1ds.js → build-20y4b6rj.js} +8 -9
- package/dist/cli/{buildDepVendor-8akhr8n8.js → buildDepVendor-axqvbbm6.js} +5 -170
- package/dist/cli/{compile-9by2vxy5.js → compile-qygwqezx.js} +43 -48
- package/dist/cli/config/client.js +8 -8
- package/dist/cli/config/server.js +5615 -5595
- package/dist/cli/config-3te1fbry.js +7 -0
- package/dist/cli/{db-8wweexdp.js → db-p8pc325y.js} +5 -13
- package/dist/cli/{dev-qg7fr16s.js → dev-6f0gry3y.js} +75 -77
- package/dist/cli/{devCert-avr89zf3.js → devCert-n33ep8pg.js} +0 -3
- package/dist/cli/{doctor-mbh9bk05.js → doctor-8rm8p4dm.js} +13 -14
- package/dist/cli/emulatorDoctor-cwa70kgt.js +17 -0
- package/dist/cli/emulatorInstaller-dx3fmm2m.js +14 -0
- package/dist/cli/env-2107nff1.js +11 -0
- package/dist/cli/eslint-zz0t0kfp.js +17 -0
- package/dist/cli/eslintChunked-wg10jj9m.js +12 -0
- package/dist/cli/expoDevController-s70fj7vf.js +16 -0
- package/dist/cli/{expoNativeWatcher-rmc95bak.js → expoNativeWatcher-aakp7xvj.js} +1 -5
- package/dist/cli/expoProject-zy02tbfg.js +10 -0
- package/dist/cli/{generate-069p0dk3.js → generate-nz4w03yz.js} +19 -21
- package/dist/cli/{heapDiff-87v24x7p.js → heapDiff-2etr2r26.js} +5 -6
- package/dist/cli/{htmx-5wh1jh75.js → htmx-0xcaqrny.js} +12 -14
- package/dist/cli/{index-sjvydg2r.js → index-1ff9q1vx.js} +7 -7
- package/dist/cli/{index-rqbk0b30.js → index-1qewxkgy.js} +26 -26
- package/dist/cli/{index-prwyfnn3.js → index-1x1vah31.js} +2 -2
- package/dist/cli/{index-ddakkws4.js → index-31j3beht.js} +13 -13
- package/dist/cli/{index-j2nw3edf.js → index-3gtnqd57.js} +5 -5
- package/dist/cli/{index-54q7pxcx.js → index-434b7j4a.js} +2 -32
- package/dist/cli/{index-w5vswatm.js → index-43a1vvb7.js} +6 -10
- package/dist/cli/{index-nxcwg9ma.js → index-5sjk7daj.js} +31 -31
- package/dist/cli/{index-6j1xaheg.js → index-73sk1ney.js} +5 -5
- package/dist/cli/{index-3x5wpx5d.js → index-8kdmmgvc.js} +2 -2
- package/dist/cli/{index-1ys3dnrs.js → index-8w2wazrk.js} +34 -34
- package/dist/cli/{index-wtfnv3n2.js → index-92hmw204.js} +3 -3
- package/dist/cli/{index-vdbn8brx.js → index-9ehbfmeq.js} +38 -41
- package/dist/cli/{index-mywsk201.js → index-fde3c297.js} +1 -1
- package/dist/cli/{index-255xs63d.js → index-j57pgg5m.js} +10 -10
- package/dist/cli/{index-5cgsrv62.js → index-jcjwsdqt.js} +13 -182
- package/dist/cli/{index-00wfffav.js → index-k4t9k1xk.js} +5 -5
- package/dist/cli/{index-yxgaf8j0.js → index-m1vntzf1.js} +7 -5
- package/dist/cli/{index-9r7n9dqp.js → index-ma1dw7x2.js} +1 -1
- package/dist/cli/index-pch0v1z6.js +60 -0
- package/dist/cli/{index-8nym68py.js → index-ppxed116.js} +1 -1
- package/dist/cli/{index-9kwmb3c0.js → index-qyxd5n9a.js} +3 -3
- package/dist/cli/{index-tn4crd40.js → index-r62705dc.js} +12 -12
- package/dist/cli/{index-wctgx65x.js → index-r6k4xmdb.js} +21 -21
- package/dist/cli/{index-hty8111z.js → index-r915cvqp.js} +17 -17
- package/dist/cli/{index-exdd5k1g.js → index-rrxeqrbn.js} +2 -2
- package/dist/cli/{index-keg69zm1.js → index-snbzdwb9.js} +5 -5
- package/dist/cli/{index-v26ze17p.js → index-thqwfzy8.js} +3 -3
- package/dist/cli/{index-0hr7c4qe.js → index-vdnmqkt8.js} +14 -18
- package/dist/cli/{index-vkkqe08e.js → index-vj2v38sq.js} +29 -29
- package/dist/cli/{index-erngp7a9.js → index-wy0yh4jj.js} +16 -16
- package/dist/cli/{index-1cypb2zn.js → index-xcr3r6a1.js} +8 -8
- package/dist/cli/index.js +44 -48
- package/dist/cli/{info-d74dr585.js → info-kx5510rq.js} +7 -7
- package/dist/cli/{inspect-23chj4nc.js → inspect-5dj06x0m.js} +18 -20
- package/dist/cli/{iosNativeWatcher-kggp7j9a.js → iosNativeWatcher-zx49pzej.js} +12 -16
- package/dist/cli/iosSimulatorController-haa1cc3p.js +23 -0
- package/dist/cli/{islands-wpqgmwh0.js → islands-z4adh55n.js} +8 -9
- package/dist/cli/{lintProof-wx3b6dzy.js → lintProof-qcwdvzcz.js} +12 -17
- package/dist/cli/{logs-bx2n5ey6.js → logs-3p2vrq5h.js} +8 -10
- package/dist/cli/{ls-kvmcmd2j.js → ls-nkspq73y.js} +13 -14
- package/dist/cli/{mem-apbk7bx4.js → mem-h3f497cr.js} +10 -14
- package/dist/cli/{migrate-p4rp5r6b.js → migrate-52bqqp08.js} +7 -8
- package/dist/cli/{mobile-43q3zmjf.js → mobile-w295dx0t.js} +572 -575
- package/dist/cli/nativeAuth-ysv0x5dy.js +27 -0
- package/dist/cli/patchedBun-m7vj5sks.js +9 -0
- package/dist/cli/prerender-mfnwsvyt.js +7 -0
- package/dist/cli/{prettier-vtk5yaw4.js → prettier-c1624g36.js} +2 -6
- package/dist/cli/{ps-8y28kzmb.js → ps-0jedm91n.js} +12 -16
- package/dist/cli/{psTui-8e96mwgz.js → psTui-tpr5nbmc.js} +28 -30
- package/dist/cli/remoteMacProtocol-v3ax0y0f.js +41 -0
- package/dist/cli/{remove-3fd1z2hx.js → remove-z0brj5nd.js} +16 -18
- package/dist/cli/{rewriteImports-d1gmaa68.js → rewriteImports-k6rjjmg1.js} +2 -100
- package/dist/cli/{routes-0xpanj8z.js → routes-ey0sw1eq.js} +7 -9
- package/dist/cli/start-36w63t6h.js +20 -0
- package/dist/cli/telemetry-3wnc06wa.js +9 -0
- package/dist/cli/{tunnelRelay-5at2v8w6.js → tunnelRelay-19ay0fxn.js} +3 -4
- package/dist/cli/{typecheck-yj9s13eb.js → typecheck-nmf6e7k7.js} +147 -149
- package/dist/cli/{workspace-m56sgfkc.js → workspace-yetzedke.js} +32 -36
- package/dist/client/chunks/{index-dk743xs6.js → index-8m2qq61n.js} +12 -8
- package/dist/client/chunks/{index-dk743xs6.js.map → index-8m2qq61n.js.map} +4 -3
- package/dist/client/chunks/{index-m35nbkdp.js → islands-rc28k5sx.js} +104 -42
- package/dist/client/chunks/islands-rc28k5sx.js.map +15 -0
- package/dist/client/chunks/{react-yq4ss9y4.js → react-dcvkaba2.js} +5 -7
- package/dist/client/chunks/{react-yq4ss9y4.js.map → react-dcvkaba2.js.map} +2 -2
- package/dist/client/chunks/{svelte-s0c964kb.js → svelte-4yfa5bxa.js} +2 -4
- package/dist/client/chunks/{svelte-s0c964kb.js.map → svelte-4yfa5bxa.js.map} +2 -2
- package/dist/client/chunks/{vue-rdskrnyg.js → vue-a84fzp3v.js} +2 -4
- package/dist/client/chunks/{vue-rdskrnyg.js.map → vue-a84fzp3v.js.map} +2 -2
- package/dist/client/index.js +42 -15
- package/dist/client/index.js.map +2 -2
- package/dist/client/prefetch.js +1 -3
- package/dist/client/prefetch.js.map +2 -2
- package/dist/core/streamingSlotRegistrar.js +1 -64
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +1 -64
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/serverBootstrap.js +1802 -2018
- package/dist/index.js +5247 -8794
- package/dist/index.js.map +9 -20
- package/dist/islands/browser.js +13 -3
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +26 -142
- package/dist/islands/index.js.map +2 -2
- package/dist/mobile/browser.js +13 -3
- package/dist/mobile/browser.js.map +2 -2
- package/dist/mobile/index.js +1067 -2182
- package/dist/mobile/index.js.map +2 -2
- package/dist/mobile/remoteMacAgentEntry.js +156 -156
- package/dist/mobile/shellAuth.js +0 -16
- package/dist/mobile/shellBootstrap.js +734 -724
- package/dist/mobile/shellExpoAuth.js +4 -18
- package/dist/mobile/shellExpoDevices.js +0 -16
- package/dist/mobile/shellExpoSync.js +0 -16
- package/dist/mobile/shellSync.js +3 -19
- package/dist/mobile/shellUpdate.js +5 -21
- package/dist/mobile/uiPrimitives.js +0 -16
- package/dist/react/browser.js +15 -5
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/index.js +68 -58
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/hooks/index.js +1 -63
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +56 -195
- package/dist/react/index.js.map +5 -5
- package/dist/react/jsxDevRuntimeCompat.js +1 -64
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +1 -64
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +1 -64
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +1 -64
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +38 -51
- package/dist/react/server.js.map +5 -5
- package/dist/src/cli/config/server.d.ts +7 -129
- package/dist/src/cli/patchedBun.d.ts +14 -14
- package/dist/src/core/prepare.d.ts +149 -1805
- package/dist/src/core/requestContext.d.ts +1 -1
- package/dist/src/dev/requestInspector.d.ts +1 -1
- package/dist/src/mobile/associationFiles.d.ts +2 -2
- package/dist/src/mobile/compatibilityDispatcher.d.ts +1 -1
- package/dist/src/mobile/mobilePreview.d.ts +8 -130
- package/dist/src/mobile/updateServer.d.ts +2 -2
- package/dist/src/plugins/devtoolsJson.d.ts +2 -2
- package/dist/src/plugins/hmr.d.ts +2 -2
- package/dist/src/plugins/imageOptimizer.d.ts +2 -151
- package/dist/src/plugins/telemetryPlugin.d.ts +1 -19
- package/dist/svelte/browser.js +13 -3
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +66 -210
- package/dist/svelte/index.js.map +5 -5
- package/dist/svelte/server.js +51 -99
- package/dist/svelte/server.js.map +5 -5
- package/dist/types/globals.d.ts +0 -6
- package/dist/vue/browser.js +13 -3
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +13 -3
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +62 -50
- package/dist/vue/components/index.js.map +4 -4
- package/dist/vue/index.js +1115 -1258
- package/dist/vue/index.js.map +10 -10
- package/dist/vue/server.js +42 -59
- package/dist/vue/server.js.map +5 -5
- package/package.json +9 -9
- package/dist/cli/androidEmulatorController-sj141e1c.js +0 -30
- package/dist/cli/config-rjeexvza.js +0 -8
- package/dist/cli/emulatorDoctor-gzarrsex.js +0 -18
- package/dist/cli/emulatorInstaller-pjw4ex6q.js +0 -15
- package/dist/cli/env-4f6f6z69.js +0 -14
- package/dist/cli/eslint-qfkxe89p.js +0 -20
- package/dist/cli/eslintChunked-7ef700pn.js +0 -21
- package/dist/cli/expoDevController-weywa74d.js +0 -26
- package/dist/cli/expoProject-w2pzjwnx.js +0 -11
- package/dist/cli/index-1rabqyq0.js +0 -7
- package/dist/cli/index-ar4gz15x.js +0 -60
- package/dist/cli/iosSimulatorController-xcxxfkzx.js +0 -34
- package/dist/cli/nativeAuth-zx4tsb1f.js +0 -38
- package/dist/cli/patchedBun-zjtrn2s4.js +0 -38
- package/dist/cli/prerender-yex2zwj3.js +0 -18
- package/dist/cli/remoteMacProtocol-r38jhg44.js +0 -69
- package/dist/cli/start-gzhrkhxe.js +0 -23
- package/dist/cli/telemetry-94rka1w2.js +0 -14
- package/dist/client/chunks/angularPatch-arh4sr68.js +0 -157
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +0 -10
- package/dist/client/chunks/index-jrcwp722.js +0 -12
- package/dist/client/chunks/index-jrcwp722.js.map +0 -10
- package/dist/client/chunks/index-m35nbkdp.js.map +0 -12
- package/dist/client/chunks/index-qxjc7kc5.js +0 -12
- package/dist/client/chunks/index-qxjc7kc5.js.map +0 -9
- package/dist/client/chunks/islands-50dg63j9.js +0 -284
- package/dist/client/chunks/islands-50dg63j9.js.map +0 -14
- /package/dist/cli/{index-me8nczrw.js → index-039rh39e.js} +0 -0
- /package/dist/cli/{index-bw4ktfnz.js → index-1y5mmnwg.js} +0 -0
- /package/dist/cli/{index-5xfxd7xa.js → index-3wm8p7rg.js} +0 -0
- /package/dist/cli/{index-4rme31py.js → index-420h9hq7.js} +0 -0
- /package/dist/cli/{index-4rhxthsy.js → index-65kqn88a.js} +0 -0
- /package/dist/cli/{index-r8x3839e.js → index-71gchbzt.js} +0 -0
- /package/dist/cli/{index-s2tazax7.js → index-92g14j47.js} +0 -0
- /package/dist/cli/{index-j66p8hn5.js → index-bwsa6ax4.js} +0 -0
- /package/dist/cli/{index-bzs19w3r.js → index-e6ysp900.js} +0 -0
- /package/dist/cli/{index-06cmrcdq.js → index-h7qhz02e.js} +0 -0
- /package/dist/cli/{index-6h54jqdq.js → index-hg54jyts.js} +0 -0
- /package/dist/cli/{index-czwrxgdj.js → index-hxqprc80.js} +0 -0
- /package/dist/cli/{index-zh6hhrwy.js → index-jjfbjv1z.js} +0 -0
- /package/dist/cli/{index-fc9vxw56.js → index-prs14ys9.js} +0 -0
- /package/dist/cli/{index-v1k46q3x.js → index-tx0kx9zx.js} +0 -0
- /package/dist/cli/{index-fhaf3tdk.js → index-x8x0f3ha.js} +0 -0
- /package/dist/cli/{index-18q9qc7f.js → index-ypcqx24p.js} +0 -0
|
@@ -12,7 +12,17 @@ var __export = (target, all) => {
|
|
|
12
12
|
set: __exportSetter.bind(all, name)
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
var __esm = (fn, res) => () =>
|
|
15
|
+
var __esm = (fn, res, err) => () => {
|
|
16
|
+
if (fn)
|
|
17
|
+
try {
|
|
18
|
+
res = fn(fn = 0);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
err = [e];
|
|
21
|
+
}
|
|
22
|
+
if (err)
|
|
23
|
+
throw err[0];
|
|
24
|
+
return res;
|
|
25
|
+
};
|
|
16
26
|
|
|
17
27
|
// node_modules/web-vitals/dist/web-vitals.attribution.js
|
|
18
28
|
var exports_web_vitals_attribution = {};
|
|
@@ -33,16 +43,16 @@ class t {
|
|
|
33
43
|
t;
|
|
34
44
|
o = 0;
|
|
35
45
|
i = [];
|
|
36
|
-
l(
|
|
37
|
-
if (
|
|
46
|
+
l(t) {
|
|
47
|
+
if (t.hadRecentInput)
|
|
38
48
|
return;
|
|
39
49
|
const n = this.i[0], e = this.i.at(-1);
|
|
40
|
-
this.o && n && e &&
|
|
50
|
+
this.o && n && e && t.startTime - e.startTime < 1000 && t.startTime - n.startTime < 5000 ? (this.o += t.value, this.i.push(t)) : (this.o = t.value, this.i = [t]), this.t?.(t);
|
|
41
51
|
}
|
|
42
52
|
}
|
|
43
|
-
function r(
|
|
44
|
-
let
|
|
45
|
-
return
|
|
53
|
+
function r(t, n) {
|
|
54
|
+
let e = a.get(n);
|
|
55
|
+
return e || (e = new WeakMap, a.set(n, e)), e.get(t) || e.set(t, new n), e.get(t);
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
class D {
|
|
@@ -57,22 +67,22 @@ class W {
|
|
|
57
67
|
M() {
|
|
58
68
|
N = A(), this.h.length = 0, this.v.clear();
|
|
59
69
|
}
|
|
60
|
-
T(
|
|
61
|
-
const
|
|
62
|
-
return !
|
|
70
|
+
T(t) {
|
|
71
|
+
const n = A() - N, e = Math.min(this.h.length - 1, Math.floor(n / 50));
|
|
72
|
+
return !n || e !== -1 || t !== "soft-navigation" && t !== "back-forward-cache" ? this.h[e] : { D: 8, id: -1, entries: [] };
|
|
63
73
|
}
|
|
64
|
-
l(
|
|
65
|
-
if (this.p?.(
|
|
74
|
+
l(t) {
|
|
75
|
+
if (this.p?.(t), !t.interactionId && t.entryType !== "first-input")
|
|
66
76
|
return;
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
if (
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
for (const
|
|
73
|
-
this.v.delete(
|
|
77
|
+
const n = this.h.at(-1);
|
|
78
|
+
let e = this.v.get(t.interactionId);
|
|
79
|
+
if (e || this.h.length < 10 || t.duration > n.D) {
|
|
80
|
+
if (e ? t.duration > e.D ? (e.entries = [t], e.D = t.duration) : t.duration === e.D && t.startTime === e.entries[0].startTime && e.entries.push(t) : (e = { id: t.interactionId, entries: [t], D: t.duration }, this.v.set(e.id, e), this.h.push(e)), this.h.sort((t, n) => n.D - t.D), this.h.length > 10) {
|
|
81
|
+
const t = this.h.splice(10);
|
|
82
|
+
for (const n of t)
|
|
83
|
+
this.v.delete(n.id);
|
|
74
84
|
}
|
|
75
|
-
this.m?.(
|
|
85
|
+
this.m?.(e);
|
|
76
86
|
}
|
|
77
87
|
}
|
|
78
88
|
}
|
|
@@ -80,65 +90,65 @@ class W {
|
|
|
80
90
|
class $ {
|
|
81
91
|
p;
|
|
82
92
|
u;
|
|
83
|
-
l(
|
|
84
|
-
this.p?.(
|
|
93
|
+
l(t) {
|
|
94
|
+
this.p?.(t);
|
|
85
95
|
}
|
|
86
96
|
}
|
|
87
97
|
var n = () => {
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
91
|
-
}, e = (
|
|
98
|
+
const t = performance.getEntriesByType("navigation")[0];
|
|
99
|
+
if (t && t.responseStart > 0 && t.responseStart < performance.now())
|
|
100
|
+
return t;
|
|
101
|
+
}, e = (t) => {
|
|
92
102
|
if (document.readyState === "loading")
|
|
93
103
|
return "loading";
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
if (
|
|
104
|
+
const e = n();
|
|
105
|
+
if (e) {
|
|
106
|
+
if (t < e.domInteractive)
|
|
97
107
|
return "loading";
|
|
98
|
-
if (
|
|
108
|
+
if (e.domContentLoadedEventStart === 0 || t < e.domContentLoadedEventStart)
|
|
99
109
|
return "dom-interactive";
|
|
100
|
-
if (
|
|
110
|
+
if (e.domComplete === 0 || t < e.domComplete)
|
|
101
111
|
return "dom-content-loaded";
|
|
102
112
|
}
|
|
103
113
|
return "complete";
|
|
104
|
-
}, o = (
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
}, i = (
|
|
108
|
-
let
|
|
114
|
+
}, o = (t) => {
|
|
115
|
+
const n = t.nodeName;
|
|
116
|
+
return t.nodeType === 1 ? n.toLowerCase() : n.toUpperCase().replace(/^#/, "");
|
|
117
|
+
}, i = (t) => {
|
|
118
|
+
let n = "";
|
|
109
119
|
try {
|
|
110
|
-
for (;
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return
|
|
114
|
-
if (
|
|
120
|
+
for (;t?.nodeType !== 9; ) {
|
|
121
|
+
const e = t, i = e.id ? "#" + e.id : [o(e), ...Array.from(e.classList ?? []).sort()].join(".");
|
|
122
|
+
if (n.length + i.length > 99)
|
|
123
|
+
return n || i;
|
|
124
|
+
if (n = n ? i + ">" + n : i, e.id)
|
|
115
125
|
break;
|
|
116
|
-
|
|
126
|
+
t = e.parentNode;
|
|
117
127
|
}
|
|
118
128
|
} catch {}
|
|
119
|
-
return
|
|
120
|
-
}, a, s = -1, c = () => s, f = (
|
|
121
|
-
addEventListener("pageshow", (
|
|
122
|
-
|
|
129
|
+
return n;
|
|
130
|
+
}, a, s = -1, c = () => s, f = (t) => {
|
|
131
|
+
addEventListener("pageshow", (n) => {
|
|
132
|
+
n.persisted && (s = n.timeStamp, t(n));
|
|
123
133
|
}, true);
|
|
124
|
-
}, l = (
|
|
125
|
-
let
|
|
126
|
-
return (
|
|
127
|
-
|
|
134
|
+
}, l = (t, n, e, o) => {
|
|
135
|
+
let i, a;
|
|
136
|
+
return (r) => {
|
|
137
|
+
n.value >= 0 && (r || o) && (a = n.value - (i ?? 0), (a || i === undefined) && (i = n.value, n.delta = a, n.rating = ((t, n) => t > n[1] ? "poor" : t > n[0] ? "needs-improvement" : "good")(n.value, e), t(n)));
|
|
128
138
|
};
|
|
129
|
-
}, u = (
|
|
130
|
-
requestAnimationFrame(() => requestAnimationFrame(
|
|
131
|
-
}, d = () => n()?.activationStart ?? 0, h = -1, g, v = () => document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0, p = (
|
|
139
|
+
}, u = (t) => {
|
|
140
|
+
requestAnimationFrame(() => requestAnimationFrame(t));
|
|
141
|
+
}, d = () => n()?.activationStart ?? 0, h = -1, g, v = () => document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0, p = (t) => {
|
|
132
142
|
if (document.visibilityState === "hidden") {
|
|
133
|
-
if (
|
|
134
|
-
for (const
|
|
135
|
-
|
|
136
|
-
isFinite(h) || (h =
|
|
137
|
-
}
|
|
138
|
-
}, m = (
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
h =
|
|
143
|
+
if (t.type === "visibilitychange")
|
|
144
|
+
for (const t of g)
|
|
145
|
+
t();
|
|
146
|
+
isFinite(h) || (h = t.type === "visibilitychange" ? t.timeStamp : 0, removeEventListener("prerenderingchange", p, true));
|
|
147
|
+
}
|
|
148
|
+
}, m = (t = false) => {
|
|
149
|
+
if (t && (h = 1 / 0), h < 0) {
|
|
150
|
+
const t = d(), n = document.prerendering ? undefined : globalThis.performance.getEntriesByType("visibility-state").find((n) => n.name === "hidden" && n.startTime >= t)?.startTime;
|
|
151
|
+
h = n ?? v(), addEventListener("visibilitychange", p, true), addEventListener("prerenderingchange", p, true), f(() => {
|
|
142
152
|
setTimeout(() => {
|
|
143
153
|
h = v();
|
|
144
154
|
});
|
|
@@ -146,380 +156,380 @@ var n = () => {
|
|
|
146
156
|
}
|
|
147
157
|
return { get firstHiddenTime() {
|
|
148
158
|
return h;
|
|
149
|
-
}, onHidden(
|
|
150
|
-
g.add(
|
|
159
|
+
}, onHidden(t) {
|
|
160
|
+
g.add(t);
|
|
151
161
|
} };
|
|
152
|
-
}, y = (
|
|
153
|
-
const
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
return { name:
|
|
157
|
-
}, b = (
|
|
162
|
+
}, y = (t, e = -1, o, i = 0, a, r, s) => {
|
|
163
|
+
const f = n(), l = f?.navigationId || 0;
|
|
164
|
+
let u = "navigate";
|
|
165
|
+
o ? u = o : c() >= 0 ? u = "back-forward-cache" : f && (document.prerendering || d() > 0 ? u = "prerender" : document.wasDiscarded ? u = "restore" : f.type && (u = f.type.replace(/_/g, "-")));
|
|
166
|
+
return { name: t, value: e, rating: "good", delta: 0, entries: [], id: `v6-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1000000000000}`, navigationType: u, navigationId: i || l, navigationInteractionId: a, navigationURL: r || f?.name, navigationStartTime: s || 0 };
|
|
167
|
+
}, b = (t, n, e = {}) => {
|
|
158
168
|
try {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
169
|
+
const o = t.filter((t) => PerformanceObserver.supportedEntryTypes.includes(t));
|
|
170
|
+
if (o.length > 0) {
|
|
171
|
+
const t = new PerformanceObserver((t) => {
|
|
162
172
|
queueMicrotask(() => {
|
|
163
|
-
const
|
|
164
|
-
|
|
173
|
+
const e = t.getEntries();
|
|
174
|
+
o.length > 1 && e.sort((t, n) => t.startTime + t.duration - (n.startTime + n.duration)), n(e);
|
|
165
175
|
});
|
|
166
176
|
});
|
|
167
|
-
for (const
|
|
168
|
-
|
|
169
|
-
return
|
|
177
|
+
for (const n of o)
|
|
178
|
+
t.observe({ type: n, buffered: true, ...e });
|
|
179
|
+
return t;
|
|
170
180
|
}
|
|
171
181
|
} catch {}
|
|
172
|
-
}, M = (
|
|
173
|
-
if (
|
|
174
|
-
const
|
|
175
|
-
|
|
182
|
+
}, M = (t) => PerformanceObserver.supportedEntryTypes.includes("soft-navigation") && typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint == "function" && t && t.reportSoftNavs, T = (t, n) => {
|
|
183
|
+
if (t.set(n.navigationId, n), t.size > 2) {
|
|
184
|
+
const n = t.keys().next().value;
|
|
185
|
+
n !== undefined && t.delete(n);
|
|
176
186
|
}
|
|
177
|
-
}, E = (
|
|
178
|
-
let
|
|
187
|
+
}, E = (t) => {
|
|
188
|
+
let n = false;
|
|
179
189
|
return () => {
|
|
180
|
-
|
|
190
|
+
n || (t(), n = true);
|
|
181
191
|
};
|
|
182
|
-
}, w = (
|
|
183
|
-
document.prerendering ? addEventListener("prerenderingchange",
|
|
184
|
-
}, P, S = (
|
|
185
|
-
const
|
|
192
|
+
}, w = (t) => {
|
|
193
|
+
document.prerendering ? addEventListener("prerenderingchange", t, true) : t();
|
|
194
|
+
}, P, S = (t, n = {}) => {
|
|
195
|
+
const e = M(n);
|
|
186
196
|
w(() => {
|
|
187
|
-
const
|
|
188
|
-
let
|
|
189
|
-
const
|
|
190
|
-
for (const
|
|
191
|
-
|
|
197
|
+
const o = r(n, D), i = m();
|
|
198
|
+
let a, s = y("FCP");
|
|
199
|
+
const h = b(["paint"], (t) => {
|
|
200
|
+
for (const n of t)
|
|
201
|
+
n.name === "first-contentful-paint" && (h.disconnect(), n.startTime < i.firstHiddenTime && (s.value = Math.max(n.startTime - d(), 0), s.entries.push(n), s.navigationId = n.navigationId || s.navigationId, a(true)));
|
|
192
202
|
});
|
|
193
|
-
if (
|
|
194
|
-
|
|
195
|
-
|
|
203
|
+
if (h && (a = l(t, s, P, n.reportAllChanges), f((e) => {
|
|
204
|
+
s = y("FCP", -1, "back-forward-cache", s.navigationId, s.navigationInteractionId, s.navigationURL, c()), a = l(t, s, P, n.reportAllChanges), u(() => {
|
|
205
|
+
s.value = performance.now() - e.timeStamp, a(true);
|
|
196
206
|
});
|
|
197
|
-
})),
|
|
198
|
-
b(["soft-navigation"], (
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
|
|
207
|
+
})), e) {
|
|
208
|
+
b(["soft-navigation"], (e) => {
|
|
209
|
+
e.forEach((e) => {
|
|
210
|
+
o.u && e.navigationId && T(o.u, e);
|
|
211
|
+
const i = Math.max((e.presentationTime || e.paintTime || 0) - e.startTime, 0);
|
|
212
|
+
s = y("FCP", i, "soft-navigation", e.navigationId, e.interactionId, e.name, e.startTime), a = l(t, s, P, n.reportAllChanges), a(true);
|
|
203
213
|
});
|
|
204
|
-
},
|
|
214
|
+
}, n);
|
|
205
215
|
}
|
|
206
216
|
});
|
|
207
|
-
}, k, L = (
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const
|
|
214
|
-
|
|
217
|
+
}, k, L = (t) => t.find((t) => t.node?.nodeType === 1) || t[0], F = (n, o = {}) => {
|
|
218
|
+
const a = r(o = Object.assign({}, o), t), s = new WeakMap;
|
|
219
|
+
a.t = (t) => {
|
|
220
|
+
if (t?.sources?.length) {
|
|
221
|
+
const n = L(t.sources), e = n?.node;
|
|
222
|
+
if (e) {
|
|
223
|
+
const t = o.generateTarget?.(e) ?? i(e);
|
|
224
|
+
s.set(n, t);
|
|
215
225
|
}
|
|
216
226
|
}
|
|
217
227
|
};
|
|
218
|
-
((
|
|
219
|
-
const
|
|
228
|
+
((n, e = {}) => {
|
|
229
|
+
const o = m();
|
|
220
230
|
S(E(() => {
|
|
221
|
-
let
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
for (const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
M(
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
let i, a = y("CLS", 0);
|
|
232
|
+
const s = r(e, t), d = (t, o, r, c, f) => {
|
|
233
|
+
a = y("CLS", 0, t, o, r, c, f), s.o = 0, i = l(n, a, k, e.reportAllChanges);
|
|
234
|
+
}, h = (t = false) => {
|
|
235
|
+
s.o > a.value && (a.value = s.o, a.entries = s.i), i(t);
|
|
236
|
+
}, g = (t) => {
|
|
237
|
+
h(true), d("soft-navigation", t.navigationId, t.interactionId, t.name, t.startTime);
|
|
238
|
+
}, v = (t) => {
|
|
239
|
+
for (const n of t)
|
|
240
|
+
n.entryType !== "soft-navigation" ? s.l(n) : g(n);
|
|
241
|
+
h();
|
|
242
|
+
}, p = ["layout-shift"];
|
|
243
|
+
M(e) && p.push("soft-navigation");
|
|
244
|
+
const m = b(p, v);
|
|
245
|
+
m && (i = l(n, a, k, e.reportAllChanges), o.onHidden(() => {
|
|
246
|
+
v(m.takeRecords()), i(true);
|
|
237
247
|
}), f(() => {
|
|
238
|
-
|
|
239
|
-
}), setTimeout(
|
|
248
|
+
d("back-forward-cache", a.navigationId, a.navigationInteractionId, a.navigationURL, c()), u(i);
|
|
249
|
+
}), setTimeout(i));
|
|
240
250
|
}));
|
|
241
|
-
})((
|
|
242
|
-
|
|
243
|
-
let
|
|
244
|
-
if (
|
|
245
|
-
const
|
|
246
|
-
if (
|
|
247
|
-
const
|
|
248
|
-
|
|
251
|
+
})((t) => {
|
|
252
|
+
n(((t) => {
|
|
253
|
+
let n = {};
|
|
254
|
+
if (t.entries.length) {
|
|
255
|
+
const o = t.entries.reduce((t, n) => t.value > n.value ? t : n);
|
|
256
|
+
if (o?.sources?.length) {
|
|
257
|
+
const t = L(o.sources);
|
|
258
|
+
t && (n = { largestShiftTarget: s.get(t), largestShiftTime: o.startTime, largestShiftValue: o.value, largestShiftSource: t, largestShiftEntry: o, loadState: e(o.startTime) });
|
|
249
259
|
}
|
|
250
260
|
}
|
|
251
|
-
return Object.assign(
|
|
252
|
-
})(
|
|
253
|
-
},
|
|
254
|
-
}, _ = (
|
|
255
|
-
const
|
|
256
|
-
M(
|
|
257
|
-
S((
|
|
258
|
-
|
|
259
|
-
let
|
|
260
|
-
if (
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
const
|
|
265
|
-
|
|
261
|
+
return Object.assign(t, { attribution: n });
|
|
262
|
+
})(t));
|
|
263
|
+
}, o);
|
|
264
|
+
}, _ = (t, o = {}) => {
|
|
265
|
+
const i = r(o = Object.assign({}, o), D);
|
|
266
|
+
M(o) && (i.u = new Map);
|
|
267
|
+
S((o) => {
|
|
268
|
+
t(((t) => {
|
|
269
|
+
let o = { timeToFirstByte: 0, firstByteToFCP: t.value, loadState: e(c()) };
|
|
270
|
+
if (t.navigationType !== "soft-navigation") {
|
|
271
|
+
if (t.entries.length) {
|
|
272
|
+
const i = n(), a = t.entries.at(-1);
|
|
273
|
+
if (i) {
|
|
274
|
+
const n = i.responseStart, r = i.activationStart || 0, s = Math.max(0, n - r);
|
|
275
|
+
o = { timeToFirstByte: s, firstByteToFCP: t.value - s, loadState: e(t.entries[0].startTime), navigationEntry: i, fcpEntry: a };
|
|
266
276
|
}
|
|
267
277
|
}
|
|
268
278
|
} else {
|
|
269
|
-
const
|
|
270
|
-
|
|
279
|
+
const n = i.u?.get(t.navigationId);
|
|
280
|
+
n && (o = { timeToFirstByte: 0, firstByteToFCP: t.value, loadState: "complete", navigationEntry: n });
|
|
271
281
|
}
|
|
272
|
-
return Object.assign(
|
|
273
|
-
})(
|
|
274
|
-
},
|
|
275
|
-
}, B = 0, C, I = 0, O = (
|
|
276
|
-
for (const
|
|
277
|
-
|
|
282
|
+
return Object.assign(t, { attribution: o });
|
|
283
|
+
})(o));
|
|
284
|
+
}, o);
|
|
285
|
+
}, B = 0, C, I = 0, O = (t) => {
|
|
286
|
+
for (const n of t)
|
|
287
|
+
n.interactionId && (C = Math.min(C, n.interactionId), I = Math.max(I, n.interactionId), B = I ? (I - C) / 7 + 1 : 0);
|
|
278
288
|
}, j, A = () => j ? B : performance.interactionCount ?? 0, q = () => {
|
|
279
289
|
"interactionCount" in performance || j || (j = b(["event"], O, { durationThreshold: 0 }));
|
|
280
|
-
}, N = 0, x = (
|
|
281
|
-
const
|
|
290
|
+
}, N = 0, x = (t) => {
|
|
291
|
+
const n = "requestIdleCallback" in globalThis ? 1000 : 0, e = globalThis.requestIdleCallback || setTimeout, o = globalThis.cancelIdleCallback || clearTimeout;
|
|
282
292
|
if (document.visibilityState === "hidden")
|
|
283
|
-
|
|
293
|
+
t();
|
|
284
294
|
else {
|
|
285
|
-
const
|
|
286
|
-
let
|
|
287
|
-
const
|
|
288
|
-
|
|
295
|
+
const i = E(t);
|
|
296
|
+
let a = -1;
|
|
297
|
+
const r = () => {
|
|
298
|
+
o(a), i();
|
|
289
299
|
};
|
|
290
|
-
addEventListener("visibilitychange",
|
|
291
|
-
removeEventListener("visibilitychange",
|
|
292
|
-
}, { timeout:
|
|
293
|
-
}
|
|
294
|
-
}, R, U = (
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
const
|
|
298
|
-
let
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
for (const
|
|
306
|
-
const
|
|
307
|
-
for (const
|
|
308
|
-
|
|
300
|
+
addEventListener("visibilitychange", r, { once: true, capture: true }), a = e(() => {
|
|
301
|
+
removeEventListener("visibilitychange", r, { capture: true }), i();
|
|
302
|
+
}, { timeout: n });
|
|
303
|
+
}
|
|
304
|
+
}, R, U = (t, n = {}) => {
|
|
305
|
+
const o = r(n = Object.assign({}, n), W);
|
|
306
|
+
let a = [], s = [], u = 0;
|
|
307
|
+
const d = new WeakMap, h = new WeakMap;
|
|
308
|
+
let g = false;
|
|
309
|
+
const v = () => {
|
|
310
|
+
g || (x(p), g = true);
|
|
311
|
+
}, p = () => {
|
|
312
|
+
const t = new Set(o.h.map((t) => d.get(t.entries[0]))), n = s.length - 10;
|
|
313
|
+
s = s.filter((e, o) => o >= n || t.has(e));
|
|
314
|
+
const e = new Set;
|
|
315
|
+
for (const t of s) {
|
|
316
|
+
const n = T(t.startTime, t.processingEnd);
|
|
317
|
+
for (const t of n)
|
|
318
|
+
e.add(t);
|
|
309
319
|
}
|
|
310
|
-
|
|
320
|
+
a = a.filter((t) => t.startTime > u || e.has(t)), g = false;
|
|
311
321
|
};
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
let
|
|
315
|
-
|
|
316
|
-
for (let
|
|
317
|
-
const
|
|
318
|
-
if (Math.abs(
|
|
319
|
-
|
|
322
|
+
o.p = (t) => {
|
|
323
|
+
const e = t.startTime + t.duration;
|
|
324
|
+
let o;
|
|
325
|
+
u = Math.max(u, t.processingEnd);
|
|
326
|
+
for (let i = s.length - 1;i >= 0; i--) {
|
|
327
|
+
const a = s[i];
|
|
328
|
+
if (Math.abs(e - a.renderTime) <= 8) {
|
|
329
|
+
o = a, o.startTime = Math.min(t.startTime, o.startTime), o.processingStart = Math.min(t.processingStart, o.processingStart), o.processingEnd = Math.max(t.processingEnd, o.processingEnd), n.includeProcessedEventEntries && o.entries.push(t);
|
|
320
330
|
break;
|
|
321
331
|
}
|
|
322
332
|
}
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
if (!
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
const
|
|
329
|
-
|
|
333
|
+
o || (o = { startTime: t.startTime, processingStart: t.processingStart, processingEnd: t.processingEnd, renderTime: e, entries: n.includeProcessedEventEntries ? [t] : [] }, s.push(o)), (t.interactionId || t.entryType === "first-input") && d.set(t, o), v();
|
|
334
|
+
}, o.m = (t) => {
|
|
335
|
+
if (!h.get(t)) {
|
|
336
|
+
const e = t.entries.find((t) => t.target)?.target;
|
|
337
|
+
if (e) {
|
|
338
|
+
const o = n.generateTarget?.(e) ?? i(e);
|
|
339
|
+
h.set(t, o);
|
|
330
340
|
} else {
|
|
331
|
-
const
|
|
332
|
-
|
|
341
|
+
const n = t.entries.find((t) => t.targetSelector)?.targetSelector;
|
|
342
|
+
n && h.set(t, n);
|
|
333
343
|
}
|
|
334
344
|
}
|
|
335
345
|
};
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
for (const
|
|
339
|
-
if (!(
|
|
340
|
-
if (
|
|
346
|
+
const T = (t, n) => {
|
|
347
|
+
const e = [];
|
|
348
|
+
for (const o of a)
|
|
349
|
+
if (!(o.startTime + o.duration < t)) {
|
|
350
|
+
if (o.startTime > n)
|
|
341
351
|
break;
|
|
342
|
-
|
|
352
|
+
e.push(o);
|
|
343
353
|
}
|
|
344
|
-
return
|
|
345
|
-
},
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
return Object.assign(
|
|
354
|
+
return e;
|
|
355
|
+
}, E = (t) => {
|
|
356
|
+
if (t.entries.length === 0) {
|
|
357
|
+
const n = t.navigationStartTime || 0, o = { processedEventEntries: [], longAnimationFrameEntries: [], inputDelay: 0, processingDuration: 0, presentationDelay: t.value, loadState: e(n) };
|
|
358
|
+
return Object.assign(t, { attribution: o });
|
|
349
359
|
}
|
|
350
|
-
const
|
|
351
|
-
return ((
|
|
352
|
-
const { interactionTime:
|
|
353
|
-
if (!
|
|
360
|
+
const n = t.entries[0], i = d.get(n), a = i.processingStart, r = Math.max(n.startTime + n.duration, a), s = Math.min(i.processingEnd, r), c = i.entries.sort((t, n) => t.processingStart - n.processingStart), f = T(n.startTime, s), l = o.v.get(n.interactionId), u = { interactionTarget: h.get(l), interactionType: n.name.startsWith("key") ? "keyboard" : "pointer", interactionTime: n.startTime, nextPaintTime: r, processedEventEntries: c, longAnimationFrameEntries: f, inputDelay: a - n.startTime, processingDuration: s - a, presentationDelay: r - s, loadState: e(n.startTime), longestScript: undefined, totalScriptDuration: undefined, totalStyleAndLayoutDuration: undefined, totalPaintDuration: undefined, totalUnattributedDuration: undefined };
|
|
361
|
+
return ((t) => {
|
|
362
|
+
const { interactionTime: n, nextPaintTime: e } = t;
|
|
363
|
+
if (!t.longAnimationFrameEntries?.length || !n || !e)
|
|
354
364
|
return;
|
|
355
|
-
const { inputDelay:
|
|
356
|
-
let
|
|
357
|
-
for (const
|
|
358
|
-
|
|
359
|
-
for (const
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
365
|
+
const { inputDelay: o, processingDuration: i } = t;
|
|
366
|
+
let a, r, s = 0, c = 0, f = 0, l = 0;
|
|
367
|
+
for (const e of t.longAnimationFrameEntries) {
|
|
368
|
+
c = c + e.startTime + e.duration - e.styleAndLayoutStart;
|
|
369
|
+
for (const t of e.scripts) {
|
|
370
|
+
const e = t.startTime + t.duration;
|
|
371
|
+
if (e < n)
|
|
362
372
|
continue;
|
|
363
|
-
const
|
|
364
|
-
|
|
373
|
+
const f = e - Math.max(n, t.startTime), u = t.duration ? f / t.duration * t.forcedStyleAndLayoutDuration : 0;
|
|
374
|
+
s += f - u, c += u, f > l && (r = t.startTime < n + o ? "input-delay" : t.startTime >= n + o + i ? "presentation-delay" : "processing-duration", a = t, l = f);
|
|
365
375
|
}
|
|
366
376
|
}
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
})(
|
|
377
|
+
const u = t.longAnimationFrameEntries.at(-1), d = u ? u.startTime + u.duration : 0;
|
|
378
|
+
d >= n + o + i && (f = e - d), a && r && (t.longestScript = { entry: a, subpart: r, intersectingDuration: l }), t.totalScriptDuration = s, t.totalStyleAndLayoutDuration = c, t.totalPaintDuration = f, t.totalUnattributedDuration = e - n - s - c - f;
|
|
379
|
+
})(u), Object.assign(t, { attribution: u });
|
|
370
380
|
};
|
|
371
|
-
b(["long-animation-frame"], (
|
|
372
|
-
|
|
373
|
-
},
|
|
381
|
+
b(["long-animation-frame"], (t) => {
|
|
382
|
+
a = a.concat(t), v();
|
|
383
|
+
}, n), ((t, n = {}) => {
|
|
374
384
|
if (!globalThis.PerformanceEventTiming || !("interactionId" in PerformanceEventTiming.prototype))
|
|
375
385
|
return;
|
|
376
|
-
const
|
|
386
|
+
const e = m();
|
|
377
387
|
w(() => {
|
|
378
388
|
q();
|
|
379
|
-
let
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
},
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
},
|
|
386
|
-
|
|
387
|
-
},
|
|
389
|
+
let o, i = y("INP");
|
|
390
|
+
const a = r(n, W), s = (e, r, s, c, f) => {
|
|
391
|
+
a.M(), i = y("INP", -1, e, r, s, c, f), o = l(t, i, R, n.reportAllChanges);
|
|
392
|
+
}, u = () => {
|
|
393
|
+
const t = a.T(i.navigationType);
|
|
394
|
+
t && t.D !== i.value && (i.value = t.D, i.entries = t.entries, o());
|
|
395
|
+
}, d = (t) => {
|
|
396
|
+
u(), o(true), s("soft-navigation", t.navigationId, t.interactionId, t.name, t.startTime);
|
|
397
|
+
}, h = (t, n = false) => {
|
|
388
398
|
x(() => {
|
|
389
|
-
for (const
|
|
390
|
-
|
|
391
|
-
|
|
399
|
+
for (const n of t)
|
|
400
|
+
n.entryType !== "soft-navigation" ? a.l(n) : d(n);
|
|
401
|
+
u(), n && o(true);
|
|
392
402
|
});
|
|
393
|
-
},
|
|
394
|
-
M(
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
403
|
+
}, g = ["event", "first-input"];
|
|
404
|
+
M(n) && g.push("soft-navigation");
|
|
405
|
+
const v = b(g, h, { ...n, durationThreshold: n.durationThreshold ?? 40 });
|
|
406
|
+
o = l(t, i, R, n.reportAllChanges), v && (e.onHidden(() => {
|
|
407
|
+
h(v.takeRecords(), true);
|
|
398
408
|
}), f(() => {
|
|
399
|
-
|
|
409
|
+
s("back-forward-cache", i.navigationId, i.navigationInteractionId, i.navigationURL, c());
|
|
400
410
|
}));
|
|
401
411
|
});
|
|
402
|
-
})((
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
}, H, V = (
|
|
406
|
-
const
|
|
407
|
-
M(
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
+
})((n) => {
|
|
413
|
+
t(E(n));
|
|
414
|
+
}, n);
|
|
415
|
+
}, H, V = (t, e = {}) => {
|
|
416
|
+
const o = r(e = Object.assign({}, e), $), a = new WeakMap;
|
|
417
|
+
M(e) && (o.u = new Map), o.p = (t) => {
|
|
418
|
+
const n = t.element;
|
|
419
|
+
if (n) {
|
|
420
|
+
const o = e.generateTarget?.(n) ?? i(n);
|
|
421
|
+
a.set(t, o);
|
|
412
422
|
} else
|
|
413
|
-
|
|
423
|
+
t.id && a.set(t, `#${t.id}`);
|
|
414
424
|
};
|
|
415
|
-
((
|
|
416
|
-
let
|
|
417
|
-
const
|
|
425
|
+
((t, n = {}) => {
|
|
426
|
+
let e = false;
|
|
427
|
+
const o = M(n);
|
|
418
428
|
w(() => {
|
|
419
|
-
let
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
},
|
|
427
|
-
|
|
428
|
-
for (const
|
|
429
|
-
if (!
|
|
429
|
+
let i, a = m(), s = y("LCP");
|
|
430
|
+
const h = r(n, $), g = (o, r, c, f, u) => {
|
|
431
|
+
s = y("LCP", -1, o, r, c, f, u), i = l(t, s, H, n.reportAllChanges), e = false, o === "soft-navigation" && (a = m(true));
|
|
432
|
+
}, v = (t) => {
|
|
433
|
+
h.u && t.navigationId && T(h.u, t), e || i(true), g("soft-navigation", t.navigationId, t.interactionId, t.name, t.startTime);
|
|
434
|
+
const n = t.getLargestInteractionContentfulPaint?.();
|
|
435
|
+
n && p([n]);
|
|
436
|
+
}, p = (t) => {
|
|
437
|
+
n.reportAllChanges || o || (t = t.slice(-1));
|
|
438
|
+
for (const n of t) {
|
|
439
|
+
if (!n)
|
|
430
440
|
continue;
|
|
431
|
-
if (
|
|
432
|
-
|
|
441
|
+
if (n.entryType === "soft-navigation") {
|
|
442
|
+
v(n);
|
|
433
443
|
continue;
|
|
434
444
|
}
|
|
435
|
-
let
|
|
436
|
-
if (
|
|
437
|
-
|
|
438
|
-
else if (
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
445
|
+
let t = 0, e = [], o = n.startTime;
|
|
446
|
+
if (n.entryType === "largest-contentful-paint")
|
|
447
|
+
t = Math.max(n.startTime - d(), 0), h.l(n), e = [n];
|
|
448
|
+
else if (n.entryType === "interaction-contentful-paint") {
|
|
449
|
+
const i = n;
|
|
450
|
+
if (!s.navigationId)
|
|
441
451
|
continue;
|
|
442
|
-
if ("interactionId" in
|
|
452
|
+
if ("interactionId" in i && i.interactionId != s.navigationInteractionId)
|
|
443
453
|
continue;
|
|
444
|
-
|
|
454
|
+
o = i.largestContentfulPaint?.renderTime || 0, t = Math.max(o - n.startTime, 0), i.largestContentfulPaint && (h.l(i.largestContentfulPaint), e = [i.largestContentfulPaint]);
|
|
445
455
|
}
|
|
446
|
-
|
|
456
|
+
o < a.firstHiddenTime && (s.value = t, s.entries = e, i());
|
|
447
457
|
}
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
if (
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
458
|
+
}, M = ["largest-contentful-paint"];
|
|
459
|
+
o && M.push("interaction-contentful-paint", "soft-navigation");
|
|
460
|
+
const E = b(M, p);
|
|
461
|
+
if (E) {
|
|
462
|
+
i = l(t, s, H, n.reportAllChanges);
|
|
463
|
+
const a = ["keydown", "click", "visibilitychange"], r = (t) => {
|
|
464
|
+
if (t.isTrusted && !e) {
|
|
465
|
+
const t = s.id;
|
|
456
466
|
x(() => {
|
|
457
|
-
if (!
|
|
458
|
-
if (!
|
|
459
|
-
|
|
460
|
-
for (const
|
|
461
|
-
removeEventListener(
|
|
467
|
+
if (!e) {
|
|
468
|
+
if (!o) {
|
|
469
|
+
E.disconnect();
|
|
470
|
+
for (const t of a)
|
|
471
|
+
removeEventListener(t, r, { capture: true });
|
|
462
472
|
}
|
|
463
|
-
|
|
473
|
+
t === s.id && (e = true, i(true));
|
|
464
474
|
}
|
|
465
475
|
});
|
|
466
476
|
}
|
|
467
477
|
};
|
|
468
|
-
for (const
|
|
469
|
-
addEventListener(
|
|
470
|
-
f((
|
|
471
|
-
|
|
472
|
-
|
|
478
|
+
for (const t of a)
|
|
479
|
+
addEventListener(t, r, { capture: true });
|
|
480
|
+
f((o) => {
|
|
481
|
+
g("back-forward-cache", s.navigationId, s.navigationInteractionId, s.navigationURL, c()), i = l(t, s, H, n.reportAllChanges), u(() => {
|
|
482
|
+
s.value = performance.now() - o.timeStamp, e = true, i(true);
|
|
473
483
|
});
|
|
474
484
|
});
|
|
475
485
|
}
|
|
476
486
|
});
|
|
477
|
-
})((
|
|
478
|
-
|
|
479
|
-
let
|
|
480
|
-
if (
|
|
481
|
-
const
|
|
482
|
-
let
|
|
483
|
-
|
|
484
|
-
let
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
|
|
487
|
+
})((e) => {
|
|
488
|
+
t(((t) => {
|
|
489
|
+
let e = { timeToFirstByte: 0, resourceLoadDelay: 0, resourceLoadDuration: 0, elementRenderDelay: t.value };
|
|
490
|
+
if (t.entries.length) {
|
|
491
|
+
const i = t.entries.at(-1), r = i.url && performance.getEntriesByType("resource").find((t) => t.name === i.url);
|
|
492
|
+
let s;
|
|
493
|
+
e.target = a.get(i), e.lcpEntry = i, i.url && (e.url = i.url), r && (e.lcpResourceEntry = r);
|
|
494
|
+
let c = 0, f = 0;
|
|
495
|
+
if (t.navigationType !== "soft-navigation" ? (s = n(), c = s?.activationStart ?? 0, f = s?.responseStart ?? 0) : (c = t.navigationStartTime || 0, s = o.u?.get(t.navigationId)), s) {
|
|
496
|
+
const n = Math.max(0, f - c), o = Math.max(n, r ? (r.requestStart || r.startTime) - c : 0), i = Math.min(t.value, Math.max(o, r ? r.responseEnd - c : 0));
|
|
497
|
+
e = { ...e, timeToFirstByte: n, resourceLoadDelay: o - n, resourceLoadDuration: i - o, elementRenderDelay: t.value - i, navigationEntry: s };
|
|
488
498
|
}
|
|
489
499
|
}
|
|
490
|
-
return Object.assign(
|
|
491
|
-
})(
|
|
492
|
-
},
|
|
493
|
-
}, z, G = (
|
|
494
|
-
document.prerendering ? w(() => G(
|
|
495
|
-
}, J = (
|
|
496
|
-
((
|
|
497
|
-
const
|
|
498
|
-
let
|
|
500
|
+
return Object.assign(t, { attribution: e });
|
|
501
|
+
})(e));
|
|
502
|
+
}, e);
|
|
503
|
+
}, z, G = (t) => {
|
|
504
|
+
document.prerendering ? w(() => G(t)) : document.readyState !== "complete" ? addEventListener("load", () => G(t), true) : setTimeout(t);
|
|
505
|
+
}, J = (t, e = {}) => {
|
|
506
|
+
((t, e = {}) => {
|
|
507
|
+
const o = M(e);
|
|
508
|
+
let i = y("TTFB"), a = l(t, i, z, e.reportAllChanges);
|
|
499
509
|
G(() => {
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}),
|
|
506
|
-
|
|
507
|
-
|
|
510
|
+
const r = n();
|
|
511
|
+
if (r) {
|
|
512
|
+
const n = r.responseStart;
|
|
513
|
+
i.value = Math.max(n - d(), 0), i.entries = [r], a(true), f(() => {
|
|
514
|
+
i = y("TTFB", 0, "back-forward-cache", i.navigationId, i.navigationInteractionId, i.navigationURL, c()), a = l(t, i, z, e.reportAllChanges), a(true);
|
|
515
|
+
}), o && b(["soft-navigation"], (n) => {
|
|
516
|
+
n.forEach((n) => {
|
|
517
|
+
n.navigationId && (i = y("TTFB", 0, "soft-navigation", n.navigationId, n.interactionId, n.name, n.startTime), i.entries = [n], a = l(t, i, z, e.reportAllChanges), a(true));
|
|
508
518
|
});
|
|
509
|
-
},
|
|
519
|
+
}, e);
|
|
510
520
|
}
|
|
511
521
|
});
|
|
512
|
-
})((
|
|
513
|
-
|
|
514
|
-
const
|
|
515
|
-
let
|
|
516
|
-
if (
|
|
517
|
-
const
|
|
518
|
-
|
|
522
|
+
})((n) => {
|
|
523
|
+
t(((t) => {
|
|
524
|
+
const n = t.entries[0];
|
|
525
|
+
let e = { waitingDuration: 0, cacheDuration: 0, dnsDuration: 0, connectionDuration: 0, requestDuration: 0, navigationEntry: n };
|
|
526
|
+
if (t.entries.length && n instanceof PerformanceNavigationTiming) {
|
|
527
|
+
const o = n.activationStart || 0, i = Math.max((n.workerStart || n.fetchStart || 0) - o, 0), a = Math.max(n.domainLookupStart - o, 0), r = Math.max(n.connectStart - o, 0), s = Math.max(n.connectEnd - o, 0);
|
|
528
|
+
e = { waitingDuration: i, cacheDuration: a - i, dnsDuration: r - a, connectionDuration: s - r, requestDuration: t.value - s, navigationEntry: n };
|
|
519
529
|
}
|
|
520
|
-
return Object.assign(
|
|
521
|
-
})(
|
|
522
|
-
},
|
|
530
|
+
return Object.assign(t, { attribution: e });
|
|
531
|
+
})(n));
|
|
532
|
+
}, e);
|
|
523
533
|
};
|
|
524
534
|
var init_web_vitals_attribution = __esm(() => {
|
|
525
535
|
a = new WeakMap;
|
|
@@ -532,361 +542,103 @@ var init_web_vitals_attribution = __esm(() => {
|
|
|
532
542
|
z = [800, 1800];
|
|
533
543
|
});
|
|
534
544
|
|
|
535
|
-
// src/mobile/
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
var
|
|
541
|
-
var
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
[data-absolute-navigation-stack] {
|
|
562
|
-
view-transition-name: absolute-mobile-stack;
|
|
563
|
-
}
|
|
564
|
-
[data-absolute-tab-bar] {
|
|
565
|
-
display: flex;
|
|
566
|
-
align-items: stretch;
|
|
567
|
-
justify-content: space-around;
|
|
568
|
-
box-sizing: border-box;
|
|
569
|
-
padding-bottom: var(--absolute-safe-area-inset-bottom, 0px);
|
|
570
|
-
background: Canvas;
|
|
571
|
-
color: CanvasText;
|
|
572
|
-
}
|
|
573
|
-
[data-absolute-tab-bar] > a {
|
|
574
|
-
display: grid;
|
|
575
|
-
flex: 1 1 0;
|
|
576
|
-
min-width: 0;
|
|
577
|
-
min-height: 2.75rem;
|
|
578
|
-
place-items: center;
|
|
579
|
-
padding: 0.375rem 0.5rem;
|
|
580
|
-
color: inherit;
|
|
581
|
-
text-align: center;
|
|
582
|
-
text-decoration: none;
|
|
583
|
-
touch-action: manipulation;
|
|
584
|
-
}
|
|
585
|
-
[data-absolute-tab-bar] > a[aria-current="page"] {
|
|
586
|
-
font-weight: 700;
|
|
587
|
-
}
|
|
588
|
-
dialog[data-absolute-sheet] {
|
|
589
|
-
box-sizing: border-box;
|
|
590
|
-
width: min(100%, var(--absolute-sheet-max-width, 42rem));
|
|
591
|
-
max-height: min(90dvh, var(--absolute-available-height, 90dvh));
|
|
592
|
-
margin: auto auto 0;
|
|
593
|
-
padding: 1rem max(1rem, var(--absolute-safe-area-inset-right, 0px)) max(1rem, var(--absolute-safe-area-inset-bottom, 0px)) max(1rem, var(--absolute-safe-area-inset-left, 0px));
|
|
594
|
-
overflow: auto;
|
|
595
|
-
border: 1px solid color-mix(in srgb, CanvasText 18%, transparent);
|
|
596
|
-
border-radius: 1rem 1rem 0 0;
|
|
597
|
-
background: Canvas;
|
|
598
|
-
color: CanvasText;
|
|
599
|
-
box-shadow: 0 -0.5rem 2rem color-mix(in srgb, CanvasText 18%, transparent);
|
|
600
|
-
}
|
|
601
|
-
dialog[data-absolute-sheet]::backdrop {
|
|
602
|
-
background: color-mix(in srgb, CanvasText 38%, transparent);
|
|
603
|
-
}
|
|
604
|
-
@keyframes absolute-mobile-forward-old { to { opacity: 0; transform: translateX(-12%); } }
|
|
605
|
-
@keyframes absolute-mobile-forward-new { from { opacity: 0; transform: translateX(12%); } }
|
|
606
|
-
@keyframes absolute-mobile-back-old { to { opacity: 0; transform: translateX(12%); } }
|
|
607
|
-
@keyframes absolute-mobile-back-new { from { opacity: 0; transform: translateX(-12%); } }
|
|
608
|
-
html[data-absolute-navigation-direction="forward"]::view-transition-old(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-forward-old; }
|
|
609
|
-
html[data-absolute-navigation-direction="forward"]::view-transition-new(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-forward-new; }
|
|
610
|
-
html[data-absolute-navigation-direction="back"]::view-transition-old(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-back-old; }
|
|
611
|
-
html[data-absolute-navigation-direction="back"]::view-transition-new(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-back-new; }
|
|
612
|
-
html[data-absolute-reduced-motion="reduce"]::view-transition-old(absolute-mobile-stack),
|
|
613
|
-
html[data-absolute-reduced-motion="reduce"]::view-transition-new(absolute-mobile-stack) { animation: none; }
|
|
614
|
-
`;
|
|
615
|
-
var currentPath = () => `${location.pathname}${location.search}${location.hash}`;
|
|
616
|
-
var ensureStyle = () => {
|
|
617
|
-
let style = document.getElementById(STYLE_ID);
|
|
618
|
-
if (!(style instanceof HTMLStyleElement)) {
|
|
619
|
-
style = document.createElement("style");
|
|
620
|
-
style.id = STYLE_ID;
|
|
621
|
-
style.textContent = UI_STYLE;
|
|
622
|
-
document.head.append(style);
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
var sheetById = (id) => {
|
|
626
|
-
const target = document.getElementById(id);
|
|
627
|
-
return target instanceof HTMLDialogElement && target.dataset.absoluteSheet !== undefined ? target : undefined;
|
|
628
|
-
};
|
|
629
|
-
var dispatchSheet = (sheet, open) => dispatchEvent(new CustomEvent(SHEET_EVENT, {
|
|
630
|
-
detail: { id: sheet.id, open }
|
|
631
|
-
}));
|
|
632
|
-
var focusSheet = (sheet) => {
|
|
633
|
-
const target = sheet.querySelector('[autofocus], button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
634
|
-
(target ?? sheet).focus();
|
|
635
|
-
};
|
|
636
|
-
var sheetOpeners = new WeakMap;
|
|
637
|
-
var closeAbsoluteMobileSheet = (target) => {
|
|
638
|
-
const sheet = typeof target === "string" ? sheetById(target) : target;
|
|
639
|
-
if (!sheet || !sheet.open)
|
|
640
|
-
return false;
|
|
641
|
-
if (typeof sheet.close === "function")
|
|
642
|
-
sheet.close();
|
|
643
|
-
else
|
|
644
|
-
sheet.removeAttribute("open");
|
|
645
|
-
sheet.removeAttribute("aria-modal");
|
|
646
|
-
sheetOpeners.get(sheet)?.focus();
|
|
647
|
-
sheetOpeners.delete(sheet);
|
|
648
|
-
dispatchSheet(sheet, false);
|
|
649
|
-
return true;
|
|
545
|
+
// src/mobile/shellBootstrap.ts
|
|
546
|
+
import { App } from "@capacitor/app";
|
|
547
|
+
import { Browser } from "@capacitor/browser";
|
|
548
|
+
|
|
549
|
+
// src/mobile/producerContextState.ts
|
|
550
|
+
var ABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY = Symbol.for("absolutejs.mobileProducerAsyncLocalStorage");
|
|
551
|
+
var frameworks = new Set([
|
|
552
|
+
"angular",
|
|
553
|
+
"ember",
|
|
554
|
+
"html",
|
|
555
|
+
"htmx",
|
|
556
|
+
"react",
|
|
557
|
+
"svelte",
|
|
558
|
+
"vue"
|
|
559
|
+
]);
|
|
560
|
+
|
|
561
|
+
// src/mobile/pageProtocol.ts
|
|
562
|
+
var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json";
|
|
563
|
+
var ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1;
|
|
564
|
+
var MOBILE_PAGE_REQUEST_HEADERS = {
|
|
565
|
+
appBuild: "x-absolute-mobile-app-build",
|
|
566
|
+
pageBundle: "x-absolute-mobile-page-bundle",
|
|
567
|
+
pageContracts: "x-absolute-mobile-page-contracts",
|
|
568
|
+
pageId: "x-absolute-mobile-page-id",
|
|
569
|
+
protocol: "x-absolute-mobile-protocol",
|
|
570
|
+
runtime: "x-absolute-mobile-runtime"
|
|
650
571
|
};
|
|
651
|
-
var
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
572
|
+
var headerVaryValues = [
|
|
573
|
+
"Accept",
|
|
574
|
+
MOBILE_PAGE_REQUEST_HEADERS.protocol,
|
|
575
|
+
MOBILE_PAGE_REQUEST_HEADERS.runtime,
|
|
576
|
+
MOBILE_PAGE_REQUEST_HEADERS.appBuild,
|
|
577
|
+
MOBILE_PAGE_REQUEST_HEADERS.pageBundle,
|
|
578
|
+
MOBILE_PAGE_REQUEST_HEADERS.pageContracts,
|
|
579
|
+
MOBILE_PAGE_REQUEST_HEADERS.pageId
|
|
580
|
+
];
|
|
581
|
+
|
|
582
|
+
// src/mobile/client.ts
|
|
583
|
+
class AbsoluteMobilePageProtocolError extends Error {
|
|
584
|
+
constructor(code, message) {
|
|
585
|
+
super(message);
|
|
586
|
+
this.name = "AbsoluteMobilePageProtocolError";
|
|
587
|
+
this.code = code;
|
|
665
588
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
if (mode === "back")
|
|
674
|
-
return { kind: "back" };
|
|
675
|
-
if (mode === "external")
|
|
676
|
-
return { kind: "external" };
|
|
677
|
-
return { kind: "navigate", replace: mode === "replace" };
|
|
589
|
+
}
|
|
590
|
+
var disposeAbsoluteMobilePage = async (target = window) => {
|
|
591
|
+
const dispose = target.__ABSOLUTE_PAGE_DISPOSE__;
|
|
592
|
+
target.__ABSOLUTE_PAGE_DISPOSE__ = undefined;
|
|
593
|
+
target.__ABSOLUTE_PAGE_READY__ = undefined;
|
|
594
|
+
if (dispose)
|
|
595
|
+
await dispose();
|
|
678
596
|
};
|
|
679
|
-
var
|
|
680
|
-
|
|
681
|
-
|
|
597
|
+
var frameworks2 = new Set([
|
|
598
|
+
"angular",
|
|
599
|
+
"ember",
|
|
600
|
+
"html",
|
|
601
|
+
"htmx",
|
|
602
|
+
"react",
|
|
603
|
+
"svelte",
|
|
604
|
+
"vue"
|
|
605
|
+
]);
|
|
606
|
+
var upgradeReasons = new Set([
|
|
607
|
+
"app-release",
|
|
608
|
+
"page-contract",
|
|
609
|
+
"protocol",
|
|
610
|
+
"runtime"
|
|
611
|
+
]);
|
|
612
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
613
|
+
var isFramework = (value) => typeof value === "string" && frameworks2.has(value);
|
|
614
|
+
var isUpgradeReason = (value) => typeof value === "string" && upgradeReasons.has(value);
|
|
615
|
+
var parsePageResult = (value) => {
|
|
616
|
+
if (typeof value.contract !== "string" || !isFramework(value.framework) || typeof value.pageId !== "string" || typeof value.status !== "number") {
|
|
617
|
+
throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The mobile page response is missing required page metadata.");
|
|
618
|
+
}
|
|
619
|
+
if (!isRecord(value.props)) {
|
|
620
|
+
throw new AbsoluteMobilePageProtocolError("invalid-props", "The mobile page response must contain an object props value.");
|
|
621
|
+
}
|
|
622
|
+
return {
|
|
623
|
+
contract: value.contract,
|
|
624
|
+
framework: value.framework,
|
|
625
|
+
kind: "page",
|
|
626
|
+
pageId: value.pageId,
|
|
627
|
+
props: value.props,
|
|
628
|
+
status: value.status
|
|
629
|
+
};
|
|
682
630
|
};
|
|
683
|
-
var
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
} catch {
|
|
687
|
-
return;
|
|
631
|
+
var parseUpgradeResult = (value) => {
|
|
632
|
+
if (typeof value.pageId !== "string" || !isUpgradeReason(value.reason)) {
|
|
633
|
+
throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The update response is missing its page or reason.");
|
|
688
634
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
const prefix = anchor.dataset.absoluteTabMatch === "prefix";
|
|
697
|
-
const active = candidate !== undefined && (prefix ? activePath === candidate || candidate !== "/" && activePath.startsWith(`${candidate}/`) : activePath === candidate);
|
|
698
|
-
if (active)
|
|
699
|
-
anchor.setAttribute("aria-current", "page");
|
|
700
|
-
else
|
|
701
|
-
anchor.removeAttribute("aria-current");
|
|
702
|
-
});
|
|
703
|
-
};
|
|
704
|
-
var installAbsoluteMobileUiPrimitives = () => {
|
|
705
|
-
let disposed = false;
|
|
706
|
-
let scheduled = false;
|
|
707
|
-
let path = currentPath();
|
|
708
|
-
const refreshDocument = (nextPath = path) => {
|
|
709
|
-
if (disposed || !document.head || !document.body)
|
|
710
|
-
return;
|
|
711
|
-
path = nextPath;
|
|
712
|
-
ensureStyle();
|
|
713
|
-
syncTabLinks(path);
|
|
714
|
-
};
|
|
715
|
-
const scheduleRefresh = () => {
|
|
716
|
-
if (scheduled || disposed)
|
|
717
|
-
return;
|
|
718
|
-
scheduled = true;
|
|
719
|
-
queueMicrotask(() => {
|
|
720
|
-
scheduled = false;
|
|
721
|
-
refreshDocument();
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
const handleClick = (event) => {
|
|
725
|
-
if (!(event.target instanceof Element))
|
|
726
|
-
return;
|
|
727
|
-
const opener = event.target.closest("[data-absolute-sheet-open]");
|
|
728
|
-
if (opener?.dataset.absoluteSheetOpen) {
|
|
729
|
-
if (openAbsoluteMobileSheet(opener.dataset.absoluteSheetOpen, opener))
|
|
730
|
-
event.preventDefault();
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
const closer = event.target.closest("[data-absolute-sheet-close]");
|
|
734
|
-
const sheet = closer?.closest("dialog[data-absolute-sheet]");
|
|
735
|
-
if (sheet && closeAbsoluteMobileSheet(sheet)) {
|
|
736
|
-
event.preventDefault();
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
if (event.target instanceof HTMLDialogElement && event.target.dataset.absoluteSheet !== undefined) {
|
|
740
|
-
const rect = event.target.getBoundingClientRect();
|
|
741
|
-
const outside = event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
|
|
742
|
-
if (outside && closeAbsoluteMobileSheet(event.target))
|
|
743
|
-
event.preventDefault();
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
const handleCancel = (event) => {
|
|
747
|
-
if (!(event.target instanceof HTMLDialogElement))
|
|
748
|
-
return;
|
|
749
|
-
if (event.target.dataset.absoluteSheet === undefined)
|
|
750
|
-
return;
|
|
751
|
-
event.preventDefault();
|
|
752
|
-
closeAbsoluteMobileSheet(event.target);
|
|
753
|
-
};
|
|
754
|
-
const handleBack = (event) => {
|
|
755
|
-
const active = document.querySelector(ACTIVE_SHEET_SELECTOR);
|
|
756
|
-
if (!active)
|
|
757
|
-
return;
|
|
758
|
-
event.preventDefault();
|
|
759
|
-
closeAbsoluteMobileSheet(active);
|
|
760
|
-
};
|
|
761
|
-
const observer = new MutationObserver(scheduleRefresh);
|
|
762
|
-
observer.observe(document.documentElement, {
|
|
763
|
-
childList: true,
|
|
764
|
-
subtree: true
|
|
765
|
-
});
|
|
766
|
-
addEventListener("click", handleClick);
|
|
767
|
-
addEventListener("cancel", handleCancel, true);
|
|
768
|
-
addEventListener(BACK_EVENT, handleBack);
|
|
769
|
-
refreshDocument();
|
|
770
|
-
return {
|
|
771
|
-
refreshDocument,
|
|
772
|
-
requestBack: requestAbsoluteMobileBack,
|
|
773
|
-
dispose: () => {
|
|
774
|
-
if (disposed)
|
|
775
|
-
return;
|
|
776
|
-
disposed = true;
|
|
777
|
-
observer.disconnect();
|
|
778
|
-
removeEventListener("click", handleClick);
|
|
779
|
-
removeEventListener("cancel", handleCancel, true);
|
|
780
|
-
removeEventListener(BACK_EVENT, handleBack);
|
|
781
|
-
},
|
|
782
|
-
navigate: (detail) => {
|
|
783
|
-
path = detail.to;
|
|
784
|
-
document.documentElement.dataset.absoluteNavigationDirection = detail.direction;
|
|
785
|
-
refreshDocument(path);
|
|
786
|
-
dispatchEvent(new CustomEvent(NAVIGATION_EVENT, {
|
|
787
|
-
detail
|
|
788
|
-
}));
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
// src/mobile/shellBootstrap.ts
|
|
794
|
-
import { App } from "@capacitor/app";
|
|
795
|
-
import { Browser } from "@capacitor/browser";
|
|
796
|
-
|
|
797
|
-
// src/mobile/producerContextState.ts
|
|
798
|
-
var ABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY = Symbol.for("absolutejs.mobileProducerAsyncLocalStorage");
|
|
799
|
-
var frameworks = new Set([
|
|
800
|
-
"angular",
|
|
801
|
-
"ember",
|
|
802
|
-
"html",
|
|
803
|
-
"htmx",
|
|
804
|
-
"react",
|
|
805
|
-
"svelte",
|
|
806
|
-
"vue"
|
|
807
|
-
]);
|
|
808
|
-
|
|
809
|
-
// src/mobile/pageProtocol.ts
|
|
810
|
-
var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json";
|
|
811
|
-
var ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1;
|
|
812
|
-
var MOBILE_PAGE_REQUEST_HEADERS = {
|
|
813
|
-
appBuild: "x-absolute-mobile-app-build",
|
|
814
|
-
pageBundle: "x-absolute-mobile-page-bundle",
|
|
815
|
-
pageContracts: "x-absolute-mobile-page-contracts",
|
|
816
|
-
pageId: "x-absolute-mobile-page-id",
|
|
817
|
-
protocol: "x-absolute-mobile-protocol",
|
|
818
|
-
runtime: "x-absolute-mobile-runtime"
|
|
819
|
-
};
|
|
820
|
-
var headerVaryValues = [
|
|
821
|
-
"Accept",
|
|
822
|
-
MOBILE_PAGE_REQUEST_HEADERS.protocol,
|
|
823
|
-
MOBILE_PAGE_REQUEST_HEADERS.runtime,
|
|
824
|
-
MOBILE_PAGE_REQUEST_HEADERS.appBuild,
|
|
825
|
-
MOBILE_PAGE_REQUEST_HEADERS.pageBundle,
|
|
826
|
-
MOBILE_PAGE_REQUEST_HEADERS.pageContracts,
|
|
827
|
-
MOBILE_PAGE_REQUEST_HEADERS.pageId
|
|
828
|
-
];
|
|
829
|
-
|
|
830
|
-
// src/mobile/client.ts
|
|
831
|
-
class AbsoluteMobilePageProtocolError extends Error {
|
|
832
|
-
constructor(code, message) {
|
|
833
|
-
super(message);
|
|
834
|
-
this.name = "AbsoluteMobilePageProtocolError";
|
|
835
|
-
this.code = code;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
var disposeAbsoluteMobilePage = async (target = window) => {
|
|
839
|
-
const dispose = target.__ABSOLUTE_PAGE_DISPOSE__;
|
|
840
|
-
target.__ABSOLUTE_PAGE_DISPOSE__ = undefined;
|
|
841
|
-
target.__ABSOLUTE_PAGE_READY__ = undefined;
|
|
842
|
-
if (dispose)
|
|
843
|
-
await dispose();
|
|
844
|
-
};
|
|
845
|
-
var frameworks2 = new Set([
|
|
846
|
-
"angular",
|
|
847
|
-
"ember",
|
|
848
|
-
"html",
|
|
849
|
-
"htmx",
|
|
850
|
-
"react",
|
|
851
|
-
"svelte",
|
|
852
|
-
"vue"
|
|
853
|
-
]);
|
|
854
|
-
var upgradeReasons = new Set([
|
|
855
|
-
"app-release",
|
|
856
|
-
"page-contract",
|
|
857
|
-
"protocol",
|
|
858
|
-
"runtime"
|
|
859
|
-
]);
|
|
860
|
-
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
861
|
-
var isFramework = (value) => typeof value === "string" && frameworks2.has(value);
|
|
862
|
-
var isUpgradeReason = (value) => typeof value === "string" && upgradeReasons.has(value);
|
|
863
|
-
var parsePageResult = (value) => {
|
|
864
|
-
if (typeof value.contract !== "string" || !isFramework(value.framework) || typeof value.pageId !== "string" || typeof value.status !== "number") {
|
|
865
|
-
throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The mobile page response is missing required page metadata.");
|
|
866
|
-
}
|
|
867
|
-
if (!isRecord(value.props)) {
|
|
868
|
-
throw new AbsoluteMobilePageProtocolError("invalid-props", "The mobile page response must contain an object props value.");
|
|
869
|
-
}
|
|
870
|
-
return {
|
|
871
|
-
contract: value.contract,
|
|
872
|
-
framework: value.framework,
|
|
873
|
-
kind: "page",
|
|
874
|
-
pageId: value.pageId,
|
|
875
|
-
props: value.props,
|
|
876
|
-
status: value.status
|
|
877
|
-
};
|
|
878
|
-
};
|
|
879
|
-
var parseUpgradeResult = (value) => {
|
|
880
|
-
if (typeof value.pageId !== "string" || !isUpgradeReason(value.reason)) {
|
|
881
|
-
throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The update response is missing its page or reason.");
|
|
882
|
-
}
|
|
883
|
-
return {
|
|
884
|
-
kind: "upgrade-required",
|
|
885
|
-
pageId: value.pageId,
|
|
886
|
-
reason: value.reason,
|
|
887
|
-
supportedContracts: Array.isArray(value.supportedContracts) ? value.supportedContracts.filter((contract) => typeof contract === "string") : undefined,
|
|
888
|
-
supportedRuntimes: Array.isArray(value.supportedRuntimes) ? value.supportedRuntimes.filter((runtime) => typeof runtime === "string") : undefined
|
|
889
|
-
};
|
|
635
|
+
return {
|
|
636
|
+
kind: "upgrade-required",
|
|
637
|
+
pageId: value.pageId,
|
|
638
|
+
reason: value.reason,
|
|
639
|
+
supportedContracts: Array.isArray(value.supportedContracts) ? value.supportedContracts.filter((contract) => typeof contract === "string") : undefined,
|
|
640
|
+
supportedRuntimes: Array.isArray(value.supportedRuntimes) ? value.supportedRuntimes.filter((runtime) => typeof runtime === "string") : undefined
|
|
641
|
+
};
|
|
890
642
|
};
|
|
891
643
|
var activateAbsoluteMobilePage = async (value, options) => {
|
|
892
644
|
const envelope = parseAbsoluteMobilePageEnvelope(value);
|
|
@@ -1440,7 +1192,7 @@ import {
|
|
|
1440
1192
|
platform,
|
|
1441
1193
|
systemBars
|
|
1442
1194
|
} from "@absolutejs/devices";
|
|
1443
|
-
var
|
|
1195
|
+
var STYLE_ID = "absolute-mobile-adaptive-shell";
|
|
1444
1196
|
var ANNOUNCER_ID = "absolute-mobile-announcer";
|
|
1445
1197
|
var HOST_METRICS_EVENT = "absolute:native-host-metrics";
|
|
1446
1198
|
var STATUS_STYLE = `
|
|
@@ -1488,11 +1240,11 @@ var viewportSize = () => ({
|
|
|
1488
1240
|
width: finitePixels(globalThis.visualViewport?.width ?? innerWidth)
|
|
1489
1241
|
});
|
|
1490
1242
|
var setPixels = (name, value) => document.documentElement.style.setProperty(name, `${finitePixels(value)}px`);
|
|
1491
|
-
var
|
|
1492
|
-
let style = document.getElementById(
|
|
1243
|
+
var ensureStyle = () => {
|
|
1244
|
+
let style = document.getElementById(STYLE_ID);
|
|
1493
1245
|
if (!(style instanceof HTMLStyleElement)) {
|
|
1494
1246
|
style = document.createElement("style");
|
|
1495
|
-
style.id =
|
|
1247
|
+
style.id = STYLE_ID;
|
|
1496
1248
|
style.textContent = STATUS_STYLE;
|
|
1497
1249
|
document.head.append(style);
|
|
1498
1250
|
}
|
|
@@ -1570,7 +1322,7 @@ var installAbsoluteMobileAdaptiveShell = async (devices = defaultDevices) => {
|
|
|
1570
1322
|
if (disposed || !document.head || !document.body)
|
|
1571
1323
|
return;
|
|
1572
1324
|
ensureViewport();
|
|
1573
|
-
|
|
1325
|
+
ensureStyle();
|
|
1574
1326
|
const root = document.documentElement;
|
|
1575
1327
|
const current = state();
|
|
1576
1328
|
root.dataset.absoluteMobile = "";
|
|
@@ -1681,6 +1433,264 @@ var installAbsoluteMobileAdaptiveShell = async (devices = defaultDevices) => {
|
|
|
1681
1433
|
};
|
|
1682
1434
|
};
|
|
1683
1435
|
|
|
1436
|
+
// src/mobile/uiPrimitives.ts
|
|
1437
|
+
var STYLE_ID2 = "absolute-mobile-ui-primitives";
|
|
1438
|
+
var NAVIGATION_EVENT = "absolute:navigation-change";
|
|
1439
|
+
var SHEET_EVENT = "absolute:sheet-change";
|
|
1440
|
+
var BACK_EVENT = "absolute:back-request";
|
|
1441
|
+
var ACTIVE_SHEET_SELECTOR = "dialog[data-absolute-sheet][open]";
|
|
1442
|
+
var TAB_LINK_SELECTOR = "[data-absolute-tab-bar] a[href]";
|
|
1443
|
+
var UI_STYLE = `
|
|
1444
|
+
[data-absolute-app-shell] {
|
|
1445
|
+
display: grid;
|
|
1446
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1447
|
+
box-sizing: border-box;
|
|
1448
|
+
min-height: var(--absolute-available-height, 100dvh);
|
|
1449
|
+
padding-inline: var(--absolute-safe-area-inset-left, 0px) var(--absolute-safe-area-inset-right, 0px);
|
|
1450
|
+
}
|
|
1451
|
+
[data-absolute-app-header] {
|
|
1452
|
+
padding-top: var(--absolute-safe-area-inset-top, 0px);
|
|
1453
|
+
}
|
|
1454
|
+
[data-absolute-app-main], [data-absolute-navigation-stack] {
|
|
1455
|
+
min-width: 0;
|
|
1456
|
+
min-height: 0;
|
|
1457
|
+
}
|
|
1458
|
+
[data-absolute-app-main] {
|
|
1459
|
+
overflow: auto;
|
|
1460
|
+
overscroll-behavior-y: contain;
|
|
1461
|
+
}
|
|
1462
|
+
[data-absolute-navigation-stack] {
|
|
1463
|
+
view-transition-name: absolute-mobile-stack;
|
|
1464
|
+
}
|
|
1465
|
+
[data-absolute-tab-bar] {
|
|
1466
|
+
display: flex;
|
|
1467
|
+
align-items: stretch;
|
|
1468
|
+
justify-content: space-around;
|
|
1469
|
+
box-sizing: border-box;
|
|
1470
|
+
padding-bottom: var(--absolute-safe-area-inset-bottom, 0px);
|
|
1471
|
+
background: Canvas;
|
|
1472
|
+
color: CanvasText;
|
|
1473
|
+
}
|
|
1474
|
+
[data-absolute-tab-bar] > a {
|
|
1475
|
+
display: grid;
|
|
1476
|
+
flex: 1 1 0;
|
|
1477
|
+
min-width: 0;
|
|
1478
|
+
min-height: 2.75rem;
|
|
1479
|
+
place-items: center;
|
|
1480
|
+
padding: 0.375rem 0.5rem;
|
|
1481
|
+
color: inherit;
|
|
1482
|
+
text-align: center;
|
|
1483
|
+
text-decoration: none;
|
|
1484
|
+
touch-action: manipulation;
|
|
1485
|
+
}
|
|
1486
|
+
[data-absolute-tab-bar] > a[aria-current="page"] {
|
|
1487
|
+
font-weight: 700;
|
|
1488
|
+
}
|
|
1489
|
+
dialog[data-absolute-sheet] {
|
|
1490
|
+
box-sizing: border-box;
|
|
1491
|
+
width: min(100%, var(--absolute-sheet-max-width, 42rem));
|
|
1492
|
+
max-height: min(90dvh, var(--absolute-available-height, 90dvh));
|
|
1493
|
+
margin: auto auto 0;
|
|
1494
|
+
padding: 1rem max(1rem, var(--absolute-safe-area-inset-right, 0px)) max(1rem, var(--absolute-safe-area-inset-bottom, 0px)) max(1rem, var(--absolute-safe-area-inset-left, 0px));
|
|
1495
|
+
overflow: auto;
|
|
1496
|
+
border: 1px solid color-mix(in srgb, CanvasText 18%, transparent);
|
|
1497
|
+
border-radius: 1rem 1rem 0 0;
|
|
1498
|
+
background: Canvas;
|
|
1499
|
+
color: CanvasText;
|
|
1500
|
+
box-shadow: 0 -0.5rem 2rem color-mix(in srgb, CanvasText 18%, transparent);
|
|
1501
|
+
}
|
|
1502
|
+
dialog[data-absolute-sheet]::backdrop {
|
|
1503
|
+
background: color-mix(in srgb, CanvasText 38%, transparent);
|
|
1504
|
+
}
|
|
1505
|
+
@keyframes absolute-mobile-forward-old { to { opacity: 0; transform: translateX(-12%); } }
|
|
1506
|
+
@keyframes absolute-mobile-forward-new { from { opacity: 0; transform: translateX(12%); } }
|
|
1507
|
+
@keyframes absolute-mobile-back-old { to { opacity: 0; transform: translateX(12%); } }
|
|
1508
|
+
@keyframes absolute-mobile-back-new { from { opacity: 0; transform: translateX(-12%); } }
|
|
1509
|
+
html[data-absolute-navigation-direction="forward"]::view-transition-old(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-forward-old; }
|
|
1510
|
+
html[data-absolute-navigation-direction="forward"]::view-transition-new(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-forward-new; }
|
|
1511
|
+
html[data-absolute-navigation-direction="back"]::view-transition-old(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-back-old; }
|
|
1512
|
+
html[data-absolute-navigation-direction="back"]::view-transition-new(absolute-mobile-stack) { animation: 180ms ease both absolute-mobile-back-new; }
|
|
1513
|
+
html[data-absolute-reduced-motion="reduce"]::view-transition-old(absolute-mobile-stack),
|
|
1514
|
+
html[data-absolute-reduced-motion="reduce"]::view-transition-new(absolute-mobile-stack) { animation: none; }
|
|
1515
|
+
`;
|
|
1516
|
+
var currentPath = () => `${location.pathname}${location.search}${location.hash}`;
|
|
1517
|
+
var ensureStyle2 = () => {
|
|
1518
|
+
let style = document.getElementById(STYLE_ID2);
|
|
1519
|
+
if (!(style instanceof HTMLStyleElement)) {
|
|
1520
|
+
style = document.createElement("style");
|
|
1521
|
+
style.id = STYLE_ID2;
|
|
1522
|
+
style.textContent = UI_STYLE;
|
|
1523
|
+
document.head.append(style);
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
var sheetById = (id) => {
|
|
1527
|
+
const target = document.getElementById(id);
|
|
1528
|
+
return target instanceof HTMLDialogElement && target.dataset.absoluteSheet !== undefined ? target : undefined;
|
|
1529
|
+
};
|
|
1530
|
+
var dispatchSheet = (sheet, open) => dispatchEvent(new CustomEvent(SHEET_EVENT, {
|
|
1531
|
+
detail: { id: sheet.id, open }
|
|
1532
|
+
}));
|
|
1533
|
+
var focusSheet = (sheet) => {
|
|
1534
|
+
const target = sheet.querySelector('[autofocus], button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
1535
|
+
(target ?? sheet).focus();
|
|
1536
|
+
};
|
|
1537
|
+
var sheetOpeners = new WeakMap;
|
|
1538
|
+
var closeAbsoluteMobileSheet = (target) => {
|
|
1539
|
+
const sheet = typeof target === "string" ? sheetById(target) : target;
|
|
1540
|
+
if (!sheet || !sheet.open)
|
|
1541
|
+
return false;
|
|
1542
|
+
if (typeof sheet.close === "function")
|
|
1543
|
+
sheet.close();
|
|
1544
|
+
else
|
|
1545
|
+
sheet.removeAttribute("open");
|
|
1546
|
+
sheet.removeAttribute("aria-modal");
|
|
1547
|
+
sheetOpeners.get(sheet)?.focus();
|
|
1548
|
+
sheetOpeners.delete(sheet);
|
|
1549
|
+
dispatchSheet(sheet, false);
|
|
1550
|
+
return true;
|
|
1551
|
+
};
|
|
1552
|
+
var openAbsoluteMobileSheet = (target, opener) => {
|
|
1553
|
+
const sheet = typeof target === "string" ? sheetById(target) : target;
|
|
1554
|
+
if (!sheet || sheet.dataset.absoluteSheet === undefined)
|
|
1555
|
+
return false;
|
|
1556
|
+
const active = document.querySelector(ACTIVE_SHEET_SELECTOR);
|
|
1557
|
+
if (active && active !== sheet)
|
|
1558
|
+
closeAbsoluteMobileSheet(active);
|
|
1559
|
+
if (opener)
|
|
1560
|
+
sheetOpeners.set(sheet, opener);
|
|
1561
|
+
if (!sheet.open) {
|
|
1562
|
+
if (typeof sheet.showModal === "function")
|
|
1563
|
+
sheet.showModal();
|
|
1564
|
+
else
|
|
1565
|
+
sheet.setAttribute("open", "");
|
|
1566
|
+
}
|
|
1567
|
+
sheet.setAttribute("aria-modal", "true");
|
|
1568
|
+
focusSheet(sheet);
|
|
1569
|
+
dispatchSheet(sheet, true);
|
|
1570
|
+
return true;
|
|
1571
|
+
};
|
|
1572
|
+
var readAbsoluteMobileLinkIntent = (anchor) => {
|
|
1573
|
+
const mode = anchor.dataset.absoluteLink;
|
|
1574
|
+
if (mode === "back")
|
|
1575
|
+
return { kind: "back" };
|
|
1576
|
+
if (mode === "external")
|
|
1577
|
+
return { kind: "external" };
|
|
1578
|
+
return { kind: "navigate", replace: mode === "replace" };
|
|
1579
|
+
};
|
|
1580
|
+
var requestAbsoluteMobileBack = () => {
|
|
1581
|
+
const event = new CustomEvent(BACK_EVENT, { cancelable: true });
|
|
1582
|
+
return !dispatchEvent(event);
|
|
1583
|
+
};
|
|
1584
|
+
var normalizePathname = (value) => {
|
|
1585
|
+
try {
|
|
1586
|
+
return new URL(value, location.href).pathname.replace(/\/$/u, "") || "/";
|
|
1587
|
+
} catch {
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
var syncTabLinks = (path) => {
|
|
1592
|
+
const activePath = normalizePathname(path);
|
|
1593
|
+
if (!activePath)
|
|
1594
|
+
return;
|
|
1595
|
+
document.querySelectorAll(TAB_LINK_SELECTOR).forEach((anchor) => {
|
|
1596
|
+
const candidate = normalizePathname(anchor.href);
|
|
1597
|
+
const prefix = anchor.dataset.absoluteTabMatch === "prefix";
|
|
1598
|
+
const active = candidate !== undefined && (prefix ? activePath === candidate || candidate !== "/" && activePath.startsWith(`${candidate}/`) : activePath === candidate);
|
|
1599
|
+
if (active)
|
|
1600
|
+
anchor.setAttribute("aria-current", "page");
|
|
1601
|
+
else
|
|
1602
|
+
anchor.removeAttribute("aria-current");
|
|
1603
|
+
});
|
|
1604
|
+
};
|
|
1605
|
+
var installAbsoluteMobileUiPrimitives = () => {
|
|
1606
|
+
let disposed = false;
|
|
1607
|
+
let scheduled = false;
|
|
1608
|
+
let path = currentPath();
|
|
1609
|
+
const refreshDocument = (nextPath = path) => {
|
|
1610
|
+
if (disposed || !document.head || !document.body)
|
|
1611
|
+
return;
|
|
1612
|
+
path = nextPath;
|
|
1613
|
+
ensureStyle2();
|
|
1614
|
+
syncTabLinks(path);
|
|
1615
|
+
};
|
|
1616
|
+
const scheduleRefresh = () => {
|
|
1617
|
+
if (scheduled || disposed)
|
|
1618
|
+
return;
|
|
1619
|
+
scheduled = true;
|
|
1620
|
+
queueMicrotask(() => {
|
|
1621
|
+
scheduled = false;
|
|
1622
|
+
refreshDocument();
|
|
1623
|
+
});
|
|
1624
|
+
};
|
|
1625
|
+
const handleClick = (event) => {
|
|
1626
|
+
if (!(event.target instanceof Element))
|
|
1627
|
+
return;
|
|
1628
|
+
const opener = event.target.closest("[data-absolute-sheet-open]");
|
|
1629
|
+
if (opener?.dataset.absoluteSheetOpen) {
|
|
1630
|
+
if (openAbsoluteMobileSheet(opener.dataset.absoluteSheetOpen, opener))
|
|
1631
|
+
event.preventDefault();
|
|
1632
|
+
return;
|
|
1633
|
+
}
|
|
1634
|
+
const closer = event.target.closest("[data-absolute-sheet-close]");
|
|
1635
|
+
const sheet = closer?.closest("dialog[data-absolute-sheet]");
|
|
1636
|
+
if (sheet && closeAbsoluteMobileSheet(sheet)) {
|
|
1637
|
+
event.preventDefault();
|
|
1638
|
+
return;
|
|
1639
|
+
}
|
|
1640
|
+
if (event.target instanceof HTMLDialogElement && event.target.dataset.absoluteSheet !== undefined) {
|
|
1641
|
+
const rect = event.target.getBoundingClientRect();
|
|
1642
|
+
const outside = event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
|
|
1643
|
+
if (outside && closeAbsoluteMobileSheet(event.target))
|
|
1644
|
+
event.preventDefault();
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
const handleCancel = (event) => {
|
|
1648
|
+
if (!(event.target instanceof HTMLDialogElement))
|
|
1649
|
+
return;
|
|
1650
|
+
if (event.target.dataset.absoluteSheet === undefined)
|
|
1651
|
+
return;
|
|
1652
|
+
event.preventDefault();
|
|
1653
|
+
closeAbsoluteMobileSheet(event.target);
|
|
1654
|
+
};
|
|
1655
|
+
const handleBack = (event) => {
|
|
1656
|
+
const active = document.querySelector(ACTIVE_SHEET_SELECTOR);
|
|
1657
|
+
if (!active)
|
|
1658
|
+
return;
|
|
1659
|
+
event.preventDefault();
|
|
1660
|
+
closeAbsoluteMobileSheet(active);
|
|
1661
|
+
};
|
|
1662
|
+
const observer = new MutationObserver(scheduleRefresh);
|
|
1663
|
+
observer.observe(document.documentElement, {
|
|
1664
|
+
childList: true,
|
|
1665
|
+
subtree: true
|
|
1666
|
+
});
|
|
1667
|
+
addEventListener("click", handleClick);
|
|
1668
|
+
addEventListener("cancel", handleCancel, true);
|
|
1669
|
+
addEventListener(BACK_EVENT, handleBack);
|
|
1670
|
+
refreshDocument();
|
|
1671
|
+
return {
|
|
1672
|
+
refreshDocument,
|
|
1673
|
+
requestBack: requestAbsoluteMobileBack,
|
|
1674
|
+
dispose: () => {
|
|
1675
|
+
if (disposed)
|
|
1676
|
+
return;
|
|
1677
|
+
disposed = true;
|
|
1678
|
+
observer.disconnect();
|
|
1679
|
+
removeEventListener("click", handleClick);
|
|
1680
|
+
removeEventListener("cancel", handleCancel, true);
|
|
1681
|
+
removeEventListener(BACK_EVENT, handleBack);
|
|
1682
|
+
},
|
|
1683
|
+
navigate: (detail) => {
|
|
1684
|
+
path = detail.to;
|
|
1685
|
+
document.documentElement.dataset.absoluteNavigationDirection = detail.direction;
|
|
1686
|
+
refreshDocument(path);
|
|
1687
|
+
dispatchEvent(new CustomEvent(NAVIGATION_EVENT, {
|
|
1688
|
+
detail
|
|
1689
|
+
}));
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1684
1694
|
// src/mobile/navigationLifecycle.ts
|
|
1685
1695
|
var isAbortError = (error) => error instanceof DOMException ? error.name === "AbortError" : error instanceof Error && error.name === "AbortError";
|
|
1686
1696
|
var cancelledResult = { kind: "cancelled" };
|
|
@@ -3943,8 +3953,8 @@ var createBeacon = (options) => {
|
|
|
3943
3953
|
if (!detectRage && !detectDead)
|
|
3944
3954
|
return;
|
|
3945
3955
|
const clickedAt = Date.now();
|
|
3946
|
-
const
|
|
3947
|
-
const
|
|
3956
|
+
const x = event instanceof MouseEvent ? event.clientX : 0;
|
|
3957
|
+
const y = event instanceof MouseEvent ? event.clientY : 0;
|
|
3948
3958
|
observeClickResponse(control, event, (responded, navigationStalled) => {
|
|
3949
3959
|
if (responded) {
|
|
3950
3960
|
unresponsiveClicks = unresponsiveClicks.filter((click) => click.control !== control);
|
|
@@ -3964,8 +3974,8 @@ var createBeacon = (options) => {
|
|
|
3964
3974
|
});
|
|
3965
3975
|
}
|
|
3966
3976
|
if (detectRage) {
|
|
3967
|
-
unresponsiveClicks = unresponsiveClicks.filter((click) => click.control === control && clickedAt - click.at < RAGE_WINDOW_MS && Math.abs(
|
|
3968
|
-
unresponsiveClicks.push({ at: clickedAt, control, x
|
|
3977
|
+
unresponsiveClicks = unresponsiveClicks.filter((click) => click.control === control && clickedAt - click.at < RAGE_WINDOW_MS && Math.abs(x - click.x) < RAGE_RADIUS_PX && Math.abs(y - click.y) < RAGE_RADIUS_PX);
|
|
3978
|
+
unresponsiveClicks.push({ at: clickedAt, control, x, y });
|
|
3969
3979
|
if (unresponsiveClicks.length < rageCount)
|
|
3970
3980
|
return;
|
|
3971
3981
|
unresponsiveClicks = [];
|
|
@@ -4168,7 +4178,7 @@ var createBeacon = (options) => {
|
|
|
4168
4178
|
};
|
|
4169
4179
|
visit(body, null);
|
|
4170
4180
|
};
|
|
4171
|
-
const
|
|
4181
|
+
const CONTROL_SELECTOR = 'a[href], button, input, select, textarea, [role="button"]';
|
|
4172
4182
|
const INTENTIONAL_CONTROL_GROUP_SELECTOR = `nav, [role="group"], [role="menu"], [role="radiogroup"], [role="tablist"], [role="toolbar"], [${BEACON_ATTRIBUTE.CONTROL_GROUP}]`;
|
|
4173
4183
|
const clipsAxis = (overflow) => overflow === "auto" || overflow === "scroll" || overflow === "hidden" || overflow === "clip";
|
|
4174
4184
|
const visibleControlRect = (control, rect, viewportWidth, viewportHeight) => {
|
|
@@ -4223,7 +4233,7 @@ var createBeacon = (options) => {
|
|
|
4223
4233
|
const viewportWidth = document.documentElement.clientWidth;
|
|
4224
4234
|
const viewportHeight = document.documentElement.clientHeight;
|
|
4225
4235
|
const controls = [];
|
|
4226
|
-
for (const element of Array.from(document.querySelectorAll(
|
|
4236
|
+
for (const element of Array.from(document.querySelectorAll(CONTROL_SELECTOR))) {
|
|
4227
4237
|
if (controls.length >= CONTROL_COLLISION_SAMPLE_LIMIT)
|
|
4228
4238
|
break;
|
|
4229
4239
|
if (isScanExempt(element) || hasHiddenAncestor(element, true))
|
|
@@ -4300,7 +4310,7 @@ var createBeacon = (options) => {
|
|
|
4300
4310
|
return;
|
|
4301
4311
|
const viewportWidth = document.documentElement.clientWidth;
|
|
4302
4312
|
const viewportHeight = document.documentElement.clientHeight;
|
|
4303
|
-
const controls = document.querySelectorAll(
|
|
4313
|
+
const controls = document.querySelectorAll(CONTROL_SELECTOR);
|
|
4304
4314
|
let sampled = 0;
|
|
4305
4315
|
for (const control of Array.from(controls)) {
|
|
4306
4316
|
if (sampled >= OCCLUSION_SAMPLE_LIMIT)
|
|
@@ -4352,23 +4362,23 @@ var createBeacon = (options) => {
|
|
|
4352
4362
|
const lightness = Number(match[1]) / (match[2] === "%" ? 100 : 1);
|
|
4353
4363
|
const chroma = Number(match[3]);
|
|
4354
4364
|
const hue = Number(match[4]) * Math.PI / 180;
|
|
4355
|
-
const
|
|
4356
|
-
const
|
|
4357
|
-
const lRoot = lightness + 0.3963377774 *
|
|
4358
|
-
const mRoot = lightness - 0.1055613458 *
|
|
4359
|
-
const sRoot = lightness - 0.0894841775 *
|
|
4360
|
-
const
|
|
4361
|
-
const
|
|
4362
|
-
const
|
|
4365
|
+
const a = chroma * Math.cos(hue);
|
|
4366
|
+
const b = chroma * Math.sin(hue);
|
|
4367
|
+
const lRoot = lightness + 0.3963377774 * a + 0.2158037573 * b;
|
|
4368
|
+
const mRoot = lightness - 0.1055613458 * a - 0.0638541728 * b;
|
|
4369
|
+
const sRoot = lightness - 0.0894841775 * a - 1.291485548 * b;
|
|
4370
|
+
const l = lRoot ** 3;
|
|
4371
|
+
const m = mRoot ** 3;
|
|
4372
|
+
const s = sRoot ** 3;
|
|
4363
4373
|
const linearToSrgb = (channel) => {
|
|
4364
4374
|
const encoded = channel <= 0.0031308 ? 12.92 * channel : 1.055 * channel ** 0.4166666666666667 - 0.055;
|
|
4365
4375
|
return clamp(encoded, 0, 1) * 255;
|
|
4366
4376
|
};
|
|
4367
4377
|
return {
|
|
4368
4378
|
a: parseAlpha(match[5]),
|
|
4369
|
-
b: linearToSrgb(-0.0041960863 *
|
|
4370
|
-
g: linearToSrgb(-1.2684380046 *
|
|
4371
|
-
r: linearToSrgb(4.0767416621 *
|
|
4379
|
+
b: linearToSrgb(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s),
|
|
4380
|
+
g: linearToSrgb(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s),
|
|
4381
|
+
r: linearToSrgb(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s)
|
|
4372
4382
|
};
|
|
4373
4383
|
};
|
|
4374
4384
|
let colorCanvasContext;
|
|
@@ -4530,7 +4540,7 @@ var createBeacon = (options) => {
|
|
|
4530
4540
|
continue;
|
|
4531
4541
|
}
|
|
4532
4542
|
const rect = element.getBoundingClientRect();
|
|
4533
|
-
const minimumArea = element.matches(
|
|
4543
|
+
const minimumArea = element.matches(CONTROL_SELECTOR) ? themeMismatchControlMinArea : themeMismatchMinArea;
|
|
4534
4544
|
if (rect.width * rect.height < minimumArea)
|
|
4535
4545
|
continue;
|
|
4536
4546
|
if (rect.bottom < 0 || rect.top > viewportHeight || rect.right < 0 || rect.left > viewportWidth) {
|