@sonordev/site-kit 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-manifest.json +1 -1
- package/dist/AnalyticsProvider-44PDLORZ.js +34 -0
- package/dist/{AnalyticsProvider-QXZN5O6D.js.map → AnalyticsProvider-44PDLORZ.js.map} +1 -1
- package/dist/AnalyticsProvider-F6KHEAOX.mjs +13 -0
- package/dist/{AnalyticsProvider-4K5T7OQ7.mjs.map → AnalyticsProvider-F6KHEAOX.mjs.map} +1 -1
- package/dist/{ArticleViewTracker-FFMHR7AY.js → ArticleViewTracker-MGNVIHZ4.js} +6 -6
- package/dist/{ArticleViewTracker-FFMHR7AY.js.map → ArticleViewTracker-MGNVIHZ4.js.map} +1 -1
- package/dist/{ArticleViewTracker-BUG2TOHS.mjs → ArticleViewTracker-NI4UNSY7.mjs} +5 -5
- package/dist/{ArticleViewTracker-BUG2TOHS.mjs.map → ArticleViewTracker-NI4UNSY7.mjs.map} +1 -1
- package/dist/{ChatWidget-CRQPBDEF.mjs → ChatWidget-XSALHDDW.mjs} +7 -7
- package/dist/{ChatWidget-CRQPBDEF.mjs.map → ChatWidget-XSALHDDW.mjs.map} +1 -1
- package/dist/{ChatWidget-XFYLVXAX.js → ChatWidget-YBXJRR2Z.js} +10 -10
- package/dist/{ChatWidget-XFYLVXAX.js.map → ChatWidget-YBXJRR2Z.js.map} +1 -1
- package/dist/EngageWidget-DUEXPVOY.mjs +13 -0
- package/dist/{EngageWidget-SQU4T7CI.mjs.map → EngageWidget-DUEXPVOY.mjs.map} +1 -1
- package/dist/EngageWidget-MDCRS3BN.js +22 -0
- package/dist/{EngageWidget-S234YAT2.js.map → EngageWidget-MDCRS3BN.js.map} +1 -1
- package/dist/{FileField-XG4EYAZW.js → FileField-AXU6KBSV.js} +6 -6
- package/dist/{FileField-XG4EYAZW.js.map → FileField-AXU6KBSV.js.map} +1 -1
- package/dist/{FileField-HNEBEBLB.mjs → FileField-UTLGR5ZN.mjs} +5 -5
- package/dist/{FileField-HNEBEBLB.mjs.map → FileField-UTLGR5ZN.mjs.map} +1 -1
- package/dist/{FormSpotlight-VKD774PZ.mjs → FormSpotlight-NWLCZMOT.mjs} +3 -3
- package/dist/{FormSpotlight-VKD774PZ.mjs.map → FormSpotlight-NWLCZMOT.mjs.map} +1 -1
- package/dist/{FormSpotlight-IODREOPN.js → FormSpotlight-RR5KJDIH.js} +9 -9
- package/dist/{FormSpotlight-IODREOPN.js.map → FormSpotlight-RR5KJDIH.js.map} +1 -1
- package/dist/{FormStage-37KKZQH4.js → FormStage-GFNX4GLU.js} +9 -9
- package/dist/{FormStage-37KKZQH4.js.map → FormStage-GFNX4GLU.js.map} +1 -1
- package/dist/{FormStage-PRZNRYNC.mjs → FormStage-V4XKLI6J.mjs} +3 -3
- package/dist/{FormStage-PRZNRYNC.mjs.map → FormStage-V4XKLI6J.mjs.map} +1 -1
- package/dist/ManagedForm-4AD3LWSC.js +25 -0
- package/dist/{ManagedForm-JCMEE626.js.map → ManagedForm-4AD3LWSC.js.map} +1 -1
- package/dist/ManagedForm-4IWPG6AZ.mjs +16 -0
- package/dist/{ManagedForm-4PZOCKCV.mjs.map → ManagedForm-4IWPG6AZ.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-KMZG24OE.mjs → ManagedNewsletterForm-ARSY2VHC.mjs} +6 -6
- package/dist/{ManagedNewsletterForm-KMZG24OE.mjs.map → ManagedNewsletterForm-ARSY2VHC.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-CTC33B2U.js → ManagedNewsletterForm-HJZNUABY.js} +7 -7
- package/dist/{ManagedNewsletterForm-CTC33B2U.js.map → ManagedNewsletterForm-HJZNUABY.js.map} +1 -1
- package/dist/{SignalCore-YIPKKIUG.mjs → SignalCore-N2LKG4XN.mjs} +5 -5
- package/dist/{SignalCore-YIPKKIUG.mjs.map → SignalCore-N2LKG4XN.mjs.map} +1 -1
- package/dist/{SignalCore-YHT7WPXV.js → SignalCore-P2JUY2BO.js} +11 -11
- package/dist/{SignalCore-YHT7WPXV.js.map → SignalCore-P2JUY2BO.js.map} +1 -1
- package/dist/SitemapSync-KFY4PJ7G.js +19 -0
- package/dist/{SitemapSync-GN4OXIM2.js.map → SitemapSync-KFY4PJ7G.js.map} +1 -1
- package/dist/SitemapSync-UYDL7T4M.mjs +10 -0
- package/dist/{SitemapSync-NG763CGN.mjs.map → SitemapSync-UYDL7T4M.mjs.map} +1 -1
- package/dist/analytics/index.js +14 -13
- package/dist/analytics/index.mjs +6 -5
- package/dist/articles/index.js +1 -1
- package/dist/articles/index.mjs +1 -1
- package/dist/articles/server-ui.js +1 -1
- package/dist/articles/server-ui.mjs +1 -1
- package/dist/articles/types.d.ts +6 -0
- package/dist/articles/types.d.ts.map +1 -1
- package/dist/{chunk-KZBDH5A3.js → chunk-34XL7TVH.js} +4 -4
- package/dist/{chunk-KZBDH5A3.js.map → chunk-34XL7TVH.js.map} +1 -1
- package/dist/{chunk-5T3J24K4.mjs → chunk-3BLKKF67.mjs} +4 -4
- package/dist/{chunk-5T3J24K4.mjs.map → chunk-3BLKKF67.mjs.map} +1 -1
- package/dist/{chunk-5W4S7XQD.js → chunk-3EAS4PAT.js} +3 -3
- package/dist/{chunk-5W4S7XQD.js.map → chunk-3EAS4PAT.js.map} +1 -1
- package/dist/{chunk-LPDXS2B2.mjs → chunk-42LLFAJQ.mjs} +3 -3
- package/dist/{chunk-LPDXS2B2.mjs.map → chunk-42LLFAJQ.mjs.map} +1 -1
- package/dist/{chunk-TIFVAASU.mjs → chunk-5YA6SI4Z.mjs} +2 -2
- package/dist/{chunk-S5QKNXLQ.js → chunk-5ZMTEK7U.js} +10 -10
- package/dist/{chunk-S5QKNXLQ.js.map → chunk-5ZMTEK7U.js.map} +1 -1
- package/dist/{chunk-YACU35MY.js → chunk-6OQYRVMI.js} +9 -9
- package/dist/{chunk-YACU35MY.js.map → chunk-6OQYRVMI.js.map} +1 -1
- package/dist/{chunk-4C3INRHE.mjs → chunk-7F66Y4MA.mjs} +5 -5
- package/dist/{chunk-4C3INRHE.mjs.map → chunk-7F66Y4MA.mjs.map} +1 -1
- package/dist/{chunk-GSU6VTCZ.mjs → chunk-A2HL22BO.mjs} +3 -3
- package/dist/{chunk-GSU6VTCZ.mjs.map → chunk-A2HL22BO.mjs.map} +1 -1
- package/dist/{chunk-XZHR4E2D.js → chunk-AL4Z6VYF.js} +8 -8
- package/dist/{chunk-XZHR4E2D.js.map → chunk-AL4Z6VYF.js.map} +1 -1
- package/dist/{chunk-ZEBOOUBP.mjs → chunk-B6QPCAEG.mjs} +3 -3
- package/dist/{chunk-ZEBOOUBP.mjs.map → chunk-B6QPCAEG.mjs.map} +1 -1
- package/dist/{chunk-HTCNRTN6.js → chunk-BHZHWXER.js} +8 -8
- package/dist/{chunk-HTCNRTN6.js.map → chunk-BHZHWXER.js.map} +1 -1
- package/dist/{chunk-TPDDSEL3.mjs → chunk-BNKBRLJK.mjs} +3 -3
- package/dist/{chunk-TPDDSEL3.mjs.map → chunk-BNKBRLJK.mjs.map} +1 -1
- package/dist/{chunk-A6UYV475.mjs → chunk-CABEVWKJ.mjs} +4 -24
- package/dist/chunk-CABEVWKJ.mjs.map +1 -0
- package/dist/{chunk-VMNPLCZB.js → chunk-CM4AVKXR.js} +14 -14
- package/dist/{chunk-VMNPLCZB.js.map → chunk-CM4AVKXR.js.map} +1 -1
- package/dist/{chunk-KOPFFKG2.mjs → chunk-D3WJMSTB.mjs} +3 -3
- package/dist/{chunk-KOPFFKG2.mjs.map → chunk-D3WJMSTB.mjs.map} +1 -1
- package/dist/{chunk-JXRGIE3V.mjs → chunk-DWZGW77V.mjs} +4 -4
- package/dist/{chunk-JXRGIE3V.mjs.map → chunk-DWZGW77V.mjs.map} +1 -1
- package/dist/{chunk-USQPRLSG.mjs → chunk-FPVYKSXE.mjs} +13 -10
- package/dist/chunk-FPVYKSXE.mjs.map +1 -0
- package/dist/{chunk-VDEQVXNV.js → chunk-G2KGHIAP.js} +3 -3
- package/dist/{chunk-VDEQVXNV.js.map → chunk-G2KGHIAP.js.map} +1 -1
- package/dist/chunk-GIGUDKLS.mjs +6 -0
- package/dist/{chunk-K3PVUXKB.mjs.map → chunk-GIGUDKLS.mjs.map} +1 -1
- package/dist/{chunk-XXSSUCJB.js → chunk-I7AZC5ZQ.js} +2 -2
- package/dist/{chunk-C7J4XLBN.js → chunk-IO65ROAO.js} +15 -15
- package/dist/{chunk-C7J4XLBN.js.map → chunk-IO65ROAO.js.map} +1 -1
- package/dist/chunk-JCDX37BY.js +58 -0
- package/dist/chunk-JCDX37BY.js.map +1 -0
- package/dist/{chunk-7K6L33BX.mjs → chunk-JOYMIGR2.mjs} +22 -22
- package/dist/{chunk-ATPQ6264.js → chunk-JS75ORH7.js} +24 -24
- package/dist/{chunk-BI7DH42Z.mjs → chunk-MDQLON5R.mjs} +5 -5
- package/dist/{chunk-BI7DH42Z.mjs.map → chunk-MDQLON5R.mjs.map} +1 -1
- package/dist/{chunk-GXSSFQ5D.js → chunk-MHKD34B4.js} +15 -15
- package/dist/{chunk-GXSSFQ5D.js.map → chunk-MHKD34B4.js.map} +1 -1
- package/dist/chunk-MXJOKOFK.mjs +51 -0
- package/dist/chunk-MXJOKOFK.mjs.map +1 -0
- package/dist/{chunk-5RNAUYWE.js → chunk-NH2P27MA.js} +4 -27
- package/dist/chunk-NH2P27MA.js.map +1 -0
- package/dist/{chunk-ZUQSVCMD.js → chunk-NN2YE5WT.js} +3 -3
- package/dist/{chunk-RH4XEXTK.mjs → chunk-NNZDWY3L.mjs} +3 -3
- package/dist/{chunk-SBTA6B6Y.mjs → chunk-OFBEBMXN.mjs} +4 -4
- package/dist/{chunk-SBTA6B6Y.mjs.map → chunk-OFBEBMXN.mjs.map} +1 -1
- package/dist/{chunk-HSLPN3QK.js → chunk-OY3PDIB3.js} +10 -10
- package/dist/{chunk-HSLPN3QK.js.map → chunk-OY3PDIB3.js.map} +1 -1
- package/dist/{chunk-ZOBUA65N.js → chunk-PFDRQJKJ.js} +14 -14
- package/dist/{chunk-ZOBUA65N.js.map → chunk-PFDRQJKJ.js.map} +1 -1
- package/dist/{chunk-YRKWJCML.mjs → chunk-PGYOBEPL.mjs} +3 -3
- package/dist/{chunk-YRKWJCML.mjs.map → chunk-PGYOBEPL.mjs.map} +1 -1
- package/dist/{chunk-U5NFIHLY.js → chunk-PIPGH7GA.js} +4 -4
- package/dist/{chunk-U5NFIHLY.js.map → chunk-PIPGH7GA.js.map} +1 -1
- package/dist/chunk-PURI56RE.js +8 -0
- package/dist/{chunk-CIB3RHNZ.js.map → chunk-PURI56RE.js.map} +1 -1
- package/dist/{chunk-EWDWLY74.js → chunk-QCS7NWMA.js} +15 -12
- package/dist/chunk-QCS7NWMA.js.map +1 -0
- package/dist/{chunk-W7IAG5YD.js → chunk-RMDH2HMW.js} +3 -3
- package/dist/{chunk-W7IAG5YD.js.map → chunk-RMDH2HMW.js.map} +1 -1
- package/dist/{chunk-U4CYO4NG.js → chunk-SUGBIEYQ.js} +9 -9
- package/dist/{chunk-U4CYO4NG.js.map → chunk-SUGBIEYQ.js.map} +1 -1
- package/dist/{chunk-M62L2N5A.mjs → chunk-SVCKJ5KH.mjs} +4 -4
- package/dist/{chunk-M62L2N5A.mjs.map → chunk-SVCKJ5KH.mjs.map} +1 -1
- package/dist/{chunk-6QPKC6XP.mjs → chunk-THO4NS6Z.mjs} +3 -3
- package/dist/{chunk-6QPKC6XP.mjs.map → chunk-THO4NS6Z.mjs.map} +1 -1
- package/dist/{chunk-WIWHM47B.mjs → chunk-TPEPAHU5.mjs} +3 -3
- package/dist/{chunk-WIWHM47B.mjs.map → chunk-TPEPAHU5.mjs.map} +1 -1
- package/dist/{chunk-CUZ3I6CO.js → chunk-U577ITSA.js} +5 -5
- package/dist/{chunk-CUZ3I6CO.js.map → chunk-U577ITSA.js.map} +1 -1
- package/dist/{chunk-5BARLEAI.mjs → chunk-UCQDE5UH.mjs} +3 -3
- package/dist/{chunk-5BARLEAI.mjs.map → chunk-UCQDE5UH.mjs.map} +1 -1
- package/dist/{chunk-QOKMH2TD.mjs → chunk-VA2O5OSV.mjs} +3 -3
- package/dist/{chunk-QOKMH2TD.mjs.map → chunk-VA2O5OSV.mjs.map} +1 -1
- package/dist/{chunk-M3JCHPK3.mjs → chunk-VJTKIKZY.mjs} +5 -5
- package/dist/{chunk-M3JCHPK3.mjs.map → chunk-VJTKIKZY.mjs.map} +1 -1
- package/dist/{chunk-F2GECCK7.js → chunk-VUAGR6VL.js} +12 -12
- package/dist/{chunk-F2GECCK7.js.map → chunk-VUAGR6VL.js.map} +1 -1
- package/dist/{chunk-24LFAQEG.mjs → chunk-XEOIGCUE.mjs} +5 -5
- package/dist/{chunk-24LFAQEG.mjs.map → chunk-XEOIGCUE.mjs.map} +1 -1
- package/dist/{chunk-GGGX54ZE.js → chunk-ZXC56JS3.js} +14 -14
- package/dist/{chunk-GGGX54ZE.js.map → chunk-ZXC56JS3.js.map} +1 -1
- package/dist/cli/index.js +211 -211
- package/dist/cli/index.mjs +151 -151
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/commerce/index.js +59 -58
- package/dist/commerce/index.mjs +7 -6
- package/dist/engage/index.js +11 -10
- package/dist/engage/index.js.map +1 -1
- package/dist/engage/index.mjs +8 -7
- package/dist/engage/index.mjs.map +1 -1
- package/dist/fleet/index.js +10 -9
- package/dist/fleet/index.mjs +6 -5
- package/dist/forms/index.js +13 -13
- package/dist/forms/index.mjs +7 -7
- package/dist/forms/server.js +2 -2
- package/dist/forms/server.mjs +1 -1
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.js +65 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -10
- package/dist/index.mjs.map +1 -1
- package/dist/layout/SiteKitClientProviders.d.ts.map +1 -1
- package/dist/layout/client.d.ts.map +1 -1
- package/dist/layout/client.js +10 -9
- package/dist/layout/client.mjs +9 -8
- package/dist/layout/index.js +12 -11
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +10 -9
- package/dist/layout/index.mjs.map +1 -1
- package/dist/layout/types.d.ts +6 -0
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/{lib-6GWWPDJR.js → lib-6HOOMENJ.js} +7 -7
- package/dist/{lib-WFB5RLEQ.js → lib-BGAWCSUH.js} +8 -8
- package/dist/{lib-N5PD6JNJ.mjs → lib-R7IQ4ZHE.mjs} +2 -2
- package/dist/lib-RSDMEKDQ.mjs +4 -0
- package/dist/maps/index.js +5 -5
- package/dist/maps/index.mjs +3 -3
- package/dist/portfolio/contract.d.ts +93 -0
- package/dist/portfolio/contract.d.ts.map +1 -1
- package/dist/portfolio/contract.js +94 -1
- package/dist/portfolio/contract.js.map +1 -1
- package/dist/portfolio/contract.mjs +79 -2
- package/dist/portfolio/contract.mjs.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/search/index.mjs +3 -3
- package/dist/seo/client.js +7 -6
- package/dist/seo/client.mjs +6 -5
- package/dist/seo/index.js +7 -6
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +6 -5
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/register-sitemap-cli.js +2 -2
- package/dist/seo/register-sitemap-cli.mjs +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/shared/frame.d.ts +15 -0
- package/dist/shared/frame.d.ts.map +1 -1
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sync/index.js +17 -17
- package/dist/sync/index.mjs +4 -4
- package/dist/{web-vitals.attribution-CHXXWO72.mjs → web-vitals.attribution-7LKLZ5GR.mjs} +3 -3
- package/dist/web-vitals.attribution-7LKLZ5GR.mjs.map +1 -0
- package/dist/{web-vitals.attribution-SQVZNHN3.js → web-vitals.attribution-ONVYQNRB.js} +3 -3
- package/dist/web-vitals.attribution-ONVYQNRB.js.map +1 -0
- package/package.json +19 -21
- package/dist/AnalyticsProvider-4K5T7OQ7.mjs +0 -12
- package/dist/AnalyticsProvider-QXZN5O6D.js +0 -33
- package/dist/EngageWidget-S234YAT2.js +0 -21
- package/dist/EngageWidget-SQU4T7CI.mjs +0 -12
- package/dist/ManagedForm-4PZOCKCV.mjs +0 -16
- package/dist/ManagedForm-JCMEE626.js +0 -25
- package/dist/SitemapSync-GN4OXIM2.js +0 -18
- package/dist/SitemapSync-NG763CGN.mjs +0 -9
- package/dist/chunk-5RNAUYWE.js.map +0 -1
- package/dist/chunk-A6UYV475.mjs.map +0 -1
- package/dist/chunk-CIB3RHNZ.js +0 -8
- package/dist/chunk-EWDWLY74.js.map +0 -1
- package/dist/chunk-K3PVUXKB.mjs +0 -6
- package/dist/chunk-USQPRLSG.mjs.map +0 -1
- package/dist/lib-BD4KKQBI.mjs +0 -4
- package/dist/web-vitals.attribution-CHXXWO72.mjs.map +0 -1
- package/dist/web-vitals.attribution-SQVZNHN3.js.map +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { SitemapSync } from './chunk-M62L2N5A.mjs';
|
|
2
|
-
import './chunk-C2CTLLIO.mjs';
|
|
3
|
-
import './chunk-A6UYV475.mjs';
|
|
4
|
-
import './chunk-5T3J24K4.mjs';
|
|
5
|
-
import './chunk-YRKWJCML.mjs';
|
|
6
|
-
import './chunk-K3PVUXKB.mjs';
|
|
7
|
-
import './chunk-BEXTDHO4.mjs';
|
|
8
|
-
//# sourceMappingURL=SitemapSync-NG763CGN.mjs.map
|
|
9
|
-
//# sourceMappingURL=SitemapSync-NG763CGN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/frame.ts","../src/shared/reporting-gate.ts"],"names":[],"mappings":";;;AA4DO,SAAS,QAAA,GAAoB;AAClC,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,KAAA;AAC1C,EAAA,IAAI;AACF,IAAA,OAAO,MA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A,KAAmB,IAAA,GAAO,gBAAA,GACrD,CAAC,OAAA,CAAQ,YAAA,IAAgB,kBAAA,EAAmB,GAAI,cAAA,GAAiB,IAAA;AACrE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,OAAA,CAAQ,KAAA,IAAS,CAAC,oBAAA,EAAsB;AAC1C,MAAA,oBAAA,GAAuB,IAAA;AACvB,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,+CAAA,EAAkD,KAAK,CAAA,sBAAA,CAAwB,CAAA;AAAA,IAC9F;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,EAAE,QAAQ,MAAA,EAAO;AAC1B","file":"chunk-5RNAUYWE.js","sourcesContent":["/**\n * @sonordev/site-kit shared — am I inside someone else's page?\n *\n * SINGLE SOURCE OF TRUTH for the frame relationship. Any module that has to\n * decide whether this document is an embed imports from here; nobody writes a\n * second `window.top` check. Two copies of this rule would drift, and the\n * drift is invisible — a module that answers \"not framed\" when it is just\n * quietly writes another tenant's traffic into a client's project.\n *\n * ─── Why it exists ─────────────────────────────────────────────────────────\n *\n * Upforge case studies embed each client's whole production site in three\n * eager iframes (agency-site-kit `DeviceTrifolio`), and\n * `proxy/securityHeaders.ts`'s DEFAULT_FRAME_ANCESTORS lets upforge.io and\n * upforgelabs.com frame every managed site. Inside that frame the client's\n * site loads, hydrates and runs its site-kit modules exactly as it would for\n * a real visitor — the screenshot overlay covers the PIXELS, not the\n * JavaScript. Anything that phones home from there is attributing a visit to\n * upforge.io's page to the client's own project. Measured effect, and the\n * analytics decision built on this: `analytics/send-gate.ts`.\n *\n * ─── Detection ─────────────────────────────────────────────────────────────\n *\n * `window.self !== window.top` is the reliable signal. `top` is a\n * cross-origin-readable property, so the comparison never throws — unlike\n * touching `top.location`, which is exactly what makes the naive check\n * unusable and is the reason this is written down once.\n *\n * Same-origin is then probed by *actually reading* `top.location.href` and\n * catching the SecurityError. That is the only honest test: comparing URL\n * strings cannot see through a sandboxed, opaque, or `about:blank` origin,\n * and would call a hostile embedder same-origin if it faked the right host.\n *\n * The probe only runs when the document IS framed, so the top-level case —\n * every real visitor on every site — costs one property comparison and never\n * enters a try/catch.\n *\n * ─── Same-origin frames are NOT treated as embeds ──────────────────────────\n *\n * Being framed is not the problem; being framed by SOMEONE ELSE is. When the\n * top document is same-origin the site is embedding itself — a preview pane,\n * a print view, an on-domain booking or checkout frame. The visitor really is\n * on that site, the operator controls both documents, and there is no other\n * tenant's project to pollute. Callers should keep working normally there;\n * treating it as an embed would drop legitimate data to buy nothing.\n *\n * Nesting resolves the way you would want, because these compare against\n * `window.top` and not `window.parent`: a same-origin frame nested inside a\n * cross-origin one (upforge.io → client.com → client.com/widget) is still\n * correctly reported as a cross-origin embed.\n */\n\n/**\n * True when this document is not the top-level browsing context.\n *\n * Never throws in practice; the catch exists so a hostile or exotic embedder\n * cannot crash a caller, and it fails CLOSED (treat \"cannot tell\" as framed).\n * A false positive costs one site some of its own data; a false negative\n * writes into someone else's — the asymmetry decides the default.\n */\nexport function isFramed(): boolean {\n if (typeof window === 'undefined') return false\n try {\n return window.self !== window.top\n } catch {\n return true\n }\n}\n\n/**\n * True when the TOP document is same-origin and therefore readable.\n * Only meaningful when {@link isFramed} is true.\n */\nexport function isTopFrameSameOrigin(): boolean {\n if (typeof window === 'undefined') return false\n try {\n return typeof window.top?.location?.href === 'string'\n } catch {\n return false\n }\n}\n\n/**\n * True when this document is running inside a CROSS-ORIGIN frame — i.e. it is\n * someone else's embed, and its activity is not this site's traffic.\n */\nexport function isCrossOriginFrame(): boolean {\n if (!isFramed()) return false\n return !isTopFrameSameOrigin()\n}\n","/**\n * Single source of truth for client reporting eligibility and credentials.\n * Analytics, fleet, SitemapSync and Engage all resolve through this gate.\n * Kept separate from transport wrappers so non-analytics modules stay lean.\n */\n\nimport { isCrossOriginFrame } from './frame'\n\n/** Resolved destination for an analytics send. */\nexport interface AnalyticsTarget {\n apiUrl: string\n apiKey: string\n}\n\nexport interface AnalyticsGateOptions {\n /** `apiUrl` prop, when the caller was given one. Falls back to the window global. */\n apiUrl?: string\n /** `apiKey` prop, when the caller was given one. Falls back to the window global. */\n apiKey?: string\n /**\n * Opt back in to reporting from inside a cross-origin frame. For a site\n * deliberately distributed as an embed (a widget, a partner-hosted\n * booking or menu page) the frame IS the product, and its traffic is real.\n * Explicit per-site config only — see AnalyticsConfig.allowInFrame. There\n * is deliberately no window global or env var for this: a silent switch\n * that turns cross-tenant tracking back on is the failure mode, not the\n * feature.\n */\n allowInFrame?: boolean\n /** Explicitly allow reporting from local browser hosts. Default false. */\n allowLocalhost?: boolean\n /** Emit the one-time diagnostic when a send is suppressed. */\n debug?: boolean\n}\n\n// Re-exported so analytics consumers have one import for the whole decision.\nexport { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from './frame'\n\n/**\n * One `console.info` per document, not one per event. A framed page fires\n * page view + journey + vitals + a click's worth of heatmap rows; logging\n * each suppression would turn a correct decision into console spam (and\n * Lighthouse best-practices noise) in someone else's page.\n */\nlet announcedSuppression = false\n\n/** Test seam — resets the once-per-document log latch. */\nexport function __resetSendGate(): void {\n announcedSuppression = false\n}\n\n/**\n * Resolve where an analytics call should go, or `null` if it must not happen.\n *\n * Returning `null` is the ONLY \"do not send\" signal in this module. Callers\n * that set up listeners or scrape the DOM should resolve first and bail on\n * `null`, so a blocked document never even attaches a scroll or click\n * listener — the guard saves the work, not just the request.\n */\nexport function resolveAnalyticsTarget(\n options: AnalyticsGateOptions = {},\n): AnalyticsTarget | null {\n const config = typeof window === 'undefined' ? undefined : window as Window & {\n __SITE_KIT_API_URL__?: string\n __SITE_KIT_API_KEY__?: string\n }\n const apiUrl = options.apiUrl || config?.__SITE_KIT_API_URL__ || 'https://api.sonor.io'\n const apiKey = options.apiKey || config?.__SITE_KIT_API_KEY__\n\n if (!apiKey) return null\n\n // Single source of truth for browser reporting: use the actual document\n // hostname, NEVER analytics.site or NEXT_PUBLIC_SITE_URL (often production\n // domains even when next start is being verified on localhost).\n const hostname = (config?.location?.hostname || '').toLowerCase().replace(/\\.+$/, '')\n const local = hostname === 'localhost' || hostname.endsWith('.localhost') ||\n hostname === '127.0.0.1' || hostname === '[::1]' || hostname === '::1' ||\n hostname === '0.0.0.0'\n const optIn = local && options.allowLocalhost !== true ? 'allowLocalhost'\n : !options.allowInFrame && isCrossOriginFrame() ? 'allowInFrame' : null\n if (optIn) {\n if (options.debug && !announcedSuppression) {\n announcedSuppression = true\n console.info(`[Site-kit] Reporting suppressed. Set analytics.${optIn} to explicitly opt in.`)\n }\n return null\n }\n\n return { apiUrl, apiKey }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/frame.ts","../src/shared/reporting-gate.ts"],"names":[],"mappings":";AA4DO,SAAS,QAAA,GAAoB;AAClC,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,KAAA;AAC1C,EAAA,IAAI;AACF,IAAA,OAAO,MAAA,CAAO,SAAS,MAAA,CAAO,GAAA;AAAA,EAChC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAMO,SAAS,oBAAA,GAAgC;AAC9C,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,KAAA;AAC1C,EAAA,IAAI;AACF,IAAA,OAAO,OAAO,MAAA,CAAO,GAAA,EAAK,QAAA,EAAU,IAAA,KAAS,QAAA;AAAA,EAC/C,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAMO,SAAS,kBAAA,GAA8B;AAC5C,EAAA,IAAI,CAAC,QAAA,EAAS,EAAG,OAAO,KAAA;AACxB,EAAA,OAAO,CAAC,oBAAA,EAAqB;AAC/B;;;AC7CA,IAAI,oBAAA,GAAuB,KAAA;AAepB,SAAS,sBAAA,CACd,OAAA,GAAgC,EAAC,EACT;AACxB,EAAA,MAAM,MAAA,GAAS,OAAO,MAAA,KAAW,WAAA,GAAc,MAAA,GAAY,MAAA;AAI3D,EAAA,MAAM,MAAA,GAAS,OAAA,CAAQ,MAAA,IAAU,MAAA,EAAQ,oBAAA,IAAwB,sBAAA;AACjE,EAAA,MAAM,MAAA,GAAS,OAAA,CAAQ,MAAA,IAAU,MAAA,EAAQ,oBAAA;AAEzC,EAAA,IAAI,CAAC,QAAQ,OAAO,IAAA;AAKpB,EAAA,MAAM,QAAA,GAAA,CAAY,QAAQ,QAAA,EAAU,QAAA,IAAY,IAAI,WAAA,EAAY,CAAE,OAAA,CAAQ,MAAA,EAAQ,EAAE,CAAA;AACpF,EAAA,MAAM,KAAA,GAAQ,QAAA,KAAa,WAAA,IAAe,QAAA,CAAS,QAAA,CAAS,YAAY,CAAA,IACtE,QAAA,KAAa,WAAA,IAAe,QAAA,KAAa,OAAA,IAAW,QAAA,KAAa,SACjE,QAAA,KAAa,SAAA;AACf,EAAA,MAAM,KAAA,GAAQ,KAAA,IAAS,OAAA,CAAQ,cAAA,KAAmB,IAAA,GAAO,gBAAA,GACrD,CAAC,OAAA,CAAQ,YAAA,IAAgB,kBAAA,EAAmB,GAAI,cAAA,GAAiB,IAAA;AACrE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,OAAA,CAAQ,KAAA,IAAS,CAAC,oBAAA,EAAsB;AAC1C,MAAA,oBAAA,GAAuB,IAAA;AACvB,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,+CAAA,EAAkD,KAAK,CAAA,sBAAA,CAAwB,CAAA;AAAA,IAC9F;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,EAAE,QAAQ,MAAA,EAAO;AAC1B","file":"chunk-A6UYV475.mjs","sourcesContent":["/**\n * @sonordev/site-kit shared — am I inside someone else's page?\n *\n * SINGLE SOURCE OF TRUTH for the frame relationship. Any module that has to\n * decide whether this document is an embed imports from here; nobody writes a\n * second `window.top` check. Two copies of this rule would drift, and the\n * drift is invisible — a module that answers \"not framed\" when it is just\n * quietly writes another tenant's traffic into a client's project.\n *\n * ─── Why it exists ─────────────────────────────────────────────────────────\n *\n * Upforge case studies embed each client's whole production site in three\n * eager iframes (agency-site-kit `DeviceTrifolio`), and\n * `proxy/securityHeaders.ts`'s DEFAULT_FRAME_ANCESTORS lets upforge.io and\n * upforgelabs.com frame every managed site. Inside that frame the client's\n * site loads, hydrates and runs its site-kit modules exactly as it would for\n * a real visitor — the screenshot overlay covers the PIXELS, not the\n * JavaScript. Anything that phones home from there is attributing a visit to\n * upforge.io's page to the client's own project. Measured effect, and the\n * analytics decision built on this: `analytics/send-gate.ts`.\n *\n * ─── Detection ─────────────────────────────────────────────────────────────\n *\n * `window.self !== window.top` is the reliable signal. `top` is a\n * cross-origin-readable property, so the comparison never throws — unlike\n * touching `top.location`, which is exactly what makes the naive check\n * unusable and is the reason this is written down once.\n *\n * Same-origin is then probed by *actually reading* `top.location.href` and\n * catching the SecurityError. That is the only honest test: comparing URL\n * strings cannot see through a sandboxed, opaque, or `about:blank` origin,\n * and would call a hostile embedder same-origin if it faked the right host.\n *\n * The probe only runs when the document IS framed, so the top-level case —\n * every real visitor on every site — costs one property comparison and never\n * enters a try/catch.\n *\n * ─── Same-origin frames are NOT treated as embeds ──────────────────────────\n *\n * Being framed is not the problem; being framed by SOMEONE ELSE is. When the\n * top document is same-origin the site is embedding itself — a preview pane,\n * a print view, an on-domain booking or checkout frame. The visitor really is\n * on that site, the operator controls both documents, and there is no other\n * tenant's project to pollute. Callers should keep working normally there;\n * treating it as an embed would drop legitimate data to buy nothing.\n *\n * Nesting resolves the way you would want, because these compare against\n * `window.top` and not `window.parent`: a same-origin frame nested inside a\n * cross-origin one (upforge.io → client.com → client.com/widget) is still\n * correctly reported as a cross-origin embed.\n */\n\n/**\n * True when this document is not the top-level browsing context.\n *\n * Never throws in practice; the catch exists so a hostile or exotic embedder\n * cannot crash a caller, and it fails CLOSED (treat \"cannot tell\" as framed).\n * A false positive costs one site some of its own data; a false negative\n * writes into someone else's — the asymmetry decides the default.\n */\nexport function isFramed(): boolean {\n if (typeof window === 'undefined') return false\n try {\n return window.self !== window.top\n } catch {\n return true\n }\n}\n\n/**\n * True when the TOP document is same-origin and therefore readable.\n * Only meaningful when {@link isFramed} is true.\n */\nexport function isTopFrameSameOrigin(): boolean {\n if (typeof window === 'undefined') return false\n try {\n return typeof window.top?.location?.href === 'string'\n } catch {\n return false\n }\n}\n\n/**\n * True when this document is running inside a CROSS-ORIGIN frame — i.e. it is\n * someone else's embed, and its activity is not this site's traffic.\n */\nexport function isCrossOriginFrame(): boolean {\n if (!isFramed()) return false\n return !isTopFrameSameOrigin()\n}\n","/**\n * Single source of truth for client reporting eligibility and credentials.\n * Analytics, fleet, SitemapSync and Engage all resolve through this gate.\n * Kept separate from transport wrappers so non-analytics modules stay lean.\n */\n\nimport { isCrossOriginFrame } from './frame'\n\n/** Resolved destination for an analytics send. */\nexport interface AnalyticsTarget {\n apiUrl: string\n apiKey: string\n}\n\nexport interface AnalyticsGateOptions {\n /** `apiUrl` prop, when the caller was given one. Falls back to the window global. */\n apiUrl?: string\n /** `apiKey` prop, when the caller was given one. Falls back to the window global. */\n apiKey?: string\n /**\n * Opt back in to reporting from inside a cross-origin frame. For a site\n * deliberately distributed as an embed (a widget, a partner-hosted\n * booking or menu page) the frame IS the product, and its traffic is real.\n * Explicit per-site config only — see AnalyticsConfig.allowInFrame. There\n * is deliberately no window global or env var for this: a silent switch\n * that turns cross-tenant tracking back on is the failure mode, not the\n * feature.\n */\n allowInFrame?: boolean\n /** Explicitly allow reporting from local browser hosts. Default false. */\n allowLocalhost?: boolean\n /** Emit the one-time diagnostic when a send is suppressed. */\n debug?: boolean\n}\n\n// Re-exported so analytics consumers have one import for the whole decision.\nexport { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from './frame'\n\n/**\n * One `console.info` per document, not one per event. A framed page fires\n * page view + journey + vitals + a click's worth of heatmap rows; logging\n * each suppression would turn a correct decision into console spam (and\n * Lighthouse best-practices noise) in someone else's page.\n */\nlet announcedSuppression = false\n\n/** Test seam — resets the once-per-document log latch. */\nexport function __resetSendGate(): void {\n announcedSuppression = false\n}\n\n/**\n * Resolve where an analytics call should go, or `null` if it must not happen.\n *\n * Returning `null` is the ONLY \"do not send\" signal in this module. Callers\n * that set up listeners or scrape the DOM should resolve first and bail on\n * `null`, so a blocked document never even attaches a scroll or click\n * listener — the guard saves the work, not just the request.\n */\nexport function resolveAnalyticsTarget(\n options: AnalyticsGateOptions = {},\n): AnalyticsTarget | null {\n const config = typeof window === 'undefined' ? undefined : window as Window & {\n __SITE_KIT_API_URL__?: string\n __SITE_KIT_API_KEY__?: string\n }\n const apiUrl = options.apiUrl || config?.__SITE_KIT_API_URL__ || 'https://api.sonor.io'\n const apiKey = options.apiKey || config?.__SITE_KIT_API_KEY__\n\n if (!apiKey) return null\n\n // Single source of truth for browser reporting: use the actual document\n // hostname, NEVER analytics.site or NEXT_PUBLIC_SITE_URL (often production\n // domains even when next start is being verified on localhost).\n const hostname = (config?.location?.hostname || '').toLowerCase().replace(/\\.+$/, '')\n const local = hostname === 'localhost' || hostname.endsWith('.localhost') ||\n hostname === '127.0.0.1' || hostname === '[::1]' || hostname === '::1' ||\n hostname === '0.0.0.0'\n const optIn = local && options.allowLocalhost !== true ? 'allowLocalhost'\n : !options.allowInFrame && isCrossOriginFrame() ? 'allowInFrame' : null\n if (optIn) {\n if (options.debug && !announcedSuppression) {\n announcedSuppression = true\n console.info(`[Site-kit] Reporting suppressed. Set analytics.${optIn} to explicitly opt in.`)\n }\n return null\n }\n\n return { apiUrl, apiKey }\n}\n"]}
|
package/dist/chunk-CIB3RHNZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layout/SiteKitClientProviders.tsx"],"names":["dynamic","useDeferredActivation","resolveSiteHost","publishSiteCredential","useState","getOrCreateVisitorId","getOrCreateSessionId","useRef","useCallback","jsx","SignalBridge","React","Suspense","FleetHeartbeat","jsxs","Fragment"],"mappings":";;;;;;;;;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AAA,KAAiB,IAAA;AAAA,UAC/C,cAAA,EAAgB,gBAAgB,cAAA,KAAmB;AAAA;AAAA,WALrC,YAQpB;AAAA,KACF;AAAA,EACF;AAOA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,MAAM,gBAA+B,EAAC;AACtC,IAAA,IAAI,SAAA,EAAW,aAAA,CAAc,IAAA,CAAK,WAAW,CAAA;AAC7C,IAAA,IAAI,MAAA,EAAQ,aAAA,CAAc,IAAA,CAAK,QAAQ,CAAA;AACvC,IAAA,IAAI,MAAA,EAAQ,aAAA,CAAc,IAAA,CAAK,QAAQ,CAAA;AACvC,IAAA,IAAI,WAAA,EAAa,aAAA,CAAc,IAAA,CAAK,aAAa,CAAA;AACjD,IAAA,QAAA,CAAS,IAAA;AAAA,sBACPA,cAAA,CAACE,sBAAA,CAAM,QAAA,EAAN,EACE,QAAA,EAAA,YAAA,oBACCF,cAAA;AAAA,QAACI,+BAAA;AAAA,QAAA;AAAA,UACC,MAAA;AAAA,UACA,MAAA;AAAA,UACA,IAAA;AAAA,UACA,OAAA,EAAS,aAAA;AAAA,UACT,YAAA,EAAc,gBAAgB,YAAA,KAAiB,IAAA;AAAA,UAC/C,cAAA,EAAgB,gBAAgB,cAAA,KAAmB,IAAA;AAAA,UACnD,KAAA,EAAO,KAAA;AAAA,UACP;AAAA;AAAA,WAVc,UAapB;AAAA,KACF;AAAA,EACF;AAEA,EAAA,uBACEC,eAAA,CAAAC,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA;AAAA,GAAA,EACH,CAAA;AAEJ","file":"chunk-EWDWLY74.js","sourcesContent":["'use client'\n\n/**\n * SiteKitClientProviders — Client Island\n *\n * This is the 'use client' boundary for SiteKitLayout.\n * It composes the client-only providers (Analytics, Engage, Signal, SitemapSync)\n * that require React context or browser APIs.\n *\n * All modules are lazy-loaded via next/dynamic so their JS is only downloaded\n * when the feature is enabled — keeping the initial bundle lightweight.\n *\n * All modules share a unified identity (visitor ID + session ID) read from\n * the storage-backed singleton (shared/identity), ensuring consistent\n * tracking across Analytics, Signal, and Engage.\n *\n * 4.0 INVARIANT — CHILDREN ARE NEVER WRAPPED. Every module here renders as a\n * childless sibling AFTER {children}; nothing provides context around page\n * content. That makes the prerender-bailout / remount-flash class of bug\n * structurally impossible. Do not reintroduce a wrapper.\n *\n * Props are passed down from the server-side SiteKitLayout component,\n * which reads env vars at render time.\n */\n\nimport React, { Suspense, useCallback, useRef, useState, type ReactNode } from 'react'\nimport dynamic from 'next/dynamic'\nimport {\n getOrCreateVisitorId,\n getOrCreateSessionId,\n} from '../shared/identity'\n// Defer non-critical module mounting until the page is quiet: the lazy\n// modules below are dynamic(ssr:false) and never render on the server, but\n// rendering them during hydration still kicks off their chunk downloads +\n// mount effects inside the critical startup window. useDeferredActivation\n// holds them until window.load + idle or first interaction — the same\n// strategy as the hand-rolled per-site deferrals this replaces (upforge\n// `deferred-analytics.tsx`, TPS `DeferredAnalytics.tsx`). The hook is public\n// (`@sonordev/site-kit/client`) so sites can reuse it for their own scripts.\nimport { useDeferredActivation } from '../shared/defer'\n// Single source of truth for seeding the token manager + the __SITE_KIT_*\n// globals — shared with the public `SiteKitCredential` component that\n// non-core layouts (agency-site-kit) use. Do not re-inline it here.\nimport { publishSiteCredential, resolveSiteHost } from '../shared/publishCredential'\nimport type { AnalyticsConfig, EngageConfig, SignalConfig } from './types'\n\n// Lazy-load feature modules — JS only downloaded when feature is enabled\nconst LazyAnalyticsProvider = dynamic(\n () => import('../analytics/AnalyticsProvider').then(m => ({ default: m.AnalyticsProvider })),\n { ssr: false },\n)\nconst LazyEngageWidget = dynamic(\n () => import('../engage/EngageWidget').then(m => ({ default: m.EngageWidget })),\n { ssr: false },\n)\nconst LazySitemapSync = dynamic(\n () => import('../SitemapSync').then(m => ({ default: m.SitemapSync })),\n { ssr: false },\n)\n// SignalBridge is imported STATICALLY, not via dynamic(ssr:false): it is a\n// tiny SSR-safe context shell that renders children immediately and\n// lazy-loads its machinery (SignalCore) as a childless sibling internally.\n// Wrapping children in a dynamic(ssr:false) component was the old SSR-bailout\n// failure mode — do not reintroduce it.\nimport { SignalBridge } from '../signal/SignalBridge'\n// Fleet heartbeat: a deferred, CHILDLESS SIBLING (like Analytics/Engage) that\n// reports this site's kit version + active modules once per session, so the\n// platform can see version drift across the fleet. Tiny and SSR-safe — renders\n// null until the shared idle gate fires; never wraps page content.\nimport { FleetHeartbeat } from '../fleet/FleetHeartbeat'\nimport type { FleetModule } from '../fleet/contract'\n\nexport interface SiteKitClientProvidersProps {\n children: ReactNode\n apiKey: string\n apiUrl: string\n projectId?: string\n analytics?: boolean | AnalyticsConfig\n engage?: boolean | EngageConfig\n signal?: boolean | SignalConfig\n /**\n * Runtime SitemapSync from the visitor's browser. Default FALSE — sitemap\n * registration belongs to build time and to sonor-api's nightly reconciler,\n * not to whoever happens to load the page. See SiteKitLayout for the full\n * reasoning; in short, its guards live in session/localStorage, so every new\n * visitor missed them and re-POSTed the whole sitemap.\n */\n sitemapSync?: boolean\n /**\n * Fleet heartbeat — reports kit version + active modules to Sonor once per\n * session so the platform can track version drift and key state across every\n * site. Default true. Deferred exactly like Analytics; never in the hydration\n * path, carries no visitor data.\n */\n fleet?: boolean\n /**\n * Defer Analytics / Engage / SitemapSync until window load + idle or first\n * interaction (default true). Pass false to restore legacy eager mounting\n * on hydration. SignalBridge is never deferred — it must apply experiment\n * variants as early as possible.\n */\n defer?: boolean\n debug?: boolean\n /** Browser-safe Google Maps key, resolved server-side by SiteKitLayout. */\n}\n\nexport function SiteKitClientProviders({\n children,\n apiKey,\n apiUrl,\n projectId,\n analytics = true,\n engage = true,\n signal = false,\n sitemapSync = false,\n fleet = true,\n defer = true,\n debug = false,\n}: SiteKitClientProvidersProps) {\n // One shared activation gate for all deferred siblings, so they mount in a\n // single commit instead of staggered re-renders.\n const modulesReady = useDeferredActivation(defer)\n // Hoist analytics config so the `site` dimension is resolvable up here.\n const analyticsConfig: AnalyticsConfig =\n typeof analytics === 'object' ? analytics : {}\n\n // Resolve the sub-site identifier — the dimension that lets one Sonor project\n // host many sites (e.g. truepowersystems.com + ohiopowerstudies.com under one\n // TPS project). Precedence lives in resolveSiteHost (shared contract):\n // explicit `analytics.site` > NEXT_PUBLIC_SITE_URL host > window.location.host.\n // Needed as a local too — SignalBridge and the analytics config read it below.\n const site = resolveSiteHost(analyticsConfig.site)\n\n // Seed the token manager + publish the window globals modules read from.\n // No-op on the server; runs during render so it lands before child effects.\n publishSiteCredential({ apiKey, apiUrl, site, debug })\n\n // Unified identity — single source of truth for all modules\n const [visitorId] = useState(() => getOrCreateVisitorId())\n const [sessionId] = useState(() => getOrCreateSessionId())\n\n // Page metadata bridge: Analytics writes, Signal reads\n const pageMetadataRef = useRef<Record<string, unknown> | null>(null)\n const onPageMetadata = useCallback((metadata: Record<string, unknown>) => {\n pageMetadataRef.current = metadata\n }, [])\n\n // Children render FIRST and are never re-parented. Siblings accumulate after.\n const siblings: ReactNode[] = []\n\n // SignalBridge — childless sibling (4.0: useSignal reads the module store,\n // so it no longer needs to wrap anything). Not gated on modulesReady:\n // experiment variants must apply as early as possible.\n if (signal) {\n const signalConfig: SignalConfig =\n typeof signal === 'object' ? signal : {}\n siblings.push(\n <SignalBridge\n key=\"sk-signal\"\n enabled\n realtime={signalConfig.realtime !== false}\n experiments={signalConfig.experiments !== false}\n behaviorTracking={signalConfig.behaviorTracking !== false}\n visitorId={visitorId}\n sessionId={sessionId}\n pageMetadataRef={pageMetadataRef}\n />,\n )\n }\n\n // Add Analytics if enabled (renders alongside, doesn't wrap).\n //\n // CRITICAL: LazyAnalyticsProvider is dynamic(..., { ssr: false }). Wrapping\n // {content} inside an ssr:false component makes the entire page tree skip\n // server rendering — the route de-opts to 100% client rendering and the\n // hero / LCP element only paints after hydration (mobile LCP ~4s, Lighthouse\n // ~85). Analytics tracks via effects + a metadata ref, so it never needs to\n // wrap page content — mount it as a childless sibling, exactly like Engage.\n // Each deferred sibling is appended as `{modulesReady && <Module/>}` so the\n // children slot never moves in the tree — flipping ready only mounts the\n // sibling, it never remounts page content.\n if (analytics) {\n siblings.push(\n <React.Fragment key=\"sk-analytics\">\n {modulesReady && (\n <Suspense fallback={null}>\n <LazyAnalyticsProvider\n apiUrl={apiUrl}\n apiKey={apiKey}\n site={site}\n trackPageViews={analyticsConfig.trackPageViews !== false}\n trackWebVitals={analyticsConfig.trackWebVitals !== false}\n trackScrollDepth={analyticsConfig.trackScrollDepth !== false}\n trackClicks={analyticsConfig.trackClicks !== false}\n sessionTimeout={analyticsConfig.sessionDuration}\n excludePaths={analyticsConfig.excludePaths}\n // Off by default: a cross-origin embed of this site reports\n // nothing (see analytics/send-gate.ts). Opt in per site.\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n debug={debug}\n externalVisitorId={visitorId}\n externalSessionId={sessionId}\n onPageMetadata={onPageMetadata}\n />\n </Suspense>\n )}\n </React.Fragment>,\n )\n }\n\n // Engage widget — childless sibling\n if (engage) {\n const engageConfig: EngageConfig =\n typeof engage === 'object' ? engage : {}\n siblings.push(\n <React.Fragment key=\"sk-engage\">\n {modulesReady && (\n <LazyEngageWidget\n apiUrl={apiUrl}\n apiKey={apiKey}\n projectId={projectId}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n position={engageConfig.position || 'bottom-right'}\n offsetBottom={engageConfig.offsetBottom}\n zIndex={engageConfig.zIndex}\n chatEnabled={engageConfig.chatEnabled !== false}\n />\n )}\n </React.Fragment>,\n )\n }\n\n // SitemapSync — childless sibling\n if (sitemapSync) {\n siblings.push(\n <React.Fragment key=\"sk-sitemap\">\n {modulesReady && (\n <LazySitemapSync\n debug={debug}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n />\n )}\n </React.Fragment>,\n )\n }\n\n // Fleet heartbeat — childless sibling on the same modulesReady idle gate.\n // Reports the modules actually enabled on THIS layout (honest client-observable\n // set) so the platform can answer \"which version / modules is each site\n // running\". defer={false}: the modulesReady gate already handled deferral, so\n // the heartbeat fires on mount (still bounded to once per session internally).\n if (fleet) {\n const activeModules: FleetModule[] = []\n if (analytics) activeModules.push('analytics')\n if (engage) activeModules.push('engage')\n if (signal) activeModules.push('signal')\n if (sitemapSync) activeModules.push('sitemapSync')\n siblings.push(\n <React.Fragment key=\"sk-fleet\">\n {modulesReady && (\n <FleetHeartbeat\n apiUrl={apiUrl}\n apiKey={apiKey}\n site={site}\n modules={activeModules}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n defer={false}\n debug={debug}\n />\n )}\n </React.Fragment>,\n )\n }\n\n return (\n <>\n {children}\n {siblings}\n </>\n )\n}\n"]}
|
package/dist/chunk-K3PVUXKB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layout/SiteKitClientProviders.tsx"],"names":[],"mappings":";;;;;;;;;;AA+CA,IAAM,qBAAA,GAAwB,OAAA;AAAA,EAC5B,MAAM,OAAO,kCAAgC,CAAA,CAAE,IAAA,CAAK,QAAM,EAAE,OAAA,EAAS,CAAA,CAAE,iBAAA,EAAkB,CAAE,CAAA;AAAA,EAC3F,EAAE,KAAK,KAAA;AACT,CAAA;AACA,IAAM,gBAAA,GAAmB,OAAA;AAAA,EACvB,MAAM,OAAO,6BAAwB,CAAA,CAAE,IAAA,CAAK,QAAM,EAAE,OAAA,EAAS,CAAA,CAAE,YAAA,EAAa,CAAE,CAAA;AAAA,EAC9E,EAAE,KAAK,KAAA;AACT,CAAA;AACA,IAAM,eAAA,GAAkB,OAAA;AAAA,EACtB,MAAM,OAAO,4BAAgB,CAAA,CAAE,IAAA,CAAK,QAAM,EAAE,OAAA,EAAS,CAAA,CAAE,WAAA,EAAY,CAAE,CAAA;AAAA,EACrE,EAAE,KAAK,KAAA;AACT,CAAA;AAgDO,SAAS,sBAAA,CAAuB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A,UACA,OAAA,EAAS,aAAA;AAAA,UACT,YAAA,EAAc,gBAAgB,YAAA,KAAiB,IAAA;AAAA,UAC/C,cAAA,EAAgB,gBAAgB,cAAA,KAAmB,IAAA;AAAA,UACnD,KAAA,EAAO,KAAA;AAAA,UACP;AAAA;AAAA,WAVc,UAapB;AAAA,KACF;AAAA,EACF;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA;AAAA,GAAA,EACH,CAAA;AAEJ","file":"chunk-USQPRLSG.mjs","sourcesContent":["'use client'\n\n/**\n * SiteKitClientProviders — Client Island\n *\n * This is the 'use client' boundary for SiteKitLayout.\n * It composes the client-only providers (Analytics, Engage, Signal, SitemapSync)\n * that require React context or browser APIs.\n *\n * All modules are lazy-loaded via next/dynamic so their JS is only downloaded\n * when the feature is enabled — keeping the initial bundle lightweight.\n *\n * All modules share a unified identity (visitor ID + session ID) read from\n * the storage-backed singleton (shared/identity), ensuring consistent\n * tracking across Analytics, Signal, and Engage.\n *\n * 4.0 INVARIANT — CHILDREN ARE NEVER WRAPPED. Every module here renders as a\n * childless sibling AFTER {children}; nothing provides context around page\n * content. That makes the prerender-bailout / remount-flash class of bug\n * structurally impossible. Do not reintroduce a wrapper.\n *\n * Props are passed down from the server-side SiteKitLayout component,\n * which reads env vars at render time.\n */\n\nimport React, { Suspense, useCallback, useRef, useState, type ReactNode } from 'react'\nimport dynamic from 'next/dynamic'\nimport {\n getOrCreateVisitorId,\n getOrCreateSessionId,\n} from '../shared/identity'\n// Defer non-critical module mounting until the page is quiet: the lazy\n// modules below are dynamic(ssr:false) and never render on the server, but\n// rendering them during hydration still kicks off their chunk downloads +\n// mount effects inside the critical startup window. useDeferredActivation\n// holds them until window.load + idle or first interaction — the same\n// strategy as the hand-rolled per-site deferrals this replaces (upforge\n// `deferred-analytics.tsx`, TPS `DeferredAnalytics.tsx`). The hook is public\n// (`@sonordev/site-kit/client`) so sites can reuse it for their own scripts.\nimport { useDeferredActivation } from '../shared/defer'\n// Single source of truth for seeding the token manager + the __SITE_KIT_*\n// globals — shared with the public `SiteKitCredential` component that\n// non-core layouts (agency-site-kit) use. Do not re-inline it here.\nimport { publishSiteCredential, resolveSiteHost } from '../shared/publishCredential'\nimport type { AnalyticsConfig, EngageConfig, SignalConfig } from './types'\n\n// Lazy-load feature modules — JS only downloaded when feature is enabled\nconst LazyAnalyticsProvider = dynamic(\n () => import('../analytics/AnalyticsProvider').then(m => ({ default: m.AnalyticsProvider })),\n { ssr: false },\n)\nconst LazyEngageWidget = dynamic(\n () => import('../engage/EngageWidget').then(m => ({ default: m.EngageWidget })),\n { ssr: false },\n)\nconst LazySitemapSync = dynamic(\n () => import('../SitemapSync').then(m => ({ default: m.SitemapSync })),\n { ssr: false },\n)\n// SignalBridge is imported STATICALLY, not via dynamic(ssr:false): it is a\n// tiny SSR-safe context shell that renders children immediately and\n// lazy-loads its machinery (SignalCore) as a childless sibling internally.\n// Wrapping children in a dynamic(ssr:false) component was the old SSR-bailout\n// failure mode — do not reintroduce it.\nimport { SignalBridge } from '../signal/SignalBridge'\n// Fleet heartbeat: a deferred, CHILDLESS SIBLING (like Analytics/Engage) that\n// reports this site's kit version + active modules once per session, so the\n// platform can see version drift across the fleet. Tiny and SSR-safe — renders\n// null until the shared idle gate fires; never wraps page content.\nimport { FleetHeartbeat } from '../fleet/FleetHeartbeat'\nimport type { FleetModule } from '../fleet/contract'\n\nexport interface SiteKitClientProvidersProps {\n children: ReactNode\n apiKey: string\n apiUrl: string\n projectId?: string\n analytics?: boolean | AnalyticsConfig\n engage?: boolean | EngageConfig\n signal?: boolean | SignalConfig\n /**\n * Runtime SitemapSync from the visitor's browser. Default FALSE — sitemap\n * registration belongs to build time and to sonor-api's nightly reconciler,\n * not to whoever happens to load the page. See SiteKitLayout for the full\n * reasoning; in short, its guards live in session/localStorage, so every new\n * visitor missed them and re-POSTed the whole sitemap.\n */\n sitemapSync?: boolean\n /**\n * Fleet heartbeat — reports kit version + active modules to Sonor once per\n * session so the platform can track version drift and key state across every\n * site. Default true. Deferred exactly like Analytics; never in the hydration\n * path, carries no visitor data.\n */\n fleet?: boolean\n /**\n * Defer Analytics / Engage / SitemapSync until window load + idle or first\n * interaction (default true). Pass false to restore legacy eager mounting\n * on hydration. SignalBridge is never deferred — it must apply experiment\n * variants as early as possible.\n */\n defer?: boolean\n debug?: boolean\n /** Browser-safe Google Maps key, resolved server-side by SiteKitLayout. */\n}\n\nexport function SiteKitClientProviders({\n children,\n apiKey,\n apiUrl,\n projectId,\n analytics = true,\n engage = true,\n signal = false,\n sitemapSync = false,\n fleet = true,\n defer = true,\n debug = false,\n}: SiteKitClientProvidersProps) {\n // One shared activation gate for all deferred siblings, so they mount in a\n // single commit instead of staggered re-renders.\n const modulesReady = useDeferredActivation(defer)\n // Hoist analytics config so the `site` dimension is resolvable up here.\n const analyticsConfig: AnalyticsConfig =\n typeof analytics === 'object' ? analytics : {}\n\n // Resolve the sub-site identifier — the dimension that lets one Sonor project\n // host many sites (e.g. truepowersystems.com + ohiopowerstudies.com under one\n // TPS project). Precedence lives in resolveSiteHost (shared contract):\n // explicit `analytics.site` > NEXT_PUBLIC_SITE_URL host > window.location.host.\n // Needed as a local too — SignalBridge and the analytics config read it below.\n const site = resolveSiteHost(analyticsConfig.site)\n\n // Seed the token manager + publish the window globals modules read from.\n // No-op on the server; runs during render so it lands before child effects.\n publishSiteCredential({ apiKey, apiUrl, site, debug })\n\n // Unified identity — single source of truth for all modules\n const [visitorId] = useState(() => getOrCreateVisitorId())\n const [sessionId] = useState(() => getOrCreateSessionId())\n\n // Page metadata bridge: Analytics writes, Signal reads\n const pageMetadataRef = useRef<Record<string, unknown> | null>(null)\n const onPageMetadata = useCallback((metadata: Record<string, unknown>) => {\n pageMetadataRef.current = metadata\n }, [])\n\n // Children render FIRST and are never re-parented. Siblings accumulate after.\n const siblings: ReactNode[] = []\n\n // SignalBridge — childless sibling (4.0: useSignal reads the module store,\n // so it no longer needs to wrap anything). Not gated on modulesReady:\n // experiment variants must apply as early as possible.\n if (signal) {\n const signalConfig: SignalConfig =\n typeof signal === 'object' ? signal : {}\n siblings.push(\n <SignalBridge\n key=\"sk-signal\"\n enabled\n realtime={signalConfig.realtime !== false}\n experiments={signalConfig.experiments !== false}\n behaviorTracking={signalConfig.behaviorTracking !== false}\n visitorId={visitorId}\n sessionId={sessionId}\n pageMetadataRef={pageMetadataRef}\n />,\n )\n }\n\n // Add Analytics if enabled (renders alongside, doesn't wrap).\n //\n // CRITICAL: LazyAnalyticsProvider is dynamic(..., { ssr: false }). Wrapping\n // {content} inside an ssr:false component makes the entire page tree skip\n // server rendering — the route de-opts to 100% client rendering and the\n // hero / LCP element only paints after hydration (mobile LCP ~4s, Lighthouse\n // ~85). Analytics tracks via effects + a metadata ref, so it never needs to\n // wrap page content — mount it as a childless sibling, exactly like Engage.\n // Each deferred sibling is appended as `{modulesReady && <Module/>}` so the\n // children slot never moves in the tree — flipping ready only mounts the\n // sibling, it never remounts page content.\n if (analytics) {\n siblings.push(\n <React.Fragment key=\"sk-analytics\">\n {modulesReady && (\n <Suspense fallback={null}>\n <LazyAnalyticsProvider\n apiUrl={apiUrl}\n apiKey={apiKey}\n site={site}\n trackPageViews={analyticsConfig.trackPageViews !== false}\n trackWebVitals={analyticsConfig.trackWebVitals !== false}\n trackScrollDepth={analyticsConfig.trackScrollDepth !== false}\n trackClicks={analyticsConfig.trackClicks !== false}\n sessionTimeout={analyticsConfig.sessionDuration}\n excludePaths={analyticsConfig.excludePaths}\n // Off by default: a cross-origin embed of this site reports\n // nothing (see analytics/send-gate.ts). Opt in per site.\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n debug={debug}\n externalVisitorId={visitorId}\n externalSessionId={sessionId}\n onPageMetadata={onPageMetadata}\n />\n </Suspense>\n )}\n </React.Fragment>,\n )\n }\n\n // Engage widget — childless sibling\n if (engage) {\n const engageConfig: EngageConfig =\n typeof engage === 'object' ? engage : {}\n siblings.push(\n <React.Fragment key=\"sk-engage\">\n {modulesReady && (\n <LazyEngageWidget\n apiUrl={apiUrl}\n apiKey={apiKey}\n projectId={projectId}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n position={engageConfig.position || 'bottom-right'}\n offsetBottom={engageConfig.offsetBottom}\n zIndex={engageConfig.zIndex}\n chatEnabled={engageConfig.chatEnabled !== false}\n />\n )}\n </React.Fragment>,\n )\n }\n\n // SitemapSync — childless sibling\n if (sitemapSync) {\n siblings.push(\n <React.Fragment key=\"sk-sitemap\">\n {modulesReady && (\n <LazySitemapSync\n debug={debug}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n />\n )}\n </React.Fragment>,\n )\n }\n\n // Fleet heartbeat — childless sibling on the same modulesReady idle gate.\n // Reports the modules actually enabled on THIS layout (honest client-observable\n // set) so the platform can answer \"which version / modules is each site\n // running\". defer={false}: the modulesReady gate already handled deferral, so\n // the heartbeat fires on mount (still bounded to once per session internally).\n if (fleet) {\n const activeModules: FleetModule[] = []\n if (analytics) activeModules.push('analytics')\n if (engage) activeModules.push('engage')\n if (signal) activeModules.push('signal')\n if (sitemapSync) activeModules.push('sitemapSync')\n siblings.push(\n <React.Fragment key=\"sk-fleet\">\n {modulesReady && (\n <FleetHeartbeat\n apiUrl={apiUrl}\n apiKey={apiKey}\n site={site}\n modules={activeModules}\n allowInFrame={analyticsConfig.allowInFrame === true}\n allowLocalhost={analyticsConfig.allowLocalhost === true}\n defer={false}\n debug={debug}\n />\n )}\n </React.Fragment>,\n )\n }\n\n return (\n <>\n {children}\n {siblings}\n </>\n )\n}\n"]}
|
package/dist/lib-BD4KKQBI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/LayoutShiftManager.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/getNavigationEntry.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/getLoadState.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/getSelector.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/initUnique.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/bfcache.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/bindReporter.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/doubleRAF.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/getActivationStart.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/getVisibilityWatcher.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/initMetric.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/generateUniqueID.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/observe.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/softNavs.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/runOnce.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/FCPEntryManager.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/whenActivated.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/onFCP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/onCLS.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/attribution/onCLS.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/attribution/onFCP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/polyfills/interactionCountPolyfill.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/InteractionManager.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/whenIdleOrHidden.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/onINP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/attribution/onINP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/lib/LCPEntryManager.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/onLCP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/attribution/onLCP.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/onTTFB.js","../../../../../../../../Volumes/Uptrade%20Media/GitHub/Sonor/site-kit/node_modules/.pnpm/web-vitals@6.1.0/node_modules/web-vitals/dist/modules/attribution/onTTFB.js"],"names":["LayoutShiftManager","_onAfterProcessingUnexpectedShift","_sessionValue","_sessionEntries","_processEntry","entry","hadRecentInput","firstSessionEntry","this","lastSessionEntry","at","startTime","value","push","getNavigationEntry","navigationEntry","performance","getEntriesByType","responseStart","now","getLoadState","timestamp","document","readyState","hardNavEntry","domInteractive","domContentLoadedEventStart","domComplete","getName","node","name","nodeName","nodeType","toLowerCase","toUpperCase","replace","getSelector","sel","el","part","id","Array","from","classList","sort","join","length","MAX_LEN","parentNode","instanceMap","WeakMap","initUnique","identityObj","ClassObj","classInstances","get","set","bfcacheRestoreTime","getBFCacheRestoreTime","onBFCacheRestore","cb","addEventListener","event","persisted","timeStamp","bindReporter","callback","metric","thresholds","reportAllChanges","prevValue","delta","forceReport","rating","getRating","doubleRAF","requestAnimationFrame","getActivationStart","activationStart","firstHiddenTime","onHiddenFunctions","Set","initHiddenTime","visibilityState","prerendering","Infinity","onVisibilityUpdate","type","onHiddenFunction","isFinite","removeEventListener","getVisibilityWatcher","reset","firstVisibilityStateHiddenTime","globalThis","find","e","setTimeout","onHidden","add","initMetric","navigationType","navigationId","navigationInteractionId","navigationURL","navigationStartTime","hardNavId","_navigationType","wasDiscarded","entries","Date","Math","floor","random","observe","types","opts","supportedTypes","filter","t","PerformanceObserver","supportedEntryTypes","includes","po","list","queueMicrotask","getEntries","a","b","duration","buffered","checkSoftNavsEnabled","PerformanceSoftNavigation","prototype","getLargestInteractionContentfulPaint","reportSoftNavs","storeSoftNavEntry","map","size","firstKey","keys","next","delete","runOnce","called","FCPEntryManager","_softNavigationEntryMap","whenActivated","FCPThresholds","onFCP","onReport","softNavsEnabled","fcpEntryManager","visibilityWatcher","report","disconnect","max","forEach","FCPTime","presentationTime","paintTime","interactionId","CLSThresholds","getLargestLayoutShiftSource","sources","s","onCLS","layoutShiftManager","Object","assign","layoutShiftTargetMap","largestSource","customTarget","generateTarget","initNewCLSMetric","updateAndReportMetric","handleSoftNavEntry","handleEntries","entryType","takeRecords","attribution","largestEntry","reduce","largestShiftTarget","largestShiftTime","largestShiftValue","largestShiftSource","largestShiftEntry","loadState","Map","unattributedOnFCP","timeToFirstByte","firstByteToFCP","fcpEntry","ttfb","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","min","getInteractionCount","interactionCount","initInteractionCountPolyfill","durationThreshold","prevInteractionCount","InteractionManager","_longestInteractionList","_longestInteractionMap","_onBeforeProcessingEntry","_onAfterProcessingINPCandidate","_resetInteractions","clear","_estimateP98LongestInteraction","interactionCountForNavigation","candidateInteractionIndex","_latency","minLongestInteraction","interaction","removedInteractions","splice","whenIdleOrHidden","timeout","rIC","requestIdleCallback","cIC","cancelIdleCallback","clearTimeout","wrappedCb","idleHandle","once","capture","INPThresholds","onINP","interactionManager","pendingLoAFs","pendingEntriesGroups","latestProcessingEnd","entryToEntriesGroupMap","interactionTargetMap","cleanupPending","queueCleanup","cleanupEntries","longestInteractionGroups","i","minIndexToKeep","group","has","intersectingLoAFs","loafs","getIntersectingLoAFs","processingEnd","loaf","renderTime","potentialGroup","abs","processingStart","includeProcessedEventEntries","target","selector","targetSelector","start","end","attributeINP","navStartTime","processedEventEntries","longAnimationFrameEntries","inputDelay","processingDuration","presentationDelay","firstEntry","nextPaintTime","interactionTarget","interactionType","startsWith","interactionTime","longestScript","totalScriptDuration","totalStyleAndLayoutDuration","totalPaintDuration","totalUnattributedDuration","undefined","longestScriptEntry","longestScriptSubpart","longestScriptDuration","loafEntry","styleAndLayoutStart","script","scripts","scriptEndTime","intersectingScriptDuration","intersectingForceStyleAndLayoutDuration","forcedStyleAndLayoutDuration","lastLoAF","lastLoAFEndTime","subpart","intersectingDuration","concat","PerformanceEventTiming","initNewINPMetric","updateINPMetric","inp","LCPEntryManager","LCPThresholds","resourceBufferSizeLimit","resourceBuffer","shift","onLCP","resourceBufferSize","lcpEntryManager","lcpTargetMap","element","isFinalized","initNewLCPMetric","navigation","largestInteractionContentfulPaint","slice","metricEntries","ICPEntry","largestContentfulPaint","finalizeEventTypes","finalizeLCP","isTrusted","metricIdToFinalize","resourceLoadDelay","resourceLoadDuration","elementRenderDelay","lcpEntry","lcpResourceEntry","url","findLast","lcpRequestStart","requestStart","lcpResponseEnd","responseEnd","TTFBThresholds","whenReady","onTTFB","waitingDuration","cacheDuration","dnsDuration","connectionDuration","requestDuration","PerformanceNavigationTiming","waitEnd","workerStart","fetchStart","dnsStart","domainLookupStart","connectStart","connectEnd"],"mappings":";;;AAgBM,IAAOA,IAAP,MAAOA;AAAP,EAAA,WAAA,GAAA;AACJC,IAAAA,aAAAA,CAAAA,IAAAA,EAAAA,GAAAA,CAAAA;AAEAC,IAAAA,aAAAA,CAAAA,IAAAA,EAAAA,GAAAA,EAAg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C7B,CAAA,CAAA;AAGFsG,QAAAA,KAAc,EACZ6J,eAAAA,EAAiBM,IACjBL,aAAAA,EAAeQ,EAAAA,GAAWH,IAG1BJ,WAAAA,EAAaS,EAAAA,GAAeF,EAAAA,EAC5BN,kBAAAA,EAAoBS,KAAaD,EAAAA,EAKjCP,eAAAA,EAAiBlR,GAAOvD,KAAAA,GAAQiV,EAAAA,EAChC9U,iBAAiBA,EAAAA,EAAAA;AAErB,MAAA;AAQF,MAAA,OAJyDyJ,OAAOC,MAAAA,CAC9DtG,EAAAA,EACA,EAACiH,WAAAA,EAAAA,IAAAA,CAAAA;AAAAA,IAAAA,CAAAA,EAyBsBjH,EAAAA,CAAAA,CAAAA;AAAAA,EAAAA,CAAAA,EACtBiD,EAAAA,CAAAA;AAAAA","file":"web-vitals.attribution-CHXXWO72.mjs","sourcesContent":["/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class LayoutShiftManager {\n _onAfterProcessingUnexpectedShift;\n _sessionValue = 0;\n _sessionEntries = [];\n _processEntry(entry) {\n // Only count layout shifts without recent user input.\n if (entry.hadRecentInput)\n return;\n const firstSessionEntry = this._sessionEntries[0];\n const lastSessionEntry = this._sessionEntries.at(-1);\n // If the entry occurred less than 1 second after the previous entry\n // and less than 5 seconds after the first entry in the session,\n // include the entry in the current session. Otherwise, start a new\n // session.\n if (this._sessionValue &&\n firstSessionEntry &&\n lastSessionEntry &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000) {\n this._sessionValue += entry.value;\n this._sessionEntries.push(entry);\n }\n else {\n this._sessionValue = entry.value;\n this._sessionEntries = [entry];\n }\n this._onAfterProcessingUnexpectedShift?.(entry);\n }\n}\n//# sourceMappingURL=LayoutShiftManager.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const getNavigationEntry = () => {\n const navigationEntry = performance.getEntriesByType('navigation')[0];\n // Check to ensure the `responseStart` property is present and valid.\n // In some cases a zero value is reported by the browser (for\n // privacy/security reasons), and in other cases (bugs) the value is\n // negative or is larger than the current page time. Ignore these cases:\n // - https://github.com/GoogleChrome/web-vitals/issues/137\n // - https://github.com/GoogleChrome/web-vitals/issues/162\n // - https://github.com/GoogleChrome/web-vitals/issues/275\n if (navigationEntry &&\n navigationEntry.responseStart > 0 &&\n navigationEntry.responseStart < performance.now()) {\n return navigationEntry;\n }\n};\n//# sourceMappingURL=getNavigationEntry.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNavigationEntry } from './getNavigationEntry.js';\nexport const getLoadState = (timestamp) => {\n if (document.readyState === 'loading') {\n // If the `readyState` is 'loading' there's no need to look at timestamps\n // since the timestamp has to be the current time or earlier.\n return 'loading';\n }\n const hardNavEntry = getNavigationEntry();\n if (hardNavEntry) {\n if (timestamp < hardNavEntry.domInteractive) {\n return 'loading';\n }\n else if (hardNavEntry.domContentLoadedEventStart === 0 ||\n timestamp < hardNavEntry.domContentLoadedEventStart) {\n // If the `domContentLoadedEventStart` timestamp has not yet been\n // set, or if the given timestamp is less than that value.\n return 'dom-interactive';\n }\n else if (hardNavEntry.domComplete === 0 ||\n timestamp < hardNavEntry.domComplete) {\n // If the `domComplete` timestamp has not yet been\n // set, or if the given timestamp is less than that value.\n return 'dom-content-loaded';\n }\n }\n // If any of the above fail, default to loaded. This could really only\n // happy if the browser doesn't support the performance timeline, which\n // most likely means this code would never run anyway.\n return 'complete';\n};\n//# sourceMappingURL=getLoadState.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst getName = (node) => {\n const name = node.nodeName;\n return node.nodeType === 1\n ? name.toLowerCase()\n : name.toUpperCase().replace(/^#/, '');\n};\nconst MAX_LEN = 100;\nexport const getSelector = (node) => {\n let sel = '';\n try {\n while (node?.nodeType !== 9) {\n const el = node;\n const part = el.id\n ? '#' + el.id\n : [getName(el), ...Array.from(el.classList ?? []).sort()].join('.');\n if (sel.length + part.length > MAX_LEN - 1) {\n return sel || part;\n }\n sel = sel ? part + '>' + sel : part;\n if (el.id) {\n break;\n }\n node = el.parentNode;\n }\n }\n catch {\n // Do nothing...\n }\n return sel;\n};\n//# sourceMappingURL=getSelector.js.map","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst instanceMap = new WeakMap();\n/**\n * A function that accepts and identity object and a class object and returns\n * either a new instance of that class or an existing instance, if the\n * identity object was previously used.\n */\nexport function initUnique(identityObj, ClassObj) {\n let classInstances = instanceMap.get(ClassObj);\n if (!classInstances) {\n classInstances = new WeakMap();\n instanceMap.set(ClassObj, classInstances);\n }\n if (!classInstances.get(identityObj)) {\n classInstances.set(identityObj, new ClassObj());\n }\n return classInstances.get(identityObj);\n}\n//# sourceMappingURL=initUnique.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nlet bfcacheRestoreTime = -1;\nexport const getBFCacheRestoreTime = () => bfcacheRestoreTime;\nexport const onBFCacheRestore = (cb) => {\n addEventListener('pageshow', (event) => {\n if (event.persisted) {\n bfcacheRestoreTime = event.timeStamp;\n cb(event);\n }\n }, true);\n};\n//# sourceMappingURL=bfcache.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst getRating = (value, thresholds) => {\n if (value > thresholds[1]) {\n return 'poor';\n }\n if (value > thresholds[0]) {\n return 'needs-improvement';\n }\n return 'good';\n};\nexport const bindReporter = (callback, metric, thresholds, reportAllChanges) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue ?? 0);\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n metric.rating = getRating(metric.value, thresholds);\n callback(metric);\n }\n }\n }\n };\n};\n//# sourceMappingURL=bindReporter.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const doubleRAF = (cb) => {\n requestAnimationFrame(() => requestAnimationFrame(cb));\n};\n//# sourceMappingURL=doubleRAF.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNavigationEntry } from './getNavigationEntry.js';\nexport const getActivationStart = () => {\n return getNavigationEntry()?.activationStart ?? 0;\n};\n//# sourceMappingURL=getActivationStart.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { onBFCacheRestore } from './bfcache.js';\nimport { getActivationStart } from './getActivationStart.js';\nlet firstHiddenTime = -1;\nconst onHiddenFunctions = new Set();\nconst initHiddenTime = () => {\n // If the document is hidden when this code runs, assume it was always\n // hidden and the page was loaded in the background, with the one exception\n // that visibility state is always 'hidden' during prerendering, so we have\n // to ignore that case until prerendering finishes (see: `prerenderingchange`\n // event logic below).\n return document.visibilityState === 'hidden' && !document.prerendering\n ? 0\n : Infinity;\n};\nconst onVisibilityUpdate = (event) => {\n // Handle changes to hidden state\n if (document.visibilityState === 'hidden') {\n if (event.type === 'visibilitychange') {\n for (const onHiddenFunction of onHiddenFunctions) {\n onHiddenFunction();\n }\n }\n // If the document is 'hidden' and no previous hidden timestamp has been\n // set (so is infinity), update it based on the current event data.\n if (!isFinite(firstHiddenTime)) {\n // If the event is a 'visibilitychange' event, it means the page was\n // visible prior to this change, so the event timestamp is the first\n // hidden time.\n // However, if the event is not a 'visibilitychange' event, then it must\n // be a 'prerenderingchange' event, and the fact that the document is\n // still 'hidden' from the above check means the tab was activated\n // in a background state and so has always been hidden.\n firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n // We no longer need the `prerenderingchange` event listener now we've\n // set an initial init time so remove that\n // (we'll keep the visibilitychange one for onHiddenFunction above)\n removeEventListener('prerenderingchange', onVisibilityUpdate, true);\n }\n }\n};\nexport const getVisibilityWatcher = (reset = false) => {\n if (reset) {\n firstHiddenTime = Infinity;\n }\n if (firstHiddenTime < 0) {\n // Check if we have a previous hidden `visibility-state` performance entry.\n const activationStart = getActivationStart();\n /* eslint-disable indent */\n const firstVisibilityStateHiddenTime = !document.prerendering\n ? globalThis.performance\n .getEntriesByType('visibility-state')\n .find((e) => e.name === 'hidden' && e.startTime >= activationStart)\n ?.startTime\n : undefined;\n /* eslint-enable indent */\n // Prefer that, but if it's not available and the document is hidden when\n // this code runs, assume it was hidden since navigation start. This isn't\n // a perfect heuristic, but it's the best we can do until the\n // `visibility-state` performance entry becomes available in all browsers.\n firstHiddenTime = firstVisibilityStateHiddenTime ?? initHiddenTime();\n // Listen for visibility changes so we can handle things like bfcache\n // restores and/or prerender without having to examine individual\n // timestamps in detail and also for onHidden function calls.\n addEventListener('visibilitychange', onVisibilityUpdate, true);\n // IMPORTANT: when a page is prerendering, its `visibilityState` is\n // 'hidden', so in order to account for cases where this module checks for\n // visibility during prerendering, an additional check after prerendering\n // completes is also required.\n addEventListener('prerenderingchange', onVisibilityUpdate, true);\n // Reset the time on bfcache restores.\n onBFCacheRestore(() => {\n // Schedule a task in order to track the `visibilityState` once it's\n // had an opportunity to change to visible in all browsers.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1133363\n setTimeout(() => {\n firstHiddenTime = initHiddenTime();\n });\n });\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n onHidden(cb) {\n onHiddenFunctions.add(cb);\n },\n };\n};\n//# sourceMappingURL=getVisibilityWatcher.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getBFCacheRestoreTime } from './bfcache.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\nexport const initMetric = (name, value = -1, navigationType, navigationId = 0, navigationInteractionId, navigationURL, navigationStartTime) => {\n const hardNavEntry = getNavigationEntry();\n const hardNavId = hardNavEntry?.navigationId || 0;\n let _navigationType = 'navigate';\n if (navigationType) {\n // If it was passed in, then use that\n _navigationType = navigationType;\n }\n else if (getBFCacheRestoreTime() >= 0) {\n _navigationType = 'back-forward-cache';\n }\n else if (hardNavEntry) {\n if (document.prerendering || getActivationStart() > 0) {\n _navigationType = 'prerender';\n }\n else if (document.wasDiscarded) {\n _navigationType = 'restore';\n }\n else if (hardNavEntry.type) {\n _navigationType = hardNavEntry.type.replace(/_/g, '-');\n }\n }\n // Use `entries` type specific for the metric.\n const entries = [];\n return {\n name,\n value,\n rating: 'good', // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n delta: 0,\n entries,\n id: generateUniqueID(),\n navigationType: _navigationType,\n navigationId: navigationId || hardNavId,\n navigationInteractionId: navigationInteractionId,\n navigationURL: navigationURL || hardNavEntry?.name,\n navigationStartTime: navigationStartTime || 0,\n };\n};\n//# sourceMappingURL=initMetric.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport const generateUniqueID = () => {\n return `v6-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n//# sourceMappingURL=generateUniqueID.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport const observe = (types, callback, opts = {}) => {\n try {\n const supportedTypes = types.filter((t) => PerformanceObserver.supportedEntryTypes.includes(t));\n if (supportedTypes.length > 0) {\n const po = new PerformanceObserver((list) => {\n // Delay by a microtask to workaround a bug in Safari where the\n // callback is invoked immediately, rather than in a separate task.\n // See: https://github.com/GoogleChrome/web-vitals/issues/277\n queueMicrotask(() => {\n const entries = list.getEntries();\n // When observing more than one entry type, entries from different\n // types can be delivered out of order, so sort by end time\n // (startTime + duration) to ensure they're in the right order.\n // See: https://github.com/w3c/performance-timeline/issues/224\n if (supportedTypes.length > 1) {\n entries.sort((a, b) => {\n const scoreA = a.startTime + a.duration;\n const scoreB = b.startTime + b.duration;\n return scoreA - scoreB;\n });\n }\n callback(entries);\n });\n });\n for (const t of supportedTypes) {\n po.observe({ type: t, buffered: true, ...opts });\n }\n return po;\n }\n }\n catch {\n // Do nothing.\n }\n return;\n};\n//# sourceMappingURL=observe.js.map","/*\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const checkSoftNavsEnabled = (opts) => {\n return (\n // Firefox has a preference to disable this, which some people use so add a guard\n globalThis.PerformanceObserver?.supportedEntryTypes.includes('soft-navigation') &&\n // Older implementations expose the value as an attribute rather than the\n // method. We only support the newer method as that was what was launched\n // to stable unflagged.\n typeof globalThis.PerformanceSoftNavigation?.prototype\n ?.getLargestInteractionContentfulPaint === 'function' &&\n opts &&\n opts.reportSoftNavs);\n};\n// Stores a soft navigation entry keyed by its navigationId, keeping only\n// the 2 most recent entries so the map cannot grow unbounded.\nexport const storeSoftNavEntry = (map, entry) => {\n map.set(entry.navigationId, entry);\n // Clean up older entries to prevent memory leaks, keeping only\n // the 2 most recent entries.\n if (map.size > 2) {\n const firstKey = map.keys().next().value;\n if (firstKey !== undefined) {\n map.delete(firstKey);\n }\n }\n};\n//# sourceMappingURL=softNavs.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const runOnce = (cb) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n//# sourceMappingURL=runOnce.js.map","/*\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class FCPEntryManager {\n _softNavigationEntryMap;\n}\n//# sourceMappingURL=FCPEntryManager.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const whenActivated = (callback) => {\n if (document.prerendering) {\n addEventListener('prerenderingchange', callback, true);\n }\n else {\n callback();\n }\n};\n//# sourceMappingURL=whenActivated.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter.js';\nimport { checkSoftNavsEnabled, storeSoftNavEntry } from './lib/softNavs.js';\nimport { doubleRAF } from './lib/doubleRAF.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { FCPEntryManager } from './lib/FCPEntryManager.js';\nimport { observe } from './lib/observe.js';\nimport { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';\nimport { whenActivated } from './lib/whenActivated.js';\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds = [1800, 3000];\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport, opts = {}) => {\n const softNavsEnabled = checkSoftNavsEnabled(opts);\n whenActivated(() => {\n // Create a new FCP entry manager for each page activation\n // This allows us to track soft navigations separately\n // needed when attribution is enabled.\n const fcpEntryManager = initUnique(opts, FCPEntryManager);\n const visibilityWatcher = getVisibilityWatcher();\n let metric = initMetric('FCP');\n let report;\n const handleEntries = (entries) => {\n for (const entry of entries) {\n if (entry.name === 'first-contentful-paint') {\n po.disconnect();\n // Only report if the page wasn't hidden prior to FCP.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n metric.navigationId = entry.navigationId || metric.navigationId;\n // FCP should only be reported once so can report right away\n report(true);\n }\n }\n }\n };\n const po = observe(['paint'], handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n // Only report after a bfcache restore if the `PerformanceObserver`\n // successfully registered or the `paint` entry exists.\n onBFCacheRestore((event) => {\n metric = initMetric('FCP', -1, 'back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n doubleRAF(() => {\n metric.value = performance.now() - event.timeStamp;\n report(true);\n });\n });\n }\n if (softNavsEnabled) {\n // As first-contentful-paint is only reported once, we can handle soft\n // navigations afterwards on their own for simplicity, as no need to\n // observe both and sort the entries like for the other metrics\n const handleSoftNavEntries = (entries) => {\n entries.forEach((entry) => {\n // Store the soft navigation entries in the entry manager so that\n // they can be retrieved for attribution if necessary. This code\n // is only used when attribution is enabled which sets the\n // _softNavigationEntryMap.\n if (fcpEntryManager._softNavigationEntryMap && entry.navigationId) {\n storeSoftNavEntry(fcpEntryManager._softNavigationEntryMap, entry);\n }\n // Clamp FCP at 0. It should never be less, but better safe than sorry.\n const FCPTime = Math.max((entry.presentationTime || entry.paintTime || 0) - entry.startTime, 0);\n metric = initMetric('FCP', FCPTime, 'soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n report(true);\n });\n };\n observe(['soft-navigation'], handleSoftNavEntries, opts);\n }\n });\n};\n//# sourceMappingURL=onFCP.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { doubleRAF } from './lib/doubleRAF.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { LayoutShiftManager } from './lib/LayoutShiftManager.js';\nimport { observe } from './lib/observe.js';\nimport { checkSoftNavsEnabled } from './lib/softNavs.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.js';\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nexport const CLSThresholds = [0.1, 0.25];\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport, opts = {}) => {\n const visibilityWatcher = getVisibilityWatcher();\n // Start monitoring FCP so we can only report CLS if FCP is also reported.\n // Note: this is done to match the current behavior of CrUX.\n onFCP(runOnce(() => {\n let metric = initMetric('CLS', 0);\n let report;\n const layoutShiftManager = initUnique(opts, LayoutShiftManager);\n const initNewCLSMetric = (navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {\n metric = initMetric('CLS', 0, navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime);\n layoutShiftManager._sessionValue = 0;\n report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n };\n const updateAndReportMetric = (forceReport = false) => {\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (layoutShiftManager._sessionValue > metric.value) {\n metric.value = layoutShiftManager._sessionValue;\n metric.entries = layoutShiftManager._sessionEntries;\n }\n report(forceReport);\n };\n const handleSoftNavEntry = (entry) => {\n updateAndReportMetric(true);\n initNewCLSMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);\n };\n const handleEntries = (entries) => {\n for (const entry of entries) {\n if (entry.entryType === 'soft-navigation') {\n handleSoftNavEntry(entry);\n continue;\n }\n layoutShiftManager._processEntry(entry);\n }\n updateAndReportMetric();\n };\n const types = ['layout-shift'];\n if (checkSoftNavsEnabled(opts)) {\n types.push('soft-navigation');\n }\n const po = observe(types, handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n visibilityWatcher.onHidden(() => {\n handleEntries(po.takeRecords());\n report(true);\n });\n // Only report after a bfcache restore if the `PerformanceObserver`\n // successfully registered.\n onBFCacheRestore(() => {\n initNewCLSMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());\n doubleRAF(report);\n });\n // Queue a task to report (if nothing else triggers a report first).\n // This allows CLS to be reported as soon as FCP fires when\n // `reportAllChanges` is true.\n setTimeout(report);\n }\n }));\n};\n//# sourceMappingURL=onCLS.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LayoutShiftManager } from '../lib/LayoutShiftManager.js';\nimport { getLoadState } from '../lib/getLoadState.js';\nimport { getSelector } from '../lib/getSelector.js';\nimport { initUnique } from '../lib/initUnique.js';\nimport { onCLS as unattributedOnCLS } from '../onCLS.js';\nconst getLargestLayoutShiftEntry = (entries) => {\n return entries.reduce((a, b) => (a.value > b.value ? a : b));\n};\nconst getLargestLayoutShiftSource = (sources) => {\n return sources.find((s) => s.node?.nodeType === 1) || sources[0];\n};\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport, opts = {}) => {\n // Clone the opts object to ensure it's unique, so we can initialize a\n // single instance of the `LayoutShiftManager` class that's shared only with\n // this function invocation and the `unattributedOnCLS()` invocation below\n // (which is passed the same `opts` object).\n opts = Object.assign({}, opts);\n const layoutShiftManager = initUnique(opts, LayoutShiftManager);\n const layoutShiftTargetMap = new WeakMap();\n layoutShiftManager._onAfterProcessingUnexpectedShift = (entry) => {\n if (entry?.sources?.length) {\n const largestSource = getLargestLayoutShiftSource(entry.sources);\n const node = largestSource?.node;\n if (node) {\n const customTarget = opts.generateTarget?.(node) ?? getSelector(node);\n layoutShiftTargetMap.set(largestSource, customTarget);\n }\n }\n };\n const attributeCLS = (metric) => {\n // Use an empty object if no other attribution has been set.\n let attribution = {};\n if (metric.entries.length) {\n const largestEntry = getLargestLayoutShiftEntry(metric.entries);\n if (largestEntry?.sources?.length) {\n const largestSource = getLargestLayoutShiftSource(largestEntry.sources);\n if (largestSource) {\n attribution = {\n largestShiftTarget: layoutShiftTargetMap.get(largestSource),\n largestShiftTime: largestEntry.startTime,\n largestShiftValue: largestEntry.value,\n largestShiftSource: largestSource,\n largestShiftEntry: largestEntry,\n loadState: getLoadState(largestEntry.startTime),\n };\n }\n }\n }\n // Use `Object.assign()` to ensure the original metric object is returned.\n return Object.assign(metric, { attribution });\n };\n unattributedOnCLS((metric) => {\n onReport(attributeCLS(metric));\n }, opts);\n};\n//# sourceMappingURL=onCLS.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getBFCacheRestoreTime } from '../lib/bfcache.js';\nimport { getLoadState } from '../lib/getLoadState.js';\nimport { getNavigationEntry } from '../lib/getNavigationEntry.js';\nimport { initUnique } from '../lib/initUnique.js';\nimport { FCPEntryManager } from '../lib/FCPEntryManager.js';\nimport { checkSoftNavsEnabled } from '../lib/softNavs.js';\nimport { onFCP as unattributedOnFCP } from '../onFCP.js';\nexport const onFCP = (onReport, opts = {}) => {\n opts = Object.assign({}, opts);\n // Init the fcpEntryManager (which will already be initialised in the\n // unattributed onFCP method if soft navigation reporting is enabled\n // and so will return that fcpEntryManager, rather than a new one)\n const fcpEntryManager = initUnique(opts, FCPEntryManager);\n if (checkSoftNavsEnabled(opts)) {\n fcpEntryManager._softNavigationEntryMap = new Map();\n }\n const attributeFCP = (metric) => {\n // Use a default object if no other attribution has been set.\n let attribution = {\n timeToFirstByte: 0,\n firstByteToFCP: metric.value,\n loadState: getLoadState(getBFCacheRestoreTime()),\n };\n if (metric.navigationType !== 'soft-navigation') {\n if (metric.entries.length) {\n const navigationEntry = getNavigationEntry();\n const fcpEntry = metric.entries.at(-1);\n if (navigationEntry) {\n const responseStart = navigationEntry.responseStart;\n const activationStart = navigationEntry.activationStart || 0;\n const ttfb = Math.max(0, responseStart - activationStart);\n attribution = {\n timeToFirstByte: ttfb,\n firstByteToFCP: metric.value - ttfb,\n loadState: getLoadState(metric.entries[0].startTime),\n navigationEntry,\n fcpEntry,\n };\n }\n }\n }\n else {\n // Lookup the soft navigation entry. Do not use getEntriesByType since\n // that is limited to the first 50 navigation entries due to buffer size.\n const navigationEntry = fcpEntryManager._softNavigationEntryMap?.get(metric.navigationId);\n if (navigationEntry) {\n attribution = {\n timeToFirstByte: 0,\n firstByteToFCP: metric.value,\n loadState: 'complete',\n navigationEntry,\n };\n }\n }\n // Use `Object.assign()` to ensure the original metric object is returned.\n const metricWithAttribution = Object.assign(metric, { attribution });\n return metricWithAttribution;\n };\n unattributedOnFCP((metric) => {\n onReport(attributeFCP(metric));\n }, opts);\n};\n//# sourceMappingURL=onFCP.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observe } from '../observe.js';\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\nconst updateEstimate = (entries) => {\n for (const entry of entries) {\n if (entry.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, entry.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, entry.interactionId);\n interactionCountEstimate = maxKnownInteractionId\n ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1\n : 0;\n }\n }\n};\nlet po;\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = () => {\n return po ? interactionCountEstimate : (performance.interactionCount ?? 0);\n};\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nexport const initInteractionCountPolyfill = () => {\n if ('interactionCount' in performance || po)\n return;\n po = observe(['event'], updateEstimate, {\n durationThreshold: 0,\n });\n};\n//# sourceMappingURL=interactionCountPolyfill.js.map","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n return getInteractionCount() - prevInteractionCount;\n};\nexport class InteractionManager {\n /**\n * A list of longest interactions on the page (by latency) sorted so the\n * longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER\n * long.\n */\n _longestInteractionList = [];\n /**\n * A mapping of longest interactions by their interaction ID.\n * This is used for faster lookup.\n */\n _longestInteractionMap = new Map();\n _onBeforeProcessingEntry;\n _onAfterProcessingINPCandidate;\n _resetInteractions() {\n prevInteractionCount = getInteractionCount();\n this._longestInteractionList.length = 0;\n this._longestInteractionMap.clear();\n }\n /**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\n _estimateP98LongestInteraction(navigationType) {\n const interactionCountForNavigation = getInteractionCountForNavigation();\n const candidateInteractionIndex = Math.min(this._longestInteractionList.length - 1, Math.floor(interactionCountForNavigation / 50));\n // If we have a non-zero interactionCountForNavigation but no\n // candidateInteractionIndex, then it's below the 16ms limit\n // so report a dummy 8ms interaction. This is only needed for\n // soft-navs and bfcache restores as `first-input` handles the\n // rest.\n if (interactionCountForNavigation &&\n candidateInteractionIndex === -1 &&\n (navigationType === 'soft-navigation' ||\n navigationType === 'back-forward-cache')) {\n return {\n _latency: 8,\n id: -1,\n entries: [],\n };\n }\n return this._longestInteractionList[candidateInteractionIndex];\n }\n /**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\n _processEntry(entry) {\n this._onBeforeProcessingEntry?.(entry);\n // Skip further processing for entries that cannot be INP candidates.\n if (!(entry.interactionId || entry.entryType === 'first-input'))\n return;\n // The least-long of the 10 longest interactions.\n const minLongestInteraction = this._longestInteractionList.at(-1);\n let interaction = this._longestInteractionMap.get(entry.interactionId);\n // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n if (interaction ||\n this._longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n // If the above conditions are false, `minLongestInteraction` will be set.\n entry.duration > minLongestInteraction._latency) {\n // If the interaction already exists, update it. Otherwise create one.\n if (interaction) {\n // If the new entry has a longer duration, replace the old entries,\n // otherwise add to the array.\n if (entry.duration > interaction._latency) {\n interaction.entries = [entry];\n interaction._latency = entry.duration;\n }\n else if (entry.duration === interaction._latency &&\n entry.startTime === interaction.entries[0].startTime) {\n interaction.entries.push(entry);\n }\n }\n else {\n interaction = {\n id: entry.interactionId,\n entries: [entry],\n _latency: entry.duration,\n };\n this._longestInteractionMap.set(interaction.id, interaction);\n this._longestInteractionList.push(interaction);\n }\n // Sort the entries by latency (descending) and keep only the top ten.\n this._longestInteractionList.sort((a, b) => b._latency - a._latency);\n if (this._longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n const removedInteractions = this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);\n for (const interaction of removedInteractions) {\n this._longestInteractionMap.delete(interaction.id);\n }\n }\n // Call any post-processing on the interaction\n this._onAfterProcessingINPCandidate?.(interaction);\n }\n }\n}\n//# sourceMappingURL=InteractionManager.js.map","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { runOnce } from './runOnce.js';\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nexport const whenIdleOrHidden = (cb) => {\n // Cap the requestIdleCallback to 1 sec for very busy apps\n // https://github.com/GoogleChrome/web-vitals/issues/754\n // If not using rIC, then the setTimeout timeout should be 0\n const timeout = 'requestIdleCallback' in globalThis ? 1000 : 0;\n const rIC = globalThis.requestIdleCallback || setTimeout;\n const cIC = globalThis.cancelIdleCallback || clearTimeout;\n // If the document is hidden, run the callback immediately, otherwise\n // race an idle callback with the next `visibilitychange` event.\n if (document.visibilityState === 'hidden') {\n cb();\n }\n else {\n const wrappedCb = runOnce(cb);\n let idleHandle = -1;\n const onHidden = () => {\n cIC(idleHandle);\n wrappedCb();\n };\n addEventListener('visibilitychange', onHidden, { once: true, capture: true });\n idleHandle = rIC(() => {\n removeEventListener('visibilitychange', onHidden, { capture: true });\n wrappedCb();\n }, { timeout: timeout });\n }\n};\n//# sourceMappingURL=whenIdleOrHidden.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { InteractionManager } from './lib/InteractionManager.js';\nimport { observe } from './lib/observe.js';\nimport { checkSoftNavsEnabled } from './lib/softNavs.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nexport const INPThresholds = [200, 500];\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\n// Event Timing entries have their durations rounded to the nearest 8ms,\n// so a duration of 40ms would be any event that spans 2.5 or more frames\n// at 60Hz. This threshold is chosen to strike a balance between usefulness\n// and performance. Running this callback for any interaction that spans\n// just one or two frames is likely not worth the insight that could be\n// gained.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed\n * to control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 will not\n * be reported. To avoid reporting no interactions in these cases, the library\n * will fall back to the input delay of the first interaction. Note that this\n * will not affect your 75th percentile INP value unless that value is also\n * less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onINP = (onReport, opts = {}) => {\n // Return if the browser doesn't support all APIs needed to measure INP.\n if (!(globalThis.PerformanceEventTiming &&\n 'interactionId' in PerformanceEventTiming.prototype)) {\n return;\n }\n const visibilityWatcher = getVisibilityWatcher();\n whenActivated(() => {\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n initInteractionCountPolyfill();\n let metric = initMetric('INP');\n let report;\n const interactionManager = initUnique(opts, InteractionManager);\n const initNewINPMetric = (navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {\n interactionManager._resetInteractions();\n metric = initMetric('INP', -1, navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime);\n report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n };\n const updateINPMetric = () => {\n const inp = interactionManager._estimateP98LongestInteraction(metric.navigationType);\n if (inp && inp._latency !== metric.value) {\n metric.value = inp._latency;\n metric.entries = inp.entries;\n report();\n }\n };\n const handleSoftNavEntry = (entry) => {\n updateINPMetric();\n report(true);\n initNewINPMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);\n };\n const handleEntries = (entries, forceReport = false) => {\n // Queue the `handleEntries()` callback in the next idle task.\n // This is needed to increase the chances that all event entries that\n // occurred between the user interaction and the next paint\n // have been dispatched. Note: there is currently an experiment\n // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n // 123+ that if rolled out fully may make this no longer necessary.\n whenIdleOrHidden(() => {\n for (const entry of entries) {\n if (entry.entryType === 'soft-navigation') {\n handleSoftNavEntry(entry);\n continue;\n }\n interactionManager._processEntry(entry);\n }\n updateINPMetric();\n if (forceReport) {\n report(true);\n }\n });\n };\n const types = ['event', 'first-input'];\n if (checkSoftNavsEnabled(opts)) {\n types.push('soft-navigation');\n }\n const po = observe(types, handleEntries, {\n ...opts,\n durationThreshold: opts.durationThreshold ?? DEFAULT_DURATION_THRESHOLD,\n });\n report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n if (po) {\n visibilityWatcher.onHidden(() => {\n handleEntries(po.takeRecords(), true);\n });\n // Only report after a bfcache restore if the `PerformanceObserver`\n // successfully registered.\n onBFCacheRestore(() => {\n initNewINPMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());\n });\n }\n });\n};\n//# sourceMappingURL=onINP.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getLoadState } from '../lib/getLoadState.js';\nimport { getSelector } from '../lib/getSelector.js';\nimport { initUnique } from '../lib/initUnique.js';\nimport { InteractionManager, } from '../lib/InteractionManager.js';\nimport { observe } from '../lib/observe.js';\nimport { whenIdleOrHidden } from '../lib/whenIdleOrHidden.js';\nimport { onINP as unattributedOnINP } from '../onINP.js';\n// The maximum number of previous frames for which data is kept.\n// Storing data about previous frames is necessary to handle cases where event\n// and LoAF entries are dispatched out of order, and so a buffer of previous\n// frame data is needed to determine various bits of INP attribution once all\n// the frame-related data has come in.\n// In most cases this out-of-order data is only off by a frame or two, so\n// keeping the most recent 10 should be more than sufficient.\nconst MAX_PENDING_FRAMES = 10;\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed\n * to control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 will not\n * be reported. To avoid reporting no interactions in these cases, the library\n * will fall back to the input delay of the first interaction. Note that this\n * will not affect your 75th percentile INP value unless that value is also\n * less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * A custom `includeProcessedEventEntries` configuration option can optionally\n * be passed to control whether the `processedEventEntries` array in the\n * attribution object is populated. The default value is `false`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it has been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onINP = (onReport, opts = {}) => {\n // Clone the opts object to ensure it's unique, so we can initialize a\n // single instance of the `InteractionManager` class that's shared only with\n // this function invocation and the `unattributedOnINP()` invocation below\n // (which is passed the same `opts` object).\n opts = Object.assign({}, opts);\n const interactionManager = initUnique(opts, InteractionManager);\n // A list of LoAF entries that have been dispatched and could potentially\n // intersect with the INP candidate interaction. Note that periodically this\n // list is cleaned up and entries that are known to not match INP are removed.\n let pendingLoAFs = [];\n // An array of groups of all the event timing entries that occurred within a\n // particular frame. Note that periodically this array is cleaned up and entries\n // that are known to not match INP are removed.\n let pendingEntriesGroups = [];\n // The `processingEnd` time of most recently-processed event, chronologically.\n let latestProcessingEnd = 0;\n // A WeakMap to look up the event-timing-entries group of a given entry.\n // Note that this only maps from \"important\" entries: either the first input or\n // those with an `interactionId`.\n const entryToEntriesGroupMap = new WeakMap();\n // A mapping of interactionIds to the target Node.\n const interactionTargetMap = new WeakMap();\n // A boolean flag indicating whether or not a cleanup task has been queued.\n let cleanupPending = false;\n /**\n * Adds new LoAF entries to the `pendingLoAFs` list.\n */\n const handleLoAFEntries = (entries) => {\n pendingLoAFs = pendingLoAFs.concat(entries);\n queueCleanup();\n };\n const saveInteractionTarget = (interaction) => {\n if (!interactionTargetMap.get(interaction)) {\n // Use find to get first selector\n const node = interaction.entries.find((e) => e.target)?.target;\n if (node) {\n const customTarget = opts.generateTarget?.(node) ?? getSelector(node);\n interactionTargetMap.set(interaction, customTarget);\n }\n else {\n // Fall back to targetSelector\n const selector = interaction.entries.find((e) => e.targetSelector)?.targetSelector;\n if (selector) {\n interactionTargetMap.set(interaction, selector);\n }\n }\n }\n };\n /**\n * Groups entries that were presented within the same animation frame by\n * a common `renderTime`. This function works by referencing\n * `pendingEntriesGroups` and using an existing render time if one is found\n * (otherwise creating a new one). This function also adds all interaction\n * entries to an `entryToRenderTimeMap` WeakMap so that the \"grouped\" entries\n * can be looked up later.\n */\n const groupEntriesByRenderTime = (entry) => {\n const renderTime = entry.startTime + entry.duration;\n let group;\n // Update `latestProcessingEnd` to correspond to the `processingEnd`\n // value of the most recently dispatched `event` entry.\n latestProcessingEnd = Math.max(latestProcessingEnd, entry.processingEnd);\n // Iterate over all previous render times in reverse order to find a match.\n // Go in reverse since the most likely match will be at the end.\n for (let i = pendingEntriesGroups.length - 1; i >= 0; i--) {\n const potentialGroup = pendingEntriesGroups[i];\n // If a group's render time is within 8ms of the entry's render time,\n // assume they were part of the same frame and add it to the group.\n if (Math.abs(renderTime - potentialGroup.renderTime) <= 8) {\n group = potentialGroup;\n group.startTime = Math.min(entry.startTime, group.startTime);\n group.processingStart = Math.min(entry.processingStart, group.processingStart);\n group.processingEnd = Math.max(entry.processingEnd, group.processingEnd);\n // processedEventEntries can be quite large, so only include them if\n // the user explicitly requests them (default is to include).\n if (opts.includeProcessedEventEntries) {\n group.entries.push(entry);\n }\n break;\n }\n }\n // If there was no matching group, assume this is a new frame.\n if (!group) {\n group = {\n startTime: entry.startTime,\n processingStart: entry.processingStart,\n processingEnd: entry.processingEnd,\n renderTime,\n // processedEventEntries can be quite large, so only include them if\n // the user explicitly requests them (default is to include).\n entries: opts.includeProcessedEventEntries ? [entry] : [],\n };\n pendingEntriesGroups.push(group);\n }\n // Store the grouped render time for this entry for reference later.\n if (entry.interactionId || entry.entryType === 'first-input') {\n entryToEntriesGroupMap.set(entry, group);\n }\n queueCleanup();\n };\n const queueCleanup = () => {\n // Queue cleanup of entries that are not part of any INP candidates.\n if (!cleanupPending) {\n whenIdleOrHidden(cleanupEntries);\n cleanupPending = true;\n }\n };\n const cleanupEntries = () => {\n // Create a set of entries groups that are part of the longest\n // interactions (for faster lookup below).\n const longestInteractionGroups = new Set(interactionManager._longestInteractionList.map((i) => {\n return entryToEntriesGroupMap.get(i.entries[0]);\n }));\n // Clean up the `pendingEntriesGroups` list so it doesn't grow endlessly.\n // Keep any groups that:\n // 1) Correspond to one of the current longest interactions, OR\n // 2) Are part of one of the most recent set of frames (which is\n // determined by checking if the index in the group is within\n // `MAX_PENDING_FRAMES` of the group's length).\n const minIndexToKeep = pendingEntriesGroups.length - MAX_PENDING_FRAMES;\n pendingEntriesGroups = pendingEntriesGroups.filter((group, i) => {\n // Check index first because it's faster.\n return i >= minIndexToKeep || longestInteractionGroups.has(group);\n });\n // Create a set of LoAF entries that intersect with entries in the newly\n // cleaned up `pendingEntriesGroups` (for faster lookup below).\n const intersectingLoAFs = new Set();\n for (const group of pendingEntriesGroups) {\n const loafs = getIntersectingLoAFs(group.startTime, group.processingEnd);\n for (const loaf of loafs) {\n intersectingLoAFs.add(loaf);\n }\n }\n // Clean up the `pendingLoAFs` list so it doesn't grow endlessly.\n // Keep all LoAFs that either:\n // 1) Intersect with one of the above pending entries groups, OR\n // 2) Occurred more recently than the most recently process event entry.\n pendingLoAFs = pendingLoAFs.filter((loaf) => {\n return (\n // Compare times first because it's faster.\n loaf.startTime > latestProcessingEnd || intersectingLoAFs.has(loaf));\n });\n cleanupPending = false;\n };\n interactionManager._onBeforeProcessingEntry = groupEntriesByRenderTime;\n interactionManager._onAfterProcessingINPCandidate = saveInteractionTarget;\n const getIntersectingLoAFs = (start, end) => {\n const intersectingLoAFs = [];\n for (const loaf of pendingLoAFs) {\n // If the LoAF ends before the given start time, ignore it.\n if (loaf.startTime + loaf.duration < start)\n continue;\n // If the LoAF starts after the given end time, ignore it and all\n // subsequent pending LoAFs (because they're in time order).\n if (loaf.startTime > end)\n break;\n // Still here? If so this LoAF intersects with the interaction.\n intersectingLoAFs.push(loaf);\n }\n return intersectingLoAFs;\n };\n const attributeLoAFDetails = (attribution) => {\n const interactionTime = attribution.interactionTime;\n const nextPaintTime = attribution.nextPaintTime;\n // If there is no LoAF data, interactionTime or paintTime\n // then nothing further to attribute here.\n if (!attribution.longAnimationFrameEntries?.length ||\n !interactionTime ||\n !nextPaintTime) {\n return;\n }\n const inputDelay = attribution.inputDelay;\n const processingDuration = attribution.processingDuration;\n // Stats across all LoAF entries and scripts.\n let totalScriptDuration = 0;\n let totalStyleAndLayoutDuration = 0;\n let totalPaintDuration = 0;\n let longestScriptDuration = 0;\n let longestScriptEntry;\n let longestScriptSubpart;\n for (const loafEntry of attribution.longAnimationFrameEntries) {\n totalStyleAndLayoutDuration =\n totalStyleAndLayoutDuration +\n loafEntry.startTime +\n loafEntry.duration -\n loafEntry.styleAndLayoutStart;\n for (const script of loafEntry.scripts) {\n const scriptEndTime = script.startTime + script.duration;\n if (scriptEndTime < interactionTime) {\n continue;\n }\n const intersectingScriptDuration = scriptEndTime - Math.max(interactionTime, script.startTime);\n // Since forcedStyleAndLayoutDuration doesn't provide timestamps, we\n // apportion the total based on the intersectingScriptDuration. Not\n // correct depending on when it occurred, but the best we can do.\n const intersectingForceStyleAndLayoutDuration = script.duration\n ? (intersectingScriptDuration / script.duration) *\n script.forcedStyleAndLayoutDuration\n : 0;\n // For scripts we exclude forcedStyleAndLayout (same as DevTools does\n // in its summary totals) and instead include that in\n // totalStyleAndLayoutDuration\n totalScriptDuration +=\n intersectingScriptDuration - intersectingForceStyleAndLayoutDuration;\n totalStyleAndLayoutDuration += intersectingForceStyleAndLayoutDuration;\n if (intersectingScriptDuration > longestScriptDuration) {\n // Set the subpart this occurred in.\n longestScriptSubpart =\n script.startTime < interactionTime + inputDelay\n ? 'input-delay'\n : script.startTime >=\n interactionTime + inputDelay + processingDuration\n ? 'presentation-delay'\n : 'processing-duration';\n longestScriptEntry = script;\n longestScriptDuration = intersectingScriptDuration;\n }\n }\n }\n // Calculate the totalPaintDuration from the last LoAF after\n // presentationDelay starts (where available)\n const lastLoAF = attribution.longAnimationFrameEntries.at(-1);\n const lastLoAFEndTime = lastLoAF\n ? lastLoAF.startTime + lastLoAF.duration\n : 0;\n if (lastLoAFEndTime >= interactionTime + inputDelay + processingDuration) {\n totalPaintDuration = nextPaintTime - lastLoAFEndTime;\n }\n if (longestScriptEntry && longestScriptSubpart) {\n attribution.longestScript = {\n entry: longestScriptEntry,\n subpart: longestScriptSubpart,\n intersectingDuration: longestScriptDuration,\n };\n }\n attribution.totalScriptDuration = totalScriptDuration;\n attribution.totalStyleAndLayoutDuration = totalStyleAndLayoutDuration;\n attribution.totalPaintDuration = totalPaintDuration;\n attribution.totalUnattributedDuration =\n nextPaintTime -\n interactionTime -\n totalScriptDuration -\n totalStyleAndLayoutDuration -\n totalPaintDuration;\n };\n const attributeINP = (metric) => {\n // Soft navs and bfcache can have a dummy INP as no first-input entry to\n // fall back on so we report dummy values when the interactionCount has\n // gone up, even if no entry was emitted.\n // See https://github.com/GoogleChrome/web-vitals/issues/724\n // All other INPs should have at least one entry, but we'll do same dummy\n // processing if they don't for some reason.\n if (metric.entries.length === 0) {\n const navStartTime = metric.navigationStartTime || 0;\n const attribution = {\n processedEventEntries: [],\n longAnimationFrameEntries: [],\n inputDelay: 0,\n processingDuration: 0,\n presentationDelay: metric.value,\n loadState: getLoadState(navStartTime),\n };\n return Object.assign(metric, { attribution });\n }\n const firstEntry = metric.entries[0];\n const group = entryToEntriesGroupMap.get(firstEntry);\n const processingStart = group.processingStart;\n // Due to the fact that durations can be rounded down to the nearest 8ms,\n // we have to clamp `nextPaintTime` so it doesn't appear to occur before\n // processing starts. Note: we can't use `processingEnd` since processing\n // can extend beyond the event duration in some cases (see next comment).\n const nextPaintTime = Math.max(firstEntry.startTime + firstEntry.duration, processingStart);\n // For the purposes of attribution, clamp `processingEnd` to `nextPaintTime`,\n // so processing is never reported as taking longer than INP (which can\n // happen via the web APIs in the case of sync modals, e.g. `alert()`).\n // See: https://github.com/GoogleChrome/web-vitals/issues/492\n const processingEnd = Math.min(group.processingEnd, nextPaintTime);\n // Sort the entries in processing time order.\n const processedEventEntries = group.entries.sort((a, b) => {\n return a.processingStart - b.processingStart;\n });\n const longAnimationFrameEntries = getIntersectingLoAFs(firstEntry.startTime, processingEnd);\n const interaction = interactionManager._longestInteractionMap.get(firstEntry.interactionId);\n const attribution = {\n // TS flags the next line because `interactionTargetMap.get()` might\n // return `undefined`, but we ignore this assuming the user knows what\n // they are doing.\n interactionTarget: interactionTargetMap.get(interaction),\n interactionType: firstEntry.name.startsWith('key')\n ? 'keyboard'\n : 'pointer',\n interactionTime: firstEntry.startTime,\n nextPaintTime: nextPaintTime,\n processedEventEntries: processedEventEntries,\n longAnimationFrameEntries: longAnimationFrameEntries,\n inputDelay: processingStart - firstEntry.startTime,\n processingDuration: processingEnd - processingStart,\n presentationDelay: nextPaintTime - processingEnd,\n loadState: getLoadState(firstEntry.startTime),\n longestScript: undefined,\n totalScriptDuration: undefined,\n totalStyleAndLayoutDuration: undefined,\n totalPaintDuration: undefined,\n totalUnattributedDuration: undefined,\n };\n attributeLoAFDetails(attribution);\n // Use `Object.assign()` to ensure the original metric object is returned.\n return Object.assign(metric, { attribution });\n };\n // Start observing LoAF entries for attribution.\n observe(['long-animation-frame'], handleLoAFEntries, opts);\n unattributedOnINP((metric) => {\n onReport(attributeINP(metric));\n }, opts);\n};\n//# sourceMappingURL=onINP.js.map","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class LCPEntryManager {\n _onBeforeProcessingEntry;\n _softNavigationEntryMap;\n _processEntry(entry) {\n this._onBeforeProcessingEntry?.(entry);\n }\n}\n//# sourceMappingURL=LCPEntryManager.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LCPEntryManager } from './lib/LCPEntryManager.js';\nimport { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { doubleRAF } from './lib/doubleRAF.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { checkSoftNavsEnabled, storeSoftNavEntry } from './lib/softNavs.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nexport const LCPThresholds = [2500, 4000];\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nexport const onLCP = (onReport, opts = {}) => {\n // As InteractionContentfulPaint entries used by soft navs can emit after\n // LCP is finalized, we need a flag to know to ignore them.\n let isFinalized = false;\n const softNavsEnabled = checkSoftNavsEnabled(opts);\n whenActivated(() => {\n let visibilityWatcher = getVisibilityWatcher();\n let metric = initMetric('LCP');\n let report;\n const lcpEntryManager = initUnique(opts, LCPEntryManager);\n const initNewLCPMetric = (navigation, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {\n metric = initMetric('LCP', -1, navigation, navigationId, navigationInteractionId, navigationURL, navigationStartTime);\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n // Reset the finalized flag\n isFinalized = false;\n // If it's a soft nav, then need to reset the visibilityWatcher\n if (navigation === 'soft-navigation') {\n visibilityWatcher = getVisibilityWatcher(true);\n }\n };\n const handleSoftNavEntry = (entry) => {\n if (lcpEntryManager._softNavigationEntryMap && entry.navigationId) {\n storeSoftNavEntry(lcpEntryManager._softNavigationEntryMap, entry);\n }\n if (!isFinalized)\n report(true);\n initNewLCPMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);\n // Soft Navs should contain the largest paint until now, so handle that\n // as if it just happened, then listen for more.\n // It can however be null in rare circumstances\n // (see https://github.com/GoogleChrome/web-vitals/issues/725)\n const largestInteractionContentfulPaint = entry.getLargestInteractionContentfulPaint?.();\n if (largestInteractionContentfulPaint) {\n handleEntries([largestInteractionContentfulPaint]);\n }\n };\n const handleEntries = (entries) => {\n // If reportAllChanges is set or soft navs is enabled then call this\n // function for each entry, otherwise only consider the last one.\n if (!opts.reportAllChanges && !softNavsEnabled) {\n entries = entries.slice(-1);\n }\n for (const entry of entries) {\n if (!entry)\n continue;\n if (entry.entryType === 'soft-navigation') {\n handleSoftNavEntry(entry);\n continue;\n }\n let value = 0;\n let metricEntries = [];\n let renderTime = entry.startTime;\n if (entry.entryType === 'largest-contentful-paint') {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered. But in cases\n // where `activationStart` occurs after the LCP, this time should be\n // clamped at 0.\n value = Math.max(entry.startTime - getActivationStart(), 0);\n lcpEntryManager._processEntry(entry);\n metricEntries = [entry];\n }\n else if (entry.entryType === 'interaction-contentful-paint') {\n const ICPEntry = entry;\n // InteractionContentfulPaints should only happen after a\n // PerformanceSoftNavigation so the metric should have been set\n // with a non-zero navigationId mapping to a soft nav.\n if (!metric.navigationId)\n continue;\n // Ignore interactions not for this soft nav\n // (either paints that have bled into this interaction or paints when\n // we should have already finalized)\n if ('interactionId' in ICPEntry &&\n ICPEntry.interactionId != metric.navigationInteractionId) {\n continue;\n }\n renderTime = ICPEntry.largestContentfulPaint?.renderTime || 0;\n // Paints should never be less than 0 but add cap just in case\n value = Math.max(renderTime - entry.startTime, 0);\n if (ICPEntry.largestContentfulPaint) {\n lcpEntryManager._processEntry(ICPEntry.largestContentfulPaint);\n metricEntries = [ICPEntry.largestContentfulPaint];\n }\n }\n // Only report if the page wasn't hidden prior to LCP.\n if (renderTime < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = metricEntries;\n report();\n }\n }\n };\n const types = ['largest-contentful-paint'];\n if (softNavsEnabled) {\n types.push('interaction-contentful-paint', 'soft-navigation');\n }\n const po = observe(types, handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n const finalizeEventTypes = ['keydown', 'click', 'visibilitychange'];\n const finalizeLCP = (event) => {\n if (event.isTrusted && !isFinalized) {\n // Wrap the listener in an idle callback so it's run in a separate\n // task to reduce potential INP impact.\n // https://github.com/GoogleChrome/web-vitals/issues/383\n const metricIdToFinalize = metric.id;\n whenIdleOrHidden(() => {\n if (!isFinalized) {\n if (!softNavsEnabled) {\n // Do some clean up since these won't be needed anymore.\n po.disconnect();\n for (const type of finalizeEventTypes) {\n removeEventListener(type, finalizeLCP, { capture: true });\n }\n }\n // As this is in a whenIdleOrHidden check, whether we're still\n // on the metric you meant to finalize, and ignore if we've moved\n // on in the meantime.\n if (metricIdToFinalize === metric.id) {\n isFinalized = true;\n report(true);\n }\n }\n });\n }\n };\n // Finalize the current LCP after input or visibilitychange.\n // Although the browser will automatically stop emitting entries in these\n // cases, we don't know it's finalized, so we track to allow early report.\n // Note: while scrolling is an input that stops LCP observation, it's\n // unreliable since it can be programmatically generated.\n // See: https://github.com/GoogleChrome/web-vitals/issues/75\n for (const type of finalizeEventTypes) {\n addEventListener(type, finalizeLCP, {\n capture: true,\n });\n }\n // Only report after a bfcache restore if the `PerformanceObserver`\n // successfully registered.\n onBFCacheRestore((event) => {\n initNewLCPMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n doubleRAF(() => {\n metric.value = performance.now() - event.timeStamp;\n isFinalized = true;\n report(true);\n });\n });\n }\n });\n};\n//# sourceMappingURL=onLCP.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNavigationEntry } from '../lib/getNavigationEntry.js';\nimport { getSelector } from '../lib/getSelector.js';\nimport { initUnique } from '../lib/initUnique.js';\nimport { LCPEntryManager } from '../lib/LCPEntryManager.js';\nimport { checkSoftNavsEnabled } from '../lib/softNavs.js';\nimport { observe } from '../lib/observe.js';\nimport { onLCP as unattributedOnLCP } from '../onLCP.js';\n/**\n * Default resource buffer size to 50 to help attribute media LCPs to a URL and\n * for subpart attribution. This can be increased for pages that request a\n * large number of resources between the LCP resource and LCP candidates being\n * processed, particularly for soft navigations where the browser default first\n * 250 entries may not contain the LCP resource.\n */\nconst DEFAULT_RESOURCE_BUFFER_SIZE = 50;\nlet resourceBufferSizeLimit = DEFAULT_RESOURCE_BUFFER_SIZE;\nconst resourceBuffer = [];\nobserve(['resource'], (entries) => {\n for (const entry of entries) {\n resourceBuffer.push(entry);\n // Keep only the last resourceBufferSizeLimit entries.\n if (resourceBuffer.length > resourceBufferSizeLimit) {\n resourceBuffer.shift();\n }\n }\n});\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nexport const onLCP = (onReport, opts = {}) => {\n // Clone the opts object to ensure it's unique, so we can initialize a\n // single instance of the `LCPEntryManager` class that's shared only with\n // this function invocation and the `unattributedOnLCP()` invocation below\n // (which is passed the same `opts` object).\n opts = Object.assign({}, opts);\n if (opts.resourceBufferSize != undefined) {\n resourceBufferSizeLimit = opts.resourceBufferSize;\n }\n const lcpEntryManager = initUnique(opts, LCPEntryManager);\n const lcpTargetMap = new WeakMap();\n if (checkSoftNavsEnabled(opts)) {\n lcpEntryManager._softNavigationEntryMap = new Map();\n }\n lcpEntryManager._onBeforeProcessingEntry = (entry) => {\n const node = entry.element;\n if (node) {\n const customTarget = opts.generateTarget?.(node) ?? getSelector(node);\n lcpTargetMap.set(entry, customTarget);\n }\n else if (entry.id) {\n // Use the LargestContentfulPaint.id property when the element has been\n // removed from the DOM (and so node is null), but still has an ID.\n lcpTargetMap.set(entry, `#${entry.id}`);\n }\n };\n const attributeLCP = (metric) => {\n // Use a default object if no other attribution has been set.\n let attribution = {\n timeToFirstByte: 0,\n resourceLoadDelay: 0,\n resourceLoadDuration: 0,\n elementRenderDelay: metric.value,\n };\n if (metric.entries.length) {\n // The `metric.entries.length` check ensures there will be an entry.\n const lcpEntry = metric.entries.at(-1);\n // Get the Resource Timing entry checking the local buffer first\n // Use findLast to get the latest entry in case a resource is requested\n // multiple times (can particularly affect soft nav page views).\n const lcpResourceEntry = lcpEntry.url &&\n (resourceBuffer.findLast((e) => e.name === lcpEntry.url) ||\n performance\n .getEntriesByType('resource')\n .findLast((e) => e.name === lcpEntry.url));\n attribution.target = lcpTargetMap.get(lcpEntry);\n attribution.lcpEntry = lcpEntry;\n // Only attribute the URL and resource entry if they exist.\n if (lcpEntry.url) {\n attribution.url = lcpEntry.url;\n }\n if (lcpResourceEntry) {\n attribution.lcpResourceEntry = lcpResourceEntry;\n }\n // Get subparts from navigation entry. Do this last as occasionally\n // Safari seems to fail to find a navigation entry.\n let navigationEntry;\n let activationStart = 0;\n let responseStart = 0;\n if (metric.navigationType !== 'soft-navigation') {\n navigationEntry = getNavigationEntry();\n activationStart = navigationEntry?.activationStart ?? 0;\n responseStart = navigationEntry?.responseStart ?? 0;\n }\n else {\n // Set activationStart to the navigation start time\n activationStart = metric.navigationStartTime || 0;\n // Lookup the soft navigation entry. Do not use getEntriesByType since\n // that is limited to the first 50 navigation entries due to buffer\n // size.\n navigationEntry = lcpEntryManager._softNavigationEntryMap?.get(metric.navigationId);\n }\n if (navigationEntry) {\n const ttfb = Math.max(0, responseStart - activationStart);\n const lcpRequestStart = Math.max(ttfb, \n // Prefer `requestStart` (if TOA is set), otherwise use `startTime`.\n lcpResourceEntry\n ? (lcpResourceEntry.requestStart || lcpResourceEntry.startTime) -\n activationStart\n : 0);\n const lcpResponseEnd = Math.min(\n // Cap at LCP time (videos continue downloading after LCP for example)\n metric.value, Math.max(lcpRequestStart, lcpResourceEntry\n ? lcpResourceEntry.responseEnd - activationStart\n : 0));\n attribution = {\n ...attribution,\n timeToFirstByte: ttfb,\n resourceLoadDelay: lcpRequestStart - ttfb,\n resourceLoadDuration: lcpResponseEnd - lcpRequestStart,\n elementRenderDelay: metric.value - lcpResponseEnd,\n navigationEntry,\n };\n }\n }\n // Use `Object.assign()` to ensure the original metric object is returned.\n return Object.assign(metric, { attribution });\n };\n unattributedOnLCP((metric) => {\n onReport(attributeLCP(metric));\n }, opts);\n};\n//# sourceMappingURL=onLCP.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter.js';\nimport { checkSoftNavsEnabled } from './lib/softNavs.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';\nimport { whenActivated } from './lib/whenActivated.js';\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nexport const TTFBThresholds = [800, 1800];\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n if (document.prerendering) {\n whenActivated(() => whenReady(callback));\n }\n else if (document.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n }\n else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback);\n }\n};\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport, opts = {}) => {\n const softNavsEnabled = checkSoftNavsEnabled(opts);\n let metric = initMetric('TTFB');\n let report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n whenReady(() => {\n const hardNavEntry = getNavigationEntry();\n if (hardNavEntry) {\n const responseStart = hardNavEntry.responseStart;\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(responseStart - getActivationStart(), 0);\n metric.entries = [hardNavEntry];\n report(true);\n // Only report TTFB after bfcache restores if a `navigation` entry\n // was reported for the initial load.\n onBFCacheRestore(() => {\n metric = initMetric('TTFB', 0, 'back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());\n report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n report(true);\n });\n // Listen for soft-navigation entries and emit a dummy 0 TTFB entry\n if (softNavsEnabled) {\n const reportSoftNavTTFBs = (entries) => {\n entries.forEach((entry) => {\n if (entry.navigationId) {\n metric = initMetric('TTFB', 0, 'soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);\n metric.entries = [entry];\n report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n report(true);\n }\n });\n };\n observe(['soft-navigation'], reportSoftNavTTFBs, opts);\n }\n }\n });\n};\n//# sourceMappingURL=onTTFB.js.map","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { onTTFB as unattributedOnTTFB } from '../onTTFB.js';\nconst attributeTTFB = (metric) => {\n const navigationEntry = metric.entries[0];\n // Use a default object if no other attribution has been set.\n let attribution = {\n waitingDuration: 0,\n cacheDuration: 0,\n dnsDuration: 0,\n connectionDuration: 0,\n requestDuration: 0,\n // There should only be one instance per TTFB metric\n navigationEntry: navigationEntry,\n };\n if (metric.entries.length) {\n // If it's the hard nav, then can give attribution.\n // Otherwise it's 0 so the defaults are fine.\n if (navigationEntry instanceof PerformanceNavigationTiming) {\n const activationStart = navigationEntry.activationStart || 0;\n // Measure from workerStart or fetchStart so any service worker startup\n // time is included in cacheDuration (which also includes other sw time\n // anyway, that cannot be accurately split out cross-browser).\n const waitEnd = Math.max((navigationEntry.workerStart || navigationEntry.fetchStart || 0) -\n activationStart, 0);\n const dnsStart = Math.max(navigationEntry.domainLookupStart - activationStart, 0);\n const connectStart = Math.max(navigationEntry.connectStart - activationStart, 0);\n const connectEnd = Math.max(navigationEntry.connectEnd - activationStart, 0);\n attribution = {\n waitingDuration: waitEnd,\n cacheDuration: dnsStart - waitEnd,\n // dnsEnd usually equals connectStart but use connectStart over dnsEnd\n // for dnsDuration in case there ever is a gap.\n dnsDuration: connectStart - dnsStart,\n connectionDuration: connectEnd - connectStart,\n // There is often a gap between connectEnd and requestStart. Attribute\n // that to requestDuration so connectionDuration remains 0 for\n // service worker controlled requests were connectStart and connectEnd\n // are the same.\n requestDuration: metric.value - connectEnd,\n navigationEntry: navigationEntry,\n };\n }\n }\n // Use `Object.assign()` to ensure the original metric object is returned.\n const metricWithAttribution = Object.assign(metric, { attribution });\n return metricWithAttribution;\n};\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport, opts = {}) => {\n unattributedOnTTFB((metric) => {\n onReport(attributeTTFB(metric));\n }, opts);\n};\n//# sourceMappingURL=onTTFB.js.map"]}
|