@schibsted/advertory 3.16.5 → 3.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ad-native/cjs/index.d.ts +14 -6
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.d.ts +14 -6
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.d.ts +14 -6
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-CQzbye3k.js +1 -0
- package/aftenposten/es/events-wzFxMAFP.js +1 -0
- package/aftenposten/es/index-0kRfLcYj.js +1 -0
- package/aftenposten/es/{index-DRw2tzN7.js → index-BmeZVQ0l.js} +1 -1
- package/{aftonbladet/es/index-B-9GeVqx.js → aftenposten/es/index-CXL8rnIl.js} +1 -1
- package/aftenposten/es/index-Cr3lDYmG.js +1 -0
- package/aftenposten/es/{index-B8-3dAzZ.js → index-DH3bflvx.js} +1 -1
- package/aftenposten/es/{index-CS7Ab372.js → index-DpVNEgVg.js} +1 -1
- package/aftenposten/es/{index-Db4A-lKt.js → index-UeBxQJEQ.js} +1 -1
- package/aftenposten/es/{index-DQGbdXJH.js → index-yIBDd6_a.js} +1 -1
- package/aftenposten/es/index.d.ts +14 -6
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-Cmgz7g7s.js → styles-6FhX4hN7.js} +1 -1
- package/aftenposten/es/{styles-BqwkhLCB.js → styles-Bcd7vQWQ.js} +1 -1
- package/aftenposten/es/{styles-CfAyG-Uc.js → styles-Bzp_hZ-l.js} +1 -1
- package/aftenposten/es/{styles-CshnwzG0.js → styles-CHiH__PG.js} +1 -1
- package/aftenposten/es/{styles-BxGxExCF.js → styles-CQa9OP2h.js} +1 -1
- package/aftenposten/es/{styles-qYagS0GU.js → styles-DGrR5Myv.js} +1 -1
- package/aftenposten/es/{styles-x5cJhAzP.js → styles-DV8aCVOL.js} +1 -1
- package/aftenposten/es/{styles-BVFhT7Fm.js → styles-Df9VFn3e.js} +1 -1
- package/aftenposten/es/{styles-C3V8Btu3.js → styles-DnxoItho.js} +1 -1
- package/aftenposten/es/{styles-D4hQIIqP.js → styles-Mu5NcHOo.js} +1 -1
- package/aftenposten/es/{styles-DbteVOM6.js → styles-Z6yKNaQW.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-Aw5wuXno.js +1 -0
- package/aftenpostenv2/es/events-D-IVPmHl.js +1 -0
- package/aftenpostenv2/es/{index-CCgqrIq1.js → index-3DH4w7Kp.js} +1 -1
- package/aftenpostenv2/es/{index-DiBksfGt.js → index-BB1iI6Vl.js} +1 -1
- package/aftenpostenv2/es/index-BdS24ZhN.js +1 -0
- package/aftenpostenv2/es/index-Bu7767Wo.js +1 -0
- package/aftenpostenv2/es/{index-DoEPQvRY.js → index-DkDcRwK_.js} +1 -1
- package/aftenpostenv2/es/{index-lqm-o7Po.js → index-DyNS0mXg.js} +1 -1
- package/aftenpostenv2/es/{index-BVUcPqHw.js → index-DzI6iXF1.js} +1 -1
- package/aftenpostenv2/es/{index-BZnCLvE4.js → index-ipMUCwE0.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +14 -6
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-PnO4KF4Z.js → styles-BWrn3pun.js} +1 -1
- package/aftenpostenv2/es/{styles-CN1ZGodG.js → styles-BdrJnjnQ.js} +1 -1
- package/aftenpostenv2/es/{styles-DT0w-UuZ.js → styles-ByvXm5v5.js} +1 -1
- package/aftenpostenv2/es/{styles-C-SPFJ1u.js → styles-BzRoae8Z.js} +1 -1
- package/aftenpostenv2/es/{styles-Dfd6TOhp.js → styles-CkWr6xYa.js} +1 -1
- package/aftenpostenv2/es/{styles-qz3icO2I.js → styles-DK8HtLDl.js} +1 -1
- package/aftenpostenv2/es/{styles-C23QTq8C.js → styles-DOhTp6JW.js} +1 -1
- package/aftenpostenv2/es/{styles-xro3TPE2.js → styles-DPU_7hgU.js} +1 -1
- package/aftenpostenv2/es/{styles-Cz4wgX8T.js → styles-De8sTvD7.js} +1 -1
- package/aftenpostenv2/es/{styles-BeZfyt5D.js → styles-QwQ7F3Mu.js} +1 -1
- package/aftenpostenv2/es/{styles-BGkSuxfG.js → styles-iZYowlJx.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +14 -6
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-UQG0egxm.js +1 -0
- package/aftonbladet/es/events-CiteaWVv.js +1 -0
- package/aftonbladet/es/{index-BiQjBDTx.js → index-CDun52TP.js} +1 -1
- package/aftonbladet/es/{index-CACHUzk8.js → index-CKfqrs7B.js} +1 -1
- package/aftonbladet/es/index-CLhf_NpM.js +1 -0
- package/aftonbladet/es/{index-DY3lTbNz.js → index-CPB2n7c-.js} +1 -1
- package/{aftenposten/es/index-BR5XIfB1.js → aftonbladet/es/index-D694QiXY.js} +1 -1
- package/aftonbladet/es/{index-BlZB6F-_.js → index-DXuKUdFw.js} +1 -1
- package/aftonbladet/es/index-qS72xrEu.js +1 -0
- package/aftonbladet/es/{index-BxavM0ix.js → index-s03w1nsg.js} +1 -1
- package/aftonbladet/es/index.d.ts +14 -6
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-WB5MQdr8.js → styles-BLvuyru8.js} +1 -1
- package/aftonbladet/es/{styles-DSk80Xw5.js → styles-C4Q8-exK.js} +1 -1
- package/aftonbladet/es/{styles-BUwUWMkk.js → styles-COxjPfTb.js} +1 -1
- package/aftonbladet/es/{styles-DHhYeLQg.js → styles-DaHJ7t0C.js} +1 -1
- package/aftonbladet/es/{styles-BwoNWGMU.js → styles-Dxw5kVr1.js} +1 -1
- package/aftonbladet/es/{styles-DdWa3WR4.js → styles-aUjLpcVh.js} +1 -1
- package/aftonbladet/es/{styles-CSY6WCee.js → styles-yHMqBgDh.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-K8GufdfA.js +1 -0
- package/aftonbladetv2/es/events-DjnBVxCH.js +1 -0
- package/aftonbladetv2/es/index-BMQSuSVi.js +1 -0
- package/aftonbladetv2/es/{index-BS_cgiVx.js → index-CAkVH1cy.js} +1 -1
- package/aftonbladetv2/es/{index-GptaM2G6.js → index-D1gBWEc_.js} +1 -1
- package/aftonbladetv2/es/index-DIYLLs_R.js +1 -0
- package/aftonbladetv2/es/{index-CJK6gbdV.js → index-DQTM2CmM.js} +1 -1
- package/aftonbladetv2/es/{index-CmBDcRgQ.js → index-Dg8PwMci.js} +1 -1
- package/aftonbladetv2/es/{index-CMsqVKG_.js → index-Dq7lYSYU.js} +1 -1
- package/aftonbladetv2/es/{index-BAszEASA.js → index-bj1PhJMO.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +14 -6
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-C9uP2Yjh.js → styles-8rwgNT8_.js} +1 -1
- package/aftonbladetv2/es/{styles-9SQCcTFw.js → styles-BNNyUF0j.js} +1 -1
- package/aftonbladetv2/es/{styles-DeL7yXUR.js → styles-CWTQ-3h9.js} +1 -1
- package/aftonbladetv2/es/{styles-BUZTzbbN.js → styles-CcMM-P3g.js} +1 -1
- package/aftonbladetv2/es/{styles-HIZnvE3y.js → styles-DP9gVus2.js} +1 -1
- package/aftonbladetv2/es/{styles-DrxvzT3b.js → styles-a-e6D11y.js} +1 -1
- package/aftonbladetv2/es/{styles-DtHKest_.js → styles-oMtK3B2v.js} +1 -1
- package/bt/cjs/index.d.ts +14 -6
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-Bf5Mw4mU.js +1 -0
- package/bt/es/events-BjUbkhEy.js +1 -0
- package/bt/es/{index-BKqjZpW8.js → index-BOIa0oXu.js} +1 -1
- package/bt/es/{index-D_rnTuTK.js → index-BcmeJWhX.js} +1 -1
- package/bt/es/{index-Cd67JkoX.js → index-BfTbebzJ.js} +1 -1
- package/{sa/es/index-9_ir-rcM.js → bt/es/index-CsOjKWN4.js} +1 -1
- package/bt/es/{index-CYDruSxp.js → index-DhATf0Df.js} +1 -1
- package/bt/es/index-DraZV50T.js +1 -0
- package/bt/es/{index-vE82QAjA.js → index-DvTCAwu1.js} +1 -1
- package/bt/es/index-r66Cd2xZ.js +1 -0
- package/bt/es/index.d.ts +14 -6
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-BJwiaOeV.js → styles-1JWDtwN3.js} +1 -1
- package/bt/es/{styles-D5xd7Hvt.js → styles-9wKvNstR.js} +1 -1
- package/bt/es/{styles-D5T2ZpmU.js → styles-Bx0K6V2M.js} +1 -1
- package/bt/es/{styles-DI3iahFH.js → styles-CVNqYpWx.js} +1 -1
- package/bt/es/{styles-D_uzW3WW.js → styles-DbBVP8RM.js} +1 -1
- package/bt/es/{styles-Dxi9bw8S.js → styles-Df5tBsQK.js} +1 -1
- package/{sa/es/styles-CvGSGzSO.js → bt/es/styles-DsF977Lw.js} +1 -1
- package/bt/es/{styles-W-qv8i7u.js → styles-OaVOhPgb.js} +1 -1
- package/bt/es/{styles-6EXR5zYV.js → styles-XCB733xz.js} +1 -1
- package/bt/es/{styles-C3WS_t8v.js → styles-sSYx1tU1.js} +1 -1
- package/btv2/es/_auto-entry_btv2-Bc9X0Y4s.js +1 -0
- package/btv2/es/events-oapj2yJD.js +1 -0
- package/btv2/es/index-BMCjCGA7.js +1 -0
- package/btv2/es/{index-CwQrOubz.js → index-C91g9VKv.js} +1 -1
- package/{sav2/es/index-D4kR1aOA.js → btv2/es/index-CDAas9Mp.js} +1 -1
- package/btv2/es/{index-CO-rmFyi.js → index-D1qlqRn6.js} +1 -1
- package/btv2/es/{index-tjtRkdna.js → index-DMYukhgR.js} +1 -1
- package/btv2/es/{index-CI9qR038.js → index-DWYgEk6A.js} +1 -1
- package/btv2/es/index-DWsI7Uot.js +1 -0
- package/btv2/es/{index-eb9jjS0f.js → index-GKVYBZqo.js} +1 -1
- package/btv2/es/index.d.ts +14 -6
- package/btv2/es/index.js +1 -1
- package/{sav2/es/styles-JzezxrZr.js → btv2/es/styles-B0z9BTDm.js} +1 -1
- package/btv2/es/{styles-CjAmkfwB.js → styles-BIGBLYzW.js} +1 -1
- package/btv2/es/{styles-DtOFNwbp.js → styles-BaBUQ7Hj.js} +1 -1
- package/{vgv2/es/styles-CVtSN6IJ.js → btv2/es/styles-BmCPT5IC.js} +1 -1
- package/btv2/es/{styles-Drq6h0oi.js → styles-C83E3gfw.js} +1 -1
- package/btv2/es/{styles-CYv9ccwN.js → styles-Ck69XN3a.js} +1 -1
- package/{sav2/es/styles-BxI8QNaZ.js → btv2/es/styles-D5-nIZXy.js} +1 -1
- package/btv2/es/{styles-DF73Rp9s.js → styles-DwgFefcu.js} +1 -1
- package/{sav2/es/styles-DVdw9LnQ.js → btv2/es/styles-mHC_ha2H.js} +1 -1
- package/btv2/styles.css +1 -1
- package/e24/es/_auto-entry_e24-3DlyBhKA.js +1 -0
- package/e24/es/events-CsOsrC6c.js +1 -0
- package/e24/es/{index-CclIZUlD.js → index-BlLqHFf8.js} +1 -1
- package/e24/es/{index-DzcT99p3.js → index-BpEKotdp.js} +1 -1
- package/e24/es/index-CUcx7iNz.js +1 -0
- package/e24/es/{index-CdLXLLrr.js → index-D7dBsGLK.js} +1 -1
- package/e24/es/{index-1AQljQ04.js → index-D8bVQ3yW.js} +1 -1
- package/e24/es/{index-DZc8k80J.js → index-J-Z58Cak.js} +1 -1
- package/{svd/es/index-BjBgwVgk.js → e24/es/index-nixiOIB7.js} +1 -1
- package/e24/es/{index-CBF-dEe0.js → index-uOIzIRd0.js} +1 -1
- package/e24/es/index.d.ts +14 -6
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-mu020Pov.js → styles-BOHykpQ5.js} +1 -1
- package/e24/es/{styles-BA1aQZwV.js → styles-BQUHsL5Q.js} +1 -1
- package/e24/es/{styles-7mXTCMFW.js → styles-BXv14H48.js} +1 -1
- package/e24/es/{styles-BJDXJ_zX.js → styles-BbRRFyx-.js} +1 -1
- package/{tv4/es/styles-CyRqFFvK.js → e24/es/styles-Cd6U5bIi.js} +1 -1
- package/e24/es/{styles-CP89sUxz.js → styles-CvgGilBk.js} +1 -1
- package/e24/es/{styles-CtBvPN4a.js → styles-CwSXXIeb.js} +1 -1
- package/e24/es/{styles-DAhegP-P.js → styles-CyisYILq.js} +1 -1
- package/e24/es/{styles-DaDDz2Ik.js → styles-DcxwsmsJ.js} +1 -1
- package/e24/es/{styles-OfdgLarb.js → styles-Dkxpb8-D.js} +1 -1
- package/e24/es/{styles-xcdIFrAQ.js → styles-DxzLBB0z.js} +1 -1
- package/e24/es/{styles-CcW-Lo_s.js → styles-w4pBXaCr.js} +1 -1
- package/editory/cjs/index.d.ts +14 -6
- package/editory/es/index.d.ts +14 -6
- package/fotbollskanalen/cjs/index.d.ts +14 -6
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DHjzWt3m.js +1 -0
- package/fotbollskanalen/es/events-DhPaztsp.js +1 -0
- package/fotbollskanalen/es/{index-CC5lc9r1.js → index-BQL-Z1u0.js} +1 -1
- package/fotbollskanalen/es/{index-Dz4VZObJ.js → index-BsRgwJa4.js} +1 -1
- package/fotbollskanalen/es/{index-CVZdf_Rx.js → index-D0ptBkNT.js} +1 -1
- package/fotbollskanalen/es/{index-ClH7lZYd.js → index-DWWjtqjW.js} +1 -1
- package/fotbollskanalen/es/{index-B062g8iH.js → index-DkPVXiS0.js} +1 -1
- package/fotbollskanalen/es/index-Ij2nCGGh.js +1 -0
- package/fotbollskanalen/es/{index-BiQvWbga.js → index-KC0rcJ7D.js} +1 -1
- package/fotbollskanalen/es/index-OhJpwiv2.js +1 -0
- package/fotbollskanalen/es/index.d.ts +14 -6
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-PUd99r1p.js → styles-BgMP0tAx.js} +1 -1
- package/fotbollskanalen/es/{styles-kIeF5Tee.js → styles-COp_WpR0.js} +1 -1
- package/fotbollskanalen/es/{styles-CYR96zEK.js → styles-CYoxh3-t.js} +1 -1
- package/fotbollskanalen/es/{styles-CqUKBxOa.js → styles-DWklkjVd.js} +1 -1
- package/fotbollskanalen/es/{styles-hbIy9al3.js → styles-M6SwPIOB.js} +1 -1
- package/godt/cjs/index.d.ts +14 -6
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +12 -6
- package/kilkaya/cjs/index.js +1 -1
- package/kilkaya/es/index.d.ts +12 -6
- package/kilkaya/es/index.js +1 -1
- package/klart/cjs/index.d.ts +14 -6
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +14 -6
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-3tgHdstd.js +1 -0
- package/koket/es/events-B1TMTz87.js +1 -0
- package/koket/es/{index-CJCSxpIT.js → index-B5PBFTA3.js} +1 -1
- package/koket/es/index-CfGWBNLF.js +1 -0
- package/koket/es/{index-CyHpFA0R.js → index-DEqbbLwQ.js} +1 -1
- package/koket/es/{index-BuYqePxS.js → index-DQAIFKwb.js} +1 -1
- package/koket/es/index-DSpgx1_U.js +1 -0
- package/koket/es/{index-CiNrNpCh.js → index-DdeJa-5b.js} +1 -1
- package/koket/es/{index-yZxvx-bT.js → index-Dk81CHNt.js} +1 -1
- package/koket/es/{index-CjQupFNS.js → index-On3BxtYc.js} +1 -1
- package/koket/es/index.d.ts +14 -6
- package/koket/es/index.js +1 -1
- package/koket/es/{styles-D4lGHCAj.js → styles-2N7JCBSK.js} +1 -1
- package/{svdv2/es/styles-20l0ZXp-.js → koket/es/styles-2iD_yEsD.js} +1 -1
- package/{svdv2/es/styles-DGs-Apb5.js → koket/es/styles-BUK-deOK.js} +1 -1
- package/koket/es/{styles-MHpJAgKy.js → styles-Bmy7u8FD.js} +1 -1
- package/koket/es/{styles-Bk2LqxJH.js → styles-CL0biSyD.js} +1 -1
- package/minmote/cjs/index.d.ts +14 -6
- package/minmote/cjs/index.js +1 -1
- package/mtv/es/{_auto-entry_mtv-B3cjM82G.js → _auto-entry_mtv-DCEFUvBr.js} +1 -1
- package/mtv/es/events-DxH68oDH.js +1 -0
- package/mtv/es/{index-Dmzvy7Ik.js → index-B6HjYflQ.js} +1 -1
- package/mtv/es/{index-DSI_fVUO.js → index-BAD0F7ZE.js} +1 -1
- package/mtv/es/{index-KJr93ura.js → index-BAMoZ2vZ.js} +1 -1
- package/mtv/es/{index-CB2gEQ-J.js → index-C3EI4ICI.js} +1 -1
- package/mtv/es/index-CT3lgloM.js +1 -0
- package/{tv4/es/index-DY_KbzcE.js → mtv/es/index-CYjmLZz7.js} +1 -1
- package/mtv/es/{index-Dbca8Wdz.js → index-Ccj7sOml.js} +1 -1
- package/mtv/es/index-DV_dfuSB.js +1 -0
- package/mtv/es/index.d.ts +14 -6
- package/mtv/es/index.js +1 -1
- package/mtv/es/{styles-BmP7USe-.js → styles-Cfoa2vM7.js} +1 -1
- package/omni/es/_auto-entry_omni-DiYOm9sB.js +1 -0
- package/omni/es/events-DMgm4BH-.js +1 -0
- package/omni/es/{index-B5HK22Vl.js → index-B2-V_KFy.js} +1 -1
- package/{tvnu/es/index-BYfYGSNg.js → omni/es/index-BHfhuhm8.js} +1 -1
- package/omni/es/{index-DeIz92Od.js → index-BZ0KgPjr.js} +1 -1
- package/omni/es/{index-azZyW1ts.js → index-DKW-oNyj.js} +1 -1
- package/omni/es/index-DRFR9yJ9.js +1 -0
- package/{sav2/es/index-BBYMFdN4.js → omni/es/index-Qk6STC9Q.js} +1 -1
- package/omni/es/{index-BYeRVmag.js → index-YQLzcuUZ.js} +1 -1
- package/omni/es/index-h0z2F5mn.js +1 -0
- package/omni/es/index.d.ts +14 -6
- package/omni/es/index.js +1 -1
- package/omni/es/{styles-5P3kLgDF.js → styles-BdBaTDGr.js} +1 -1
- package/omni/es/{styles-OyV9dOII.js → styles-CqDHTki0.js} +1 -1
- package/omni/es/{styles-B2m8oYtD.js → styles-Tkumo0Mc.js} +1 -1
- package/package.json +10 -10
- package/pent/cjs/index.d.ts +14 -6
- package/pent/cjs/index.js +1 -1
- package/{tracker → pulse}/cjs/index.d.ts +73 -67
- package/{tracker → pulse}/es/index.d.ts +73 -67
- package/sa/cjs/index.d.ts +14 -6
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-ucdzu0GD.js +1 -0
- package/sa/es/events-B9pt8lBv.js +1 -0
- package/sa/es/{index-YBmHpWiF.js → index-BdboEP_G.js} +1 -1
- package/sa/es/{index-tU1ZiQ84.js → index-BkwWGZpq.js} +1 -1
- package/sa/es/index-CC532gi-.js +1 -0
- package/sa/es/{index-DjrN0SZA.js → index-CNR4GGpr.js} +1 -1
- package/sa/es/index-DAKkM1v8.js +1 -0
- package/{bt/es/index-DKXXF8LP.js → sa/es/index-DZyfMmyw.js} +1 -1
- package/sa/es/{index-JYy4qQG6.js → index-DecwI9h2.js} +1 -1
- package/sa/es/{index-BwYbEx4x.js → index-DqiiypwX.js} +1 -1
- package/sa/es/index.d.ts +14 -6
- package/sa/es/index.js +1 -1
- package/sa/es/{styles-BqdPsBYd.js → styles-0Vkb_nt3.js} +1 -1
- package/{vg/es/styles-oBIOt5yi.js → sa/es/styles-BP1Rt8RB.js} +1 -1
- package/{vg/es/styles-BftlUeQl.js → sa/es/styles-BR1IjsMG.js} +1 -1
- package/sa/es/{styles-h_zr_l4P.js → styles-BWpMXFQP.js} +1 -1
- package/sa/es/{styles-B-0aJxO5.js → styles-BnbwwBGN.js} +1 -1
- package/sa/es/{styles-B_F8cP4o.js → styles-BpB3LtL5.js} +1 -1
- package/sa/es/{styles-CDviFw25.js → styles-CJRjqtfg.js} +1 -1
- package/sa/es/{styles-DHMlzVqk.js → styles-CLcGiS9p.js} +1 -1
- package/sa/es/{styles-D-UU6pn-.js → styles-D-9DKq5u.js} +1 -1
- package/sa/es/{styles-C89JtUkk.js → styles-oFdSsf5x.js} +1 -1
- package/sav2/es/_auto-entry_sav2-DUcwBk3a.js +1 -0
- package/sav2/es/events-BtAwqF88.js +1 -0
- package/sav2/es/index-B783LyIl.js +1 -0
- package/sav2/es/{index-DcwVCopY.js → index-BnzO4uiy.js} +1 -1
- package/{omni/es/index-CjsV26d4.js → sav2/es/index-C1kAF7gq.js} +1 -1
- package/sav2/es/{index-ChVfVb8c.js → index-CQ7xhxVA.js} +1 -1
- package/sav2/es/{index-BjACVq8t.js → index-CgtAXXr5.js} +1 -1
- package/sav2/es/{index-C23z_Fdq.js → index-DUHSGbdP.js} +1 -1
- package/sav2/es/index-DtHEM7GF.js +1 -0
- package/{tvnu/es/index-9zzx0gCz.js → sav2/es/index-JTSv1BC5.js} +1 -1
- package/sav2/es/index.d.ts +14 -6
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-B_dmaxLE.js → sav2/es/styles-B96uy1bA.js} +1 -1
- package/{vgv2/es/styles-DdWYCYVG.js → sav2/es/styles-BURK3VO1.js} +1 -1
- package/sav2/es/{styles-BDOtpcw6.js → styles-BZw_poms.js} +1 -1
- package/sav2/es/{styles-8a9zXaFT.js → styles-C2mkNi-v.js} +1 -1
- package/{btv2/es/styles-oQ-oCuDf.js → sav2/es/styles-COcmMEOL.js} +1 -1
- package/sav2/es/{styles-TjcJMIfU.js → styles-CUiEWYCz.js} +1 -1
- package/sav2/es/{styles-ufHG0oA7.js → styles-DZA0RiXA.js} +1 -1
- package/sav2/es/{styles-BdYV3edn.js → styles-Dxvfo-3H.js} +1 -1
- package/{vgv2/es/styles-BRaFX7WV.js → sav2/es/styles-ZVHwQJkg.js} +1 -1
- package/svd/cjs/index.d.ts +14 -6
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-Ck1VEMVK.js +1 -0
- package/svd/es/events-COVpY30V.js +1 -0
- package/svd/es/{index-EeYKrIpw.js → index-BaKLHK-6.js} +1 -1
- package/svd/es/{index-8Ph4DfEH.js → index-C-B8mHd9.js} +1 -1
- package/svd/es/{index-qRGuRdwE.js → index-C68IVPvH.js} +1 -1
- package/svd/es/index-CpPzRBQ0.js +1 -0
- package/svd/es/{index-BH-0-UAm.js → index-DO7ecV-e.js} +1 -1
- package/{e24/es/index-C8tM3PuE.js → svd/es/index-DcMoKj47.js} +1 -1
- package/svd/es/{index-AeCqP2yF.js → index-DrmXKC6p.js} +1 -1
- package/svd/es/index-jDspcCFP.js +1 -0
- package/svd/es/index.d.ts +14 -6
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-D3WtFJrl.js → styles-BoYyGhrG.js} +1 -1
- package/svd/es/{styles-B5eopUSV.js → styles-CP54RnGo.js} +1 -1
- package/svd/es/{styles-BOkVHh6p.js → styles-CsZrgxNv.js} +1 -1
- package/svd/es/{styles-D-LLlesE.js → styles-DOpYzwLc.js} +1 -1
- package/svd/es/{styles-DnyHMYOV.js → styles-DiKAUfvj.js} +1 -1
- package/svd/es/{styles-BChXpFwa.js → styles-HuEvzlpF.js} +1 -1
- package/svd/es/{styles-b5Mbel64.js → styles-KCbchyKn.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-B_L1Coag.js +1 -0
- package/svdv2/es/events-B2_U7OC1.js +1 -0
- package/svdv2/es/{index-Dw7hXBBy.js → index-Bi9yLp3P.js} +1 -1
- package/svdv2/es/{index-zYd4nbC3.js → index-CddOb8U1.js} +1 -1
- package/svdv2/es/{index-BXDYT3_1.js → index-CrCOVQ0H.js} +1 -1
- package/svdv2/es/index-CwmboBpq.js +1 -0
- package/svdv2/es/{index-B-AiFnZ_.js → index-D7B-hGgg.js} +1 -1
- package/svdv2/es/{index-CmbZidp2.js → index-D9B9N0eJ.js} +1 -1
- package/svdv2/es/{index-DLpvDR-I.js → index-DRHViYAD.js} +1 -1
- package/svdv2/es/index-QVXdfI5S.js +1 -0
- package/svdv2/es/index.d.ts +14 -6
- package/svdv2/es/index.js +1 -1
- package/svdv2/es/{styles-Ci4Nbw0U.js → styles-B_Kve0Qi.js} +1 -1
- package/{koket/es/styles-CaOTkmnD.js → svdv2/es/styles-BqFJHkS3.js} +1 -1
- package/svdv2/es/{styles-C6NxggPn.js → styles-BrjW0wgx.js} +1 -1
- package/svdv2/es/{styles-BJvoH6Jk.js → styles-Bv8MNJdE.js} +1 -1
- package/{koket/es/styles-CJJn5fT9.js → svdv2/es/styles-CPRKf9nj.js} +1 -1
- package/svdv2/es/{styles-BH67mOg3.js → styles-D-ZuBJFL.js} +1 -1
- package/svdv2/es/{styles-DOO5Er36.js → styles-cRhOMQxG.js} +1 -1
- package/svdv2/es/{styles-CHpGV0wA.js → styles-zwn7pUid.js} +1 -1
- package/tek/cjs/index.d.ts +14 -6
- package/tek/cjs/index.js +1 -1
- package/tv4/cjs/index.d.ts +14 -6
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-BWewdI2J.js +1 -0
- package/tv4/es/events-Dks_W8aT.js +1 -0
- package/tv4/es/{index-BMT26b41.js → index-BTSJViQy.js} +1 -1
- package/tv4/es/{index-CvsR27tZ.js → index-CDYc1vT1.js} +1 -1
- package/tv4/es/index-CKRaPiHU.js +1 -0
- package/tv4/es/index-D-cgB-Qv.js +1 -0
- package/{mtv/es/index-3eJV2uf4.js → tv4/es/index-D4un3a4_.js} +1 -1
- package/tv4/es/{index-DwQGPNxM.js → index-Dm6HZPPJ.js} +1 -1
- package/tv4/es/{index-Xw6gVmp3.js → index-DncCBxyr.js} +1 -1
- package/tv4/es/{index-E2lf1BUb.js → index-QfZ1yDKX.js} +1 -1
- package/tv4/es/index.d.ts +14 -6
- package/tv4/es/index.js +1 -1
- package/tv4/es/{styles-Ctd-ZhYW.js → styles-Be20SQxQ.js} +1 -1
- package/{e24/es/styles-MloIpb_Z.js → tv4/es/styles-CI-zLM5m.js} +1 -1
- package/tv4/es/{styles-C04Zu8QC.js → styles-CQeRAogO.js} +1 -1
- package/tv4/es/{styles-dezj9l9t.js → styles-CS6EwYj9.js} +1 -1
- package/tv4/es/{styles-lCSubF4z.js → styles-DA9QaBiB.js} +1 -1
- package/tvnu/cjs/index.d.ts +14 -6
- package/tvnu/cjs/index.js +1 -1
- package/tvnu/es/_auto-entry_tvnu-qU7WnhRl.js +1 -0
- package/tvnu/es/events-C41LfSUd.js +1 -0
- package/{omni/es/index-C6VmXAJr.js → tvnu/es/index-8UcLg3fF.js} +1 -1
- package/tvnu/es/{index-DxcZwOdu.js → index-BDhDw0n8.js} +1 -1
- package/tvnu/es/index-C5wK_iuc.js +1 -0
- package/{btv2/es/index-CAmnFTcf.js → tvnu/es/index-CUYn_8le.js} +1 -1
- package/tvnu/es/{index-CFiCKgVo.js → index-DGim-Ymn.js} +1 -1
- package/tvnu/es/{index-OazPvFTJ.js → index-DLOLNdW1.js} +1 -1
- package/tvnu/es/{index-C5hTShPW.js → index-DuY8DiPV.js} +1 -1
- package/tvnu/es/index-cJgbtogX.js +1 -0
- package/tvnu/es/index.d.ts +14 -6
- package/tvnu/es/index.js +1 -1
- package/tvnu/es/{styles-BDIRHptp.js → styles-9v98_12Z.js} +1 -1
- package/tvnu/es/{styles-Cmst0_AX.js → styles-BZSG1wSv.js} +1 -1
- package/tvnu/es/{styles-C8-5xecc.js → styles-CVpVuXGM.js} +1 -1
- package/{btv2/es/styles-wKCi4pBU.js → tvnu/es/styles-vWn7lrpp.js} +1 -1
- package/types/index.d.ts +14 -6
- package/vg/cjs/index.d.ts +14 -6
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-nT8CYeFA.js +1 -0
- package/vg/es/events-Ce-3oCAR.js +1 -0
- package/vg/es/{index-C_4WJjcD.js → index--qIDvYhQ.js} +1 -1
- package/vg/es/{index-B1W-5bVk.js → index-B1wv1t3G.js} +1 -1
- package/vg/es/{index-BHzyngn6.js → index-CZbmC7Ja.js} +1 -1
- package/vg/es/{index-dtOp4Ft_.js → index-CjHCSG0t.js} +1 -1
- package/vg/es/{index-BRtI2l1B.js → index-DBo7tyHP.js} +1 -1
- package/vg/es/{index-DmMlC8yI.js → index-DEn_H7Hl.js} +1 -1
- package/vg/es/{index-Cq6BvtL_.js → index-DYVf_ejx.js} +1 -1
- package/vg/es/index-pO5JZYdy.js +1 -0
- package/vg/es/index.d.ts +14 -6
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-3vINy5hq.js → styles-4e380VkF.js} +1 -1
- package/vg/es/{styles-C0TalB3F.js → styles-B2xZdw65.js} +1 -1
- package/vg/es/{styles-D4eGgyZx.js → styles-BJbgNH0L.js} +1 -1
- package/vg/es/{styles-C3VlGdBE.js → styles-BQJhpR4p.js} +1 -1
- package/vg/es/{styles-CuM4XL4r.js → styles-BVTSl43k.js} +1 -1
- package/{sa/es/styles-Dr725TOe.js → vg/es/styles-BWXLJkUe.js} +1 -1
- package/vg/es/{styles-B2_Ei2-8.js → styles-Bcw8IOwy.js} +1 -1
- package/vg/es/{styles-BMzmUOJN.js → styles-CJvfJnuD.js} +1 -1
- package/vg/es/{styles-FCeEywSP.js → styles-ChZ3sq55.js} +1 -1
- package/vg/es/{styles-BynvHO9c.js → styles-CofOhUt1.js} +1 -1
- package/vg/es/{styles-D5X2JwN6.js → styles-DU1TRHOr.js} +1 -1
- package/vg/es/{styles-DtXm-Ref.js → styles-DbtcxxqK.js} +1 -1
- package/vg/es/{styles-Ctk7QEVg.js → styles-DsmKO01b.js} +1 -1
- package/vg/es/{styles-BRmjwW06.js → styles-R-LSxDrz.js} +1 -1
- package/vg/es/{styles-Ca-_g_6k.js → styles-ZIVjd7Kj.js} +1 -1
- package/{bt/es/styles-DATz2nfg.js → vg/es/styles-sUHuRG9Y.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-STK09567.js +1 -0
- package/vgv2/es/events-CTEuqItr.js +1 -0
- package/vgv2/es/{index-xGSpaSdE.js → index-CKv_J9qN.js} +1 -1
- package/vgv2/es/index-CaGXaBIE.js +1 -0
- package/vgv2/es/index-CnQNMS2u.js +1 -0
- package/vgv2/es/{index-CafbPF86.js → index-CpfXzBbX.js} +1 -1
- package/vgv2/es/{index-ApiYb4Jt.js → index-D1vocHKf.js} +1 -1
- package/vgv2/es/{index-ClLzNthF.js → index-DOzk-lYH.js} +1 -1
- package/vgv2/es/{index-C-vtYSIl.js → index-Dq37qrh_.js} +1 -1
- package/vgv2/es/{index-CHpRUEKy.js → index-SfU1VkhH.js} +1 -1
- package/vgv2/es/index.d.ts +14 -6
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{styles-D0HFCOfi.js → styles--V_VVpJ8.js} +1 -1
- package/vgv2/es/{styles-DH1S9E-P.js → styles-B3MDBJKG.js} +1 -1
- package/vgv2/es/{styles-XevVA7vP.js → styles-C24lCY9K.js} +1 -1
- package/{sav2/es/styles-DG_UYGmv.js → vgv2/es/styles-C65hTDSa.js} +1 -1
- package/vgv2/es/{styles-BsM7FFsM.js → styles-CICOgIpG.js} +1 -1
- package/vgv2/es/{styles-jcmV6KpN.js → styles-CXo6pHfv.js} +1 -1
- package/vgv2/es/{styles-DHYmekJh.js → styles-CfUB5ZeY.js} +1 -1
- package/{btv2/es/styles-CJqhpmvB.js → vgv2/es/styles-CmSgk5EQ.js} +1 -1
- package/vgv2/es/{styles-Xi9QM1Ib.js → styles-CnDSdYK5.js} +1 -1
- package/vgv2/es/{styles-sUixzFmN.js → styles-D8AbbwMs.js} +1 -1
- package/vgv2/es/{styles-B3tp8X5j.js → styles-DesI8c5n.js} +1 -1
- package/vgv2/es/{styles-DRZLQWC9.js → styles-DjDLo0Uv.js} +1 -1
- package/{tvnu/es/styles-CdRqPKMc.js → vgv2/es/styles-DqR1rfSj.js} +1 -1
- package/vgv2/es/{styles-C-KCy1Kj.js → styles-UT2XT9Ar.js} +1 -1
- package/vgv2/es/styles-Uf8_10Aw.js +1 -0
- package/vgv2/es/{styles-DORfMAqC.js → styles-ymhcL2FI.js} +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-b0y6e9cl.js +0 -1
- package/aftenposten/es/events-DPNnYlfA.js +0 -1
- package/aftenposten/es/index-CN2oVSgJ.js +0 -1
- package/aftenposten/es/index-DHc_dP2Z.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BLiPUAZ4.js +0 -1
- package/aftenpostenv2/es/events-DvmFMPMT.js +0 -1
- package/aftenpostenv2/es/index-3Qxcwyk4.js +0 -1
- package/aftenpostenv2/es/index-CYSeTeEv.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-Bjlb4roy.js +0 -1
- package/aftonbladet/es/events-BajOdJr2.js +0 -1
- package/aftonbladet/es/index-BrjN2etN.js +0 -1
- package/aftonbladet/es/index-Cmwj6Oyf.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Bm4ucKUa.js +0 -1
- package/aftonbladetv2/es/events-BoHrcmNf.js +0 -1
- package/aftonbladetv2/es/index-D2cSv_ZE.js +0 -1
- package/aftonbladetv2/es/index-XIy7hYZP.js +0 -1
- package/bt/es/_auto-entry_bt-DZ1dqndN.js +0 -1
- package/bt/es/events-tSdmJX0c.js +0 -1
- package/bt/es/index-XfeF_trd.js +0 -1
- package/bt/es/index-lKXFyrjV.js +0 -1
- package/btv2/es/_auto-entry_btv2-DHXIwMdb.js +0 -1
- package/btv2/es/events-Dy3xkIfQ.js +0 -1
- package/btv2/es/index-D1XmRKBk.js +0 -1
- package/btv2/es/index-DiDbJpSB.js +0 -1
- package/e24/es/_auto-entry_e24-Ccim4RT9.js +0 -1
- package/e24/es/events-Dsfcuo7x.js +0 -1
- package/e24/es/index-DllTZl0h.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-Bmf_9elh.js +0 -1
- package/fotbollskanalen/es/events-Cpw3ehR3.js +0 -1
- package/fotbollskanalen/es/index-Bs07rQzu.js +0 -1
- package/fotbollskanalen/es/index-CtOzQCgD.js +0 -1
- package/koket/es/_auto-entry_koket-BX9WzHD2.js +0 -1
- package/koket/es/events-Dp2GC5Vw.js +0 -1
- package/koket/es/index-BcMo8ZRV.js +0 -1
- package/koket/es/index-DGiTI497.js +0 -1
- package/mtv/es/events-DKT9xuzN.js +0 -1
- package/mtv/es/index-DRw9YeDg.js +0 -1
- package/mtv/es/index-DvOGa6J_.js +0 -1
- package/omni/es/_auto-entry_omni-h74CS6jz.js +0 -1
- package/omni/es/events-DGa3i45v.js +0 -1
- package/omni/es/index-CiPdtUk_.js +0 -1
- package/omni/es/index-D-UZw0Ix.js +0 -1
- package/sa/es/_auto-entry_sa-DtF0Jp_m.js +0 -1
- package/sa/es/events-t6Dioh-2.js +0 -1
- package/sa/es/index-B2H4G3ec.js +0 -1
- package/sa/es/index-DGgiXu9v.js +0 -1
- package/sav2/es/_auto-entry_sav2-B988cMVA.js +0 -1
- package/sav2/es/events-BH3lVEmT.js +0 -1
- package/sav2/es/index-DG0pgqM3.js +0 -1
- package/sav2/es/index-oDkS5sGI.js +0 -1
- package/svd/es/_auto-entry_svd-B3OGyfzI.js +0 -1
- package/svd/es/events-DRX-i4s2.js +0 -1
- package/svd/es/index-DykSatgR.js +0 -1
- package/svd/es/index-wtkCMbUC.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-f1IlGTNa.js +0 -1
- package/svdv2/es/events-CXtnujik.js +0 -1
- package/svdv2/es/index-DJM2OdYx.js +0 -1
- package/svdv2/es/index-a1M3M8Wp.js +0 -1
- package/tv4/es/_auto-entry_tv4-CQCQFWRY.js +0 -1
- package/tv4/es/events-CpiHfOZJ.js +0 -1
- package/tv4/es/index-DBPML9U9.js +0 -1
- package/tv4/es/index-KoUFIm4v.js +0 -1
- package/tvnu/es/_auto-entry_tvnu-Dlrnxn0a.js +0 -1
- package/tvnu/es/events-DTV23Jiy.js +0 -1
- package/tvnu/es/index-CkKHFPG2.js +0 -1
- package/tvnu/es/index-vqrL4y93.js +0 -1
- package/vg/es/_auto-entry_vg-DxRZkQt7.js +0 -1
- package/vg/es/events-BpqeJPlQ.js +0 -1
- package/vg/es/index-446mhKqk.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-DXKn5yIm.js +0 -1
- package/vgv2/es/events-BFEoOcat.js +0 -1
- package/vgv2/es/index-9Lax4_hx.js +0 -1
- package/vgv2/es/index-BgS-z4vY.js +0 -1
- package/vgv2/es/styles-eIQqqEL1.js +0 -1
- /package/{tracker → pulse}/cjs/index.js +0 -0
- /package/{tracker → pulse}/es/index.js +0 -0
package/kilkaya/cjs/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ interface AstAdObj {
|
|
|
98
98
|
subtype?: string;
|
|
99
99
|
renderer_url?: string;
|
|
100
100
|
bidderId?: number | undefined;
|
|
101
|
+
uuid: string;
|
|
101
102
|
}
|
|
102
103
|
interface SafeFrameConfig {
|
|
103
104
|
allowExpansionByPush?: boolean;
|
|
@@ -153,6 +154,13 @@ declare const DeviceTypes: {
|
|
|
153
154
|
};
|
|
154
155
|
type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
|
|
155
156
|
|
|
157
|
+
interface AdvertisingIdentifiers {
|
|
158
|
+
xandr?: {
|
|
159
|
+
ppId1?: string;
|
|
160
|
+
ppId2?: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
156
164
|
/**
|
|
157
165
|
* SDK-agnostic shape of the pulse tracker instance advertory actually calls.
|
|
158
166
|
* getActor is typed Promise<unknown> — nothing in this codebase reads its
|
|
@@ -168,12 +176,6 @@ interface PulseInstance {
|
|
|
168
176
|
};
|
|
169
177
|
}
|
|
170
178
|
|
|
171
|
-
interface AdvertisingIdentifiers {
|
|
172
|
-
xandr?: {
|
|
173
|
-
ppId1?: string;
|
|
174
|
-
ppId2?: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
179
|
interface PulseLegacyExtras {
|
|
178
180
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
179
181
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
@@ -181,11 +183,15 @@ interface PulseLegacyExtras {
|
|
|
181
183
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
182
184
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
183
185
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
186
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
187
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
188
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
184
189
|
}
|
|
185
190
|
interface PulseConfig {
|
|
186
191
|
clientId: string;
|
|
187
192
|
instance: PulseInstance & PulseLegacyExtras;
|
|
188
193
|
hasherUrl?: string;
|
|
194
|
+
adTrackingEnabled?: boolean;
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
declare const Newsrooms: {
|
package/kilkaya/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="svd",r="vg",i="sa",o="bt",a="aftonbladet",s="e24";class l{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class d{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class c{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class u extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const g=/^glci_/,v="gender_",p="geo_",f="male",y="female";class h extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const m="no",b="se",w="[data-k5a-teaser-analytics]",k=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===b?h:u)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(w);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(w);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},P=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},T=(e,t)=>{console.warn("[Advertory WARN]: ",e)},E=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return P("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(P("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{P("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{P("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);P("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),C="cmp:loaded";let S="undefined"!=typeof window?window._tcf_:void 0,I=!1;const A=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(P("TCF bypass param detected, returning consent: true"),!0):(P("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(I)return null;if(!S)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=S.getConsentedToAllSync();return P(`TCF consented to all is: ${t}`),S.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(P("Getting TCF consent manager..."),window._tcf_)return P("TCF consent manager is already available"),S=window._tcf_,void e(S);P("TCF consent manager is not available");const n=()=>{P("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(S=window._tcf_,e(S)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(C,n),I=!0,t(new Error("Timeout waiting for CMP to load"))},o);P("Listening for CMP loaded event..."),document.addEventListener(C,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return P(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===b,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===m;if(t||n)return P("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield E(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!S)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{P("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);S.onTcfReady(()=>{P("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),S.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class O{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return P("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L;var _=j(function(){if(L)return U;L=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},U=s}());const M={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},N=(e,t)=>_(e,t,M),$=(e,t)=>Object.assign(Object.assign({},e),t),D=(e,t)=>{var n;return N(null!==(n=e)&&void 0!==n?n:{},t)},x={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},B=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||T("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||T("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||T("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||T("pageContext.deviceType is required."),n||T("pageOptions is required."),r||T("placements is required."),(null==i?void 0:i.defaultThreshold)||T("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&T(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},F={placements:(e,t)=>t,takeover:D,refreshConfig:$,editory:D,appearanceConfig:D,pageContext:$,pageOptions:$,pageSectionsSelectors:$,tcf:$};class K{set(e){B(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(F)){const r=t[e];void 0!==r&&(n[e]=F[e](n[e],r))}})(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=N(K.DEFAULT_SITE_HANDLERS,e)}}K.DEFAULT_SITE_HANDLERS={siteEvents:x,initNativeAd:()=>{}};const q=new K;q.modifyConfigProperties.bind(q);const R=864e5,V=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return P("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=R)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=R)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return P("Error with parsing localStorage data"),null}}}})(),z=e=>e.startsWith("glci_"),H=()=>{var e;return((e=[])=>e.filter(z))(null!==(e=(()=>{const e=V.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},J=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new O(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===f||o===y?`${v}${o}`:void 0}catch(e){return}var e}),W=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield J(),n=(()=>{const e=H().map(e=>`${p}${e.replace(g,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),X="front";class G{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Q{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Y{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ee{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class ne{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new G,"no-aftenposten":new Q,[o]:new Y,"no-bergenstidende":new Y,[i]:new Z,"no-stavangeraftenblad":new Z,[n]:new ee,[a]:new te}[c]||new d;k(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield W();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(P(`Kilkaya event for slot: ${n}`),!n)return void P("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(P(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):P("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="flex";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return P(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return P(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=A(e,0,n);return(yield i())?(P(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(P(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new ne;yield t.run(e)});
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="svd",r="vg",i="sa",o="bt",a="aftonbladet",s="e24";class l{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class d{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const c=(e,t)=>{new IntersectionObserver((e,n)=>{for(const r of e)if(r.intersectionRatio>=.5){n.disconnect(),t();break}},{threshold:.5}).observe(e)};class u{constructor(e,t){this.pulse=e,this.publisher=t}static extractAdFormat(e){return e.replace(/_\d.*$/,"")}computeInvCode(){}buildPlacement(e){return{placementId:null!=e?e:""}}trackLoad(){var e,t;null===(t=(e=this.pulse).trackLoadAd)||void 0===t||t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})}trackImpression(){const e=document.querySelector(`#${this.getTargetId()}`);e&&c(e,()=>{var e,t;return null===(t=(e=this.pulse).trackImpressionAd)||void 0===t?void 0:t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})})}trackEngagement(e){var t,n;null===(n=(t=this.pulse).trackEngagementAd)||void 0===n||n.call(t,{object:this.buildAdObject(),placement:this.buildPlacement(null!=e?e:this.computeInvCode()),engagement:{action:"Click",elementName:this.getTargetId()}})}}const g="[data-k5a-teaser-analytics]";class p extends u{constructor(e,t,n,r){super(e,""),this.root=t,this.newsroomStrategy=n,this.pageType=r}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const e=this.root.querySelector("article");if(!e)return{};const t=e.dataset.k5aTeaserAnalytics;try{return t?JSON.parse(t):{}}catch(e){return{}}}mapPageType(e){var t;return null!==(t={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=e?e:"front"])&&void 0!==t?t:"Frontpage"}getArticleId(){var e;return null!==(e=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==e?e:""}getPlacementData(){var e,t;const n=this.root.closest(".kilkaya-wrapper");return{columnName:null!==(e=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==e?e:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(t=null==n?void 0:n.dataset.slotTag)&&void 0!==t?t:""}}getEventTarget(){const{link:e,itemId:t,title:n}=this.parseKilkayaData();return{id:t,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:e}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(e){const t=this.root.querySelector(g);if(Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics))return void e();const n=new MutationObserver(()=>{const t=this.root.querySelector(g);Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics)&&(n.disconnect(),e())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){c(this.root,()=>this.waitForAnalyticsData(()=>{var e,t;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const r=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(r):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(r):null===(t=(e=this.pulse).trackElementView)||void 0===t||t.call(e,r)}))}trackEngagement(e){var t,n;const r=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(r):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(r):null===(n=(t=this.pulse).trackElementClick)||void 0===n||n.call(t,r)}}class v extends p{getEventBaseData(){var e,t,n,r;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.getPulsePageId(null!==(t=this.pageType)&&void 0!==t?t:"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,this.root)})}getEventInput(e){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(e),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(e){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:e,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class m extends p{getEventBaseData(){var e,t;const{title:n="",clientName:r="",creativeId:i="",link:o="",itemId:a=""}=this.parseKilkayaData(),{columnName:s,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:o,urlPath:o?new URL(o).pathname:""},{publicUrl:g,urlPath:p}=o&&(null===(t=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.transformUrl)||void 0===t?void 0:t.call(e,o))||u;return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:s,primaryPosition:l,secondaryPosition:d,source:c},tags:[r,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":i,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(e){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}const h="no",f="se",y=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},b=(e,t)=>{console.warn("[Advertory WARN]: ",e)},w=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return y("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(y("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{y("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{y("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);y("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),k="cmp:loaded";let P="undefined"!=typeof window?window._tcf_:void 0,T=!1;const E=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(y("TCF bypass param detected, returning consent: true"),!0):(y("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(T)return null;if(!P)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=P.getConsentedToAllSync();return y(`TCF consented to all is: ${t}`),P.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(y("Getting TCF consent manager..."),window._tcf_)return y("TCF consent manager is already available"),P=window._tcf_,void e(P);y("TCF consent manager is not available");const n=()=>{y("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(P=window._tcf_,e(P)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(k,n),T=!0,t(new Error("Timeout waiting for CMP to load"))},o);y("Listening for CMP loaded event..."),document.addEventListener(k,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return y(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return y("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield w(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!P)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{y("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);P.onTcfReady(()=>{y("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),P.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class I{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return y("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A,S;var O=C(function(){if(S)return A;S=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},A=s}());const j={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},L=(e,t)=>O(e,t,j),U=(e,t)=>Object.assign(Object.assign({},e),t),_=(e,t)=>{var n;return L(null!==(n=e)&&void 0!==n?n:{},t)},N={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},$=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||b("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||b("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||b("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||b("pageContext.deviceType is required."),n||b("pageOptions is required."),r||b("placements is required."),(null==i?void 0:i.defaultThreshold)||b("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&b(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},M={placements:(e,t)=>t,takeover:_,refreshConfig:U,editory:_,appearanceConfig:_,pageContext:U,pageOptions:U,pageSectionsSelectors:U,tcf:U};class x{set(e){$(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(M)){const r=t[e];void 0!==r&&(n[e]=M[e](n[e],r))}})(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=L(x.DEFAULT_SITE_HANDLERS,e)}}x.DEFAULT_SITE_HANDLERS={siteEvents:N,initNativeAd:()=>{}};const D=new x;D.modifyConfigProperties.bind(D);const F=864e5,B=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return y("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=F)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=F)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return y("Error with parsing localStorage data"),null}}}})(),q=e=>e.startsWith("glci_"),K=()=>{var e;return((e=[])=>e.filter(q))(null!==(e=(()=>{const e=B.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},R=/^glci_/,V="gender_",H="geo_",z="male",J="female",W=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new I(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===z||o===J?`${V}${o}`:void 0}catch(e){return}var e}),X=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=K().map(e=>`${H}${e.replace(R,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Y{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new Q,"no-aftenposten":new Y,[o]:new Z,"no-bergenstidende":new Z,[i]:new ee,"no-stavangeraftenblad":new ee,[n]:new te,[a]:new ne}[c]||new d;((e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const o=r===f?new m(e,i,t):new v(e,i,t,n);o.trackImpression(),i.addEventListener("click",()=>o.trackEngagement())})})(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(y(`Kilkaya event for slot: ${n}`),!n)return void y("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(y(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):y("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="flex";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return y(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return y(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=E(e,0,n);return(yield i())?(y(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(y(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":n},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});
|
package/kilkaya/es/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ interface AstAdObj {
|
|
|
98
98
|
subtype?: string;
|
|
99
99
|
renderer_url?: string;
|
|
100
100
|
bidderId?: number | undefined;
|
|
101
|
+
uuid: string;
|
|
101
102
|
}
|
|
102
103
|
interface SafeFrameConfig {
|
|
103
104
|
allowExpansionByPush?: boolean;
|
|
@@ -153,6 +154,13 @@ declare const DeviceTypes: {
|
|
|
153
154
|
};
|
|
154
155
|
type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
|
|
155
156
|
|
|
157
|
+
interface AdvertisingIdentifiers {
|
|
158
|
+
xandr?: {
|
|
159
|
+
ppId1?: string;
|
|
160
|
+
ppId2?: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
156
164
|
/**
|
|
157
165
|
* SDK-agnostic shape of the pulse tracker instance advertory actually calls.
|
|
158
166
|
* getActor is typed Promise<unknown> — nothing in this codebase reads its
|
|
@@ -168,12 +176,6 @@ interface PulseInstance {
|
|
|
168
176
|
};
|
|
169
177
|
}
|
|
170
178
|
|
|
171
|
-
interface AdvertisingIdentifiers {
|
|
172
|
-
xandr?: {
|
|
173
|
-
ppId1?: string;
|
|
174
|
-
ppId2?: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
179
|
interface PulseLegacyExtras {
|
|
178
180
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
179
181
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
@@ -181,11 +183,15 @@ interface PulseLegacyExtras {
|
|
|
181
183
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
182
184
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
183
185
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
186
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
187
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
188
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
184
189
|
}
|
|
185
190
|
interface PulseConfig {
|
|
186
191
|
clientId: string;
|
|
187
192
|
instance: PulseInstance & PulseLegacyExtras;
|
|
188
193
|
hasherUrl?: string;
|
|
194
|
+
adTrackingEnabled?: boolean;
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
declare const Newsrooms: {
|
package/kilkaya/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class u{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class g extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const v=/^glci_/,p="gender_",f="geo_",h="male",m="female";class y extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const b="no",w="se",k="[data-k5a-teaser-analytics]",P=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===w?y:g)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(k);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(k);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},T=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},E=(e,t)=>{console.warn("[Advertory WARN]: ",e)},C=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return T("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(T("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{T("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{T("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);T("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),S="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,A=!1;const O=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(T("TCF bypass param detected, returning consent: true"),!0):(T("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(A)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=I.getConsentedToAllSync();return T(`TCF consented to all is: ${t}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(T("Getting TCF consent manager..."),window._tcf_)return T("TCF consent manager is already available"),I=window._tcf_,void e(I);T("TCF consent manager is not available");const n=()=>{T("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(I=window._tcf_,e(I)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(S,n),A=!0,t(new Error("Timeout waiting for CMP to load"))},o);T("Listening for CMP loaded event..."),document.addEventListener(S,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return T(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===w,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===b;if(t||n)return T("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield C(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{T("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);I.onTcfReady(()=>{T("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),I.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class U{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return T("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,_;var M=j(function(){if(_)return L;_=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},L=s}());const N={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},$=(e,t)=>M(e,t,N),D=(e,t)=>Object.assign(Object.assign({},e),t),B=(e,t)=>{var n;return $(null!==(n=e)&&void 0!==n?n:{},t)},F={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},K=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||E("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||E("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||E("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||E("pageContext.deviceType is required."),n||E("pageOptions is required."),r||E("placements is required."),(null==i?void 0:i.defaultThreshold)||E("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&E(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},q={placements:(e,t)=>t,takeover:B,refreshConfig:D,editory:B,appearanceConfig:B,pageContext:D,pageOptions:D,pageSectionsSelectors:D,tcf:D};class x{set(e){K(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(q)){const r=t[e];void 0!==r&&(n[e]=q[e](n[e],r))}})(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=$(x.DEFAULT_SITE_HANDLERS,e)}}x.DEFAULT_SITE_HANDLERS={siteEvents:F,initNativeAd:()=>{}};const R=new x;R.modifyConfigProperties.bind(R);const V=864e5,z=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return T("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=V)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=V)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return T("Error with parsing localStorage data"),null}}}})(),H=e=>e.startsWith("glci_"),J=()=>{var e;return((e=[])=>e.filter(H))(null!==(e=(()=>{const e=z.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},W=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new U(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===h||o===m?`${p}${o}`:void 0}catch(e){return}var e}),X=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=J().map(e=>`${f}${e.replace(v,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Y{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Q,"no-aftenposten":new Y,[a]:new Z,"no-bergenstidende":new Z,[o]:new ee,"no-stavangeraftenblad":new ee,[r]:new te,[s]:new ne}[n]||new c;P(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(T(`Kilkaya event for slot: ${n}`),!n)return void T("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(T(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):T("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="flex";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return T(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return T(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=O(e,0,n);return(yield i())?(T(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(T(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}const ie=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},oe=e=>n(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});export{ie as Kilkaya,oe as runKilkaya};
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const u=(e,t)=>{new IntersectionObserver((e,n)=>{for(const r of e)if(r.intersectionRatio>=.5){n.disconnect(),t();break}},{threshold:.5}).observe(e)};class g{constructor(e,t){this.pulse=e,this.publisher=t}static extractAdFormat(e){return e.replace(/_\d.*$/,"")}computeInvCode(){}buildPlacement(e){return{placementId:null!=e?e:""}}trackLoad(){var e,t;null===(t=(e=this.pulse).trackLoadAd)||void 0===t||t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})}trackImpression(){const e=document.querySelector(`#${this.getTargetId()}`);e&&u(e,()=>{var e,t;return null===(t=(e=this.pulse).trackImpressionAd)||void 0===t?void 0:t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})})}trackEngagement(e){var t,n;null===(n=(t=this.pulse).trackEngagementAd)||void 0===n||n.call(t,{object:this.buildAdObject(),placement:this.buildPlacement(null!=e?e:this.computeInvCode()),engagement:{action:"Click",elementName:this.getTargetId()}})}}const p="[data-k5a-teaser-analytics]";class v extends g{constructor(e,t,n,r){super(e,""),this.root=t,this.newsroomStrategy=n,this.pageType=r}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const e=this.root.querySelector("article");if(!e)return{};const t=e.dataset.k5aTeaserAnalytics;try{return t?JSON.parse(t):{}}catch(e){return{}}}mapPageType(e){var t;return null!==(t={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=e?e:"front"])&&void 0!==t?t:"Frontpage"}getArticleId(){var e;return null!==(e=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==e?e:""}getPlacementData(){var e,t;const n=this.root.closest(".kilkaya-wrapper");return{columnName:null!==(e=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==e?e:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(t=null==n?void 0:n.dataset.slotTag)&&void 0!==t?t:""}}getEventTarget(){const{link:e,itemId:t,title:n}=this.parseKilkayaData();return{id:t,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:e}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(e){const t=this.root.querySelector(p);if(Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics))return void e();const n=new MutationObserver(()=>{const t=this.root.querySelector(p);Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics)&&(n.disconnect(),e())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){u(this.root,()=>this.waitForAnalyticsData(()=>{var e,t;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const r=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(r):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(r):null===(t=(e=this.pulse).trackElementView)||void 0===t||t.call(e,r)}))}trackEngagement(e){var t,n;const r=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(r):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(r):null===(n=(t=this.pulse).trackElementClick)||void 0===n||n.call(t,r)}}class m extends v{getEventBaseData(){var e,t,n,r;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.getPulsePageId(null!==(t=this.pageType)&&void 0!==t?t:"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,this.root)})}getEventInput(e){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(e),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(e){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:e,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class h extends v{getEventBaseData(){var e,t;const{title:n="",clientName:r="",creativeId:i="",link:o="",itemId:a=""}=this.parseKilkayaData(),{columnName:s,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:o,urlPath:o?new URL(o).pathname:""},{publicUrl:g,urlPath:p}=o&&(null===(t=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.transformUrl)||void 0===t?void 0:t.call(e,o))||u;return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:s,primaryPosition:l,secondaryPosition:d,source:c},tags:[r,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":i,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(e){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}const f="no",y="se",b=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},w=(e,t)=>{console.warn("[Advertory WARN]: ",e)},k=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return b("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(b("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{b("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{b("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);b("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),P="cmp:loaded";let T="undefined"!=typeof window?window._tcf_:void 0,E=!1;const I=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(b("TCF bypass param detected, returning consent: true"),!0):(b("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(E)return null;if(!T)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=T.getConsentedToAllSync();return b(`TCF consented to all is: ${t}`),T.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(b("Getting TCF consent manager..."),window._tcf_)return b("TCF consent manager is already available"),T=window._tcf_,void e(T);b("TCF consent manager is not available");const n=()=>{b("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(T=window._tcf_,e(T)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(P,n),E=!0,t(new Error("Timeout waiting for CMP to load"))},o);b("Listening for CMP loaded event..."),document.addEventListener(P,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return b(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return b("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield k(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!T)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{b("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);T.onTcfReady(()=>{b("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),T.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return b("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S,O;var j=A(function(){if(O)return S;O=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},S=s}());const L={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},U=(e,t)=>j(e,t,L),_=(e,t)=>Object.assign(Object.assign({},e),t),N=(e,t)=>{var n;return U(null!==(n=e)&&void 0!==n?n:{},t)},$={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},M=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||w("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||w("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||w("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||w("pageContext.deviceType is required."),n||w("pageOptions is required."),r||w("placements is required."),(null==i?void 0:i.defaultThreshold)||w("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&w(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},D={placements:(e,t)=>t,takeover:N,refreshConfig:_,editory:N,appearanceConfig:N,pageContext:_,pageOptions:_,pageSectionsSelectors:_,tcf:_};class F{set(e){M(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(D)){const r=t[e];void 0!==r&&(n[e]=D[e](n[e],r))}})(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=U(F.DEFAULT_SITE_HANDLERS,e)}}F.DEFAULT_SITE_HANDLERS={siteEvents:$,initNativeAd:()=>{}};const B=new F;B.modifyConfigProperties.bind(B);const x=864e5,q=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return b("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=x)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=x)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return b("Error with parsing localStorage data"),null}}}})(),R=e=>e.startsWith("glci_"),K=()=>{var e;return((e=[])=>e.filter(R))(null!==(e=(()=>{const e=q.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},V=/^glci_/,H="gender_",z="geo_",J="male",W="female",X=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===J||o===W?`${H}${o}`:void 0}catch(e){return}var e}),G=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield X(),n=(()=>{const e=K().map(e=>`${z}${e.replace(V,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),Q="front";class Y{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Q?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Z{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class te{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ne{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Q?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class re{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class ie{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Y,"no-aftenposten":new Z,[a]:new ee,"no-bergenstidende":new ee,[o]:new te,"no-stavangeraftenblad":new te,[r]:new ne,[s]:new re}[n]||new c;((e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const o=r===y?new h(e,i,t):new m(e,i,t,n);o.trackImpression(),i.addEventListener("click",()=>o.trackEngagement())})})(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield G();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(b(`Kilkaya event for slot: ${n}`),!n)return void b("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(b(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):b("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="flex";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return b(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return b(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=I(e,0,n);return(yield i())?(b(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(b(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}const oe=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":r},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},ae=e=>n(void 0,void 0,void 0,function*(){const t=new ie;yield t.run(e)});export{oe as Kilkaya,ae as runKilkaya};
|
package/klart/cjs/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ interface AstAdObj {
|
|
|
96
96
|
subtype?: string;
|
|
97
97
|
renderer_url?: string;
|
|
98
98
|
bidderId?: number | undefined;
|
|
99
|
+
uuid: string;
|
|
99
100
|
}
|
|
100
101
|
interface AstAdError {
|
|
101
102
|
code: number;
|
|
@@ -298,6 +299,13 @@ declare const DeviceTypes: {
|
|
|
298
299
|
};
|
|
299
300
|
type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
|
|
300
301
|
|
|
302
|
+
interface AdvertisingIdentifiers {
|
|
303
|
+
xandr?: {
|
|
304
|
+
ppId1?: string;
|
|
305
|
+
ppId2?: string;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
301
309
|
/**
|
|
302
310
|
* SDK-agnostic shape of the pulse tracker instance advertory actually calls.
|
|
303
311
|
* getActor is typed Promise<unknown> — nothing in this codebase reads its
|
|
@@ -313,12 +321,6 @@ interface PulseInstance {
|
|
|
313
321
|
};
|
|
314
322
|
}
|
|
315
323
|
|
|
316
|
-
interface AdvertisingIdentifiers {
|
|
317
|
-
xandr?: {
|
|
318
|
-
ppId1?: string;
|
|
319
|
-
ppId2?: string;
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
324
|
interface PulseLegacyExtras {
|
|
323
325
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
324
326
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
@@ -326,11 +328,15 @@ interface PulseLegacyExtras {
|
|
|
326
328
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
327
329
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
328
330
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
331
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
332
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
333
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
329
334
|
}
|
|
330
335
|
interface PulseConfig {
|
|
331
336
|
clientId: string;
|
|
332
337
|
instance: PulseInstance & PulseLegacyExtras;
|
|
333
338
|
hasherUrl?: string;
|
|
339
|
+
adTrackingEnabled?: boolean;
|
|
334
340
|
}
|
|
335
341
|
|
|
336
342
|
declare const Newsrooms: {
|
|
@@ -395,6 +401,7 @@ interface Options {
|
|
|
395
401
|
language?: Country;
|
|
396
402
|
pageType?: PageType;
|
|
397
403
|
deviceType?: DeviceType;
|
|
404
|
+
placements?: Placements;
|
|
398
405
|
appearanceConfig?: AppearanceConfig;
|
|
399
406
|
nativeTrackingConfig?: NativeTrackingConfig;
|
|
400
407
|
adPlacementFormat?: string;
|
|
@@ -403,6 +410,7 @@ interface Options {
|
|
|
403
410
|
clickLinkSelector?: string;
|
|
404
411
|
containerId?: string;
|
|
405
412
|
sponsorstripeConfig?: SponsorstripeConfig;
|
|
413
|
+
pulse?: PulseConfig;
|
|
406
414
|
}
|
|
407
415
|
interface AdNativeTemplates {
|
|
408
416
|
[templatesName: string]: (nativeData: AdNativeData, options: Options) => string | null;
|