@schibsted/advertory 3.5.0 → 3.6.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 (378) hide show
  1. package/ad-native/cjs/index.d.ts +6 -27
  2. package/ad-native/es/index.d.ts +6 -27
  3. package/aftenposten/cjs/index.d.ts +6 -27
  4. package/aftenposten/cjs/index.js +1 -1
  5. package/aftenposten/es/_auto-entry_aftenposten-DRy582No.js +1 -0
  6. package/aftenposten/es/{events-BdUUv4z9.js → events-C9C7urqL.js} +1 -1
  7. package/aftenposten/es/{index-pwlm_8K9.js → index-BkS_SJlJ.js} +1 -1
  8. package/aftenposten/es/{index-B0GbVMVf.js → index-BnqSaT1c.js} +1 -1
  9. package/aftenposten/es/{index-DapT0kRB.js → index-C3FOilzo.js} +1 -1
  10. package/aftenposten/es/{index-C_ljmtA9.js → index-CydB8YIr.js} +1 -1
  11. package/aftenposten/es/{index-DKtW-pTb.js → index-DORsiGYv.js} +1 -1
  12. package/aftenposten/es/{index-ChQz2fSU.js → index-DeI8d-uV.js} +1 -1
  13. package/aftenposten/es/{index-cS_ROIVL.js → index-DwPGsi8k.js} +1 -1
  14. package/aftenposten/es/{index-DkhtWF8d.js → index-cQE0VJo1.js} +1 -1
  15. package/aftenposten/es/index.d.ts +6 -27
  16. package/aftenposten/es/index.js +1 -1
  17. package/aftenposten/es/{styles-Dmx2lehx.js → styles-80njiXh8.js} +1 -1
  18. package/aftenposten/es/{styles-C8Zgiulr.js → styles-9muMJKJn.js} +1 -1
  19. package/aftenposten/es/{styles-e0EN2V-x.js → styles-B0TjAFsC.js} +1 -1
  20. package/aftenposten/es/{styles-BQ-lJJ7T.js → styles-BqDARxy2.js} +1 -1
  21. package/aftenposten/es/{styles-B8dOeQvd.js → styles-C-mBJ4KF.js} +1 -1
  22. package/aftenposten/es/{styles-R1ul5aQy.js → styles-CH01dhZI.js} +1 -1
  23. package/aftenposten/es/{styles-poVB2pbH.js → styles-CQkWKgtJ.js} +1 -1
  24. package/aftenposten/es/{styles-Dd4NzezP.js → styles-CkwzAwsB.js} +1 -1
  25. package/aftenposten/es/{styles-CvqBpTZq.js → styles-DwsygbnU.js} +1 -1
  26. package/aftenposten/es/{styles-Cf0KXpQR.js → styles-s1wxb2F_.js} +1 -1
  27. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CXrYo3kj.js +1 -0
  28. package/aftenpostenv2/es/{events-DcWIew6H.js → events-ByEM8ZeV.js} +1 -1
  29. package/aftenpostenv2/es/{index-DZzhmxxW.js → index-B0U7ps9y.js} +1 -1
  30. package/aftenpostenv2/es/{index-CcSUoH4K.js → index-BZciKqap.js} +1 -1
  31. package/aftenpostenv2/es/{index-C7WYLENT.js → index-CxmBWC8z.js} +1 -1
  32. package/aftenpostenv2/es/{index-DF_5taAR.js → index-Dp17754Z.js} +1 -1
  33. package/aftenpostenv2/es/{index-Dcvv755W.js → index-DzW5W5w1.js} +1 -1
  34. package/aftenpostenv2/es/{index-lNsi3PkQ.js → index-T22foY0A.js} +1 -1
  35. package/aftenpostenv2/es/{index-CrKzCfAy.js → index-TeY0tmGM.js} +1 -1
  36. package/aftenpostenv2/es/{index-AopMILqF.js → index-Vv6YGuEQ.js} +1 -1
  37. package/aftenpostenv2/es/index.d.ts +6 -27
  38. package/aftenpostenv2/es/index.js +1 -1
  39. package/aftenpostenv2/es/{styles-DJS8FgJN.js → styles-2437hpxv.js} +1 -1
  40. package/aftenpostenv2/es/{styles-BAw6-DTz.js → styles-B9yGGUxs.js} +1 -1
  41. package/aftenpostenv2/es/{styles-Bj5ghS1X.js → styles-CE4ljrOq.js} +1 -1
  42. package/aftenpostenv2/es/{styles-P6wiFv7t.js → styles-CFIY_fYs.js} +1 -1
  43. package/aftenpostenv2/es/{styles-BM1Sl2Gt.js → styles-C_hqfq3h.js} +1 -1
  44. package/aftenpostenv2/es/{styles-BDLsV2h0.js → styles-CwOFrT-m.js} +1 -1
  45. package/aftenpostenv2/es/{styles-IW7sRlQb.js → styles-DVb70HkY.js} +1 -1
  46. package/aftenpostenv2/es/{styles-BtZEv20p.js → styles-Dv3iE5E9.js} +1 -1
  47. package/aftenpostenv2/es/{styles-DE8b2eKw.js → styles-U1MbgnO8.js} +1 -1
  48. package/aftenpostenv2/es/{styles-CIIzxpxi.js → styles-gvMqFZ6Z.js} +1 -1
  49. package/aftonbladet/cjs/index.d.ts +6 -27
  50. package/aftonbladet/cjs/index.js +1 -1
  51. package/aftonbladet/es/_auto-entry_aftonbladet-B5rZbU4l.js +1 -0
  52. package/aftonbladet/es/{events-IGtjvn9p.js → events-BbyNwvht.js} +1 -1
  53. package/aftonbladet/es/{index-CHU0K-b3.js → index-B2yfV01q.js} +1 -1
  54. package/aftonbladet/es/{index-BhKqdx8_.js → index-BG8DyJ9Q.js} +1 -1
  55. package/aftonbladet/es/{index-Caooy7VZ.js → index-BdoEltYH.js} +1 -1
  56. package/aftonbladet/es/{index-D6pMj_OI.js → index-BjfZKgVs.js} +1 -1
  57. package/aftonbladet/es/{index-CxookX-2.js → index-CYq72Epp.js} +1 -1
  58. package/aftonbladet/es/{index-BJEVa6xU.js → index-D-SooPyf.js} +1 -1
  59. package/aftonbladet/es/{index-CWKXxJLi.js → index-D7OZ0aH_.js} +1 -1
  60. package/aftonbladet/es/{index-D3BbAZHM.js → index-DJjSX67L.js} +1 -1
  61. package/aftonbladet/es/index.d.ts +6 -27
  62. package/aftonbladet/es/index.js +1 -1
  63. package/aftonbladet/es/{styles-CneLnMG-.js → styles-BGJhp99G.js} +1 -1
  64. package/aftonbladet/es/{styles-BbdwnbjB.js → styles-BivTRwAi.js} +1 -1
  65. package/aftonbladet/es/{styles-l3rELDcP.js → styles-CGvjrVhR.js} +1 -1
  66. package/aftonbladet/es/{styles-vt9VlFI1.js → styles-COq02SIe.js} +1 -1
  67. package/aftonbladet/es/{styles-DYVEy61p.js → styles-D4zAPI1T.js} +1 -1
  68. package/aftonbladet/es/{styles-B_1G3J8x.js → styles-_AmB2_Ug.js} +1 -1
  69. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-yMuDMPYm.js +1 -0
  70. package/aftonbladetv2/es/{events-DUSi9AAZ.js → events-Be3bdEHm.js} +1 -1
  71. package/aftonbladetv2/es/{index-CZlvEwnW.js → index-8t-IGjUw.js} +1 -1
  72. package/aftonbladetv2/es/{index-ChmNC_fC.js → index-BjpGqbjh.js} +1 -1
  73. package/aftonbladetv2/es/{index-DfBkkkvU.js → index-C82MmKIC.js} +1 -1
  74. package/aftonbladetv2/es/{index-BLCl5ZdU.js → index-CO_dweCr.js} +1 -1
  75. package/aftonbladetv2/es/{index-GJk0lNdn.js → index-CWUPQnPC.js} +1 -1
  76. package/aftonbladetv2/es/{index-CdYhVWhS.js → index-DE5y5asp.js} +1 -1
  77. package/aftonbladetv2/es/{index-Jfir0E9v.js → index-DgEEfQ4V.js} +1 -1
  78. package/aftonbladetv2/es/{index-Bcz4aUWR.js → index-vUqiPpRV.js} +1 -1
  79. package/aftonbladetv2/es/index.d.ts +6 -27
  80. package/aftonbladetv2/es/index.js +1 -1
  81. package/aftonbladetv2/es/{styles-C2EUpfcA.js → styles-8negJCpa.js} +1 -1
  82. package/aftonbladetv2/es/{styles-D8Ya94d4.js → styles-BEJZ55UE.js} +1 -1
  83. package/aftonbladetv2/es/{styles-CTR9osUQ.js → styles-BRoq235i.js} +1 -1
  84. package/aftonbladetv2/es/{styles-BW540-He.js → styles-CDUOKDqP.js} +1 -1
  85. package/aftonbladetv2/es/{styles-Ckoizx2L.js → styles-CdOpQ1lK.js} +1 -1
  86. package/aftonbladetv2/es/{styles-CGV7U9oK.js → styles-DZXuPYK-.js} +1 -1
  87. package/bt/cjs/index.d.ts +6 -27
  88. package/bt/cjs/index.js +1 -1
  89. package/bt/es/_auto-entry_bt-CnDc-5tA.js +1 -0
  90. package/bt/es/{events-e79PURVK.js → events-pbsfBMud.js} +1 -1
  91. package/bt/es/{index-BCITuOKt.js → index-10o0F1pU.js} +1 -1
  92. package/bt/es/{index-B4efIi6B.js → index-CB1ozKI0.js} +1 -1
  93. package/bt/es/{index-Ble0HNAL.js → index-CBRfC8oj.js} +1 -1
  94. package/bt/es/{index-CfGTqWHB.js → index-CGQ4Pl9E.js} +1 -1
  95. package/bt/es/{index-VicIknhs.js → index-LRR9-Efh.js} +1 -1
  96. package/bt/es/{index-DkfBi2Yr.js → index-YRhOwnMQ.js} +1 -1
  97. package/bt/es/{index-Br2GZL3S.js → index-unOIp1lu.js} +1 -1
  98. package/{sa/es/index-CsLiSVuW.js → bt/es/index-xozUOz97.js} +1 -1
  99. package/bt/es/index.d.ts +6 -27
  100. package/bt/es/index.js +1 -1
  101. package/bt/es/{styles-UB5Sj-JP.js → styles-B5Q64krs.js} +1 -1
  102. package/bt/es/{styles-1fY0S9gh.js → styles-BZO-cpQq.js} +1 -1
  103. package/bt/es/{styles-BRkymHpC.js → styles-BpCvYBjb.js} +1 -1
  104. package/bt/es/{styles-DbidWe0Z.js → styles-Cpv7xnJr.js} +1 -1
  105. package/{sa/es/styles-C265I3ui.js → bt/es/styles-DEhknitf.js} +1 -1
  106. package/bt/es/{styles-BQ6Zagkv.js → styles-DMVxTKWi.js} +1 -1
  107. package/bt/es/{styles-V6NyO8CO.js → styles-DdjMnoRQ.js} +1 -1
  108. package/{sa/es/styles-DmxGH8LS.js → bt/es/styles-Dzo0F2pC.js} +1 -1
  109. package/bt/es/{styles-DDXhGRHY.js → styles-a9BNs9Hq.js} +1 -1
  110. package/btv2/es/_auto-entry_btv2-Br28Rkuw.js +1 -0
  111. package/btv2/es/{events-DWbA1yJI.js → events-BkiRy_Ug.js} +1 -1
  112. package/btv2/es/{index-CbKhLQ71.js → index-6ynUsW2j.js} +1 -1
  113. package/btv2/es/{index-D95XQOb1.js → index-96JPKWtS.js} +1 -1
  114. package/btv2/es/{index-CmYG9TmN.js → index-BdTWdaSz.js} +1 -1
  115. package/btv2/es/{index-Dc3aKlrr.js → index-CSvnRSDB.js} +1 -1
  116. package/btv2/es/{index-DShbLut5.js → index-CiEuFLju.js} +1 -1
  117. package/btv2/es/{index-D-VoD7Rn.js → index-CxqQHs2I.js} +1 -1
  118. package/btv2/es/{index-DllNqk9Z.js → index-Dbtbms4R.js} +1 -1
  119. package/btv2/es/{index-CMIm7eJa.js → index-tpv3zSXV.js} +1 -1
  120. package/btv2/es/index.d.ts +6 -27
  121. package/btv2/es/index.js +1 -1
  122. package/{vgv2/es/styles-Cr5Fs5YF.js → btv2/es/styles-4acKP-vS.js} +1 -1
  123. package/{sav2/es/styles-BH4mt2Zh.js → btv2/es/styles-5MLqt1cS.js} +1 -1
  124. package/{sav2/es/styles-CdHzLcOB.js → btv2/es/styles-BiFfLo8O.js} +1 -1
  125. package/{sav2/es/styles-0zU2Afam.js → btv2/es/styles-CLAANEHj.js} +1 -1
  126. package/{sav2/es/styles-CCVahElC.js → btv2/es/styles-Cn0AvhaU.js} +1 -1
  127. package/{vgv2/es/styles-Dt3_EHGE.js → btv2/es/styles-DoxT4Rpe.js} +1 -1
  128. package/btv2/es/{styles-Beb5i1JJ.js → styles-FCKiIT56.js} +1 -1
  129. package/btv2/es/{styles-CzOVz7GX.js → styles-M3do-e6G.js} +1 -1
  130. package/dr-edition/cjs/index.d.ts +6 -13
  131. package/dr-edition/cjs/index.js +1 -1
  132. package/dr-edition/es/index.d.ts +6 -13
  133. package/dr-edition/es/index.js +1 -1
  134. package/e24/es/_auto-entry_e24-BXEl1rLt.js +1 -0
  135. package/e24/es/{events-8oWxK8Fm.js → events-Df12jcjq.js} +1 -1
  136. package/e24/es/{index-BJWHHKPL.js → index-4DwbOKHX.js} +1 -1
  137. package/e24/es/{index-7zdjryBD.js → index-5AxjPEeO.js} +1 -1
  138. package/e24/es/{index-Oewlw7Sn.js → index-BeRC9YaL.js} +1 -1
  139. package/e24/es/{index-DG1bJJNc.js → index-CbclshF7.js} +1 -1
  140. package/{tv4/es/index-D_WaHIAK.js → e24/es/index-CyTyxMlY.js} +1 -1
  141. package/e24/es/{index-DGv329Av.js → index-DVso5CpT.js} +1 -1
  142. package/e24/es/{index-BUkXE3O2.js → index-DY79nObF.js} +1 -1
  143. package/e24/es/{index-B4CZvSXL.js → index-boY00MWk.js} +1 -1
  144. package/e24/es/index.d.ts +6 -27
  145. package/e24/es/index.js +1 -1
  146. package/e24/es/{styles-CLbzPfFd.js → styles-BnU3rand.js} +1 -1
  147. package/e24/es/{styles-D-IZsxVS.js → styles-BvaDTUig.js} +1 -1
  148. package/e24/es/{styles-BQNdcZSJ.js → styles-CEJZ6EtK.js} +1 -1
  149. package/e24/es/{styles-DjQsLdnn.js → styles-Cf5yeLFb.js} +1 -1
  150. package/e24/es/{styles-VEo6IZcm.js → styles-D3tm4qWR.js} +1 -1
  151. package/e24/es/{styles-NQUQlHqi.js → styles-DFTviKUt.js} +1 -1
  152. package/e24/es/{styles-CcOkuOfr.js → styles-DxT7w3qt.js} +1 -1
  153. package/e24/es/{styles-D7k76BFk.js → styles-Dzv8j5Mc.js} +1 -1
  154. package/e24/es/{styles-Dieie13I.js → styles-VzILOixk.js} +1 -1
  155. package/{tv4/es/styles-B9dFHoiV.js → e24/es/styles-WK8ASD47.js} +1 -1
  156. package/e24/es/{styles-Dbpp0W0o.js → styles-ZNG2Qej-.js} +1 -1
  157. package/editory/cjs/index.d.ts +6 -27
  158. package/editory/es/index.d.ts +6 -27
  159. package/fotbollskanalen/cjs/index.d.ts +6 -27
  160. package/fotbollskanalen/cjs/index.js +1 -1
  161. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DmWPi7Jf.js +1 -0
  162. package/fotbollskanalen/es/{events-FpRT23ZZ.js → events-B3ZU1LUw.js} +1 -1
  163. package/fotbollskanalen/es/{index-Byq7YtvA.js → index-B2k25BEc.js} +1 -1
  164. package/fotbollskanalen/es/{index-DDGOVmpS.js → index-B9qRzvev.js} +1 -1
  165. package/fotbollskanalen/es/{index-BHG4pc98.js → index-BnfmazmK.js} +1 -1
  166. package/fotbollskanalen/es/{index-B5NH2IkJ.js → index-CBwVsPYL.js} +1 -1
  167. package/fotbollskanalen/es/{index-DxE0VElJ.js → index-CRGyYdc3.js} +1 -1
  168. package/fotbollskanalen/es/{index-BUPmcSlI.js → index-CkTyreXG.js} +1 -1
  169. package/fotbollskanalen/es/{index-CFC2qCZk.js → index-Dul3Mfgg.js} +1 -1
  170. package/fotbollskanalen/es/{index-g58X-f96.js → index-IPyvHxTb.js} +1 -1
  171. package/fotbollskanalen/es/index.d.ts +6 -27
  172. package/fotbollskanalen/es/index.js +1 -1
  173. package/fotbollskanalen/es/{styles-CLQOoJGF.js → styles-DrADmvb2.js} +1 -1
  174. package/godt/cjs/index.d.ts +6 -27
  175. package/godt/cjs/index.js +1 -1
  176. package/kilkaya/cjs/index.d.ts +5 -27
  177. package/kilkaya/es/index.d.ts +5 -27
  178. package/klart/cjs/index.d.ts +6 -27
  179. package/klart/cjs/index.js +1 -1
  180. package/koket/cjs/index.d.ts +6 -27
  181. package/koket/cjs/index.js +1 -1
  182. package/koket/es/_auto-entry_koket-DeF09zwU.js +1 -0
  183. package/koket/es/{events-C5iJPAr5.js → events-CA87816N.js} +1 -1
  184. package/{svdv2/es/index-DKgFd8BC.js → koket/es/index-B73Rktog.js} +1 -1
  185. package/koket/es/{index-8lrNvRkU.js → index-BKARuv6H.js} +1 -1
  186. package/koket/es/{index-BeO4rcvy.js → index-BeVRG0em.js} +1 -1
  187. package/koket/es/{index-CFuuJHk_.js → index-BwFjCDEc.js} +1 -1
  188. package/koket/es/{index-G9hUyJfl.js → index-CjAvTmMP.js} +1 -1
  189. package/koket/es/{index-BhiCfvRb.js → index-D4uWONVv.js} +1 -1
  190. package/koket/es/{index-BTa20fDA.js → index-D55dsLBV.js} +1 -1
  191. package/koket/es/{index-CUnZcQ5_.js → index-DJNFb_Jk.js} +1 -1
  192. package/koket/es/index.d.ts +6 -27
  193. package/koket/es/index.js +1 -1
  194. package/{svdv2/es/styles-CGPf0BAr.js → koket/es/styles-B8SdZ5io.js} +1 -1
  195. package/minmote/cjs/index.d.ts +6 -27
  196. package/minmote/cjs/index.js +1 -1
  197. package/package.json +1 -1
  198. package/pent/cjs/index.d.ts +6 -27
  199. package/pent/cjs/index.js +1 -1
  200. package/sa/cjs/index.d.ts +6 -27
  201. package/sa/cjs/index.js +1 -1
  202. package/sa/es/_auto-entry_sa-BAbSOW6y.js +1 -0
  203. package/sa/es/{events-Czp1Bf7L.js → events-CQr7o7mK.js} +1 -1
  204. package/sa/es/{index-BlWGftLo.js → index-Bp0FlYj4.js} +1 -1
  205. package/sa/es/{index-DRrfqemd.js → index-BpsmpJX6.js} +1 -1
  206. package/sa/es/{index-BK2Woo0V.js → index-CNOm0Zvv.js} +1 -1
  207. package/sa/es/{index-DVJ3uiHQ.js → index-DX8zLkcC.js} +1 -1
  208. package/sa/es/{index-RJ0AwbAy.js → index-DbxvaQTc.js} +1 -1
  209. package/{bt/es/index-q6gQRPQi.js → sa/es/index-DiAcKl0S.js} +1 -1
  210. package/sa/es/{index-B6QpNnPz.js → index-FxBHhBpN.js} +1 -1
  211. package/sa/es/{index-BgzaHxEB.js → index-bdVJz39p.js} +1 -1
  212. package/sa/es/index.d.ts +6 -27
  213. package/sa/es/index.js +1 -1
  214. package/sa/es/{styles-BIEPgknJ.js → styles-Bdm5gig8.js} +1 -1
  215. package/sa/es/{styles-x_RZ8LfI.js → styles-BwOfPT8j.js} +1 -1
  216. package/{vg/es/styles-CDe9glwP.js → sa/es/styles-Ck-s8aFw.js} +1 -1
  217. package/sa/es/{styles-DbqMID7Q.js → styles-CqUSV7ll.js} +1 -1
  218. package/sa/es/{styles-BZbbl3__.js → styles-CvadVFAo.js} +1 -1
  219. package/sa/es/{styles-BvK_Hm8A.js → styles-D65Pg6EJ.js} +1 -1
  220. package/sa/es/{styles-DE-5r6jI.js → styles-DDcLvb2o.js} +1 -1
  221. package/{vg/es/styles-BxHcjj-n.js → sa/es/styles-DEjree18.js} +1 -1
  222. package/{bt/es/styles-C6Hn-Ylj.js → sa/es/styles-DZXqLTj3.js} +1 -1
  223. package/sav2/es/_auto-entry_sav2-CRnV3rZ2.js +1 -0
  224. package/sav2/es/{events-BI8lwyAS.js → events-DzwqUdEh.js} +1 -1
  225. package/sav2/es/{index-Dm0CwDko.js → index-14YfQ5Vr.js} +1 -1
  226. package/sav2/es/{index-Dd4x--40.js → index-38SjBDT2.js} +1 -1
  227. package/sav2/es/{index-jUIaqg6x.js → index-4sqWaTaf.js} +1 -1
  228. package/sav2/es/{index-VFT0zh22.js → index-B9ab_exe.js} +1 -1
  229. package/sav2/es/{index-CFYdF9nM.js → index-C1PhEl88.js} +1 -1
  230. package/sav2/es/{index-BgPfftGv.js → index-CbfYCeKr.js} +1 -1
  231. package/sav2/es/{index-GTPIp0mQ.js → index-DUEqQmBJ.js} +1 -1
  232. package/sav2/es/{index-BQ8oAuHr.js → index-_tdwh7iG.js} +1 -1
  233. package/sav2/es/index.d.ts +6 -27
  234. package/sav2/es/index.js +1 -1
  235. package/sav2/es/{styles-Lru4uD64.js → styles-BP4c8b71.js} +1 -1
  236. package/{btv2/es/styles-BIeAmWTL.js → sav2/es/styles-BquGVxXw.js} +1 -1
  237. package/sav2/es/{styles-BR_5kDUe.js → styles-BuEo0j8F.js} +1 -1
  238. package/{vgv2/es/styles-BVfmnN3W.js → sav2/es/styles-CSib2wFT.js} +1 -1
  239. package/sav2/es/{styles-BMp80jah.js → styles-CVOyC0Hy.js} +1 -1
  240. package/{btv2/es/styles-DjvA7hfT.js → sav2/es/styles-D84Umkht.js} +1 -1
  241. package/sav2/es/{styles-CZnBwaC3.js → styles-DQgdRzKf.js} +1 -1
  242. package/{btv2/es/styles-es1ee8SC.js → sav2/es/styles-wpXGtNVU.js} +1 -1
  243. package/svd/cjs/index.d.ts +6 -27
  244. package/svd/cjs/index.js +1 -1
  245. package/svd/es/_auto-entry_svd-C6TfzEqZ.js +1 -0
  246. package/svd/es/{events-CWFgkDG1.js → events-D7UqxiPo.js} +1 -1
  247. package/{e24/es/index-fEZDTay_.js → svd/es/index-B114sh1q.js} +1 -1
  248. package/svd/es/{index-BP41ecWy.js → index-CFnnxX9d.js} +1 -1
  249. package/svd/es/{index-BKe3qaf7.js → index-CQCYYjIO.js} +1 -1
  250. package/svd/es/{index-D5ggf8Xp.js → index-CXVjdJfX.js} +1 -1
  251. package/svd/es/{index-Bya6Uq5B.js → index-DAojgc2F.js} +1 -1
  252. package/svd/es/{index-CCt9DWBH.js → index-DWNMB-6h.js} +1 -1
  253. package/svd/es/{index-BcNPzl4P.js → index-Din3zIPs.js} +1 -1
  254. package/svd/es/{index-C3cDOsuZ.js → index-DlW-FUIo.js} +1 -1
  255. package/svd/es/index.d.ts +6 -27
  256. package/svd/es/index.js +1 -1
  257. package/svd/es/{styles-BWNs7vrn.js → styles-BV30fi5B.js} +1 -1
  258. package/svd/es/{styles-CcAVJGfE.js → styles-Bt0L4xU3.js} +1 -1
  259. package/svd/es/{styles-u3GakbDH.js → styles-DSLLwXoo.js} +1 -1
  260. package/svd/es/{styles-CI0tJc6e.js → styles-Dp2-I0FM.js} +1 -1
  261. package/svd/es/{styles-C7-tNUeS.js → styles-a0evvwP0.js} +1 -1
  262. package/svd/es/{styles-DUN-Sq2Q.js → styles-ocLsivmt.js} +1 -1
  263. package/svdv2/es/_auto-entry_svdv2-BcxtA5H5.js +1 -0
  264. package/svdv2/es/{events-CbogHJk0.js → events-DkpF1OVt.js} +1 -1
  265. package/svdv2/es/{index-DQEHhVgW.js → index-BNSx3ZEA.js} +1 -1
  266. package/svdv2/es/{index-BnEvrjDt.js → index-C7YoinwT.js} +1 -1
  267. package/svdv2/es/{index-aN0srUEo.js → index-Dbmwj6UJ.js} +1 -1
  268. package/{koket/es/index-DFkHEsQ5.js → svdv2/es/index-Dr9YS9Kp.js} +1 -1
  269. package/svdv2/es/{index-LihWROT2.js → index-JL0kyJm9.js} +1 -1
  270. package/svdv2/es/{index-4lmCFsSW.js → index-JQzzmtfN.js} +1 -1
  271. package/svdv2/es/{index-DaAnuF-t.js → index-blcrdGFA.js} +1 -1
  272. package/svdv2/es/{index-D3McYvBy.js → index-yWxbTBYY.js} +1 -1
  273. package/svdv2/es/index.d.ts +6 -27
  274. package/svdv2/es/index.js +1 -1
  275. package/{koket/es/styles-BQIPgsRh.js → svdv2/es/styles-B1n7-3GW.js} +1 -1
  276. package/svdv2/es/{styles-tlqB4rsT.js → styles-BlXdm2-y.js} +1 -1
  277. package/svdv2/es/{styles-P6IOCdoC.js → styles-BukOlMgV.js} +1 -1
  278. package/svdv2/es/{styles-Eh1GkHPx.js → styles-ByR8L2Dq.js} +1 -1
  279. package/svdv2/es/{styles-CKXTdzs6.js → styles-CEvkNQZ3.js} +1 -1
  280. package/svdv2/es/{styles-Dci-bvKU.js → styles-UmufiLeH.js} +1 -1
  281. package/tek/cjs/index.d.ts +6 -27
  282. package/tek/cjs/index.js +1 -1
  283. package/tracker/cjs/index.d.ts +6 -27
  284. package/tracker/cjs/index.js +1 -1
  285. package/tracker/es/index.d.ts +6 -27
  286. package/tracker/es/index.js +1 -1
  287. package/tv4/cjs/index.d.ts +6 -27
  288. package/tv4/cjs/index.js +1 -1
  289. package/tv4/es/_auto-entry_tv4-DsO-wqRO.js +1 -0
  290. package/tv4/es/{events-Bn0rJup8.js → events-4DkzCgrU.js} +1 -1
  291. package/tv4/es/{index-B6yq5Gyv.js → index-B6ag97Bw.js} +1 -1
  292. package/tv4/es/{index-gT_GHXn7.js → index-BQo7w0nT.js} +1 -1
  293. package/tv4/es/{index-BJji2ATp.js → index-BksRxrvK.js} +1 -1
  294. package/tv4/es/{index-BkFrwx_r.js → index-CPNVZLfK.js} +1 -1
  295. package/tv4/es/{index-BPa0_w5G.js → index-C_duha9o.js} +1 -1
  296. package/tv4/es/{index-BWEU3m94.js → index-DCgJvntT.js} +1 -1
  297. package/tv4/es/{index-Cq1qeKSR.js → index-GDlvM-pA.js} +1 -1
  298. package/{svd/es/index-CLVC_R25.js → tv4/es/index-R0DJReD8.js} +1 -1
  299. package/tv4/es/index.d.ts +6 -27
  300. package/tv4/es/index.js +1 -1
  301. package/{e24/es/styles-IKoxXgO0.js → tv4/es/styles-CpFHpgiA.js} +1 -1
  302. package/tvnu/cjs/index.d.ts +6 -27
  303. package/tvnu/cjs/index.js +1 -1
  304. package/types/index.d.ts +6 -27
  305. package/vg/cjs/index.d.ts +6 -27
  306. package/vg/cjs/index.js +1 -1
  307. package/vg/es/_auto-entry_vg-5Fd4iVl3.js +1 -0
  308. package/vg/es/{events-BsbXyYJY.js → events-GNcxmmFo.js} +1 -1
  309. package/vg/es/{index-CbihXkGs.js → index-7HsThj3q.js} +1 -1
  310. package/vg/es/{index-zknvo2nh.js → index-B20ShDSB.js} +1 -1
  311. package/vg/es/{index-DRb6TbCy.js → index-BdKcLkzi.js} +1 -1
  312. package/vg/es/{index-BjFWFokY.js → index-BvlbZzc8.js} +1 -1
  313. package/vg/es/{index-DXTyIRph.js → index-CHYiiXpY.js} +1 -1
  314. package/vg/es/{index-B0l-K3Nm.js → index-D7eOCUrJ.js} +1 -1
  315. package/vg/es/{index-Bf04WCFs.js → index-DAIjI6Xf.js} +1 -1
  316. package/vg/es/{index-DiHKSlZN.js → index-Dx0-EJRL.js} +1 -1
  317. package/vg/es/index.d.ts +6 -27
  318. package/vg/es/index.js +1 -1
  319. package/vg/es/{styles-CpI8Vlow.js → styles-9iOhmpQG.js} +1 -1
  320. package/vg/es/{styles-VY3hon_C.js → styles-B5RVrjQu.js} +1 -1
  321. package/vg/es/{styles-BexolDY4.js → styles-BErBnM5w.js} +1 -1
  322. package/vg/es/{styles-CIXqdJYT.js → styles-BJjHhcVd.js} +1 -1
  323. package/vg/es/{styles-ByLB3fAX.js → styles-BV2uz0rS.js} +1 -1
  324. package/vg/es/{styles-DP0QUZVe.js → styles-BVJJ_nnN.js} +1 -1
  325. package/vg/es/{styles-DthpO9K3.js → styles-BYlo20Oa.js} +1 -1
  326. package/vg/es/{styles-fArum_w2.js → styles-BvIBq9wk.js} +1 -1
  327. package/vg/es/{styles-b8Bmj5zP.js → styles-C5Ty1y5b.js} +1 -1
  328. package/{sa/es/styles-CgQ3pAiP.js → vg/es/styles-C7uK6z6P.js} +1 -1
  329. package/{bt/es/styles-DNutfDj8.js → vg/es/styles-DhxL-Kdf.js} +1 -1
  330. package/vg/es/{styles-CWBxD9zM.js → styles-F51u_KzR.js} +1 -1
  331. package/vg/es/{styles-BUtIGfqi.js → styles-F_EI0-R4.js} +1 -1
  332. package/vg/es/{styles-B63x2SpC.js → styles-k2ioKG8W.js} +1 -1
  333. package/vg/es/{styles-DxISXjJx.js → styles-mRZXwsl_.js} +1 -1
  334. package/vgv2/es/_auto-entry_vgv2-VQkwNK6O.js +1 -0
  335. package/vgv2/es/{events-B9GLUG_c.js → events-umppYZ48.js} +1 -1
  336. package/vgv2/es/{index-CRmtQ0Ln.js → index-B80fFKEp.js} +1 -1
  337. package/vgv2/es/{index-CFD6e815.js → index-ByTqOSor.js} +1 -1
  338. package/vgv2/es/{index-CWzszIrQ.js → index-C755Omrb.js} +1 -1
  339. package/vgv2/es/{index-BPI8SWbT.js → index-D9DCQDzE.js} +1 -1
  340. package/vgv2/es/{index-C1qvZ43-.js → index-DRyZUuLI.js} +1 -1
  341. package/vgv2/es/{index-gk_94DrP.js → index-Dh6g8FK2.js} +1 -1
  342. package/vgv2/es/{index-DNJnGBOC.js → index-JRUgEAmx.js} +1 -1
  343. package/vgv2/es/{index-BrQmd96n.js → index-gZmFckTC.js} +1 -1
  344. package/vgv2/es/index.d.ts +6 -27
  345. package/vgv2/es/index.js +1 -1
  346. package/{btv2/es/styles--PBvFHeQ.js → vgv2/es/styles-64VQBzw7.js} +1 -1
  347. package/vgv2/es/{styles-BypJiXcH.js → styles-B-nkSOeh.js} +1 -1
  348. package/vgv2/es/{styles-BveOiWvC.js → styles-BAYB1_6J.js} +1 -1
  349. package/{btv2/es/styles-BFs5C1e2.js → vgv2/es/styles-BGK9zDgq.js} +1 -1
  350. package/vgv2/es/{styles-Ca6cxxB-.js → styles-BNZNX1uK.js} +1 -1
  351. package/vgv2/es/{styles-Ze0zbpIu.js → styles-C5mWX7Pu.js} +1 -1
  352. package/vgv2/es/{styles-C7Zup_OS.js → styles-CYOT98OO.js} +1 -1
  353. package/vgv2/es/{styles-DNcC9ILz.js → styles-D-8BgKu3.js} +1 -1
  354. package/vgv2/es/{styles-DpUl3Suf.js → styles-DIkzDo-C.js} +1 -1
  355. package/vgv2/es/{styles-CXtejXaY.js → styles-DKDSQL-H.js} +1 -1
  356. package/{btv2/es/styles-kWtSX6kZ.js → vgv2/es/styles-DdwWbFr7.js} +1 -1
  357. package/vgv2/es/{styles-D1hkQkrv.js → styles-DnnW6Uhr.js} +1 -1
  358. package/vgv2/es/{styles-By7C17yJ.js → styles-c8ku3cpV.js} +1 -1
  359. package/vgv2/es/{styles-COdKCQnY.js → styles-noKspg7k.js} +1 -1
  360. package/vgv2/es/{styles-fmVnipjj.js → styles-zHrW6Rjb.js} +1 -1
  361. package/video/cjs/index.js +1 -1
  362. package/video/es/index.js +1 -1
  363. package/aftenposten/es/_auto-entry_aftenposten-KOEDRGMj.js +0 -1
  364. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-B5bkdkn2.js +0 -1
  365. package/aftonbladet/es/_auto-entry_aftonbladet-Czkvey-5.js +0 -1
  366. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CI9xcMRh.js +0 -1
  367. package/bt/es/_auto-entry_bt-CI6IkXgn.js +0 -1
  368. package/btv2/es/_auto-entry_btv2-Byn2KJna.js +0 -1
  369. package/e24/es/_auto-entry_e24-Chx1wkKd.js +0 -1
  370. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-BjtGQ3_l.js +0 -1
  371. package/koket/es/_auto-entry_koket-B2WlSuMx.js +0 -1
  372. package/sa/es/_auto-entry_sa-DR1Eak8R.js +0 -1
  373. package/sav2/es/_auto-entry_sav2-Buoo9FKC.js +0 -1
  374. package/svd/es/_auto-entry_svd-BH3Ngjrt.js +0 -1
  375. package/svdv2/es/_auto-entry_svdv2-D3Q-Cwuh.js +0 -1
  376. package/tv4/es/_auto-entry_tv4-CQemRCV3.js +0 -1
  377. package/vg/es/_auto-entry_vg-Ysm3SmZS.js +0 -1
  378. package/vgv2/es/_auto-entry_vgv2-CXADx6AD.js +0 -1
