@schibsted/advertory 3.0.5 → 3.0.8
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/es/index.d.ts +630 -0
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/{_auto-entry_aftenposten-DXDCz53S.js → _auto-entry_aftenposten-8LeCoK5C.js} +1 -1
- package/aftenposten/es/{events-BXekq4-Y.js → events-CQ2qhSo7.js} +1 -1
- package/aftenposten/es/{index-DwwyeytC.js → index-93yDjesK.js} +1 -1
- package/aftenposten/es/{index-DMJaVnDY.js → index-BfZWGbeh.js} +1 -1
- package/aftenposten/es/{index-CUdT2aBg.js → index-CYJNgaCL.js} +1 -1
- package/aftenposten/es/{index-Dr6qDL6y.js → index-Cc0f8qLs.js} +1 -1
- package/aftenposten/es/{index-CdJS1rz5.js → index-DPxa6qXq.js} +1 -1
- package/aftenposten/es/{index-B_BJ-GZa.js → index-Dm0jLhZ7.js} +1 -1
- package/aftenposten/es/{index-U0ZfOVUM.js → index-DyJ74iuv.js} +1 -1
- package/{aftonbladet/es/index-BHOn33gV.js → aftenposten/es/index-qpT7aMMJ.js} +1 -1
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{scale-ad-hvkfHClG.js → scale-ad-BrcTJTxv.js} +1 -1
- package/aftenposten/es/{styles-Sfx4JrHY.js → styles-BDNscpZR.js} +1 -1
- package/aftenposten/es/{styles-CyFIlex_.js → styles-BFj5N8bQ.js} +1 -1
- package/aftenposten/es/{styles-Bo8aqlRJ.js → styles-BIqCKczq.js} +1 -1
- package/aftenposten/es/{styles-BiPPLnYw.js → styles-BWL2HZCk.js} +1 -1
- package/aftenposten/es/{styles-vptdy3-W.js → styles-DEdRbGOk.js} +1 -1
- package/aftenposten/es/{styles-Cg52cJBf.js → styles-DFwvPOlB.js} +1 -1
- package/aftenposten/es/{styles-CW0P1h54.js → styles-DROPiKRC.js} +1 -1
- package/aftenposten/es/{styles-3-ugSt2o.js → styles-DpowpW4E.js} +1 -1
- package/aftenposten/es/{styles-CaLkddSM.js → styles-KyWcOufP.js} +1 -1
- package/aftenposten/es/{styles-Dpf5ewCv.js → styles-_zuqMRxO.js} +1 -1
- package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-DU4PTo-Z.js → _auto-entry_aftenpostenv2-BeMs8ob2.js} +1 -1
- package/aftenpostenv2/es/{events-Cl84NepQ.js → events-ChRZTUCx.js} +1 -1
- package/aftenpostenv2/es/{index-CLPU64GR.js → index-C6vf28ds.js} +1 -1
- package/aftenpostenv2/es/{index-CyPxj7tz.js → index-CJygXyRU.js} +1 -1
- package/aftenpostenv2/es/{index-CGH8wQRK.js → index-CR0I34um.js} +1 -1
- package/aftenpostenv2/es/{index-CrlFhPSH.js → index-CY608gTF.js} +1 -1
- package/aftenpostenv2/es/{index-DXBb3fo5.js → index-DZ_Rn0Ay.js} +1 -1
- package/aftenpostenv2/es/{index-leHf1oQP.js → index-Dr92H44B.js} +1 -1
- package/aftenpostenv2/es/{index-LUZuiwye.js → index-Dx5ChNOu.js} +1 -1
- package/aftenpostenv2/es/{index-BnFeuIc4.js → index-RX6rMExy.js} +1 -1
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{scale-ad-oghrje8i.js → scale-ad-C49Ut9zr.js} +1 -1
- package/aftenpostenv2/es/{styles-D-VfBgOu.js → styles-Ac46g-YW.js} +1 -1
- package/aftenpostenv2/es/{styles-fzT9EwC5.js → styles-BJpYKa8M.js} +1 -1
- package/aftenpostenv2/es/{styles-CoMJR6g_.js → styles-BchRMhbH.js} +1 -1
- package/aftenpostenv2/es/{styles-Cl0DDnnQ.js → styles-CjwVJpYX.js} +1 -1
- package/aftenpostenv2/es/{styles-DB7US7Zo.js → styles-CzukL4zG.js} +1 -1
- package/aftenpostenv2/es/{styles-DVg5jDcH.js → styles-D7cNxIam.js} +1 -1
- package/aftenpostenv2/es/{styles-CZR9iBvp.js → styles-DUsUff50.js} +1 -1
- package/aftenpostenv2/es/{styles-CX9rG6J8.js → styles-Dsiga4Vz.js} +1 -1
- package/aftenpostenv2/es/{styles-qWPEE_zq.js → styles-Dw1Si2ah.js} +1 -1
- package/aftenpostenv2/es/{styles-Ck9le9Vw.js → styles-asujvz27.js} +1 -1
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/{_auto-entry_aftonbladet-BWfzMHpu.js → _auto-entry_aftonbladet-h6DNckwN.js} +1 -1
- package/aftonbladet/es/{events-DadZOnBd.js → events-DulRyicm.js} +1 -1
- package/{aftenposten/es/index-Brf5poal.js → aftonbladet/es/index--QVpi0TR.js} +1 -1
- package/aftonbladet/es/{index-D9xGimq2.js → index-4xPmUl3_.js} +1 -1
- package/aftonbladet/es/{index-DZJcmYKp.js → index-C6Eb1Qrn.js} +1 -1
- package/aftonbladet/es/{index-ComEFzA9.js → index-CQvQu7pz.js} +1 -1
- package/aftonbladet/es/{index-BywtD31R.js → index-DXezzjPp.js} +1 -1
- package/aftonbladet/es/{index-CqmYRujq.js → index-DZmjXNQE.js} +1 -1
- package/aftonbladet/es/{index-BvdJA_YE.js → index-DdgHRBkn.js} +1 -1
- package/aftonbladet/es/{index-CeQROqCL.js → index-e-_eRuQL.js} +1 -1
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-7j0Hc6sp.js → styles-BVbUvZTY.js} +1 -1
- package/aftonbladet/es/{styles-D67vj7n3.js → styles-C1aQAT3Q.js} +1 -1
- package/aftonbladet/es/{styles-Bg0CiD5K.js → styles-C7uVXh9Y.js} +1 -1
- package/aftonbladet/es/{styles-B9zblQhj.js → styles-Dfkn_-JH.js} +1 -1
- package/aftonbladet/es/{styles-B9Yki73M.js → styles-Dz356ikP.js} +1 -1
- package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-xbITPy5Y.js → _auto-entry_aftonbladetv2-CFy02vTE.js} +1 -1
- package/aftonbladetv2/es/{events-CrsrvV91.js → events-QZSgTQvz.js} +1 -1
- package/aftonbladetv2/es/{index-kJpbM8Cw.js → index-3roYJ2-8.js} +1 -1
- package/aftonbladetv2/es/{index-CUiUk3xX.js → index-B4EltwuC.js} +1 -1
- package/aftonbladetv2/es/{index-Bd8T8x2v.js → index-B7FfXrVQ.js} +1 -1
- package/aftonbladetv2/es/{index-Bv_S5RiU.js → index-BXrylY2M.js} +1 -1
- package/aftonbladetv2/es/{index-BTtVnP-a.js → index-CQSf8i1k.js} +1 -1
- package/aftonbladetv2/es/{index-TKW3AIT5.js → index-CbFLREUA.js} +1 -1
- package/aftonbladetv2/es/{index-XtxyezH-.js → index-DXcxJZTo.js} +1 -1
- package/aftonbladetv2/es/{index-4oJJGLpZ.js → index-DqrD8sjH.js} +1 -1
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{scale-ad-Bu-OTusW.js → scale-ad-BtTUIhz2.js} +1 -1
- package/aftonbladetv2/es/{styles-Cq35TYnJ.js → styles-BIc-TX-O.js} +1 -1
- package/aftonbladetv2/es/{styles-BAMVUVBT.js → styles-BTMcF6oN.js} +1 -1
- package/aftonbladetv2/es/{styles-B68GU9Br.js → styles-Cb8nIkZt.js} +1 -1
- package/aftonbladetv2/es/{styles-BsKBZcpP.js → styles-DZn1yBKx.js} +1 -1
- package/aftonbladetv2/es/{styles-BdfNSbzW.js → styles-wvFTYFae.js} +1 -1
- package/aftonbladetv2/styles.css +1 -1
- package/bt/cjs/index.js +1 -1
- package/bt/es/{_auto-entry_bt-MoyUxChE.js → _auto-entry_bt-CVnGKgwu.js} +1 -1
- package/bt/es/{events-BO2Jqccj.js → events-DmwmGNZZ.js} +1 -1
- package/bt/es/{index-_ctMXfR3.js → index-B4ZR_9mq.js} +1 -1
- package/bt/es/{index-ulnsaUpK.js → index-BLDEN_N8.js} +1 -1
- package/{sa/es/index-DZ42Nt-2.js → bt/es/index-BWLct5Rx.js} +1 -1
- package/bt/es/{index-7ZTN81IP.js → index-DJRwSKF4.js} +1 -1
- package/bt/es/{index-C2-eU0UF.js → index-DMmit_Nd.js} +1 -1
- package/bt/es/{index-C9XPxBPH.js → index-DS-6JwaH.js} +1 -1
- package/bt/es/{index-DrQCHk53.js → index-M7bAjRom.js} +1 -1
- package/bt/es/{index-D1TkSQcB.js → index-ucdoy1FS.js} +1 -1
- package/bt/es/index.js +1 -1
- package/bt/es/{scale-ad-D4t8YNyo.js → scale-ad-BhMKICgu.js} +1 -1
- package/{sa/es/styles-BH0a_nht.js → bt/es/styles-BmOoJzIc.js} +1 -1
- package/bt/es/{styles-ByGsZF2k.js → styles-BuiZ6rBo.js} +1 -1
- package/{vg/es/styles-D_bbqZrI.js → bt/es/styles-Ce4tjJL8.js} +1 -1
- package/{sa/es/styles-C5AHLOi7.js → bt/es/styles-D3YDhfhr.js} +1 -1
- package/{sa/es/styles-2UcWuwkn.js → bt/es/styles-D487j0TU.js} +1 -1
- package/bt/es/{styles-DRy8afqL.js → styles-DQ98jhRR.js} +1 -1
- package/bt/es/{styles-n7bkuYjq.js → styles-DQuKQudE.js} +1 -1
- package/bt/es/{styles-BdjHNh8j.js → styles-Dqjrqoue.js} +1 -1
- package/{vg/es/styles-bAVWxP8P.js → bt/es/styles-HfykBcnL.js} +1 -1
- package/btv2/es/{_auto-entry_btv2-Dxtv2akG.js → _auto-entry_btv2-B5wex4b7.js} +1 -1
- package/btv2/es/{events-j67JLQ2H.js → events-BDnXa22g.js} +1 -1
- package/btv2/es/{index-CFZe5uVP.js → index-580-VT45.js} +1 -1
- package/btv2/es/{index-Cq0lapvk.js → index-B-ip_4Xw.js} +1 -1
- package/btv2/es/{index-xGxoLsR2.js → index-B6-URY6y.js} +1 -1
- package/btv2/es/{index-BsQp7LQQ.js → index-DTTWPaZP.js} +1 -1
- package/btv2/es/{index-6L0eLvqi.js → index-KoMB7ZZe.js} +1 -1
- package/btv2/es/{index-Dca95pIk.js → index-SvVanoA-.js} +1 -1
- package/btv2/es/{index-Ds248THS.js → index-jULwe8iC.js} +1 -1
- package/btv2/es/{index-mnRm12-k.js → index-mIzhU5BX.js} +1 -1
- package/btv2/es/index.js +1 -1
- package/btv2/es/{scale-ad-ZiyaqpZY.js → scale-ad-DZcrVDNy.js} +1 -1
- package/{sav2/es/styles-D2HQJIvz.js → btv2/es/styles-BaCDxRra.js} +1 -1
- package/{vgv2/es/styles-DSXco1bB.js → btv2/es/styles-BfFTEGeK.js} +1 -1
- package/{vgv2/es/styles-Do1uCNYS.js → btv2/es/styles-Byy0S5HC.js} +1 -1
- package/{sav2/es/styles-CQDTd7Yn.js → btv2/es/styles-CXXGphfu.js} +1 -1
- package/btv2/es/{styles-u0pKEnRr.js → styles-Cb0LqBSI.js} +1 -1
- package/{sav2/es/styles-BHMb0lFS.js → btv2/es/styles-Dy4LlV-j.js} +1 -1
- package/btv2/es/{styles-D33CY1B0.js → styles-VHa9npvf.js} +1 -1
- package/btv2/es/{styles-BMat4ntk.js → styles-VLuGkKhJ.js} +1 -1
- package/e24/es/{_auto-entry_e24-BZ-Y0wfw.js → _auto-entry_e24-BHYSGq6v.js} +1 -1
- package/e24/es/{events-BufTLFvD.js → events-FxBnV0vA.js} +1 -1
- package/e24/es/{index-VSYazOOP.js → index-B04EMmtI.js} +1 -1
- package/e24/es/{index-a27bOqcM.js → index-BXVP_eQl.js} +1 -1
- package/e24/es/{index-BeKuz8kl.js → index-CLcI0vSZ.js} +1 -1
- package/e24/es/{index-CdXeC1XR.js → index-Cl2Ebr4M.js} +1 -1
- package/e24/es/{index-D2hsKd_j.js → index-D5iJu4s2.js} +1 -1
- package/e24/es/{index-BoX_Ms3q.js → index-DBU_07W5.js} +1 -1
- package/e24/es/{index-xMcYW3T_.js → index-DMjxW8TA.js} +1 -1
- package/e24/es/{index-Ds3LzWiF.js → index-qk4MHvP6.js} +1 -1
- package/e24/es/index.js +1 -1
- package/e24/es/{scale-ad-BNf4Fsqm.js → scale-ad-DA4lceUY.js} +1 -1
- package/e24/es/{styles-C7yJ56lw.js → styles-B5VfCsHU.js} +1 -1
- package/e24/es/{styles-DZuVpLJ7.js → styles-BDVl0wXV.js} +1 -1
- package/{tv4/es/styles-B2VSV977.js → e24/es/styles-BSWi5Y15.js} +1 -1
- package/e24/es/{styles-Ddde3ZOq.js → styles-BUi7dSQv.js} +1 -1
- package/e24/es/{styles-BFFQPUWj.js → styles-Cl9M0Qcl.js} +1 -1
- package/e24/es/{styles-B-CEI8Wp.js → styles-CtIdf26M.js} +1 -1
- package/e24/es/{styles-CoHTfZq0.js → styles-CxnKS6og.js} +1 -1
- package/e24/es/{styles-KRjAedia.js → styles-PowW6fOJ.js} +1 -1
- package/e24/es/{styles-BSOMBwHE.js → styles-hcbL_iuy.js} +1 -1
- package/e24/es/{styles-BfBG0BOv.js → styles-s18EwT96.js} +1 -1
- package/e24/es/{styles-CEn4rxLe.js → styles-z2iVwP4v.js} +1 -1
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-tf5B8Ird.js → _auto-entry_fotbollskanalen-BL4ZlKfU.js} +1 -1
- package/fotbollskanalen/es/{events-DEDuFlTj.js → events-BYqbWgGb.js} +1 -1
- package/fotbollskanalen/es/{index-PByAFKys.js → index-9OxIIf9T.js} +1 -1
- package/fotbollskanalen/es/{index-Bk50Iqqu.js → index-BmmKMZts.js} +1 -1
- package/fotbollskanalen/es/{index-CT8A110M.js → index-BvtE8Lzw.js} +1 -1
- package/fotbollskanalen/es/{index-DJxrgsR5.js → index-CDDeUDoz.js} +1 -1
- package/fotbollskanalen/es/{index-BZfYNCDy.js → index-Coeggf4K.js} +1 -1
- package/fotbollskanalen/es/{index--b2Lev8c.js → index-D660_6ei.js} +1 -1
- package/fotbollskanalen/es/{index-CpE_tcqA.js → index-TqFwOfDz.js} +1 -1
- package/fotbollskanalen/es/{index-CEkeM4Tv.js → index-qOPfgavz.js} +1 -1
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{scale-ad-arh_rlli.js → scale-ad-nDIVtUO1.js} +1 -1
- package/fotbollskanalen/es/{styles-C2m2x191.js → styles-Jry3BR-b.js} +1 -1
- package/glimr/es/glimr-Crymyq4O.js +1 -0
- package/glimr/es/glimr-sdk-B7FY2YN8.js +1 -0
- package/glimr/es/index.js +1 -0
- package/godare/cjs/index.js +1 -1
- package/godt/cjs/index.js +1 -1
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.js +1 -1
- package/koket/es/{_auto-entry_koket-C6PBxlyW.js → _auto-entry_koket-DakE_7Xi.js} +1 -1
- package/koket/es/{events-yHVpiPae.js → events-DtqaojTG.js} +1 -1
- package/koket/es/{index-o8BzRnXh.js → index-B40eR0N8.js} +1 -1
- package/koket/es/{index-BXF-kmve.js → index-BQHK7ypj.js} +1 -1
- package/koket/es/{index-Dn-9hHv-.js → index-C61ghlBf.js} +1 -1
- package/koket/es/{index-CPjnqI-6.js → index-CFdDHyVM.js} +1 -1
- package/koket/es/{index-CepWIdyH.js → index-C_iCGQN2.js} +1 -1
- package/koket/es/{index-DGby1mGx.js → index-DVy_5oMo.js} +1 -1
- package/koket/es/{index-CptjGiXd.js → index-_XaJmxZM.js} +1 -1
- package/koket/es/{index-DM1E_NEw.js → index-vAxeDLuQ.js} +1 -1
- package/koket/es/index.js +1 -1
- package/koket/es/{scale-ad-CXRkaPI0.js → scale-ad-C7R8hi1i.js} +1 -1
- package/{svdv2/es/styles-Drb79iBV.js → koket/es/styles-tGbE1hqF.js} +1 -1
- package/minmote/cjs/index.js +1 -1
- package/package.json +13 -1
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.js +1 -1
- package/sa/es/{_auto-entry_sa-tDG8xSe9.js → _auto-entry_sa-C0Dx2e-d.js} +1 -1
- package/sa/es/{events-DY7jCT_z.js → events-D6c51YDh.js} +1 -1
- package/sa/es/{index-C4xBbb_y.js → index-B1SWtRHX.js} +1 -1
- package/sa/es/{index-C6mIccES.js → index-B1naQzjL.js} +1 -1
- package/sa/es/{index-Dn_ueExa.js → index-BJAIVL1n.js} +1 -1
- package/sa/es/{index-ByzW6XX4.js → index-BlBGCBF7.js} +1 -1
- package/sa/es/{index-CaLMOCfR.js → index-D9eEw02Y.js} +1 -1
- package/sa/es/{index-ywQdUehK.js → index-DKaOv8LR.js} +1 -1
- package/{bt/es/index-CA2l4HZM.js → sa/es/index-J36en3WL.js} +1 -1
- package/sa/es/{index-KiIGwmbz.js → index-cuFmm3Ar.js} +1 -1
- package/sa/es/index.js +1 -1
- package/sa/es/{scale-ad-kzGa7O13.js → scale-ad-BMxBnCtW.js} +1 -1
- package/sa/es/{styles-DwkmOcN3.js → styles-BB4p2QI7.js} +1 -1
- package/{vg/es/styles-j05WSgqs.js → sa/es/styles-BIhpRBaL.js} +1 -1
- package/sa/es/{styles-CA-4Zkmi.js → styles-BfPSZ9f0.js} +1 -1
- package/{bt/es/styles-BY2rGG3H.js → sa/es/styles-CCslSLTo.js} +1 -1
- package/{bt/es/styles-DZyHXHg2.js → sa/es/styles-CTC82xOV.js} +1 -1
- package/sa/es/{styles-DWsY_8Gt.js → styles-CcPT8kgm.js} +1 -1
- package/sa/es/{styles-Cvd0m7Wj.js → styles-CgwCZL5Y.js} +1 -1
- package/{bt/es/styles-39x-Nijs.js → sa/es/styles-DzI_6t0a.js} +1 -1
- package/{vg/es/styles-ffxnjS1s.js → sa/es/styles-lbsFxb42.js} +1 -1
- package/sav2/es/{_auto-entry_sav2-CY0kYMlP.js → _auto-entry_sav2-DYjPqZ0-.js} +1 -1
- package/sav2/es/{events-Cl5_-LxE.js → events-BfXen0Z2.js} +1 -1
- package/sav2/es/{index-CKrldH2y.js → index-BkM3cMtv.js} +1 -1
- package/sav2/es/{index-CfEUqa5g.js → index-BmR8vbZQ.js} +1 -1
- package/sav2/es/{index-CxogNI4h.js → index-BzDAtr11.js} +1 -1
- package/sav2/es/{index-BsNfAXFB.js → index-ChvYwZI0.js} +1 -1
- package/sav2/es/{index-BQpx1HFa.js → index-D1km7EaV.js} +1 -1
- package/sav2/es/{index-DxtM0Z6Y.js → index-DHShJOx5.js} +1 -1
- package/sav2/es/{index-_Ejzv04C.js → index-d0gyjucc.js} +1 -1
- package/sav2/es/{index-CJN3SngB.js → index-n6mKEw8M.js} +1 -1
- package/sav2/es/index.js +1 -1
- package/sav2/es/{scale-ad-i1hUVl_0.js → scale-ad-B1NlJOsE.js} +1 -1
- package/{vgv2/es/styles-G1HvqhV7.js → sav2/es/styles-BkzVSC5G.js} +1 -1
- package/{btv2/es/styles-DavpS2Qo.js → sav2/es/styles-CP_kmZ2u.js} +1 -1
- package/sav2/es/{styles-CClYWKKX.js → styles-CojijyKn.js} +1 -1
- package/{btv2/es/styles-Hp2gvvov.js → sav2/es/styles-CsI7Limr.js} +1 -1
- package/{vgv2/es/styles-8TOXRYKV.js → sav2/es/styles-DEGFrKoF.js} +1 -1
- package/sav2/es/{styles-C7W5NtfH.js → styles-OsqEAqBL.js} +1 -1
- package/sav2/es/{styles-DTguZBdK.js → styles-gn7zE9Se.js} +1 -1
- package/sav2/es/{styles-O5kf_SS2.js → styles-peqAjv4h.js} +1 -1
- package/svd/cjs/index.js +1 -1
- package/svd/es/{_auto-entry_svd-DH7LO3Q1.js → _auto-entry_svd-Bf75Pfnc.js} +1 -1
- package/svd/es/{events-BfHDXvEa.js → events-5RTCbRHl.js} +1 -1
- package/svd/es/{index-DTLUbVca.js → index-B9-ca4FP.js} +1 -1
- package/svd/es/{index-Boy6aZPe.js → index-BQ85ML9G.js} +1 -1
- package/svd/es/{index-ICodhL23.js → index-BU6sbUPU.js} +1 -1
- package/svd/es/{index-CYGUdY_V.js → index-C7eicIGr.js} +1 -1
- package/svd/es/{index-ek7rIfUG.js → index-CCOVmsc_.js} +1 -1
- package/{tv4/es/index-DRh-stB1.js → svd/es/index-DeuZGhY7.js} +1 -1
- package/svd/es/{index-Z0qXlpGo.js → index-DurvxLS0.js} +1 -1
- package/svd/es/{index-up5aSvfa.js → index-OBw-ZSKZ.js} +1 -1
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-DkkxsDP5.js → styles-B-sLxRxB.js} +1 -1
- package/svd/es/{styles-Bt9ckY6n.js → styles-BSMPr9mI.js} +1 -1
- package/svd/es/{styles-DxkUSfPu.js → styles-CGQXuXdY.js} +1 -1
- package/svd/es/{styles-DTVFdha1.js → styles-D2eg6SEI.js} +1 -1
- package/svd/es/{styles-BffkOL2w.js → styles-Dg7-Dpfd.js} +1 -1
- package/svd/es/{styles-faaQZ_nf.js → styles-xPPOTmyw.js} +1 -1
- package/svdv2/es/{_auto-entry_svdv2-5_0fDkQj.js → _auto-entry_svdv2-CpeREFmY.js} +1 -1
- package/svdv2/es/{events-B-DOY_45.js → events-DziTGi0V.js} +1 -1
- package/svdv2/es/{index-DDOvDflQ.js → index-Bu5orNk7.js} +1 -1
- package/svdv2/es/{index-TR56622L.js → index-Ch0Imx-a.js} +1 -1
- package/svdv2/es/{index-BpaHWEgs.js → index-Cl1DPmvk.js} +1 -1
- package/svdv2/es/{index-DPxr83aM.js → index-D2B5G3sz.js} +1 -1
- package/svdv2/es/{index-CNpgbjRq.js → index-DKgDkLec.js} +1 -1
- package/svdv2/es/{index-CF9qRNqV.js → index-ZxTqC-BV.js} +1 -1
- package/svdv2/es/{index-Dn2iRhTI.js → index-hGs3eVJY.js} +1 -1
- package/svdv2/es/{index-CUJxDT20.js → index-y1UcqKNM.js} +1 -1
- package/svdv2/es/index.js +1 -1
- package/svdv2/es/{scale-ad-Dw2tlFek.js → scale-ad-BcI91SqW.js} +1 -1
- package/svdv2/es/{styles-BTxEe9wU.js → styles-BBapv3K3.js} +1 -1
- package/{koket/es/styles-Bt_3EPbc.js → svdv2/es/styles-BziheQO-.js} +1 -1
- package/svdv2/es/{styles-c7nyBNHO.js → styles-ChqHE6jR.js} +1 -1
- package/svdv2/es/{styles-C2RyMm7p.js → styles-CmiSKYil.js} +1 -1
- package/svdv2/es/{styles-xMSj5PRm.js → styles-DboLIjdM.js} +1 -1
- package/svdv2/es/{styles-BvIm9y9U.js → styles-DcKmy-aT.js} +1 -1
- package/tek/cjs/index.js +1 -1
- package/tracker/es/index.d.ts +591 -0
- package/tracker/es/index.js +1 -0
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/{_auto-entry_tv4-B79FIPDF.js → _auto-entry_tv4-D0e2DKOy.js} +1 -1
- package/tv4/es/{events-BuFrBsPO.js → events-BGAhmaGY.js} +1 -1
- package/tv4/es/{index-N-PjTVe1.js → index-B1edPt_R.js} +1 -1
- package/tv4/es/{index-C1OXwwaM.js → index-B6tYV35h.js} +1 -1
- package/tv4/es/{index-CyEZoHB-.js → index-BC4TdCkj.js} +1 -1
- package/tv4/es/{index-DkkS72Wv.js → index-BXQX7bvh.js} +1 -1
- package/tv4/es/{index-CcXrk4xW.js → index-Br7pKGbc.js} +1 -1
- package/tv4/es/{index-D_bpF7kQ.js → index-DNTCFvSS.js} +1 -1
- package/{svd/es/index-Doytip_-.js → tv4/es/index-DgwjP7Qh.js} +1 -1
- package/tv4/es/{index-BgfmMXAp.js → index-DhNaqk_h.js} +1 -1
- package/tv4/es/index.js +1 -1
- package/tv4/es/{scale-ad-DymzQm0Y.js → scale-ad-BCX16JTW.js} +1 -1
- package/{e24/es/styles-Bb-2COMN.js → tv4/es/styles-B0-w9Sb4.js} +1 -1
- package/tvnu/cjs/index.js +1 -1
- package/vg/cjs/index.js +1 -1
- package/vg/es/{_auto-entry_vg-BHaK2bY9.js → _auto-entry_vg-CESCVcqF.js} +1 -1
- package/vg/es/{events-f1pWmpgv.js → events-CE5TpBmP.js} +1 -1
- package/vg/es/{index-MPio3Vap.js → index-B-B_rG8Y.js} +1 -1
- package/vg/es/{index-DnDsATHZ.js → index-B0xA2grA.js} +1 -1
- package/vg/es/{index-CdvCGDKf.js → index-BBRlxR4N.js} +1 -1
- package/vg/es/{index-CzTDmfbs.js → index-BKp7XMKQ.js} +1 -1
- package/vg/es/{index-DFVoEfzv.js → index-CxKMoVjO.js} +1 -1
- package/vg/es/{index-C9bhDLlf.js → index-DsYey_4K.js} +1 -1
- package/vg/es/{index-T8CVkFwi.js → index-ZEeaxvFn.js} +1 -1
- package/vg/es/{index-Cu8fOT27.js → index-Zz8BsFor.js} +1 -1
- package/vg/es/index.js +1 -1
- package/vg/es/{scale-ad-PC7wP59i.js → scale-ad-B8zVRA_q.js} +1 -1
- package/{sa/es/styles-B9b-tQBe.js → vg/es/styles-BBH1tiV9.js} +1 -1
- package/vg/es/{styles-PeGgCF8H.js → styles-BI4vAe4o.js} +1 -1
- package/vg/es/{styles-EfZsLCIV.js → styles-BO0Zkzbl.js} +1 -1
- package/vg/es/{styles-B_JWmkJG.js → styles-BYOYoTG-.js} +1 -1
- package/{bt/es/styles-aKU-xgzP.js → vg/es/styles-BaL0R31f.js} +1 -1
- package/vg/es/{styles-CyQVwQ3u.js → styles-BpJZXTPG.js} +1 -1
- package/vg/es/{styles-CracV5XI.js → styles-C4Xps43V.js} +1 -1
- package/vg/es/{styles-DMICEpSy.js → styles-Cr-Lu10Z.js} +1 -1
- package/vg/es/{styles-DJ4rsvOC.js → styles-CrKFASKe.js} +1 -1
- package/vg/es/{styles-U_xyVoRe.js → styles-DDNKkEzd.js} +1 -1
- package/{bt/es/styles-CPlYciF9.js → vg/es/styles-DPxr1rvG.js} +1 -1
- package/{sa/es/styles-DiKIHYk8.js → vg/es/styles-DWVf_5i5.js} +1 -1
- package/vg/es/{styles-1JIUF_E8.js → styles-DYenIxMV.js} +1 -1
- package/vg/es/{styles-96foOY6e.js → styles-Dh-KGVLB.js} +1 -1
- package/vg/es/{styles-F9geefdO.js → styles-EyAdkrFJ.js} +1 -1
- package/vgv2/es/{_auto-entry_vgv2-DI5G8ObB.js → _auto-entry_vgv2-RZ38lnR0.js} +1 -1
- package/vgv2/es/{events-DPEFkQ--.js → events-Dlw5UgN6.js} +1 -1
- package/vgv2/es/{index-DK6bfeGg.js → index-B4bKS3eF.js} +1 -1
- package/vgv2/es/{index-BmvOC5lR.js → index-C4a6tTwa.js} +1 -1
- package/vgv2/es/{index-smm5ZyVj.js → index-CuiZBleO.js} +1 -1
- package/vgv2/es/{index-BbxhQxDr.js → index-CyymqJnx.js} +1 -1
- package/vgv2/es/{index-CQJhC0Kc.js → index-D6ZZZe6V.js} +1 -1
- package/vgv2/es/{index-DZx9Ssyx.js → index-DFbQx1p5.js} +1 -1
- package/vgv2/es/{index-DL2cnwgP.js → index-azIt2Y0H.js} +1 -1
- package/vgv2/es/{index-Qmo9Nan-.js → index-tYZjVN8z.js} +1 -1
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{scale-ad-Pwah6lar.js → scale-ad-CMimq6Of.js} +1 -1
- package/vgv2/es/{styles-BdbJiPyJ.js → styles-BEnFRSZQ.js} +1 -1
- package/vgv2/es/{styles-Bkay-zKq.js → styles-BYeumSRu.js} +1 -1
- package/vgv2/es/{styles-Cs_0DRMW.js → styles-BwlWUr3V.js} +1 -1
- package/vgv2/es/{styles-HjkY3I3R.js → styles-C2Vo-soL.js} +1 -1
- package/{sav2/es/styles-B6vJg0Xr.js → vgv2/es/styles-C5iKe9f9.js} +1 -1
- package/{btv2/es/styles-DiXpAeoP.js → vgv2/es/styles-C8W7GC5E.js} +1 -1
- package/vgv2/es/{styles-Cz9QEV6B.js → styles-CLivlydP.js} +1 -1
- package/vgv2/es/{styles-CcCqhkYD.js → styles-ChwcrMcl.js} +1 -1
- package/vgv2/es/{styles-DeCv4Yvp.js → styles-Cu4tRH6t.js} +1 -1
- package/vgv2/es/{styles-DN6PbtF3.js → styles-DG3nbsdh.js} +1 -1
- package/vgv2/es/{styles-BRYOzfcc.js → styles-DI1U5ZgF.js} +1 -1
- package/{btv2/es/styles-DiYQ1TzQ.js → vgv2/es/styles-Dymwy8vi.js} +1 -1
- package/{btv2/es/styles-B4Ahi4ph.js → vgv2/es/styles-ITcDtgO1.js} +1 -1
- package/vgv2/es/{styles-4VdivQOu.js → styles-oG4sTy6B.js} +1 -1
- package/vgv2/es/{styles-uXZLq50U.js → styles-w5xrejWS.js} +1 -1
- package/vgv2/styles.css +1 -1
- package/video/es/index.js +1 -0
package/pent/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editableConfiguration"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},d=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||s("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||s("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||s("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||s("pageContext.deviceType is required."),n||s("pageOptions is required."),i||s("placements is required."),(null==o?void 0:o.defaultThreshold)||s("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&s(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=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},b="0123456789abcdefghijklmnopqrstuvwxyz",E=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},k=e=>{window.apntag.anq.push(e)},x=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,P=e=>O.test(e),j=e=>e.startsWith("wallpaper:color:"),_=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var $=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:P,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:_});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("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")&&S())},B=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"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const z=new R,U=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=z.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),k(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=Q(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${E(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&z.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:d})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(d)},Q=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},X=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:s})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="VERTICAL_FULLWIDTH",te="FULLWIDTH",ne="TAKEOVER",ie="VELVET_TAKEOVER",oe="WALLPAPER",re="COLLAPSE",ae={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},de={wallpaper:1600,"l-format":1600},se=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&ke(e,Z)},le=e=>{const{native:t}=e;return!!t},ce=e=>ke(e,te),ue=e=>{const{targetId:t}=e;return t.includes("takeover")||ke(e,ne)},pe=e=>ke(e,ne),ve=e=>ke(e,oe),ge=e=>ke(e,re),he=e=>e.targetId.includes("sponsorstripe"),me=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},ye=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),fe=e=>e.targetId.startsWith("midboard"),we=e=>e.targetId.includes("widescreen"),be=e=>e.width>=1260&&e.width<=1280,Ee=e=>e.width>=1600&&e.width<=1620,ke=(e,t)=>{const n=ae[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})};function xe(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}function Ce(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Ie=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 d("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(d("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);d("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Te="cmp:loaded";let Se="undefined"!=typeof window?window._tcf_:void 0,Ae=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Ae)return null;if(!Se)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Se.getConsentedToAllSync();return d(`TCF consented to all is: ${t}`),Se.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),Se=window._tcf_,void e(Se);d("TCF consent manager is not available");const n=()=>{d("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Se=window._tcf_,e(Se)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Te,n),Ae=!0,t(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(Te,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ce(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ie(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Se)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(()=>{d("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Se.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Se.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},Pe=(e,t,n,...i)=>Ce(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`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}=Oe(e,0,n);return(yield o())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),je=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},_e=e=>Ce(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=je("_pulse2data");return r?r.split(",")[9]:void 0}),Le=()=>{const e=je("_pulse2data");return e?e.split(",")[2]:void 0},$e="splash",Ne="welcomePage",qe="topscroller",De="velvet",Me=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Fe="takeover-displayed",Be="takeover-visit-count",Re=14400,ze=()=>{const e=je(Be);return e?parseInt(e):0},Ue=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Re}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Be}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ve=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Fe;return"true"===je(n)})())&&(!t||He()))},He=()=>{const e=ze();return 0===e?(Ue(),!1):1===e},We=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ke=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Ge=e=>{const{width:t,height:n}=e;return We(t,n)?$e:ke(e,ie)?De:Ke()?qe:Ne},Je=()=>Ce(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Fe,cookieCapTime:n=Re}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield Pe(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return ue(e)&&i},Xe=(e,t)=>{var n;if(t===qe){const{topscroller:t}=e;return null!=t?t:{}}if(t===$e){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ye=(e,t)=>{t!==$e?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=pe(e)?"60svh":`calc(100svh - ${l}px)`,u=pe(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Ze=Me([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var et=Object.freeze({__proto__:null,addTakeoverCookie:Je,adjustTakeoverHeight:Ye,canDisplayTakeover:Ve,getProperWelcomePageConfig:Xe,getTakeoverVariant:Ge,handleTakeoverCookieOnAdNotShown:e=>Ce(void 0,void 0,void 0,function*(){Qe(e)&&(yield Je())}),incrementArticleVisitCount:Ue,isSplashVariant:We,isTopscroller:Ke,scaleAd:Ze,shouldAddTakeoverCookieForNotShownAd:Qe});const tt={nativeAd:e=>le(e)&&!he(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ce,fullscreenScroll:se,topscroller:e=>ue(e)&&Ke(),splash:e=>ue(e)&&We(e.width,e.height),welcomePage:ue,wallpaper:ve,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:be,hFormat:Ee,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ee(e)&&!be(e),topboard:e=>e.targetId.startsWith("topboard")&&!ue(e),widescreen:we,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:he,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!ye(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!fe(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:ye,midboard:fe},nt=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(tt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},it=e=>{var t;return(null===(t=Object.entries(tt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},ot={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},rt="web_desktop",at="web_phone",dt="wde",st="wph",lt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},ct=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ut=(e,t=window.screen.width,n,i)=>{const o=ct(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},pt=new Map;pt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),pt.set("panorama",{scale:.79,transformOrigin:"center center"}),pt.set("outstream",{scale:.79,transformOrigin:"center center"}),pt.set("integration",{scale:.79,transformOrigin:"center center"}),pt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var vt=Object.freeze({__proto__:null,calculateScaleFactor:ct,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:ut,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=it(e),o=pt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=p.get();if(!(null==d?void 0:d.enabled))return;if(ke(e,Z))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ut(e,(g<h?g:h)-u)}});const gt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{ut(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ht={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},mt={publisherClassName:ht.PENT,fullWidthFormatClassName:"netboard"},yt=864e5,ft=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return d("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=yt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=yt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),wt="glimrTags",bt=["glwe_","glwet_"],Et={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...e)=>Ce(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield Pe(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),xt=()=>Ce(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(null==e?void 0:e.enabled))return void d("No consent for glimr data fetching.");const t=yield(n=500,Ce(void 0,void 0,void 0,function*(){return yield Promise.race([Ce(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{ft.setWithTimestamp(wt,{tags:e,tagMappings:t}),n(!0)})})}catch(e){d(`Error during getting glimr data: ${e}`)}else d("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Ct={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},It=e=>bt.some(t=>e.startsWith(t)),Tt=e=>e.startsWith("glgc_"),St=e=>!It(e)&&!Tt(e),At=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Ot(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Ot=(e,t)=>{const n=Pt();if(!n)return Et;const i=((e=[])=>e.filter(It))(n),o=((e=[])=>e.filter(Tt))(n),r=((e=[],t,n)=>{var i;const o=e.filter(St);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=Ct[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Pt=()=>{const e=ft.getByTimestamp(wt);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},jt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),_t=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Lt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},$t={get:(e,t)=>Ce(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ce(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Nt="advertory:ppids-cache",qt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Dt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Mt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Ft={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Bt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Rt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},zt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Ut{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Vt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ce(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Ht=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ce(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=ft.get(Nt),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});ft.set(Nt,o)}hashPPIDs(e,t){return Ce(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield $t.post(t,n,e)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ce(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ce(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${zt[t]}:${n}`:null}))(t,n),o=yield(e=>Ce(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Wt=e=>Ce(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield Pe(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Vt.processPPIDs(t,null==n?void 0:n.timeout),Ht.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Kt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Ht.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).add(r,Bt[e]).add(a,Rt[e]).buildEids()}]}},Gt=()=>{const{ppid1:e,ppid2:t}=Vt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Jt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Ht.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).add(r,Bt[e]).add(a,Rt[e]).buildRyEids()}}]}}},Qt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs();return(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).buildRyEids()},Xt=e=>Ce(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs(),r=(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Yt=(e,...t)=>Ce(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=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),Zt="advertory-fullscreen-scroll",en="advertory-fullscreen-scroll-wrapper",tn="fullscreen-scroll-in-screen",nn="in-screen",on=e=>e.includes("snoap.no"),rn=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},an=Me([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),dn=e=>{const t=Me([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},sn=[],ln={},cn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>un(e,i),{}),r=vn(e);o.observe(e),i&&(ln[r]=mn(e,null==t?void 0:t.options))},un=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=vn(e);n?(pn(i,n),gn(e,i,t)):(pn(i,n),hn(e,i,t))})},pn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},vn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},gn=(e,t,n)=>{e.classList.add(nn),document.body.classList.add(tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),sn.includes(t)||sn.push(t),n&&window.addEventListener("scroll",ln[t],{passive:!0})},hn=(e,t,n)=>{sn.includes(t)&&(n&&window.removeEventListener("scroll",ln[t]),document.body.classList.remove(tn),e.classList.remove(nn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},mn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&yn(e,r,o,0),a.length&&yn(e,a,o,40)}},yn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function fn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}fn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const wn="left",bn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let En=null;const kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${an})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(on(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=dn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>on(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),on(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),rn(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},xn=()=>{En=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Cn=()=>{En||(En=window.requestAnimationFrame(xn))},In=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a}}=p.get(),{targetId:d}=e,s=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==s?void 0:s.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:o="16px 0",beforeContentValue:r=""}=e,a=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${i} calc(50% - ${a}px),\n ${i} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${r&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${r}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(i=null==s?void 0:s.overlayStyles)&&void 0!==i?i:{});const l=document.getElementById(d),c=null==l?void 0:l.parentElement;if(!l||!c)return;cn(c,t),l.className=Zt,cn(c,t),l.className="advertory-fullscreen-scroll";const u=ke(e,Y)?"absolute":"fixed";l.style.position=u,c.className=en,c.dataset.showTagSubscribeId=d,l.setAttribute("data-ad-label",bn[a].adText),(null==s?void 0:s.cogwheelPosition)===wn&&(l.dataset.moveCogwheelToTheLeft="true"),Cn(),window.addEventListener("resize",Cn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",Cn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Cn)},Tn=e=>{if(!(null==e?void 0:e.classList.contains(Zt)))return;e.classList.remove(Zt),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(en))&&(t.classList.remove(en),t.classList.remove(nn))};var Sn=Object.freeze({__proto__:null,createFullscreenScrollAd:In,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=rn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=rn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:Tn});const An=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},On=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),An(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},Pn="ad-loaded",jn=()=>Ce(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),s=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=jt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=jt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=jt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=_t();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return d("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=_t();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const i=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};d("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Jt(n)),Lt(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Jt(n)),Lt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{_n(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const d=i(n),s=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(se(s)?(In(s,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(d)):(Tn(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(Pn),(null==r?void 0:r.creativeId)&&On(l,c,Number(null==r?void 0:r.creativeId)))}}),d("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{_n(e,r)},directRenderFn:()=>{}})})}),_n=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:d},p.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Ln=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},$n=["netboard","board"];class Nn{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:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return Ce(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=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:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:r,spid:a});try{d("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield $t.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let qn=class{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,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},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 Ce(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 Dn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):d("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Mn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ce(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void d(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(d("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Dn(a)):((null==s?void 0:s.itemId)&&r&&(d("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),Dn(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Dn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Dn(a))})}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:"";B(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}}class Fn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ce(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=n.device===ot.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Bn{constructor(e){this.strategy=e}handle(e,t){return Ce(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 Ce(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Yt(t)}catch(e){d("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ce(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 d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let Rn=class{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,n){return Ce(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ce(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class zn extends Rn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:i,clientName:o="",creativeId:r}={}}=t,{columnName:a,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:a,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:o,"spt:creativeId":r},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Un=class extends Rn{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,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=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:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,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,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=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:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Vn={FRONT:"front"},Hn=e=>Ce(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)))}))}),Wn={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 Ce(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Xr})})}})}};class Kn{handleVideo(e,t){return Ce(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ce(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 a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{Wn[e](l)});const c={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield Hn(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.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"]})}),u.once("PulseStats:ready",()=>Ce(this,void 0,void 0,function*(){const e=yield u.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===Vn.FRONT?"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 Gn="https://www.aftonbladet.se/video-player-extras/latest/";class Jn{handleVideo(e,t){return Ce(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:{[`${Gn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Gn}external-link.js`]:{name:"ExternalLink"}}};yield Hn(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")}getPulseObjectId(){return""}getPulsePageId(){return""}}const Qn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Xn{handleVideo(e,t){return Ce(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,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Qn(e)?e:{}),{provider:Object.assign(Object.assign({},Qn(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 Hn(a);d.once("PulseStats:ready",()=>Ce(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Yn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const Zn=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[ht.VG]:new qn,[ht.E24]:new Kn,[ht.AFTONBLADET]:new Jn,[ht.SVD]:new Xn}[o]||new Yn,s=new(a===g.SE?zn:Un)(n,d,r),l=new Nn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Fn(d,s),u=new Bn(d);return new Mn(l,c,u,s)},ei=()=>Ce(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 ti{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 Ce(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 d("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ce(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 ni=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=Zn(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ii=()=>Ce(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),oi=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},ri=[],ai=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:s,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield Pe(o,u,c,"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,s=r[o]||r.desktop,l=w(t.targetId),c=s.find(e=>e.targetId===l),u=$n.some(e=>l.startsWith(e)),p=ri.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(ri.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void d("Pulse has not been passed as a prop, aborting");const v=yield ei(),g=new ti(v),h=Zn({publisher:s,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),di=(e,t)=>{var n,i,o,r;if(!oi())return void d("Ad block not enabled, Dr. Edition backfills will not be rendered");d("Ad block is enabled, Dr. Edition backfills will be rendered");const a=null!==(r=null===(o=null===(i=null===(n=e.finnBlink)||void 0===n?void 0:n.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o.map(([e])=>e))&&void 0!==r?r:[],s=new IntersectionObserver((t,n)=>Ce(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield ai(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!a.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&s.observe(t)})};var si=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,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},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:Zn,handleDrEdition:e=>Ce(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Pe(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield ei(),i=new ti(n);ni({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)}),handleDrEditionBackfill:ai,handleDrEditionBackfillOnAdblock:di});const li="collapseAd",ci="hideAd",ui="resizeAd",pi="renderDrEditionFallback",vi="wallpaperImageUrl",gi="wallpaperColor",hi="velvet",mi=[ui,vi,gi,li,ci,pi,hi];let yi;const fi=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(P(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:vi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:gi,wallpaperColor:t}}if(e.startsWith(pi)){const t=e.split(":")[1];return{name:pi,targetId:t}}if(e.startsWith(li)||e.startsWith(ci)){const t=e.split(":")[1];return{name:li,targetId:t}}if(e.includes("name")&&mi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!mi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===hi&&d&&(d.includes("noScroll")&&(yi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==yi||yi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==li&&i!==ci||!o||F(o),i===ui&&o&&d&&Ln(o,d),i===pi&&o&&(F(o),ai(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&Ln(o,s,!0),i===vi&&r&&_(r),i===gi&&a&&L(a)},wi=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),bi=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),k(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ce(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ma});yield t(e,o,null)}),withFullAdsChain:e=>Ce(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ma});yield t(e,o,r,()=>Ce(void 0,void 0,void 0,function*(){if(!z.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return $});t(e)}))})}},Ei=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return me(t)&&i?(d(`loading finn blink ad for blink only placement for ${t}`),void bi().withFinnBlinkAd(t)):me(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void bi().withFullAdsChain(t)):void k(()=>(d("core showTag",{id:t}),e.showTag(t)))},ki=(e,t)=>Ce(void 0,void 0,void 0,function*(){yield x,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);d("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ei,e),wi(t));n.observe(e)}),xi=new Map,Ci=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Ii=".brandstudio-premium-content-widget",Ti=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Si=({adWrapper:e,placementContainer:t})=>{const n=Ti({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Ai=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Oi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ci.includes(n)&&Boolean(t.closest(Ii));const o=i?t.closest(Ii):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return Ai(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Ai(d):s.hasAttribute("style")&&Ai(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Pi=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=xi.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(xi.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Si({adWrapper:o,placementContainer:n}),k(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},ji=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,Pi,t,n),wi(300));i.observe(e)},_i=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Li=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),$i=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Ni=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Bi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},qi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;$i(o,r)&&i&&(U(i.targetId),n.length&&o.classList.remove(...n),Bi([i],t))}},Di=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Mi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&qi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),qi(e,!1,t))};n.persisted&&(Li()?window.addEventListener("scroll",i,{passive:!0}):qi(e,!1,t))})})(e,n))},Mi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Fi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Mi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Bi=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=_i(i,n);if(t)for(const t of e){const e=Fi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)k(()=>window.apntag.refresh(e))},Ri=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,zi=e=>`externalImpId:'${e}'`,Ui=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:s,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ve())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==qe):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Ri(a,c),allowedFormats:s,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(e=>{var t,n,i,o,r,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(d("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(d("Tracker state does not contain field pageViewId or it is empty"),""):(d("Tracker state is empty"),""):(d("Tracker is not configured in initAdvertory function"),"")})(i);n&&m&&(d("External Impression ID assigned to defineTag:",zi(m)),h.externalImpId=zi(m));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},Vi=e=>!e.includes("takeover")||Ve(),Hi=e=>{const{source:t}=e;return"csm"===t},Wi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Ki=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Gi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},Ji=(e,t)=>Ce(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});fn(".advertory-brandmetrics-survey{width:100%}");const Qi="advertory-brandmetrics-survey",Xi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Yi=()=>Ce(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Zi={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},eo={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},to=e=>(null==e?void 0:e.parent)?[...to(e.parent),e.shortPath||"unknown"]:[],no=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=to(e);return eo[n]||"ovrigaavdelningar"})(e)}_{position}`,io={aftonbladet:Zi},oo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:no(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:to(e).join(":")}}},ro=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},ao=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),so="se-generic",lo="aa-sch",co="kv_",uo="pause",po="{deviceType}",vo="{position}",go="afp_",ho=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),mo="1-1",yo="16-9",fo="3-4",wo="9-16",bo="responsive",Eo={[mo]:1,[yo]:1.78,[wo]:.56,[bo]:1},ko={[mo]:1,[yo]:1.78,[fo]:1.33,[wo]:.56},xo=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=ot.DESKTOP===n?dt:st,d=o.replace(po,a);return(e,n)=>{if(e===uo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(vo,uo).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&ho.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(po,a).replace(vo,e)}return d.replace(vo,e)}},Co=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},Io=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},To=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},So=()=>{const e=null!==(t=To()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=To()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Ao=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Oo=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield Pe(n,e.isApp,o,"video"))?"1":"0",l=yield Yi(),c=yield Xt(o),u=yield _e({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Co(ko,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Co(Eo,Number(m.toFixed(2))):bo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${lo}-country_code`]:o,[`${lo}-publisher`]:i,[`${lo}-supply_type`]:(y=e.deviceType,y===ot.DESKTOP?rt:at),[`kw_${lo}-page_type`]:"collection",[`${lo}-page_type`]:"collection",[`${so}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${so}-page`]:"index",[`${so}-page`]:"index",[`${so}-screenheight`]:String(window.screen.height),[`${so}-screenwidth`]:String(window.screen.width),[`${so}-viewportheight`]:String(a),[`${so}-viewportwidth`]:String(r),[`${so}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${so}-mobile-os`]:lt(),[`${so}-audience`]:void 0,[`${so}-externalid_src`]:So(),[`${so}-tags`]:e.tags,[`${so}-articleid`]:p,"article-id":p},yield At(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${so}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Ao()).some(e=>e.includes(co))&&(()=>{const e=Ao(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(co)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),Po=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],jo=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],_o=["external_uid","gdpr","gdpr_consent","eids","article-id"],Lo=(e,t)=>{const n=[...Po,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||_o.includes(e)?e:`kw_${e}`,t]))},$o=e=>Object.fromEntries(Object.entries(e).filter(([e])=>jo.includes(e))),No=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;io[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=io[e])&&void 0!==t?t:Zi})(e.publisher),d=(e=>{var t;return null!==(t=oo[e])&&void 0!==t?t:oo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:l,adsKeywords:yield Oo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Io(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:ro(e.startMode)}}),qo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=xo(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(go)?`${go}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":ao.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Lo(r,n)),$o(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Do=e=>t=>Ce(void 0,void 0,void 0,function*(){const n=yield No(e,t);return qo(n,e)}),Mo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},Fo={no:"NOK",se:"SEK"},Bo={no:"no",se:"sv"};class Ro{buildFetchObject(e,t,n,i){return Ce(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield Yi(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Mo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:E(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Bo[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield _e(i),ext:{consent:s.gdpr_consent||"",eids:Qt(o)}},at:1,cur:[Fo[o]],source:{tid:E(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ce(this,void 0,void 0,function*(){try{d("Starting fetching Studio ad from Xandr:",Xi);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${Xi}?${a.toString()}`:Xi,l=yield this.buildFetchObject(e,t,n,i),c=yield $t.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const zo=0,Uo=3,Vo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},Ho="finn-blink",Wo="native-ad",Ko=(e,t)=>{Go(e,t),Qo(e,t)},Go=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Yo(i)}),t.dataset.tracked="true")})},Jo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(Xo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Qo=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:ot.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Jo(e),c.disconnect();break}},s);c.observe(o)},Xo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Yo(e):window.navigator.sendBeacon(e)},Yo=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Zo=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),er=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void d(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},wi(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=z.getData("alertoryConfigKeywords"),v=null!==(i=c(Ui(e)).keywords)&&void 0!==i?i:{},g=new Ro,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===ot.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===zo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Uo&&(Vo(t.pageContext.publisher,l,Wo,t.pageContext.pageType),Ko({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),On(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),tr=(e,t)=>{e.forEach(e=>er(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},nr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},ir=e=>Ce(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ce(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield $t.get(t,{method:"GET",signal:n.signal})}catch(e){throw d("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,nr))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),or=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let rr,ar=[];const dr=["takeover","wallpaper"],sr=e=>{const t=(e=>{var t;const n=z.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y}=e,f=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:f})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y})}})(e);window.advertory={initialized:!0,version:"3.0.5",siteConfig:e,alertoryConfig:t}},lr=()=>Ce(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield Pe(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=z.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ki(e);z.setData("alertoryConfigKeywords",n)})(o.keywords),k(()=>rr.setPageOpts(o))}),cr=e=>Ce(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield Pe(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);ur(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield jn()):(d("core load tags invoked without prebid enabled"),pr(a))}),ur=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{d("core defineTags",{placement:e});const i=Ui(e);if(Vi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Wi(i),sizes:o}})(o);n.push(r),k(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),rr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},pr=e=>{const t=e.filter(({targetId:e})=>Vi(e)).map(({targetId:e})=>e);t.length&&k(()=>(d("core loadTags",{placementsIdsToLoad:t}),rr.loadTags([...t])))},vr=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];a&&(d("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield ki(a,null!=o?o:s)),a&&(null==r?void 0:r.scroll)&&(d("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),gr=e=>e.some(({targetId:e})=>dr.some(t=>e.includes(t))),hr=e=>Ce(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=X(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,..._i(d,n)]})(i);for(const e of o)gr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield cr(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield mr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ma});yield e(n)}}),mr=e=>Ce(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return d("lazy load is not enabled",{placements:e}),void(yield cr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{d("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&cr(e),d("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(d("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),yr=()=>Ce(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];k(()=>{rr.onEvent("adRequested",()=>{e.adRequested()}),rr.onEvent("adAvailable",o=>Ce(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:ar,adObj:o,isFullscreenScrollAd:se(o),isFinnBlink:me(o.targetId),isNativeAd:le(o),isMediation:Hi(o),isTakeoverAd:ue(o),isCollapseAd:ge(o),isWallpaperAd:ve(o)});const v=null===(s=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Hi(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),se(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Sn});e(o)}const{widescreenSwitching:g}=p.get();if(we(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return ba});e()}if(se(o)&&!me(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Sn});e(o,i)}if(!le(o)||Hi(o)||me(o.targetId)||null==t||t(o,p.get()),ue(o)&&!ge(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Ma});e(o.targetId),yield t(o)}if(ve(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return $});e(()=>k(()=>window.apntag.showTag(o.targetId)),n),z.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&z.setData("horseshoe",{isAvailable:!0}),nt({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=ar.find(({targetId:e})=>e===o.targetId);h&&(yield vr(h,o),ar=ar.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:ar,adObj:o,isFullscreenScrollAd:se(o),isFinnBlink:me(o.targetId),isNativeAd:le(o),isMediation:Hi(o),isTakeoverAd:ue(o),isCollapseAd:ge(o),isWallpaperAd:ve(o)})})),rr.onEvent("adLoaded",n=>Ce(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=p.get(),s=document.getElementById(n.targetId);if(me(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return ra});e(n)}if(o.includes(n.targetId)&&le(n)&&(null==t||t(n,p.get()),nt({adObj:n})),!o.includes(n.targetId)&&Hi(n)&&o.push(n.targetId),ge(n)&&F(n.targetId),ue(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Ma});e(rr,n.targetId)}if(ce(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Fa});e(n)}if((e=>ke(e,ee))(n)){const{scaleVerticalFullWidthAd:e}=yield Promise.resolve().then(function(){return Fa});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Oi({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&ji(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(z.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return $});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return vt});e(n),t(n)}e.adLoaded(n),An(n.targetId),s&&(s.classList.add(Pn),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:it(n)}}))})),rr.onEvent("adNoBid",t=>Ce(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return si});yield e(p.get(),t)}if(ue(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return et});yield e(t)}e.adNoBid(t)})),rr.onEvent("adError",(t,n)=>Ce(void 0,void 0,void 0,function*(){if(ue(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return et});yield e(n)}e.adError(t,n)})),rr.onEvent("adCollapse",()=>{e.adCollapse()}),rr.onEvent("adRequestFailure",t=>Ce(void 0,void 0,void 0,function*(){F(t.targetId),yield ai(p.get(),t),e.adRequestFailure(t)})),rr.onEvent("adBadRequest",t=>Ce(void 0,void 0,void 0,function*(){F(t.targetId),yield ai(p.get(),t),e.adBadRequest(t)})),rr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),rr.onEvent("adNoBidMediated",t=>Ce(void 0,void 0,void 0,function*(){yield ai(p.get(),t),e.adNoBidMediated(t)}))})}),fr=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield lr();const{clientSidePlacements:d,serverSidePlacements:s}=Zo(J(a));let l=d;return r&&(l=l.filter(e=>me(e.targetId))),tr(s,p.get()),l.length>0&&(ar=[...ar,...l.map(e=>Object.assign({},e))],Ni(l),Di(l),yield hr(l)),ar}),wr=(e,t)=>Ce(void 0,void 0,void 0,function*(){p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:n,kilkaya:i,rightColumnSplit:o,drEdition:r,finnBlink:a}=e;if(z.initialize(),window.addEventListener("message",fi,!1),rr=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=rr,d("Apn tag is set up on window"),yield Promise.allSettled([Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield Pe(e,t,n,"xandr-endpoint"))||rr.setEndpoint("ib.adnxs-simple.com",!0)}),Ce(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield Pe(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Yt(null==e?void 0:e.prebidUrl))}),Wt(e),Ce(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Yt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ce(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield Pe(t,n,i,"gpt-endpoint"))&&(yield Yt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ce(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield Yt(t),document.querySelector(`.${Qi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(Qi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),xt(),Ce(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Yt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==n?void 0:n.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Ra});yield e()}d("Libraries have been loaded and trackers have been set"),yield yr(),yield lr(),d("Page options have been set"),sr(e),d("Advertory is setup on window");const{clientSidePlacements:s,serverSidePlacements:l}=Zo(J());if(ar=s,tr(l,e),Ni(ar),Di(ar),yield hr(ar),d("Ads has been loaded",ar),di(e,ar),Gi(ar),null==a?void 0:a.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ma});yield t(e.finnBlink)}if(null==r?void 0:r.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return si});yield t(e)}if(null==o?void 0:o.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Qa});t(e.rightColumnSplit)}if(null==i?void 0:i.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return od});yield t(e)}}),br=(e,t)=>Ce(void 0,void 0,void 0,function*(){yield((e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield ir(e);yield ii(),yield Ji(o),yield Ji(r),d("TCF resolved successfully"),yield wr(a,t),d("Run function resolved successfully")}))(e,t)}),Er=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:E}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=E?E:""},t)},kr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},xr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(ht).includes(i);n&&r&&Vo(i,e,Wo,o)})(o,n),i())},Cr=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=kr(e.targetId,l))&&void 0!==i?i:c,p=bn[t.language||g.NO],v=Er(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);xr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Ko(e,t)})},Ir=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Cr(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Tr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in de)||window.innerWidth>=de[e]);return{[o]:i?a:r}},Sr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Ar=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},Or=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Pr=(e,t)=>Or(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},jr=e=>Or(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class _r{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ce(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ce(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Lr=9826;class $r{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===ot.MOBILE?"phone":ot.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ce(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ce(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return Le()}getExternalUid(){return Ce(this,void 0,void 0,function*(){return yield _e(p.get())})}isTrackingForbidden(){return Ce(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Lr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ce(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Nr=new $r,qr=Nr.prepare.bind(Nr);function Dr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=lt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Mr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Fr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Mr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Br extends $r{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Dr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Fr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Rr=new class extends Br{prepare(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=p.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,v=new _r;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(At(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Gt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Kt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},zr=Rr.prepare.bind(Rr);class Ur extends $r{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ce(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Dr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Vr=new class extends Ur{prepare(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=p.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new _r;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(At(p.get(),s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ce(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Gt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===je("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Kt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Hr=Vr.prepare.bind(Vr);fn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}'),fn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Wr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return rd}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},Kr={displayTemplates:{default:Wr.NATIVE_TEMPLATE},videoTemplates:{}},Gr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:d}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=or(i,o),a=Tr(e),d=Sr(n),s=Ar(),l=jr(i),c=Pr(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:s=!0}={}}=a,l=or(o,s),c=Tr(e),u=Sr(i),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),g=Ar(),m=jr(o),y=Pr(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new _r).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y})},preparePageOptions:e=>Ce(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Hr(e):zr(e):yield qr(e)}),siteEvents:gt,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Vn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:d}=null!=t?t:{},s={language:g.NO,publisher:ht.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Cr(e,s,Kr)}},Jr=((e,t)=>({init:n=>br(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:fr,getVideoPPIDs:Xt,createInitNativeAd:Ir,getVideoAdsConfig:Do}))(Gr,mt),Qr=fn("[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 Xr=Object.freeze({__proto__:null,default:Qr});fn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const Yr={Blink:"Blink"},Zr=new Map,ea=e=>{var t;if(!Zr.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Yr)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw Zr.delete(e),t});Zr.set(e,t)}return null!==(t=Zr.get(e))&&void 0!==t?t:Promise.resolve()},ta="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",na="https://www.finn.no/distribution-front/external/carousel",ia=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Vo(n,o,Ho,null!=t?t:i);nt({preferredTestIdData:{targetId:e,testId:"finn"}})},oa=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var ra=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();se(e)&&In(e,t),le(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ia,xandrAdLoaded:oa});const aa={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return d(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){d(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){d(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},da="finn_blink_id",sa=e=>Ce(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=xe(e,["userId","id","hashed_email","theme"]),a=window[Yr.Blink];if(!a)return;const d=new a({remote:na,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),la=e=>Ce(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=xe(e,["userId","theme"]),o=window[Yr.Blink];if(!o)return;const r=new o({remote:na,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ca=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ua=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ca(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},pa=(e,t,n)=>Ce(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();d(`rendering finn blink ad for ${e}`);const a=w(e),s=o[r].find(e=>e.targetId===a),l=ua(e,null==s?void 0:s.finnBlink);if(!(null==l?void 0:l.enabled))return d(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void oa(e);if((e=>{var t;const n=ca(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void d(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=Le();return null!=e?e:""}return e})(g),E="dark"===y?"dark":"light";try{const e=yield Ce(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=aa.get(da),n=N("finncode");if(!e||n)return"";if(!t){const t=yield $t.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return aa.set(da,n),n}return t}),t=yield Ce(void 0,void 0,void 0,function*(){const{ppid1:e}=Ht.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?la:sa;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:E,uuid:h})).then(()=>{ia(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),oa(e)}}),va=()=>Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield Pe(e,t,n,"finn-blink"))||(d("Skip loading finn blink ad due to missing TCF consent."),!1)}),ga=(e,t)=>{var n;(d(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):d(`Cannot perform afterend on: ${e.id}`)},ha=e=>document.querySelector(`#${e}`);var ma=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ce(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=ha(n);o&&(yield ki(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ce(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(d(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield va())||o)return n&&n(e),oa(e),void(!n&&F(e));try{yield ea(ta)}catch(e){console.error(e)}yield pa(e,t,n),i&&i()}),replaceAdsWithFinnBlink:e=>Ce(void 0,void 0,void 0,function*(){if(!e)return;const{replacementConfig:t}=e;if(!(oi()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void d(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);if(!(yield va()))return;yield ea(ta);const{adsToReplace:n,sizes:i}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Vo(t,i,Ho),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ga(n,i),n.dataset.finnBlinkId=t,bi().withFullAdsChain(e)})})});const ya=1e4,fa=e=>e.some(e=>e.some(e=>!!e&&$i(e,0)));let wa;var ba=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=ya,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=fa(o);if(!o.length)return;wa&&window.removeEventListener("scroll",wa);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=fa(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);wa=c,window.addEventListener("scroll",c)}});const Ea="#fff",ka="#0098da",xa=(e,t=!0)=>{(e===Ne||e===qe)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ca=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ia=e=>{document.body.style.overflow=e?"initial":"hidden"},Ta=e=>{const t=Aa(e),n=Sa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ia(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Sa=e=>{const t=()=>Ta(e);return window.addEventListener("advertory:closeTakeover",t),Ca(),t},Aa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ta(e)};return Ca(),window.addEventListener("keydown",t),t},Oa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Aa(e),Sa(e),Ca(),t.addEventListener("click",()=>{Ta(e)}),Ia(!1))},Pa=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Sa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},ja=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ta(e))})(e)},_a=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=bn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},La=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=bn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},$a=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=bn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Na=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=bn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},qa=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Da=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Ze})()`,e+t.outerHTML})(e)),n};var Ma=Object.freeze({__proto__:null,createTakeoverAd:e=>Ce(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Ge(e),a=o.offsetHeight,d=window.scrollY>a;o.style.display="block",!d&&xa(r,!1),((e,t)=>{({[Ne]:$a,[$e]:_a,[qe]:La,[De]:Na})[t](e)})(o,r),qa(),((e,t)=>{({[Ne]:Pa,[qe]:Pa,[$e]:Oa,[De]:ja})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[Ne]:()=>{const{buttonLabel:i}=Xe(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[$e]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Xe(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Ea,"important"),n.style.color=null!=t?t:ka}}})},[qe]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Xe(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[De]:()=>{}})[t]()})(o,r,t),yield Je(),!d&&xa(r,!0),Ye(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=rn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=rn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Da(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});var Fa=Object.freeze({__proto__:null,prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))},scaleVerticalFullWidthAd:e=>{var t;const n=document.querySelector(`#${e.targetId}`),i=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,o=null==n?void 0:n.querySelector("iframe"),r=null==o?void 0:o.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={}}=p.get();if(!(n&&o&&r&&i))return;i.classList.add(`advertory-${a}-${d}__vertical-full-width-ad-wrapper`);const s=window.innerWidth,l=Math.round(s/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${d}__vertical-full-width-ad`);const c=ct(e,n.offsetWidth);r.style.transform=`scale(${c})`,r.style.transformOrigin="left top"}});const Ba=e=>e===g.NO?"schibsted":"schibstedse";var Ra=Object.freeze({__proto__:null,getCampaign:Ba,loadNorstat:()=>Ce(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield Pe(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs(),r=(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ce(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ba(t)}/map/${r}`,"norstat")})});const za=".advertory-right-column-track",Ua="--advertory-right-column-track-height",Va=e=>e.getBoundingClientRect().top+window.scrollY,Ha=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Wa=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Ka=(e,t)=>`${e}-${t}`,Ga=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Va(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ha(e);Wa("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Va(e),o=Ka(Ua,t),r=i-n,a=Ka("--advertory-right-column-split-point-height",t),d=Ha(e);Wa(o,r),Wa(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ka("--advertory-right-column-ad-height",t),i=Ha(e);Wa(n,i)})(o[t])});((e,t)=>{const n=Va(e);Wa(Ua,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let Ja=!1;var Qa=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ja)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=za}=e,o=document.querySelector(i);if(!o)return;Ja=!0;const r=()=>{Ga(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class Xa{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]}}class Ya{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Za{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class ed extends Za{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const td="[data-k5a-teaser-analytics]",nd=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new ed(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(td);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(td);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class id{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[ht.VG]:new Xa}[n]||new Ya;nd(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(d(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}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:"";B(i)}loadKilkayaScript(e){return Ce(this,void 0,void 0,function*(){yield Yt(e)})}run(e){return Ce(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield Pe(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var od=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(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=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ce(void 0,void 0,void 0,function*(){const t=new id;yield t.run(e)})});fn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var rd=Object.freeze({__proto__:null});module.exports=Jr;
|
|
1
|
+
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editableConfiguration"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},d=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||s("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||s("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||s("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||s("pageContext.deviceType is required."),n||s("pageOptions is required."),i||s("placements is required."),(null==o?void 0:o.defaultThreshold)||s("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&s(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=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},b="0123456789abcdefghijklmnopqrstuvwxyz",E=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},k=e=>{window.apntag.anq.push(e)},x=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,P=e=>O.test(e),j=e=>e.startsWith("wallpaper:color:"),_=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var $=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:P,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:_});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("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")&&S())},B=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"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const z=new R,U=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=z.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),k(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=Q(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${E(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&z.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:d})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(d)},Q=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},X=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:s})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="VERTICAL_FULLWIDTH",te="FULLWIDTH",ne="TAKEOVER",ie="VELVET_TAKEOVER",oe="WALLPAPER",re="COLLAPSE",ae={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},de={wallpaper:1600,"l-format":1600},se=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&ke(e,Z)},le=e=>{const{native:t}=e;return!!t},ce=e=>ke(e,te),ue=e=>{const{targetId:t}=e;return t.includes("takeover")||ke(e,ne)},pe=e=>ke(e,ne),ve=e=>ke(e,oe),ge=e=>ke(e,re),he=e=>e.targetId.includes("sponsorstripe"),me=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},ye=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),fe=e=>e.targetId.startsWith("midboard"),we=e=>e.targetId.includes("widescreen"),be=e=>e.width>=1260&&e.width<=1280,Ee=e=>e.width>=1600&&e.width<=1620,ke=(e,t)=>{const n=ae[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})};function xe(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}function Ce(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Ie=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 d("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(d("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);d("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Te="cmp:loaded";let Se="undefined"!=typeof window?window._tcf_:void 0,Ae=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Ae)return null;if(!Se)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Se.getConsentedToAllSync();return d(`TCF consented to all is: ${t}`),Se.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),Se=window._tcf_,void e(Se);d("TCF consent manager is not available");const n=()=>{d("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Se=window._tcf_,e(Se)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Te,n),Ae=!0,t(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(Te,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ce(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ie(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Se)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(()=>{d("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Se.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Se.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},Pe=(e,t,n,...i)=>Ce(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`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}=Oe(e,0,n);return(yield o())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),je=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},_e=e=>Ce(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=je("_pulse2data");return r?r.split(",")[9]:void 0}),Le=()=>{const e=je("_pulse2data");return e?e.split(",")[2]:void 0},$e="splash",Ne="welcomePage",qe="topscroller",De="velvet",Me=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Fe="takeover-displayed",Be="takeover-visit-count",Re=14400,ze=()=>{const e=je(Be);return e?parseInt(e):0},Ue=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Re}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Be}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ve=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Fe;return"true"===je(n)})())&&(!t||He()))},He=()=>{const e=ze();return 0===e?(Ue(),!1):1===e},We=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ke=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Ge=e=>{const{width:t,height:n}=e;return We(t,n)?$e:ke(e,ie)?De:Ke()?qe:Ne},Je=()=>Ce(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Fe,cookieCapTime:n=Re}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield Pe(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return ue(e)&&i},Xe=(e,t)=>{var n;if(t===qe){const{topscroller:t}=e;return null!=t?t:{}}if(t===$e){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ye=(e,t)=>{t!==$e?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=pe(e)?"60svh":`calc(100svh - ${l}px)`,u=pe(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Ze=Me([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var et=Object.freeze({__proto__:null,addTakeoverCookie:Je,adjustTakeoverHeight:Ye,canDisplayTakeover:Ve,getProperWelcomePageConfig:Xe,getTakeoverVariant:Ge,handleTakeoverCookieOnAdNotShown:e=>Ce(void 0,void 0,void 0,function*(){Qe(e)&&(yield Je())}),incrementArticleVisitCount:Ue,isSplashVariant:We,isTopscroller:Ke,scaleAd:Ze,shouldAddTakeoverCookieForNotShownAd:Qe});const tt={nativeAd:e=>le(e)&&!he(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ce,fullscreenScroll:se,topscroller:e=>ue(e)&&Ke(),splash:e=>ue(e)&&We(e.width,e.height),welcomePage:ue,wallpaper:ve,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:be,hFormat:Ee,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ee(e)&&!be(e),topboard:e=>e.targetId.startsWith("topboard")&&!ue(e),widescreen:we,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:he,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!ye(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!fe(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:ye,midboard:fe},nt=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(tt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},it=e=>{var t;return(null===(t=Object.entries(tt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},ot={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},rt="web_desktop",at="web_phone",dt="wde",st="wph",lt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},ct=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ut=(e,t=window.screen.width,n,i)=>{const o=ct(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},pt=new Map;pt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),pt.set("panorama",{scale:.79,transformOrigin:"center center"}),pt.set("outstream",{scale:.79,transformOrigin:"center center"}),pt.set("integration",{scale:.79,transformOrigin:"center center"}),pt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var vt=Object.freeze({__proto__:null,calculateScaleFactor:ct,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:ut,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=it(e),o=pt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=p.get();if(!(null==d?void 0:d.enabled))return;if(ke(e,Z))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ut(e,(g<h?g:h)-u)}});const gt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{ut(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ht={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},mt={publisherClassName:ht.PENT,fullWidthFormatClassName:"netboard"},yt=864e5,ft=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return d("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=yt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=yt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),wt="glimrTags",bt=["glwe_","glwet_"],Et={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...e)=>Ce(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield Pe(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),xt=()=>Ce(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(null==e?void 0:e.enabled))return void d("No consent for glimr data fetching.");const t=yield(n=500,Ce(void 0,void 0,void 0,function*(){return yield Promise.race([Ce(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{ft.setWithTimestamp(wt,{tags:e,tagMappings:t}),n(!0)})})}catch(e){d(`Error during getting glimr data: ${e}`)}else d("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Ct={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},It=e=>bt.some(t=>e.startsWith(t)),Tt=e=>e.startsWith("glgc_"),St=e=>!It(e)&&!Tt(e),At=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Ot(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Ot=(e,t)=>{const n=Pt();if(!n)return Et;const i=((e=[])=>e.filter(It))(n),o=((e=[])=>e.filter(Tt))(n),r=((e=[],t,n)=>{var i;const o=e.filter(St);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=Ct[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Pt=()=>{const e=ft.getByTimestamp(wt);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},jt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),_t=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Lt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},$t={get:(e,t)=>Ce(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ce(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Nt="advertory:ppids-cache",qt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Dt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Mt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Ft={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Bt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Rt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},zt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Ut{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Vt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ce(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Ht=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ce(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=ft.get(Nt),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});ft.set(Nt,o)}hashPPIDs(e,t){return Ce(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield $t.post(t,n,e)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ce(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ce(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${zt[t]}:${n}`:null}))(t,n),o=yield(e=>Ce(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Wt=e=>Ce(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield Pe(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Vt.processPPIDs(t,null==n?void 0:n.timeout),Ht.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Kt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Ht.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).add(r,Bt[e]).add(a,Rt[e]).buildEids()}]}},Gt=()=>{const{ppid1:e,ppid2:t}=Vt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Jt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Ht.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).add(r,Bt[e]).add(a,Rt[e]).buildRyEids()}}]}}},Qt=e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs();return(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]).buildRyEids()},Xt=e=>Ce(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs(),r=(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Yt=(e,...t)=>Ce(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=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),Zt="advertory-fullscreen-scroll",en="advertory-fullscreen-scroll-wrapper",tn="fullscreen-scroll-in-screen",nn="in-screen",on=e=>e.includes("snoap.no"),rn=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},an=Me([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),dn=e=>{const t=Me([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},sn=[],ln={},cn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>un(e,i),{}),r=vn(e);o.observe(e),i&&(ln[r]=mn(e,null==t?void 0:t.options))},un=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=vn(e);n?(pn(i,n),gn(e,i,t)):(pn(i,n),hn(e,i,t))})},pn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},vn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},gn=(e,t,n)=>{e.classList.add(nn),document.body.classList.add(tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),sn.includes(t)||sn.push(t),n&&window.addEventListener("scroll",ln[t],{passive:!0})},hn=(e,t,n)=>{sn.includes(t)&&(n&&window.removeEventListener("scroll",ln[t]),document.body.classList.remove(tn),e.classList.remove(nn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},mn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&yn(e,r,o,0),a.length&&yn(e,a,o,40)}},yn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function fn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}fn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const wn="left",bn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let En=null;const kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${an})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(on(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=dn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>on(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),on(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),rn(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},xn=()=>{En=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Cn=()=>{En||(En=window.requestAnimationFrame(xn))},In=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a}}=p.get(),{targetId:d}=e,s=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==s?void 0:s.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:o="16px 0",beforeContentValue:r=""}=e,a=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${i} calc(50% - ${a}px),\n ${i} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${r&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${r}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(i=null==s?void 0:s.overlayStyles)&&void 0!==i?i:{});const l=document.getElementById(d),c=null==l?void 0:l.parentElement;if(!l||!c)return;cn(c,t),l.className=Zt,cn(c,t),l.className="advertory-fullscreen-scroll";const u=ke(e,Y)?"absolute":"fixed";l.style.position=u,c.className=en,c.dataset.showTagSubscribeId=d,l.setAttribute("data-ad-label",bn[a].adText),(null==s?void 0:s.cogwheelPosition)===wn&&(l.dataset.moveCogwheelToTheLeft="true"),Cn(),window.addEventListener("resize",Cn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",Cn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Cn)},Tn=e=>{if(!(null==e?void 0:e.classList.contains(Zt)))return;e.classList.remove(Zt),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(en))&&(t.classList.remove(en),t.classList.remove(nn))};var Sn=Object.freeze({__proto__:null,createFullscreenScrollAd:In,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=rn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=rn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:Tn});const An=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},On=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),An(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},Pn="ad-loaded",jn=()=>Ce(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),s=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=jt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=jt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=jt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=_t();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return d("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=_t();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const i=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};d("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Jt(n)),Lt(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Jt(n)),Lt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{_n(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const d=i(n),s=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(se(s)?(In(s,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(d)):(Tn(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(Pn),(null==r?void 0:r.creativeId)&&On(l,c,Number(null==r?void 0:r.creativeId)))}}),d("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{_n(e,r)},directRenderFn:()=>{}})})}),_n=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:d},p.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Ln=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},$n=["netboard","board"];class Nn{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:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return Ce(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=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:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:r,spid:a});try{d("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield $t.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let qn=class{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,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},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 Ce(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 Dn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):d("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Mn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ce(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void d(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(d("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Dn(a)):((null==s?void 0:s.itemId)&&r&&(d("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),Dn(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Dn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Dn(a))})}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:"";B(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}}class Fn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ce(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=n.device===ot.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Bn{constructor(e){this.strategy=e}handle(e,t){return Ce(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 Ce(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Yt(t)}catch(e){d("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ce(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 d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let Rn=class{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,n){return Ce(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ce(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class zn extends Rn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:i,clientName:o="",creativeId:r}={}}=t,{columnName:a,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:a,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:o,"spt:creativeId":r},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Un=class extends Rn{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,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=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:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,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,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=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:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Vn={FRONT:"front"},Hn=e=>Ce(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)))}))}),Wn={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 Ce(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Xr})})}})}};class Kn{handleVideo(e,t){return Ce(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ce(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 a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{Wn[e](l)});const c={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield Hn(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.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"]})}),u.once("PulseStats:ready",()=>Ce(this,void 0,void 0,function*(){const e=yield u.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===Vn.FRONT?"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 Gn="https://www.aftonbladet.se/video-player-extras/latest/";class Jn{handleVideo(e,t){return Ce(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:{[`${Gn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Gn}external-link.js`]:{name:"ExternalLink"}}};yield Hn(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")}getPulseObjectId(){return""}getPulsePageId(){return""}}const Qn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Xn{handleVideo(e,t){return Ce(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,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Qn(e)?e:{}),{provider:Object.assign(Object.assign({},Qn(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 Hn(a);d.once("PulseStats:ready",()=>Ce(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Yn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const Zn=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[ht.VG]:new qn,[ht.E24]:new Kn,[ht.AFTONBLADET]:new Jn,[ht.SVD]:new Xn}[o]||new Yn,s=new(a===g.SE?zn:Un)(n,d,r),l=new Nn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Fn(d,s),u=new Bn(d);return new Mn(l,c,u,s)},ei=()=>Ce(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 ti{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 Ce(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 d("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ce(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 ni=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=Zn(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ii=()=>Ce(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),oi=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},ri=[],ai=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:s,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield Pe(o,u,c,"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,s=r[o]||r.desktop,l=w(t.targetId),c=s.find(e=>e.targetId===l),u=$n.some(e=>l.startsWith(e)),p=ri.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(ri.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void d("Pulse has not been passed as a prop, aborting");const v=yield ei(),g=new ti(v),h=Zn({publisher:s,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),di=(e,t)=>{var n,i,o,r;if(!oi())return void d("Ad block not enabled, Dr. Edition backfills will not be rendered");d("Ad block is enabled, Dr. Edition backfills will be rendered");const a=null!==(r=null===(o=null===(i=null===(n=e.finnBlink)||void 0===n?void 0:n.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o.map(([e])=>e))&&void 0!==r?r:[],s=new IntersectionObserver((t,n)=>Ce(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield ai(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!a.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&s.observe(t)})};var si=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,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},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:Zn,handleDrEdition:e=>Ce(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Pe(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield ei(),i=new ti(n);ni({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)}),handleDrEditionBackfill:ai,handleDrEditionBackfillOnAdblock:di});const li="collapseAd",ci="hideAd",ui="resizeAd",pi="renderDrEditionFallback",vi="wallpaperImageUrl",gi="wallpaperColor",hi="velvet",mi=[ui,vi,gi,li,ci,pi,hi];let yi;const fi=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(P(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:vi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:gi,wallpaperColor:t}}if(e.startsWith(pi)){const t=e.split(":")[1];return{name:pi,targetId:t}}if(e.startsWith(li)||e.startsWith(ci)){const t=e.split(":")[1];return{name:li,targetId:t}}if(e.includes("name")&&mi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!mi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===hi&&d&&(d.includes("noScroll")&&(yi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==yi||yi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==li&&i!==ci||!o||F(o),i===ui&&o&&d&&Ln(o,d),i===pi&&o&&(F(o),ai(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&Ln(o,s,!0),i===vi&&r&&_(r),i===gi&&a&&L(a)},wi=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),bi=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),k(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ce(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ma});yield t(e,o,null)}),withFullAdsChain:e=>Ce(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ma});yield t(e,o,r,()=>Ce(void 0,void 0,void 0,function*(){if(!z.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return $});t(e)}))})}},Ei=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return me(t)&&i?(d(`loading finn blink ad for blink only placement for ${t}`),void bi().withFinnBlinkAd(t)):me(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void bi().withFullAdsChain(t)):void k(()=>(d("core showTag",{id:t}),e.showTag(t)))},ki=(e,t)=>Ce(void 0,void 0,void 0,function*(){yield x,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);d("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ei,e),wi(t));n.observe(e)}),xi=new Map,Ci=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Ii=".brandstudio-premium-content-widget",Ti=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Si=({adWrapper:e,placementContainer:t})=>{const n=Ti({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Ai=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Oi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ci.includes(n)&&Boolean(t.closest(Ii));const o=i?t.closest(Ii):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return Ai(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Ai(d):s.hasAttribute("style")&&Ai(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Pi=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=xi.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(xi.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Si({adWrapper:o,placementContainer:n}),k(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},ji=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,Pi,t,n),wi(300));i.observe(e)},_i=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Li=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),$i=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Ni=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Bi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},qi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;$i(o,r)&&i&&(U(i.targetId),n.length&&o.classList.remove(...n),Bi([i],t))}},Di=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Mi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&qi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),qi(e,!1,t))};n.persisted&&(Li()?window.addEventListener("scroll",i,{passive:!0}):qi(e,!1,t))})})(e,n))},Mi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Fi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Mi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Bi=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=_i(i,n);if(t)for(const t of e){const e=Fi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)k(()=>window.apntag.refresh(e))},Ri=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,zi=e=>`externalImpId:'${e}'`,Ui=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:s,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ve())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==qe):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Ri(a,c),allowedFormats:s,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(e=>{var t,n,i,o,r,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(d("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(d("Tracker state does not contain field pageViewId or it is empty"),""):(d("Tracker state is empty"),""):(d("Tracker is not configured in initAdvertory function"),"")})(i);n&&m&&(d("External Impression ID assigned to defineTag:",zi(m)),h.externalImpId=zi(m));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},Vi=e=>!e.includes("takeover")||Ve(),Hi=e=>{const{source:t}=e;return"csm"===t},Wi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Ki=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Gi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},Ji=(e,t)=>Ce(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});fn(".advertory-brandmetrics-survey{width:100%}");const Qi="advertory-brandmetrics-survey",Xi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Yi=()=>Ce(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Zi={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},eo={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},to=e=>(null==e?void 0:e.parent)?[...to(e.parent),e.shortPath||"unknown"]:[],no=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=to(e);return eo[n]||"ovrigaavdelningar"})(e)}_{position}`,io={aftonbladet:Zi},oo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:no(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:to(e).join(":")}}},ro=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},ao=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),so="se-generic",lo="aa-sch",co="kv_",uo="pause",po="{deviceType}",vo="{position}",go="afp_",ho=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),mo="1-1",yo="16-9",fo="3-4",wo="9-16",bo="responsive",Eo={[mo]:1,[yo]:1.78,[wo]:.56,[bo]:1},ko={[mo]:1,[yo]:1.78,[fo]:1.33,[wo]:.56},xo=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=ot.DESKTOP===n?dt:st,d=o.replace(po,a);return(e,n)=>{if(e===uo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(vo,uo).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&ho.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(po,a).replace(vo,e)}return d.replace(vo,e)}},Co=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},Io=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},To=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},So=()=>{const e=null!==(t=To()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=To()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Ao=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Oo=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield Pe(n,e.isApp,o,"video"))?"1":"0",l=yield Yi(),c=yield Xt(o),u=yield _e({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Co(ko,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Co(Eo,Number(m.toFixed(2))):bo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${lo}-country_code`]:o,[`${lo}-publisher`]:i,[`${lo}-supply_type`]:(y=e.deviceType,y===ot.DESKTOP?rt:at),[`kw_${lo}-page_type`]:"collection",[`${lo}-page_type`]:"collection",[`${so}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${so}-page`]:"index",[`${so}-page`]:"index",[`${so}-screenheight`]:String(window.screen.height),[`${so}-screenwidth`]:String(window.screen.width),[`${so}-viewportheight`]:String(a),[`${so}-viewportwidth`]:String(r),[`${so}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${so}-mobile-os`]:lt(),[`${so}-audience`]:void 0,[`${so}-externalid_src`]:So(),[`${so}-tags`]:e.tags,[`${so}-articleid`]:p,"article-id":p},yield At(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${so}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Ao()).some(e=>e.includes(co))&&(()=>{const e=Ao(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(co)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),Po=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],jo=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],_o=["external_uid","gdpr","gdpr_consent","eids","article-id"],Lo=(e,t)=>{const n=[...Po,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||_o.includes(e)?e:`kw_${e}`,t]))},$o=e=>Object.fromEntries(Object.entries(e).filter(([e])=>jo.includes(e))),No=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;io[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=io[e])&&void 0!==t?t:Zi})(e.publisher),d=(e=>{var t;return null!==(t=oo[e])&&void 0!==t?t:oo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:l,adsKeywords:yield Oo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Io(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:ro(e.startMode)}}),qo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=xo(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(go)?`${go}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":ao.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Lo(r,n)),$o(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Do=e=>t=>Ce(void 0,void 0,void 0,function*(){const n=yield No(e,t);return qo(n,e)}),Mo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},Fo={no:"NOK",se:"SEK"},Bo={no:"no",se:"sv"};class Ro{buildFetchObject(e,t,n,i){return Ce(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield Yi(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Mo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:E(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Bo[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield _e(i),ext:{consent:s.gdpr_consent||"",eids:Qt(o)}},at:1,cur:[Fo[o]],source:{tid:E(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ce(this,void 0,void 0,function*(){try{d("Starting fetching Studio ad from Xandr:",Xi);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${Xi}?${a.toString()}`:Xi,l=yield this.buildFetchObject(e,t,n,i),c=yield $t.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const zo=0,Uo=3,Vo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},Ho="finn-blink",Wo="native-ad",Ko=(e,t)=>{Go(e,t),Qo(e,t)},Go=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Yo(i)}),t.dataset.tracked="true")})},Jo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(Xo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Qo=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:ot.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Jo(e),c.disconnect();break}},s);c.observe(o)},Xo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Yo(e):window.navigator.sendBeacon(e)},Yo=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Zo=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),er=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void d(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},wi(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=z.getData("alertoryConfigKeywords"),v=null!==(i=c(Ui(e)).keywords)&&void 0!==i?i:{},g=new Ro,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===ot.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===zo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Uo&&(Vo(t.pageContext.publisher,l,Wo,t.pageContext.pageType),Ko({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),On(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),tr=(e,t)=>{e.forEach(e=>er(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},nr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},ir=e=>Ce(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ce(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield $t.get(t,{method:"GET",signal:n.signal})}catch(e){throw d("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,nr))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),or=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let rr,ar=[];const dr=["takeover","wallpaper"],sr=e=>{const t=(e=>{var t;const n=z.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y}=e,f=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:f})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y})}})(e);window.advertory={initialized:!0,version:"3.0.8",siteConfig:e,alertoryConfig:t}},lr=()=>Ce(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield Pe(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=z.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ki(e);z.setData("alertoryConfigKeywords",n)})(o.keywords),k(()=>rr.setPageOpts(o))}),cr=e=>Ce(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield Pe(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);ur(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield jn()):(d("core load tags invoked without prebid enabled"),pr(a))}),ur=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{d("core defineTags",{placement:e});const i=Ui(e);if(Vi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Wi(i),sizes:o}})(o);n.push(r),k(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),rr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},pr=e=>{const t=e.filter(({targetId:e})=>Vi(e)).map(({targetId:e})=>e);t.length&&k(()=>(d("core loadTags",{placementsIdsToLoad:t}),rr.loadTags([...t])))},vr=(e,t)=>Ce(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];a&&(d("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield ki(a,null!=o?o:s)),a&&(null==r?void 0:r.scroll)&&(d("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),gr=e=>e.some(({targetId:e})=>dr.some(t=>e.includes(t))),hr=e=>Ce(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=X(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,..._i(d,n)]})(i);for(const e of o)gr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield cr(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield mr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ma});yield e(n)}}),mr=e=>Ce(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return d("lazy load is not enabled",{placements:e}),void(yield cr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{d("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&cr(e),d("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(d("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),yr=()=>Ce(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];k(()=>{rr.onEvent("adRequested",()=>{e.adRequested()}),rr.onEvent("adAvailable",o=>Ce(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:ar,adObj:o,isFullscreenScrollAd:se(o),isFinnBlink:me(o.targetId),isNativeAd:le(o),isMediation:Hi(o),isTakeoverAd:ue(o),isCollapseAd:ge(o),isWallpaperAd:ve(o)});const v=null===(s=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Hi(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),se(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Sn});e(o)}const{widescreenSwitching:g}=p.get();if(we(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return ba});e()}if(se(o)&&!me(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Sn});e(o,i)}if(!le(o)||Hi(o)||me(o.targetId)||null==t||t(o,p.get()),ue(o)&&!ge(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Ma});e(o.targetId),yield t(o)}if(ve(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return $});e(()=>k(()=>window.apntag.showTag(o.targetId)),n),z.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&z.setData("horseshoe",{isAvailable:!0}),nt({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=ar.find(({targetId:e})=>e===o.targetId);h&&(yield vr(h,o),ar=ar.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:ar,adObj:o,isFullscreenScrollAd:se(o),isFinnBlink:me(o.targetId),isNativeAd:le(o),isMediation:Hi(o),isTakeoverAd:ue(o),isCollapseAd:ge(o),isWallpaperAd:ve(o)})})),rr.onEvent("adLoaded",n=>Ce(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=p.get(),s=document.getElementById(n.targetId);if(me(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return ra});e(n)}if(o.includes(n.targetId)&&le(n)&&(null==t||t(n,p.get()),nt({adObj:n})),!o.includes(n.targetId)&&Hi(n)&&o.push(n.targetId),ge(n)&&F(n.targetId),ue(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Ma});e(rr,n.targetId)}if(ce(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Fa});e(n)}if((e=>ke(e,ee))(n)){const{scaleVerticalFullWidthAd:e}=yield Promise.resolve().then(function(){return Fa});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Oi({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&ji(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(z.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return $});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return vt});e(n),t(n)}e.adLoaded(n),An(n.targetId),s&&(s.classList.add(Pn),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:it(n)}}))})),rr.onEvent("adNoBid",t=>Ce(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return si});yield e(p.get(),t)}if(ue(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return et});yield e(t)}e.adNoBid(t)})),rr.onEvent("adError",(t,n)=>Ce(void 0,void 0,void 0,function*(){if(ue(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return et});yield e(n)}e.adError(t,n)})),rr.onEvent("adCollapse",()=>{e.adCollapse()}),rr.onEvent("adRequestFailure",t=>Ce(void 0,void 0,void 0,function*(){F(t.targetId),yield ai(p.get(),t),e.adRequestFailure(t)})),rr.onEvent("adBadRequest",t=>Ce(void 0,void 0,void 0,function*(){F(t.targetId),yield ai(p.get(),t),e.adBadRequest(t)})),rr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),rr.onEvent("adNoBidMediated",t=>Ce(void 0,void 0,void 0,function*(){yield ai(p.get(),t),e.adNoBidMediated(t)}))})}),fr=(e,t)=>Ce(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield lr();const{clientSidePlacements:d,serverSidePlacements:s}=Zo(J(a));let l=d;return r&&(l=l.filter(e=>me(e.targetId))),tr(s,p.get()),l.length>0&&(ar=[...ar,...l.map(e=>Object.assign({},e))],Ni(l),Di(l),yield hr(l)),ar}),wr=(e,t)=>Ce(void 0,void 0,void 0,function*(){p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:n,kilkaya:i,rightColumnSplit:o,drEdition:r,finnBlink:a}=e;if(z.initialize(),window.addEventListener("message",fi,!1),rr=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=rr,d("Apn tag is set up on window"),yield Promise.allSettled([Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield Pe(e,t,n,"xandr-endpoint"))||rr.setEndpoint("ib.adnxs-simple.com",!0)}),Ce(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield Pe(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Yt(null==e?void 0:e.prebidUrl))}),Wt(e),Ce(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Yt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ce(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield Pe(t,n,i,"gpt-endpoint"))&&(yield Yt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ce(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield Yt(t),document.querySelector(`.${Qi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(Qi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),xt(),Ce(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Yt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==n?void 0:n.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Ra});yield e()}d("Libraries have been loaded and trackers have been set"),yield yr(),yield lr(),d("Page options have been set"),sr(e),d("Advertory is setup on window");const{clientSidePlacements:s,serverSidePlacements:l}=Zo(J());if(ar=s,tr(l,e),Ni(ar),Di(ar),yield hr(ar),d("Ads has been loaded",ar),di(e,ar),Gi(ar),null==a?void 0:a.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ma});yield t(e.finnBlink)}if(null==r?void 0:r.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return si});yield t(e)}if(null==o?void 0:o.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Qa});t(e.rightColumnSplit)}if(null==i?void 0:i.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return od});yield t(e)}}),br=(e,t)=>Ce(void 0,void 0,void 0,function*(){yield((e,t)=>Ce(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield ir(e);yield ii(),yield Ji(o),yield Ji(r),d("TCF resolved successfully"),yield wr(a,t),d("Run function resolved successfully")}))(e,t)}),Er=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:E}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=E?E:""},t)},kr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},xr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(ht).includes(i);n&&r&&Vo(i,e,Wo,o)})(o,n),i())},Cr=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=kr(e.targetId,l))&&void 0!==i?i:c,p=bn[t.language||g.NO],v=Er(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);xr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Ko(e,t)})},Ir=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Cr(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Tr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in de)||window.innerWidth>=de[e]);return{[o]:i?a:r}},Sr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Ar=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},Or=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Pr=(e,t)=>Or(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},jr=e=>Or(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class _r{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ce(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ce(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Lr=9826;class $r{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===ot.MOBILE?"phone":ot.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ce(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ce(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return Le()}getExternalUid(){return Ce(this,void 0,void 0,function*(){return yield _e(p.get())})}isTrackingForbidden(){return Ce(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Lr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ce(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Nr=new $r,qr=Nr.prepare.bind(Nr);function Dr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=lt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Mr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Fr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Mr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Br extends $r{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Dr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Fr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Rr=new class extends Br{prepare(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=p.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,v=new _r;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(At(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Gt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Kt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},zr=Rr.prepare.bind(Rr);class Ur extends $r{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=ot.DESKTOP}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ce(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Dr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Vr=new class extends Ur{prepare(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=p.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new _r;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(At(p.get(),s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ce(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Gt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===je("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Kt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Hr=Vr.prepare.bind(Vr);fn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}'),fn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Wr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return rd}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},Kr={displayTemplates:{default:Wr.NATIVE_TEMPLATE},videoTemplates:{}},Gr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:d}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=or(i,o),a=Tr(e),d=Sr(n),s=Ar(),l=jr(i),c=Pr(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:s=!0}={}}=a,l=or(o,s),c=Tr(e),u=Sr(i),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),g=Ar(),m=jr(o),y=Pr(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new _r).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y})},preparePageOptions:e=>Ce(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Hr(e):zr(e):yield qr(e)}),siteEvents:gt,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Vn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:d}=null!=t?t:{},s={language:g.NO,publisher:ht.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Cr(e,s,Kr)}},Jr=((e,t)=>({init:n=>br(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:fr,getVideoPPIDs:Xt,createInitNativeAd:Ir,getVideoAdsConfig:Do}))(Gr,mt),Qr=fn("[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 Xr=Object.freeze({__proto__:null,default:Qr});fn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const Yr={Blink:"Blink"},Zr=new Map,ea=e=>{var t;if(!Zr.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Yr)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw Zr.delete(e),t});Zr.set(e,t)}return null!==(t=Zr.get(e))&&void 0!==t?t:Promise.resolve()},ta="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",na="https://www.finn.no/distribution-front/external/carousel",ia=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Vo(n,o,Ho,null!=t?t:i);nt({preferredTestIdData:{targetId:e,testId:"finn"}})},oa=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var ra=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();se(e)&&In(e,t),le(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ia,xandrAdLoaded:oa});const aa={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return d(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){d(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){d(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},da="finn_blink_id",sa=e=>Ce(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=xe(e,["userId","id","hashed_email","theme"]),a=window[Yr.Blink];if(!a)return;const d=new a({remote:na,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),la=e=>Ce(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=xe(e,["userId","theme"]),o=window[Yr.Blink];if(!o)return;const r=new o({remote:na,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ca=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ua=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ca(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},pa=(e,t,n)=>Ce(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();d(`rendering finn blink ad for ${e}`);const a=w(e),s=o[r].find(e=>e.targetId===a),l=ua(e,null==s?void 0:s.finnBlink);if(!(null==l?void 0:l.enabled))return d(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void oa(e);if((e=>{var t;const n=ca(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void d(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=Le();return null!=e?e:""}return e})(g),E="dark"===y?"dark":"light";try{const e=yield Ce(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=aa.get(da),n=N("finncode");if(!e||n)return"";if(!t){const t=yield $t.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return aa.set(da,n),n}return t}),t=yield Ce(void 0,void 0,void 0,function*(){const{ppid1:e}=Ht.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?la:sa;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:E,uuid:h})).then(()=>{ia(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),oa(e)}}),va=()=>Ce(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield Pe(e,t,n,"finn-blink"))||(d("Skip loading finn blink ad due to missing TCF consent."),!1)}),ga=(e,t)=>{var n;(d(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):d(`Cannot perform afterend on: ${e.id}`)},ha=e=>document.querySelector(`#${e}`);var ma=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ce(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=ha(n);o&&(yield ki(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ce(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(d(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield va())||o)return n&&n(e),oa(e),void(!n&&F(e));try{yield ea(ta)}catch(e){console.error(e)}yield pa(e,t,n),i&&i()}),replaceAdsWithFinnBlink:e=>Ce(void 0,void 0,void 0,function*(){if(!e)return;const{replacementConfig:t}=e;if(!(oi()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void d(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);if(!(yield va()))return;yield ea(ta);const{adsToReplace:n,sizes:i}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Vo(t,i,Ho),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ga(n,i),n.dataset.finnBlinkId=t,bi().withFullAdsChain(e)})})});const ya=1e4,fa=e=>e.some(e=>e.some(e=>!!e&&$i(e,0)));let wa;var ba=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=ya,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=fa(o);if(!o.length)return;wa&&window.removeEventListener("scroll",wa);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=fa(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);wa=c,window.addEventListener("scroll",c)}});const Ea="#fff",ka="#0098da",xa=(e,t=!0)=>{(e===Ne||e===qe)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ca=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ia=e=>{document.body.style.overflow=e?"initial":"hidden"},Ta=e=>{const t=Aa(e),n=Sa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ia(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Sa=e=>{const t=()=>Ta(e);return window.addEventListener("advertory:closeTakeover",t),Ca(),t},Aa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ta(e)};return Ca(),window.addEventListener("keydown",t),t},Oa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Aa(e),Sa(e),Ca(),t.addEventListener("click",()=>{Ta(e)}),Ia(!1))},Pa=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Sa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},ja=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ta(e))})(e)},_a=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=bn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},La=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=bn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},$a=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=bn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Na=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=bn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},qa=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Da=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Ze})()`,e+t.outerHTML})(e)),n};var Ma=Object.freeze({__proto__:null,createTakeoverAd:e=>Ce(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Ge(e),a=o.offsetHeight,d=window.scrollY>a;o.style.display="block",!d&&xa(r,!1),((e,t)=>{({[Ne]:$a,[$e]:_a,[qe]:La,[De]:Na})[t](e)})(o,r),qa(),((e,t)=>{({[Ne]:Pa,[qe]:Pa,[$e]:Oa,[De]:ja})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[Ne]:()=>{const{buttonLabel:i}=Xe(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[$e]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Xe(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Ea,"important"),n.style.color=null!=t?t:ka}}})},[qe]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Xe(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[De]:()=>{}})[t]()})(o,r,t),yield Je(),!d&&xa(r,!0),Ye(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=rn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=rn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Da(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});var Fa=Object.freeze({__proto__:null,prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))},scaleVerticalFullWidthAd:e=>{var t;const n=document.querySelector(`#${e.targetId}`),i=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,o=null==n?void 0:n.querySelector("iframe"),r=null==o?void 0:o.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={}}=p.get();if(!(n&&o&&r&&i))return;i.classList.add(`advertory-${a}-${d}__vertical-full-width-ad-wrapper`);const s=window.innerWidth,l=Math.round(s/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${d}__vertical-full-width-ad`);const c=ct(e,n.offsetWidth);r.style.transform=`scale(${c})`,r.style.transformOrigin="left top"}});const Ba=e=>e===g.NO?"schibsted":"schibstedse";var Ra=Object.freeze({__proto__:null,getCampaign:Ba,loadNorstat:()=>Ce(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield Pe(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Vt.getPPIDs(),{ppid1:i,ppid2:o}=Ht.getPPIDs(),r=(new Ut).add(n,qt[e]).add(t,Dt[e]).add(o,Mt[e]).add(i,Ft[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ce(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ba(t)}/map/${r}`,"norstat")})});const za=".advertory-right-column-track",Ua="--advertory-right-column-track-height",Va=e=>e.getBoundingClientRect().top+window.scrollY,Ha=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Wa=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Ka=(e,t)=>`${e}-${t}`,Ga=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Va(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ha(e);Wa("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Va(e),o=Ka(Ua,t),r=i-n,a=Ka("--advertory-right-column-split-point-height",t),d=Ha(e);Wa(o,r),Wa(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ka("--advertory-right-column-ad-height",t),i=Ha(e);Wa(n,i)})(o[t])});((e,t)=>{const n=Va(e);Wa(Ua,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let Ja=!1;var Qa=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ja)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=za}=e,o=document.querySelector(i);if(!o)return;Ja=!0;const r=()=>{Ga(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class Xa{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]}}class Ya{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Za{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return Ce(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class ed extends Za{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const td="[data-k5a-teaser-analytics]",nd=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new ed(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(td);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(td);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class id{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[ht.VG]:new Xa}[n]||new Ya;nd(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(d(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}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:"";B(i)}loadKilkayaScript(e){return Ce(this,void 0,void 0,function*(){yield Yt(e)})}run(e){return Ce(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield Pe(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var od=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(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=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ce(void 0,void 0,void 0,function*(){const t=new id;yield t.run(e)})});fn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var rd=Object.freeze({__proto__:null});module.exports=Jr;
|