@schibsted/advertory 3.4.14 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/ad-native/cjs/index.d.ts +5 -0
  2. package/ad-native/cjs/index.js +1 -1
  3. package/ad-native/es/index.d.ts +5 -0
  4. package/ad-native/es/index.js +1 -1
  5. package/aftenposten/cjs/index.d.ts +5 -0
  6. package/aftenposten/cjs/index.js +1 -1
  7. package/aftenposten/es/_auto-entry_aftenposten-KOEDRGMj.js +1 -0
  8. package/aftenposten/es/{events-aNNPNIqz.js → events-BdUUv4z9.js} +1 -1
  9. package/aftenposten/es/{index-R-_EwTMJ.js → index-B0GbVMVf.js} +1 -1
  10. package/aftenposten/es/{index-YhGb4swR.js → index-C_ljmtA9.js} +1 -1
  11. package/aftenposten/es/{index-DKswyaY6.js → index-ChQz2fSU.js} +1 -1
  12. package/aftenposten/es/{index-GljCR_Yl.js → index-DKtW-pTb.js} +1 -1
  13. package/aftenposten/es/{index-DiTRkWxo.js → index-DapT0kRB.js} +1 -1
  14. package/aftenposten/es/{index-CGWeMiyd.js → index-DkhtWF8d.js} +1 -1
  15. package/aftenposten/es/{index-Celgx891.js → index-cS_ROIVL.js} +1 -1
  16. package/aftenposten/es/{index-C0GWciD3.js → index-pwlm_8K9.js} +1 -1
  17. package/aftenposten/es/index.d.ts +5 -0
  18. package/aftenposten/es/index.js +1 -1
  19. package/aftenposten/es/{styles-ztiWgibq.js → styles-B8dOeQvd.js} +1 -1
  20. package/aftenposten/es/{styles-DBMUr5Jo.js → styles-BQ-lJJ7T.js} +1 -1
  21. package/aftenposten/es/{styles-Bo8FUe1n.js → styles-C8Zgiulr.js} +1 -1
  22. package/aftenposten/es/{styles-BfpczqmL.js → styles-Cf0KXpQR.js} +1 -1
  23. package/aftenposten/es/{styles-DEM3Gi4L.js → styles-CvqBpTZq.js} +1 -1
  24. package/aftenposten/es/{styles-Blfzermq.js → styles-Dd4NzezP.js} +1 -1
  25. package/aftenposten/es/{styles-CuY2GV3h.js → styles-Dmx2lehx.js} +1 -1
  26. package/aftenposten/es/{styles-1J1dVECT.js → styles-R1ul5aQy.js} +1 -1
  27. package/aftenposten/es/{styles-BB2SvrTn.js → styles-e0EN2V-x.js} +1 -1
  28. package/aftenposten/es/{styles-PAkuxweI.js → styles-poVB2pbH.js} +1 -1
  29. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-B5bkdkn2.js +1 -0
  30. package/aftenpostenv2/es/{events-VvzSMsl7.js → events-DcWIew6H.js} +1 -1
  31. package/aftenpostenv2/es/{index-D-wLI-V3.js → index-AopMILqF.js} +1 -1
  32. package/aftenpostenv2/es/{index-LsjimNAy.js → index-C7WYLENT.js} +1 -1
  33. package/aftenpostenv2/es/{index-CfiF-crx.js → index-CcSUoH4K.js} +1 -1
  34. package/aftenpostenv2/es/{index-BT7e8g0Z.js → index-CrKzCfAy.js} +1 -1
  35. package/aftenpostenv2/es/{index-iU3UTSv8.js → index-DF_5taAR.js} +1 -1
  36. package/aftenpostenv2/es/{index-BzptQywS.js → index-DZzhmxxW.js} +1 -1
  37. package/aftenpostenv2/es/{index-BnCsGsiy.js → index-Dcvv755W.js} +1 -1
  38. package/aftenpostenv2/es/{index-DBsl_S5J.js → index-lNsi3PkQ.js} +1 -1
  39. package/aftenpostenv2/es/index.d.ts +5 -0
  40. package/aftenpostenv2/es/index.js +1 -1
  41. package/aftenpostenv2/es/{styles-CbL4pB-1.js → styles-BAw6-DTz.js} +1 -1
  42. package/aftenpostenv2/es/{styles-Ci9J7jKv.js → styles-BDLsV2h0.js} +1 -1
  43. package/aftenpostenv2/es/{styles-Dg9pvL6a.js → styles-BM1Sl2Gt.js} +1 -1
  44. package/aftenpostenv2/es/{styles-D08iDSOO.js → styles-Bj5ghS1X.js} +1 -1
  45. package/aftenpostenv2/es/{styles-DynezWrn.js → styles-BtZEv20p.js} +1 -1
  46. package/aftenpostenv2/es/{styles-CAdaLqhC.js → styles-CIIzxpxi.js} +1 -1
  47. package/aftenpostenv2/es/{styles-CEK4LgyA.js → styles-DE8b2eKw.js} +1 -1
  48. package/aftenpostenv2/es/{styles-BooZMo4j.js → styles-DJS8FgJN.js} +1 -1
  49. package/aftenpostenv2/es/{styles-Te_pNEb0.js → styles-IW7sRlQb.js} +1 -1
  50. package/aftenpostenv2/es/{styles-ChnqRzhg.js → styles-P6wiFv7t.js} +1 -1
  51. package/aftonbladet/cjs/index.d.ts +5 -0
  52. package/aftonbladet/cjs/index.js +1 -1
  53. package/aftonbladet/es/_auto-entry_aftonbladet-Czkvey-5.js +1 -0
  54. package/aftonbladet/es/{events-Crg3L5_c.js → events-IGtjvn9p.js} +1 -1
  55. package/aftonbladet/es/{index-CyMfmkio.js → index-BJEVa6xU.js} +1 -1
  56. package/aftonbladet/es/{index-CrfNDcKV.js → index-BhKqdx8_.js} +1 -1
  57. package/aftonbladet/es/{index-DVhUFIWV.js → index-CHU0K-b3.js} +1 -1
  58. package/aftonbladet/es/{index-ByNCqWG8.js → index-CWKXxJLi.js} +1 -1
  59. package/aftonbladet/es/{index-Bobb62Hm.js → index-Caooy7VZ.js} +1 -1
  60. package/aftonbladet/es/{index-B1L0P1wI.js → index-CxookX-2.js} +1 -1
  61. package/aftonbladet/es/{index-D4x98Sy_.js → index-D3BbAZHM.js} +1 -1
  62. package/aftonbladet/es/{index-gy_UT4eF.js → index-D6pMj_OI.js} +1 -1
  63. package/aftonbladet/es/index.d.ts +5 -0
  64. package/aftonbladet/es/index.js +1 -1
  65. package/aftonbladet/es/{styles-7ca24lPW.js → styles-B_1G3J8x.js} +1 -1
  66. package/aftonbladet/es/{styles-r32kR33X.js → styles-BbdwnbjB.js} +1 -1
  67. package/aftonbladet/es/{styles-4FPciXKr.js → styles-CneLnMG-.js} +1 -1
  68. package/aftonbladet/es/{styles-_3OqNUti.js → styles-DYVEy61p.js} +1 -1
  69. package/aftonbladet/es/{styles-eU2MLwjj.js → styles-l3rELDcP.js} +1 -1
  70. package/aftonbladet/es/{styles-CWd0qunX.js → styles-vt9VlFI1.js} +1 -1
  71. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CI9xcMRh.js +1 -0
  72. package/aftonbladetv2/es/{events-C7hVJNRc.js → events-DUSi9AAZ.js} +1 -1
  73. package/aftonbladetv2/es/{index-BzWc5vHd.js → index-BLCl5ZdU.js} +1 -1
  74. package/aftonbladetv2/es/{index-7JuA3m3Q.js → index-Bcz4aUWR.js} +1 -1
  75. package/aftonbladetv2/es/{index-3bjoIdXb.js → index-CZlvEwnW.js} +1 -1
  76. package/aftonbladetv2/es/{index-DUK2MbMc.js → index-CdYhVWhS.js} +1 -1
  77. package/aftonbladetv2/es/{index-D-111ysD.js → index-ChmNC_fC.js} +1 -1
  78. package/aftonbladetv2/es/{index-myD5LMzf.js → index-DfBkkkvU.js} +1 -1
  79. package/aftonbladetv2/es/{index-DttZBtcH.js → index-GJk0lNdn.js} +1 -1
  80. package/aftonbladetv2/es/{index-CuuWwcD4.js → index-Jfir0E9v.js} +1 -1
  81. package/aftonbladetv2/es/index.d.ts +5 -0
  82. package/aftonbladetv2/es/index.js +1 -1
  83. package/aftonbladetv2/es/{styles-DK83RzaC.js → styles-BW540-He.js} +1 -1
  84. package/aftonbladetv2/es/{styles-CYWNLpOe.js → styles-C2EUpfcA.js} +1 -1
  85. package/aftonbladetv2/es/{styles-CgfgGfFC.js → styles-CGV7U9oK.js} +1 -1
  86. package/aftonbladetv2/es/{styles-B0JWyUDb.js → styles-CTR9osUQ.js} +1 -1
  87. package/aftonbladetv2/es/{styles-JlDcWbZV.js → styles-Ckoizx2L.js} +1 -1
  88. package/aftonbladetv2/es/{styles-CTVusyII.js → styles-D8Ya94d4.js} +1 -1
  89. package/bt/cjs/index.d.ts +5 -0
  90. package/bt/cjs/index.js +1 -1
  91. package/bt/es/_auto-entry_bt-CI6IkXgn.js +1 -0
  92. package/bt/es/{events-Cde2i6dy.js → events-e79PURVK.js} +1 -1
  93. package/bt/es/{index-LjfBD_xy.js → index-B4efIi6B.js} +1 -1
  94. package/bt/es/{index-Bt3KxlOO.js → index-BCITuOKt.js} +1 -1
  95. package/bt/es/{index-DGWOOPcW.js → index-Ble0HNAL.js} +1 -1
  96. package/bt/es/{index-DCFEAOKQ.js → index-Br2GZL3S.js} +1 -1
  97. package/bt/es/{index-BHn9ynLP.js → index-CfGTqWHB.js} +1 -1
  98. package/{sa/es/index-CFDGnu0F.js → bt/es/index-DkfBi2Yr.js} +1 -1
  99. package/bt/es/{index-BeTyrZf3.js → index-VicIknhs.js} +1 -1
  100. package/{sa/es/index-ClURBZHT.js → bt/es/index-q6gQRPQi.js} +1 -1
  101. package/bt/es/index.d.ts +5 -0
  102. package/bt/es/index.js +1 -1
  103. package/bt/es/{styles-BfRFHwVs.js → styles-1fY0S9gh.js} +1 -1
  104. package/bt/es/{styles-C_4XMT-G.js → styles-BQ6Zagkv.js} +1 -1
  105. package/bt/es/{styles-SVz6chgd.js → styles-BRkymHpC.js} +1 -1
  106. package/{sa/es/styles-BNr1wnJP.js → bt/es/styles-C6Hn-Ylj.js} +1 -1
  107. package/bt/es/{styles-DRJ2KyA3.js → styles-DDXhGRHY.js} +1 -1
  108. package/{sa/es/styles-Bz__iovu.js → bt/es/styles-DNutfDj8.js} +1 -1
  109. package/bt/es/{styles-SO94Mupz.js → styles-DbidWe0Z.js} +1 -1
  110. package/bt/es/{styles-8d9uM6fs.js → styles-UB5Sj-JP.js} +1 -1
  111. package/bt/es/{styles-CcNwWif0.js → styles-V6NyO8CO.js} +1 -1
  112. package/btv2/es/_auto-entry_btv2-Byn2KJna.js +1 -0
  113. package/btv2/es/{events-CCT83Nij.js → events-DWbA1yJI.js} +1 -1
  114. package/btv2/es/{index-Ct5dvsuS.js → index-CMIm7eJa.js} +1 -1
  115. package/btv2/es/{index-pgTzQGZK.js → index-CbKhLQ71.js} +1 -1
  116. package/btv2/es/{index-C5tXlI-6.js → index-CmYG9TmN.js} +1 -1
  117. package/btv2/es/{index-BHvGK5b6.js → index-D-VoD7Rn.js} +1 -1
  118. package/btv2/es/{index-7Ez_Ronh.js → index-D95XQOb1.js} +1 -1
  119. package/btv2/es/{index-C7gvPO7W.js → index-DShbLut5.js} +1 -1
  120. package/btv2/es/{index-BHOfxyyp.js → index-Dc3aKlrr.js} +1 -1
  121. package/btv2/es/{index-MrzR8hOq.js → index-DllNqk9Z.js} +1 -1
  122. package/btv2/es/index.d.ts +5 -0
  123. package/btv2/es/index.js +1 -1
  124. package/{vgv2/es/styles-CLpzB4TP.js → btv2/es/styles--PBvFHeQ.js} +1 -1
  125. package/{vgv2/es/styles-uRcDFP1H.js → btv2/es/styles-BFs5C1e2.js} +1 -1
  126. package/{sav2/es/styles-l-8lIA-0.js → btv2/es/styles-BIeAmWTL.js} +1 -1
  127. package/btv2/es/{styles-CMzhWGxU.js → styles-Beb5i1JJ.js} +1 -1
  128. package/btv2/es/{styles-KxHIpCeb.js → styles-CzOVz7GX.js} +1 -1
  129. package/{sav2/es/styles-B0lS7d1J.js → btv2/es/styles-DjvA7hfT.js} +1 -1
  130. package/{sav2/es/styles-B4-CHFMj.js → btv2/es/styles-es1ee8SC.js} +1 -1
  131. package/{sav2/es/styles-AZhdSm8U.js → btv2/es/styles-kWtSX6kZ.js} +1 -1
  132. package/dr-edition/cjs/index.d.ts +5 -1
  133. package/dr-edition/cjs/index.js +1 -1
  134. package/dr-edition/es/index.d.ts +5 -1
  135. package/dr-edition/es/index.js +1 -1
  136. package/e24/es/_auto-entry_e24-Chx1wkKd.js +1 -0
  137. package/e24/es/{events-C7lcFBm7.js → events-8oWxK8Fm.js} +1 -1
  138. package/e24/es/{index-HsI1zISB.js → index-7zdjryBD.js} +1 -1
  139. package/e24/es/{index-BfVWJtjH.js → index-B4CZvSXL.js} +1 -1
  140. package/e24/es/{index-KfmbuDFv.js → index-BJWHHKPL.js} +1 -1
  141. package/e24/es/{index-AkgArUou.js → index-BUkXE3O2.js} +1 -1
  142. package/e24/es/{index-Cc0xxQD8.js → index-DG1bJJNc.js} +1 -1
  143. package/e24/es/{index-BaVeOvRN.js → index-DGv329Av.js} +1 -1
  144. package/e24/es/{index-BfjKelU3.js → index-Oewlw7Sn.js} +1 -1
  145. package/{tv4/es/index-CeRWWVnw.js → e24/es/index-fEZDTay_.js} +1 -1
  146. package/e24/es/index.d.ts +5 -0
  147. package/e24/es/index.js +1 -1
  148. package/e24/es/{styles-CT29VQHg.js → styles-BQNdcZSJ.js} +1 -1
  149. package/e24/es/{styles-CNyrqPLq.js → styles-CLbzPfFd.js} +1 -1
  150. package/e24/es/{styles-CHMD6Bqh.js → styles-CcOkuOfr.js} +1 -1
  151. package/e24/es/{styles-DSyXEM0K.js → styles-D-IZsxVS.js} +1 -1
  152. package/e24/es/{styles-C9DG7Usb.js → styles-D7k76BFk.js} +1 -1
  153. package/e24/es/{styles-CtnIzp2j.js → styles-Dbpp0W0o.js} +1 -1
  154. package/e24/es/{styles-DvC11JEH.js → styles-Dieie13I.js} +1 -1
  155. package/e24/es/{styles-BdU3EKpj.js → styles-DjQsLdnn.js} +1 -1
  156. package/{tv4/es/styles-CFq95Psg.js → e24/es/styles-IKoxXgO0.js} +1 -1
  157. package/e24/es/{styles-CCG3z8rI.js → styles-NQUQlHqi.js} +1 -1
  158. package/e24/es/{styles-CIGC9QQN.js → styles-VEo6IZcm.js} +1 -1
  159. package/editory/cjs/index.d.ts +644 -0
  160. package/editory/cjs/index.js +1 -0
  161. package/editory/es/index.d.ts +644 -0
  162. package/editory/es/index.js +1 -0
  163. package/fotbollskanalen/cjs/index.d.ts +5 -0
  164. package/fotbollskanalen/cjs/index.js +1 -1
  165. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-BjtGQ3_l.js +1 -0
  166. package/fotbollskanalen/es/{events-BWA-2thH.js → events-FpRT23ZZ.js} +1 -1
  167. package/fotbollskanalen/es/{index-CWTaJpBa.js → index-B5NH2IkJ.js} +1 -1
  168. package/fotbollskanalen/es/{index-B8j2m66Z.js → index-BHG4pc98.js} +1 -1
  169. package/fotbollskanalen/es/{index-DVYZ3NYl.js → index-BUPmcSlI.js} +1 -1
  170. package/fotbollskanalen/es/{index-BwbYIEOX.js → index-Byq7YtvA.js} +1 -1
  171. package/fotbollskanalen/es/{index-V5FBDx0k.js → index-CFC2qCZk.js} +1 -1
  172. package/fotbollskanalen/es/{index-1gBV8-hR.js → index-DDGOVmpS.js} +1 -1
  173. package/fotbollskanalen/es/{index-3djT3sHR.js → index-DxE0VElJ.js} +1 -1
  174. package/fotbollskanalen/es/{index-B-_ubU0_.js → index-g58X-f96.js} +1 -1
  175. package/fotbollskanalen/es/index.d.ts +5 -0
  176. package/fotbollskanalen/es/index.js +1 -1
  177. package/fotbollskanalen/es/{styles-0JAjVhsb.js → styles-CLQOoJGF.js} +1 -1
  178. package/godt/cjs/index.d.ts +5 -0
  179. package/godt/cjs/index.js +1 -1
  180. package/kilkaya/cjs/index.d.ts +4 -0
  181. package/kilkaya/es/index.d.ts +4 -0
  182. package/klart/cjs/index.d.ts +5 -0
  183. package/klart/cjs/index.js +1 -1
  184. package/koket/cjs/index.d.ts +5 -0
  185. package/koket/cjs/index.js +1 -1
  186. package/koket/es/_auto-entry_koket-B2WlSuMx.js +1 -0
  187. package/koket/es/{events-DhH916KC.js → events-C5iJPAr5.js} +1 -1
  188. package/koket/es/{index-DZzMpwTx.js → index-8lrNvRkU.js} +1 -1
  189. package/koket/es/{index-BYEYg5n6.js → index-BTa20fDA.js} +1 -1
  190. package/koket/es/{index-DHTr3or4.js → index-BeO4rcvy.js} +1 -1
  191. package/koket/es/{index-bAd1NCOu.js → index-BhiCfvRb.js} +1 -1
  192. package/koket/es/{index-Bu6TB0DP.js → index-CFuuJHk_.js} +1 -1
  193. package/koket/es/{index-eMen7DRS.js → index-CUnZcQ5_.js} +1 -1
  194. package/{svdv2/es/index-CbGdqBCP.js → koket/es/index-DFkHEsQ5.js} +1 -1
  195. package/koket/es/{index-DTtS6hyT.js → index-G9hUyJfl.js} +1 -1
  196. package/koket/es/index.d.ts +5 -0
  197. package/koket/es/index.js +1 -1
  198. package/{svdv2/es/styles-9t16wRK2.js → koket/es/styles-BQIPgsRh.js} +1 -1
  199. package/minmote/cjs/index.d.ts +5 -0
  200. package/minmote/cjs/index.js +1 -1
  201. package/package.json +10 -1
  202. package/pent/cjs/index.d.ts +5 -0
  203. package/pent/cjs/index.js +1 -1
  204. package/sa/cjs/index.d.ts +5 -0
  205. package/sa/cjs/index.js +1 -1
  206. package/sa/es/_auto-entry_sa-DR1Eak8R.js +1 -0
  207. package/sa/es/{events-DmkSNbn4.js → events-Czp1Bf7L.js} +1 -1
  208. package/sa/es/{index-BKdF7HJV.js → index-B6QpNnPz.js} +1 -1
  209. package/sa/es/{index-DlfjcCfo.js → index-BK2Woo0V.js} +1 -1
  210. package/sa/es/{index-C3-dT3Da.js → index-BgzaHxEB.js} +1 -1
  211. package/{bt/es/index-FBqdAJVX.js → sa/es/index-BlWGftLo.js} +1 -1
  212. package/{bt/es/index-BOwPxMrI.js → sa/es/index-CsLiSVuW.js} +1 -1
  213. package/sa/es/{index-CURdCwBP.js → index-DRrfqemd.js} +1 -1
  214. package/sa/es/{index-DN-YIKca.js → index-DVJ3uiHQ.js} +1 -1
  215. package/sa/es/{index-DdjFNLfi.js → index-RJ0AwbAy.js} +1 -1
  216. package/sa/es/index.d.ts +5 -0
  217. package/sa/es/index.js +1 -1
  218. package/sa/es/{styles-nIWjdf4Q.js → styles-BIEPgknJ.js} +1 -1
  219. package/sa/es/{styles-BinlqIzR.js → styles-BZbbl3__.js} +1 -1
  220. package/sa/es/{styles-CKXkPSK7.js → styles-BvK_Hm8A.js} +1 -1
  221. package/{vg/es/styles-BLEcq5zd.js → sa/es/styles-C265I3ui.js} +1 -1
  222. package/{vg/es/styles-J6ZIkWWg.js → sa/es/styles-CgQ3pAiP.js} +1 -1
  223. package/sa/es/{styles-D6Yw1Ac5.js → styles-DE-5r6jI.js} +1 -1
  224. package/sa/es/{styles-Dl9lSG5k.js → styles-DbqMID7Q.js} +1 -1
  225. package/{bt/es/styles-DeLtxm-7.js → sa/es/styles-DmxGH8LS.js} +1 -1
  226. package/sa/es/{styles-BqJmPjkx.js → styles-x_RZ8LfI.js} +1 -1
  227. package/sav2/es/_auto-entry_sav2-Buoo9FKC.js +1 -0
  228. package/sav2/es/{events-CLjaEfKg.js → events-BI8lwyAS.js} +1 -1
  229. package/sav2/es/{index-B9vqocMj.js → index-BQ8oAuHr.js} +1 -1
  230. package/sav2/es/{index-DR45cNWr.js → index-BgPfftGv.js} +1 -1
  231. package/sav2/es/{index-CtpIO46D.js → index-CFYdF9nM.js} +1 -1
  232. package/sav2/es/{index-BpNenTh6.js → index-Dd4x--40.js} +1 -1
  233. package/sav2/es/{index-C4g2W0Sb.js → index-Dm0CwDko.js} +1 -1
  234. package/sav2/es/{index-D2OGiVeA.js → index-GTPIp0mQ.js} +1 -1
  235. package/sav2/es/{index-CFBp0gWl.js → index-VFT0zh22.js} +1 -1
  236. package/sav2/es/{index-DF8KOTU3.js → index-jUIaqg6x.js} +1 -1
  237. package/sav2/es/index.d.ts +5 -0
  238. package/sav2/es/index.js +1 -1
  239. package/{btv2/es/styles-CeXhXj2f.js → sav2/es/styles-0zU2Afam.js} +1 -1
  240. package/{btv2/es/styles-C5hdNxqP.js → sav2/es/styles-BH4mt2Zh.js} +1 -1
  241. package/sav2/es/{styles-B6Tn2m5H.js → styles-BMp80jah.js} +1 -1
  242. package/sav2/es/{styles-DR2_niKK.js → styles-BR_5kDUe.js} +1 -1
  243. package/{vgv2/es/styles-CdXBCGzU.js → sav2/es/styles-CCVahElC.js} +1 -1
  244. package/sav2/es/{styles-4VHKUOCA.js → styles-CZnBwaC3.js} +1 -1
  245. package/{btv2/es/styles-DsdyDZfJ.js → sav2/es/styles-CdHzLcOB.js} +1 -1
  246. package/sav2/es/{styles-RoErDfv8.js → styles-Lru4uD64.js} +1 -1
  247. package/svd/cjs/index.d.ts +5 -0
  248. package/svd/cjs/index.js +1 -1
  249. package/svd/es/_auto-entry_svd-BH3Ngjrt.js +1 -0
  250. package/svd/es/{events-BGNp0ea8.js → events-CWFgkDG1.js} +1 -1
  251. package/svd/es/{index-yLNHfxRN.js → index-BKe3qaf7.js} +1 -1
  252. package/svd/es/{index-29Jf_Biv.js → index-BP41ecWy.js} +1 -1
  253. package/svd/es/{index-U6-8PbJh.js → index-BcNPzl4P.js} +1 -1
  254. package/svd/es/{index-Dd5XL9Bh.js → index-Bya6Uq5B.js} +1 -1
  255. package/svd/es/{index-CKr8OvT_.js → index-C3cDOsuZ.js} +1 -1
  256. package/svd/es/{index-D6Ta9osQ.js → index-CCt9DWBH.js} +1 -1
  257. package/{e24/es/index-CX3Bi8nn.js → svd/es/index-CLVC_R25.js} +1 -1
  258. package/svd/es/{index-BtDN90s0.js → index-D5ggf8Xp.js} +1 -1
  259. package/svd/es/index.d.ts +5 -0
  260. package/svd/es/index.js +1 -1
  261. package/svd/es/{styles-1X-vMM3I.js → styles-BWNs7vrn.js} +1 -1
  262. package/svd/es/{styles-BKaQTDGq.js → styles-C7-tNUeS.js} +1 -1
  263. package/svd/es/{styles-5uj-ZsHl.js → styles-CI0tJc6e.js} +1 -1
  264. package/svd/es/{styles-DEd63ZFk.js → styles-CcAVJGfE.js} +1 -1
  265. package/svd/es/{styles-DyN1NmcS.js → styles-DUN-Sq2Q.js} +1 -1
  266. package/svd/es/{styles-Cus0jeG9.js → styles-u3GakbDH.js} +1 -1
  267. package/svdv2/es/_auto-entry_svdv2-D3Q-Cwuh.js +1 -0
  268. package/svdv2/es/{events-DqZfw4u-.js → events-CbogHJk0.js} +1 -1
  269. package/svdv2/es/{index-yCwBuZEJ.js → index-4lmCFsSW.js} +1 -1
  270. package/svdv2/es/{index-EpnJhmcV.js → index-BnEvrjDt.js} +1 -1
  271. package/svdv2/es/{index-C4rimTjh.js → index-D3McYvBy.js} +1 -1
  272. package/{koket/es/index-ypZ2A-fD.js → svdv2/es/index-DKgFd8BC.js} +1 -1
  273. package/svdv2/es/{index-I-xNTWVP.js → index-DQEHhVgW.js} +1 -1
  274. package/svdv2/es/{index-DXWYk6cz.js → index-DaAnuF-t.js} +1 -1
  275. package/svdv2/es/{index-CtUznPAK.js → index-LihWROT2.js} +1 -1
  276. package/svdv2/es/{index-2odxm5tq.js → index-aN0srUEo.js} +1 -1
  277. package/svdv2/es/index.d.ts +5 -0
  278. package/svdv2/es/index.js +1 -1
  279. package/{koket/es/styles-B_H1HQkP.js → svdv2/es/styles-CGPf0BAr.js} +1 -1
  280. package/svdv2/es/{styles-CA4Z2e2v.js → styles-CKXTdzs6.js} +1 -1
  281. package/svdv2/es/{styles-DToIRCe4.js → styles-Dci-bvKU.js} +1 -1
  282. package/svdv2/es/{styles-CuKhob1v.js → styles-Eh1GkHPx.js} +1 -1
  283. package/svdv2/es/{styles-BUjiG59F.js → styles-P6IOCdoC.js} +1 -1
  284. package/svdv2/es/{styles-DxAKuP0Z.js → styles-tlqB4rsT.js} +1 -1
  285. package/tek/cjs/index.d.ts +5 -0
  286. package/tek/cjs/index.js +1 -1
  287. package/tracker/cjs/index.d.ts +4 -0
  288. package/tracker/cjs/index.js +1 -1
  289. package/tracker/es/index.d.ts +4 -0
  290. package/tracker/es/index.js +1 -1
  291. package/tv4/cjs/index.d.ts +5 -0
  292. package/tv4/cjs/index.js +1 -1
  293. package/tv4/es/_auto-entry_tv4-CQemRCV3.js +1 -0
  294. package/tv4/es/{events-C0sezdBn.js → events-Bn0rJup8.js} +1 -1
  295. package/tv4/es/{index-CDm1z5Zz.js → index-B6yq5Gyv.js} +1 -1
  296. package/tv4/es/{index-CZmxzuAB.js → index-BJji2ATp.js} +1 -1
  297. package/tv4/es/{index-D6j9NyVD.js → index-BPa0_w5G.js} +1 -1
  298. package/tv4/es/{index-C3N6OygM.js → index-BWEU3m94.js} +1 -1
  299. package/tv4/es/{index-DDWIYeu-.js → index-BkFrwx_r.js} +1 -1
  300. package/tv4/es/{index-BpzCvrHU.js → index-Cq1qeKSR.js} +1 -1
  301. package/{svd/es/index-BIwR4oxJ.js → tv4/es/index-D_WaHIAK.js} +1 -1
  302. package/tv4/es/{index-sIym3nCc.js → index-gT_GHXn7.js} +1 -1
  303. package/tv4/es/index.d.ts +5 -0
  304. package/tv4/es/index.js +1 -1
  305. package/{e24/es/styles-VDl0rmFd.js → tv4/es/styles-B9dFHoiV.js} +1 -1
  306. package/tvnu/cjs/index.d.ts +5 -0
  307. package/tvnu/cjs/index.js +1 -1
  308. package/types/index.d.ts +43 -1
  309. package/vg/cjs/index.d.ts +5 -0
  310. package/vg/cjs/index.js +1 -1
  311. package/vg/es/_auto-entry_vg-Ysm3SmZS.js +1 -0
  312. package/vg/es/{events-BuIHSL2h.js → events-BsbXyYJY.js} +1 -1
  313. package/vg/es/{index-CCJ1nJj9.js → index-B0l-K3Nm.js} +1 -1
  314. package/vg/es/{index-20ZWVGEc.js → index-Bf04WCFs.js} +1 -1
  315. package/vg/es/{index-CA0WZ6Ax.js → index-BjFWFokY.js} +1 -1
  316. package/vg/es/{index-CZuZrMsL.js → index-CbihXkGs.js} +1 -1
  317. package/vg/es/{index-BDINj96k.js → index-DRb6TbCy.js} +1 -1
  318. package/vg/es/{index-DTQcufJF.js → index-DXTyIRph.js} +1 -1
  319. package/vg/es/{index-Dl49HE4w.js → index-DiHKSlZN.js} +1 -1
  320. package/vg/es/{index-D2Jjx9PT.js → index-zknvo2nh.js} +1 -1
  321. package/vg/es/index.d.ts +5 -0
  322. package/vg/es/index.js +1 -1
  323. package/vg/es/{styles-CQOliiLX.js → styles-B63x2SpC.js} +1 -1
  324. package/vg/es/{styles-NumU-nPs.js → styles-BUtIGfqi.js} +1 -1
  325. package/vg/es/{styles-BrTe9i2l.js → styles-BexolDY4.js} +1 -1
  326. package/{sa/es/styles-B-lO9R-E.js → vg/es/styles-BxHcjj-n.js} +1 -1
  327. package/vg/es/{styles-h04QFm1i.js → styles-ByLB3fAX.js} +1 -1
  328. package/{bt/es/styles-C8DnuqSs.js → vg/es/styles-CDe9glwP.js} +1 -1
  329. package/vg/es/{styles-jFF5Vdp2.js → styles-CIXqdJYT.js} +1 -1
  330. package/vg/es/{styles-CCZ98LB_.js → styles-CWBxD9zM.js} +1 -1
  331. package/vg/es/{styles-Bz0xWAPo.js → styles-CpI8Vlow.js} +1 -1
  332. package/vg/es/{styles-Cq0YVuP-.js → styles-DP0QUZVe.js} +1 -1
  333. package/vg/es/{styles-Bo3zTh_r.js → styles-DthpO9K3.js} +1 -1
  334. package/vg/es/{styles-PevLCSy7.js → styles-DxISXjJx.js} +1 -1
  335. package/vg/es/{styles-BZEN7d7Q.js → styles-VY3hon_C.js} +1 -1
  336. package/vg/es/{styles-EesYVlqx.js → styles-b8Bmj5zP.js} +1 -1
  337. package/vg/es/{styles-Bqoueq7w.js → styles-fArum_w2.js} +1 -1
  338. package/vgv2/es/_auto-entry_vgv2-CXADx6AD.js +1 -0
  339. package/vgv2/es/{events-DEsiy1oQ.js → events-B9GLUG_c.js} +1 -1
  340. package/vgv2/es/{index-oFKUHxJ1.js → index-BPI8SWbT.js} +1 -1
  341. package/vgv2/es/{index-DGISJUMb.js → index-BrQmd96n.js} +1 -1
  342. package/vgv2/es/{index-7WHfLNBO.js → index-C1qvZ43-.js} +1 -1
  343. package/vgv2/es/{index-BSlqbyek.js → index-CFD6e815.js} +1 -1
  344. package/vgv2/es/{index-Dy1kdc5b.js → index-CRmtQ0Ln.js} +1 -1
  345. package/vgv2/es/{index-OH40eW-t.js → index-CWzszIrQ.js} +1 -1
  346. package/vgv2/es/{index-B3ngGiHs.js → index-DNJnGBOC.js} +1 -1
  347. package/vgv2/es/{index-B7Qwcv3E.js → index-gk_94DrP.js} +1 -1
  348. package/vgv2/es/index.d.ts +5 -0
  349. package/vgv2/es/index.js +1 -1
  350. package/{btv2/es/styles-DFgxH_36.js → vgv2/es/styles-BVfmnN3W.js} +1 -1
  351. package/vgv2/es/{styles-D6-Q2fZt.js → styles-BveOiWvC.js} +1 -1
  352. package/vgv2/es/{styles-uYs9ct2S.js → styles-By7C17yJ.js} +1 -1
  353. package/vgv2/es/{styles-KY3tCqxT.js → styles-BypJiXcH.js} +1 -1
  354. package/vgv2/es/{styles-CevEX1M3.js → styles-C7Zup_OS.js} +1 -1
  355. package/vgv2/es/{styles-DuZv94it.js → styles-COdKCQnY.js} +1 -1
  356. package/vgv2/es/{styles-Dqe1Vqpx.js → styles-CXtejXaY.js} +1 -1
  357. package/vgv2/es/{styles-B6GKsM48.js → styles-Ca6cxxB-.js} +1 -1
  358. package/{btv2/es/styles-Bo_Iovmx.js → vgv2/es/styles-Cr5Fs5YF.js} +1 -1
  359. package/vgv2/es/{styles-DOTBy6aM.js → styles-D1hkQkrv.js} +1 -1
  360. package/vgv2/es/{styles-C8ervY_s.js → styles-DNcC9ILz.js} +1 -1
  361. package/vgv2/es/{styles-DwuSyeJg.js → styles-DpUl3Suf.js} +1 -1
  362. package/{btv2/es/styles-DNLeCYjA.js → vgv2/es/styles-Dt3_EHGE.js} +1 -1
  363. package/vgv2/es/{styles-BP1mlW3y.js → styles-Ze0zbpIu.js} +1 -1
  364. package/vgv2/es/{styles-B2B95hc3.js → styles-fmVnipjj.js} +1 -1
  365. package/video/cjs/index.js +1 -1
  366. package/video/es/index.js +1 -1
  367. package/aftenposten/es/_auto-entry_aftenposten-EtY8GywO.js +0 -1
  368. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-DHJZKdQn.js +0 -1
  369. package/aftonbladet/es/_auto-entry_aftonbladet-B3k7YOBF.js +0 -1
  370. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-C6dng7Av.js +0 -1
  371. package/bt/es/_auto-entry_bt-DUcmJ2ku.js +0 -1
  372. package/btv2/es/_auto-entry_btv2-D2FHz3QG.js +0 -1
  373. package/e24/es/_auto-entry_e24-Cz-sabh7.js +0 -1
  374. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-FkLZW4D2.js +0 -1
  375. package/koket/es/_auto-entry_koket-CEn1sb81.js +0 -1
  376. package/sa/es/_auto-entry_sa-Br3iro3o.js +0 -1
  377. package/sav2/es/_auto-entry_sav2-D7Zkf3q3.js +0 -1
  378. package/svd/es/_auto-entry_svd-EeywsUFy.js +0 -1
  379. package/svdv2/es/_auto-entry_svdv2-BOdsgENe.js +0 -1
  380. package/tv4/es/_auto-entry_tv4-BIyw3FfG.js +0 -1
  381. package/vg/es/_auto-entry_vg-2d1xLWdJ.js +0 -1
  382. package/vgv2/es/_auto-entry_vgv2-D8TcsAHG.js +0 -1
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i={get:(e,t)=>n(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,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},o=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},r=["netboard","board"];class a{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,r;const a=yield this.identityFacade.getIdentityUser(),s=null!==(r=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==r?r:"",d=(null==a?void 0:a.userId)?String(a.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{o("Starting fetching DrEdition ad from URL:",l);const e={method:"GET"},t=yield i.get(l,e);return o("Fetch operation completed successfully."),t}catch(e){o("Error during fetch operation:",e)}return null})}}class s{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const d=e=>new URLSearchParams(window.location.search).get(e),l=e=>{if("0"===d("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},c=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"))},u=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):o("Dr. Edition container does not have a parent element, cannot remove height lock.")};class v{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:r}},renderAsBackfill:a=!1}=t,s=e.querySelector(r);if(!s)return void o(`Container with selector "${r}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(o("No Dr. Edition ads available to render. Collapsing whole placement."),l(e.id),void u(s)):((null==d?void 0:d.itemId)&&a&&(o("Dr. Edition ad available to render as a Xandr backfill."),c(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),u(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):u(s))):(o("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void u(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";c(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const p=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 o("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const r=e=>{i||(o("Resolving advertising permission value obtained"),i=!0,t(e))},a=setTimeout(()=>{o("Advertising permission timed out, resolving with false"),r(!1)},3e3);window._tcf_.onTcfReady(()=>{o("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const t=Number(e);o("Advertising permission value obtained asynchronously: ",e),r(Boolean(t))})}),g="no",m="se",h="cmp:loaded";let y="undefined"!=typeof window?window._tcf_:void 0,w=!1;const f=(e,t,i)=>{const r=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,s=d("bypass_tcf"),l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(o("TCF bypass param detected, returning consent: true"),!0):(o("TCF is not enabled, returning consent: true"),!0))(r,s))return!0;if(w)return null;if(!y)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=y.getConsentedToAllSync();return o(`TCF consented to all is: ${t}`),y.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(o("Getting TCF consent manager..."),window._tcf_)return o("TCF consent manager is already available"),y=window._tcf_,void e(y);o("TCF consent manager is not available");const n=()=>{o("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(y=window._tcf_,e(y)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(h,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},a);o("Listening for CMP loaded event..."),document.addEventListener(h,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return o(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===m,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===g;if(t||n)return o("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const r=l();return null!==r?r:yield new Promise((e,t)=>{try{if(!y)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(()=>{o("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);y.onTcfReady(()=>{o("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),y.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},b=(e,t,i,...r)=>n(void 0,[e,t,i,...r],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return o(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return o(`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:r}=f(e,0,n);return(yield r())?(o(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(o(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),E="mobile";class P{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=f(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===E?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class C{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){o("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class T{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class I extends T{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class j extends T{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const S="svd",k="vg",A="aftonbladet",L="e24",U="front",M=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),_={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return X})})}})}};class O{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{_[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield M(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===U?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const x="https://www.aftonbladet.se/video-player-extras/latest/";class D{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${x}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${x}external-link.js`]:{name:"ExternalLink"}}};yield M(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const N=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class V{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},N(e)?e:{}),{provider:Object.assign(Object.assign({},N(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 M(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class B{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const R=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:d}=e,l={[k]:new s,[L]:new O,[A]:new D,[S]:new V}[o]||new B,c=new(d===m?I:j)(n,l,r),u=new a(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),p=new P(l,c),g=new C(l);return new v(u,p,g,c)},$=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},F=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class q{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return o("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const H=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=R(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(i=s.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},z=[],W=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:a,drEdition:s,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield b(a,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:a,drEdition:s}=e,d=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=a[o]||a.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=r.some(e=>c.startsWith(e)),p=z.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(z.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void o("Pulse has not been passed as a prop, aborting");const g=yield F(),m=new q(g),h=R({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(t.targetId);if(!y||!s)return;y.classList.value="";const w=document.createElement("div");w.className=s.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:s,device:d,tcf:a,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)}),J=e=>n(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield b(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield F(),i=new q(n);H({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),G=(e,t)=>{var i,r,a;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void o("Ad block not enabled, Dr. Edition backfills will not be rendered");o("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(r=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===r?void 0:r[s],c=null!==(a=null==l?void 0:l.map(([e])=>e))&&void 0!==a?a:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield W(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Q=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var X=Object.freeze({__proto__:null,default:Q});export{$ as DrEdition,R as getDrEditionManager,J as handleDrEdition,W as handleDrEditionBackfill,G as handleDrEditionBackfillOnAdblock};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";v(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const m=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),x={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class N{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const D="https://www.aftonbladet.se/video-player-extras/latest/";class V{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${D}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${D}external-link.js`]:{name:"ExternalLink"}}};yield _(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield _(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,s={[L]:new l,[U]:new N,[O]:new V,[A]:new R}[o]||new $,c=new(a===y?S:k)(n,s,r),u=new d(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),v=new T(s,c),p=new I(s);return new g(u,v,p,c)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class z{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return a("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield P(o,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const g=yield H(),m=new z(g),h=F({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(t.targetId);if(!y||!r)return;y.classList.value="";const w=document.createElement("div");w.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)}),G=e=>n(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield P(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield H(),i=new z(n);W({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};