@schibsted/advertory 3.6.4 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/ad-native/cjs/index.d.ts +4 -0
  2. package/ad-native/cjs/index.js +1 -1
  3. package/ad-native/es/index.d.ts +4 -0
  4. package/ad-native/es/index.js +1 -1
  5. package/aftenposten/cjs/index.d.ts +4 -0
  6. package/aftenposten/cjs/index.js +1 -1
  7. package/aftenposten/es/_auto-entry_aftenposten-CqGw7acl.js +1 -0
  8. package/aftenposten/es/{events-Df1-9LOS.js → events-PNx7o6oW.js} +1 -1
  9. package/aftenposten/es/{index-CMJAIn23.js → index-BZzPCyWE.js} +1 -1
  10. package/aftenposten/es/{index-DVBHCZg4.js → index-BtCX-3S2.js} +1 -1
  11. package/aftenposten/es/index-CSdGQwfs.js +1 -0
  12. package/aftenposten/es/{index-DsIYFKTU.js → index-Cv_9PN1n.js} +1 -1
  13. package/aftenposten/es/{index-DBzmi4_W.js → index-D4DN22-Q.js} +1 -1
  14. package/aftenposten/es/{index-DzpuU7lu.js → index-DE0beKfR.js} +1 -1
  15. package/aftenposten/es/{index-BaE85x3h.js → index-DNWel1E4.js} +1 -1
  16. package/aftenposten/es/{index-tsDj0n0y.js → index-eFx6Z_JJ.js} +1 -1
  17. package/aftenposten/es/{index-D-sY28g-.js → index-iS9FWq3A.js} +1 -1
  18. package/aftenposten/es/index.d.ts +4 -0
  19. package/aftenposten/es/index.js +1 -1
  20. package/aftenposten/es/{styles-BEmMFrBW.js → styles-8booilHV.js} +1 -1
  21. package/aftenposten/es/{styles-CHil1xh4.js → styles-B9yAJKfw.js} +1 -1
  22. package/aftenposten/es/{styles-NeybB-9s.js → styles-BXcM9m8t.js} +1 -1
  23. package/aftenposten/es/{styles-D7EC11Yo.js → styles-Bos8btrn.js} +1 -1
  24. package/aftenposten/es/{styles-DodRL1tz.js → styles-BqWRUu_r.js} +1 -1
  25. package/aftenposten/es/{styles-BR-fUhcU.js → styles-CLa8dGCv.js} +1 -1
  26. package/aftenposten/es/{styles-C7BPHRUR.js → styles-DhSUFSrn.js} +1 -1
  27. package/aftenposten/es/{styles-ci5Tfkaf.js → styles-JViXQu2e.js} +1 -1
  28. package/aftenposten/es/{styles-DwUIGxdD.js → styles-gT8paC-o.js} +1 -1
  29. package/aftenposten/es/{styles-B3fxevhP.js → styles-sDZ22I7G.js} +1 -1
  30. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-DJOCTUQH.js +1 -0
  31. package/aftenpostenv2/es/{events-CYVN5M4X.js → events-BLLVOEPr.js} +1 -1
  32. package/aftenpostenv2/es/{index-Cq1gx4Bi.js → index---M4eNiS.js} +1 -1
  33. package/aftenpostenv2/es/index-2j_-EJh-.js +1 -0
  34. package/aftenpostenv2/es/{index-Ctn7xghf.js → index-8R1EfEup.js} +1 -1
  35. package/aftenpostenv2/es/{index-rdbLPVGx.js → index-BNMDVfll.js} +1 -1
  36. package/aftenpostenv2/es/{index-CfUm33C8.js → index-C4Qx5cXN.js} +1 -1
  37. package/{aftonbladetv2/es/index-CQxTL-Xe.js → aftenpostenv2/es/index-DOJEU9so.js} +1 -1
  38. package/aftenpostenv2/es/{index-D6-sjkPl.js → index-HAb2Wxes.js} +1 -1
  39. package/aftenpostenv2/es/{index-Bi-9HXTJ.js → index-bcv4q8hx.js} +1 -1
  40. package/aftenpostenv2/es/{index-B_yKL8kM.js → index-vpCT24IE.js} +1 -1
  41. package/aftenpostenv2/es/index.d.ts +4 -0
  42. package/aftenpostenv2/es/index.js +1 -1
  43. package/aftenpostenv2/es/{styles-Dp0Anq6q.js → styles-5wj2z61v.js} +1 -1
  44. package/aftenpostenv2/es/{styles-DaE_TtcY.js → styles-6ky1qWcX.js} +1 -1
  45. package/aftenpostenv2/es/{styles-CWqajzSC.js → styles-BT5FeEJn.js} +1 -1
  46. package/aftenpostenv2/es/{styles-DO-u2mwt.js → styles-CC1eJL97.js} +1 -1
  47. package/aftenpostenv2/es/{styles-Di059Y3e.js → styles-D5xyk8TM.js} +1 -1
  48. package/aftenpostenv2/es/{styles-BywvnSsV.js → styles-DDlwHgsd.js} +1 -1
  49. package/aftenpostenv2/es/{styles-BORa5QE2.js → styles-DMX5BDUl.js} +1 -1
  50. package/aftenpostenv2/es/{styles-BLJ77vqa.js → styles-DbkCKhdC.js} +1 -1
  51. package/aftenpostenv2/es/{styles-C6Pdn0Q5.js → styles-DcqGZDMv.js} +1 -1
  52. package/aftenpostenv2/es/{styles-qUi23u3r.js → styles-gBCmRDka.js} +1 -1
  53. package/aftonbladet/cjs/index.d.ts +4 -0
  54. package/aftonbladet/cjs/index.js +1 -1
  55. package/aftonbladet/es/_auto-entry_aftonbladet-BmIl9nvI.js +1 -0
  56. package/aftonbladet/es/{events-C03XnqBo.js → events-BrU8NesR.js} +1 -1
  57. package/aftonbladet/es/{index-B_1tUTGy.js → index-B-s8O8-f.js} +1 -1
  58. package/aftonbladet/es/{index-DarqwJpU.js → index-B_kh6yMa.js} +1 -1
  59. package/aftonbladet/es/{index-CotQ9Dus.js → index-Bsbq-bSc.js} +1 -1
  60. package/aftonbladet/es/{index-DDsx_27v.js → index-C-fMrLv_.js} +1 -1
  61. package/aftonbladet/es/{index-B05aU04a.js → index-C7hgW0aK.js} +1 -1
  62. package/aftonbladet/es/{index-7lI0yH-j.js → index-CEIxA3Yr.js} +1 -1
  63. package/aftonbladet/es/index-CHm2LA5q.js +1 -0
  64. package/aftonbladet/es/{index-ByU7KHBJ.js → index-Ctyjjyj5.js} +1 -1
  65. package/aftonbladet/es/{index-BUGdyPz_.js → index-DH97cOlc.js} +1 -1
  66. package/aftonbladet/es/index.d.ts +4 -0
  67. package/aftonbladet/es/index.js +1 -1
  68. package/aftonbladet/es/{styles-4dCBp5ET.js → styles-BGDV2ELh.js} +1 -1
  69. package/aftonbladet/es/{styles-DRxqMkTZ.js → styles-Be5jRDgs.js} +1 -1
  70. package/aftonbladet/es/{styles-Dp0MP5dy.js → styles-DMXJgUFf.js} +1 -1
  71. package/aftonbladet/es/{styles-CTspc63T.js → styles-Ddd_ccgX.js} +1 -1
  72. package/aftonbladet/es/{styles-Df4SUooL.js → styles-HKvntsqd.js} +1 -1
  73. package/aftonbladet/es/{styles-CfRcJPmk.js → styles-cnQh6gRy.js} +1 -1
  74. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-B__eDii-.js +1 -0
  75. package/aftonbladetv2/es/{events-De2FYQD7.js → events-grsBNTXt.js} +1 -1
  76. package/{aftenpostenv2/es/index-BZdVtpM3.js → aftonbladetv2/es/index-5qTCtHFL.js} +1 -1
  77. package/aftonbladetv2/es/{index-CEJ0R50q.js → index-B5F8jkQ_.js} +1 -1
  78. package/aftonbladetv2/es/{index-JZ71dbbp.js → index-BxLy25ve.js} +1 -1
  79. package/aftonbladetv2/es/{index-GBeo5p-Z.js → index-CmPq9KNB.js} +1 -1
  80. package/aftonbladetv2/es/{index-JFkQvxa2.js → index-CuSx-xFb.js} +1 -1
  81. package/aftonbladetv2/es/index-DktA9MWj.js +1 -0
  82. package/aftonbladetv2/es/{index-BQtLkD9l.js → index-Ls7BrhdT.js} +1 -1
  83. package/aftonbladetv2/es/{index-Ba96Unn8.js → index-gjjYu3HB.js} +1 -1
  84. package/aftonbladetv2/es/{index--ZK1O6mA.js → index-hodYU5iu.js} +1 -1
  85. package/aftonbladetv2/es/index.d.ts +4 -0
  86. package/aftonbladetv2/es/index.js +1 -1
  87. package/aftonbladetv2/es/{styles-CND7V2vA.js → styles-2XQu6DUY.js} +1 -1
  88. package/aftonbladetv2/es/{styles-C9YeFf91.js → styles-BkAtVqnd.js} +1 -1
  89. package/aftonbladetv2/es/{styles-BTCYUB4p.js → styles-BpffmU5o.js} +1 -1
  90. package/aftonbladetv2/es/{styles-ChKMOhCS.js → styles-Cq8uSBfp.js} +1 -1
  91. package/aftonbladetv2/es/{styles-BsXGWv0q.js → styles-DT_UG13E.js} +1 -1
  92. package/aftonbladetv2/es/{styles-CgyIs9xm.js → styles-iil6i5wT.js} +1 -1
  93. package/brandmetrics/cjs/index.js +1 -1
  94. package/brandmetrics/es/index.js +1 -1
  95. package/bt/cjs/index.d.ts +4 -0
  96. package/bt/cjs/index.js +1 -1
  97. package/bt/es/_auto-entry_bt-OzmLjbIf.js +1 -0
  98. package/bt/es/{events-C8eFLgZ8.js → events-C0a39mis.js} +1 -1
  99. package/{sa/es/index-CK0SuJ5w.js → bt/es/index-AUzS1WjK.js} +1 -1
  100. package/bt/es/{index-BSuaNor3.js → index-BCtveXwT.js} +1 -1
  101. package/bt/es/{index-COxtcrYs.js → index-CGEbHLXg.js} +1 -1
  102. package/bt/es/{index-BUsjEeKj.js → index-CbvFsRGq.js} +1 -1
  103. package/bt/es/index-DcvZDIet.js +1 -0
  104. package/{vg/es/index-CZweaWkS.js → bt/es/index-DnK5hA3G.js} +1 -1
  105. package/{sa/es/index-B7P3LygS.js → bt/es/index-Dy36HZM0.js} +1 -1
  106. package/{sa/es/index-DJu9ETjT.js → bt/es/index-ZF0YftQZ.js} +1 -1
  107. package/bt/es/{index-icnIqWg9.js → index-erDeSSt8.js} +1 -1
  108. package/bt/es/index.d.ts +4 -0
  109. package/bt/es/index.js +1 -1
  110. package/bt/es/{styles-mlsuduXd.js → styles-BCQ8Zrnn.js} +1 -1
  111. package/{sa/es/styles-BBJPnF5R.js → bt/es/styles-BPY-3-8S.js} +1 -1
  112. package/bt/es/{styles-BYzYD-ku.js → styles-BhLa1PrQ.js} +1 -1
  113. package/bt/es/{styles-5lRfDhsp.js → styles-Bool5ZzD.js} +1 -1
  114. package/bt/es/{styles-CspNCSAn.js → styles-C0GZ2cEj.js} +1 -1
  115. package/{sa/es/styles-I64yJAio.js → bt/es/styles-Cw9h75A2.js} +1 -1
  116. package/bt/es/{styles-CPX-0XHG.js → styles-D06Is3dE.js} +1 -1
  117. package/bt/es/{styles-D7TrQJot.js → styles-DhPB_aN5.js} +1 -1
  118. package/bt/es/{styles-DKc2T16C.js → styles-o9VzG5kv.js} +1 -1
  119. package/btv2/es/_auto-entry_btv2-ZH4EhrXi.js +1 -0
  120. package/btv2/es/{events-Be-Ok_dV.js → events-8HbKwl1x.js} +1 -1
  121. package/btv2/es/{index-2zCT-FR1.js → index-CoWLgs3L.js} +1 -1
  122. package/{sav2/es/index-CQDbRjeJ.js → btv2/es/index-CoYxidmf.js} +1 -1
  123. package/btv2/es/{index-fjVvwC6z.js → index-Cqmd0f7j.js} +1 -1
  124. package/btv2/es/{index-HtL6-6sj.js → index-D1nYac4G.js} +1 -1
  125. package/btv2/es/{index-ZnNzX7uE.js → index-DW_fVnNE.js} +1 -1
  126. package/btv2/es/{index-zLeDQD50.js → index-Dyrz6pPN.js} +1 -1
  127. package/btv2/es/{index-g_Ip1VVn.js → index-Dz1He6Nl.js} +1 -1
  128. package/btv2/es/{index-DKlmhtxG.js → index-TvGyXUfj.js} +1 -1
  129. package/btv2/es/index-UiKGhGKP.js +1 -0
  130. package/btv2/es/index.d.ts +4 -0
  131. package/btv2/es/index.js +1 -1
  132. package/{vgv2/es/styles-D6uYkQRO.js → btv2/es/styles-BE5VNf2N.js} +1 -1
  133. package/btv2/es/{styles-D8JKUTAP.js → styles-BKl0HceZ.js} +1 -1
  134. package/{sav2/es/styles-D3Mmbjwu.js → btv2/es/styles-DGYmG63S.js} +1 -1
  135. package/{sav2/es/styles-CD8L8RcJ.js → btv2/es/styles-DX8RX7NX.js} +1 -1
  136. package/{vgv2/es/styles-CKzjI1qf.js → btv2/es/styles-DmQHFQ2U.js} +1 -1
  137. package/btv2/es/{styles-BhJi1-Tp.js → styles-WoGGc-bX.js} +1 -1
  138. package/btv2/es/{styles-BgoaSbck.js → styles-dpD5u0UU.js} +1 -1
  139. package/{sav2/es/styles-CwtK-hOf.js → btv2/es/styles-eQJd2nDL.js} +1 -1
  140. package/btv2/styles.css +1 -1
  141. package/common/cjs/index.js +1 -1
  142. package/common/es/index.js +1 -1
  143. package/dr-edition/cjs/index.d.ts +4 -0
  144. package/dr-edition/es/index.d.ts +4 -0
  145. package/e24/es/_auto-entry_e24-BIikvgCp.js +1 -0
  146. package/e24/es/{events-D3VD6boT.js → events-B7PAJ5UZ.js} +1 -1
  147. package/e24/es/{index-CLqrrhw0.js → index-BJJAODBr.js} +1 -1
  148. package/e24/es/{index-Ca6hxIkt.js → index-CDrYqfI2.js} +1 -1
  149. package/{svdv2/es/index-BMee3kW7.js → e24/es/index-C_7P1UPv.js} +1 -1
  150. package/e24/es/{index-Dbu0h6vS.js → index-DJOOg1oT.js} +1 -1
  151. package/e24/es/{index-DfsF61JD.js → index-DLSE8gDS.js} +1 -1
  152. package/e24/es/{index-DReS6_qP.js → index-DbHJQjV9.js} +1 -1
  153. package/e24/es/{index-CZxY1D6z.js → index-DjNA8m8S.js} +1 -1
  154. package/e24/es/index-Ds4E1z9g.js +1 -0
  155. package/{tv4/es/index-DILiwfHZ.js → e24/es/index-uHbhmhuA.js} +1 -1
  156. package/e24/es/index.d.ts +4 -0
  157. package/e24/es/index.js +1 -1
  158. package/e24/es/{styles-CRYFS7Iz.js → styles-1tUnsoK7.js} +1 -1
  159. package/{tv4/es/styles-CHNqHscB.js → e24/es/styles-3p_PNl-S.js} +1 -1
  160. package/e24/es/{styles-DhfgWXYy.js → styles-B2BYUXr_.js} +1 -1
  161. package/e24/es/{styles-B1Dtllmg.js → styles-Bd8KEAD-.js} +1 -1
  162. package/e24/es/{styles-COdqrG7X.js → styles-BlWSuWTY.js} +1 -1
  163. package/e24/es/{styles-Coo9tuB7.js → styles-BntnrBwZ.js} +1 -1
  164. package/e24/es/{styles-Detj0S38.js → styles-CB0LppMx.js} +1 -1
  165. package/e24/es/{styles-CkvuW2je.js → styles-CwydeKT1.js} +1 -1
  166. package/e24/es/{styles-DKnVLu9G.js → styles-CzM2uGeW.js} +1 -1
  167. package/e24/es/{styles-DCxDojAH.js → styles-wOnR1zqn.js} +1 -1
  168. package/e24/es/{styles-axEzZuZD.js → styles-xAdbrgNn.js} +1 -1
  169. package/e24/styles.css +1 -1
  170. package/editory/cjs/index.d.ts +4 -0
  171. package/editory/es/index.d.ts +4 -0
  172. package/fotbollskanalen/cjs/index.d.ts +4 -0
  173. package/fotbollskanalen/cjs/index.js +1 -1
  174. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DsL1c8c-.js +1 -0
  175. package/fotbollskanalen/es/{events-CdkvwXoP.js → events-BvD0XkBJ.js} +1 -1
  176. package/fotbollskanalen/es/{index-DyobY13N.js → index-BSN_nrCO.js} +1 -1
  177. package/fotbollskanalen/es/{index-BblHvWkn.js → index-BvNFbERL.js} +1 -1
  178. package/fotbollskanalen/es/{index-FdFGWOFm.js → index-C6ARwQi1.js} +1 -1
  179. package/fotbollskanalen/es/{index-BAiB5js5.js → index-CBpk6dKM.js} +1 -1
  180. package/fotbollskanalen/es/{index-B5uLf4eS.js → index-CnA7lfTR.js} +1 -1
  181. package/fotbollskanalen/es/index-CvkYODkG.js +1 -0
  182. package/fotbollskanalen/es/{index-hni-ndB5.js → index-DEI5B6UI.js} +1 -1
  183. package/fotbollskanalen/es/{index-DFI4afBW.js → index-RVtUqG1j.js} +1 -1
  184. package/fotbollskanalen/es/{index-CFmK1fbr.js → index-cL3Q4ACe.js} +1 -1
  185. package/fotbollskanalen/es/index.d.ts +4 -0
  186. package/fotbollskanalen/es/index.js +1 -1
  187. package/fotbollskanalen/es/{styles-B5VPqZB7.js → styles-DRhCVBir.js} +1 -1
  188. package/glimr/cjs/index.js +1 -1
  189. package/glimr/es/index.js +1 -1
  190. package/godt/cjs/index.d.ts +4 -0
  191. package/godt/cjs/index.js +1 -1
  192. package/kilkaya/cjs/index.d.ts +4 -0
  193. package/kilkaya/cjs/index.js +1 -1
  194. package/kilkaya/es/index.d.ts +4 -0
  195. package/kilkaya/es/index.js +1 -1
  196. package/klart/cjs/index.d.ts +4 -0
  197. package/klart/cjs/index.js +1 -1
  198. package/koket/cjs/index.d.ts +4 -0
  199. package/koket/cjs/index.js +1 -1
  200. package/koket/es/_auto-entry_koket-C0Wqecx3.js +1 -0
  201. package/koket/es/{events-BojPsk_G.js → events-r6nqzu0v.js} +1 -1
  202. package/{svdv2/es/index-b-hY5XaF.js → koket/es/index-164hIAS4.js} +1 -1
  203. package/koket/es/{index-uZHxfTuL.js → index-B2EZjHKp.js} +1 -1
  204. package/koket/es/{index-CWCsCmHq.js → index-B7HTOp-J.js} +1 -1
  205. package/koket/es/{index-DxWE4keO.js → index-CVZXg-VU.js} +1 -1
  206. package/koket/es/{index-BGbIcaTz.js → index-CrTsVjYf.js} +1 -1
  207. package/koket/es/{index-RTvL5htr.js → index-DB7hqLH1.js} +1 -1
  208. package/koket/es/{index-CkCJmpPa.js → index-DOGpD7q1.js} +1 -1
  209. package/koket/es/index-Dkp-pSf0.js +1 -0
  210. package/koket/es/{index-B0X3wKXf.js → index-NKV_5fKy.js} +1 -1
  211. package/koket/es/index.d.ts +4 -0
  212. package/koket/es/index.js +1 -1
  213. package/{svdv2/es/styles-37ydpKoX.js → koket/es/styles-C4p7KkI_.js} +1 -1
  214. package/minmote/cjs/index.d.ts +4 -0
  215. package/minmote/cjs/index.js +1 -1
  216. package/package.json +1 -1
  217. package/pent/cjs/index.d.ts +4 -0
  218. package/pent/cjs/index.js +1 -1
  219. package/sa/cjs/index.d.ts +4 -0
  220. package/sa/cjs/index.js +1 -1
  221. package/sa/es/_auto-entry_sa-CswaHNbH.js +1 -0
  222. package/sa/es/{events-InWmoepP.js → events-Bq-Bsd3J.js} +1 -1
  223. package/sa/es/index-CBmjtY_n.js +1 -0
  224. package/sa/es/{index-EwUulJ7Y.js → index-CERDd82x.js} +1 -1
  225. package/sa/es/{index-CfQCMvzG.js → index-CUWCgYLH.js} +1 -1
  226. package/sa/es/{index-oRbKtDVX.js → index-Cn1wDHKs.js} +1 -1
  227. package/sa/es/{index-W8zKmYqP.js → index-CqsWuQTk.js} +1 -1
  228. package/sa/es/{index-DUw5KmWh.js → index-DRBDOCDX.js} +1 -1
  229. package/{bt/es/index-G3xx0ikK.js → sa/es/index-DcVKnjuV.js} +1 -1
  230. package/{bt/es/index-Cq4CjrNm.js → sa/es/index-XtcFE8Wt.js} +1 -1
  231. package/{bt/es/index-LXkNcu3P.js → sa/es/index-z55Pk_AG.js} +1 -1
  232. package/sa/es/index.d.ts +4 -0
  233. package/sa/es/index.js +1 -1
  234. package/{vg/es/styles-Bhb6stcq.js → sa/es/styles-3ChvGeIC.js} +1 -1
  235. package/sa/es/{styles-SUR1qZMJ.js → styles-BC1HrVly.js} +1 -1
  236. package/sa/es/{styles-Cc4FagsN.js → styles-BLSD79KR.js} +1 -1
  237. package/sa/es/{styles-DxVr5KSZ.js → styles-C9sx9pm1.js} +1 -1
  238. package/{bt/es/styles-BdxwEV2h.js → sa/es/styles-CKZWsmYJ.js} +1 -1
  239. package/sa/es/{styles-DbjxSO8k.js → styles-CZzA18sC.js} +1 -1
  240. package/sa/es/{styles-10EorGwq.js → styles-CeN7ItPW.js} +1 -1
  241. package/{vg/es/styles-r2rLSTT5.js → sa/es/styles-Dx_bAoMZ.js} +1 -1
  242. package/sa/es/{styles-BxlJwvsi.js → styles-ls4Yu4n5.js} +1 -1
  243. package/sav2/es/_auto-entry_sav2-dHlrQxmq.js +1 -0
  244. package/sav2/es/{events-DoRj7ezU.js → events-Ci8n1nof.js} +1 -1
  245. package/sav2/es/{index-7gto0FkX.js → index-BB6EW8US.js} +1 -1
  246. package/sav2/es/{index-BIoY4y1f.js → index-BFBbrxEe.js} +1 -1
  247. package/sav2/es/{index-D3GImal0.js → index-BUGC7gFw.js} +1 -1
  248. package/sav2/es/{index-CUYiA42h.js → index-Btf9awuw.js} +1 -1
  249. package/{btv2/es/index-CS95MdGR.js → sav2/es/index-Bz997nB9.js} +1 -1
  250. package/sav2/es/{index-ChZistpq.js → index-CiuC0Zk2.js} +1 -1
  251. package/sav2/es/{index-B5YU7XT1.js → index-Ocjtx-4t.js} +1 -1
  252. package/sav2/es/index-lsZ0wYhc.js +1 -0
  253. package/sav2/es/{index-DYRhtKUJ.js → index-rMfr5LPe.js} +1 -1
  254. package/sav2/es/index.d.ts +4 -0
  255. package/sav2/es/index.js +1 -1
  256. package/{btv2/es/styles-DAjBvfdu.js → sav2/es/styles-3CFQb2py.js} +1 -1
  257. package/sav2/es/{styles-avXb8Ejk.js → styles-Aqc9bV8w.js} +1 -1
  258. package/{vgv2/es/styles-CSZy_x9b.js → sav2/es/styles-BXQQbLt-.js} +1 -1
  259. package/sav2/es/{styles-CxcvguW3.js → styles-CJodfMac.js} +1 -1
  260. package/{vgv2/es/styles-TJlJFopP.js → sav2/es/styles-Cmb64bnc.js} +1 -1
  261. package/sav2/es/{styles-C3hkAf62.js → styles-IkKGFyYw.js} +1 -1
  262. package/{btv2/es/styles-ByQ2b80m.js → sav2/es/styles-IxCC-f5o.js} +1 -1
  263. package/sav2/es/{styles-BoPh9CeR.js → styles-vavcq1df.js} +1 -1
  264. package/sav2/styles.css +1 -1
  265. package/svd/cjs/index.d.ts +4 -0
  266. package/svd/cjs/index.js +1 -1
  267. package/svd/es/_auto-entry_svd-Cm8hJqny.js +1 -0
  268. package/svd/es/{events-1FPk1w1T.js → events-DtnvTBRC.js} +1 -1
  269. package/svd/es/{index-Cp5QrsL1.js → index-BRgXaPGb.js} +1 -1
  270. package/{e24/es/index-BCkx9jNK.js → svd/es/index-BfLId8Ed.js} +1 -1
  271. package/svd/es/{index-QRyg5iUI.js → index-BkOBW6UM.js} +1 -1
  272. package/svd/es/{index-BmXhvKy-.js → index-Bnphlegc.js} +1 -1
  273. package/svd/es/index-CGOA_8YQ.js +1 -0
  274. package/svd/es/{index-D2QQfaMa.js → index-CjqVrfjF.js} +1 -1
  275. package/{e24/es/index-L-ut4S-j.js → svd/es/index-CkJjMUuF.js} +1 -1
  276. package/svd/es/{index-CW1IF7II.js → index-kTz8HTXK.js} +1 -1
  277. package/svd/es/{index-Dqrc4x_e.js → index-vKiVxSel.js} +1 -1
  278. package/svd/es/index.d.ts +4 -0
  279. package/svd/es/index.js +1 -1
  280. package/svd/es/{styles-CaO64pbP.js → styles-BDfH2V-o.js} +1 -1
  281. package/svd/es/{styles-D7Kddkyw.js → styles-BP-sLGJw.js} +1 -1
  282. package/svd/es/{styles-DI6VAQdF.js → styles-DkIC7H5h.js} +1 -1
  283. package/svd/es/{styles-7U-J4-ix.js → styles-Dmw1IMQ8.js} +1 -1
  284. package/svd/es/{styles-DpxyxUXZ.js → styles-VH0CujA1.js} +1 -1
  285. package/svd/es/{styles-BtO6wcml.js → styles-n9g64pZ0.js} +1 -1
  286. package/svdv2/es/_auto-entry_svdv2-dY_0pWmq.js +1 -0
  287. package/svdv2/es/{events-C8eTLDYt.js → events-DdC2fhkM.js} +1 -1
  288. package/svdv2/es/index-2tdeQ-yl.js +1 -0
  289. package/svdv2/es/{index-DSK-KI-z.js → index-BGUdqW3L.js} +1 -1
  290. package/svdv2/es/{index-BW7nvjL9.js → index-C78eCHG8.js} +1 -1
  291. package/svdv2/es/{index-D7dg85lM.js → index-CFPJjrGY.js} +1 -1
  292. package/{koket/es/index-Cgi04UEl.js → svdv2/es/index-CRqzcNCD.js} +1 -1
  293. package/svdv2/es/index-CUC0CjHI.js +1 -0
  294. package/svdv2/es/{index-zEm6hc4U.js → index-CZDj7iXa.js} +1 -1
  295. package/svdv2/es/{index-CiGqb_JK.js → index-DOnqUu8S.js} +1 -1
  296. package/svdv2/es/{index-D0-e3jld.js → index-DPHOnPy-.js} +1 -1
  297. package/svdv2/es/index.d.ts +4 -0
  298. package/svdv2/es/index.js +1 -1
  299. package/{koket/es/styles-Ba27PdxH.js → svdv2/es/styles-BIly8GbR.js} +1 -1
  300. package/svdv2/es/{styles-BmOm1BVb.js → styles-Bpn5Y8Zx.js} +1 -1
  301. package/svdv2/es/{styles-BFYSo0GO.js → styles-CPxvcOm5.js} +1 -1
  302. package/svdv2/es/{styles-CTNZ-Est.js → styles-CksVVecf.js} +1 -1
  303. package/svdv2/es/{styles-DgZFPkcB.js → styles-Dd8mTNZO.js} +1 -1
  304. package/svdv2/es/{styles-CVwQXxs_.js → styles-Dl_Ad2D0.js} +1 -1
  305. package/svdv2/styles.css +1 -1
  306. package/tek/cjs/index.d.ts +4 -0
  307. package/tek/cjs/index.js +1 -1
  308. package/tracker/cjs/index.d.ts +4 -0
  309. package/tracker/es/index.d.ts +4 -0
  310. package/tv4/cjs/index.d.ts +4 -0
  311. package/tv4/cjs/index.js +1 -1
  312. package/tv4/es/_auto-entry_tv4-7bxVCibS.js +1 -0
  313. package/tv4/es/{events-CefhJh2U.js → events-B3LqYAIA.js} +1 -1
  314. package/tv4/es/{index-D0wu5Vuf.js → index-5a5-5iub.js} +1 -1
  315. package/{svd/es/index-BKQAoKGJ.js → tv4/es/index-BNE-3EEK.js} +1 -1
  316. package/tv4/es/{index-Bconr3Ay.js → index-BzBBJle6.js} +1 -1
  317. package/tv4/es/{index-BwOEtMBY.js → index-CFweefTY.js} +1 -1
  318. package/tv4/es/index-CuW4h8_c.js +1 -0
  319. package/tv4/es/{index-BBx9G1UA.js → index-D1ErVI7d.js} +1 -1
  320. package/tv4/es/{index-CyE4bSHD.js → index-DkHmMl8G.js} +1 -1
  321. package/{svd/es/index-DJ2A3MJ6.js → tv4/es/index-SllNNXYT.js} +1 -1
  322. package/tv4/es/{index-BVU5-dBk.js → index-iNxE0u4X.js} +1 -1
  323. package/tv4/es/index.d.ts +4 -0
  324. package/tv4/es/index.js +1 -1
  325. package/{e24/es/styles-ClyKLb-m.js → tv4/es/styles-DC5-6ULN.js} +1 -1
  326. package/tvnu/cjs/index.d.ts +4 -0
  327. package/tvnu/cjs/index.js +1 -1
  328. package/types/index.d.ts +4 -0
  329. package/vg/cjs/index.d.ts +4 -0
  330. package/vg/cjs/index.js +1 -1
  331. package/vg/es/_auto-entry_vg-C89IOQus.js +1 -0
  332. package/vg/es/{events-Cfk82rqV.js → events-DQ-m5N_v.js} +1 -1
  333. package/{vgv2/es/index-D_NicoOo.js → vg/es/index-BPtWQgAP.js} +1 -1
  334. package/vg/es/index-BiOkagEA.js +1 -0
  335. package/vg/es/{index-eeC04PT8.js → index-C4n2AATy.js} +1 -1
  336. package/vg/es/{index-DVVt9Ok_.js → index-C5YMX6PM.js} +1 -1
  337. package/vg/es/{index-B4GwGHHR.js → index-CP901Eyi.js} +1 -1
  338. package/vg/es/{index-lyFmvRWz.js → index-CZ-NRLpt.js} +1 -1
  339. package/vg/es/{index-58nkrcug.js → index-CjteJ3xX.js} +1 -1
  340. package/vg/es/{index-CRdgXN78.js → index-DNLLol-u.js} +1 -1
  341. package/vg/es/{index-CjIIfBGX.js → index-aonVToMH.js} +1 -1
  342. package/vg/es/index.d.ts +4 -0
  343. package/vg/es/index.js +1 -1
  344. package/vg/es/{styles-C8te3h7q.js → styles-BHA9uU-E.js} +1 -1
  345. package/vg/es/{styles-B4j3psZj.js → styles-BkWdJkk8.js} +1 -1
  346. package/vg/es/{styles-CRP1Y99b.js → styles-BlCT2Rac.js} +1 -1
  347. package/vg/es/{styles-C8McLWdQ.js → styles-C6TJwzZR.js} +1 -1
  348. package/vg/es/{styles-CBJ4wMcF.js → styles-CKNU-jA3.js} +1 -1
  349. package/vg/es/{styles-DA61Vc7G.js → styles-Cr4k-ZK_.js} +1 -1
  350. package/vg/es/{styles-UmsW-EbH.js → styles-DBp5eRh5.js} +1 -1
  351. package/{bt/es/styles-kVsu9GSn.js → vg/es/styles-DEaY2iQ7.js} +1 -1
  352. package/{sa/es/styles-HUsI7OL6.js → vg/es/styles-DKP3eLDt.js} +1 -1
  353. package/vg/es/{styles-Cecm6CUc.js → styles-DO8lMBvp.js} +1 -1
  354. package/vg/es/{styles-BwtZNou8.js → styles-DgftAdc1.js} +1 -1
  355. package/vg/es/{styles-CHjUq6Z0.js → styles-K6EN5NQ7.js} +1 -1
  356. package/vg/es/{styles-C0tEzWfO.js → styles-KXTTs701.js} +1 -1
  357. package/vg/es/{styles-B2KU3thN.js → styles-qE8PZhlH.js} +1 -1
  358. package/vg/es/{styles-CrayX676.js → styles-usZlTHp-.js} +1 -1
  359. package/vg/styles.css +1 -1
  360. package/vgv2/es/_auto-entry_vgv2-B1J72ZJ8.js +1 -0
  361. package/vgv2/es/{events-BEe7L9-a.js → events-DkuEZ1pT.js} +1 -1
  362. package/vgv2/es/{index-AuUB0-29.js → index-2e2s9vnP.js} +1 -1
  363. package/vgv2/es/{index-D_jTDL9X.js → index-B28M5bQz.js} +1 -1
  364. package/vgv2/es/index-B3ezbXEi.js +1 -0
  365. package/vgv2/es/index-BgJ2zBHT.js +1 -0
  366. package/vgv2/es/{index-CtbkljPa.js → index-CL3Dr6DG.js} +1 -1
  367. package/vgv2/es/{index-DZEdlPY0.js → index-CWqoJDRJ.js} +1 -1
  368. package/vgv2/es/{index-8mCFYQ-Z.js → index-C_TTCySm.js} +1 -1
  369. package/vgv2/es/{index-nMyLZFlp.js → index-D4c_Nob9.js} +1 -1
  370. package/vgv2/es/{index-BsMUqVRM.js → index-DU0YEKTU.js} +1 -1
  371. package/vgv2/es/index.d.ts +4 -0
  372. package/vgv2/es/index.js +1 -1
  373. package/vgv2/es/{styles-Hwf1RWFs.js → styles-0xEk4CJx.js} +1 -1
  374. package/vgv2/es/{styles-hQtzqwhV.js → styles-BOuU4T7t.js} +1 -1
  375. package/vgv2/es/{styles-BRMxIUy3.js → styles-BTSPfNSJ.js} +1 -1
  376. package/{btv2/es/styles-BRaPMslt.js → vgv2/es/styles-BWQsPFmD.js} +1 -1
  377. package/vgv2/es/{styles-B_ksjQuP.js → styles-BsLPkCPF.js} +1 -1
  378. package/vgv2/es/{styles-DI1MLjpi.js → styles-Bst1Fcr2.js} +1 -1
  379. package/vgv2/es/{styles-DEz76TQh.js → styles-BvdKtD0S.js} +1 -1
  380. package/vgv2/es/{styles-s6shVWQ_.js → styles-CIHGyn3c.js} +1 -1
  381. package/vgv2/es/{styles-Di-KAxlq.js → styles-CheT1xPN.js} +1 -1
  382. package/{btv2/es/styles-Cvvx2Oe3.js → vgv2/es/styles-Ckf62UJq.js} +1 -1
  383. package/{btv2/es/styles-TFdb3Uw0.js → vgv2/es/styles-CpQkWnDX.js} +1 -1
  384. package/vgv2/es/{styles-BdJM0y0F.js → styles-D2VdAAep.js} +1 -1
  385. package/vgv2/es/{styles-BBqVxJn_.js → styles-HrehQPxL.js} +1 -1
  386. package/{sav2/es/styles-CmYsERph.js → vgv2/es/styles-iJFXj2ky.js} +1 -1
  387. package/vgv2/es/{styles-B6VozDW_.js → styles-xcFAeQWW.js} +1 -1
  388. package/vgv2/styles.css +1 -1
  389. package/video/cjs/index.js +1 -1
  390. package/video/es/index.js +1 -1
  391. package/aftenposten/es/_auto-entry_aftenposten-DK00Me6K.js +0 -1
  392. package/aftenposten/es/index-DQlbgZ8n.js +0 -1
  393. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-GWNA2r0C.js +0 -1
  394. package/aftenpostenv2/es/index-DQlbgZ8n.js +0 -1
  395. package/aftonbladet/es/_auto-entry_aftonbladet-DLi_722b.js +0 -1
  396. package/aftonbladet/es/index-DQlbgZ8n.js +0 -1
  397. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-JO6XsdAQ.js +0 -1
  398. package/aftonbladetv2/es/index-DQlbgZ8n.js +0 -1
  399. package/bt/es/_auto-entry_bt-Cr8VnP20.js +0 -1
  400. package/bt/es/index-Ccik2gYt.js +0 -1
  401. package/bt/es/index-DQlbgZ8n.js +0 -1
  402. package/btv2/es/_auto-entry_btv2-CU5CIaMC.js +0 -1
  403. package/btv2/es/index-DQlbgZ8n.js +0 -1
  404. package/e24/es/_auto-entry_e24-BSYZKHxk.js +0 -1
  405. package/e24/es/index-DQlbgZ8n.js +0 -1
  406. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-Cyon6qJy.js +0 -1
  407. package/fotbollskanalen/es/index-DQlbgZ8n.js +0 -1
  408. package/koket/es/_auto-entry_koket-CTgHSG3w.js +0 -1
  409. package/koket/es/index-DQlbgZ8n.js +0 -1
  410. package/sa/es/_auto-entry_sa-DBrGHhpo.js +0 -1
  411. package/sa/es/index-DQlbgZ8n.js +0 -1
  412. package/sav2/es/_auto-entry_sav2-DUFrQtNu.js +0 -1
  413. package/sav2/es/index-DQlbgZ8n.js +0 -1
  414. package/svd/es/_auto-entry_svd-DVY39LUk.js +0 -1
  415. package/svd/es/index-DQlbgZ8n.js +0 -1
  416. package/svdv2/es/_auto-entry_svdv2-DyfTvvS7.js +0 -1
  417. package/svdv2/es/index-DQlbgZ8n.js +0 -1
  418. package/tv4/es/_auto-entry_tv4-CTLBsaq5.js +0 -1
  419. package/tv4/es/index-Bl_cTxdO.js +0 -1
  420. package/tv4/es/index-DQlbgZ8n.js +0 -1
  421. package/vg/es/_auto-entry_vg-CQSjiY6f.js +0 -1
  422. package/vg/es/index-DQlbgZ8n.js +0 -1
  423. package/vgv2/es/_auto-entry_vgv2-DJcXBLJ8.js +0 -1
  424. package/vgv2/es/index-DQlbgZ8n.js +0 -1
