@schibsted/advertory 3.6.3 → 3.6.4-no-issue.1

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 (380) hide show
  1. package/ad-native/cjs/index.d.ts +19 -0
  2. package/ad-native/es/index.d.ts +19 -0
  3. package/aftenposten/cjs/index.d.ts +19 -0
  4. package/aftenposten/cjs/index.js +1 -1
  5. package/aftenposten/es/_auto-entry_aftenposten-e5bjjybw.js +1 -0
  6. package/aftenposten/es/{events-haT12jV0.js → events-90h4J0Pi.js} +1 -1
  7. package/aftenposten/es/{index-BT4eLpTb.js → index-BZDFHEyy.js} +1 -1
  8. package/aftenposten/es/{index-CPS4SSYI.js → index-CwCkFmT3.js} +1 -1
  9. package/aftenposten/es/{index-BrzVJyuA.js → index-D0SMqCpS.js} +1 -1
  10. package/aftenposten/es/{index-nWSVg5Cf.js → index-GvJ5O8Ol.js} +1 -1
  11. package/aftenposten/es/{index-x71s6dEX.js → index-PNWqx3ql.js} +1 -1
  12. package/aftenposten/es/{index-BGnz1hut.js → index-SPBgETLm.js} +1 -1
  13. package/aftenposten/es/{index-DWggkSOl.js → index-k9VKIwq-.js} +1 -1
  14. package/aftenposten/es/{index-BpEJqDNV.js → index-x3C8LqoH.js} +1 -1
  15. package/aftenposten/es/index.d.ts +19 -0
  16. package/aftenposten/es/index.js +1 -1
  17. package/aftenposten/es/{styles-Cj6N5qbD.js → styles-BODrkqLL.js} +1 -1
  18. package/aftenposten/es/{styles-BucpjNdO.js → styles-Bz8JDFmN.js} +1 -1
  19. package/aftenposten/es/{styles-D3TGKOzY.js → styles-C0fEGkU3.js} +1 -1
  20. package/aftenposten/es/{styles-DuLs_A1L.js → styles-CGsVX09f.js} +1 -1
  21. package/aftenposten/es/{styles-CzFHbYk3.js → styles-CJ9OBVfJ.js} +1 -1
  22. package/aftenposten/es/{styles-BqMKpI75.js → styles-D6C4kXph.js} +1 -1
  23. package/aftenposten/es/{styles-oqM_EtJb.js → styles-DHz7ybgQ.js} +1 -1
  24. package/aftenposten/es/{styles-RMqcW7B0.js → styles-IM25mjsd.js} +1 -1
  25. package/aftenposten/es/{styles-Br-R7yGx.js → styles-mqLUt40K.js} +1 -1
  26. package/aftenposten/es/{styles-CScKDxpF.js → styles-otSfsajI.js} +1 -1
  27. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BAMydMZR.js +1 -0
  28. package/aftenpostenv2/es/{events-s7VdgLNv.js → events-BiZ53WbG.js} +1 -1
  29. package/aftenpostenv2/es/{index-D17QYdj0.js → index-1scrmbN8.js} +1 -1
  30. package/aftenpostenv2/es/{index-3rUFz7Lp.js → index-CHwNPbLT.js} +1 -1
  31. package/aftenpostenv2/es/{index-Uzgdq4c2.js → index-Cv4YIbxm.js} +1 -1
  32. package/aftenpostenv2/es/{index-Goj0JedS.js → index-CvVs7cA5.js} +1 -1
  33. package/aftenpostenv2/es/{index-8_hW3_IN.js → index-DOo535KJ.js} +1 -1
  34. package/{aftonbladetv2/es/index-iLAwXj1l.js → aftenpostenv2/es/index-LkRkfkb-.js} +1 -1
  35. package/aftenpostenv2/es/{index-CdSw1Nxg.js → index-oqTbMoBZ.js} +1 -1
  36. package/aftenpostenv2/es/{index-BJInADg7.js → index-siSPAYL7.js} +1 -1
  37. package/aftenpostenv2/es/index.d.ts +19 -0
  38. package/aftenpostenv2/es/index.js +1 -1
  39. package/aftenpostenv2/es/{styles-NZTDYx2O.js → styles--5PORqq4.js} +1 -1
  40. package/aftenpostenv2/es/{styles-DZ2F4XIP.js → styles-BVPRm4PB.js} +1 -1
  41. package/aftenpostenv2/es/{styles-Bw4qK6w4.js → styles-Brav2qkV.js} +1 -1
  42. package/aftenpostenv2/es/{styles-CNsePl3z.js → styles-Cg5tKEAO.js} +1 -1
  43. package/aftenpostenv2/es/{styles-DVRTCgVv.js → styles-Cgr1J3T3.js} +1 -1
  44. package/aftenpostenv2/es/{styles-CrB6-yjS.js → styles-DSJgHwN1.js} +1 -1
  45. package/aftenpostenv2/es/{styles-BqMv6ry1.js → styles-DaS9lthq.js} +1 -1
  46. package/aftenpostenv2/es/{styles-C1z3HXi6.js → styles-PWB8bkpb.js} +1 -1
  47. package/aftenpostenv2/es/{styles-D-er0QS7.js → styles-XJ-eFfEw.js} +1 -1
  48. package/aftenpostenv2/es/{styles-DtvaOi2g.js → styles-oXQISx1b.js} +1 -1
  49. package/aftonbladet/cjs/index.d.ts +19 -0
  50. package/aftonbladet/cjs/index.js +1 -1
  51. package/aftonbladet/es/_auto-entry_aftonbladet-CKiQ7hDs.js +1 -0
  52. package/aftonbladet/es/{events-CLKqJb2E.js → events-A8eRarM0.js} +1 -1
  53. package/aftonbladet/es/{index-BwCJxQpR.js → index-3y_krWtI.js} +1 -1
  54. package/aftonbladet/es/{index-C_cOjbDr.js → index-BAcl84hu.js} +1 -1
  55. package/aftonbladet/es/{index-BWoJhj4s.js → index-BiYceV13.js} +1 -1
  56. package/aftonbladet/es/{index-Clr30xNW.js → index-D9AivUBC.js} +1 -1
  57. package/aftonbladet/es/{index-BNL7mrv1.js → index-DIMuWioR.js} +1 -1
  58. package/aftonbladet/es/{index-CtdJf15w.js → index-DKVhyZ7t.js} +1 -1
  59. package/aftonbladet/es/{index-DCUmpQyn.js → index-DzMEQmPc.js} +1 -1
  60. package/aftonbladet/es/{index-CJK8CfSp.js → index-YErwUvPi.js} +1 -1
  61. package/aftonbladet/es/index.d.ts +19 -0
  62. package/aftonbladet/es/index.js +1 -1
  63. package/aftonbladet/es/{styles-CwgaOYac.js → styles-B3CXjx3R.js} +1 -1
  64. package/aftonbladet/es/{styles-Cs1OkWaf.js → styles-BfmQQWQf.js} +1 -1
  65. package/aftonbladet/es/{styles-DhZwF0s-.js → styles-CqbU0dC-.js} +1 -1
  66. package/aftonbladet/es/{styles-CS_Vurkb.js → styles-CuKe16UU.js} +1 -1
  67. package/aftonbladet/es/{styles--yMryMiy.js → styles-DAOwzujX.js} +1 -1
  68. package/aftonbladet/es/{styles-D6Tu7eAE.js → styles-whRiQawN.js} +1 -1
  69. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Dh7qL1X3.js +1 -0
  70. package/aftonbladetv2/es/{events-DFuTOjZ_.js → events-RlWiPgEd.js} +1 -1
  71. package/aftonbladetv2/es/{index-C2pp9QiN.js → index-3uQCIdwA.js} +1 -1
  72. package/aftonbladetv2/es/{index-Bf5jwNcU.js → index-BpHuZZzP.js} +1 -1
  73. package/aftonbladetv2/es/{index-CLdW_IVF.js → index-CHe2mY5U.js} +1 -1
  74. package/aftonbladetv2/es/{index-CtqFwTHm.js → index-Cr9mktXq.js} +1 -1
  75. package/aftonbladetv2/es/{index-CTSDP2-L.js → index-CtEsmloB.js} +1 -1
  76. package/aftonbladetv2/es/{index-CVPldjPM.js → index-CwMJAqqO.js} +1 -1
  77. package/aftonbladetv2/es/{index-B_l4VAq2.js → index-CzMGSy6Q.js} +1 -1
  78. package/{aftenpostenv2/es/index-B_1jFa7b.js → aftonbladetv2/es/index-DG71uAwM.js} +1 -1
  79. package/aftonbladetv2/es/index.d.ts +19 -0
  80. package/aftonbladetv2/es/index.js +1 -1
  81. package/aftonbladetv2/es/{styles-CsuCmRvp.js → styles-BEhQkXU1.js} +1 -1
  82. package/aftonbladetv2/es/{styles-uoFhBqMN.js → styles-Bfc9l8WO.js} +1 -1
  83. package/aftonbladetv2/es/{styles-CEIaMnq9.js → styles-BoJUgU8p.js} +1 -1
  84. package/aftonbladetv2/es/{styles-D144DfCK.js → styles-BrFu_W5K.js} +1 -1
  85. package/aftonbladetv2/es/{styles-JH6e0qvY.js → styles-DPqx2adI.js} +1 -1
  86. package/aftonbladetv2/es/{styles-C1rTAsv2.js → styles-DkOgwygd.js} +1 -1
  87. package/bt/cjs/index.d.ts +19 -0
  88. package/bt/cjs/index.js +1 -1
  89. package/bt/es/_auto-entry_bt-CQT-xDPU.js +1 -0
  90. package/bt/es/{events-CntQlWei.js → events-B8E0Wmof.js} +1 -1
  91. package/bt/es/{index-DKJYRhSX.js → index-03aD4eo1.js} +1 -1
  92. package/{sa/es/index-Bv8YIdiI.js → bt/es/index-1fdav_Jg.js} +1 -1
  93. package/bt/es/{index-DTBzlPVZ.js → index-Bj0f0v87.js} +1 -1
  94. package/bt/es/{index-a8_oyeFW.js → index-COAyNr45.js} +1 -1
  95. package/bt/es/{index-CASwTSAt.js → index-D9-4nJzo.js} +1 -1
  96. package/bt/es/{index-BM8NK0TY.js → index-dZUFgkcj.js} +1 -1
  97. package/{sa/es/index-BxH2OLQQ.js → bt/es/index-ikSnI3qk.js} +1 -1
  98. package/bt/es/{index-e5ii2ijF.js → index-xFX_gjti.js} +1 -1
  99. package/bt/es/index.d.ts +19 -0
  100. package/bt/es/index.js +1 -1
  101. package/bt/es/{styles-BX7CrSEq.js → styles--vBDQgko.js} +1 -1
  102. package/{sa/es/styles-DmcgMEkb.js → bt/es/styles-BWe06TQl.js} +1 -1
  103. package/bt/es/{styles-DxhZtCm6.js → styles-BZkEY9ow.js} +1 -1
  104. package/bt/es/{styles-KfDzomu5.js → styles-CEsYJDqo.js} +1 -1
  105. package/bt/es/{styles-CdCvbMpW.js → styles-CGYAqI9_.js} +1 -1
  106. package/bt/es/{styles-pbgWOGz4.js → styles-CH2-1sgP.js} +1 -1
  107. package/bt/es/{styles-HPrO7Wox.js → styles-CHBDQHwu.js} +1 -1
  108. package/{sa/es/styles-Cw7-eUJi.js → bt/es/styles-CyR4WSpG.js} +1 -1
  109. package/bt/es/{styles-B3BDhrhc.js → styles-wforPVjv.js} +1 -1
  110. package/btv2/es/_auto-entry_btv2-893Uo7bG.js +1 -0
  111. package/btv2/es/{events-BqcTQUa4.js → events-B4DlNAQt.js} +1 -1
  112. package/btv2/es/{index-CTfq-Mv4.js → index-BUFZZQM2.js} +1 -1
  113. package/btv2/es/{index-BD7P1jRk.js → index-BYzgCdkQ.js} +1 -1
  114. package/btv2/es/{index-Bz3czyHA.js → index-BbUYZ_o3.js} +1 -1
  115. package/btv2/es/{index-CZRyJK4H.js → index-CloqSUQD.js} +1 -1
  116. package/btv2/es/{index-Cx6nIgru.js → index-DNSUtbs9.js} +1 -1
  117. package/btv2/es/{index-PDbnbcqi.js → index-DPaE0hzc.js} +1 -1
  118. package/btv2/es/{index-BI4CD_rZ.js → index-DxXBBDVp.js} +1 -1
  119. package/btv2/es/{index-WULudPCW.js → index-feLxUxLr.js} +1 -1
  120. package/btv2/es/index.d.ts +19 -0
  121. package/btv2/es/index.js +1 -1
  122. package/btv2/es/{styles-C2O_7r8O.js → styles-BHDI2Q0m.js} +1 -1
  123. package/{vgv2/es/styles-D91JPhH8.js → btv2/es/styles-BPOLl8SC.js} +1 -1
  124. package/{sav2/es/styles-qGCOeBLI.js → btv2/es/styles-BehUrvhi.js} +1 -1
  125. package/{sav2/es/styles-G7x2BU1w.js → btv2/es/styles-Cw9KJB6P.js} +1 -1
  126. package/{sav2/es/styles-Cj5_D55_.js → btv2/es/styles-DJT27wtw.js} +1 -1
  127. package/btv2/es/{styles-DzDQbRo2.js → styles-DvBM5Avv.js} +1 -1
  128. package/btv2/es/{styles-W0QYSaKb.js → styles-Dz4b2AdK.js} +1 -1
  129. package/{vgv2/es/styles-DGDhK5xz.js → btv2/es/styles-SsDyWsc5.js} +1 -1
  130. package/btv2/styles.css +1 -1
  131. package/dr-edition/cjs/index.d.ts +23 -6
  132. package/dr-edition/cjs/index.js +1 -1
  133. package/dr-edition/es/index.d.ts +23 -6
  134. package/dr-edition/es/index.js +1 -1
  135. package/e24/es/_auto-entry_e24-BzGAVnFM.js +1 -0
  136. package/e24/es/{events-BSFvJjwN.js → events-2LemXGhL.js} +1 -1
  137. package/e24/es/{index-bXDvkHFi.js → index-BKQ1a6Ig.js} +1 -1
  138. package/e24/es/{index-C70oFoBO.js → index-BPsxnGG7.js} +1 -1
  139. package/e24/es/{index-1ulbwcTL.js → index-BqUeo7N0.js} +1 -1
  140. package/e24/es/{index-BT6cARcm.js → index-CLAfHIml.js} +1 -1
  141. package/{tv4/es/index-Fatj99-w.js → e24/es/index-CZtyf0jS.js} +1 -1
  142. package/e24/es/{index-CJtN5Ux6.js → index-D6VTaTl3.js} +1 -1
  143. package/e24/es/{index-B29Rxeb-.js → index-DF244RRi.js} +1 -1
  144. package/e24/es/{index-DWAIkjeC.js → index-RTqU_3hB.js} +1 -1
  145. package/e24/es/index.d.ts +19 -0
  146. package/e24/es/index.js +1 -1
  147. package/e24/es/{styles-C9WN5jzW.js → styles-3sc6XdB-.js} +1 -1
  148. package/e24/es/{styles-V2f2BkN2.js → styles-BAl_3vMl.js} +1 -1
  149. package/e24/es/{styles-B-Yl4PSb.js → styles-BMJ8T7fL.js} +1 -1
  150. package/e24/es/{styles-KMaaBqGH.js → styles-Bia3hiG7.js} +1 -1
  151. package/e24/es/{styles-DAv2hFi1.js → styles-DK4hTklO.js} +1 -1
  152. package/e24/es/{styles-BI5cdAF9.js → styles-DUOog_gc.js} +1 -1
  153. package/{tv4/es/styles-DLQ4ufVm.js → e24/es/styles-DWNWEqx9.js} +1 -1
  154. package/e24/es/{styles-DgpdEMJP.js → styles-DpEIDLEr.js} +1 -1
  155. package/e24/es/{styles-BptTqtHd.js → styles-NDCl-Fnx.js} +1 -1
  156. package/e24/es/{styles-CO8jY1tT.js → styles-nqTatAnn.js} +1 -1
  157. package/e24/es/{styles-CPbjzkNO.js → styles-oDmE25-G.js} +1 -1
  158. package/editory/cjs/index.d.ts +19 -0
  159. package/editory/es/index.d.ts +19 -0
  160. package/fotbollskanalen/cjs/index.d.ts +19 -0
  161. package/fotbollskanalen/cjs/index.js +1 -1
  162. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-ClJ6Fvy9.js +1 -0
  163. package/fotbollskanalen/es/{events-BV44NdjZ.js → events-BdjHDrCO.js} +1 -1
  164. package/fotbollskanalen/es/{index-B6Dp_RWi.js → index-B8_DAJrE.js} +1 -1
  165. package/fotbollskanalen/es/{index-Ct_w83Z9.js → index-BYOnKTkC.js} +1 -1
  166. package/fotbollskanalen/es/{index-mO3UoNb_.js → index-C-He7fit.js} +1 -1
  167. package/fotbollskanalen/es/{index-8B3YymA4.js → index-Cq2dTD5N.js} +1 -1
  168. package/fotbollskanalen/es/{index-BUm9LBHF.js → index-DMn-yP1t.js} +1 -1
  169. package/fotbollskanalen/es/{index-B6UzXJcf.js → index-QUwIJqca.js} +1 -1
  170. package/fotbollskanalen/es/{index-BBJBFDvR.js → index-VIQLjIBw.js} +1 -1
  171. package/fotbollskanalen/es/{index-hD5knSUm.js → index-nJoT51KX.js} +1 -1
  172. package/fotbollskanalen/es/index.d.ts +19 -0
  173. package/fotbollskanalen/es/index.js +1 -1
  174. package/fotbollskanalen/es/{styles-BVmiEtrH.js → styles-BuH9xVv6.js} +1 -1
  175. package/godt/cjs/index.d.ts +19 -0
  176. package/godt/cjs/index.js +1 -1
  177. package/kilkaya/cjs/index.d.ts +19 -0
  178. package/kilkaya/cjs/index.js +1 -1
  179. package/kilkaya/es/index.d.ts +19 -0
  180. package/kilkaya/es/index.js +1 -1
  181. package/klart/cjs/index.d.ts +19 -0
  182. package/klart/cjs/index.js +1 -1
  183. package/koket/cjs/index.d.ts +19 -0
  184. package/koket/cjs/index.js +1 -1
  185. package/koket/es/_auto-entry_koket-CfcCrr2a.js +1 -0
  186. package/koket/es/{events-CsLRt335.js → events-0DxWWCZ9.js} +1 -1
  187. package/koket/es/{index-EnX6Dw2m.js → index--wuLVJT1.js} +1 -1
  188. package/{svdv2/es/index-DVlTp_mb.js → koket/es/index-B9jCMa-F.js} +1 -1
  189. package/koket/es/{index-PnaxRenK.js → index-Be_MdB7n.js} +1 -1
  190. package/koket/es/{index-yGTXZBeu.js → index-C6aVVVJ6.js} +1 -1
  191. package/koket/es/{index-DizaBLHf.js → index-D8fZlGJ6.js} +1 -1
  192. package/koket/es/{index-DQ4PnViN.js → index-DOGN0SX7.js} +1 -1
  193. package/koket/es/{index-aP8AlmV8.js → index-DfDCldGO.js} +1 -1
  194. package/koket/es/{index-BnuFFRsK.js → index-cYdPNTwi.js} +1 -1
  195. package/koket/es/index.d.ts +19 -0
  196. package/koket/es/index.js +1 -1
  197. package/{svdv2/es/styles-Ca_3jns4.js → koket/es/styles-DswGt2mE.js} +1 -1
  198. package/minmote/cjs/index.d.ts +19 -0
  199. package/minmote/cjs/index.js +1 -1
  200. package/package.json +1 -1
  201. package/pent/cjs/index.d.ts +19 -0
  202. package/pent/cjs/index.js +1 -1
  203. package/sa/cjs/index.d.ts +19 -0
  204. package/sa/cjs/index.js +1 -1
  205. package/sa/es/_auto-entry_sa-DuMP7yP_.js +1 -0
  206. package/sa/es/{events-B3Sq62p-.js → events-C8S7jrt3.js} +1 -1
  207. package/sa/es/{index-C5XXWcjo.js → index-1IvtyUJ6.js} +1 -1
  208. package/sa/es/{index-pDirEekr.js → index-BAJc_zk_.js} +1 -1
  209. package/sa/es/{index-GpnCDcu_.js → index-B_iUHp18.js} +1 -1
  210. package/sa/es/{index-CeK8bFtn.js → index-Br6T-pda.js} +1 -1
  211. package/sa/es/{index-1xD_QLoe.js → index-CYNpcUX3.js} +1 -1
  212. package/{bt/es/index-vocMRjVL.js → sa/es/index-Cyq1Jqmv.js} +1 -1
  213. package/sa/es/{index-BQw2DvRg.js → index-DtJJzHK5.js} +1 -1
  214. package/{bt/es/index-Cdueup6_.js → sa/es/index-uThQzJEi.js} +1 -1
  215. package/sa/es/index.d.ts +19 -0
  216. package/sa/es/index.js +1 -1
  217. package/sa/es/{styles-snupSeEl.js → styles-B1GOzs0B.js} +1 -1
  218. package/sa/es/{styles-DZv7jF3C.js → styles-B8JtTDvr.js} +1 -1
  219. package/{vg/es/styles-LFpfn9Ch.js → sa/es/styles-BQcj5ZW0.js} +1 -1
  220. package/sa/es/{styles-CWDgYDxA.js → styles-BqbfWI42.js} +1 -1
  221. package/{bt/es/styles-fw4hTc8j.js → sa/es/styles-CI1Ug3AG.js} +1 -1
  222. package/sa/es/{styles-Birhnb8o.js → styles-KihGIsxt.js} +1 -1
  223. package/{vg/es/styles-C_yN9wqf.js → sa/es/styles-Ysny45W0.js} +1 -1
  224. package/sa/es/{styles-Dal_YYJu.js → styles-_0voXDgk.js} +1 -1
  225. package/sa/es/{styles-DNqQvbLS.js → styles-jucyBwh4.js} +1 -1
  226. package/sav2/es/_auto-entry_sav2-Chan3yFg.js +1 -0
  227. package/sav2/es/{events-A3NOCBS-.js → events-BTwxLrmE.js} +1 -1
  228. package/sav2/es/{index-CVF4z_xe.js → index-B53BR4b8.js} +1 -1
  229. package/sav2/es/{index-BxLmyP7T.js → index-B8QN1-Xi.js} +1 -1
  230. package/sav2/es/{index-CTaLEvny.js → index-COWfP5cs.js} +1 -1
  231. package/sav2/es/{index-IgzUudKN.js → index-CTEloN61.js} +1 -1
  232. package/sav2/es/{index-xN1tAGZz.js → index-Dmor7Z1b.js} +1 -1
  233. package/sav2/es/{index-D58R4dxf.js → index-HS2u3Zpj.js} +1 -1
  234. package/sav2/es/{index-DASLf6Jd.js → index-ZGLdhTow.js} +1 -1
  235. package/sav2/es/{index-Dnaf_fh2.js → index-rjgG7Xwk.js} +1 -1
  236. package/sav2/es/index.d.ts +19 -0
  237. package/sav2/es/index.js +1 -1
  238. package/{btv2/es/styles-Cr3Nu_76.js → sav2/es/styles-2Nnzs_wx.js} +1 -1
  239. package/{btv2/es/styles-DMuRA-dP.js → sav2/es/styles-BMrhfdTD.js} +1 -1
  240. package/{vgv2/es/styles-CgjQZfFK.js → sav2/es/styles-Bu82ldvz.js} +1 -1
  241. package/sav2/es/{styles-BPTUng9k.js → styles-DFoiKFxe.js} +1 -1
  242. package/sav2/es/{styles-D4Dif9uO.js → styles-DRLhz-Pu.js} +1 -1
  243. package/sav2/es/{styles-BGXxvwMx.js → styles-DjMguaWj.js} +1 -1
  244. package/{vgv2/es/styles-bj0m2kFL.js → sav2/es/styles-DnoLY9DG.js} +1 -1
  245. package/sav2/es/{styles-DJYuRE3k.js → styles-zb8508Q3.js} +1 -1
  246. package/sav2/styles.css +1 -1
  247. package/svd/cjs/index.d.ts +19 -0
  248. package/svd/cjs/index.js +1 -1
  249. package/svd/es/_auto-entry_svd-5Orlt_aZ.js +1 -0
  250. package/svd/es/{events-CjxQafKH.js → events-xpACbhEk.js} +1 -1
  251. package/svd/es/{index-3DIBU7vS.js → index-AaU4iJb_.js} +1 -1
  252. package/svd/es/{index-BPvEq9eH.js → index-BTkJXRDz.js} +1 -1
  253. package/svd/es/{index-Gs0EzAO2.js → index-Bpqx7sL4.js} +1 -1
  254. package/svd/es/{index-DwzzmWa_.js → index-C8IPcd68.js} +1 -1
  255. package/{e24/es/index-DbHQu6nU.js → svd/es/index-Cge_jEH4.js} +1 -1
  256. package/svd/es/{index-DkRBKwG1.js → index-DP_0yLU0.js} +1 -1
  257. package/svd/es/{index-DI7meypd.js → index-ZRqg1RwZ.js} +1 -1
  258. package/svd/es/{index-CZUEn0B7.js → index-pRPyyoJx.js} +1 -1
  259. package/svd/es/index.d.ts +19 -0
  260. package/svd/es/index.js +1 -1
  261. package/svd/es/{styles--BX9ufXt.js → styles-COuw80gn.js} +1 -1
  262. package/svd/es/{styles-7ay2Xmty.js → styles-DDwL7EXa.js} +1 -1
  263. package/svd/es/{styles-aAogvefr.js → styles-DXJ54Dlu.js} +1 -1
  264. package/svd/es/{styles-DD02yC3R.js → styles-DjXQ1aIf.js} +1 -1
  265. package/svd/es/{styles-Kzut_1ce.js → styles-fEOdy4x5.js} +1 -1
  266. package/svd/es/{styles-BLtZ5-Dm.js → styles-wVQjAwi4.js} +1 -1
  267. package/svdv2/es/_auto-entry_svdv2-D92Sr8sv.js +1 -0
  268. package/svdv2/es/{events-Bse4eB7m.js → events-rHRR45Oc.js} +1 -1
  269. package/svdv2/es/{index-CUzwkVVm.js → index-9m7OluMX.js} +1 -1
  270. package/svdv2/es/{index-C5_5PU7E.js → index-B5_Heysk.js} +1 -1
  271. package/svdv2/es/{index-BRjr6uF2.js → index-C3EyOOQ1.js} +1 -1
  272. package/svdv2/es/{index-mp7agzxm.js → index-D6jFeixA.js} +1 -1
  273. package/svdv2/es/{index-DEGM-zjX.js → index-DUEKQirr.js} +1 -1
  274. package/svdv2/es/{index-0nZXKkQw.js → index-_VqtpxkU.js} +1 -1
  275. package/{koket/es/index-Cfn4Hu84.js → svdv2/es/index-nzRrRDNv.js} +1 -1
  276. package/svdv2/es/{index-CPn0wgKO.js → index-sFmWFac1.js} +1 -1
  277. package/svdv2/es/index.d.ts +19 -0
  278. package/svdv2/es/index.js +1 -1
  279. package/{koket/es/styles-ZpmRQnBt.js → svdv2/es/styles-9ghYoFbS.js} +1 -1
  280. package/svdv2/es/{styles-BbFy-SfM.js → styles-CdvbETBq.js} +1 -1
  281. package/svdv2/es/{styles-BICncnr4.js → styles-Cffbyyic.js} +1 -1
  282. package/svdv2/es/{styles-BJLMoBW9.js → styles-DIBKsLFk.js} +1 -1
  283. package/svdv2/es/{styles-CewKqqGU.js → styles-Dl5qiGBy.js} +1 -1
  284. package/svdv2/es/{styles-sohpIAt7.js → styles-p4pWN8kV.js} +1 -1
  285. package/svdv2/styles.css +1 -1
  286. package/tek/cjs/index.d.ts +19 -0
  287. package/tek/cjs/index.js +1 -1
  288. package/tracker/cjs/index.d.ts +19 -0
  289. package/tracker/es/index.d.ts +19 -0
  290. package/tv4/cjs/index.d.ts +19 -0
  291. package/tv4/cjs/index.js +1 -1
  292. package/tv4/es/_auto-entry_tv4-DTu42CVS.js +1 -0
  293. package/tv4/es/{events-D44Z1oV8.js → events-CbC7QEai.js} +1 -1
  294. package/tv4/es/{index-Cmjbdy2d.js → index-BUhmWRPT.js} +1 -1
  295. package/{svd/es/index-DR3WUD1R.js → tv4/es/index-BUuBvzxQ.js} +1 -1
  296. package/tv4/es/{index-BUTxO4i3.js → index-BclrqEGM.js} +1 -1
  297. package/tv4/es/{index-CGF3XUPd.js → index-CmQWra83.js} +1 -1
  298. package/tv4/es/{index-DS_KKeAJ.js → index-D5qF2adM.js} +1 -1
  299. package/tv4/es/{index-D6vK6POa.js → index-DZpubrgE.js} +1 -1
  300. package/tv4/es/{index-CbHFbRqq.js → index-Ks5JLKPT.js} +1 -1
  301. package/tv4/es/{index-SAOJ8J7n.js → index-pYKKu0ld.js} +1 -1
  302. package/tv4/es/index.d.ts +19 -0
  303. package/tv4/es/index.js +1 -1
  304. package/{e24/es/styles-B2yi61gc.js → tv4/es/styles-D7WvCXz-.js} +1 -1
  305. package/tvnu/cjs/index.d.ts +19 -0
  306. package/tvnu/cjs/index.js +1 -1
  307. package/types/index.d.ts +19 -0
  308. package/vg/cjs/index.d.ts +19 -0
  309. package/vg/cjs/index.js +1 -1
  310. package/vg/es/_auto-entry_vg-CI7KeJ7F.js +1 -0
  311. package/vg/es/{events-YceP9eVD.js → events-DNAl1ePr.js} +1 -1
  312. package/vg/es/{index-C3lzuVOQ.js → index-BGun5xCj.js} +1 -1
  313. package/vg/es/{index-C2mjCCxU.js → index-BYE_L3YR.js} +1 -1
  314. package/vg/es/{index-iGnm-GFf.js → index-C3V_e1XF.js} +1 -1
  315. package/vg/es/{index-CNHzV7pF.js → index-C7fN75K3.js} +1 -1
  316. package/vg/es/{index-CNnYcwVT.js → index-D1uLhilC.js} +1 -1
  317. package/vg/es/{index-BZjLVwnP.js → index-DDL8Af2X.js} +1 -1
  318. package/vg/es/{index-DlSCxHFh.js → index-DwGxBmeP.js} +1 -1
  319. package/vg/es/{index-BMheDtX-.js → index-XeZ7SwBk.js} +1 -1
  320. package/vg/es/index.d.ts +19 -0
  321. package/vg/es/index.js +1 -1
  322. package/vg/es/{styles-Blf6iW14.js → styles-3bVT0t_a.js} +1 -1
  323. package/vg/es/{styles-DFPdr5YA.js → styles-4yCwF2nv.js} +1 -1
  324. package/vg/es/{styles-DKoGv68d.js → styles-BIALa-xy.js} +1 -1
  325. package/{bt/es/styles-DNGPxS19.js → vg/es/styles-BSfpgVXJ.js} +1 -1
  326. package/vg/es/{styles-BHatuZlY.js → styles-Bv3vF0-b.js} +1 -1
  327. package/vg/es/{styles-CRkG579q.js → styles-BvhA39C7.js} +1 -1
  328. package/vg/es/{styles-8bSItB04.js → styles-BwiR_kbC.js} +1 -1
  329. package/vg/es/{styles-Brk_qQJP.js → styles-CIHwlSYD.js} +1 -1
  330. package/vg/es/{styles-CTBYZbbk.js → styles-CQmno1pW.js} +1 -1
  331. package/vg/es/{styles-DnFH09q6.js → styles-CRr6kpBX.js} +1 -1
  332. package/vg/es/{styles-uHd-AzSK.js → styles-CiILkZUo.js} +1 -1
  333. package/vg/es/{styles-BjtBJLEB.js → styles-D4oRsLM6.js} +1 -1
  334. package/vg/es/{styles-BQL7T_uP.js → styles-XmDfZpcm.js} +1 -1
  335. package/vg/es/{styles-sal3X3wr.js → styles-lJcNQKcP.js} +1 -1
  336. package/{sa/es/styles-3bUs0Dpj.js → vg/es/styles-tD8TNMsW.js} +1 -1
  337. package/vgv2/es/_auto-entry_vgv2-CVxHXRQ3.js +1 -0
  338. package/vgv2/es/{events-Dyxg-o4v.js → events-4c0QZ5ru.js} +1 -1
  339. package/vgv2/es/{index-QKO4atOd.js → index-6WUbxF8q.js} +1 -1
  340. package/vgv2/es/{index-uw5c8VIs.js → index-BHZONEW_.js} +1 -1
  341. package/vgv2/es/{index-DvoCajej.js → index-CiK1eAL3.js} +1 -1
  342. package/vgv2/es/{index-DVuISuNG.js → index-DKdpwEOg.js} +1 -1
  343. package/vgv2/es/{index-CIOh_1lF.js → index-DgzoxTqw.js} +1 -1
  344. package/vgv2/es/{index-D-eww3JO.js → index-DmCJBm4m.js} +1 -1
  345. package/vgv2/es/{index-C0Vg0WZx.js → index-DsHPQZyc.js} +1 -1
  346. package/vgv2/es/{index-C1Jkwq14.js → index-_3XO0Gdc.js} +1 -1
  347. package/vgv2/es/index.d.ts +19 -0
  348. package/vgv2/es/index.js +1 -1
  349. package/{sav2/es/styles-BVrWMiPy.js → vgv2/es/styles-B4PZq-53.js} +1 -1
  350. package/vgv2/es/{styles-BchHTyoI.js → styles-B858Hsls.js} +1 -1
  351. package/vgv2/es/{styles-C8Cm9-qw.js → styles-BaPlw8lH.js} +1 -1
  352. package/{btv2/es/styles-BEcVlr9D.js → vgv2/es/styles-Bgv4Jaz7.js} +1 -1
  353. package/{btv2/es/styles-oShHqsDl.js → vgv2/es/styles-BoxNTzGZ.js} +1 -1
  354. package/vgv2/es/{styles-C7A3oXWr.js → styles-BuGStooT.js} +1 -1
  355. package/{btv2/es/styles-fkryBAgM.js → vgv2/es/styles-CDQN7OoS.js} +1 -1
  356. package/vgv2/es/{styles-Di_4TAsZ.js → styles-CSmqo9nP.js} +1 -1
  357. package/vgv2/es/{styles-Ys6h0VGQ.js → styles-DGwU3ILj.js} +1 -1
  358. package/vgv2/es/{styles-BBELe2uu.js → styles-Do2sahbB.js} +1 -1
  359. package/vgv2/es/{styles-DGvpQzHC.js → styles-E76tlcUr.js} +1 -1
  360. package/vgv2/es/{styles-DP9qqT2g.js → styles-Kzz5C2Ep.js} +1 -1
  361. package/vgv2/es/{styles-D_kP9bmL.js → styles-OYmkqDQW.js} +1 -1
  362. package/vgv2/es/{styles-B7L4LEJe.js → styles-sTq9rRqk.js} +1 -1
  363. package/vgv2/es/{styles-B-gB9ymS.js → styles-szVijAOX.js} +1 -1
  364. package/vgv2/styles.css +1 -1
  365. package/aftenposten/es/_auto-entry_aftenposten-Ch51IoMz.js +0 -1
  366. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CznDqFqG.js +0 -1
  367. package/aftonbladet/es/_auto-entry_aftonbladet-BcRp8xrg.js +0 -1
  368. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CbKXMldX.js +0 -1
  369. package/bt/es/_auto-entry_bt-BmxJAxvR.js +0 -1
  370. package/btv2/es/_auto-entry_btv2-XOf4vhnM.js +0 -1
  371. package/e24/es/_auto-entry_e24-Ch8hLaYP.js +0 -1
  372. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-5i3J4eqe.js +0 -1
  373. package/koket/es/_auto-entry_koket-0jH2u-dv.js +0 -1
  374. package/sa/es/_auto-entry_sa-DSkXqb-_.js +0 -1
  375. package/sav2/es/_auto-entry_sav2-0VRP1639.js +0 -1
  376. package/svd/es/_auto-entry_svd-BvktwJjX.js +0 -1
  377. package/svdv2/es/_auto-entry_svdv2-DPomgYhb.js +0 -1
  378. package/tv4/es/_auto-entry_tv4-BEvo_eO2.js +0 -1
  379. package/vg/es/_auto-entry_vg-BsYxV8ys.js +0 -1
  380. package/vgv2/es/_auto-entry_vgv2-C2dYApBv.js +0 -1
