@absolutejs/absolute 0.20.0-beta.130 → 0.20.0-beta.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/changelog.json +52 -0
  3. package/dist/angular/browser.js +406 -396
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -3
  6. package/dist/angular/components/core/streamingSlotRegistry.js +2 -4
  7. package/dist/angular/index.js +560 -701
  8. package/dist/angular/index.js.map +5 -5
  9. package/dist/angular/server.js +197 -338
  10. package/dist/angular/server.js.map +5 -5
  11. package/dist/build/buildWorker.js +27 -35
  12. package/dist/build.js +3833 -5876
  13. package/dist/build.js.map +4 -4
  14. package/dist/cli/{add-9sa7e3vd.js → add-hvqeg5sz.js} +23 -25
  15. package/dist/cli/{analyze-c1sep5y9.js → analyze-c2x2aym5.js} +6 -7
  16. package/dist/cli/androidEmulatorController-j73a1br6.js +22 -0
  17. package/dist/cli/{androidNativeWatcher-dnp95nk2.js → androidNativeWatcher-ctbnsr1v.js} +11 -14
  18. package/dist/cli/{api-2hd8cahp.js → api-rk13rfd9.js} +11 -13
  19. package/dist/cli/{build-857rc1ds.js → build-20y4b6rj.js} +8 -9
  20. package/dist/cli/{buildDepVendor-8akhr8n8.js → buildDepVendor-axqvbbm6.js} +5 -170
  21. package/dist/cli/{compile-9by2vxy5.js → compile-nf4qsqyd.js} +45 -48
  22. package/dist/cli/config/client.js +8 -8
  23. package/dist/cli/config/server.js +5615 -5595
  24. package/dist/cli/config-3te1fbry.js +7 -0
  25. package/dist/cli/{db-8wweexdp.js → db-p8pc325y.js} +5 -13
  26. package/dist/cli/{dev-qg7fr16s.js → dev-6f0gry3y.js} +75 -77
  27. package/dist/cli/{devCert-avr89zf3.js → devCert-n33ep8pg.js} +0 -3
  28. package/dist/cli/{doctor-mbh9bk05.js → doctor-8rm8p4dm.js} +13 -14
  29. package/dist/cli/emulatorDoctor-cwa70kgt.js +17 -0
  30. package/dist/cli/emulatorInstaller-dx3fmm2m.js +14 -0
  31. package/dist/cli/env-2107nff1.js +11 -0
  32. package/dist/cli/eslint-zz0t0kfp.js +17 -0
  33. package/dist/cli/eslintChunked-wg10jj9m.js +12 -0
  34. package/dist/cli/expoDevController-s70fj7vf.js +16 -0
  35. package/dist/cli/{expoNativeWatcher-rmc95bak.js → expoNativeWatcher-aakp7xvj.js} +1 -5
  36. package/dist/cli/expoProject-zy02tbfg.js +10 -0
  37. package/dist/cli/{generate-069p0dk3.js → generate-nz4w03yz.js} +19 -21
  38. package/dist/cli/{heapDiff-87v24x7p.js → heapDiff-2etr2r26.js} +5 -6
  39. package/dist/cli/{htmx-5wh1jh75.js → htmx-0xcaqrny.js} +12 -14
  40. package/dist/cli/{index-sjvydg2r.js → index-1ff9q1vx.js} +7 -7
  41. package/dist/cli/{index-rqbk0b30.js → index-1qewxkgy.js} +26 -26
  42. package/dist/cli/{index-prwyfnn3.js → index-1x1vah31.js} +2 -2
  43. package/dist/cli/{index-ddakkws4.js → index-31j3beht.js} +13 -13
  44. package/dist/cli/{index-j2nw3edf.js → index-3gtnqd57.js} +5 -5
  45. package/dist/cli/{index-54q7pxcx.js → index-434b7j4a.js} +2 -32
  46. package/dist/cli/{index-w5vswatm.js → index-43a1vvb7.js} +6 -10
  47. package/dist/cli/{index-nxcwg9ma.js → index-5sjk7daj.js} +31 -31
  48. package/dist/cli/{index-6j1xaheg.js → index-73sk1ney.js} +5 -5
  49. package/dist/cli/{index-3x5wpx5d.js → index-8kdmmgvc.js} +2 -2
  50. package/dist/cli/{index-1ys3dnrs.js → index-8w2wazrk.js} +34 -34
  51. package/dist/cli/{index-wtfnv3n2.js → index-92hmw204.js} +3 -3
  52. package/dist/cli/{index-vdbn8brx.js → index-c3tqbpkq.js} +40 -41
  53. package/dist/cli/{index-mywsk201.js → index-fde3c297.js} +1 -1
  54. package/dist/cli/{index-wctgx65x.js → index-hfvxsgf4.js} +48 -31
  55. package/dist/cli/{index-255xs63d.js → index-j57pgg5m.js} +10 -10
  56. package/dist/cli/{index-5cgsrv62.js → index-jcjwsdqt.js} +13 -182
  57. package/dist/cli/{index-00wfffav.js → index-k4t9k1xk.js} +5 -5
  58. package/dist/cli/{index-yxgaf8j0.js → index-m1vntzf1.js} +7 -5
  59. package/dist/cli/{index-9r7n9dqp.js → index-ma1dw7x2.js} +1 -1
  60. package/dist/cli/index-pch0v1z6.js +60 -0
  61. package/dist/cli/{index-8nym68py.js → index-ppxed116.js} +1 -1
  62. package/dist/cli/{index-9kwmb3c0.js → index-qyxd5n9a.js} +3 -3
  63. package/dist/cli/{index-tn4crd40.js → index-r62705dc.js} +12 -12
  64. package/dist/cli/{index-hty8111z.js → index-r915cvqp.js} +17 -17
  65. package/dist/cli/{index-exdd5k1g.js → index-rrxeqrbn.js} +2 -2
  66. package/dist/cli/{index-keg69zm1.js → index-snbzdwb9.js} +5 -5
  67. package/dist/cli/{index-v26ze17p.js → index-thqwfzy8.js} +3 -3
  68. package/dist/cli/{index-0hr7c4qe.js → index-vdnmqkt8.js} +14 -18
  69. package/dist/cli/{index-vkkqe08e.js → index-vj2v38sq.js} +29 -29
  70. package/dist/cli/{index-erngp7a9.js → index-wy0yh4jj.js} +16 -16
  71. package/dist/cli/{index-1cypb2zn.js → index-xcr3r6a1.js} +8 -8
  72. package/dist/cli/index.js +44 -48
  73. package/dist/cli/{info-d74dr585.js → info-kx5510rq.js} +7 -7
  74. package/dist/cli/{inspect-23chj4nc.js → inspect-5dj06x0m.js} +18 -20
  75. package/dist/cli/{iosNativeWatcher-kggp7j9a.js → iosNativeWatcher-zx49pzej.js} +12 -16
  76. package/dist/cli/iosSimulatorController-haa1cc3p.js +23 -0
  77. package/dist/cli/{islands-wpqgmwh0.js → islands-z4adh55n.js} +8 -9
  78. package/dist/cli/{lintProof-wx3b6dzy.js → lintProof-qcwdvzcz.js} +12 -17
  79. package/dist/cli/{logs-bx2n5ey6.js → logs-3p2vrq5h.js} +8 -10
  80. package/dist/cli/{ls-kvmcmd2j.js → ls-nkspq73y.js} +13 -14
  81. package/dist/cli/{mem-apbk7bx4.js → mem-h3f497cr.js} +10 -14
  82. package/dist/cli/{migrate-p4rp5r6b.js → migrate-52bqqp08.js} +7 -8
  83. package/dist/cli/{mobile-43q3zmjf.js → mobile-m0cdh8cf.js} +572 -575
  84. package/dist/cli/nativeAuth-ysv0x5dy.js +27 -0
  85. package/dist/cli/patchedBun-m7vj5sks.js +9 -0
  86. package/dist/cli/prerender-mfnwsvyt.js +7 -0
  87. package/dist/cli/{prettier-vtk5yaw4.js → prettier-c1624g36.js} +2 -6
  88. package/dist/cli/{ps-8y28kzmb.js → ps-0jedm91n.js} +12 -16
  89. package/dist/cli/{psTui-8e96mwgz.js → psTui-tpr5nbmc.js} +28 -30
  90. package/dist/cli/remoteMacProtocol-v3ax0y0f.js +41 -0
  91. package/dist/cli/{remove-3fd1z2hx.js → remove-z0brj5nd.js} +16 -18
  92. package/dist/cli/{rewriteImports-d1gmaa68.js → rewriteImports-k6rjjmg1.js} +2 -100
  93. package/dist/cli/{routes-0xpanj8z.js → routes-ey0sw1eq.js} +7 -9
  94. package/dist/cli/start-3z3gtgm0.js +20 -0
  95. package/dist/cli/telemetry-3wnc06wa.js +9 -0
  96. package/dist/cli/{tunnelRelay-5at2v8w6.js → tunnelRelay-19ay0fxn.js} +3 -4
  97. package/dist/cli/{typecheck-yj9s13eb.js → typecheck-nmf6e7k7.js} +147 -149
  98. package/dist/cli/{workspace-m56sgfkc.js → workspace-yetzedke.js} +32 -36
  99. package/dist/client/chunks/{index-dk743xs6.js → index-8m2qq61n.js} +12 -8
  100. package/dist/client/chunks/{index-dk743xs6.js.map → index-8m2qq61n.js.map} +4 -3
  101. package/dist/client/chunks/{index-m35nbkdp.js → islands-rc28k5sx.js} +104 -42
  102. package/dist/client/chunks/islands-rc28k5sx.js.map +15 -0
  103. package/dist/client/chunks/{react-yq4ss9y4.js → react-dcvkaba2.js} +5 -7
  104. package/dist/client/chunks/{react-yq4ss9y4.js.map → react-dcvkaba2.js.map} +2 -2
  105. package/dist/client/chunks/{svelte-s0c964kb.js → svelte-4yfa5bxa.js} +2 -4
  106. package/dist/client/chunks/{svelte-s0c964kb.js.map → svelte-4yfa5bxa.js.map} +2 -2
  107. package/dist/client/chunks/{vue-rdskrnyg.js → vue-a84fzp3v.js} +2 -4
  108. package/dist/client/chunks/{vue-rdskrnyg.js.map → vue-a84fzp3v.js.map} +2 -2
  109. package/dist/client/index.js +42 -15
  110. package/dist/client/index.js.map +2 -2
  111. package/dist/client/prefetch.js +1 -3
  112. package/dist/client/prefetch.js.map +2 -2
  113. package/dist/core/streamingSlotRegistrar.js +1 -64
  114. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  115. package/dist/core/streamingSlotRegistry.js +1 -64
  116. package/dist/core/streamingSlotRegistry.js.map +2 -2
  117. package/dist/dev/serverBootstrap.js +1802 -2018
  118. package/dist/index.js +5247 -8794
  119. package/dist/index.js.map +9 -20
  120. package/dist/islands/browser.js +13 -3
  121. package/dist/islands/browser.js.map +2 -2
  122. package/dist/islands/index.js +26 -142
  123. package/dist/islands/index.js.map +2 -2
  124. package/dist/mobile/browser.js +13 -3
  125. package/dist/mobile/browser.js.map +2 -2
  126. package/dist/mobile/index.js +1067 -2182
  127. package/dist/mobile/index.js.map +2 -2
  128. package/dist/mobile/remoteMacAgentEntry.js +156 -156
  129. package/dist/mobile/shellAuth.js +0 -16
  130. package/dist/mobile/shellBootstrap.js +734 -724
  131. package/dist/mobile/shellExpoAuth.js +4 -18
  132. package/dist/mobile/shellExpoDevices.js +0 -16
  133. package/dist/mobile/shellExpoSync.js +0 -16
  134. package/dist/mobile/shellSync.js +3 -19
  135. package/dist/mobile/shellUpdate.js +5 -21
  136. package/dist/mobile/uiPrimitives.js +0 -16
  137. package/dist/react/browser.js +15 -5
  138. package/dist/react/browser.js.map +2 -2
  139. package/dist/react/components/index.js +68 -58
  140. package/dist/react/components/index.js.map +4 -4
  141. package/dist/react/hooks/index.js +1 -63
  142. package/dist/react/hooks/index.js.map +2 -2
  143. package/dist/react/index.js +56 -195
  144. package/dist/react/index.js.map +5 -5
  145. package/dist/react/jsxDevRuntimeCompat.js +1 -64
  146. package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
  147. package/dist/react/jsxRuntimeCompat.js +1 -64
  148. package/dist/react/jsxRuntimeCompat.js.map +2 -2
  149. package/dist/react/router/browser.js +1 -64
  150. package/dist/react/router/browser.js.map +2 -2
  151. package/dist/react/router/index.js +1 -64
  152. package/dist/react/router/index.js.map +2 -2
  153. package/dist/react/server.js +38 -51
  154. package/dist/react/server.js.map +5 -5
  155. package/dist/src/cli/config/server.d.ts +7 -129
  156. package/dist/src/cli/patchedBun.d.ts +14 -14
  157. package/dist/src/cli/serverBundleExternals.d.ts +17 -2
  158. package/dist/src/core/prepare.d.ts +149 -1805
  159. package/dist/src/core/requestContext.d.ts +1 -1
  160. package/dist/src/dev/requestInspector.d.ts +1 -1
  161. package/dist/src/mobile/associationFiles.d.ts +2 -2
  162. package/dist/src/mobile/compatibilityDispatcher.d.ts +1 -1
  163. package/dist/src/mobile/mobilePreview.d.ts +8 -130
  164. package/dist/src/mobile/updateServer.d.ts +2 -2
  165. package/dist/src/plugins/devtoolsJson.d.ts +2 -2
  166. package/dist/src/plugins/hmr.d.ts +2 -2
  167. package/dist/src/plugins/imageOptimizer.d.ts +2 -151
  168. package/dist/src/plugins/telemetryPlugin.d.ts +1 -19
  169. package/dist/svelte/browser.js +13 -3
  170. package/dist/svelte/browser.js.map +2 -2
  171. package/dist/svelte/index.js +66 -210
  172. package/dist/svelte/index.js.map +5 -5
  173. package/dist/svelte/server.js +51 -99
  174. package/dist/svelte/server.js.map +5 -5
  175. package/dist/types/globals.d.ts +0 -6
  176. package/dist/vue/browser.js +13 -3
  177. package/dist/vue/browser.js.map +2 -2
  178. package/dist/vue/components/Image.js +13 -3
  179. package/dist/vue/components/Image.js.map +2 -2
  180. package/dist/vue/components/index.js +62 -50
  181. package/dist/vue/components/index.js.map +4 -4
  182. package/dist/vue/index.js +1115 -1258
  183. package/dist/vue/index.js.map +10 -10
  184. package/dist/vue/server.js +42 -59
  185. package/dist/vue/server.js.map +5 -5
  186. package/package.json +9 -9
  187. package/dist/cli/androidEmulatorController-sj141e1c.js +0 -30
  188. package/dist/cli/config-rjeexvza.js +0 -8
  189. package/dist/cli/emulatorDoctor-gzarrsex.js +0 -18
  190. package/dist/cli/emulatorInstaller-pjw4ex6q.js +0 -15
  191. package/dist/cli/env-4f6f6z69.js +0 -14
  192. package/dist/cli/eslint-qfkxe89p.js +0 -20
  193. package/dist/cli/eslintChunked-7ef700pn.js +0 -21
  194. package/dist/cli/expoDevController-weywa74d.js +0 -26
  195. package/dist/cli/expoProject-w2pzjwnx.js +0 -11
  196. package/dist/cli/index-1rabqyq0.js +0 -7
  197. package/dist/cli/index-ar4gz15x.js +0 -60
  198. package/dist/cli/iosSimulatorController-xcxxfkzx.js +0 -34
  199. package/dist/cli/nativeAuth-zx4tsb1f.js +0 -38
  200. package/dist/cli/patchedBun-zjtrn2s4.js +0 -38
  201. package/dist/cli/prerender-yex2zwj3.js +0 -18
  202. package/dist/cli/remoteMacProtocol-r38jhg44.js +0 -69
  203. package/dist/cli/start-gzhrkhxe.js +0 -23
  204. package/dist/cli/telemetry-94rka1w2.js +0 -14
  205. package/dist/client/chunks/angularPatch-arh4sr68.js +0 -157
  206. package/dist/client/chunks/angularPatch-arh4sr68.js.map +0 -10
  207. package/dist/client/chunks/index-jrcwp722.js +0 -12
  208. package/dist/client/chunks/index-jrcwp722.js.map +0 -10
  209. package/dist/client/chunks/index-m35nbkdp.js.map +0 -12
  210. package/dist/client/chunks/index-qxjc7kc5.js +0 -12
  211. package/dist/client/chunks/index-qxjc7kc5.js.map +0 -9
  212. package/dist/client/chunks/islands-50dg63j9.js +0 -284
  213. package/dist/client/chunks/islands-50dg63j9.js.map +0 -14
  214. /package/dist/cli/{index-me8nczrw.js → index-039rh39e.js} +0 -0
  215. /package/dist/cli/{index-bw4ktfnz.js → index-1y5mmnwg.js} +0 -0
  216. /package/dist/cli/{index-5xfxd7xa.js → index-3wm8p7rg.js} +0 -0
  217. /package/dist/cli/{index-4rme31py.js → index-420h9hq7.js} +0 -0
  218. /package/dist/cli/{index-4rhxthsy.js → index-65kqn88a.js} +0 -0
  219. /package/dist/cli/{index-r8x3839e.js → index-71gchbzt.js} +0 -0
  220. /package/dist/cli/{index-s2tazax7.js → index-92g14j47.js} +0 -0
  221. /package/dist/cli/{index-j66p8hn5.js → index-bwsa6ax4.js} +0 -0
  222. /package/dist/cli/{index-bzs19w3r.js → index-e6ysp900.js} +0 -0
  223. /package/dist/cli/{index-06cmrcdq.js → index-h7qhz02e.js} +0 -0
  224. /package/dist/cli/{index-6h54jqdq.js → index-hg54jyts.js} +0 -0
  225. /package/dist/cli/{index-czwrxgdj.js → index-hxqprc80.js} +0 -0
  226. /package/dist/cli/{index-zh6hhrwy.js → index-jjfbjv1z.js} +0 -0
  227. /package/dist/cli/{index-fc9vxw56.js → index-prs14ys9.js} +0 -0
  228. /package/dist/cli/{index-v1k46q3x.js → index-tx0kx9zx.js} +0 -0
  229. /package/dist/cli/{index-fhaf3tdk.js → index-x8x0f3ha.js} +0 -0
  230. /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) => () => (fn && (res = fn(fn = 0)), 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(t2) {
37
- if (t2.hadRecentInput)
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 && t2.startTime - e.startTime < 1000 && t2.startTime - n.startTime < 5000 ? (this.o += t2.value, this.i.push(t2)) : (this.o = t2.value, this.i = [t2]), this.t?.(t2);
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(t2, n2) {
44
- let e2 = a.get(n2);
45
- return e2 || (e2 = new WeakMap, a.set(n2, e2)), e2.get(t2) || e2.set(t2, new n2), e2.get(t2);
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(t2) {
61
- const n2 = A() - N, e2 = Math.min(this.h.length - 1, Math.floor(n2 / 50));
62
- return !n2 || e2 !== -1 || t2 !== "soft-navigation" && t2 !== "back-forward-cache" ? this.h[e2] : { D: 8, id: -1, entries: [] };
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(t2) {
65
- if (this.p?.(t2), !t2.interactionId && t2.entryType !== "first-input")
74
+ l(t) {
75
+ if (this.p?.(t), !t.interactionId && t.entryType !== "first-input")
66
76
  return;
67
- const n2 = this.h.at(-1);
68
- let e2 = this.v.get(t2.interactionId);
69
- if (e2 || this.h.length < 10 || t2.duration > n2.D) {
70
- if (e2 ? t2.duration > e2.D ? (e2.entries = [t2], e2.D = t2.duration) : t2.duration === e2.D && t2.startTime === e2.entries[0].startTime && e2.entries.push(t2) : (e2 = { id: t2.interactionId, entries: [t2], D: t2.duration }, this.v.set(e2.id, e2), this.h.push(e2)), this.h.sort((t3, n3) => n3.D - t3.D), this.h.length > 10) {
71
- const t3 = this.h.splice(10);
72
- for (const n3 of t3)
73
- this.v.delete(n3.id);
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?.(e2);
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(t2) {
84
- this.p?.(t2);
93
+ l(t) {
94
+ this.p?.(t);
85
95
  }
86
96
  }
87
97
  var n = () => {
88
- const t2 = performance.getEntriesByType("navigation")[0];
89
- if (t2 && t2.responseStart > 0 && t2.responseStart < performance.now())
90
- return t2;
91
- }, e = (t2) => {
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 e2 = n();
95
- if (e2) {
96
- if (t2 < e2.domInteractive)
104
+ const e = n();
105
+ if (e) {
106
+ if (t < e.domInteractive)
97
107
  return "loading";
98
- if (e2.domContentLoadedEventStart === 0 || t2 < e2.domContentLoadedEventStart)
108
+ if (e.domContentLoadedEventStart === 0 || t < e.domContentLoadedEventStart)
99
109
  return "dom-interactive";
100
- if (e2.domComplete === 0 || t2 < e2.domComplete)
110
+ if (e.domComplete === 0 || t < e.domComplete)
101
111
  return "dom-content-loaded";
102
112
  }
103
113
  return "complete";
104
- }, o = (t2) => {
105
- const n2 = t2.nodeName;
106
- return t2.nodeType === 1 ? n2.toLowerCase() : n2.toUpperCase().replace(/^#/, "");
107
- }, i = (t2) => {
108
- let n2 = "";
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 (;t2?.nodeType !== 9; ) {
111
- const e2 = t2, i2 = e2.id ? "#" + e2.id : [o(e2), ...Array.from(e2.classList ?? []).sort()].join(".");
112
- if (n2.length + i2.length > 99)
113
- return n2 || i2;
114
- if (n2 = n2 ? i2 + ">" + n2 : i2, e2.id)
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
- t2 = e2.parentNode;
126
+ t = e.parentNode;
117
127
  }
118
128
  } catch {}
119
- return n2;
120
- }, a, s = -1, c = () => s, f = (t2) => {
121
- addEventListener("pageshow", (n2) => {
122
- n2.persisted && (s = n2.timeStamp, t2(n2));
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 = (t2, n2, e2, o2) => {
125
- let i2, a2;
126
- return (r2) => {
127
- n2.value >= 0 && (r2 || o2) && (a2 = n2.value - (i2 ?? 0), (a2 || i2 === undefined) && (i2 = n2.value, n2.delta = a2, n2.rating = ((t3, n3) => t3 > n3[1] ? "poor" : t3 > n3[0] ? "needs-improvement" : "good")(n2.value, e2), t2(n2)));
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 = (t2) => {
130
- requestAnimationFrame(() => requestAnimationFrame(t2));
131
- }, d = () => n()?.activationStart ?? 0, h = -1, g, v = () => document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0, p = (t2) => {
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 (t2.type === "visibilitychange")
134
- for (const t3 of g)
135
- t3();
136
- isFinite(h) || (h = t2.type === "visibilitychange" ? t2.timeStamp : 0, removeEventListener("prerenderingchange", p, true));
137
- }
138
- }, m = (t2 = false) => {
139
- if (t2 && (h = 1 / 0), h < 0) {
140
- const t3 = d(), n2 = document.prerendering ? undefined : globalThis.performance.getEntriesByType("visibility-state").find((n3) => n3.name === "hidden" && n3.startTime >= t3)?.startTime;
141
- h = n2 ?? v(), addEventListener("visibilitychange", p, true), addEventListener("prerenderingchange", p, true), f(() => {
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(t3) {
150
- g.add(t3);
159
+ }, onHidden(t) {
160
+ g.add(t);
151
161
  } };
152
- }, y = (t2, e2 = -1, o2, i2 = 0, a2, r2, s2) => {
153
- const f2 = n(), l2 = f2?.navigationId || 0;
154
- let u2 = "navigate";
155
- o2 ? u2 = o2 : c() >= 0 ? u2 = "back-forward-cache" : f2 && (document.prerendering || d() > 0 ? u2 = "prerender" : document.wasDiscarded ? u2 = "restore" : f2.type && (u2 = f2.type.replace(/_/g, "-")));
156
- return { name: t2, value: e2, rating: "good", delta: 0, entries: [], id: `v6-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1000000000000}`, navigationType: u2, navigationId: i2 || l2, navigationInteractionId: a2, navigationURL: r2 || f2?.name, navigationStartTime: s2 || 0 };
157
- }, b = (t2, n2, e2 = {}) => {
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 o2 = t2.filter((t3) => PerformanceObserver.supportedEntryTypes.includes(t3));
160
- if (o2.length > 0) {
161
- const t3 = new PerformanceObserver((t4) => {
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 e3 = t4.getEntries();
164
- o2.length > 1 && e3.sort((t5, n3) => t5.startTime + t5.duration - (n3.startTime + n3.duration)), n2(e3);
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 n3 of o2)
168
- t3.observe({ type: n3, buffered: true, ...e2 });
169
- return t3;
177
+ for (const n of o)
178
+ t.observe({ type: n, buffered: true, ...e });
179
+ return t;
170
180
  }
171
181
  } catch {}
172
- }, M = (t2) => PerformanceObserver.supportedEntryTypes.includes("soft-navigation") && typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint == "function" && t2 && t2.reportSoftNavs, T = (t2, n2) => {
173
- if (t2.set(n2.navigationId, n2), t2.size > 2) {
174
- const n3 = t2.keys().next().value;
175
- n3 !== undefined && t2.delete(n3);
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 = (t2) => {
178
- let n2 = false;
187
+ }, E = (t) => {
188
+ let n = false;
179
189
  return () => {
180
- n2 || (t2(), n2 = true);
190
+ n || (t(), n = true);
181
191
  };
182
- }, w = (t2) => {
183
- document.prerendering ? addEventListener("prerenderingchange", t2, true) : t2();
184
- }, P, S = (t2, n2 = {}) => {
185
- const e2 = M(n2);
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 o2 = r(n2, D), i2 = m();
188
- let a2, s2 = y("FCP");
189
- const h2 = b(["paint"], (t3) => {
190
- for (const n3 of t3)
191
- n3.name === "first-contentful-paint" && (h2.disconnect(), n3.startTime < i2.firstHiddenTime && (s2.value = Math.max(n3.startTime - d(), 0), s2.entries.push(n3), s2.navigationId = n3.navigationId || s2.navigationId, a2(true)));
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 (h2 && (a2 = l(t2, s2, P, n2.reportAllChanges), f((e3) => {
194
- s2 = y("FCP", -1, "back-forward-cache", s2.navigationId, s2.navigationInteractionId, s2.navigationURL, c()), a2 = l(t2, s2, P, n2.reportAllChanges), u(() => {
195
- s2.value = performance.now() - e3.timeStamp, a2(true);
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
- })), e2) {
198
- b(["soft-navigation"], (e3) => {
199
- e3.forEach((e4) => {
200
- o2.u && e4.navigationId && T(o2.u, e4);
201
- const i3 = Math.max((e4.presentationTime || e4.paintTime || 0) - e4.startTime, 0);
202
- s2 = y("FCP", i3, "soft-navigation", e4.navigationId, e4.interactionId, e4.name, e4.startTime), a2 = l(t2, s2, P, n2.reportAllChanges), a2(true);
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
- }, n2);
214
+ }, n);
205
215
  }
206
216
  });
207
- }, k, L = (t2) => t2.find((t3) => t3.node?.nodeType === 1) || t2[0], F = (n2, o2 = {}) => {
208
- const a2 = r(o2 = Object.assign({}, o2), t), s2 = new WeakMap;
209
- a2.t = (t2) => {
210
- if (t2?.sources?.length) {
211
- const n3 = L(t2.sources), e2 = n3?.node;
212
- if (e2) {
213
- const t3 = o2.generateTarget?.(e2) ?? i(e2);
214
- s2.set(n3, t3);
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
- ((n3, e2 = {}) => {
219
- const o3 = m();
228
+ ((n, e = {}) => {
229
+ const o = m();
220
230
  S(E(() => {
221
- let i2, a3 = y("CLS", 0);
222
- const s3 = r(e2, t), d2 = (t2, o4, r2, c2, f2) => {
223
- a3 = y("CLS", 0, t2, o4, r2, c2, f2), s3.o = 0, i2 = l(n3, a3, k, e2.reportAllChanges);
224
- }, h2 = (t2 = false) => {
225
- s3.o > a3.value && (a3.value = s3.o, a3.entries = s3.i), i2(t2);
226
- }, g2 = (t2) => {
227
- h2(true), d2("soft-navigation", t2.navigationId, t2.interactionId, t2.name, t2.startTime);
228
- }, v2 = (t2) => {
229
- for (const n4 of t2)
230
- n4.entryType !== "soft-navigation" ? s3.l(n4) : g2(n4);
231
- h2();
232
- }, p2 = ["layout-shift"];
233
- M(e2) && p2.push("soft-navigation");
234
- const m2 = b(p2, v2);
235
- m2 && (i2 = l(n3, a3, k, e2.reportAllChanges), o3.onHidden(() => {
236
- v2(m2.takeRecords()), i2(true);
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
- d2("back-forward-cache", a3.navigationId, a3.navigationInteractionId, a3.navigationURL, c()), u(i2);
239
- }), setTimeout(i2));
248
+ d("back-forward-cache", a.navigationId, a.navigationInteractionId, a.navigationURL, c()), u(i);
249
+ }), setTimeout(i));
240
250
  }));
241
- })((t2) => {
242
- n2(((t3) => {
243
- let n3 = {};
244
- if (t3.entries.length) {
245
- const o3 = t3.entries.reduce((t4, n4) => t4.value > n4.value ? t4 : n4);
246
- if (o3?.sources?.length) {
247
- const t4 = L(o3.sources);
248
- t4 && (n3 = { largestShiftTarget: s2.get(t4), largestShiftTime: o3.startTime, largestShiftValue: o3.value, largestShiftSource: t4, largestShiftEntry: o3, loadState: e(o3.startTime) });
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(t3, { attribution: n3 });
252
- })(t2));
253
- }, o2);
254
- }, _ = (t2, o2 = {}) => {
255
- const i2 = r(o2 = Object.assign({}, o2), D);
256
- M(o2) && (i2.u = new Map);
257
- S((o3) => {
258
- t2(((t3) => {
259
- let o4 = { timeToFirstByte: 0, firstByteToFCP: t3.value, loadState: e(c()) };
260
- if (t3.navigationType !== "soft-navigation") {
261
- if (t3.entries.length) {
262
- const i3 = n(), a2 = t3.entries.at(-1);
263
- if (i3) {
264
- const n2 = i3.responseStart, r2 = i3.activationStart || 0, s2 = Math.max(0, n2 - r2);
265
- o4 = { timeToFirstByte: s2, firstByteToFCP: t3.value - s2, loadState: e(t3.entries[0].startTime), navigationEntry: i3, fcpEntry: a2 };
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 n2 = i2.u?.get(t3.navigationId);
270
- n2 && (o4 = { timeToFirstByte: 0, firstByteToFCP: t3.value, loadState: "complete", navigationEntry: n2 });
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(t3, { attribution: o4 });
273
- })(o3));
274
- }, o2);
275
- }, B = 0, C, I = 0, O = (t2) => {
276
- for (const n2 of t2)
277
- n2.interactionId && (C = Math.min(C, n2.interactionId), I = Math.max(I, n2.interactionId), B = I ? (I - C) / 7 + 1 : 0);
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 = (t2) => {
281
- const n2 = "requestIdleCallback" in globalThis ? 1000 : 0, e2 = globalThis.requestIdleCallback || setTimeout, o2 = globalThis.cancelIdleCallback || clearTimeout;
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
- t2();
293
+ t();
284
294
  else {
285
- const i2 = E(t2);
286
- let a2 = -1;
287
- const r2 = () => {
288
- o2(a2), i2();
295
+ const i = E(t);
296
+ let a = -1;
297
+ const r = () => {
298
+ o(a), i();
289
299
  };
290
- addEventListener("visibilitychange", r2, { once: true, capture: true }), a2 = e2(() => {
291
- removeEventListener("visibilitychange", r2, { capture: true }), i2();
292
- }, { timeout: n2 });
293
- }
294
- }, R, U = (t2, n2 = {}) => {
295
- const o2 = r(n2 = Object.assign({}, n2), W);
296
- let a2 = [], s2 = [], u2 = 0;
297
- const d2 = new WeakMap, h2 = new WeakMap;
298
- let g2 = false;
299
- const v2 = () => {
300
- g2 || (x(p2), g2 = true);
301
- }, p2 = () => {
302
- const t3 = new Set(o2.h.map((t4) => d2.get(t4.entries[0]))), n3 = s2.length - 10;
303
- s2 = s2.filter((e3, o3) => o3 >= n3 || t3.has(e3));
304
- const e2 = new Set;
305
- for (const t4 of s2) {
306
- const n4 = T2(t4.startTime, t4.processingEnd);
307
- for (const t5 of n4)
308
- e2.add(t5);
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
- a2 = a2.filter((t4) => t4.startTime > u2 || e2.has(t4)), g2 = false;
320
+ a = a.filter((t) => t.startTime > u || e.has(t)), g = false;
311
321
  };
312
- o2.p = (t3) => {
313
- const e2 = t3.startTime + t3.duration;
314
- let o3;
315
- u2 = Math.max(u2, t3.processingEnd);
316
- for (let i2 = s2.length - 1;i2 >= 0; i2--) {
317
- const a3 = s2[i2];
318
- if (Math.abs(e2 - a3.renderTime) <= 8) {
319
- o3 = a3, o3.startTime = Math.min(t3.startTime, o3.startTime), o3.processingStart = Math.min(t3.processingStart, o3.processingStart), o3.processingEnd = Math.max(t3.processingEnd, o3.processingEnd), n2.includeProcessedEventEntries && o3.entries.push(t3);
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
- o3 || (o3 = { startTime: t3.startTime, processingStart: t3.processingStart, processingEnd: t3.processingEnd, renderTime: e2, entries: n2.includeProcessedEventEntries ? [t3] : [] }, s2.push(o3)), (t3.interactionId || t3.entryType === "first-input") && d2.set(t3, o3), v2();
324
- }, o2.m = (t3) => {
325
- if (!h2.get(t3)) {
326
- const e2 = t3.entries.find((t4) => t4.target)?.target;
327
- if (e2) {
328
- const o3 = n2.generateTarget?.(e2) ?? i(e2);
329
- h2.set(t3, o3);
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 n3 = t3.entries.find((t4) => t4.targetSelector)?.targetSelector;
332
- n3 && h2.set(t3, n3);
341
+ const n = t.entries.find((t) => t.targetSelector)?.targetSelector;
342
+ n && h.set(t, n);
333
343
  }
334
344
  }
335
345
  };
336
- const T2 = (t3, n3) => {
337
- const e2 = [];
338
- for (const o3 of a2)
339
- if (!(o3.startTime + o3.duration < t3)) {
340
- if (o3.startTime > n3)
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
- e2.push(o3);
352
+ e.push(o);
343
353
  }
344
- return e2;
345
- }, E2 = (t3) => {
346
- if (t3.entries.length === 0) {
347
- const n4 = t3.navigationStartTime || 0, o3 = { processedEventEntries: [], longAnimationFrameEntries: [], inputDelay: 0, processingDuration: 0, presentationDelay: t3.value, loadState: e(n4) };
348
- return Object.assign(t3, { attribution: o3 });
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 n3 = t3.entries[0], i2 = d2.get(n3), a3 = i2.processingStart, r2 = Math.max(n3.startTime + n3.duration, a3), s3 = Math.min(i2.processingEnd, r2), c2 = i2.entries.sort((t4, n4) => t4.processingStart - n4.processingStart), f2 = T2(n3.startTime, s3), l2 = o2.v.get(n3.interactionId), u3 = { interactionTarget: h2.get(l2), interactionType: n3.name.startsWith("key") ? "keyboard" : "pointer", interactionTime: n3.startTime, nextPaintTime: r2, processedEventEntries: c2, longAnimationFrameEntries: f2, inputDelay: a3 - n3.startTime, processingDuration: s3 - a3, presentationDelay: r2 - s3, loadState: e(n3.startTime), longestScript: undefined, totalScriptDuration: undefined, totalStyleAndLayoutDuration: undefined, totalPaintDuration: undefined, totalUnattributedDuration: undefined };
351
- return ((t4) => {
352
- const { interactionTime: n4, nextPaintTime: e2 } = t4;
353
- if (!t4.longAnimationFrameEntries?.length || !n4 || !e2)
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: o3, processingDuration: i3 } = t4;
356
- let a4, r3, s4 = 0, c3 = 0, f3 = 0, l3 = 0;
357
- for (const e3 of t4.longAnimationFrameEntries) {
358
- c3 = c3 + e3.startTime + e3.duration - e3.styleAndLayoutStart;
359
- for (const t5 of e3.scripts) {
360
- const e4 = t5.startTime + t5.duration;
361
- if (e4 < n4)
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 f4 = e4 - Math.max(n4, t5.startTime), u5 = t5.duration ? f4 / t5.duration * t5.forcedStyleAndLayoutDuration : 0;
364
- s4 += f4 - u5, c3 += u5, f4 > l3 && (r3 = t5.startTime < n4 + o3 ? "input-delay" : t5.startTime >= n4 + o3 + i3 ? "presentation-delay" : "processing-duration", a4 = t5, l3 = f4);
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 u4 = t4.longAnimationFrameEntries.at(-1), d3 = u4 ? u4.startTime + u4.duration : 0;
368
- d3 >= n4 + o3 + i3 && (f3 = e2 - d3), a4 && r3 && (t4.longestScript = { entry: a4, subpart: r3, intersectingDuration: l3 }), t4.totalScriptDuration = s4, t4.totalStyleAndLayoutDuration = c3, t4.totalPaintDuration = f3, t4.totalUnattributedDuration = e2 - n4 - s4 - c3 - f3;
369
- })(u3), Object.assign(t3, { attribution: u3 });
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"], (t3) => {
372
- a2 = a2.concat(t3), v2();
373
- }, n2), ((t3, n3 = {}) => {
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 e2 = m();
386
+ const e = m();
377
387
  w(() => {
378
388
  q();
379
- let o3, i2 = y("INP");
380
- const a3 = r(n3, W), s3 = (e3, r2, s4, c2, f2) => {
381
- a3.M(), i2 = y("INP", -1, e3, r2, s4, c2, f2), o3 = l(t3, i2, R, n3.reportAllChanges);
382
- }, u3 = () => {
383
- const t4 = a3.T(i2.navigationType);
384
- t4 && t4.D !== i2.value && (i2.value = t4.D, i2.entries = t4.entries, o3());
385
- }, d3 = (t4) => {
386
- u3(), o3(true), s3("soft-navigation", t4.navigationId, t4.interactionId, t4.name, t4.startTime);
387
- }, h3 = (t4, n4 = false) => {
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 n5 of t4)
390
- n5.entryType !== "soft-navigation" ? a3.l(n5) : d3(n5);
391
- u3(), n4 && o3(true);
399
+ for (const n of t)
400
+ n.entryType !== "soft-navigation" ? a.l(n) : d(n);
401
+ u(), n && o(true);
392
402
  });
393
- }, g3 = ["event", "first-input"];
394
- M(n3) && g3.push("soft-navigation");
395
- const v3 = b(g3, h3, { ...n3, durationThreshold: n3.durationThreshold ?? 40 });
396
- o3 = l(t3, i2, R, n3.reportAllChanges), v3 && (e2.onHidden(() => {
397
- h3(v3.takeRecords(), true);
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
- s3("back-forward-cache", i2.navigationId, i2.navigationInteractionId, i2.navigationURL, c());
409
+ s("back-forward-cache", i.navigationId, i.navigationInteractionId, i.navigationURL, c());
400
410
  }));
401
411
  });
402
- })((n3) => {
403
- t2(E2(n3));
404
- }, n2);
405
- }, H, V = (t2, e2 = {}) => {
406
- const o2 = r(e2 = Object.assign({}, e2), $), a2 = new WeakMap;
407
- M(e2) && (o2.u = new Map), o2.p = (t3) => {
408
- const n2 = t3.element;
409
- if (n2) {
410
- const o3 = e2.generateTarget?.(n2) ?? i(n2);
411
- a2.set(t3, o3);
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
- t3.id && a2.set(t3, `#${t3.id}`);
423
+ t.id && a.set(t, `#${t.id}`);
414
424
  };
415
- ((t3, n2 = {}) => {
416
- let e3 = false;
417
- const o3 = M(n2);
425
+ ((t, n = {}) => {
426
+ let e = false;
427
+ const o = M(n);
418
428
  w(() => {
419
- let i2, a3 = m(), s2 = y("LCP");
420
- const h2 = r(n2, $), g2 = (o4, r2, c2, f2, u2) => {
421
- s2 = y("LCP", -1, o4, r2, c2, f2, u2), i2 = l(t3, s2, H, n2.reportAllChanges), e3 = false, o4 === "soft-navigation" && (a3 = m(true));
422
- }, v2 = (t4) => {
423
- h2.u && t4.navigationId && T(h2.u, t4), e3 || i2(true), g2("soft-navigation", t4.navigationId, t4.interactionId, t4.name, t4.startTime);
424
- const n3 = t4.getLargestInteractionContentfulPaint?.();
425
- n3 && p2([n3]);
426
- }, p2 = (t4) => {
427
- n2.reportAllChanges || o3 || (t4 = t4.slice(-1));
428
- for (const n3 of t4) {
429
- if (!n3)
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 (n3.entryType === "soft-navigation") {
432
- v2(n3);
441
+ if (n.entryType === "soft-navigation") {
442
+ v(n);
433
443
  continue;
434
444
  }
435
- let t5 = 0, e4 = [], o4 = n3.startTime;
436
- if (n3.entryType === "largest-contentful-paint")
437
- t5 = Math.max(n3.startTime - d(), 0), h2.l(n3), e4 = [n3];
438
- else if (n3.entryType === "interaction-contentful-paint") {
439
- const i3 = n3;
440
- if (!s2.navigationId)
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 i3 && i3.interactionId != s2.navigationInteractionId)
452
+ if ("interactionId" in i && i.interactionId != s.navigationInteractionId)
443
453
  continue;
444
- o4 = i3.largestContentfulPaint?.renderTime || 0, t5 = Math.max(o4 - n3.startTime, 0), i3.largestContentfulPaint && (h2.l(i3.largestContentfulPaint), e4 = [i3.largestContentfulPaint]);
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
- o4 < a3.firstHiddenTime && (s2.value = t5, s2.entries = e4, i2());
456
+ o < a.firstHiddenTime && (s.value = t, s.entries = e, i());
447
457
  }
448
- }, M2 = ["largest-contentful-paint"];
449
- o3 && M2.push("interaction-contentful-paint", "soft-navigation");
450
- const E2 = b(M2, p2);
451
- if (E2) {
452
- i2 = l(t3, s2, H, n2.reportAllChanges);
453
- const a4 = ["keydown", "click", "visibilitychange"], r2 = (t4) => {
454
- if (t4.isTrusted && !e3) {
455
- const t5 = s2.id;
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 (!e3) {
458
- if (!o3) {
459
- E2.disconnect();
460
- for (const t6 of a4)
461
- removeEventListener(t6, r2, { capture: true });
467
+ if (!e) {
468
+ if (!o) {
469
+ E.disconnect();
470
+ for (const t of a)
471
+ removeEventListener(t, r, { capture: true });
462
472
  }
463
- t5 === s2.id && (e3 = true, i2(true));
473
+ t === s.id && (e = true, i(true));
464
474
  }
465
475
  });
466
476
  }
467
477
  };
468
- for (const t4 of a4)
469
- addEventListener(t4, r2, { capture: true });
470
- f((o4) => {
471
- g2("back-forward-cache", s2.navigationId, s2.navigationInteractionId, s2.navigationURL, c()), i2 = l(t3, s2, H, n2.reportAllChanges), u(() => {
472
- s2.value = performance.now() - o4.timeStamp, e3 = true, i2(true);
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
- })((e3) => {
478
- t2(((t3) => {
479
- let e4 = { timeToFirstByte: 0, resourceLoadDelay: 0, resourceLoadDuration: 0, elementRenderDelay: t3.value };
480
- if (t3.entries.length) {
481
- const i2 = t3.entries.at(-1), r2 = i2.url && performance.getEntriesByType("resource").find((t4) => t4.name === i2.url);
482
- let s2;
483
- e4.target = a2.get(i2), e4.lcpEntry = i2, i2.url && (e4.url = i2.url), r2 && (e4.lcpResourceEntry = r2);
484
- let c2 = 0, f2 = 0;
485
- if (t3.navigationType !== "soft-navigation" ? (s2 = n(), c2 = s2?.activationStart ?? 0, f2 = s2?.responseStart ?? 0) : (c2 = t3.navigationStartTime || 0, s2 = o2.u?.get(t3.navigationId)), s2) {
486
- const n2 = Math.max(0, f2 - c2), o3 = Math.max(n2, r2 ? (r2.requestStart || r2.startTime) - c2 : 0), i3 = Math.min(t3.value, Math.max(o3, r2 ? r2.responseEnd - c2 : 0));
487
- e4 = { ...e4, timeToFirstByte: n2, resourceLoadDelay: o3 - n2, resourceLoadDuration: i3 - o3, elementRenderDelay: t3.value - i3, navigationEntry: s2 };
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(t3, { attribution: e4 });
491
- })(e3));
492
- }, e2);
493
- }, z, G = (t2) => {
494
- document.prerendering ? w(() => G(t2)) : document.readyState !== "complete" ? addEventListener("load", () => G(t2), true) : setTimeout(t2);
495
- }, J = (t2, e2 = {}) => {
496
- ((t3, e3 = {}) => {
497
- const o2 = M(e3);
498
- let i2 = y("TTFB"), a2 = l(t3, i2, z, e3.reportAllChanges);
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 r2 = n();
501
- if (r2) {
502
- const n2 = r2.responseStart;
503
- i2.value = Math.max(n2 - d(), 0), i2.entries = [r2], a2(true), f(() => {
504
- i2 = y("TTFB", 0, "back-forward-cache", i2.navigationId, i2.navigationInteractionId, i2.navigationURL, c()), a2 = l(t3, i2, z, e3.reportAllChanges), a2(true);
505
- }), o2 && b(["soft-navigation"], (n3) => {
506
- n3.forEach((n4) => {
507
- n4.navigationId && (i2 = y("TTFB", 0, "soft-navigation", n4.navigationId, n4.interactionId, n4.name, n4.startTime), i2.entries = [n4], a2 = l(t3, i2, z, e3.reportAllChanges), a2(true));
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
- }, e3);
519
+ }, e);
510
520
  }
511
521
  });
512
- })((n2) => {
513
- t2(((t3) => {
514
- const n3 = t3.entries[0];
515
- let e3 = { waitingDuration: 0, cacheDuration: 0, dnsDuration: 0, connectionDuration: 0, requestDuration: 0, navigationEntry: n3 };
516
- if (t3.entries.length && n3 instanceof PerformanceNavigationTiming) {
517
- const o2 = n3.activationStart || 0, i2 = Math.max((n3.workerStart || n3.fetchStart || 0) - o2, 0), a2 = Math.max(n3.domainLookupStart - o2, 0), r2 = Math.max(n3.connectStart - o2, 0), s2 = Math.max(n3.connectEnd - o2, 0);
518
- e3 = { waitingDuration: i2, cacheDuration: a2 - i2, dnsDuration: r2 - a2, connectionDuration: s2 - r2, requestDuration: t3.value - s2, navigationEntry: n3 };
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(t3, { attribution: e3 });
521
- })(n2));
522
- }, e2);
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/uiPrimitives.ts
536
- var STYLE_ID = "absolute-mobile-ui-primitives";
537
- var NAVIGATION_EVENT = "absolute:navigation-change";
538
- var SHEET_EVENT = "absolute:sheet-change";
539
- var BACK_EVENT = "absolute:back-request";
540
- var ACTIVE_SHEET_SELECTOR = "dialog[data-absolute-sheet][open]";
541
- var TAB_LINK_SELECTOR = "[data-absolute-tab-bar] a[href]";
542
- var UI_STYLE = `
543
- [data-absolute-app-shell] {
544
- display: grid;
545
- grid-template-rows: auto minmax(0, 1fr) auto;
546
- box-sizing: border-box;
547
- min-height: var(--absolute-available-height, 100dvh);
548
- padding-inline: var(--absolute-safe-area-inset-left, 0px) var(--absolute-safe-area-inset-right, 0px);
549
- }
550
- [data-absolute-app-header] {
551
- padding-top: var(--absolute-safe-area-inset-top, 0px);
552
- }
553
- [data-absolute-app-main], [data-absolute-navigation-stack] {
554
- min-width: 0;
555
- min-height: 0;
556
- }
557
- [data-absolute-app-main] {
558
- overflow: auto;
559
- overscroll-behavior-y: contain;
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 openAbsoluteMobileSheet = (target, opener) => {
652
- const sheet = typeof target === "string" ? sheetById(target) : target;
653
- if (!sheet || sheet.dataset.absoluteSheet === undefined)
654
- return false;
655
- const active = document.querySelector(ACTIVE_SHEET_SELECTOR);
656
- if (active && active !== sheet)
657
- closeAbsoluteMobileSheet(active);
658
- if (opener)
659
- sheetOpeners.set(sheet, opener);
660
- if (!sheet.open) {
661
- if (typeof sheet.showModal === "function")
662
- sheet.showModal();
663
- else
664
- sheet.setAttribute("open", "");
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
- sheet.setAttribute("aria-modal", "true");
667
- focusSheet(sheet);
668
- dispatchSheet(sheet, true);
669
- return true;
670
- };
671
- var readAbsoluteMobileLinkIntent = (anchor) => {
672
- const mode = anchor.dataset.absoluteLink;
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 requestAbsoluteMobileBack = () => {
680
- const event = new CustomEvent(BACK_EVENT, { cancelable: true });
681
- return !dispatchEvent(event);
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 normalizePathname = (value) => {
684
- try {
685
- return new URL(value, location.href).pathname.replace(/\/$/u, "") || "/";
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
- var syncTabLinks = (path) => {
691
- const activePath = normalizePathname(path);
692
- if (!activePath)
693
- return;
694
- document.querySelectorAll(TAB_LINK_SELECTOR).forEach((anchor) => {
695
- const candidate = normalizePathname(anchor.href);
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 STYLE_ID2 = "absolute-mobile-adaptive-shell";
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 ensureStyle2 = () => {
1492
- let style = document.getElementById(STYLE_ID2);
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 = STYLE_ID2;
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
- ensureStyle2();
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 x2 = event instanceof MouseEvent ? event.clientX : 0;
3947
- const y2 = event instanceof MouseEvent ? event.clientY : 0;
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(x2 - click.x) < RAGE_RADIUS_PX && Math.abs(y2 - click.y) < RAGE_RADIUS_PX);
3968
- unresponsiveClicks.push({ at: clickedAt, control, x: x2, y: y2 });
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 CONTROL_SELECTOR2 = 'a[href], button, input, select, textarea, [role="button"]';
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(CONTROL_SELECTOR2))) {
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(CONTROL_SELECTOR2);
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 a2 = chroma * Math.cos(hue);
4356
- const b2 = chroma * Math.sin(hue);
4357
- const lRoot = lightness + 0.3963377774 * a2 + 0.2158037573 * b2;
4358
- const mRoot = lightness - 0.1055613458 * a2 - 0.0638541728 * b2;
4359
- const sRoot = lightness - 0.0894841775 * a2 - 1.291485548 * b2;
4360
- const l2 = lRoot ** 3;
4361
- const m2 = mRoot ** 3;
4362
- const s2 = sRoot ** 3;
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 * l2 - 0.7034186147 * m2 + 1.707614701 * s2),
4370
- g: linearToSrgb(-1.2684380046 * l2 + 2.6097574011 * m2 - 0.3413193965 * s2),
4371
- r: linearToSrgb(4.0767416621 * l2 - 3.3077115913 * m2 + 0.2309699292 * s2)
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(CONTROL_SELECTOR2) ? themeMismatchControlMinArea : themeMismatchMinArea;
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) {