@@ -210,6 +210,7 @@ interface SiteConfig {
210
210
  tcf?: TCFConfig;
211
211
  prebid?: PrebidConfig;
212
212
  pulse?: PulseConfig;
213
+ nonRtb?: NonRTBConfig;
213
214
  finnBlink?: FinnBlinkConfig;
214
215
  wallpaper?: WallpaperConfig;
215
216
  fullscreenScroll?: FullscreenScrollConfig;
@@ -368,6 +369,9 @@ interface PrebidConfig {
368
369
  relevantCallbackTimeout?: number;
369
370
  forwardGlimrTags?: boolean;
370
371
  }
372
+ interface NonRTBConfig {
373
+ invCodeSuffix?: string;
374
+ }
371
375
  interface FinnBlinkSDKPayload {
372
376
  channel?: string;
373
377
  }
@@ -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,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,i;const o=e.pageSectionsSelectors,a=[{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"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[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)});
@@ -210,6 +210,7 @@ interface SiteConfig {
210
210
  tcf?: TCFConfig;
211
211
  prebid?: PrebidConfig;
212
212
  pulse?: PulseConfig;
213
+ nonRtb?: NonRTBConfig;
213
214
  finnBlink?: FinnBlinkConfig;
214
215
  wallpaper?: WallpaperConfig;
215
216
  fullscreenScroll?: FullscreenScrollConfig;
@@ -368,6 +369,9 @@ interface PrebidConfig {
368
369
  relevantCallbackTimeout?: number;
369
370
  forwardGlimrTags?: boolean;
370
371
  }
372
+ interface NonRTBConfig {
373
+ invCodeSuffix?: string;
374
+ }
371
375
  interface FinnBlinkSDKPayload {
372
376
  channel?: string;
373
377
  }
@@ -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 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,i;const o=e.pageSectionsSelectors,a=[{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"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[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};
@@ -414,6 +414,7 @@ interface SiteConfig {
414
414
  tcf?: TCFConfig;
415
415
  prebid?: PrebidConfig;
416
416
  pulse?: PulseConfig;
417
+ nonRtb?: NonRTBConfig;
417
418
  finnBlink?: FinnBlinkConfig;
418
419
  wallpaper?: WallpaperConfig;
419
420
  fullscreenScroll?: FullscreenScrollConfig;
@@ -572,6 +573,9 @@ interface PrebidConfig {
572
573
  relevantCallbackTimeout?: number;
573
574
  forwardGlimrTags?: boolean;
574
575
  }
576
+ interface NonRTBConfig {
577
+ invCodeSuffix?: string;
578
+ }
575
579
  interface FinnBlinkSDKPayload {
576
580
  channel?: string;
577
581
  }