@@ -187,6 +187,24 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
187
187
 
188
188
  type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
189
189
 
190
+ interface IdentityUser {
191
+ userId?: string | number;
192
+ gender?: string;
193
+ }
194
+ /** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
195
+ type AccountInterface = {
196
+ getUser: () => Promise<IdentityUser>;
197
+ isLoggedIn: () => Promise<boolean>;
198
+ };
199
+
200
+ interface AccountConfig {
201
+ /** Satisfied by function available in account-sdk-browser v6.
202
+ * This should become the non-optional way to get AccountInterface in a future release,
203
+ * as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
204
+ */
205
+ getAccountSdk?: () => Promise<AccountInterface>;
206
+ }
207
+
190
208
  declare const CogwheelPositions: {
191
209
  readonly LEFT: "left";
192
210
  readonly RIGHT: "right";
@@ -210,6 +228,7 @@ interface SiteConfig {
210
228
  tcf?: TCFConfig;
211
229
  prebid?: PrebidConfig;
212
230
  pulse?: PulseConfig;
231
+ account?: AccountConfig;
213
232
  finnBlink?: FinnBlinkConfig;
214
233
  wallpaper?: WallpaperConfig;
215
234
  fullscreenScroll?: FullscreenScrollConfig;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="vg",r="sa",i="bt",o="e24";class a{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class s{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class l{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class d extends l{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const c="[data-k5a-teaser-analytics]",u=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new d(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(c);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(c);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},g=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},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 g("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(g("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{g("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{g("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);g("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),f="no",h="se",y="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,b=!1;const w=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(g("TCF bypass param detected, returning consent: true"),!0):(g("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(b)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return g(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(g("Getting TCF consent manager..."),window._tcf_)return g("TCF consent manager is already available"),m=window._tcf_,void e(m);g("TCF consent manager is not available");const n=()=>{g("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(y,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},o);g("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return g("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!m)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{g("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);m.onTcfReady(()=>{g("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class k{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 t(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 g("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(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)}}function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,E;var O=C(function(){if(E)return T;E=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},T=s}());const S=["placements","takeover","refreshConfig","editory"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},A=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==i?void 0:i.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class I{set(e){A(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of S){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=O(I.DEFAULT_SITE_HANDLERS,e)}}I.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:()=>{}};const j=new I;j.modifyConfigProperties.bind(j);const L=864e5,_=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return g("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=L)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=L)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return g("Error with parsing localStorage data"),null}}}})(),M=e=>e.startsWith("glci_"),x=()=>{var e;return((e=[])=>e.filter(M))(null!==(e=(()=>{const e=_.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},N=/^glci_/,U="gender_",$="geo_",F="male",q="female",D=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(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)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new k(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===F||o===q?`${U}${o}`:void 0}catch(e){return}var e}),K=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield D(),n=(()=>{const e=x().map(e=>`${$}${e.replace(N,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),B="front";class R{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===B?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class V{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class H{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class J{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:l}}){if(!(null==e?void 0:e.instance))return;const d={[n]:new a,[o]:new R,"no-aftenposten":new V,[i]:new H,"no-bergenstidende":new H,[r]:new z,"no-stavangeraftenblad":new z}[l]||new s;u(e.instance,d,t)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(g(`Kilkaya event for slot: ${n}`),!n)return void g("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(g(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):g("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return g(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=w(e,0,n);return(yield i())?(g(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(g(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new J;yield t.run(e)});
1
+ "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="vg",r="sa",i="bt",o="e24";class a{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class s{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class l{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class d extends l{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const c="[data-k5a-teaser-analytics]",u=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new d(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(c);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(c);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},g=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},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 g("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(g("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{g("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{g("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);g("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),f="no",h="se",y="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,w=!1;const b=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(g("TCF bypass param detected, returning consent: true"),!0):(g("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return g(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(g("Getting TCF consent manager..."),window._tcf_)return g("TCF consent manager is already available"),m=window._tcf_,void e(m);g("TCF consent manager is not available");const n=()=>{g("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(y,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);g("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return g("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!m)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{g("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);m.onTcfReady(()=>{g("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},k=()=>t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class C{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return g("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,S;var A=E(function(){if(S)return T;S=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},T=s}());const O=["placements","takeover","refreshConfig","editory"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==i?void 0:i.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of O){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=A(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:()=>{}};const _=new j;_.modifyConfigProperties.bind(_);const L=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return g("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=L)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=L)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return g("Error with parsing localStorage data"),null}}}})(),x=e=>e.startsWith("glci_"),N=()=>{var e;return((e=[])=>e.filter(x))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},U=/^glci_/,$="gender_",F="geo_",q="male",D="female",K=e=>t(void 0,void 0,void 0,function*(){try{const n=yield((e,n)=>t(void 0,void 0,void 0,function*(){const t=(null==n?void 0:n.getAccountSdk)?n.getAccountSdk:k;return Promise.race([t(),new Promise(t=>setTimeout(()=>t(void 0),e))])}))(500,e),r=new C(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===D?`${$}${o}`:void 0}catch(e){return}}),B=e=>t(void 0,void 0,void 0,function*(){const t=[],n=yield K(e),r=(()=>{const e=N().map(e=>`${F}${e.replace(U,"")}`);return Array.from(new Set(e))})();return n&&t.push(n),r&&t.push(...r),t}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:l}}){if(!(null==e?void 0:e.instance))return;const d={[n]:new a,[o]:new V,"no-aftenposten":new H,[i]:new z,"no-bergenstidende":new z,[r]:new J,"no-stavangeraftenblad":new J}[l]||new s;u(e.instance,d,t)}injectKilkayaMeta(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),r=yield B(n);t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(r)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(g(`Kilkaya event for slot: ${n}`),!n)return void g("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(g(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):g("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s,account:l}=e;if(!(null==s?void 0:s.enabled))return;const d=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return g(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=b(e,0,n);return(yield i())?(g(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(g(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d,l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});
@@ -187,6 +187,24 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
187
187
 
188
188
  type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
189
189
 
190
+ interface IdentityUser {
191
+ userId?: string | number;
192
+ gender?: string;
193
+ }
194
+ /** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
195
+ type AccountInterface = {
196
+ getUser: () => Promise<IdentityUser>;
197
+ isLoggedIn: () => Promise<boolean>;
198
+ };
199
+
200
+ interface AccountConfig {
201
+ /** Satisfied by function available in account-sdk-browser v6.
202
+ * This should become the non-optional way to get AccountInterface in a future release,
203
+ * as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
204
+ */
205
+ getAccountSdk?: () => Promise<AccountInterface>;
206
+ }
207
+
190
208
  declare const CogwheelPositions: {
191
209
  readonly LEFT: "left";
192
210
  readonly RIGHT: "right";
@@ -210,6 +228,7 @@ interface SiteConfig {
210
228
  tcf?: TCFConfig;
211
229
  prebid?: PrebidConfig;
212
230
  pulse?: PulseConfig;
231
+ account?: AccountConfig;
213
232
  finnBlink?: FinnBlinkConfig;
214
233
  wallpaper?: WallpaperConfig;
215
234
  fullscreenScroll?: FullscreenScrollConfig;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="vg",i="sa",o="bt",a="e24";class s{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=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 v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let b="undefined"!=typeof window?window._tcf_:void 0,w=!1;const k=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!b)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=b.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),b.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),b=window._tcf_,void e(b);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(b=window._tcf_,e(b)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,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 v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!b)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);b.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),b.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{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 v("[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)}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E,O;var S=T(function(){if(O)return E;O=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},E=s}());const P=["placements","takeover","refreshConfig","editory"],A={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=S(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:A,initNativeAd:()=>{}};const L=new j;L.modifyConfigProperties.bind(L);const _=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=_)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=_)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return v("Error with parsing localStorage data"),null}}}})(),N=e=>e.startsWith("glci_"),U=()=>{var e;return((e=[])=>e.filter(N))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},$=/^glci_/,F="gender_",x="geo_",D="male",q="female",B=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([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)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===D||o===q?`${F}${o}`:void 0}catch(e){return}var e}),K=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield B(),n=(()=>{const e=U().map(e=>`${x}${e.replace($,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const d={[r]:new s,[a]:new V,"no-aftenposten":new H,[o]:new z,"no-bergenstidende":new z,[i]:new J,"no-stavangeraftenblad":new J}[n]||new l;g(e.instance,d,t)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){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,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const X=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},G=e=>n(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});export{X as Kilkaya,G as runKilkaya};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="vg",i="sa",o="bt",a="e24";class s{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=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 v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,b=!1;const k=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(b)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),w=window._tcf_,void e(w);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,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 v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!w)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);w.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),w.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},C=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class E{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return v("[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.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S,A;var O=T(function(){if(A)return S;A=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},S=s}());const P=["placements","takeover","refreshConfig","editory"],I={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},j=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class _{set(e){j(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=O(_.DEFAULT_SITE_HANDLERS,e)}}_.DEFAULT_SITE_HANDLERS={siteEvents:I,initNativeAd:()=>{}};const L=new _;L.modifyConfigProperties.bind(L);const M=864e5,N=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=M)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=M)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return v("Error with parsing localStorage data"),null}}}})(),U=e=>e.startsWith("glci_"),$=()=>{var e;return((e=[])=>e.filter(U))(null!==(e=(()=>{const e=N.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},F=/^glci_/,x="gender_",D="geo_",q="male",B="female",K=e=>n(void 0,void 0,void 0,function*(){try{const t=yield((e,t)=>n(void 0,void 0,void 0,function*(){const n=(null==t?void 0:t.getAccountSdk)?t.getAccountSdk:C;return Promise.race([n(),new Promise(t=>setTimeout(()=>t(void 0),e))])}))(500,e),r=new E(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===B?`${x}${o}`:void 0}catch(e){return}}),R=e=>n(void 0,void 0,void 0,function*(){const t=[],n=yield K(e),r=(()=>{const e=$().map(e=>`${D}${e.replace(F,"")}`);return Array.from(new Set(e))})();return n&&t.push(n),r&&t.push(...r),t}),V="front";class H{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===V?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class z{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class W{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class X{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const d={[r]:new s,[a]:new H,"no-aftenposten":new z,[o]:new J,"no-bergenstidende":new J,[i]:new W,"no-stavangeraftenblad":new W}[n]||new l;g(e.instance,d,t)}injectKilkayaMeta(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("script"),r=yield R(t);n.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(r)} };`,document.head.appendChild(n)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){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,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s,account:l}=e;if(!(null==s?void 0:s.enabled))return;const d=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d,l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const G=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},Q=e=>n(void 0,void 0,void 0,function*(){const t=new X;yield t.run(e)});export{G as Kilkaya,Q as runKilkaya};
@@ -391,6 +391,24 @@ interface CreateInitNativeAdConfig {
391
391
  postProcess?: (adObj: AstAdObj, adContainer: HTMLElement) => void;
392
392
  }
393
393
 
394
+ interface IdentityUser {
395
+ userId?: string | number;
396
+ gender?: string;
397
+ }
398
+ /** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
399
+ type AccountInterface = {
400
+ getUser: () => Promise<IdentityUser>;
401
+ isLoggedIn: () => Promise<boolean>;
402
+ };
403
+
404
+ interface AccountConfig {
405
+ /** Satisfied by function available in account-sdk-browser v6.
406
+ * This should become the non-optional way to get AccountInterface in a future release,
407
+ * as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
408
+ */
409
+ getAccountSdk?: () => Promise<AccountInterface>;
410
+ }
411
+
394
412
  declare const CogwheelPositions: {
395
413
  readonly LEFT: "left";
396
414
  readonly RIGHT: "right";
@@ -414,6 +432,7 @@ interface SiteConfig {
414
432
  tcf?: TCFConfig;
415
433
  prebid?: PrebidConfig;
416
434
  pulse?: PulseConfig;
435
+ account?: AccountConfig;
417
436
  finnBlink?: FinnBlinkConfig;
418
437
  wallpaper?: WallpaperConfig;
419
438
  fullscreenScroll?: FullscreenScrollConfig;