@schibsted/advertory 3.6.3 → 3.6.4-no-issue.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 +19 -0
- package/ad-native/es/index.d.ts +19 -0
- package/aftenposten/cjs/index.d.ts +19 -0
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-e5bjjybw.js +1 -0
- package/aftenposten/es/{events-haT12jV0.js → events-90h4J0Pi.js} +1 -1
- package/aftenposten/es/{index-BT4eLpTb.js → index-BZDFHEyy.js} +1 -1
- package/aftenposten/es/{index-CPS4SSYI.js → index-CwCkFmT3.js} +1 -1
- package/aftenposten/es/{index-BrzVJyuA.js → index-D0SMqCpS.js} +1 -1
- package/aftenposten/es/{index-nWSVg5Cf.js → index-GvJ5O8Ol.js} +1 -1
- package/aftenposten/es/{index-x71s6dEX.js → index-PNWqx3ql.js} +1 -1
- package/aftenposten/es/{index-BGnz1hut.js → index-SPBgETLm.js} +1 -1
- package/aftenposten/es/{index-DWggkSOl.js → index-k9VKIwq-.js} +1 -1
- package/aftenposten/es/{index-BpEJqDNV.js → index-x3C8LqoH.js} +1 -1
- package/aftenposten/es/index.d.ts +19 -0
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-Cj6N5qbD.js → styles-BODrkqLL.js} +1 -1
- package/aftenposten/es/{styles-BucpjNdO.js → styles-Bz8JDFmN.js} +1 -1
- package/aftenposten/es/{styles-D3TGKOzY.js → styles-C0fEGkU3.js} +1 -1
- package/aftenposten/es/{styles-DuLs_A1L.js → styles-CGsVX09f.js} +1 -1
- package/aftenposten/es/{styles-CzFHbYk3.js → styles-CJ9OBVfJ.js} +1 -1
- package/aftenposten/es/{styles-BqMKpI75.js → styles-D6C4kXph.js} +1 -1
- package/aftenposten/es/{styles-oqM_EtJb.js → styles-DHz7ybgQ.js} +1 -1
- package/aftenposten/es/{styles-RMqcW7B0.js → styles-IM25mjsd.js} +1 -1
- package/aftenposten/es/{styles-Br-R7yGx.js → styles-mqLUt40K.js} +1 -1
- package/aftenposten/es/{styles-CScKDxpF.js → styles-otSfsajI.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BAMydMZR.js +1 -0
- package/aftenpostenv2/es/{events-s7VdgLNv.js → events-BiZ53WbG.js} +1 -1
- package/aftenpostenv2/es/{index-D17QYdj0.js → index-1scrmbN8.js} +1 -1
- package/aftenpostenv2/es/{index-3rUFz7Lp.js → index-CHwNPbLT.js} +1 -1
- package/aftenpostenv2/es/{index-Uzgdq4c2.js → index-Cv4YIbxm.js} +1 -1
- package/aftenpostenv2/es/{index-Goj0JedS.js → index-CvVs7cA5.js} +1 -1
- package/aftenpostenv2/es/{index-8_hW3_IN.js → index-DOo535KJ.js} +1 -1
- package/{aftonbladetv2/es/index-iLAwXj1l.js → aftenpostenv2/es/index-LkRkfkb-.js} +1 -1
- package/aftenpostenv2/es/{index-CdSw1Nxg.js → index-oqTbMoBZ.js} +1 -1
- package/aftenpostenv2/es/{index-BJInADg7.js → index-siSPAYL7.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +19 -0
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-NZTDYx2O.js → styles--5PORqq4.js} +1 -1
- package/aftenpostenv2/es/{styles-DZ2F4XIP.js → styles-BVPRm4PB.js} +1 -1
- package/aftenpostenv2/es/{styles-Bw4qK6w4.js → styles-Brav2qkV.js} +1 -1
- package/aftenpostenv2/es/{styles-CNsePl3z.js → styles-Cg5tKEAO.js} +1 -1
- package/aftenpostenv2/es/{styles-DVRTCgVv.js → styles-Cgr1J3T3.js} +1 -1
- package/aftenpostenv2/es/{styles-CrB6-yjS.js → styles-DSJgHwN1.js} +1 -1
- package/aftenpostenv2/es/{styles-BqMv6ry1.js → styles-DaS9lthq.js} +1 -1
- package/aftenpostenv2/es/{styles-C1z3HXi6.js → styles-PWB8bkpb.js} +1 -1
- package/aftenpostenv2/es/{styles-D-er0QS7.js → styles-XJ-eFfEw.js} +1 -1
- package/aftenpostenv2/es/{styles-DtvaOi2g.js → styles-oXQISx1b.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +19 -0
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-CKiQ7hDs.js +1 -0
- package/aftonbladet/es/{events-CLKqJb2E.js → events-A8eRarM0.js} +1 -1
- package/aftonbladet/es/{index-BwCJxQpR.js → index-3y_krWtI.js} +1 -1
- package/aftonbladet/es/{index-C_cOjbDr.js → index-BAcl84hu.js} +1 -1
- package/aftonbladet/es/{index-BWoJhj4s.js → index-BiYceV13.js} +1 -1
- package/aftonbladet/es/{index-Clr30xNW.js → index-D9AivUBC.js} +1 -1
- package/aftonbladet/es/{index-BNL7mrv1.js → index-DIMuWioR.js} +1 -1
- package/aftonbladet/es/{index-CtdJf15w.js → index-DKVhyZ7t.js} +1 -1
- package/aftonbladet/es/{index-DCUmpQyn.js → index-DzMEQmPc.js} +1 -1
- package/aftonbladet/es/{index-CJK8CfSp.js → index-YErwUvPi.js} +1 -1
- package/aftonbladet/es/index.d.ts +19 -0
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-CwgaOYac.js → styles-B3CXjx3R.js} +1 -1
- package/aftonbladet/es/{styles-Cs1OkWaf.js → styles-BfmQQWQf.js} +1 -1
- package/aftonbladet/es/{styles-DhZwF0s-.js → styles-CqbU0dC-.js} +1 -1
- package/aftonbladet/es/{styles-CS_Vurkb.js → styles-CuKe16UU.js} +1 -1
- package/aftonbladet/es/{styles--yMryMiy.js → styles-DAOwzujX.js} +1 -1
- package/aftonbladet/es/{styles-D6Tu7eAE.js → styles-whRiQawN.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Dh7qL1X3.js +1 -0
- package/aftonbladetv2/es/{events-DFuTOjZ_.js → events-RlWiPgEd.js} +1 -1
- package/aftonbladetv2/es/{index-C2pp9QiN.js → index-3uQCIdwA.js} +1 -1
- package/aftonbladetv2/es/{index-Bf5jwNcU.js → index-BpHuZZzP.js} +1 -1
- package/aftonbladetv2/es/{index-CLdW_IVF.js → index-CHe2mY5U.js} +1 -1
- package/aftonbladetv2/es/{index-CtqFwTHm.js → index-Cr9mktXq.js} +1 -1
- package/aftonbladetv2/es/{index-CTSDP2-L.js → index-CtEsmloB.js} +1 -1
- package/aftonbladetv2/es/{index-CVPldjPM.js → index-CwMJAqqO.js} +1 -1
- package/aftonbladetv2/es/{index-B_l4VAq2.js → index-CzMGSy6Q.js} +1 -1
- package/{aftenpostenv2/es/index-B_1jFa7b.js → aftonbladetv2/es/index-DG71uAwM.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +19 -0
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-CsuCmRvp.js → styles-BEhQkXU1.js} +1 -1
- package/aftonbladetv2/es/{styles-uoFhBqMN.js → styles-Bfc9l8WO.js} +1 -1
- package/aftonbladetv2/es/{styles-CEIaMnq9.js → styles-BoJUgU8p.js} +1 -1
- package/aftonbladetv2/es/{styles-D144DfCK.js → styles-BrFu_W5K.js} +1 -1
- package/aftonbladetv2/es/{styles-JH6e0qvY.js → styles-DPqx2adI.js} +1 -1
- package/aftonbladetv2/es/{styles-C1rTAsv2.js → styles-DkOgwygd.js} +1 -1
- package/bt/cjs/index.d.ts +19 -0
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-CQT-xDPU.js +1 -0
- package/bt/es/{events-CntQlWei.js → events-B8E0Wmof.js} +1 -1
- package/bt/es/{index-DKJYRhSX.js → index-03aD4eo1.js} +1 -1
- package/{sa/es/index-Bv8YIdiI.js → bt/es/index-1fdav_Jg.js} +1 -1
- package/bt/es/{index-DTBzlPVZ.js → index-Bj0f0v87.js} +1 -1
- package/bt/es/{index-a8_oyeFW.js → index-COAyNr45.js} +1 -1
- package/bt/es/{index-CASwTSAt.js → index-D9-4nJzo.js} +1 -1
- package/bt/es/{index-BM8NK0TY.js → index-dZUFgkcj.js} +1 -1
- package/{sa/es/index-BxH2OLQQ.js → bt/es/index-ikSnI3qk.js} +1 -1
- package/bt/es/{index-e5ii2ijF.js → index-xFX_gjti.js} +1 -1
- package/bt/es/index.d.ts +19 -0
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-BX7CrSEq.js → styles--vBDQgko.js} +1 -1
- package/{sa/es/styles-DmcgMEkb.js → bt/es/styles-BWe06TQl.js} +1 -1
- package/bt/es/{styles-DxhZtCm6.js → styles-BZkEY9ow.js} +1 -1
- package/bt/es/{styles-KfDzomu5.js → styles-CEsYJDqo.js} +1 -1
- package/bt/es/{styles-CdCvbMpW.js → styles-CGYAqI9_.js} +1 -1
- package/bt/es/{styles-pbgWOGz4.js → styles-CH2-1sgP.js} +1 -1
- package/bt/es/{styles-HPrO7Wox.js → styles-CHBDQHwu.js} +1 -1
- package/{sa/es/styles-Cw7-eUJi.js → bt/es/styles-CyR4WSpG.js} +1 -1
- package/bt/es/{styles-B3BDhrhc.js → styles-wforPVjv.js} +1 -1
- package/btv2/es/_auto-entry_btv2-893Uo7bG.js +1 -0
- package/btv2/es/{events-BqcTQUa4.js → events-B4DlNAQt.js} +1 -1
- package/btv2/es/{index-CTfq-Mv4.js → index-BUFZZQM2.js} +1 -1
- package/btv2/es/{index-BD7P1jRk.js → index-BYzgCdkQ.js} +1 -1
- package/btv2/es/{index-Bz3czyHA.js → index-BbUYZ_o3.js} +1 -1
- package/btv2/es/{index-CZRyJK4H.js → index-CloqSUQD.js} +1 -1
- package/btv2/es/{index-Cx6nIgru.js → index-DNSUtbs9.js} +1 -1
- package/btv2/es/{index-PDbnbcqi.js → index-DPaE0hzc.js} +1 -1
- package/btv2/es/{index-BI4CD_rZ.js → index-DxXBBDVp.js} +1 -1
- package/btv2/es/{index-WULudPCW.js → index-feLxUxLr.js} +1 -1
- package/btv2/es/index.d.ts +19 -0
- package/btv2/es/index.js +1 -1
- package/btv2/es/{styles-C2O_7r8O.js → styles-BHDI2Q0m.js} +1 -1
- package/{vgv2/es/styles-D91JPhH8.js → btv2/es/styles-BPOLl8SC.js} +1 -1
- package/{sav2/es/styles-qGCOeBLI.js → btv2/es/styles-BehUrvhi.js} +1 -1
- package/{sav2/es/styles-G7x2BU1w.js → btv2/es/styles-Cw9KJB6P.js} +1 -1
- package/{sav2/es/styles-Cj5_D55_.js → btv2/es/styles-DJT27wtw.js} +1 -1
- package/btv2/es/{styles-DzDQbRo2.js → styles-DvBM5Avv.js} +1 -1
- package/btv2/es/{styles-W0QYSaKb.js → styles-Dz4b2AdK.js} +1 -1
- package/{vgv2/es/styles-DGDhK5xz.js → btv2/es/styles-SsDyWsc5.js} +1 -1
- package/btv2/styles.css +1 -1
- package/dr-edition/cjs/index.d.ts +23 -6
- package/dr-edition/cjs/index.js +1 -1
- package/dr-edition/es/index.d.ts +23 -6
- package/dr-edition/es/index.js +1 -1
- package/e24/es/_auto-entry_e24-BzGAVnFM.js +1 -0
- package/e24/es/{events-BSFvJjwN.js → events-2LemXGhL.js} +1 -1
- package/e24/es/{index-bXDvkHFi.js → index-BKQ1a6Ig.js} +1 -1
- package/e24/es/{index-C70oFoBO.js → index-BPsxnGG7.js} +1 -1
- package/e24/es/{index-1ulbwcTL.js → index-BqUeo7N0.js} +1 -1
- package/e24/es/{index-BT6cARcm.js → index-CLAfHIml.js} +1 -1
- package/{tv4/es/index-Fatj99-w.js → e24/es/index-CZtyf0jS.js} +1 -1
- package/e24/es/{index-CJtN5Ux6.js → index-D6VTaTl3.js} +1 -1
- package/e24/es/{index-B29Rxeb-.js → index-DF244RRi.js} +1 -1
- package/e24/es/{index-DWAIkjeC.js → index-RTqU_3hB.js} +1 -1
- package/e24/es/index.d.ts +19 -0
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-C9WN5jzW.js → styles-3sc6XdB-.js} +1 -1
- package/e24/es/{styles-V2f2BkN2.js → styles-BAl_3vMl.js} +1 -1
- package/e24/es/{styles-B-Yl4PSb.js → styles-BMJ8T7fL.js} +1 -1
- package/e24/es/{styles-KMaaBqGH.js → styles-Bia3hiG7.js} +1 -1
- package/e24/es/{styles-DAv2hFi1.js → styles-DK4hTklO.js} +1 -1
- package/e24/es/{styles-BI5cdAF9.js → styles-DUOog_gc.js} +1 -1
- package/{tv4/es/styles-DLQ4ufVm.js → e24/es/styles-DWNWEqx9.js} +1 -1
- package/e24/es/{styles-DgpdEMJP.js → styles-DpEIDLEr.js} +1 -1
- package/e24/es/{styles-BptTqtHd.js → styles-NDCl-Fnx.js} +1 -1
- package/e24/es/{styles-CO8jY1tT.js → styles-nqTatAnn.js} +1 -1
- package/e24/es/{styles-CPbjzkNO.js → styles-oDmE25-G.js} +1 -1
- package/editory/cjs/index.d.ts +19 -0
- package/editory/es/index.d.ts +19 -0
- package/fotbollskanalen/cjs/index.d.ts +19 -0
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-ClJ6Fvy9.js +1 -0
- package/fotbollskanalen/es/{events-BV44NdjZ.js → events-BdjHDrCO.js} +1 -1
- package/fotbollskanalen/es/{index-B6Dp_RWi.js → index-B8_DAJrE.js} +1 -1
- package/fotbollskanalen/es/{index-Ct_w83Z9.js → index-BYOnKTkC.js} +1 -1
- package/fotbollskanalen/es/{index-mO3UoNb_.js → index-C-He7fit.js} +1 -1
- package/fotbollskanalen/es/{index-8B3YymA4.js → index-Cq2dTD5N.js} +1 -1
- package/fotbollskanalen/es/{index-BUm9LBHF.js → index-DMn-yP1t.js} +1 -1
- package/fotbollskanalen/es/{index-B6UzXJcf.js → index-QUwIJqca.js} +1 -1
- package/fotbollskanalen/es/{index-BBJBFDvR.js → index-VIQLjIBw.js} +1 -1
- package/fotbollskanalen/es/{index-hD5knSUm.js → index-nJoT51KX.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +19 -0
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-BVmiEtrH.js → styles-BuH9xVv6.js} +1 -1
- package/godt/cjs/index.d.ts +19 -0
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +19 -0
- package/kilkaya/cjs/index.js +1 -1
- package/kilkaya/es/index.d.ts +19 -0
- package/kilkaya/es/index.js +1 -1
- package/klart/cjs/index.d.ts +19 -0
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +19 -0
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-CfcCrr2a.js +1 -0
- package/koket/es/{events-CsLRt335.js → events-0DxWWCZ9.js} +1 -1
- package/koket/es/{index-EnX6Dw2m.js → index--wuLVJT1.js} +1 -1
- package/{svdv2/es/index-DVlTp_mb.js → koket/es/index-B9jCMa-F.js} +1 -1
- package/koket/es/{index-PnaxRenK.js → index-Be_MdB7n.js} +1 -1
- package/koket/es/{index-yGTXZBeu.js → index-C6aVVVJ6.js} +1 -1
- package/koket/es/{index-DizaBLHf.js → index-D8fZlGJ6.js} +1 -1
- package/koket/es/{index-DQ4PnViN.js → index-DOGN0SX7.js} +1 -1
- package/koket/es/{index-aP8AlmV8.js → index-DfDCldGO.js} +1 -1
- package/koket/es/{index-BnuFFRsK.js → index-cYdPNTwi.js} +1 -1
- package/koket/es/index.d.ts +19 -0
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-Ca_3jns4.js → koket/es/styles-DswGt2mE.js} +1 -1
- package/minmote/cjs/index.d.ts +19 -0
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.d.ts +19 -0
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +19 -0
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-DuMP7yP_.js +1 -0
- package/sa/es/{events-B3Sq62p-.js → events-C8S7jrt3.js} +1 -1
- package/sa/es/{index-C5XXWcjo.js → index-1IvtyUJ6.js} +1 -1
- package/sa/es/{index-pDirEekr.js → index-BAJc_zk_.js} +1 -1
- package/sa/es/{index-GpnCDcu_.js → index-B_iUHp18.js} +1 -1
- package/sa/es/{index-CeK8bFtn.js → index-Br6T-pda.js} +1 -1
- package/sa/es/{index-1xD_QLoe.js → index-CYNpcUX3.js} +1 -1
- package/{bt/es/index-vocMRjVL.js → sa/es/index-Cyq1Jqmv.js} +1 -1
- package/sa/es/{index-BQw2DvRg.js → index-DtJJzHK5.js} +1 -1
- package/{bt/es/index-Cdueup6_.js → sa/es/index-uThQzJEi.js} +1 -1
- package/sa/es/index.d.ts +19 -0
- package/sa/es/index.js +1 -1
- package/sa/es/{styles-snupSeEl.js → styles-B1GOzs0B.js} +1 -1
- package/sa/es/{styles-DZv7jF3C.js → styles-B8JtTDvr.js} +1 -1
- package/{vg/es/styles-LFpfn9Ch.js → sa/es/styles-BQcj5ZW0.js} +1 -1
- package/sa/es/{styles-CWDgYDxA.js → styles-BqbfWI42.js} +1 -1
- package/{bt/es/styles-fw4hTc8j.js → sa/es/styles-CI1Ug3AG.js} +1 -1
- package/sa/es/{styles-Birhnb8o.js → styles-KihGIsxt.js} +1 -1
- package/{vg/es/styles-C_yN9wqf.js → sa/es/styles-Ysny45W0.js} +1 -1
- package/sa/es/{styles-Dal_YYJu.js → styles-_0voXDgk.js} +1 -1
- package/sa/es/{styles-DNqQvbLS.js → styles-jucyBwh4.js} +1 -1
- package/sav2/es/_auto-entry_sav2-Chan3yFg.js +1 -0
- package/sav2/es/{events-A3NOCBS-.js → events-BTwxLrmE.js} +1 -1
- package/sav2/es/{index-CVF4z_xe.js → index-B53BR4b8.js} +1 -1
- package/sav2/es/{index-BxLmyP7T.js → index-B8QN1-Xi.js} +1 -1
- package/sav2/es/{index-CTaLEvny.js → index-COWfP5cs.js} +1 -1
- package/sav2/es/{index-IgzUudKN.js → index-CTEloN61.js} +1 -1
- package/sav2/es/{index-xN1tAGZz.js → index-Dmor7Z1b.js} +1 -1
- package/sav2/es/{index-D58R4dxf.js → index-HS2u3Zpj.js} +1 -1
- package/sav2/es/{index-DASLf6Jd.js → index-ZGLdhTow.js} +1 -1
- package/sav2/es/{index-Dnaf_fh2.js → index-rjgG7Xwk.js} +1 -1
- package/sav2/es/index.d.ts +19 -0
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-Cr3Nu_76.js → sav2/es/styles-2Nnzs_wx.js} +1 -1
- package/{btv2/es/styles-DMuRA-dP.js → sav2/es/styles-BMrhfdTD.js} +1 -1
- package/{vgv2/es/styles-CgjQZfFK.js → sav2/es/styles-Bu82ldvz.js} +1 -1
- package/sav2/es/{styles-BPTUng9k.js → styles-DFoiKFxe.js} +1 -1
- package/sav2/es/{styles-D4Dif9uO.js → styles-DRLhz-Pu.js} +1 -1
- package/sav2/es/{styles-BGXxvwMx.js → styles-DjMguaWj.js} +1 -1
- package/{vgv2/es/styles-bj0m2kFL.js → sav2/es/styles-DnoLY9DG.js} +1 -1
- package/sav2/es/{styles-DJYuRE3k.js → styles-zb8508Q3.js} +1 -1
- package/sav2/styles.css +1 -1
- package/svd/cjs/index.d.ts +19 -0
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-5Orlt_aZ.js +1 -0
- package/svd/es/{events-CjxQafKH.js → events-xpACbhEk.js} +1 -1
- package/svd/es/{index-3DIBU7vS.js → index-AaU4iJb_.js} +1 -1
- package/svd/es/{index-BPvEq9eH.js → index-BTkJXRDz.js} +1 -1
- package/svd/es/{index-Gs0EzAO2.js → index-Bpqx7sL4.js} +1 -1
- package/svd/es/{index-DwzzmWa_.js → index-C8IPcd68.js} +1 -1
- package/{e24/es/index-DbHQu6nU.js → svd/es/index-Cge_jEH4.js} +1 -1
- package/svd/es/{index-DkRBKwG1.js → index-DP_0yLU0.js} +1 -1
- package/svd/es/{index-DI7meypd.js → index-ZRqg1RwZ.js} +1 -1
- package/svd/es/{index-CZUEn0B7.js → index-pRPyyoJx.js} +1 -1
- package/svd/es/index.d.ts +19 -0
- package/svd/es/index.js +1 -1
- package/svd/es/{styles--BX9ufXt.js → styles-COuw80gn.js} +1 -1
- package/svd/es/{styles-7ay2Xmty.js → styles-DDwL7EXa.js} +1 -1
- package/svd/es/{styles-aAogvefr.js → styles-DXJ54Dlu.js} +1 -1
- package/svd/es/{styles-DD02yC3R.js → styles-DjXQ1aIf.js} +1 -1
- package/svd/es/{styles-Kzut_1ce.js → styles-fEOdy4x5.js} +1 -1
- package/svd/es/{styles-BLtZ5-Dm.js → styles-wVQjAwi4.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-D92Sr8sv.js +1 -0
- package/svdv2/es/{events-Bse4eB7m.js → events-rHRR45Oc.js} +1 -1
- package/svdv2/es/{index-CUzwkVVm.js → index-9m7OluMX.js} +1 -1
- package/svdv2/es/{index-C5_5PU7E.js → index-B5_Heysk.js} +1 -1
- package/svdv2/es/{index-BRjr6uF2.js → index-C3EyOOQ1.js} +1 -1
- package/svdv2/es/{index-mp7agzxm.js → index-D6jFeixA.js} +1 -1
- package/svdv2/es/{index-DEGM-zjX.js → index-DUEKQirr.js} +1 -1
- package/svdv2/es/{index-0nZXKkQw.js → index-_VqtpxkU.js} +1 -1
- package/{koket/es/index-Cfn4Hu84.js → svdv2/es/index-nzRrRDNv.js} +1 -1
- package/svdv2/es/{index-CPn0wgKO.js → index-sFmWFac1.js} +1 -1
- package/svdv2/es/index.d.ts +19 -0
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles-ZpmRQnBt.js → svdv2/es/styles-9ghYoFbS.js} +1 -1
- package/svdv2/es/{styles-BbFy-SfM.js → styles-CdvbETBq.js} +1 -1
- package/svdv2/es/{styles-BICncnr4.js → styles-Cffbyyic.js} +1 -1
- package/svdv2/es/{styles-BJLMoBW9.js → styles-DIBKsLFk.js} +1 -1
- package/svdv2/es/{styles-CewKqqGU.js → styles-Dl5qiGBy.js} +1 -1
- package/svdv2/es/{styles-sohpIAt7.js → styles-p4pWN8kV.js} +1 -1
- package/svdv2/styles.css +1 -1
- package/tek/cjs/index.d.ts +19 -0
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +19 -0
- package/tracker/es/index.d.ts +19 -0
- package/tv4/cjs/index.d.ts +19 -0
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-DTu42CVS.js +1 -0
- package/tv4/es/{events-D44Z1oV8.js → events-CbC7QEai.js} +1 -1
- package/tv4/es/{index-Cmjbdy2d.js → index-BUhmWRPT.js} +1 -1
- package/{svd/es/index-DR3WUD1R.js → tv4/es/index-BUuBvzxQ.js} +1 -1
- package/tv4/es/{index-BUTxO4i3.js → index-BclrqEGM.js} +1 -1
- package/tv4/es/{index-CGF3XUPd.js → index-CmQWra83.js} +1 -1
- package/tv4/es/{index-DS_KKeAJ.js → index-D5qF2adM.js} +1 -1
- package/tv4/es/{index-D6vK6POa.js → index-DZpubrgE.js} +1 -1
- package/tv4/es/{index-CbHFbRqq.js → index-Ks5JLKPT.js} +1 -1
- package/tv4/es/{index-SAOJ8J7n.js → index-pYKKu0ld.js} +1 -1
- package/tv4/es/index.d.ts +19 -0
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-B2yi61gc.js → tv4/es/styles-D7WvCXz-.js} +1 -1
- package/tvnu/cjs/index.d.ts +19 -0
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +19 -0
- package/vg/cjs/index.d.ts +19 -0
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-CI7KeJ7F.js +1 -0
- package/vg/es/{events-YceP9eVD.js → events-DNAl1ePr.js} +1 -1
- package/vg/es/{index-C3lzuVOQ.js → index-BGun5xCj.js} +1 -1
- package/vg/es/{index-C2mjCCxU.js → index-BYE_L3YR.js} +1 -1
- package/vg/es/{index-iGnm-GFf.js → index-C3V_e1XF.js} +1 -1
- package/vg/es/{index-CNHzV7pF.js → index-C7fN75K3.js} +1 -1
- package/vg/es/{index-CNnYcwVT.js → index-D1uLhilC.js} +1 -1
- package/vg/es/{index-BZjLVwnP.js → index-DDL8Af2X.js} +1 -1
- package/vg/es/{index-DlSCxHFh.js → index-DwGxBmeP.js} +1 -1
- package/vg/es/{index-BMheDtX-.js → index-XeZ7SwBk.js} +1 -1
- package/vg/es/index.d.ts +19 -0
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-Blf6iW14.js → styles-3bVT0t_a.js} +1 -1
- package/vg/es/{styles-DFPdr5YA.js → styles-4yCwF2nv.js} +1 -1
- package/vg/es/{styles-DKoGv68d.js → styles-BIALa-xy.js} +1 -1
- package/{bt/es/styles-DNGPxS19.js → vg/es/styles-BSfpgVXJ.js} +1 -1
- package/vg/es/{styles-BHatuZlY.js → styles-Bv3vF0-b.js} +1 -1
- package/vg/es/{styles-CRkG579q.js → styles-BvhA39C7.js} +1 -1
- package/vg/es/{styles-8bSItB04.js → styles-BwiR_kbC.js} +1 -1
- package/vg/es/{styles-Brk_qQJP.js → styles-CIHwlSYD.js} +1 -1
- package/vg/es/{styles-CTBYZbbk.js → styles-CQmno1pW.js} +1 -1
- package/vg/es/{styles-DnFH09q6.js → styles-CRr6kpBX.js} +1 -1
- package/vg/es/{styles-uHd-AzSK.js → styles-CiILkZUo.js} +1 -1
- package/vg/es/{styles-BjtBJLEB.js → styles-D4oRsLM6.js} +1 -1
- package/vg/es/{styles-BQL7T_uP.js → styles-XmDfZpcm.js} +1 -1
- package/vg/es/{styles-sal3X3wr.js → styles-lJcNQKcP.js} +1 -1
- package/{sa/es/styles-3bUs0Dpj.js → vg/es/styles-tD8TNMsW.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-CVxHXRQ3.js +1 -0
- package/vgv2/es/{events-Dyxg-o4v.js → events-4c0QZ5ru.js} +1 -1
- package/vgv2/es/{index-QKO4atOd.js → index-6WUbxF8q.js} +1 -1
- package/vgv2/es/{index-uw5c8VIs.js → index-BHZONEW_.js} +1 -1
- package/vgv2/es/{index-DvoCajej.js → index-CiK1eAL3.js} +1 -1
- package/vgv2/es/{index-DVuISuNG.js → index-DKdpwEOg.js} +1 -1
- package/vgv2/es/{index-CIOh_1lF.js → index-DgzoxTqw.js} +1 -1
- package/vgv2/es/{index-D-eww3JO.js → index-DmCJBm4m.js} +1 -1
- package/vgv2/es/{index-C0Vg0WZx.js → index-DsHPQZyc.js} +1 -1
- package/vgv2/es/{index-C1Jkwq14.js → index-_3XO0Gdc.js} +1 -1
- package/vgv2/es/index.d.ts +19 -0
- package/vgv2/es/index.js +1 -1
- package/{sav2/es/styles-BVrWMiPy.js → vgv2/es/styles-B4PZq-53.js} +1 -1
- package/vgv2/es/{styles-BchHTyoI.js → styles-B858Hsls.js} +1 -1
- package/vgv2/es/{styles-C8Cm9-qw.js → styles-BaPlw8lH.js} +1 -1
- package/{btv2/es/styles-BEcVlr9D.js → vgv2/es/styles-Bgv4Jaz7.js} +1 -1
- package/{btv2/es/styles-oShHqsDl.js → vgv2/es/styles-BoxNTzGZ.js} +1 -1
- package/vgv2/es/{styles-C7A3oXWr.js → styles-BuGStooT.js} +1 -1
- package/{btv2/es/styles-fkryBAgM.js → vgv2/es/styles-CDQN7OoS.js} +1 -1
- package/vgv2/es/{styles-Di_4TAsZ.js → styles-CSmqo9nP.js} +1 -1
- package/vgv2/es/{styles-Ys6h0VGQ.js → styles-DGwU3ILj.js} +1 -1
- package/vgv2/es/{styles-BBELe2uu.js → styles-Do2sahbB.js} +1 -1
- package/vgv2/es/{styles-DGvpQzHC.js → styles-E76tlcUr.js} +1 -1
- package/vgv2/es/{styles-DP9qqT2g.js → styles-Kzz5C2Ep.js} +1 -1
- package/vgv2/es/{styles-D_kP9bmL.js → styles-OYmkqDQW.js} +1 -1
- package/vgv2/es/{styles-B7L4LEJe.js → styles-sTq9rRqk.js} +1 -1
- package/vgv2/es/{styles-B-gB9ymS.js → styles-szVijAOX.js} +1 -1
- package/vgv2/styles.css +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-Ch51IoMz.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CznDqFqG.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-BcRp8xrg.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CbKXMldX.js +0 -1
- package/bt/es/_auto-entry_bt-BmxJAxvR.js +0 -1
- package/btv2/es/_auto-entry_btv2-XOf4vhnM.js +0 -1
- package/e24/es/_auto-entry_e24-Ch8hLaYP.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-5i3J4eqe.js +0 -1
- package/koket/es/_auto-entry_koket-0jH2u-dv.js +0 -1
- package/sa/es/_auto-entry_sa-DSkXqb-_.js +0 -1
- package/sav2/es/_auto-entry_sav2-0VRP1639.js +0 -1
- package/svd/es/_auto-entry_svd-BvktwJjX.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-DPomgYhb.js +0 -1
- package/tv4/es/_auto-entry_tv4-BEvo_eO2.js +0 -1
- package/vg/es/_auto-entry_vg-BsYxV8ys.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-C2dYApBv.js +0 -1
package/dr-edition/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=e=>t(void 0,void 0,void 0,function*(){if(e.type!==n){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),o={get:(e,...n)=>t(void 0,[e,...n],void 0,function*(e,n={}){var{timeout:o}=n,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(n,["timeout"]);if(o)return((e,n,o)=>t(void 0,void 0,void 0,function*(){const t=new AbortController,r=setTimeout(()=>t.abort(),o);try{const o=yield fetch(e,Object.assign(Object.assign({},n),{signal:t.signal}));return i(o)}finally{clearTimeout(r)}}))(e,r,o);const a=yield fetch(e,r);return i(a)}),post:(e,n,i)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:n,body:t});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},r=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},a=["netboard","board"];class s{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,i;const a=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==a?void 0:a.userId)?String(a.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{r("Starting fetching DrEdition ad from URL:",l);const e=yield o.get(l);return r("Fetch operation completed successfully."),e}catch(e){r("Error during fetch operation:",e)}return null})}}class d{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:i,mute:o,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const l=e=>new URLSearchParams(window.location.search).get(e),c=e=>{if("0"===l("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},u=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"))},v=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):r("Dr. Edition container does not have a parent element, cannot remove height lock.")};class p{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:a=!1}=n,s=e.querySelector(o);if(!s)return void r(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(r("No Dr. Edition ads available to render. Collapsing whole placement."),c(e.id),void v(s)):((null==d?void 0:d.itemId)&&a&&(r("Dr. Edition ad available to render as a Xandr backfill."),u(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),v(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):v(s))):(r("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void v(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";u(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const g=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 r("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(r("Resolving advertising permission value obtained"),i=!0,t(e))},a=setTimeout(()=>{r("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{r("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const t=Number(e);r("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),m="no",h="se",y="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,f=!1;const b=(e,n,i)=>{const o=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,s=l("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(r("TCF bypass param detected, returning consent: true"),!0):(r("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(f)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return r(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(r("Getting TCF consent manager..."),window._tcf_)return r("TCF consent manager is already available"),w=window._tcf_,void e(w);r("TCF consent manager is not available");const n=()=>{r("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(y,n),f=!0,t(new Error("Timeout waiting for CMP to load"))},a);r("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===m;if(t||n)return r("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield g(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!w)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{r("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);w.onTcfReady(()=>{r("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),w.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},E=(e,n,i,...o)=>t(void 0,[e,n,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return r(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=b(e,0,n);return(yield o())?(r(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(r(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),P="mobile";class C{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,i){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=b(i.tcf,i.isMobileApp,i.country),o=yield t(),r=i.device===P?n.mobileHTML:n.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,o,r;e.search=null!==(r=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class T{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:i}={}}=e;(t||i)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const n=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${n}"]`);if(n&&!window.autoplayQueue&&!i)try{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,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(n)}catch(e){r("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==o||o.appendChild(t),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){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()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,n,i,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(t=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class I extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const k="svd",A="vg",L="aftonbladet",O="e24",U="front",x=e=>t(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),M={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Q})})}})}};class D{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){yield t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{M[e](c)});const u={id:n,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield x(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===U?"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:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const _="https://www.aftonbladet.se/video-player-extras/latest/";class N{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${_}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${_}external-link.js`]:{name:"ExternalLink"}}};yield x(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}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""}}const V=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class B{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:n,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},V(e)?e:{}),{provider:Object.assign(Object.assign({},V(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${n}`]},requestSettings:{}}}},d=yield x(s);d.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}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===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class R{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const $=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[A]:new d,[O]:new D,[L]:new N,[k]:new B}[i]||new R,l=new(r===h?I:S)(n,a,o),c=new s(t,n),u=new C(a,l),v=new T(a);return new p(c,u,v,l)},q=()=>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)})});class F{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 r("[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)}}const H=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=$(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},z=[],W=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:i,tcf:o,drEdition:s,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield E(o,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:s}=e,d=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=a.some(e=>c.startsWith(e)),p=z.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(z.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,n);if(!p)return;if(!(null==i?void 0:i.instance))return void r("Pulse has not been passed as a prop, aborting");const g=yield q(),m=new F(g),h=$({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(n.targetId);if(!y||!s)return;y.classList.value="";const w=document.createElement("div");w.className=s.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(t=null==p?void 0:p.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:s,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)});const J=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var Q=Object.freeze({__proto__:null,default:J});exports.DrEdition=({editionName:t,fallbackTargetId:n,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=a(o,"data-pulse"),d=a(r,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:i})]}))},exports.getDrEditionManager=$,exports.handleDrEdition=e=>t(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield E(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield q(),i=new F(n);H({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),exports.handleDrEditionBackfill=W,exports.handleDrEditionBackfillOnAdblock=(e,n)=>{var i,o,a;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void r("Ad block not enabled, Dr. Edition backfills will not be rendered");r("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(a=null==l?void 0:l.map(([e])=>e))&&void 0!==a?a:[],u=new IntersectionObserver((n,i)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;i.unobserve(n),yield W(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=e=>t(void 0,void 0,void 0,function*(){if(e.type!==n){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),o={get:(e,...n)=>t(void 0,[e,...n],void 0,function*(e,n={}){var{timeout:o}=n,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(n,["timeout"]);if(o)return((e,n,o)=>t(void 0,void 0,void 0,function*(){const t=new AbortController,r=setTimeout(()=>t.abort(),o);try{const o=yield fetch(e,Object.assign(Object.assign({},n),{signal:t.signal}));return i(o)}finally{clearTimeout(r)}}))(e,r,o);const a=yield fetch(e,r);return i(a)}),post:(e,n,i)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:n,body:t});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},r=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},a=["netboard","board"];class s{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,i;const a=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==a?void 0:a.userId)?String(a.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{r("Starting fetching DrEdition ad from URL:",l);const e=yield o.get(l);return r("Fetch operation completed successfully."),e}catch(e){r("Error during fetch operation:",e)}return null})}}class d{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:i,mute:o,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const l=e=>new URLSearchParams(window.location.search).get(e),c=e=>{if("0"===l("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},u=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"))},v=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):r("Dr. Edition container does not have a parent element, cannot remove height lock.")};class p{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:a=!1}=n,s=e.querySelector(o);if(!s)return void r(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(r("No Dr. Edition ads available to render. Collapsing whole placement."),c(e.id),void v(s)):((null==d?void 0:d.itemId)&&a&&(r("Dr. Edition ad available to render as a Xandr backfill."),u(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),v(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):v(s))):(r("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void v(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";u(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const g=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 r("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(r("Resolving advertising permission value obtained"),i=!0,t(e))},a=setTimeout(()=>{r("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{r("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const t=Number(e);r("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),m="no",h="se",y="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,f=!1;const b=(e,n,i)=>{const o=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,s=l("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(r("TCF bypass param detected, returning consent: true"),!0):(r("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(f)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return r(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(r("Getting TCF consent manager..."),window._tcf_)return r("TCF consent manager is already available"),w=window._tcf_,void e(w);r("TCF consent manager is not available");const n=()=>{r("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(y,n),f=!0,t(new Error("Timeout waiting for CMP to load"))},a);r("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===m;if(t||n)return r("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield g(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!w)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{r("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);w.onTcfReady(()=>{r("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),w.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},E=(e,n,i,...o)=>t(void 0,[e,n,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return r(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=b(e,0,n);return(yield o())?(r(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(r(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),P="mobile";class C{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,i){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=b(i.tcf,i.isMobileApp,i.country),o=yield t(),r=i.device===P?n.mobileHTML:n.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,o,r;e.search=null!==(r=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class T{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:i}={}}=e;(t||i)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const n=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${n}"]`);if(n&&!window.autoplayQueue&&!i)try{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,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(n)}catch(e){r("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==o||o.appendChild(t),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){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()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,n,i,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(t=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class I extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const k="svd",A="vg",L="aftonbladet",O="e24",U="front",M=e=>t(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),x={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Q})})}})}};class D{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){yield t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:n,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield M(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===U?"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:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const _="https://www.aftonbladet.se/video-player-extras/latest/";class N{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${_}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${_}external-link.js`]:{name:"ExternalLink"}}};yield M(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}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""}}const V=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class B{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:n,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},V(e)?e:{}),{provider:Object.assign(Object.assign({},V(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${n}`]},requestSettings:{}}}},d=yield M(s);d.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}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===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class R{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const $=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[A]:new d,[O]:new D,[L]:new N,[k]:new B}[i]||new R,l=new(r===h?I:S)(n,a,o),c=new s(t,n),u=new C(a,l),v=new T(a);return new p(c,u,v,l)},q=()=>t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class F{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return r("[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.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}const H=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=$(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},z=[],W=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:i,tcf:o,drEdition:s,account:d,pageContext:{deviceType:l,publisher:c,pageType:u,countryCode:v,isMobileApp:p}}=e;if(!(yield E(o,p,v,"handleDrEditionBackfill")))return;const g=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:s}=e,d=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=a.some(e=>c.startsWith(e)),p=z.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(z.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,n);if(!g)return;if(!(null==i?void 0:i.instance))return void r("Pulse has not been passed as a prop, aborting");const m=(null==d?void 0:d.getAccountSdk)?yield d.getAccountSdk():yield q(),h=new F(m),y=$({publisher:c,pageType:u,country:v},h,null==i?void 0:i.instance),w=document.getElementById(n.targetId);if(!w||!s)return;w.classList.value="";const f=document.createElement("div");f.className=s.options.containerSelector.replace(/^[.#:[\]]+/,""),w.innerHTML=f.outerHTML;const b={editionName:(null===(t=null==g?void 0:g.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:s,device:l,tcf:o,isMobileApp:p,country:v,renderAsBackfill:!0};yield y.fetchAndRenderAd(w,b)});const J=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var Q=Object.freeze({__proto__:null,default:J});exports.DrEdition=({editionName:t,fallbackTargetId:n,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=a(o,"data-pulse"),d=a(r,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:i})]}))},exports.getDrEditionManager=$,exports.handleDrEdition=e=>t(void 0,[e],void 0,function*({drEdition:e,pageContext:t,account:n,tcf:i,pulse:o}){if(!e)return;if(!(yield E(i,t.isMobileApp,t.countryCode,"handleDrEdition")))return;const r=(null==n?void 0:n.getAccountSdk)?yield n.getAccountSdk():yield q(),a=new F(r);H({publisher:t.publisher,drEditionConfig:e,device:t.deviceType,pageType:t.pageType,country:t.countryCode},a,null==o?void 0:o.instance)}),exports.handleDrEditionBackfill=W,exports.handleDrEditionBackfillOnAdblock=(e,n)=>{var i,o,a;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void r("Ad block not enabled, Dr. Edition backfills will not be rendered");r("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(a=null==l?void 0:l.map(([e])=>e))&&void 0!==a?a:[],u=new IntersectionObserver((n,i)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;i.unobserve(n),yield W(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};
|
package/dr-edition/es/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Tracker from '@schibsted/pulse-sdk';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { Identity, HasSessionSuccessResponse } from '@schibsted/account-sdk-browser';
|
|
4
3
|
|
|
5
4
|
type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
|
|
6
5
|
interface AstBanner {
|
|
@@ -206,6 +205,24 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
|
|
|
206
205
|
|
|
207
206
|
type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
|
|
208
207
|
|
|
208
|
+
interface IdentityUser {
|
|
209
|
+
userId?: string | number;
|
|
210
|
+
gender?: string;
|
|
211
|
+
}
|
|
212
|
+
/** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
|
|
213
|
+
type AccountInterface = {
|
|
214
|
+
getUser: () => Promise<IdentityUser>;
|
|
215
|
+
isLoggedIn: () => Promise<boolean>;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
interface AccountConfig {
|
|
219
|
+
/** Satisfied by function available in account-sdk-browser v6.
|
|
220
|
+
* This should become the non-optional way to get AccountInterface in a future release,
|
|
221
|
+
* as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
|
|
222
|
+
*/
|
|
223
|
+
getAccountSdk?: () => Promise<AccountInterface>;
|
|
224
|
+
}
|
|
225
|
+
|
|
209
226
|
declare const CogwheelPositions: {
|
|
210
227
|
readonly LEFT: "left";
|
|
211
228
|
readonly RIGHT: "right";
|
|
@@ -229,6 +246,7 @@ interface SiteConfig {
|
|
|
229
246
|
tcf?: TCFConfig;
|
|
230
247
|
prebid?: PrebidConfig;
|
|
231
248
|
pulse?: PulseConfig;
|
|
249
|
+
account?: AccountConfig;
|
|
232
250
|
finnBlink?: FinnBlinkConfig;
|
|
233
251
|
wallpaper?: WallpaperConfig;
|
|
234
252
|
fullscreenScroll?: FullscreenScrollConfig;
|
|
@@ -648,11 +666,10 @@ interface DrEditionHtmlAttributes {
|
|
|
648
666
|
type DrEditionObserverProperties = Pick<DrEditionObserverConfig, 'publisher' | 'pageType' | 'country'>;
|
|
649
667
|
|
|
650
668
|
declare class IdentityFacade {
|
|
651
|
-
private readonly
|
|
652
|
-
constructor(
|
|
653
|
-
getIdentityUser(): Promise<
|
|
669
|
+
private readonly account;
|
|
670
|
+
constructor(account: AccountInterface | undefined);
|
|
671
|
+
getIdentityUser(): Promise<IdentityUser | null>;
|
|
654
672
|
isUserLoggedIn(): Promise<boolean>;
|
|
655
|
-
onIdentityLogout(callback: () => void): void;
|
|
656
673
|
}
|
|
657
674
|
|
|
658
675
|
declare class DrEditionService {
|
|
@@ -682,7 +699,7 @@ declare const getDrEditionManager: (drEditionPageProperties: DrEditionObserverPr
|
|
|
682
699
|
declare const DrEdition: ({ editionName, fallbackTargetId, children, pulseData, htmlAttributes }: DrEditionComponentProps) => ReactNode;
|
|
683
700
|
|
|
684
701
|
declare const handleDrEditionBackfill: (config: SiteConfig, adObj: AstTagObj) => Promise<void>;
|
|
685
|
-
declare const handleDrEdition: (
|
|
702
|
+
declare const handleDrEdition: ({ drEdition, pageContext, account, tcf, pulse }: SiteConfig) => Promise<void>;
|
|
686
703
|
declare const handleDrEditionBackfillOnAdblock: (siteConfig: SiteConfig, placements: Array<Placement>) => void;
|
|
687
704
|
|
|
688
705
|
export { DrEdition, getDrEditionManager, handleDrEdition, handleDrEditionBackfill, handleDrEditionBackfillOnAdblock };
|
package/dr-edition/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=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"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";v(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const m=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 a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{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,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){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()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),x={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class N{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"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:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const D="https://www.aftonbladet.se/video-player-extras/latest/";class V{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${D}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${D}external-link.js`]:{name:"ExternalLink"}}};yield _(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}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""}}const B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield _(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}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===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[L]:new l,[U]:new N,[O]:new V,[A]:new R}[i]||new $,s=new(r===y?S:k)(n,a,o),c=new d(t,n),u=new T(a,s),v=new I(a);return new g(c,u,v,s)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>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)})});class z{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 a("[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)}}const W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield P(o,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const g=yield H(),m=new z(g),h=F({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(t.targetId);if(!y||!r)return;y.classList.value="";const w=document.createElement("div");w.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)}),G=e=>n(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield P(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield H(),i=new z(n);W({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=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"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";v(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const m=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 a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{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,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){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()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),N={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class D{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{N[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"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:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const V="https://www.aftonbladet.se/video-player-extras/latest/";class x{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${V}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${V}external-link.js`]:{name:"ExternalLink"}}};yield _(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}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""}}const B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield _(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}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===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[L]:new l,[U]:new D,[O]:new x,[A]:new R}[i]||new $,s=new(r===y?S:k)(n,a,o),c=new d(t,n),u=new T(a,s),v=new I(a);return new g(c,u,v,s)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class z{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return a("[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.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}const W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,account:d,pageContext:{deviceType:l,publisher:c,pageType:u,countryCode:v,isMobileApp:p}}=e;if(!(yield P(o,p,v,"handleDrEditionBackfill")))return;const g=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!g)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const m=(null==d?void 0:d.getAccountSdk)?yield d.getAccountSdk():yield H(),h=new z(m),y=F({publisher:c,pageType:u,country:v},h,null==i?void 0:i.instance),w=document.getElementById(t.targetId);if(!w||!r)return;w.classList.value="";const f=document.createElement("div");f.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),w.innerHTML=f.outerHTML;const b={editionName:(null===(n=null==g?void 0:g.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:l,tcf:o,isMobileApp:p,country:v,renderAsBackfill:!0};yield y.fetchAndRenderAd(w,b)}),G=e=>n(void 0,[e],void 0,function*({drEdition:e,pageContext:t,account:n,tcf:i,pulse:o}){if(!e)return;if(!(yield P(i,t.isMobileApp,t.countryCode,"handleDrEdition")))return;const r=(null==n?void 0:n.getAccountSdk)?yield n.getAccountSdk():yield H(),a=new z(r);W({publisher:t.publisher,drEditionConfig:e,device:t.deviceType,pageType:t.pageType,country:t.countryCode},a,null==o?void 0:o.instance)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};
|