@schibsted/advertory 3.4.3 → 3.4.4

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 (343) hide show
  1. package/ad-native/cjs/index.js +1 -1
  2. package/ad-native/es/index.js +1 -1
  3. package/aftenposten/cjs/index.js +1 -1
  4. package/aftenposten/es/_auto-entry_aftenposten-Bhf0yykF.js +1 -0
  5. package/aftenposten/es/{events-NnSzXfBl.js → events-X-dYeO4s.js} +1 -1
  6. package/aftenposten/es/{index-BoHZbtvc.js → index-BPvpr5v_.js} +1 -1
  7. package/aftenposten/es/{index-CNA8zraa.js → index-Brrd55Va.js} +1 -1
  8. package/aftenposten/es/{index-ugv9cbWi.js → index-C_hXCdJd.js} +1 -1
  9. package/aftenposten/es/{index-D_TH5NqJ.js → index-CcJ0g9uo.js} +1 -1
  10. package/aftenposten/es/{index-B-bCMyfh.js → index-D0v1GQVx.js} +1 -1
  11. package/aftenposten/es/{index-YkvmFU9i.js → index-DLQxzMX6.js} +1 -1
  12. package/aftenposten/es/{index-D_SPMvbh.js → index-Dedh95YD.js} +1 -1
  13. package/aftenposten/es/{index-CtSALZoL.js → index-Df77cMV7.js} +1 -1
  14. package/aftenposten/es/index.js +1 -1
  15. package/aftenposten/es/{styles-Dcaz9B_b.js → styles-BXqQupbI.js} +1 -1
  16. package/aftenposten/es/{styles-CH2IHDJ9.js → styles-CknRy_Qx.js} +1 -1
  17. package/aftenposten/es/{styles-B6NYCtN5.js → styles-D6RymBPT.js} +1 -1
  18. package/aftenposten/es/{styles-DsmX2Bkk.js → styles-D9wpJp3b.js} +1 -1
  19. package/aftenposten/es/{styles-DgIIlODG.js → styles-DEvWRRgu.js} +1 -1
  20. package/aftenposten/es/{styles-CdMmAQMn.js → styles-DKxxtORm.js} +1 -1
  21. package/aftenposten/es/{styles-B1QkS-Tu.js → styles-DRELkr_H.js} +1 -1
  22. package/aftenposten/es/{styles-BBgt5Y74.js → styles-DrCgleuK.js} +1 -1
  23. package/aftenposten/es/{styles-Dcq7smdy.js → styles-IgBG4ryC.js} +1 -1
  24. package/aftenposten/es/{styles-BZKdLQdQ.js → styles-V5LlDQpd.js} +1 -1
  25. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BDfo8K1D.js +1 -0
  26. package/aftenpostenv2/es/{events-Cnab7Blq.js → events-otaRviLL.js} +1 -1
  27. package/aftenpostenv2/es/{index-BOn8NG8s.js → index-B9G2G5Ln.js} +1 -1
  28. package/aftenpostenv2/es/{index-d7VPppTG.js → index-Bj8e0ohd.js} +1 -1
  29. package/aftenpostenv2/es/{index-rbhALMfT.js → index-C-DVaVfL.js} +1 -1
  30. package/aftenpostenv2/es/{index-CKtxrDao.js → index-CFvd4fNa.js} +1 -1
  31. package/aftenpostenv2/es/{index-rCL_u628.js → index-CvrL5ggt.js} +1 -1
  32. package/aftenpostenv2/es/{index-OSrhum0M.js → index-D-wr1b38.js} +1 -1
  33. package/aftenpostenv2/es/{index-Bo8dH9dZ.js → index-DYk7DSSt.js} +1 -1
  34. package/{aftonbladetv2/es/index-CeMlmW09.js → aftenpostenv2/es/index-DqBPA2qv.js} +1 -1
  35. package/aftenpostenv2/es/index.js +1 -1
  36. package/aftenpostenv2/es/{styles-BhR8eqnn.js → styles-7MB8eZNf.js} +1 -1
  37. package/aftenpostenv2/es/{styles-D2a7P9CN.js → styles-BRFIxZOd.js} +1 -1
  38. package/aftenpostenv2/es/{styles-CEgVPUEk.js → styles-BbPbb9x5.js} +1 -1
  39. package/aftenpostenv2/es/{styles-DibJU_k9.js → styles-Bf7Gl-A7.js} +1 -1
  40. package/aftenpostenv2/es/{styles-D6P3hDZH.js → styles-COT3aknE.js} +1 -1
  41. package/aftenpostenv2/es/{styles-DN1DCMAy.js → styles-Crf3CBko.js} +1 -1
  42. package/aftenpostenv2/es/{styles-BYNw8MX1.js → styles-D1d5UAy_.js} +1 -1
  43. package/aftenpostenv2/es/{styles-CA9MEUTa.js → styles-DFI0TxiT.js} +1 -1
  44. package/aftenpostenv2/es/{styles-BkrGJb9X.js → styles-DUoEGCMj.js} +1 -1
  45. package/aftenpostenv2/es/{styles-B-oYlwJT.js → styles-DVVNN8UI.js} +1 -1
  46. package/aftonbladet/cjs/index.js +1 -1
  47. package/aftonbladet/es/_auto-entry_aftonbladet-bQhax--t.js +1 -0
  48. package/aftonbladet/es/{events-BHFOHoyn.js → events-DPDf5jcW.js} +1 -1
  49. package/aftonbladet/es/{index-C1PA0ALz.js → index-CamqQOrz.js} +1 -1
  50. package/aftonbladet/es/{index-DI9bWWvG.js → index-DGG1RtzD.js} +1 -1
  51. package/aftonbladet/es/{index-BCk_Gk7v.js → index-DgUlnlwD.js} +1 -1
  52. package/aftonbladet/es/{index-B5mB5u2K.js → index-DuHBkR0k.js} +1 -1
  53. package/aftonbladet/es/{index-EVcf9Ip6.js → index-DuJN6N7Q.js} +1 -1
  54. package/aftonbladet/es/{index-EfVIB7Gv.js → index-TRFE2Xfn.js} +1 -1
  55. package/aftonbladet/es/{index-CjPESS_b.js → index-VUMQL8Z0.js} +1 -1
  56. package/aftonbladet/es/{index-BSDqET-H.js → index-Yj9dRgd-.js} +1 -1
  57. package/aftonbladet/es/index.js +1 -1
  58. package/aftonbladet/es/{styles-C-JcMEge.js → styles-42ccInUr.js} +1 -1
  59. package/aftonbladet/es/{styles-Cej3BgmO.js → styles-9OkbPFxr.js} +1 -1
  60. package/aftonbladet/es/{styles-ZmkmjoME.js → styles-B-jfqYpP.js} +1 -1
  61. package/aftonbladet/es/{styles-B5CB69I9.js → styles-CqpGPj5k.js} +1 -1
  62. package/aftonbladet/es/{styles-MVjaRlEo.js → styles-DCA0EqsJ.js} +1 -1
  63. package/aftonbladet/es/{styles-DlCRkGHz.js → styles-DUmh8CGB.js} +1 -1
  64. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-2vzHH5dY.js +1 -0
  65. package/aftonbladetv2/es/{events-z_o1b8qR.js → events-Gz_LB5GE.js} +1 -1
  66. package/aftonbladetv2/es/{index-x2N9B4gx.js → index-10ySr6zB.js} +1 -1
  67. package/aftonbladetv2/es/{index-BWSHw4Hs.js → index-6p7hrIlz.js} +1 -1
  68. package/aftonbladetv2/es/{index-DcYEG4Ma.js → index-Ck5tqhOJ.js} +1 -1
  69. package/aftonbladetv2/es/{index--CxcKaLx.js → index-Cy7osinK.js} +1 -1
  70. package/aftonbladetv2/es/{index-Btd1raGJ.js → index-D8crw21t.js} +1 -1
  71. package/aftonbladetv2/es/{index-Cb_FajHZ.js → index-DHfz6V6b.js} +1 -1
  72. package/aftonbladetv2/es/{index-BrzOIZxv.js → index-YKvKZUjf.js} +1 -1
  73. package/{aftenpostenv2/es/index-wav3Ilhc.js → aftonbladetv2/es/index-tnqwhfdq.js} +1 -1
  74. package/aftonbladetv2/es/index.js +1 -1
  75. package/aftonbladetv2/es/{styles-H5iSq0WK.js → styles-B3vde6pE.js} +1 -1
  76. package/aftonbladetv2/es/{styles--NlGcgEn.js → styles-BH7sQJJG.js} +1 -1
  77. package/aftonbladetv2/es/{styles-NNA5aMrt.js → styles-COQNXwI5.js} +1 -1
  78. package/aftonbladetv2/es/{styles-Bxs3egn6.js → styles-CeEwmllW.js} +1 -1
  79. package/aftonbladetv2/es/{styles-B4TmTxlw.js → styles-Chi-PjLS.js} +1 -1
  80. package/aftonbladetv2/es/{styles-Cxd99rZx.js → styles-RMP-4RAU.js} +1 -1
  81. package/brandmetrics/cjs/index.js +1 -1
  82. package/brandmetrics/es/index.js +1 -1
  83. package/bt/cjs/index.js +1 -1
  84. package/bt/es/_auto-entry_bt-BQP7GfEz.js +1 -0
  85. package/bt/es/{events-zPCh9Dr7.js → events-BWxrUFS8.js} +1 -1
  86. package/bt/es/{index-B374ZTR0.js → index-BNR6BtJp.js} +1 -1
  87. package/bt/es/{index-qANg1i3l.js → index-Cxd1srtv.js} +1 -1
  88. package/bt/es/{index-OKKHjcPk.js → index-D5o0TQOa.js} +1 -1
  89. package/bt/es/{index-BukxABtk.js → index-DJOnP4Lo.js} +1 -1
  90. package/bt/es/{index-DuR946AX.js → index-DakBjK1q.js} +1 -1
  91. package/{sa/es/index-2cEqSIWE.js → bt/es/index-DouAiNRC.js} +1 -1
  92. package/bt/es/{index-CyViFPDy.js → index-DxSc2TRT.js} +1 -1
  93. package/bt/es/{index-n742gQbA.js → index-Lrh3Kbbw.js} +1 -1
  94. package/bt/es/index.js +1 -1
  95. package/bt/es/{styles-Dn2Es8yM.js → styles-BViX_ai_.js} +1 -1
  96. package/bt/es/{styles-BS81h46v.js → styles-CDCnQw3l.js} +1 -1
  97. package/bt/es/{styles-DEK9k80p.js → styles-CItFSNiz.js} +1 -1
  98. package/bt/es/{styles-B54qJ6kH.js → styles-C_Qlt8u0.js} +1 -1
  99. package/bt/es/{styles-BRG2_e2X.js → styles-D3mqFIe5.js} +1 -1
  100. package/bt/es/{styles-CQaijpqa.js → styles-DEBOUzUi.js} +1 -1
  101. package/{sa/es/styles-6T2-Xu_7.js → bt/es/styles-Dh2uOIpi.js} +1 -1
  102. package/bt/es/{styles-CCW_KItv.js → styles-DyZuMNGn.js} +1 -1
  103. package/bt/es/{styles-wg0OSL5b.js → styles-bQqZn_XE.js} +1 -1
  104. package/btv2/es/_auto-entry_btv2-BFERV4k3.js +1 -0
  105. package/btv2/es/{events-Od0V0sIJ.js → events-DbRwqeWY.js} +1 -1
  106. package/btv2/es/{index-ADlvP4Gn.js → index-6zLiGrPg.js} +1 -1
  107. package/btv2/es/{index-uDCrosab.js → index-B0k7BoxE.js} +1 -1
  108. package/btv2/es/{index-C-QSQ4l1.js → index-BT7dgSQS.js} +1 -1
  109. package/btv2/es/{index-BxiIQM4F.js → index-BcukMuzG.js} +1 -1
  110. package/btv2/es/{index-iH9-1GZR.js → index-C2EVI2gn.js} +1 -1
  111. package/btv2/es/{index-DnIyhRwO.js → index-CrB2LU5e.js} +1 -1
  112. package/btv2/es/{index-ChkWOyeK.js → index-DGAyNkVL.js} +1 -1
  113. package/btv2/es/{index-D-BgwAW1.js → index-D_oxqGL_.js} +1 -1
  114. package/btv2/es/index.js +1 -1
  115. package/{sav2/es/styles-B_ZOH_kH.js → btv2/es/styles-B6g4yNVo.js} +1 -1
  116. package/{vgv2/es/styles-DHXBSpkp.js → btv2/es/styles-CN3azPHF.js} +1 -1
  117. package/{sav2/es/styles-CjtxSWvS.js → btv2/es/styles-CXNU4R3I.js} +1 -1
  118. package/{vgv2/es/styles-DtfaEsMv.js → btv2/es/styles-Dzf3m6rk.js} +1 -1
  119. package/{sav2/es/styles-0vSewplK.js → btv2/es/styles-EunRAAOJ.js} +1 -1
  120. package/{sav2/es/styles-BbWQEkUQ.js → btv2/es/styles-RG3eewEG.js} +1 -1
  121. package/btv2/es/{styles-D2eFIJem.js → styles-VMPL62vB.js} +1 -1
  122. package/{sav2/es/styles-VfFB9Dwd.js → btv2/es/styles-a4JOrBPo.js} +1 -1
  123. package/common/cjs/index.js +1 -1
  124. package/common/es/index.js +1 -1
  125. package/dr-edition/cjs/index.js +1 -1
  126. package/dr-edition/es/index.js +1 -1
  127. package/e24/es/_auto-entry_e24-BEKLtA7Y.js +1 -0
  128. package/e24/es/{events-BjCGGsU2.js → events-Yd36UysJ.js} +1 -1
  129. package/e24/es/{index-nUjddkRa.js → index-BGapFJQk.js} +1 -1
  130. package/e24/es/{index-RwCfpaAf.js → index-BpmYLE2f.js} +1 -1
  131. package/{tv4/es/index-DTaWGKTf.js → e24/es/index-ByrAuocy.js} +1 -1
  132. package/e24/es/{index-CE9nW0UL.js → index-COKHAJhe.js} +1 -1
  133. package/e24/es/{index-BbhbYZrs.js → index-CRLFyN8P.js} +1 -1
  134. package/e24/es/{index-AHPkpdVk.js → index-CoBmEzXT.js} +1 -1
  135. package/e24/es/{index-Du6WV54Y.js → index-DCD0FkMq.js} +1 -1
  136. package/e24/es/{index-nhRF4FiM.js → index-EvP5fwqa.js} +1 -1
  137. package/e24/es/index.js +1 -1
  138. package/{tv4/es/styles-oSp-rScU.js → e24/es/styles-C8NvGvar.js} +1 -1
  139. package/e24/es/{styles-a9xWuDhY.js → styles-C9XvVZBY.js} +1 -1
  140. package/e24/es/{styles-C_uBtBmd.js → styles-CmbQcdvB.js} +1 -1
  141. package/e24/es/{styles-Bkw70ZfS.js → styles-CsMHQajS.js} +1 -1
  142. package/e24/es/{styles-DN-q9mWV.js → styles-D1nI60Zv.js} +1 -1
  143. package/e24/es/{styles-X8boPmVk.js → styles-DGv06M3G.js} +1 -1
  144. package/e24/es/{styles-nlKDivG3.js → styles-Dm7XvLbx.js} +1 -1
  145. package/e24/es/{styles-D9tpuT2p.js → styles-HX_bpt29.js} +1 -1
  146. package/e24/es/{styles-EhbzKsM9.js → styles-OsWwU4Rj.js} +1 -1
  147. package/e24/es/{styles-Cv-SFH42.js → styles-aeUKq6dx.js} +1 -1
  148. package/e24/es/{styles-Cc5iqSLl.js → styles-ziSdUigy.js} +1 -1
  149. package/fotbollskanalen/cjs/index.js +1 -1
  150. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-Baj19g0T.js +1 -0
  151. package/fotbollskanalen/es/{events-B3E3vMdN.js → events-DjGycYd2.js} +1 -1
  152. package/fotbollskanalen/es/{index-fvpCpghV.js → index-92eOLgTV.js} +1 -1
  153. package/fotbollskanalen/es/{index-ZgSfKCrx.js → index-BIBTI_Jh.js} +1 -1
  154. package/fotbollskanalen/es/{index-BB8KUpU5.js → index-Bmtv9--e.js} +1 -1
  155. package/fotbollskanalen/es/{index-DwhgZ-35.js → index-BrUe1khl.js} +1 -1
  156. package/fotbollskanalen/es/{index-DX0ZnMDa.js → index-BuOM47k5.js} +1 -1
  157. package/fotbollskanalen/es/{index-D-TrDk2c.js → index-CksSFyzA.js} +1 -1
  158. package/fotbollskanalen/es/{index-CmHD0hoF.js → index-Md5U1C6J.js} +1 -1
  159. package/fotbollskanalen/es/{index-DttRpxjB.js → index-j6fBf8VB.js} +1 -1
  160. package/fotbollskanalen/es/index.js +1 -1
  161. package/fotbollskanalen/es/{styles-wZ4ZqgEf.js → styles-BrbSyGNH.js} +1 -1
  162. package/glimr/cjs/index.js +1 -1
  163. package/glimr/es/index.js +1 -1
  164. package/godare/cjs/index.js +1 -1
  165. package/godt/cjs/index.js +1 -1
  166. package/klart/cjs/index.js +1 -1
  167. package/koket/cjs/index.js +1 -1
  168. package/koket/es/_auto-entry_koket-DL9mfUrb.js +1 -0
  169. package/koket/es/{events-CvwWG2Nq.js → events-9Q6ytjT9.js} +1 -1
  170. package/koket/es/{index-DrPzXuzI.js → index-CQn23TuZ.js} +1 -1
  171. package/koket/es/{index-R-GeDn_C.js → index-CciXtL8E.js} +1 -1
  172. package/koket/es/{index-DQbH03TR.js → index-DO8jV11Q.js} +1 -1
  173. package/koket/es/{index-COV7xlV2.js → index-DYxv6SzB.js} +1 -1
  174. package/koket/es/{index-UYyfZtbd.js → index-DfyfmbVt.js} +1 -1
  175. package/koket/es/{index-CFfHFpgw.js → index-DxxEwxfr.js} +1 -1
  176. package/koket/es/{index-B072v10m.js → index-Tc503bXN.js} +1 -1
  177. package/koket/es/{index-BmG5eAvR.js → index-YDhc36i5.js} +1 -1
  178. package/koket/es/index.js +1 -1
  179. package/{svdv2/es/styles-C8F2H7Zd.js → koket/es/styles-CElTjNBQ.js} +1 -1
  180. package/minmote/cjs/index.js +1 -1
  181. package/package.json +1 -1
  182. package/pent/cjs/index.js +1 -1
  183. package/sa/cjs/index.js +1 -1
  184. package/sa/es/_auto-entry_sa-wY_EUefU.js +1 -0
  185. package/sa/es/{events-Bvgy15qT.js → events-CZJqcBzn.js} +1 -1
  186. package/sa/es/{index-CgtIgNa1.js → index-BxxbObcn.js} +1 -1
  187. package/sa/es/{index-9P60WzXZ.js → index-CKAFPlFc.js} +1 -1
  188. package/sa/es/{index-4IheX1Qx.js → index-Cm982Cvh.js} +1 -1
  189. package/sa/es/{index-DYV0i3R0.js → index-D-7QoEu7.js} +1 -1
  190. package/sa/es/{index-Cux-4pkD.js → index-DWNojKUK.js} +1 -1
  191. package/{bt/es/index-CB0e87Yr.js → sa/es/index-Dg_60TLd.js} +1 -1
  192. package/sa/es/{index-eigLJXXM.js → index-DkfcDGKo.js} +1 -1
  193. package/sa/es/{index-DgiFn2Ge.js → index-Txagwucq.js} +1 -1
  194. package/sa/es/index.js +1 -1
  195. package/sa/es/{styles-Ed-e5-yf.js → styles-CI40Pps1.js} +1 -1
  196. package/sa/es/{styles-mmE9VHHn.js → styles-DHqWx4kk.js} +1 -1
  197. package/sa/es/{styles-DWa2H7Aj.js → styles-DLEYispL.js} +1 -1
  198. package/{vg/es/styles-Dr7A3HpS.js → sa/es/styles-DUSWg3JA.js} +1 -1
  199. package/sa/es/{styles-BHaLvTs-.js → styles-Do0sOJVo.js} +1 -1
  200. package/{vg/es/styles-Bskzm7WU.js → sa/es/styles-DuOTXl8z.js} +1 -1
  201. package/sa/es/{styles-DjfA1U9_.js → styles-KTlWlFs0.js} +1 -1
  202. package/sa/es/{styles-Bb1RceEA.js → styles-V8Ex-OKo.js} +1 -1
  203. package/sa/es/{styles-CE-oof_T.js → styles-cboPgZpg.js} +1 -1
  204. package/sav2/es/_auto-entry_sav2-CnCVAQdF.js +1 -0
  205. package/sav2/es/{events-CSBAJTl_.js → events-2jHZOPwR.js} +1 -1
  206. package/sav2/es/{index-FzjhlqAu.js → index-BWZoWfjV.js} +1 -1
  207. package/sav2/es/{index-DFGVi5Jp.js → index-Bb-YOHvE.js} +1 -1
  208. package/sav2/es/{index-CDjwJyxU.js → index-BiB2aOAL.js} +1 -1
  209. package/sav2/es/{index-D-f5Ljk-.js → index-BpK1TtYH.js} +1 -1
  210. package/sav2/es/{index-D7uB61Lg.js → index-Bt0pEy8l.js} +1 -1
  211. package/sav2/es/{index-C9emf_ZQ.js → index-DxnDOPzx.js} +1 -1
  212. package/sav2/es/{index-CUN4Irqp.js → index-KCTlR2wg.js} +1 -1
  213. package/sav2/es/{index-sRdPGxGV.js → index-qMRowoqW.js} +1 -1
  214. package/sav2/es/index.js +1 -1
  215. package/{btv2/es/styles-D8ARyZMy.js → sav2/es/styles-BIUV-RNC.js} +1 -1
  216. package/sav2/es/{styles-W-hW7AaY.js → styles-CJw_lkpK.js} +1 -1
  217. package/sav2/es/{styles-lBK9P7Ta.js → styles-CM-oSSUc.js} +1 -1
  218. package/{btv2/es/styles-Cq4cAkY2.js → sav2/es/styles-DHLrp8VL.js} +1 -1
  219. package/{btv2/es/styles-CgitEZi2.js → sav2/es/styles-DOBpUHnu.js} +1 -1
  220. package/{vgv2/es/styles-CC3XnDMT.js → sav2/es/styles-Dpq612kt.js} +1 -1
  221. package/{btv2/es/styles-CUAxlQm_.js → sav2/es/styles-Dv-eBXgZ.js} +1 -1
  222. package/sav2/es/{styles-CNClKD_e.js → styles-Ul5sOoE8.js} +1 -1
  223. package/svd/cjs/index.js +1 -1
  224. package/svd/es/_auto-entry_svd-gWaZONI8.js +1 -0
  225. package/svd/es/{events-BBOO1qLH.js → events-Bjd-4Rj5.js} +1 -1
  226. package/svd/es/{index-DZgUWO_O.js → index-51zCHEiR.js} +1 -1
  227. package/svd/es/{index-DxVke-LG.js → index-6EgbUtYp.js} +1 -1
  228. package/svd/es/{index-Clkes_JW.js → index-B5-1tBxg.js} +1 -1
  229. package/svd/es/{index-HGBVAill.js → index-Baauiaf1.js} +1 -1
  230. package/svd/es/{index-Blog_T_h.js → index-DJZyobVc.js} +1 -1
  231. package/svd/es/{index-C6gIJ3YT.js → index-D_8M3fv2.js} +1 -1
  232. package/svd/es/{index-Bq68FeSG.js → index-Dkflf4MB.js} +1 -1
  233. package/{e24/es/index-DwX_MoIe.js → svd/es/index-Dwb1fq0B.js} +1 -1
  234. package/svd/es/index.js +1 -1
  235. package/svd/es/{styles-BRuux0td.js → styles-2105q1_Q.js} +1 -1
  236. package/svd/es/{styles-CfoPL3Kl.js → styles-CFjNMv5T.js} +1 -1
  237. package/svd/es/{styles-C0M9uL7v.js → styles-D6JZVB8d.js} +1 -1
  238. package/svd/es/{styles-B2u9U58U.js → styles-DFqZc2GE.js} +1 -1
  239. package/svd/es/{styles-eReOfxOY.js → styles-DemChIJH.js} +1 -1
  240. package/svd/es/{styles-DOUeUzPw.js → styles-nM1cAR1X.js} +1 -1
  241. package/svdv2/es/_auto-entry_svdv2-CBT-yIIh.js +1 -0
  242. package/svdv2/es/{events-QZIpKmMd.js → events-Cv0WDScT.js} +1 -1
  243. package/svdv2/es/{index-D9bLY9Q7.js → index-B-BCWavy.js} +1 -1
  244. package/svdv2/es/{index-DL7tMz3m.js → index-B8batGia.js} +1 -1
  245. package/svdv2/es/{index-CObZnuh4.js → index-BTR1-A5h.js} +1 -1
  246. package/svdv2/es/{index-CyX6sdFR.js → index-BW3Rr9Nx.js} +1 -1
  247. package/svdv2/es/{index-o-hKUjPb.js → index-BxC8o1uZ.js} +1 -1
  248. package/svdv2/es/{index-Dzh4smy5.js → index-C1R9Ki5K.js} +1 -1
  249. package/svdv2/es/{index-Cpr2XoWk.js → index-DNK3AfFB.js} +1 -1
  250. package/svdv2/es/{index-CC37DurP.js → index-TJKz3Y9E.js} +1 -1
  251. package/svdv2/es/index.js +1 -1
  252. package/svdv2/es/{styles-BtKOxohT.js → styles-2ebgmgKC.js} +1 -1
  253. package/svdv2/es/{styles-BXETvW1L.js → styles-BVKaXt1D.js} +1 -1
  254. package/svdv2/es/{styles-C9ILjoKk.js → styles-C7kJ3a5A.js} +1 -1
  255. package/{koket/es/styles-vY_YaN5w.js → svdv2/es/styles-D4fzUgLd.js} +1 -1
  256. package/svdv2/es/{styles-3rR6vWcw.js → styles-DOxiZsGC.js} +1 -1
  257. package/svdv2/es/{styles-ByAM4CUV.js → styles-e-LUgOYk.js} +1 -1
  258. package/tek/cjs/index.js +1 -1
  259. package/tv4/cjs/index.js +1 -1
  260. package/tv4/es/_auto-entry_tv4-CgjDpm2n.js +1 -0
  261. package/tv4/es/{events-C_M50L_F.js → events-C_-_Xowx.js} +1 -1
  262. package/tv4/es/{index-Bl1OnFFG.js → index-BWStV20R.js} +1 -1
  263. package/tv4/es/{index-BzzXS1lo.js → index-CFuhcqwm.js} +1 -1
  264. package/tv4/es/{index-Cgr7rPoH.js → index-CkbH_SEP.js} +1 -1
  265. package/{svd/es/index-BWMzzOgK.js → tv4/es/index-DA_qj0r7.js} +1 -1
  266. package/tv4/es/{index-C1KsDELJ.js → index-DroR5xBF.js} +1 -1
  267. package/tv4/es/{index-CGFe4ZCU.js → index-Dy9jE6h-.js} +1 -1
  268. package/tv4/es/{index-BfLhM5py.js → index-P3D3vQx4.js} +1 -1
  269. package/tv4/es/{index-6RdCSFSp.js → index-ydad3sUV.js} +1 -1
  270. package/tv4/es/index.js +1 -1
  271. package/{e24/es/styles-B_OHnQ7F.js → tv4/es/styles-Bh4MC17S.js} +1 -1
  272. package/tvnu/cjs/index.js +1 -1
  273. package/vg/cjs/index.js +1 -1
  274. package/vg/es/_auto-entry_vg-BVmx9OMx.js +1 -0
  275. package/vg/es/{events-Bd-iygyH.js → events-Bmkna1Gc.js} +1 -1
  276. package/vg/es/{index-DpdK5XhH.js → index-B_di9fdW.js} +1 -1
  277. package/vg/es/{index-C1Rx8Dx2.js → index-BixkAKMD.js} +1 -1
  278. package/vg/es/{index-7-RNSGyQ.js → index-BrkCMRgV.js} +1 -1
  279. package/vg/es/{index-BXRR3qnn.js → index-Camom7m-.js} +1 -1
  280. package/vg/es/{index-DMHVzKpf.js → index-Cyqw9XoG.js} +1 -1
  281. package/vg/es/{index-BjKt1e9m.js → index-DET4dXfU.js} +1 -1
  282. package/vg/es/{index-1XciwLyG.js → index-Dn7htXn0.js} +1 -1
  283. package/vg/es/{index-cnVG6KwK.js → index-wYIgmMRk.js} +1 -1
  284. package/vg/es/index.js +1 -1
  285. package/vg/es/{styles-Dq2kfMxh.js → styles-BWOcFLKa.js} +1 -1
  286. package/{sa/es/styles-KLP-sDIg.js → vg/es/styles-BcLLBwR8.js} +1 -1
  287. package/vg/es/{styles-B8U-Fsay.js → styles-COsX5v1m.js} +1 -1
  288. package/vg/es/{styles-CeXOnNz5.js → styles-C_FwIyaP.js} +1 -1
  289. package/vg/es/{styles-BAyDEkIO.js → styles-CkFvNN2A.js} +1 -1
  290. package/vg/es/{styles-EHM4khu3.js → styles-DAOlUI8E.js} +1 -1
  291. package/vg/es/{styles-DieMs8S_.js → styles-DQ_YpbXO.js} +1 -1
  292. package/vg/es/{styles-OS52MZJU.js → styles-DSm1LVi_.js} +1 -1
  293. package/vg/es/{styles-PhrVBHh5.js → styles-DX6tqWSV.js} +1 -1
  294. package/vg/es/{styles-CEv3g75Z.js → styles-DrcSgO9F.js} +1 -1
  295. package/vg/es/{styles-B3g_WQKY.js → styles-GAPVZ_FS.js} +1 -1
  296. package/vg/es/{styles-B7FSVEQF.js → styles-Mm1WitR1.js} +1 -1
  297. package/vg/es/{styles-CFzBy5b9.js → styles-gPJ19t67.js} +1 -1
  298. package/{bt/es/styles-VWcrgyF-.js → vg/es/styles-gUWXxhs6.js} +1 -1
  299. package/vg/es/{styles-C57iKHBK.js → styles-gbRx5TBW.js} +1 -1
  300. package/vgv2/es/_auto-entry_vgv2-DcMSsK7I.js +1 -0
  301. package/vgv2/es/{events-DQrgkrtZ.js → events-CbYlhHdS.js} +1 -1
  302. package/vgv2/es/{index-CyFptD50.js → index-BOuAoWaz.js} +1 -1
  303. package/vgv2/es/{index-DKL_UxWW.js → index-BkOJekt_.js} +1 -1
  304. package/vgv2/es/{index-C7UmytTB.js → index-BlRGr3Dm.js} +1 -1
  305. package/vgv2/es/{index-D-L-68nH.js → index-D5fU51zY.js} +1 -1
  306. package/vgv2/es/{index-DpGZ6Qy1.js → index-DyttIDdn.js} +1 -1
  307. package/vgv2/es/{index-D2c6CNMO.js → index-cUI_MUN6.js} +1 -1
  308. package/vgv2/es/{index-BsbQbbLL.js → index-klHcuLjs.js} +1 -1
  309. package/vgv2/es/{index-CsWjy0nP.js → index-u92vc7dj.js} +1 -1
  310. package/vgv2/es/index.js +1 -1
  311. package/vgv2/es/{styles-BZ6R4Cta.js → styles-BLubo9Bp.js} +1 -1
  312. package/vgv2/es/{styles-CmIv2nA5.js → styles-BT_VTSD-.js} +1 -1
  313. package/{btv2/es/styles-1ccH2_0E.js → vgv2/es/styles-BctjGJwA.js} +1 -1
  314. package/vgv2/es/{styles-CEZvQ0yR.js → styles-Bfu3dSV_.js} +1 -1
  315. package/vgv2/es/{styles-DLajemP4.js → styles-C0hhsVb0.js} +1 -1
  316. package/vgv2/es/{styles-C3o4VBe7.js → styles-C9HM66T0.js} +1 -1
  317. package/{btv2/es/styles-CLrNsJNG.js → vgv2/es/styles-Ci7iXNLj.js} +1 -1
  318. package/vgv2/es/{styles-BcAsg-p5.js → styles-CidTlAlB.js} +1 -1
  319. package/vgv2/es/{styles-BcbDxXWF.js → styles-D2ZPwGu7.js} +1 -1
  320. package/vgv2/es/{styles-B7Pt1sHE.js → styles-D3xxSj65.js} +1 -1
  321. package/vgv2/es/{styles-kbvRAbcm.js → styles-D8XUKIYz.js} +1 -1
  322. package/vgv2/es/{styles-DHgg-Bq2.js → styles-DZxPQN4T.js} +1 -1
  323. package/{btv2/es/styles-CKoeXLY-.js → vgv2/es/styles-DvRCmjdM.js} +1 -1
  324. package/vgv2/es/{styles-AolPFBXK.js → styles-DvRMHT7W.js} +1 -1
  325. package/vgv2/es/{styles-C0jG0YmH.js → styles-Vcv7SAHX.js} +1 -1
  326. package/video/cjs/index.js +1 -1
  327. package/video/es/index.js +1 -1
  328. package/aftenposten/es/_auto-entry_aftenposten-BWVHX_dR.js +0 -1
  329. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BPR2QCdL.js +0 -1
  330. package/aftonbladet/es/_auto-entry_aftonbladet-CQFYKsWd.js +0 -1
  331. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-ecI7HhuB.js +0 -1
  332. package/bt/es/_auto-entry_bt-DNfUcUzB.js +0 -1
  333. package/btv2/es/_auto-entry_btv2-BQRePf9J.js +0 -1
  334. package/e24/es/_auto-entry_e24-DTlP0xtS.js +0 -1
  335. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DAgIUSHM.js +0 -1
  336. package/koket/es/_auto-entry_koket-CtflJ85C.js +0 -1
  337. package/sa/es/_auto-entry_sa-dcJlXx1N.js +0 -1
  338. package/sav2/es/_auto-entry_sav2-wlTjDJL2.js +0 -1
  339. package/svd/es/_auto-entry_svd-D4S7UpT_.js +0 -1
  340. package/svdv2/es/_auto-entry_svdv2-CFiE0z1M.js +0 -1
  341. package/tv4/es/_auto-entry_tv4-D8L10tTo.js +0 -1
  342. package/vg/es/_auto-entry_vg-BOJf3ej1.js +0 -1
  343. package/vgv2/es/_auto-entry_vgv2-D9t5nfSh.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}=null==e?void 0: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={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};