@@ -1,3 +1,4 @@
1
+ import Tracker from '@schibsted/pulse-sdk';
1
2
  import { ReactNode } from 'react';
2
3
  import { Identity, HasSessionSuccessResponse } from '@schibsted/account-sdk-browser';
3
4
 
@@ -170,24 +171,17 @@ interface TrackerInstance {
170
171
  pageViewId?: string;
171
172
  };
172
173
  }
173
- interface PulseInstance extends TrackerInstance {
174
- pulseTracker?: TrackerInstance;
174
+ interface PulseLegacyExtras {
175
175
  trackElementView?: (eventInput: unknown) => Promise<void>;
176
176
  trackElementClick?: (eventInput: unknown) => Promise<void>;
177
177
  trackClickUIElement?: (eventInput: unknown) => Promise<void>;
178
178
  trackViewUIElement?: (eventInput: unknown) => Promise<void>;
179
- trackLegacyClickUIElement?: (eventInput: unknown) => Promise<void>;
180
- trackLegacyViewUIElement?: (eventInput: unknown) => Promise<void>;
181
179
  }
182
- interface Tracker {
180
+ interface PulseConfig {
183
181
  clientId: string;
184
- instance: TrackerInstance;
182
+ instance: Tracker & PulseLegacyExtras;
185
183
  hasherUrl?: string;
186
184
  }
187
- interface Pulse {
188
- clientId: string;
189
- instance: PulseInstance;
190
- }
191
185
 
192
186
  declare const Newsrooms: {
193
187
  readonly SVD: "svd";
@@ -234,8 +228,7 @@ interface SiteConfig {
234
228
  glimr?: GlimrConfig;
235
229
  tcf?: TCFConfig;
236
230
  prebid?: PrebidConfig;
237
- tracker?: Tracker;
238
- pulse?: Pulse;
231
+ pulse?: PulseConfig;
239
232
  finnBlink?: FinnBlinkConfig;
240
233
  wallpaper?: WallpaperConfig;
241
234
  fullscreenScroll?: FullscreenScrollConfig;
@@ -684,7 +677,7 @@ declare class DrEditionManager {
684
677
  private observeCarousel;
685
678
  }
686
679
 
687
- declare const getDrEditionManager: (drEditionPageProperties: DrEditionObserverProperties, identityFacade: IdentityFacade, pulse?: PulseInstance) => DrEditionManager;
680
+ declare const getDrEditionManager: (drEditionPageProperties: DrEditionObserverProperties, identityFacade: IdentityFacade, pulse?: PulseConfig["instance"]) => DrEditionManager;
688
681
 
689
682
  declare const DrEdition: ({ editionName, fallbackTargetId, children, pulseData, htmlAttributes }: DrEditionComponentProps) => ReactNode;
690
683
 
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";v(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const m=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),x={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class N{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const D="https://www.aftonbladet.se/video-player-extras/latest/";class V{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${D}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${D}external-link.js`]:{name:"ExternalLink"}}};yield _(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield _(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{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};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return n(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";v(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}const m=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),x={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class N{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const D="https://www.aftonbladet.se/video-player-extras/latest/";class V{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${D}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${D}external-link.js`]:{name:"ExternalLink"}}};yield _(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield _(s);d.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[L]:new l,[U]:new N,[O]:new V,[A]:new R}[i]||new $,s=new(r===y?S:k)(n,a,o),c=new d(t,n),u=new T(a,s),v=new I(a);return new g(c,u,v,s)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class z{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return a("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield P(o,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const g=yield H(),m=new z(g),h=F({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(t.targetId);if(!y||!r)return;y.classList.value="";const w=document.createElement("div");w.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)}),G=e=>n(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield P(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield H(),i=new z(n);W({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};