@schibsted/advertory 3.0.9 → 3.1.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 (421) hide show
  1. package/ad-native/cjs/index.d.ts +26 -8
  2. package/ad-native/es/index.d.ts +26 -8
  3. package/aftenposten/cjs/index.d.ts +26 -8
  4. package/aftenposten/cjs/index.js +1 -1
  5. package/aftenposten/es/_auto-entry_aftenposten-DU8V5uq3.js +1 -0
  6. package/aftenposten/es/{events-CLu9WhE9.js → events-yliYqfOC.js} +1 -1
  7. package/{aftonbladet/es/index-ySQNo1u8.js → aftenposten/es/index-8Gs0ZUnH.js} +1 -1
  8. package/aftenposten/es/{index-CpCxxAaS.js → index-9vv_VnGX.js} +1 -1
  9. package/aftenposten/es/index-BhmEb-RG.js +1 -0
  10. package/aftenposten/es/index-C50gd16G.js +1 -0
  11. package/aftenposten/es/{index-B_uDF46T.js → index-CP4ZWjzx.js} +1 -1
  12. package/aftenposten/es/{index-bT4YXWB1.js → index-D6mtOCx3.js} +1 -1
  13. package/aftenposten/es/{index-5_9BZU2h.js → index-DCZfnOad.js} +1 -1
  14. package/aftenposten/es/{index-BKSoSDR9.js → index-Dk_A6WRk.js} +1 -1
  15. package/aftenposten/es/index.d.ts +26 -8
  16. package/aftenposten/es/index.js +1 -1
  17. package/aftenposten/es/{styles-DgUjw8KY.js → styles-A-ZzYAHZ.js} +1 -1
  18. package/aftenposten/es/{styles-Bd7wJzie.js → styles-B7FKpRCo.js} +1 -1
  19. package/aftenposten/es/{styles-Baq5Ezbu.js → styles-BTTzyRjj.js} +1 -1
  20. package/aftenposten/es/{styles-EP04iNvW.js → styles-CcvBCbS2.js} +1 -1
  21. package/aftenposten/es/{styles-D7jAXeZ9.js → styles-CeAB51fT.js} +1 -1
  22. package/aftenposten/es/{styles-Dfo17omJ.js → styles-Cy2GD_pK.js} +1 -1
  23. package/aftenposten/es/{styles-DmFIB5BG.js → styles-D_fo9tuC.js} +1 -1
  24. package/aftenposten/es/{styles-D4lv-cQ5.js → styles-DvdWc3Dw.js} +1 -1
  25. package/aftenposten/es/{styles-ys_lB2uU.js → styles-DzGaydAj.js} +1 -1
  26. package/aftenposten/es/{styles-C17s-D85.js → styles-Xk5jBHXL.js} +1 -1
  27. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-oK4Rb57W.js +1 -0
  28. package/aftenpostenv2/es/{events-CLFsMd40.js → events-CK6Yh2e2.js} +1 -1
  29. package/aftenpostenv2/es/index-BfYRcutn.js +1 -0
  30. package/aftenpostenv2/es/{index-4wsFW4vR.js → index-CgQV3xEU.js} +1 -1
  31. package/aftenpostenv2/es/index-D7GVbDzA.js +1 -0
  32. package/aftenpostenv2/es/{index-CDOwIwSg.js → index-DqFATPzr.js} +1 -1
  33. package/aftenpostenv2/es/{index-BOD-JyTw.js → index-IAvOT3ej.js} +1 -1
  34. package/aftenpostenv2/es/{index-KgD9_1BH.js → index-OPuFOQir.js} +1 -1
  35. package/aftenpostenv2/es/{index-zbtVaHAt.js → index-QQ97vmoD.js} +1 -1
  36. package/{aftonbladetv2/es/index-C_avelPJ.js → aftenpostenv2/es/index-oFLC6DTt.js} +1 -1
  37. package/aftenpostenv2/es/index.d.ts +26 -8
  38. package/aftenpostenv2/es/index.js +1 -1
  39. package/aftenpostenv2/es/{styles-Klf__Vv9.js → styles-6cyOk9cg.js} +1 -1
  40. package/aftenpostenv2/es/{styles-BlUmY7Dh.js → styles-BCbJ8Yvi.js} +1 -1
  41. package/aftenpostenv2/es/{styles-j6ldBnRh.js → styles-BGcigVfW.js} +1 -1
  42. package/aftenpostenv2/es/{styles-BhbVANLq.js → styles-BPFqk2pl.js} +1 -1
  43. package/aftenpostenv2/es/{styles-CGlAPeSy.js → styles-CAk0EqNU.js} +1 -1
  44. package/aftenpostenv2/es/{styles-DgojDSyC.js → styles-D4cyPHdr.js} +1 -1
  45. package/aftenpostenv2/es/{styles-CV_-DLEh.js → styles-Djka1Tw3.js} +1 -1
  46. package/aftenpostenv2/es/{styles-4hfsgISD.js → styles-FlHd4TuD.js} +1 -1
  47. package/aftenpostenv2/es/{styles-rIJXQHnz.js → styles-R2Kmc0to.js} +1 -1
  48. package/aftenpostenv2/es/{styles-DMnLqhl_.js → styles-nbMQaIj0.js} +1 -1
  49. package/aftonbladet/cjs/index.d.ts +26 -8
  50. package/aftonbladet/cjs/index.js +1 -1
  51. package/aftonbladet/es/_auto-entry_aftonbladet-DQsJCc_j.js +1 -0
  52. package/aftonbladet/es/{events-CEaJHu3m.js → events-DhNCgbCo.js} +1 -1
  53. package/{aftenposten/es/index-BDo3pJv6.js → aftonbladet/es/index-B6TdXecq.js} +1 -1
  54. package/aftonbladet/es/{index-D9zUPszl.js → index-Bqt_XE8I.js} +1 -1
  55. package/aftonbladet/es/{index-CfjGy0X9.js → index-C8Ow8hFh.js} +1 -1
  56. package/aftonbladet/es/index-CA4IyV6K.js +1 -0
  57. package/aftonbladet/es/{index-CcEDxo_l.js → index-C_OfDbzP.js} +1 -1
  58. package/aftonbladet/es/{index-BzifCoKN.js → index-Cy-tOdmU.js} +1 -1
  59. package/aftonbladet/es/{index-BbfH_JE2.js → index-D2wR6pNy.js} +1 -1
  60. package/aftonbladet/es/{index-BaYfJLeA.js → index-DxLbReWK.js} +1 -1
  61. package/aftonbladet/es/index.d.ts +26 -8
  62. package/aftonbladet/es/index.js +1 -1
  63. package/aftonbladet/es/{styles-KUAPzCkM.js → styles-BUfTIzrZ.js} +1 -1
  64. package/aftonbladet/es/{styles-QwQbwJ4_.js → styles-CBnmzVKB.js} +1 -1
  65. package/aftonbladet/es/{styles-B3W2g5iI.js → styles-CqhPPOLK.js} +1 -1
  66. package/aftonbladet/es/{styles-A0TbAbzN.js → styles-Dc8EI6a-.js} +1 -1
  67. package/aftonbladet/es/{styles-DWsZ4nEc.js → styles-uxk5IoAL.js} +1 -1
  68. package/aftonbladet/styles.css +1 -1
  69. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Djgcfxl-.js +1 -0
  70. package/aftonbladetv2/es/{events-Bny82xg7.js → events-DZl4_J08.js} +1 -1
  71. package/aftonbladetv2/es/index-B2QwXUEO.js +1 -0
  72. package/aftonbladetv2/es/{index-BfedPJ4a.js → index-BND4LAC5.js} +1 -1
  73. package/aftonbladetv2/es/index-CeWfH63g.js +1 -0
  74. package/aftonbladetv2/es/{index-DyfUCqTk.js → index-EOWyxc8F.js} +1 -1
  75. package/aftonbladetv2/es/{index-BEuVj4Q4.js → index-FgrirXff.js} +1 -1
  76. package/aftonbladetv2/es/{index-B-wealpt.js → index-J64G5n0c.js} +1 -1
  77. package/aftonbladetv2/es/{index-DOmwW0Ss.js → index-NADXTKGj.js} +1 -1
  78. package/{aftenpostenv2/es/index-BEGtd2lz.js → aftonbladetv2/es/index-pNY5Ztpl.js} +1 -1
  79. package/aftonbladetv2/es/index.d.ts +26 -8
  80. package/aftonbladetv2/es/index.js +1 -1
  81. package/aftonbladetv2/es/{styles-D_bSSM10.js → styles-BCceqX-0.js} +1 -1
  82. package/aftonbladetv2/es/{styles-DHz2nQWG.js → styles-Bzb2K0pX.js} +1 -1
  83. package/aftonbladetv2/es/{styles-5B8Ku1LX.js → styles-CGOTU6QN.js} +1 -1
  84. package/aftonbladetv2/es/{styles-DsruEkBe.js → styles-ChxOOLGD.js} +1 -1
  85. package/aftonbladetv2/es/{styles-DwotkCe0.js → styles-D3nZpOF4.js} +1 -1
  86. package/aftonbladetv2/styles.css +1 -1
  87. package/bt/cjs/index.d.ts +26 -8
  88. package/bt/cjs/index.js +1 -1
  89. package/bt/es/_auto-entry_bt-Dly6sBnc.js +1 -0
  90. package/bt/es/{events-CBy8vMhe.js → events-CWPev8pl.js} +1 -1
  91. package/{sa/es/index-67Bd-vn3.js → bt/es/index-B610pT5_.js} +1 -1
  92. package/bt/es/{index-PJsNBIYd.js → index-BHt0q6G3.js} +1 -1
  93. package/{sa/es/index-lhth1woM.js → bt/es/index-Bo0RQAjz.js} +1 -1
  94. package/bt/es/index-BpgWIc0r.js +1 -0
  95. package/bt/es/{index-DDRr8MYB.js → index-CeWtEIeu.js} +1 -1
  96. package/bt/es/{index-D8O_17Mx.js → index-DaJfwK3H.js} +1 -1
  97. package/bt/es/index-FskBAApb.js +1 -0
  98. package/bt/es/{index-DjHumHTB.js → index-jKF_36rL.js} +1 -1
  99. package/bt/es/index.d.ts +26 -8
  100. package/bt/es/index.js +1 -1
  101. package/{vg/es/styles-CJBC5MTw.js → bt/es/styles-8IjXJFPe.js} +1 -1
  102. package/bt/es/{styles-BRSsolNR.js → styles-B8zz6C0U.js} +1 -1
  103. package/{sa/es/styles-CWwty8xS.js → bt/es/styles-BoMCpdBx.js} +1 -1
  104. package/{sa/es/styles-CBZ4PpKe.js → bt/es/styles-CY65idgd.js} +1 -1
  105. package/bt/es/{styles-Zz8BrbFG.js → styles-Cy1sn0oB.js} +1 -1
  106. package/{sa/es/styles-CphOIxsM.js → bt/es/styles-DNU08wYz.js} +1 -1
  107. package/bt/es/{styles-B_CkRrIK.js → styles-DQYk37_q.js} +1 -1
  108. package/{sa/es/styles-D706y9SM.js → bt/es/styles-qK6-eK6B.js} +1 -1
  109. package/bt/es/{styles-B4aycg8F.js → styles-zcW9Sx28.js} +1 -1
  110. package/btv2/es/_auto-entry_btv2-BMBxtlku.js +1 -0
  111. package/btv2/es/{events-B3SsiDCn.js → events-BBMBGzjF.js} +1 -1
  112. package/btv2/es/{index-BmBMWQ2f.js → index-BFfh_nXv.js} +1 -1
  113. package/btv2/es/{index-1Po2M0vE.js → index-BJtCyaPU.js} +1 -1
  114. package/btv2/es/index-CjL1gzv8.js +1 -0
  115. package/btv2/es/index-D2nJrq0W.js +1 -0
  116. package/btv2/es/{index-CqEPoWH1.js → index-D9UoiKdN.js} +1 -1
  117. package/btv2/es/{index-TmB6HMtm.js → index-DF2v5i01.js} +1 -1
  118. package/btv2/es/{index-DuekyXC1.js → index-DIX3iT0Q.js} +1 -1
  119. package/btv2/es/{index-B7m8ntI1.js → index-DPUe0Za4.js} +1 -1
  120. package/btv2/es/index.d.ts +26 -8
  121. package/btv2/es/index.js +1 -1
  122. package/{vgv2/es/styles-CrTsteeB.js → btv2/es/styles-BW19vldz.js} +1 -1
  123. package/btv2/es/{styles-DtAng8Cn.js → styles-CDgXxsLm.js} +1 -1
  124. package/{sav2/es/styles-CaJpZDfU.js → btv2/es/styles-CVEHPOCl.js} +1 -1
  125. package/btv2/es/{styles-BIO6ucYx.js → styles-CikOGq7W.js} +1 -1
  126. package/{sav2/es/styles-Dr4bTwHu.js → btv2/es/styles-DCfCybm7.js} +1 -1
  127. package/btv2/es/{styles-DyOM6ra4.js → styles-DHN2GM4N.js} +1 -1
  128. package/{sav2/es/styles-Cgv_a8jY.js → btv2/es/styles-OfbWciWE.js} +1 -1
  129. package/{vgv2/es/styles-DKlksm_A.js → btv2/es/styles-aZAhDzyA.js} +1 -1
  130. package/dr-edition/cjs/index.d.ts +26 -8
  131. package/dr-edition/cjs/index.js +1 -1
  132. package/dr-edition/es/index.d.ts +26 -8
  133. package/dr-edition/es/index.js +1 -1
  134. package/e24/es/_auto-entry_e24-CP_X5jGM.js +1 -0
  135. package/e24/es/{events-Dv24iAWb.js → events-B-i5FsRn.js} +1 -1
  136. package/e24/es/{index-DyWDKlfi.js → index-B5g6P2Ui.js} +1 -1
  137. package/e24/es/index-CGoZW0ZV.js +1 -0
  138. package/e24/es/{index-D1N9nZ6r.js → index-CM0ugFDY.js} +1 -1
  139. package/e24/es/{index-BCwYuvla.js → index-CoQdTLiP.js} +1 -1
  140. package/e24/es/{index-BeQPubkf.js → index-D1zuXhAC.js} +1 -1
  141. package/e24/es/index-DglthAm2.js +1 -0
  142. package/e24/es/{index-BQN7SNT0.js → index-DsZw8SDP.js} +1 -1
  143. package/e24/es/{index-D4KRAOjc.js → index-yuIg4ct4.js} +1 -1
  144. package/e24/es/index.d.ts +26 -8
  145. package/e24/es/index.js +1 -1
  146. package/e24/es/{styles-BRkC3ajG.js → styles-B9FQK353.js} +1 -1
  147. package/e24/es/{styles-BDHgdbt4.js → styles-CPDVmy9-.js} +1 -1
  148. package/e24/es/{styles-DMVWp_i5.js → styles-CSStxtSn.js} +1 -1
  149. package/e24/es/{styles-Cj0cVHVU.js → styles-CSzy2tpL.js} +1 -1
  150. package/e24/es/{styles-DHfSzwlR.js → styles-CX7Qq_93.js} +1 -1
  151. package/e24/es/{styles-Cv6W4L0q.js → styles-D9ZAT7m8.js} +1 -1
  152. package/e24/es/{styles-cXrBEbeK.js → styles-DkOJ5VCx.js} +1 -1
  153. package/e24/es/{styles-DAA6j6C-.js → styles-DpiEj4_v.js} +1 -1
  154. package/e24/es/{styles-toH9avUo.js → styles-DyVSfwhf.js} +1 -1
  155. package/{tv4/es/styles-Df21_T1u.js → e24/es/styles-DyzUs7Uv.js} +1 -1
  156. package/e24/es/{styles-BbNK2q7U.js → styles-nCtCGtUu.js} +1 -1
  157. package/fotbollskanalen/cjs/index.d.ts +26 -8
  158. package/fotbollskanalen/cjs/index.js +1 -1
  159. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-CQROX3n3.js +1 -0
  160. package/fotbollskanalen/es/{events-PAiFjuo7.js → events-B9G7KvfD.js} +1 -1
  161. package/fotbollskanalen/es/{index-Cjrda5bk.js → index-BIbkcKYq.js} +1 -1
  162. package/fotbollskanalen/es/{index-kGpjRJPO.js → index-CcUVSwT0.js} +1 -1
  163. package/fotbollskanalen/es/{index-C877yvVk.js → index-D-pDLDeE.js} +1 -1
  164. package/fotbollskanalen/es/{index-DHYXsVU0.js → index-D6Pb6iJK.js} +1 -1
  165. package/fotbollskanalen/es/{index-Cg91G46Z.js → index-DF7RNI1t.js} +1 -1
  166. package/fotbollskanalen/es/index-Dc-AGLo4.js +1 -0
  167. package/fotbollskanalen/es/{index-CHvOEPoq.js → index-DfGpbEJM.js} +1 -1
  168. package/fotbollskanalen/es/index-DnbATiuq.js +1 -0
  169. package/fotbollskanalen/es/index.d.ts +26 -8
  170. package/fotbollskanalen/es/index.js +1 -1
  171. package/fotbollskanalen/es/{styles-CHejHEcx.js → styles-CfNIIBKK.js} +1 -1
  172. package/godare/cjs/index.d.ts +26 -8
  173. package/godare/cjs/index.js +1 -1
  174. package/godt/cjs/index.d.ts +26 -8
  175. package/godt/cjs/index.js +1 -1
  176. package/kilkaya/cjs/index.d.ts +26 -8
  177. package/kilkaya/es/index.d.ts +26 -8
  178. package/klart/cjs/index.d.ts +26 -8
  179. package/klart/cjs/index.js +1 -1
  180. package/klart/styles.css +1 -1
  181. package/koket/cjs/index.d.ts +26 -8
  182. package/koket/cjs/index.js +1 -1
  183. package/koket/es/_auto-entry_koket-C0iyqM-S.js +1 -0
  184. package/koket/es/{events-BvwCoqGo.js → events-BcZTaLeW.js} +1 -1
  185. package/koket/es/{index-BFLC9tsL.js → index-Bz2OsIEg.js} +1 -1
  186. package/koket/es/{index-BqcUAnIN.js → index-CiYfJOQD.js} +1 -1
  187. package/koket/es/{index-BmWE5eUE.js → index-CoXLaLEm.js} +1 -1
  188. package/koket/es/index-CukU7Jn6.js +1 -0
  189. package/koket/es/index-Cyy2WUwq.js +1 -0
  190. package/koket/es/{index-DHfNKG7L.js → index-D6KcKOHv.js} +1 -1
  191. package/koket/es/{index-B0GE64uH.js → index-Wi7e-yT9.js} +1 -1
  192. package/koket/es/{index-C3SesVhC.js → index-bFrGnnxi.js} +1 -1
  193. package/koket/es/index.d.ts +26 -8
  194. package/koket/es/index.js +1 -1
  195. package/{svdv2/es/styles-DWpSWJWy.js → koket/es/styles-DZ8lBM1O.js} +1 -1
  196. package/minmote/cjs/index.d.ts +26 -8
  197. package/minmote/cjs/index.js +1 -1
  198. package/package.json +1 -1
  199. package/pent/cjs/index.d.ts +26 -8
  200. package/pent/cjs/index.js +1 -1
  201. package/sa/cjs/index.d.ts +26 -8
  202. package/sa/cjs/index.js +1 -1
  203. package/sa/es/_auto-entry_sa-CW6Oi0dd.js +1 -0
  204. package/sa/es/{events-B_AkQY4w.js → events-CyNtol2-.js} +1 -1
  205. package/sa/es/{index-DWJIaXcV.js → index-BNzKL6bS.js} +1 -1
  206. package/sa/es/{index-Dpcps0Cv.js → index-BmPQkUrk.js} +1 -1
  207. package/sa/es/index-D7pWhos7.js +1 -0
  208. package/sa/es/{index-DyusPcn_.js → index-DOITUJPV.js} +1 -1
  209. package/{bt/es/index-BYhxVbf7.js → sa/es/index-D_O9gVLd.js} +1 -1
  210. package/sa/es/{index-C7q4-6n2.js → index-DgG4w3r6.js} +1 -1
  211. package/sa/es/index-DzbWhtj4.js +1 -0
  212. package/{bt/es/index-B_CSGyv9.js → sa/es/index-bZRj-NcA.js} +1 -1
  213. package/sa/es/index.d.ts +26 -8
  214. package/sa/es/index.js +1 -1
  215. package/sa/es/{styles-bQoZW5YG.js → styles-AmHsD-RA.js} +1 -1
  216. package/{bt/es/styles-ajrj4Tc_.js → sa/es/styles-BwnQ7OKM.js} +1 -1
  217. package/{vg/es/styles-Dtqx_Iyi.js → sa/es/styles-CxnXppQ5.js} +1 -1
  218. package/{vg/es/styles-DzWFXrGP.js → sa/es/styles-DQgvHtrv.js} +1 -1
  219. package/{bt/es/styles-qwY6PJ4D.js → sa/es/styles-DminGM8h.js} +1 -1
  220. package/sa/es/{styles-Degf0P68.js → styles-Ds3mgS9x.js} +1 -1
  221. package/sa/es/{styles-CHEeJ7cu.js → styles-fKNPZATB.js} +1 -1
  222. package/sa/es/{styles-DF9R2wTT.js → styles-jQf0W6Eg.js} +1 -1
  223. package/{vg/es/styles-D6KA3nzn.js → sa/es/styles-z-Vz9oES.js} +1 -1
  224. package/sav2/es/_auto-entry_sav2-BuJquBtj.js +1 -0
  225. package/sav2/es/{events-Dy90bU7v.js → events-DI8q_Qnz.js} +1 -1
  226. package/sav2/es/{index-BmSnpQyk.js → index-BhSNVI7o.js} +1 -1
  227. package/sav2/es/{index-BJHgPsUt.js → index-CTSqdux6.js} +1 -1
  228. package/sav2/es/{index-CSqYxGu8.js → index-CfRPxcGD.js} +1 -1
  229. package/sav2/es/{index-BLbqfEWx.js → index-ClbvLzX2.js} +1 -1
  230. package/sav2/es/index-Cqg7B7yx.js +1 -0
  231. package/sav2/es/index-DSduSE7R.js +1 -0
  232. package/sav2/es/{index-Ccu4GltL.js → index-Di7jU0jr.js} +1 -1
  233. package/sav2/es/{index-DYueosPW.js → index-o2_jlSkg.js} +1 -1
  234. package/sav2/es/index.d.ts +26 -8
  235. package/sav2/es/index.js +1 -1
  236. package/sav2/es/{styles-C-HN-Baq.js → styles-BRPdAx8Y.js} +1 -1
  237. package/sav2/es/{styles-DpNklgJH.js → styles-C5u773TN.js} +1 -1
  238. package/{btv2/es/styles-B4DdUbfP.js → sav2/es/styles-CGs4MkqV.js} +1 -1
  239. package/{vgv2/es/styles-BbbuT45O.js → sav2/es/styles-CpIFysfC.js} +1 -1
  240. package/{btv2/es/styles-IlmavUol.js → sav2/es/styles-D8zham8y.js} +1 -1
  241. package/{vgv2/es/styles-D7HsNqkv.js → sav2/es/styles-DsRA_Ls1.js} +1 -1
  242. package/sav2/es/{styles-DlwQQU5N.js → styles-DzjukE7A.js} +1 -1
  243. package/sav2/es/{styles-Cw5M7Drc.js → styles-wSOxK2H_.js} +1 -1
  244. package/svd/cjs/index.d.ts +26 -8
  245. package/svd/cjs/index.js +1 -1
  246. package/svd/es/_auto-entry_svd-DfWuipHk.js +1 -0
  247. package/svd/es/{events-vcsTNIjI.js → events-B9fy8MvP.js} +1 -1
  248. package/svd/es/{index-B6mEhFFK.js → index-BKmYhjp4.js} +1 -1
  249. package/svd/es/{index-D4M5klSP.js → index-BsIKH9v6.js} +1 -1
  250. package/svd/es/{index-BcD-agLO.js → index-DEczVjHq.js} +1 -1
  251. package/svd/es/index-DTJ5fyP4.js +1 -0
  252. package/{tv4/es/index-PC9fGmH8.js → svd/es/index-DqdGxmQU.js} +1 -1
  253. package/svd/es/{index-DEycD-Fd.js → index-WeoENtv0.js} +1 -1
  254. package/svd/es/{index-BVpAbMce.js → index-b71iTJh6.js} +1 -1
  255. package/svd/es/{index-DVdA1MsS.js → index-q4kRFTm_.js} +1 -1
  256. package/svd/es/index.d.ts +26 -8
  257. package/svd/es/index.js +1 -1
  258. package/svd/es/{styles-npI4DFOE.js → styles-BRczJBV7.js} +1 -1
  259. package/svd/es/{styles-DrO_5I-V.js → styles-BkRMHTAw.js} +1 -1
  260. package/svd/es/{styles-DdDCc5Ad.js → styles-C0cr8pEH.js} +1 -1
  261. package/svd/es/{styles-BKATK5MH.js → styles-C8BiJfH_.js} +1 -1
  262. package/svd/es/{styles-DVFPBtVA.js → styles-CvEYQ-Nm.js} +1 -1
  263. package/svd/es/{styles-BJ0Dttp2.js → styles-DjX0P_lu.js} +1 -1
  264. package/svd/styles.css +1 -1
  265. package/svdv2/es/_auto-entry_svdv2-rS_Q5zyR.js +1 -0
  266. package/svdv2/es/{events-LH8Rwmc5.js → events-B81mMIaP.js} +1 -1
  267. package/svdv2/es/{index-Tgnif2ZJ.js → index-D0IoTa1B.js} +1 -1
  268. package/svdv2/es/{index-CCpij6nf.js → index-DKT0OPU4.js} +1 -1
  269. package/svdv2/es/{index-D24L1_Eu.js → index-DT3zdHOo.js} +1 -1
  270. package/svdv2/es/{index-DrE9Oj47.js → index-Zc_uFqie.js} +1 -1
  271. package/svdv2/es/{index-DVg3m3u_.js → index-iguCimhM.js} +1 -1
  272. package/svdv2/es/index-lC41Qy7v.js +1 -0
  273. package/svdv2/es/{index-Dlxv0wxl.js → index-tYoirwmq.js} +1 -1
  274. package/svdv2/es/index-yAxz9Lfh.js +1 -0
  275. package/svdv2/es/index.d.ts +26 -8
  276. package/svdv2/es/index.js +1 -1
  277. package/svdv2/es/{styles-BKgWUypt.js → styles-78-Iyys8.js} +1 -1
  278. package/svdv2/es/{styles-DGLEbCBe.js → styles-BPaJIxiZ.js} +1 -1
  279. package/svdv2/es/{styles-CD8gudnM.js → styles-BsO5oiS_.js} +1 -1
  280. package/svdv2/es/{styles-Du54Z3aW.js → styles-D4bR4OJH.js} +1 -1
  281. package/{koket/es/styles-DWhemvCW.js → svdv2/es/styles-D5-jbYLA.js} +1 -1
  282. package/svdv2/es/{styles-RM4iZ99z.js → styles-GtQDj6P7.js} +1 -1
  283. package/svdv2/styles.css +1 -1
  284. package/tek/cjs/index.d.ts +26 -8
  285. package/tek/cjs/index.js +1 -1
  286. package/tracker/cjs/index.d.ts +26 -8
  287. package/tracker/es/index.d.ts +26 -8
  288. package/tv4/cjs/index.d.ts +26 -8
  289. package/tv4/cjs/index.js +1 -1
  290. package/tv4/es/_auto-entry_tv4-BrhMiCYY.js +1 -0
  291. package/tv4/es/{events-CmhvusJj.js → events-8qqQt5gX.js} +1 -1
  292. package/tv4/es/index-7kV2geAZ.js +1 -0
  293. package/tv4/es/{index-BFd40gTe.js → index-AtB7D187.js} +1 -1
  294. package/tv4/es/{index-DKIHEu4R.js → index-CBL76Cff.js} +1 -1
  295. package/tv4/es/{index-BS8IyRYc.js → index-CGo2whl-.js} +1 -1
  296. package/tv4/es/index-CaN0iPss.js +1 -0
  297. package/{svd/es/index-D7xb1-Ng.js → tv4/es/index-Fm09Gw9I.js} +1 -1
  298. package/tv4/es/{index-CE6Z-BOq.js → index-TDy_flx_.js} +1 -1
  299. package/tv4/es/{index-B_pVXnSb.js → index-YGNGA0TO.js} +1 -1
  300. package/tv4/es/index.d.ts +26 -8
  301. package/tv4/es/index.js +1 -1
  302. package/{e24/es/styles-D-pkus2w.js → tv4/es/styles-EphLf12N.js} +1 -1
  303. package/tvnu/cjs/index.d.ts +26 -8
  304. package/tvnu/cjs/index.js +1 -1
  305. package/types/index.d.ts +26 -8
  306. package/vg/cjs/index.d.ts +26 -8
  307. package/vg/cjs/index.js +1 -1
  308. package/vg/es/_auto-entry_vg-C8ePd2cs.js +1 -0
  309. package/vg/es/{events-CnXys1Zi.js → events-Dd_s97Rf.js} +1 -1
  310. package/vg/es/{index-DmPfeCrT.js → index-BBsGqir9.js} +1 -1
  311. package/vg/es/{index-Cxqza1dF.js → index-BTxG0IzG.js} +1 -1
  312. package/vg/es/{index-CSotidSA.js → index-BZ-o2dvD.js} +1 -1
  313. package/vg/es/{index-6TVBHSgI.js → index-BeGtvXXs.js} +1 -1
  314. package/vg/es/{index-DHSE4doX.js → index-C3himFxZ.js} +1 -1
  315. package/vg/es/index-D995T3Mt.js +1 -0
  316. package/vg/es/{index-DFcW-IQF.js → index-Ga00wLLk.js} +1 -1
  317. package/vg/es/index-wn6KJuPX.js +1 -0
  318. package/vg/es/index.d.ts +26 -8
  319. package/vg/es/index.js +1 -1
  320. package/{bt/es/styles-Bxrm_Sgk.js → vg/es/styles-B4lkkgsZ.js} +1 -1
  321. package/{bt/es/styles-BKyqwNys.js → vg/es/styles-BA0XTH86.js} +1 -1
  322. package/vg/es/{styles-DSyDdp0R.js → styles-BItE1P8e.js} +1 -1
  323. package/vg/es/{styles-CliHWZ_3.js → styles-BPcjN2qg.js} +1 -1
  324. package/vg/es/{styles-B8G0YeJq.js → styles-CKumPz1z.js} +1 -1
  325. package/{sa/es/styles-BV0qYUwB.js → vg/es/styles-CUJIjjqJ.js} +1 -1
  326. package/{bt/es/styles-BbXcqWwU.js → vg/es/styles-CsjIdsAA.js} +1 -1
  327. package/vg/es/{styles-DXkl62T9.js → styles-CuF_EWEp.js} +1 -1
  328. package/vg/es/{styles-C2FdrgPc.js → styles-Cw--TGd3.js} +1 -1
  329. package/vg/es/{styles-BOcOBo9C.js → styles-D6PCpY3e.js} +1 -1
  330. package/vg/es/{styles-DrELy3eP.js → styles-DFF1ID35.js} +1 -1
  331. package/vg/es/{styles-BRGW26UD.js → styles-DGZuqDRs.js} +1 -1
  332. package/vg/es/{styles-BQucZqmh.js → styles-DJrIJKV4.js} +1 -1
  333. package/vg/es/{styles-CxvW80pe.js → styles-e3AK702S.js} +1 -1
  334. package/vg/es/{styles-DQZl1kr1.js → styles-zttgsXIc.js} +1 -1
  335. package/vgv2/es/_auto-entry_vgv2-DIIyQQCs.js +1 -0
  336. package/vgv2/es/{events-Cq7csg5I.js → events-4oJPhpxW.js} +1 -1
  337. package/vgv2/es/{index-Dwszgdmc.js → index-B0omUW-g.js} +1 -1
  338. package/vgv2/es/{index-C7RMeZil.js → index-BiuPB7qH.js} +1 -1
  339. package/vgv2/es/{index-Kp7_MJys.js → index-Bk_IVtWY.js} +1 -1
  340. package/vgv2/es/index-CGaW8UZb.js +1 -0
  341. package/vgv2/es/{index-Bp-ks7x9.js → index-CerFd6rk.js} +1 -1
  342. package/vgv2/es/{index-nZ0FUDKR.js → index-Cfdcx7YY.js} +1 -1
  343. package/vgv2/es/{index-C1ar8NXn.js → index-D4FA0xLg.js} +1 -1
  344. package/vgv2/es/index-DVekNehC.js +1 -0
  345. package/vgv2/es/index.d.ts +26 -8
  346. package/vgv2/es/index.js +1 -1
  347. package/vgv2/es/{styles-Ceayw1va.js → styles-4jNEHLBc.js} +1 -1
  348. package/vgv2/es/{styles-Dxakr1Gf.js → styles-ANUyhLzk.js} +1 -1
  349. package/vgv2/es/{styles-KPPGvSX8.js → styles-BDrWsuu6.js} +1 -1
  350. package/{btv2/es/styles-5LEUKUhS.js → vgv2/es/styles-BgE0G1OQ.js} +1 -1
  351. package/vgv2/es/{styles-C38lcWGe.js → styles-BqL9fuym.js} +1 -1
  352. package/vgv2/es/{styles-CLPvM5ML.js → styles-BqOCGnZk.js} +1 -1
  353. package/vgv2/es/{styles-CjOoN7r2.js → styles-CQXgtQoL.js} +1 -1
  354. package/vgv2/es/{styles-Cd0dpIPu.js → styles-D0GxW-vO.js} +1 -1
  355. package/vgv2/es/{styles-BItKV7lf.js → styles-D6myjf8r.js} +1 -1
  356. package/vgv2/es/{styles-QgUS5hJD.js → styles-DeGP-f1M.js} +1 -1
  357. package/vgv2/es/{styles-UXYxtRWD.js → styles-DuT5Faai.js} +1 -1
  358. package/vgv2/es/{styles-DfRbFxS5.js → styles-HbpAFnkf.js} +1 -1
  359. package/{sav2/es/styles-BA8mAyIe.js → vgv2/es/styles-bkHY3zJl.js} +1 -1
  360. package/{btv2/es/styles-oOL4L59M.js → vgv2/es/styles-f57eMM_e.js} +1 -1
  361. package/{btv2/es/styles-CzMvE4Ct.js → vgv2/es/styles-jazeZfsa.js} +1 -1
  362. package/aftenposten/es/_auto-entry_aftenposten-DQm5I4hp.js +0 -1
  363. package/aftenposten/es/index-CL_6Ijvb.js +0 -1
  364. package/aftenposten/es/index-zerHyw1F.js +0 -1
  365. package/aftenposten/es/scale-ad-DNyvCG9y.js +0 -1
  366. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-COmN_rMc.js +0 -1
  367. package/aftenpostenv2/es/index-Dp10fvLI.js +0 -1
  368. package/aftenpostenv2/es/index-lCJTj9FD.js +0 -1
  369. package/aftenpostenv2/es/scale-ad-C3UxfUhY.js +0 -1
  370. package/aftonbladet/es/_auto-entry_aftonbladet-DfsNK9YG.js +0 -1
  371. package/aftonbladet/es/index-9ILbX4p6.js +0 -1
  372. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CQSAbp_Q.js +0 -1
  373. package/aftonbladetv2/es/index-CrEOClHI.js +0 -1
  374. package/aftonbladetv2/es/index-RJ7AjB1Z.js +0 -1
  375. package/aftonbladetv2/es/scale-ad-VvNFBDL0.js +0 -1
  376. package/bt/es/_auto-entry_bt-CL1HGDfN.js +0 -1
  377. package/bt/es/index-CYn4N_wP.js +0 -1
  378. package/bt/es/index-DiUe_YIG.js +0 -1
  379. package/bt/es/scale-ad-CbB427qG.js +0 -1
  380. package/btv2/es/_auto-entry_btv2-CVp-n3ck.js +0 -1
  381. package/btv2/es/index-B5Z4dirh.js +0 -1
  382. package/btv2/es/index-Cxv1g4ei.js +0 -1
  383. package/btv2/es/scale-ad-zDw6BLjX.js +0 -1
  384. package/e24/es/_auto-entry_e24-COl4EbsU.js +0 -1
  385. package/e24/es/index-BSKRcAYA.js +0 -1
  386. package/e24/es/index-h0x83nGG.js +0 -1
  387. package/e24/es/scale-ad-zQttMKZA.js +0 -1
  388. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DqDdM23m.js +0 -1
  389. package/fotbollskanalen/es/index-B8hAdUeJ.js +0 -1
  390. package/fotbollskanalen/es/index-mmxvRb3c.js +0 -1
  391. package/fotbollskanalen/es/scale-ad-D3gxPfQg.js +0 -1
  392. package/koket/es/_auto-entry_koket-C48J8KxZ.js +0 -1
  393. package/koket/es/index-BKa-1wk1.js +0 -1
  394. package/koket/es/index-T4KqLXn3.js +0 -1
  395. package/koket/es/scale-ad-CypQr_a9.js +0 -1
  396. package/sa/es/_auto-entry_sa-C2O3W95-.js +0 -1
  397. package/sa/es/index-BaBi-EbC.js +0 -1
  398. package/sa/es/index-DiQCCxiE.js +0 -1
  399. package/sa/es/scale-ad-t_PFaWNl.js +0 -1
  400. package/sav2/es/_auto-entry_sav2-GZukctTY.js +0 -1
  401. package/sav2/es/index-BIVEkke9.js +0 -1
  402. package/sav2/es/index-CAKzVYiK.js +0 -1
  403. package/sav2/es/scale-ad-Bl1N9sV8.js +0 -1
  404. package/svd/es/_auto-entry_svd-D5RrcHO5.js +0 -1
  405. package/svd/es/index-BNw3P6N7.js +0 -1
  406. package/svdv2/es/_auto-entry_svdv2-p0K1CtR7.js +0 -1
  407. package/svdv2/es/index-CF7g0aK-.js +0 -1
  408. package/svdv2/es/index-CgHAmt-Z.js +0 -1
  409. package/svdv2/es/scale-ad-CKz3c7a6.js +0 -1
  410. package/tv4/es/_auto-entry_tv4-hpV2mS7-.js +0 -1
  411. package/tv4/es/index-BDOCKubD.js +0 -1
  412. package/tv4/es/index-D8tfFuVH.js +0 -1
  413. package/tv4/es/scale-ad-fAq7RnE3.js +0 -1
  414. package/vg/es/_auto-entry_vg-DiwAKbPE.js +0 -1
  415. package/vg/es/index-B919RnoX.js +0 -1
  416. package/vg/es/index-DB1tns1N.js +0 -1
  417. package/vg/es/scale-ad-U1-_NZ5U.js +0 -1
  418. package/vgv2/es/_auto-entry_vgv2-yb_BOqwj.js +0 -1
  419. package/vgv2/es/index-B_ngjvfi.js +0 -1
  420. package/vgv2/es/index-CsHr_ayb.js +0 -1
  421. package/vgv2/es/scale-ad-C2rI3LbT.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 D="https://www.aftonbladet.se/video-player-extras/latest/";class N{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 M(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const V=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class x{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({},V(e)?e:{}),{provider:Object.assign(Object.assign({},V(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${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 N,[S]:new x}[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,s;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 d=null!==(s=null===(a=null===(r=null===(i=e.finnBlink)||void 0===i?void 0:i.replacementConfig)||void 0===r?void 0:r.adsToReplace)||void 0===a?void 0:a.map(([e])=>e))&&void 0!==s?s:[],l=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=>!d.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&l.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}=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};