@schibsted/advertory 2.65.6 → 2.65.7-test-css-bundles-v1

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 (336) hide show
  1. package/core/aftenposten/es/aftenposten-2nuJxPAe.js +1 -0
  2. package/core/aftenposten/es/events-Cy66Z11t.js +1 -0
  3. package/core/aftenposten/es/index-1f6mgxFD.js +1 -0
  4. package/core/aftenposten/es/index-BQZLraDQ.js +1 -0
  5. package/core/aftenposten/es/index-BY1oDSSe.js +1 -0
  6. package/core/aftenposten/es/index-Bl7ZLUXC.js +1 -0
  7. package/core/aftenposten/es/index-CTBWErSv.js +1 -0
  8. package/core/aftenposten/es/index-CkPPpROT.js +1 -0
  9. package/core/aftenposten/es/index-CkXvFMvw.js +1 -0
  10. package/core/aftenposten/es/index-DHJ7Cg5K.js +1 -0
  11. package/core/aftenposten/es/index-DQlbgZ8n.js +1 -0
  12. package/core/aftenposten/es/index-HTbQjX-K.js +1 -0
  13. package/core/aftenposten/es/index.css +1 -1
  14. package/core/aftenposten/es/index.js +1 -1
  15. package/core/aftenposten/es/scale-ad-BBq09t5G.js +1 -0
  16. package/core/aftenposten/es/styles-Dafbl73v.js +1 -0
  17. package/core/aftenposten/es/styles-Dk5BnY99.js +1 -0
  18. package/core/aftenposten/index.js +1 -1
  19. package/core/aftenpostenv2/es/aftenpostenv2-DLKxBJJQ.js +1 -0
  20. package/core/aftenpostenv2/es/events-CNzliIaK.js +1 -0
  21. package/core/aftenpostenv2/es/index-B86PSfth.js +1 -0
  22. package/core/aftenpostenv2/es/index-B8WHBroB.js +1 -0
  23. package/core/aftenpostenv2/es/index-BxmZ-NBc.js +1 -0
  24. package/core/aftenpostenv2/es/index-CxYZi2sj.js +1 -0
  25. package/core/aftenpostenv2/es/index-D9J8ok8N.js +1 -0
  26. package/core/aftenpostenv2/es/index-DOk6UbFo.js +1 -0
  27. package/core/aftenpostenv2/es/index-DQlbgZ8n.js +1 -0
  28. package/core/aftenpostenv2/es/index-DVt8hbmR.js +1 -0
  29. package/core/aftenpostenv2/es/index-DZr_oRJU.js +1 -0
  30. package/core/aftenpostenv2/es/index-RE6B9ypZ.js +1 -0
  31. package/core/aftenpostenv2/es/index.css +1 -1
  32. package/core/aftenpostenv2/es/index.js +1 -1
  33. package/core/aftenpostenv2/es/scale-ad-IQQFX5s5.js +1 -0
  34. package/core/aftenpostenv2/es/styles-Dafbl73v.js +1 -0
  35. package/core/aftenpostenv2/es/styles-Dk5BnY99.js +1 -0
  36. package/core/aftonbladet/es/aftonbladet-BCL_8sTt.js +1 -0
  37. package/core/aftonbladet/es/events-DHLo9MY0.js +1 -0
  38. package/core/aftonbladet/es/index-BXl-AdI0.js +1 -0
  39. package/core/aftonbladet/es/index-C42aVsEf.js +1 -0
  40. package/core/aftonbladet/es/index-CmTlHQTn.js +1 -0
  41. package/core/aftonbladet/es/index-Cu3TtNnO.js +1 -0
  42. package/core/aftonbladet/es/index-DCXpVWsX.js +1 -0
  43. package/core/aftonbladet/es/index-DQlbgZ8n.js +1 -0
  44. package/core/aftonbladet/es/index-Dts-bK2X.js +1 -0
  45. package/core/aftonbladet/es/index-DySUciW-.js +1 -0
  46. package/core/aftonbladet/es/index-TzuHDldx.js +1 -0
  47. package/core/aftonbladet/es/index-gmcSsAxB.js +1 -0
  48. package/core/aftonbladet/es/index.css +1 -1
  49. package/core/aftonbladet/es/index.js +1 -1
  50. package/core/aftonbladet/es/styles-Dk5BnY99.js +1 -0
  51. package/core/aftonbladet/index.js +1 -1
  52. package/core/aftonbladetv2/es/aftonbladetv2-D4BROcY0.js +1 -0
  53. package/core/aftonbladetv2/es/events-C9ZmweQX.js +1 -0
  54. package/core/aftonbladetv2/es/index-3sQI0WkS.js +1 -0
  55. package/core/aftonbladetv2/es/index-BWYOR5qd.js +1 -0
  56. package/core/aftonbladetv2/es/index-Bm3URKJj.js +1 -0
  57. package/core/aftonbladetv2/es/index-CMoGnMqK.js +1 -0
  58. package/core/aftonbladetv2/es/index-CYNCAS1P.js +1 -0
  59. package/core/aftonbladetv2/es/index-Cit-V9Ui.js +1 -0
  60. package/core/aftonbladetv2/es/index-CoA1Esmy.js +1 -0
  61. package/core/aftonbladetv2/es/index-DQlbgZ8n.js +1 -0
  62. package/core/aftonbladetv2/es/index-DVloBo8t.js +1 -0
  63. package/core/aftonbladetv2/es/index-WIl4kOI8.js +1 -0
  64. package/core/aftonbladetv2/es/index.css +1 -1
  65. package/core/aftonbladetv2/es/index.js +1 -1
  66. package/core/aftonbladetv2/es/scale-ad-CrxtlLzL.js +1 -0
  67. package/core/aftonbladetv2/es/styles-Dk5BnY99.js +1 -0
  68. package/core/bt/es/bt-BcnMtIjk.js +1 -0
  69. package/core/bt/es/events-_6to1Gm0.js +1 -0
  70. package/core/bt/es/index-BJ69fLBV.js +1 -0
  71. package/core/bt/es/index-BdHS7L6p.js +1 -0
  72. package/core/bt/es/index-C4EqcaIp.js +1 -0
  73. package/core/bt/es/index-CbcHFjtP.js +1 -0
  74. package/core/bt/es/index-Cbe28LNh.js +1 -0
  75. package/core/bt/es/index-DQlbgZ8n.js +1 -0
  76. package/core/bt/es/index-DtY3NM-Z.js +1 -0
  77. package/core/bt/es/index-Dy0CPdIz.js +1 -0
  78. package/core/bt/es/index-aZpVs6iO.js +1 -0
  79. package/core/bt/es/index-lLRgjEZp.js +1 -0
  80. package/core/bt/es/index.css +1 -1
  81. package/core/bt/es/index.js +1 -1
  82. package/core/bt/es/scale-ad-DYGMcCtX.js +1 -0
  83. package/core/bt/es/styles-Dafbl73v.js +1 -0
  84. package/core/bt/es/styles-Dk5BnY99.js +1 -0
  85. package/core/bt/index.js +1 -1
  86. package/core/e24/es/_auto-entry_e24-OQTFtcds.js +1 -0
  87. package/core/e24/es/events-CbDPVqog.js +1 -0
  88. package/core/e24/es/index-B3a2dEzA.js +1 -0
  89. package/core/e24/es/index-Cb4hGljq.js +1 -0
  90. package/core/e24/es/index-Cb7Dzs6u.js +1 -0
  91. package/core/e24/es/index-D7f4FE1s.js +1 -0
  92. package/core/e24/es/index-DFVSfn4g.js +1 -0
  93. package/core/e24/es/index-DQlbgZ8n.js +1 -0
  94. package/core/e24/es/index-TbZeCWlR.js +1 -0
  95. package/core/e24/es/index-YbScgxaC.js +1 -0
  96. package/core/e24/es/index-cnTuJMcQ.js +1 -0
  97. package/core/e24/es/index-r5crUO2f.js +1 -0
  98. package/core/e24/es/index.css +1 -1
  99. package/core/e24/es/index.js +1 -1
  100. package/core/e24/es/scale-ad-Gyj8PcGR.js +1 -0
  101. package/core/e24/es/styles-Ddi7po1N.js +1 -0
  102. package/core/e24/es/styles-Dk5BnY99.js +1 -0
  103. package/core/e24/index.js +1 -1
  104. package/core/fotbollskanalen/es/events-DsQuoYqq.js +1 -0
  105. package/core/fotbollskanalen/es/fotbollskanalen-DPvL50LB.js +1 -0
  106. package/core/fotbollskanalen/es/index-7XM8vbdl.js +1 -0
  107. package/core/fotbollskanalen/es/index-B0ZPPT9p.js +1 -0
  108. package/core/fotbollskanalen/es/index-BVqooJpi.js +1 -0
  109. package/core/fotbollskanalen/es/index-By8XArWe.js +1 -0
  110. package/core/fotbollskanalen/es/index-CN55ZiaZ.js +1 -0
  111. package/core/fotbollskanalen/es/index-CXdXHrFi.js +1 -0
  112. package/core/fotbollskanalen/es/index-CYpVhvjf.js +1 -0
  113. package/core/fotbollskanalen/es/index-DQlbgZ8n.js +1 -0
  114. package/core/fotbollskanalen/es/index-DSY1xJ0C.js +1 -0
  115. package/core/fotbollskanalen/es/index-Dg5YhP6F.js +1 -0
  116. package/core/fotbollskanalen/es/index.css +1 -1
  117. package/core/fotbollskanalen/es/index.js +1 -1
  118. package/core/fotbollskanalen/es/scale-ad-CkKQ2R3J.js +1 -0
  119. package/core/fotbollskanalen/es/styles-Dk5BnY99.js +1 -0
  120. package/core/fotbollskanalen/index.js +1 -1
  121. package/core/godare/index.js +1 -1
  122. package/core/godt/index.js +1 -1
  123. package/core/klart/index.js +1 -1
  124. package/core/koket/es/events-_dekKh9n.js +1 -0
  125. package/core/koket/es/index-B5xXJdqi.js +1 -0
  126. package/core/koket/es/index-BKKcxGpH.js +1 -0
  127. package/core/koket/es/index-BcHygDG8.js +1 -0
  128. package/core/koket/es/index-BwaOemTZ.js +1 -0
  129. package/core/koket/es/index-CW0sLBaj.js +1 -0
  130. package/core/koket/es/index-DNviW5KE.js +1 -0
  131. package/core/koket/es/index-DQlbgZ8n.js +1 -0
  132. package/core/koket/es/index-DkIbN9R_.js +1 -0
  133. package/core/koket/es/index-DsWZrY9s.js +1 -0
  134. package/core/koket/es/index-vz8a8-Ap.js +1 -0
  135. package/core/koket/es/index.css +1 -1
  136. package/core/koket/es/index.js +1 -1
  137. package/core/koket/es/koket-CnKjFJDE.js +1 -0
  138. package/core/koket/es/scale-ad-COBXmkO_.js +1 -0
  139. package/core/koket/es/styles-Dk5BnY99.js +1 -0
  140. package/core/koket/index.js +1 -1
  141. package/core/kompakt/index.js +1 -1
  142. package/core/minmote/index.js +1 -1
  143. package/core/pent/index.js +1 -1
  144. package/core/sa/es/events-BwyHiIhH.js +1 -0
  145. package/core/sa/es/index-CCAEvZS6.js +1 -0
  146. package/core/sa/es/index-C_G4PiRO.js +1 -0
  147. package/core/sa/es/index-CmeuNT8w.js +1 -0
  148. package/core/sa/es/index-DQlbgZ8n.js +1 -0
  149. package/core/sa/es/index-DmLk_aly.js +1 -0
  150. package/core/sa/es/index-DtWgj8Mg.js +1 -0
  151. package/core/sa/es/index-Qdws_PZy.js +1 -0
  152. package/core/sa/es/index-R-NVZb7W.js +1 -0
  153. package/core/sa/es/index-pNj7U7T4.js +1 -0
  154. package/core/sa/es/index-wCOGmyn4.js +1 -0
  155. package/core/sa/es/index.css +1 -1
  156. package/core/sa/es/index.js +1 -1
  157. package/core/sa/es/sa-Nu_R64rw.js +1 -0
  158. package/core/sa/es/scale-ad-B7r9U7MP.js +1 -0
  159. package/core/sa/es/styles-Dafbl73v.js +1 -0
  160. package/core/sa/es/styles-Dk5BnY99.js +1 -0
  161. package/core/sa/index.js +1 -1
  162. package/core/svd/es/events-Cl1CJ3MI.js +1 -0
  163. package/core/svd/es/index-2qhA7Mmq.js +1 -0
  164. package/core/svd/es/index-BGfHJXfJ.js +1 -0
  165. package/core/svd/es/index-BOXYv5Kr.js +1 -0
  166. package/core/svd/es/index-BabhWwkM.js +1 -0
  167. package/core/svd/es/index-BxaGySyG.js +1 -0
  168. package/core/svd/es/index-C5VeM9RM.js +1 -0
  169. package/core/svd/es/index-D6NVmpx8.js +1 -0
  170. package/core/svd/es/index-DQlbgZ8n.js +1 -0
  171. package/core/svd/es/index-DYA28UcN.js +1 -0
  172. package/core/svd/es/index-DYnZ8q26.js +1 -0
  173. package/core/svd/es/index.css +1 -1
  174. package/core/svd/es/index.js +1 -1
  175. package/core/svd/es/styles-Dk5BnY99.js +1 -0
  176. package/core/svd/es/svd-9nxy49Gx.js +1 -0
  177. package/core/svd/index.js +1 -1
  178. package/core/svdv2/es/events-1jrY4HmA.js +1 -0
  179. package/core/svdv2/es/index-BLQvfyWt.js +1 -0
  180. package/core/svdv2/es/index-CNel196-.js +1 -0
  181. package/core/svdv2/es/index-CQEGbrEu.js +1 -0
  182. package/core/svdv2/es/index-CV9uviKj.js +1 -0
  183. package/core/svdv2/es/index-CZSqP0Oj.js +1 -0
  184. package/core/svdv2/es/index-CeAHy9ei.js +1 -0
  185. package/core/svdv2/es/index-DQlbgZ8n.js +1 -0
  186. package/core/svdv2/es/index-Df1zX9DI.js +1 -0
  187. package/core/svdv2/es/index-JQdwApzL.js +1 -0
  188. package/core/svdv2/es/index-t0AhE-Mb.js +1 -0
  189. package/core/svdv2/es/index.css +1 -1
  190. package/core/svdv2/es/index.js +1 -1
  191. package/core/svdv2/es/scale-ad-DVCujNZy.js +1 -0
  192. package/core/svdv2/es/styles-Dk5BnY99.js +1 -0
  193. package/core/svdv2/es/svdv2-CRKkmXLH.js +1 -0
  194. package/core/tek/index.js +1 -1
  195. package/core/tv4/es/events-BxQOrmc3.js +1 -0
  196. package/core/tv4/es/index-BR7XJAcT.js +1 -0
  197. package/core/tv4/es/index-Bg2nUjPd.js +1 -0
  198. package/core/tv4/es/index-BiArtsLw.js +1 -0
  199. package/core/tv4/es/index-BkIuuN-s.js +1 -0
  200. package/core/tv4/es/index-CJ5o8hho.js +1 -0
  201. package/core/tv4/es/index-CSu3gKxN.js +1 -0
  202. package/core/tv4/es/index-DG80oX5u.js +1 -0
  203. package/core/tv4/es/index-DQlbgZ8n.js +1 -0
  204. package/core/tv4/es/index-OcsWo5WS.js +1 -0
  205. package/core/tv4/es/index-l3X2_N9K.js +1 -0
  206. package/core/tv4/es/index.css +1 -1
  207. package/core/tv4/es/index.js +1 -1
  208. package/core/tv4/es/scale-ad-BjQXe7r2.js +1 -0
  209. package/core/tv4/es/styles-Dk5BnY99.js +1 -0
  210. package/core/tv4/es/tv4-CwkUh3M3.js +1 -0
  211. package/core/tv4/index.js +1 -1
  212. package/core/tvnu/index.js +1 -1
  213. package/core/vg/es/events-X-6ybuAW.js +1 -0
  214. package/core/vg/es/index-B6uwl_4i.js +1 -0
  215. package/core/vg/es/index-BYUVIP7N.js +1 -0
  216. package/core/vg/es/index-C-DeCUQj.js +1 -0
  217. package/core/vg/es/index-C2OzlhzE.js +1 -0
  218. package/core/vg/es/index-CkmoQGC0.js +1 -0
  219. package/core/vg/es/index-DB_MwA1R.js +1 -0
  220. package/core/vg/es/index-DFjDcsEY.js +1 -0
  221. package/core/vg/es/index-DQlbgZ8n.js +1 -0
  222. package/core/vg/es/index-DTlZ0fcx.js +1 -0
  223. package/core/vg/es/index-Dv8OrWsV.js +1 -0
  224. package/core/vg/es/index.css +1 -1
  225. package/core/vg/es/index.js +1 -1
  226. package/core/vg/es/scale-ad-DMpV1Suo.js +1 -0
  227. package/core/vg/es/styles-Dafbl73v.js +1 -0
  228. package/core/vg/es/styles-Dk5BnY99.js +1 -0
  229. package/core/vg/es/vg-DQp134WG.js +1 -0
  230. package/core/vg/index.js +1 -1
  231. package/core/vgv2/es/events-B8rqWjp3.js +1 -0
  232. package/core/vgv2/es/index-C3MXChpZ.js +1 -0
  233. package/core/vgv2/es/index-CCZWrvlw.js +1 -0
  234. package/core/vgv2/es/index-CFVR6_8p.js +1 -0
  235. package/core/vgv2/es/index-CqXn363z.js +1 -0
  236. package/core/vgv2/es/index-DQlbgZ8n.js +1 -0
  237. package/core/vgv2/es/index-DX5n-V6Z.js +1 -0
  238. package/core/vgv2/es/index-DdMURwTv.js +1 -0
  239. package/core/vgv2/es/index-Wjgun64G.js +1 -0
  240. package/core/vgv2/es/index-mGiHA9xP.js +1 -0
  241. package/core/vgv2/es/index-opNXgRSr.js +1 -0
  242. package/core/vgv2/es/index.css +1 -1
  243. package/core/vgv2/es/index.js +1 -1
  244. package/core/vgv2/es/scale-ad-Cyz5qQnx.js +1 -0
  245. package/core/vgv2/es/styles-Dafbl73v.js +1 -0
  246. package/core/vgv2/es/styles-Dk5BnY99.js +1 -0
  247. package/core/vgv2/es/vgv2-DIph2Zvj.js +1 -0
  248. package/features/ad-native/index.js +1 -1
  249. package/package.json +7 -6
  250. package/sites/aftenposten/es/index.css +1 -1
  251. package/sites/aftenposten/index.js +1 -1
  252. package/sites/aftenpostenv2/es/index.css +1 -1
  253. package/sites/aftonbladet/es/index.css +1 -1
  254. package/sites/bt/es/index.css +1 -1
  255. package/sites/bt/index.js +1 -1
  256. package/sites/e24/es/index.css +1 -1
  257. package/sites/e24/es/index.d.ts +1 -0
  258. package/sites/e24/index.d.ts +1 -0
  259. package/sites/fotbollskanalen/es/index.css +1 -1
  260. package/sites/koket/es/index.css +1 -1
  261. package/sites/sa/es/index.css +1 -1
  262. package/sites/sa/index.js +1 -1
  263. package/sites/svd/es/index.css +1 -1
  264. package/sites/svd/index.js +1 -1
  265. package/sites/svdv2/es/index.css +1 -1
  266. package/sites/svdv2/es/index.d.ts +3 -1
  267. package/sites/svdv2/es/index.js +1 -1
  268. package/sites/tvnu/index.js +1 -1
  269. package/sites/vg/es/index.css +1 -1
  270. package/sites/vg/index.js +1 -1
  271. package/sites/vgv2/es/index.css +1 -1
  272. package/styles/svdv2/styles.css +1 -1
  273. package/types/config/aftenposten.d.ts +2 -1
  274. package/types/config/aftenpostenv2.d.ts +2 -1
  275. package/types/config/bt.d.ts +2 -1
  276. package/types/config/fotbollskanalen.d.ts +2 -1
  277. package/types/config/godare.d.ts +2 -1
  278. package/types/config/koket.d.ts +2 -1
  279. package/types/config/kompakt.d.ts +2 -1
  280. package/types/config/pent.d.ts +2 -1
  281. package/types/config/sa.d.ts +2 -1
  282. package/types/config/tv4.d.ts +2 -1
  283. package/types/config/tvnu.d.ts +2 -1
  284. package/types/config/vg.d.ts +2 -1
  285. package/types/config/vgv2.d.ts +2 -1
  286. package/types/core/interface/config.d.ts +3 -11
  287. package/types/core/interface/right-column-track.d.ts +1 -0
  288. package/types/core/prepare-page-options/generic-prepare-page-options.d.ts +3 -2
  289. package/types/core/prepare-tag/generic-prepare-tag.d.ts +2 -2
  290. package/types/features/ad-native/sites/e24/e24-init.d.ts +0 -1
  291. package/types/features/ad-native/sites/e24/templates/articles/content/index.d.ts +0 -1
  292. package/types/features/ad-native/sites/e24/templates/articles/content-display-basic/index.d.ts +0 -1
  293. package/types/features/ad-native/sites/e24/templates/articles/recirc/index.d.ts +0 -1
  294. package/types/features/ad-native/sites/e24/templates/front/aksjelive/index.d.ts +0 -1
  295. package/types/features/ad-native/sites/e24/templates/front/content/index.d.ts +0 -1
  296. package/types/features/ad-native/sites/e24/templates/front/content-display-basic/index.d.ts +0 -1
  297. package/types/features/ad-native/sites/shared/templates/no/native-recirc/index.d.ts +0 -1
  298. package/types/features/ad-native/sites/shared/templates/no/native-seamless/index.d.ts +0 -1
  299. package/types/features/ad-native/sites/shared/templates/no/native-template/index.d.ts +0 -1
  300. package/types/features/ad-takeover/utils.d.ts +2 -1
  301. package/types/sites/svdv2/formats/Widescreen/index.d.ts +1 -1
  302. package/types/sites/svdv2/formats/index.d.ts +1 -0
  303. package/types/sites/svdv2/index.d.ts +2 -1
  304. package/core/aftenposten/es/index.d.ts +0 -748
  305. package/core/aftenposten/index.d.ts +0 -748
  306. package/core/aftenpostenv2/es/index.d.ts +0 -748
  307. package/core/aftonbladet/es/index.d.ts +0 -750
  308. package/core/aftonbladet/index.d.ts +0 -750
  309. package/core/aftonbladetv2/es/index.d.ts +0 -750
  310. package/core/bt/es/index.d.ts +0 -748
  311. package/core/bt/index.d.ts +0 -748
  312. package/core/e24/es/index.d.ts +0 -748
  313. package/core/e24/index.d.ts +0 -748
  314. package/core/fotbollskanalen/es/index.d.ts +0 -748
  315. package/core/fotbollskanalen/index.d.ts +0 -748
  316. package/core/godare/index.d.ts +0 -748
  317. package/core/godt/index.d.ts +0 -750
  318. package/core/klart/index.d.ts +0 -750
  319. package/core/koket/es/index.d.ts +0 -748
  320. package/core/koket/index.d.ts +0 -748
  321. package/core/kompakt/index.d.ts +0 -748
  322. package/core/minmote/index.d.ts +0 -750
  323. package/core/pent/index.d.ts +0 -748
  324. package/core/sa/es/index.d.ts +0 -748
  325. package/core/sa/index.d.ts +0 -748
  326. package/core/svd/es/index.d.ts +0 -750
  327. package/core/svd/index.d.ts +0 -750
  328. package/core/svdv2/es/index.d.ts +0 -750
  329. package/core/tek/index.d.ts +0 -750
  330. package/core/tv4/es/index.d.ts +0 -748
  331. package/core/tv4/index.d.ts +0 -748
  332. package/core/tvnu/index.d.ts +0 -748
  333. package/core/vg/es/index.d.ts +0 -748
  334. package/core/vg/index.d.ts +0 -748
  335. package/core/vgv2/es/index.d.ts +0 -748
  336. package/types/config/e24.d.ts +0 -3
@@ -0,0 +1 @@
1
+ import"react/jsx-runtime";const e={ABSOLUTE_FULLSCREEN:"ABSOLUTE_FULLSCREEN",ANY_FULLSCREEN:"ANY_FULLSCREEN",VERTICAL_FULLWIDTH:"VERTICAL_FULLWIDTH",FULLWIDTH:"FULLWIDTH",TAKEOVER:"TAKEOVER",VELVET_TAKEOVER:"VELVET_TAKEOVER",WALLPAPER:"WALLPAPER",COLLAPSE:"COLLAPSE"},t={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},n={wallpaper:1600,"l-format":1600},i=t=>{const{banner:n,targetId:i}=t;return!(!n||(null==i?void 0:i.includes("takeover")))&&w(t,e.ANY_FULLSCREEN)},o=e=>{const{native:t}=e;return!!t},r=t=>w(t,e.FULLWIDTH),s=t=>{const{targetId:n}=t;return n.includes("takeover")||w(t,e.TAKEOVER)},a=t=>w(t,e.TAKEOVER),d=t=>w(t,e.WALLPAPER),l=t=>w(t,e.COLLAPSE),c=e=>e.targetId.includes("sponsorstripe"),u=e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!h(e),v=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},p=e=>e.targetId.startsWith("netboard"),g=e=>e.targetId.startsWith("board"),h=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),m=e=>e.targetId.startsWith("midboard"),f=e=>e.targetId.includes("widescreen"),y=e=>e.width>=1260&&e.width<=1280,b=e=>e.width>=1600&&e.width<=1620,w=(e,n)=>{const i=t[n];if(!i)return!1;return!!i.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,s=t.width===o,a=!t.height||t.height===r;return s&&a})},E="0123456789abcdefghijklmnopqrstuvwxyz",T=(e,t)=>{e.style.display=t},I=(e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}},S=e=>{window.apntag.anq.push(e)},C=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),k=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),A=e=>{const{targetId:t}=e,n=document.querySelector(`div[id^="${t}"]`);if(!n)return;const i=n.parentElement;if(!i)return;t.includes("integration_godt-menu")&&O(i)},O=e=>{const t=e.parentElement;t&&(t.style.display="none")},$=()=>{const e=document.querySelector(".advertory-vg-ad-native-sponsorstripe"),t=document.querySelector("#advertory-vg-sponsorstripe-info");e&&t&&((e,t)=>{const n=e.querySelector("#sponsorstripe-info-open-button"),i=e.querySelector("#sponsorstripe-info-close-button"),o=e.querySelector(".ad-wrapper");o&&(null==n||n.addEventListener("click",()=>{T(o,"none"),T(t,"flex")}),null==i||i.addEventListener("click",()=>{T(o,"flex"),T(t,"none")}))})(e,t)};function P(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,x;var N=P(function(){if(x)return L;x=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)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function o(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 r(e,t){try{return t in e}catch(e){return!1}}function s(e,t,i){var s={};return i.isMergeableObject(e)&&o(e).forEach(function(t){s[t]=n(e[t],i)}),o(t).forEach(function(o){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(r(e,o)&&i.isMergeableObject(t[o])?s[o]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(o,i)(e[o],t[o],i):s[o]=n(t[o],i))}),s}function a(t,o,r){(r=r||{}).arrayMerge=r.arrayMerge||i,r.isMergeableObject=r.isMergeableObject||e,r.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(o);return a===Array.isArray(t)?a?r.arrayMerge(t,o,r):s(t,o,r):n(o,r)}return a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return a(e,n,t)},{})},L=a}());const j=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],_={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},D=6;class R{set(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 j){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(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=N(R.DEFAULT_SITE_HANDLERS,e)}}R.DEFAULT_SITE_HANDLERS={siteEvents:_,initNativeAd:function(){}};const M=new R,q=M.modifyConfigProperties.bind(M);function F(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function B(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class V{initialize(){this.DATA=Object.assign({},V.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}V.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new V,z="advertory-wallpaper-background",H="advertory-with-horseshoe",W=()=>{const e=document.querySelector(`.${z}`);e&&e.remove()},K=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${z}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},G=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,J=e=>G.test(e),Y=e=>e.startsWith("wallpaper:color:"),X=e=>{const t=document.querySelector(`.${z}`);t&&(t.style.backgroundImage=`url(${e})`)},Q=e=>{const t=document.querySelector(`.${z}`);t&&(t.style.backgroundColor=e)};var Z=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(H),n.classList.add(H))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{appMainContainerSelector:n,wallpaperAnchorSelector:i}={}}=t;(e=>{const t=document.querySelector(e||"#application");if(!t)return;W();const n=document.createElement("div");n.classList.add(z),document.body.insertBefore(n,t.nextSibling),n.style.setProperty("position","fixed"),n.style.setProperty("width","100%"),n.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),n.style.setProperty("background-position","center top"),n.style.setProperty("background-repeat","no-repeat")})(n),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(K(n),window.addEventListener("scroll",()=>K(n)))})(i),e()},isShortWallpaperColorMessage:Y,isShortWallpaperUrlMessage:J,removeWallpaperBackground:W,setWallpaperBackgroundColor:Q,setWallpaperBackgroundImage:X});const ee="finncode",te=e=>{if(window.location.href.includes("collapse_ad=0"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&W())},ne=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"))},ie=()=>{const{publisher:e,country:t,finnBlink:n}=M.get(),i=window.apntag,o={publisher:e,country:t,finnBlink:n},r=e=>{ne(e),S(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>B(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield import("./index-DB_MwA1R.js");yield t(e,o,null)}),withFullAdsChain:e=>B(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield import("./index-DB_MwA1R.js");yield t(e,o,r,()=>B(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return Z});t(e)}))})}},oe={Blink:"Blink"},re=new Map,se=e=>{var t;if(!re.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(oe)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw re.delete(e),t});re.set(e,t)}return null!==(t=re.get(e))&&void 0!==t?t:Promise.resolve()},ae="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",de="https://www.finn.no/distribution-front/external/carousel",le=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",s=i?`__${i}`:"",a=`advertory${r}-${n}${s}`,d=`advertory${r}-${n}-wrapper${s}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(a),o.classList.add(d),t.dataset.adType=n},ce={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},ue=e=>e===ce.MOBILE,ve=853,pe=767,ge={FINN_BLINK:"finn-blink",NATIVE_AD:"native-ad"},he=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},me=()=>B(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),fe=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},ye=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={}}=M.get(),i=document.createElement("div"),o=document.createElement("div");return o.id=e,i.appendChild(o),le(n,o,ge.FINN_BLINK),he(`Creating blink container for: ${e}`),i},be=(e,t)=>{var n;(he(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):he(`Cannot perform afterend on: ${e.id}`)},we=e=>B(void 0,void 0,void 0,function*(){if(!e)return;yield se(ae);const{replacementConfig:t}=e;if(!((()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void he(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);const{adsToReplace:n,sizes:i}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=ye(t);(e=>{he(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),be(n,i),n.dataset.finnBlinkId=t,ie().withFullAdsChain(e)})}),Ee=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Te=e=>{const{source:t}=e;return"csm"===t},Ie=e=>{const{deviceType:t}=M.get();navigator&&navigator.userAgent.match(/firefox/i)&&(e=>e===ce.DESKTOP||"tablet"===e)(t)&&Se(e)},Se=e=>{var t,n,i,o,r,s,a,d;const l=Te(e)?1:0,c=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags)||void 0===i?void 0:i[e.targetId];if(null===(d=null===(a=null===(s=null===(r=null===(o=null==c?void 0:c.adResponse)||void 0===o?void 0:o.ads)||void 0===r?void 0:r[l])||void 0===s?void 0:s.rtb)||void 0===a?void 0:a.banner)||void 0===d?void 0:d.content){const e="<style>body { margin:0 !important; }</style>";c.adResponse.ads[l].rtb.banner.content+=e}},Ce={adRequested:()=>{},adAvailable:e=>{u(e)&&(e=>{const t=document.getElementById(e.targetId);t&&t.parentElement&&t.parentElement.classList.add("brandboard-container")})(e),Ie(e)},adLoaded:e=>{c(e)&&$()},adNoBid:e=>{const{finnBlink:t}=M.get();A(e),(p(e)||g(e)||u(e))&&((e,t)=>{B(void 0,void 0,void 0,function*(){const{deviceType:n}=M.get();if(!t||!ue(n))return;yield se(ae);const{replacementConfig:i}=t,o=document.querySelector(`[id^="${e}"]`);if(!o||!(null==i?void 0:i.sizes))return;const{sizes:r}=i,s=fe(e),a=ye(s);o.dataset.finnBlinkId=s,o.dataset.noBidAd="true",be(o,a),ie().withFinnBlinkAd(s)})})(e.targetId,t)},adError:(e,t)=>A(t),adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ke=e=>new URLSearchParams(window.location.search).get(e),Ae=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 he("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(he("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{he("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{he("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);he("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Oe={NO:"no",SE:"se"},$e="cmp:loaded";let Pe,Le=!1;const xe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=ke("bypass_tcf"),s=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(he("TCF bypass param detected, returning consent: true"),!0):(he("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Le)return null;if(!Pe)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Pe.getConsentedToAllSync();return he(`TCF consented to all is: ${t}`),Pe.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(he("Getting TCF consent manager..."),window._tcf_)return he("TCF consent manager is already available"),Pe=window._tcf_,void e(Pe);he("TCF consent manager is not available");const n=()=>{he("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Pe=window._tcf_,e(Pe)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener($e,n),Le=!0,t(new Error("Timeout waiting for CMP to load"))},o);he("Listening for CMP loaded event..."),document.addEventListener($e,n,{once:!0})}):Promise.resolve(null),getConsentSync:s,getConsentAsync:()=>B(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return he(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.schibstedAdChoicesEnabled)&&n===Oe.SE,i=(null==e?void 0:e.schibstedAdChoicesEnabled)&&n===Oe.NO;if(t||i)return he("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ae(e);if(!(null==e?void 0:e.enabled))return!0;const r=s();return null!==r?r:yield new Promise((e,t)=>{try{if(!Pe)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{he("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Pe.onTcfReady(()=>{he("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Pe.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},Ne=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},je=()=>{const e=Ne("_pulse2data");return e?e.split(",")[2]:void 0},_e=9826;class De{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=ce.DESKTOP,isMobileApp:t}=M.get();if(t){return{"aa-sch-supply_type":`app_${e===ce.MOBILE?"phone":ce.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return B(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return B(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return je()}getExternalUid(){return B(this,void 0,void 0,function*(){return yield B(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=M.get(),{getConsentAsync:i}=xe(e,0,n);if(!(yield i()))return;const o=Ne("_pulse2data");return o?o.split(",")[9]:void 0})})}isTrackingForbidden(){return B(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},testMember:t=_e}=M.get();return window.location.search.includes("inventory_test=true")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{publisher:e}=M.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return B(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=M.get(),{getConsentAsync:i}=xe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=M.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}getSponsorsKeywords(){var e;const{publisher:t,keywordsConfig:n}=M.get(),i=null===(e=null==n?void 0:n.sponsors)||void 0===e?void 0:e.split(":").map(e=>`${t}_${e}`);return i?{"no-sno-news-sponsors":i}:{}}}const Re=new De;function Me(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=(()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"})();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}Re.prepare.bind(Re);const qe=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Fe(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",qe.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Be extends De{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=ce.DESKTOP}=M.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{deviceType:e,isMobileApp:t}=M.get(),{OS:n,isHybridApp:i}=Me(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Fe(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=M.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Ve=864e5,Ue=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return he("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=Ve)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=Ve)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return he("Error with parsing localStorage data"),null}}}})(),ze="glimrTags",He=["glwe_","glwet_"],We={geofenceTags:[],geoTags:[],weatherTags:[]},Ke=(e,t,n,...i)=>B(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return he(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return he(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=xe(e,0,n);return(yield o())?(he(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(he(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),Ge=()=>B(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=M.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield Ke(e,t,n,"glimr")}const{getConsentAsync:i}=xe(e,0,n);return yield i()}),Je=()=>B(void 0,void 0,void 0,function*(){const{glimr:e}=M.get();if(!(yield Ge())||!(null==e?void 0:e.enabled))return void he("No consent for glimr data fetching.");const t=yield(n=500,B(void 0,void 0,void 0,function*(){return yield Promise.race([B(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{Ue.setWithTimestamp(ze,{tags:e,tagMappings:t}),n(!0)})})}catch(e){he(`Error during getting glimr data: ${e}`)}else he("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Ye=()=>{const{country:e}=M.get();return e===Oe.NO?"no-sno":"se-generic"},Xe=()=>{const{country:e,publisher:t}=M.get();return`${e}-${t}`},Qe={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Ze=e=>He.some(t=>e.startsWith(t)),et=e=>e.startsWith("glgc_"),tt=e=>!Ze(e)&&!et(e),nt=e=>{const t=it();if(!t)return We;const n=((e=[])=>e.filter(Ze))(t),i=((e=[])=>e.filter(et))(t),o=((e=[],t)=>{const n=e.filter(tt);if(t){const{publisher:e}=M.get(),t=Qe[e]||e;n.push(t)}return n})(t,e);return{geoTags:o,geofenceTags:i,weatherTags:n}},it=()=>{const e=Ue.getByTimestamp(ze);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},ot={get:(e,t)=>B(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>B(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},rt="advertory:ppids-cache",st={[Oe.SE]:`SCH${Oe.SE.toUpperCase()}-EnvHash`,[Oe.NO]:`SCH${Oe.NO.toUpperCase()}-EnvHash`},at={[Oe.SE]:`SCH${Oe.SE.toUpperCase()}-UserHash`,[Oe.NO]:`SCH${Oe.NO.toUpperCase()}-UserHash`},dt={[Oe.SE]:`sch${Oe.SE}-envhash-v3`,[Oe.NO]:`sch${Oe.NO}-envhash-v3`},lt={[Oe.SE]:`sch${Oe.SE}-userhash-v3`,[Oe.NO]:`sch${Oe.NO}-userhash-v3`},ct={[Oe.SE]:`'sch${Oe.SE}-iosid-v3'`,[Oe.NO]:`'sch${Oe.NO}-iosid-v3'`},ut={[Oe.SE]:`sch${Oe.SE}-androidid-v3`,[Oe.NO]:`sch${Oe.NO}-androidid-v3`},vt={[Oe.SE]:"sdrn:schibsted.com:user",[Oe.NO]:"sdrn:spid.no:user"};class pt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const gt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return B(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||he("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},ht=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return B(this,void 0,void 0,function*(){var n,i,o,r,s,a,d,l,c,u,v;const p=Ue.get(rt),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(p,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(s=c.environmentId)&&void 0!==s?s:"",null===(a=g.idfv)||void 0===a?void 0:a.plain,null===(d=g.anId)||void 0===d?void 0:d.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==p?void 0:p.userId.hashed)&&void 0!==l?l:"",null!==(c=null==p?void 0:p.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(v=null==g?void 0:g.anId)||void 0===v?void 0:v.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||he("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});Ue.set(rt,o)}hashPPIDs(e,t){return B(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield ot.post(t,n,e)}catch(e){return he("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return B(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>B(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${vt[t]}:${n}`:null}))(t,n),o=yield(e=>B(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,s=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),s?{anId:{plain:s}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},mt=e=>B(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,country:i,isMobileApp:o}=e;if(!(yield Ke(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([gt.processPPIDs(t,null==n?void 0:n.timeout),ht.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){he(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),ft=e=>{const{ppid1:t,ppid2:n}=gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:s}=ht.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new pt).add(n,st[e]).add(t,at[e]).add(o,dt[e]).add(i,lt[e]).add(r,ct[e]).add(s,ut[e]).buildEids()}]}},yt=e=>{const{ppid1:t,ppid2:n}=gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:s}=ht.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new pt).add(n,st[e]).add(t,at[e]).add(o,dt[e]).add(i,lt[e]).add(r,ct[e]).add(s,ut[e]).buildRyEids()}}]}}},bt=e=>{const{ppid1:t,ppid2:n}=gt.getPPIDs(),{ppid1:i,ppid2:o}=ht.getPPIDs(),r=(new pt).add(n,st[e]).add(t,at[e]).add(o,dt[e]).add(i,lt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`},wt=e=>B(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=gt.getPPIDs(),{ppid1:i,ppid2:o}=ht.getPPIDs(),r=(new pt).add(n,st[e]).add(t,at[e]).add(o,dt[e]).add(i,lt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})});const Et=new class extends Be{prepare(e){return B(this,void 0,void 0,function*(){const t=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getCountryCodeKeywords(Oe.NO)),this.getInventoryTypeKeywords()),this.getPublisherKeywords()),yield this.getFormattedExternalIdKeywords()),this.getSupplyTypeKeywords()),this.getPageTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),yield this.getAdvertisingConsentKeywords()),this.getHasContextKeywords(e.keywords)),yield B(void 0,void 0,void 0,function*(){const{glimr:e}=M.get(),{addPublisherToGeo:t}={},n=yield Ge();if(!(null==e?void 0:e.enabled)||!n)return he("No consent for getting glimr tags."),{};const i=Ye(),o=nt(t);return{[`${i}-geo`]:o.geoTags,[`${i}-weather`]:o.weatherTags,[`${i}-geofence`]:o.geofenceTags}})),(()=>{const{ppid1:e,ppid2:t}=gt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),e.keywords);return Object.assign(Object.assign({},e),{keywords:t,user:Object.assign(Object.assign({},ft(Oe.NO)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var Tt=Et.prepare.bind(Et);const It=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},St={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},Ct={[St.VG]:["board","netboard","backfill","outstream"],[St.AFTONBLADET]:["panorama","outstream"],[St.GODARE]:["panorama","outstream"],[St.SVD]:["wph-article-panorama","wph-front-panorama"]},kt=e=>{var t;const{publisher:n}=M.get();return!!Ct[n]&&!!(null===(t=Ct[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},At=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),Ot=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),$t=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={}}=M.get(),o=[`${Ye()}-geo`],r=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection",...i?o:[]],s=Object.fromEntries(Object.entries(e).filter(([e])=>r.includes(e))),a=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:s}}},a)}},Pt=(e,...t)=>B(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{a(),n()},s=()=>{a(),i(new Error(`Failed to load ${e}`))},a=()=>{o.removeEventListener("load",r),o.removeEventListener("error",s),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",s);const d=setTimeout(()=>{a(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),Lt=e=>e.includes("snoap.no"),xt=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},Nt=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},jt=Nt([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,s=e/o,a=t/r;i.style.transform=`scale(${s},${a})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),_t=e=>{const t=Nt([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},Dt=[],Rt={},Mt=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=Ft(e);n?(qt(i,n),Bt(e,i,t)):(qt(i,n),Vt(e,i,t))})},qt=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},Ft=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Bt=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Dt.includes(t)||Dt.push(t),n&&window.addEventListener("scroll",Rt[t],{passive:!0})},Vt=(e,t,n)=>{Dt.includes(t)&&(n&&window.removeEventListener("scroll",Rt[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Ut=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],s=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&s.push(t)}),()=>{r.length&&zt(e,r,o,0),s.length&&zt(e,s,o,40)}},zt=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,s=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let a;a=s>r?(s-r)/t-i:(r+t-(s+o))/t;const d=a<=0;e.style.visibility=d?"hidden":"",e.style.zIndex=d?"":n.toString(),e.style.pointerEvents=d?"none":"all",e.style.opacity=a.toString()})},Ht={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let Wt=null;const Kt=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n {\n const frame = window.frameElement;\n \n if (frame) {\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display= \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display= \"none\";\n }\n });\n }\n }\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${jt})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(Lt(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=_t(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Lt(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),Lt(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),xt(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Gt=()=>{Wt=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Jt=()=>{Wt||(Wt=window.requestAnimationFrame(Gt))},Yt=(t,n)=>{var i,o,r,s;const{country:a}=M.get(),{targetId:d}=t;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(i=null==n?void 0:n.iosSafeAreaTopFix)&&void 0!==i?i:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:o="16px 0",beforeContentValue:r=""}=e,s=t/2,a=document.createElement("style");a.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${s}px),\n ${i} calc(50% - ${s}px),\n ${i} calc(50% + ${s}px),\n ${n} calc(50% + ${s}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${r&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${r}' !important;\n }`,a.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(a)})(null!==(o=null==n?void 0:n.overlayStyles)&&void 0!==o?o:{});const l=document.getElementById(d),c=null==l?void 0:l.parentElement;if(!l||!c)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>Mt(e,n),{}),o=Ft(e);i.observe(e),n&&(Rt[o]=Ut(e,t))})(c,n),l.className="advertory-fullscreen-scroll";const u=w(t,e.ABSOLUTE_FULLSCREEN)?"absolute":"fixed";l.style.position=u,c.className="advertory-fullscreen-scroll-wrapper",c.dataset.showTagSubscribeId=d,l.setAttribute("data-ad-label",Ht[a].adText),(null==n?void 0:n.moveCogwheelToTheLeft)&&(l.dataset.moveCogwheelToTheLeft="true"),Jt(),window.addEventListener("resize",Jt),null===(r=window.visualViewport)||void 0===r||r.addEventListener("resize",Jt),null===(s=window.visualViewport)||void 0===s||s.addEventListener("scroll",Jt)};var Xt=Object.freeze({__proto__:null,createFullscreenScrollAd:Yt,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=xt(e)?1:0;return null==t?void 0:t.tags[e].adResponse.ads[n].rtb.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=xt(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Kt(t,e))}});const Qt=()=>B(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,country:n,isMobileApp:o,fullscreenScroll:r}=M.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:s}=M.getHandlers(),{getConsentAsync:a}=xe(t,0,n),d=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=At(),{prebid:{relevantCbTimeout:r}={}}=M.get(),s="relevantCb"===i&&r?r:n[i].timeout,a=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},s);t.push(a)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=At(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=At();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:p}=u;(()=>{const e=Ot();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return he("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=Ot();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const o=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};he("prebid consentManagement",o),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},yt(n)),$t(p,v))),he("core add prebid config",Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},yt(n)),$t(p,v))),t.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{Zt(e,s)},directRenderFn:e=>{const{settings:t,renderFn:n}=e,{bid:o,adDiv:s}=t||{};if(!s)return;const a=n(t),d=Object.assign(Object.assign({},o),{targetId:s.id,banner:!0});i(d)&&(Yt(d,r),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(a))}}),he("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{Zt(e,s)},directRenderFn:()=>{}})})}),Zt=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,s=document.querySelectorAll(`[id^=${i}]`)[0],a=`RY-${s.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(s,a);const d=null===(n=s.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:a},M.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")};let en="";const tn=new Map,nn=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},on=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},rn=()=>{W();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{te(e.id),on(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=fe(e.id)}),S(()=>window.apntag.clearRequest())},sn="noGroupedPlacements",an=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},dn=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},ln=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,deviceType:o}=M.get(),r=n[o].filter(dn)||[],s=e?document.querySelector(e):document;if(!s)return[];const a=r.reduce((e,t)=>{const n=an(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({id:e})=>e.match(t)),a=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,d=s.querySelectorAll(a),l=Array.from(d).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=cn(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,s=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),a=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=E[Math.floor(36*Math.random())];return t})(6)}`;return e.id=a,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),s&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&U.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{id:a})});return(e=>{const{keywordsConfig:t}=M.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(en!==window.location.pathname&&(tn.clear(),en=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=tn.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${Xe()}-count`]=i,tn.set(n,i+1),e})):e})(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.id)-t.findIndex(e=>e.id===n.id))})(a)},cn=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({id:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.id)?i:(null==e?void 0:e.id)===(null==o?void 0:o.id)?o:r||o},un=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=M.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=fe(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),s=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(fe(e.id)));return n})(e,i),a=Object.keys(r),d=((e,t)=>e.filter(e=>!t.has(fe(e.id))))(e,new Set([...a,...o]));return Object.assign(Object.assign(Object.assign({},s),r),{[sn]:d})},vn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,s]=t;if(!i.dataset.lockedsize&&s&&r)i.style.width=`${r}px`,i.style.height=`${s}px`,n&&(o.resizeAd(i.id,[r,s]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=s.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},pn=["netboard","board"];class gn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),s=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),a=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return a.searchParams.append("editionName",o),r&&a.searchParams.append("urlData",r),s&&a.searchParams.append("excludedItems",s),l&&a.searchParams.append("spid",l),d&&a.searchParams.append("envid",d),a.toString()}fetchData(e){return B(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",s=(null==o?void 0:o.userId)?String(o.userId):"",a=this.buildUrl(e,{envId:r,spid:s});try{he("Starting fetching DrEdition ad from URL:",a);const e={method:"GET"},t=yield ot.get(a,e);return he("Fetch operation completed successfully."),t}catch(e){he("Error during fetch operation:",e)}return null})}}class hn{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:s}=t,a=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:s,utm_campaign:o,utm_medium:a},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return B(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:s}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:s,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}const mn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):he("Dr. Edition container does not have a parent element, cannot remove height lock.")};class fn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return B(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{containerSelector:o},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void he(`Container with selector "${o}" not found.`);const a=yield this.drEditionService.fetchData(t);return(null==a?void 0:a.itemId)||r?!(null==a?void 0:a.itemId)&&r?(he("No Dr. Edition ads available to render. Collapsing whole placement."),te(e.id),void mn(s)):((null==a?void 0:a.itemId)&&r&&(he("Dr. Edition ad available to render as a Xandr backfill."),ne(e.id)),void(a?(a.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(a.css,"style"),yield this.rendererManager.render(s,a,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(a,t),mn(s),this.drEditionAds.push(a),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(a.itemId),this.observeAdView(e,a,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):mn(s))):(he("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void mn(s))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";ne(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class yn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return B(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=xe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=ue(n.device)?t.mobileHTML:t.desktopHTML,s=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=s,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class bn{constructor(e){this.strategy=e}handle(e,t){return B(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return B(this,void 0,void 0,function*(){const t=e.drEditionConfig.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Pt(t)}catch(e){he("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return B(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const s=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");s!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:s}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const a=document.querySelector(".dr-edition-preview .preview-video");return!!a&&(a.setAttribute("src",r),a.setAttribute("playsinline",""),!(!a||!s)&&(null===(o=(i=t.drEditionConfig).addPreviewVideo)||void 0===o||o.call(i,a),!0))}}class wn{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return B(this,void 0,void 0,function*(){var i,o,r,s,a,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,n){return B(this,void 0,void 0,function*(){var i,o,r,s,a,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(s=(r=this.pulse).trackClickUIElement)||void 0===s||s.call(r,l):null===(d=(a=this.pulse).trackElementClick)||void 0===d||d.call(a,l)})}}class En extends wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:i,clientName:o="",creativeId:r}={}}=t,{columnName:s,primaryPosition:a}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:s,primaryPosition:a},"spt:custom":{is_sponsored:!0,sponsor:o,"spt:creativeId":r},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class Tn extends wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,s,a,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(s=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==s?s:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(a=this.newsroomStrategy)||void 0===a?void 0:a.getTags)||void 0===d?void 0:d.call(a,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,s,a;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),f=this.getTeaserElementText(e,"subtitle"),y=this.getTeaserElementText(e,"image"),b=null!==(a=null!==(s=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==s?s:p)&&void 0!==a?a:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:b,placement:n.editionName,subtitle:f,time:h,title:m,type:i,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const In={FRONT:"front",ARTICLE:"article",OTHER:"other"},Sn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},Cn=e=>B(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),kn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return B(this,void 0,void 0,function*(){yield import("./styles-Dk5BnY99.js")})}})}},An=(e,t)=>{null==e||e.forEach(e=>{kn[e](t)})};class On{handleVideo(e,t){return B(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield B(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],a=this.createPlayerOverlay(e);An(s,a);const d={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield Cn(d);l.once("assetReady",()=>{Sn(l,s)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?a.classList.add("is-playing"):a.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?a.classList.add("is-inactive"):a.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>B(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===In.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const $n="https://www.aftonbladet.se/video-player-extras/latest/";class Pn{handleVideo(e,t){return B(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const s={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${$n}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${$n}external-link.js`]:{name:"ExternalLink"}}};yield Cn(s),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const Ln=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class xn{handleVideo(e,t){return B(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const s={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Ln(e)?e:{}),{provider:Object.assign(Object.assign({},Ln(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},a=yield Cn(s);a.once("PulseStats:ready",()=>B(this,void 0,void 0,function*(){const e=yield a.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===In.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class Nn{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const jn=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:s}=e,a={[St.VG]:new hn,[St.E24]:new On,[St.AFTONBLADET]:new Pn,[St.SVD]:new xn}[o]||new Nn,d=new(s===Oe.SE?En:Tn)(n,a,r),l=new gn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new yn(a,d),u=new bn(a);return new fn(l,c,u,d)},_n=()=>B(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class Dn{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 B(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 he("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return B(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const Rn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=jn(n,i,o);e.forEach(e=>{var i,o,s;if(!e.isIntersecting)return;const a=e.target,d=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(s=a.dataset.pulsePrimaryposition)&&void 0!==s?s:"";r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},Mn=[],qn=(e,t)=>B(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,deviceType:r,drEdition:s,publisher:a,pageType:d,country:l,isMobileApp:c}=e;if(!(yield Ke(o,c,l,"handleDrEditionBackfill")))return;const u=((e,t)=>{var n;const{deviceType:i,placements:o,drEdition:{fallbackGlobalEditionName:r}={}}=e,s=o[i]||o.desktop,a=fe(t.targetId),d=s.find(e=>e.id===a),l=pn.some(e=>a.startsWith(e)),c=Mn.includes(a),u=(null===(n=null==d?void 0:d.drEdition)||void 0===n?void 0:n.editionName)||r;return d&&l&&!c&&u?(Mn.push(a),Object.assign(Object.assign({},d),{drEdition:Object.assign(Object.assign({},d.drEdition),{editionName:u})})):null})(e,t);if(!u)return;if(!(null==i?void 0:i.instance))return void he("Pulse has not been passed as a prop, aborting");const v=yield _n(),p=new Dn(v),g=jn({publisher:a,pageType:d,country:l},p,null==i?void 0:i.instance),h=document.getElementById(t.targetId);if(!h||!s)return;h.classList.value="";const m=document.createElement("div");m.className=s.containerSelector.replace(/^[.#:[\]]+/,""),h.innerHTML=m.outerHTML;const f={editionName:(null===(n=null==u?void 0:u.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:s,device:r,tcf:o,isMobileApp:c,country:l,renderAsBackfill:!0};yield g.fetchAndRenderAd(h,f)}),Fn=e=>B(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Ke(e.tcf,e.isMobileApp,e.country,"handleDrEdition")))return;const n=yield _n(),i=new Dn(n);Rn({publisher:e.publisher,drEditionConfig:e.drEdition,device:e.deviceType,pageType:e.pageType,country:e.country},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),Bn="collapseAd",Vn="hideAd",Un="resizeAd",zn="renderDrEditionFallback",Hn="wallpaperImageUrl",Wn="wallpaperColor",Kn="velvet",Gn=[Un,Hn,Wn,Bn,Vn,zn,Kn];let Jn;const Yn=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(J(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:Hn,wallpaperImageUrl:t}}if(Y(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Wn,wallpaperColor:t}}if(e.startsWith(zn)){const t=e.split(":")[1];return{name:zn,targetId:t}}if(e.startsWith(Bn)||e.startsWith(Vn)){const t=e.split(":")[1];return{name:Bn,targetId:t}}if(e.includes("name")&&Gn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Gn.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:s,cmd:a,size:d}=n;i===Kn&&a&&(a.includes("noScroll")&&(Jn=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(a.includes("close")||a.includes("ended"))&&(null==Jn||Jn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Bn&&i!==Vn||!o||te(o),i===Un&&o&&a&&vn(o,a),i===zn&&o&&(te(o),qn(M.get(),{targetId:o})),"resizeMediationAd"===i&&o&&d&&vn(o,d,!0),i===Hn&&r&&X(r),i===Wn&&s&&Q(s)},Xn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Qn=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return v(t)&&i?(he(`loading finn blink ad for blink only placement for ${t}`),void ie().withFinnBlinkAd(t)):v(t)?(he(`loading finn blink ad with full ads chain for ${t}`),void ie().withFullAdsChain(t)):void S(()=>(he("core showTag",{id:t}),e.showTag(t)))},Zn=(e,t)=>B(void 0,void 0,void 0,function*(){yield C,yield k;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),s=document.getElementById(r);he("core log from intersection observer handler",{targetId:r,element:s}),n(window.apntag,r,i),s&&(t.unobserve(s),t.disconnect())})})(t,n,Qn,e),Xn(t));n.observe(e)}),ei=new Map,ti=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],ni=".brandstudio-premium-content-widget",ii=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),oi=({adWrapper:e,placementContainer:t})=>{const n=ii({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),on(i=t),i.innerHTML=""},ri=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},si=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=M.get(),i=ti.includes(n)&&Boolean(t.closest(ni));const o=i?t.closest(ni):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,s=n&&t.matches("iframe, article")&&e;if(!n||!i&&!s||i&&!o)return;if(s)return ri(e),void r.disconnect();const a=t.closest('[style*="height"]'),d=o;a&&d.contains(a)?ri(a):d.hasAttribute("style")&&ri(d),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},ai=(e,t,n,i,o,r)=>{var s;const a=performance.now(),d=null!==(s=ei.get(t))&&void 0!==s?s:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;a-d>=o&&l&&(ei.set(t,a),((e,t,n)=>{const i=null==n?void 0:n.parentElement;i&&n&&oi({adWrapper:i,placementContainer:n}),S(()=>{e.setKeywords([t],{[`${Ye()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},di=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,ai,t,n),Xn(300));i.observe(e)},li=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},ci=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},ui=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=M.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),mi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},vi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t;return e.id===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),r=null==i?void 0:i.threshold;ci(o,r)&&i&&(nn(i.id),n.length&&o.classList.remove(...n),mi([i],t))}},pi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=M.get();t&&(e.forEach(({id:e})=>{const t=gi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&vi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),vi(e,!1,t))};n.persisted&&(Ee()?window.addEventListener("scroll",i,{passive:!0}):vi(e,!1,t))})})(e,n))},gi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},hi=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(gi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},mi=(e,t=!1)=>{const{requestSize:n=D}=M.get(),i=e.map(({id:e})=>e),o=li(i,n);if(t)for(const t of e){const e=hi(t);window.apntag.modifyTag(t.id,e)}for(const e of o)S(()=>window.apntag.refresh(e))},fi=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,yi={SPLASH:"splash",WELCOME_PAGE:"welcomePage",TOPSCROLLER:"topscroller",VELVET:"velvet"},bi="takeover-displayed",wi="takeover-visit-count",Ei=14400,Ti=()=>{const e=Ne(wi);return e?parseInt(e):0},Ii=()=>{const e=Ti(),{takeover:{cookieCapTime:t=Ei}={}}=M.get(),n=document.location.hostname;window.document.cookie=`${wi}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Si=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=M.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=M.get().takeover)||void 0===e?void 0:e.cookieCapName)||bi;return"true"===Ne(t)})())&&(!t||Ci()))},Ci=()=>{const e=Ti();return 0===e?(Ii(),!1):1===e},ki=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ai=()=>{const{takeover:e}=M.get();return Boolean(null==e?void 0:e.topscroller)},Oi=t=>{const{width:n,height:i}=t;return ki(n,i)?yi.SPLASH:w(t,e.VELVET_TAKEOVER)?yi.VELVET:Ai()?yi.TOPSCROLLER:yi.WELCOME_PAGE},$i=()=>B(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=bi,cookieCapTime:n=Ei}={},isMobileApp:i,tcf:o,country:r}=M.get(),s=yield Ke(o,i,r,"ad-takeover-cookiecap");n&&s&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Pi=e=>{var t;const n=!!(null===(t=M.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return s(e)&&n},Li=(e,t)=>{var n;if(t===yi.TOPSCROLLER){const{topscroller:t}=e;return null!=t?t:{}}if(t===yi.SPLASH){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},xi=(e,t)=>{t!==yi.SPLASH?(e=>{var t,n,i;const o=null===(n=null===(t=M.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,r=null===(i=M.get().takeover)||void 0===i?void 0:i.topscroller;if(!o||r)return;const s=document.querySelector(o),d=document.querySelector(".welcome-page-wrapper"),l=document.querySelector(`#${e.targetId}`),c=document.querySelector(".advertory-welcome-page-scroll");if(!(s&&d&&c&&l))return;const u=null==s?void 0:s.offsetHeight,v=a(e)?"60svh":`calc(100svh - ${u}px)`,p=a(e)?"calc(40svh + 30px)":`calc(${u}px + 30px)`;d.style.setProperty("height",v,"important"),l.style.setProperty("height",v,"important"),c.style.setProperty("bottom",p,"important")})(e):(e=>{var t;if(!(null===(t=M.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Ni=Nt([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var ji=Object.freeze({__proto__:null,addTakeoverCookie:$i,adjustTakeoverHeight:xi,canDisplayTakeover:Si,getProperWelcomePageConfig:Li,getTakeoverVariant:Oi,handleTakeoverCookieOnAdNotShown:e=>B(void 0,void 0,void 0,function*(){Pi(e)&&(yield $i())}),incrementArticleVisitCount:Ii,isSplashVariant:ki,isTopscroller:Ai,scaleAd:Ni,shouldAddTakeoverCookieForNotShownAd:Pi});const _i=e=>`externalImpId:'${e}'`,Di=e=>{var t;const{forwardExternalImpId:n=!1,tracker:i}=M.get(),o=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${Xe()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const o=i.keywords?Object.assign(Object.assign({},e.keywords),i.keywords):e.keywords;return Object.assign(Object.assign({},e),{sizes:null!==(t=null==i?void 0:i.sizes)&&void 0!==t?t:e.sizes,keywords:o})})(e),{id:r,sizes:s,keywords:a,allowedFormats:d,invCode:l,ssa:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:p=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Si())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=null==n?void 0:n.filter(e=>e!==yi.TOPSCROLLER),o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(o),g=Object.assign({invCode:l,sizes:s,targetId:r,keywords:fi(a,c),allowedFormats:d,dynamicSizeWidthCheck:p},v&&{safeframeConfig:v}),h=(e=>{var t,n,i,o,r,s,a;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(he("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(a=null===(s=null==e?void 0:e.instance)||void 0===s?void 0:s.state)||void 0===a?void 0:a.pageViewId):(he("Tracker state does not contain field pageViewId or it is empty"),""):(he("Tracker state is empty"),""):(he("Tracker is not configured in initAdvertory function"),"")})(i);n&&h&&(he("External Impression ID assigned to defineTag:",_i(h)),g.externalImpId=_i(h));const m=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon2:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(g.native=m),g},Ri=e=>!e.includes("takeover")||Si(),Mi={nativeAd:e=>o(e)&&!c(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:r,fullscreenScroll:i,topscroller:e=>s(e)&&Ai(),splash:e=>s(e)&&ki(e.width,e.height),welcomePage:s,wallpaper:d,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:y,hFormat:b,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!b(e)&&!y(e),topboard:e=>e.targetId.startsWith("topboard")&&!s(e),widescreen:f,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:c,brandboard:e=>u(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!m(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>p(e)||g(e),panorama:h,midboard:m},qi=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const s=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;s&&(t.dataset.invCode=s)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const s="DIV"===(null==r?void 0:r.tagName);e&&s&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(Mi))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},Fi=e=>{var t;return(null===(t=Object.entries(Mi).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Bi=e=>{if(!e)return e;const t=e[`${Ye()}-targetid`],n=t?fe(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${Ye()}-targetid`]:[n]})},Vi=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${Ye()}-geo`]&&{[`${Ye()}-geo`]:["geo-test-value"]}),e[`${Ye()}-geofence`]&&{[`${Ye()}-geofence`]:["geofence-test-value"]}),e[`${Ye()}-weather`]&&{[`${Ye()}-weather`]:["weather-test-value"]}),Ui=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.id}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},zi=(e,t)=>B(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})}),Hi={arrayMerge:(e,t)=>t},Wi=e=>B(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>B(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield ot.get(t,{method:"GET",signal:n.signal})}catch(e){throw he("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:o,placements:r,threshold:s,batchSize:a}=t,d=N.all([e.placements,r],Hi),l=N(e.pageOptions,{keywords:i},Hi),c=N(e.appearanceConfig,{defaultThreshold:s},Hi),u=N(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:o},Hi);return Object.assign(Object.assign({},e),{placements:d,requestSize:null!=a?a:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:u})})({siteConfig:e,configOverrides:t}):e}catch(t){return he("Error fetching S3 config, using site config",{error:t}),e}});let Ki,Gi=[];const Ji=["takeover","wallpaper"],Yi=e=>{const t=(e=>{const t=U.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:o,glimr:r,appearanceConfig:s,requestSize:a=D,publisher:d,country:l,pageType:c,deviceType:u,isMobileApp:v=!1,pageOptions:{member:p},takeover:g,fullscreenScroll:h,useAppTabletInvCode:m}=e;return{xandr:{member:p,keywords:t,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({publisher:d,country:l,pageType:c,deviceType:u,placements:i,tcf:o,requestSize:a,isMobileApp:v,useAppTabletInvCode:m},r&&{glimr:r}),n&&{queryConfig:n}),s&&{appearanceConfig:s}),g&&{takeover:g}),h&&{fullscreenScroll:h})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Xi=()=>B(void 0,void 0,void 0,function*(){const{pageOptions:e}=M.get(),{preparePageOptions:t}=M.getHandlers(),n=(()=>{const{sandboxAdIframeEnabled:e=!0}=M.get();return{sandboxAdIframe:e,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield B(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=M.get();return(yield Ke(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Vi(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),S(()=>Ki.setPageOpts(o))}),Qi=e=>B(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,isMobileApp:i,country:o}=M.get();Zi(e);const r=yield Ke(n,i,o,"prebid");(null==t?void 0:t.enabled)&&r?(he("core loadPlacements prebid enabled"),yield Qt()):(he("core load tags invoked without prebid enabled"),eo(e))}),Zi=e=>{const{prepareTag:t}=M.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),o=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{he("core defineTags",{placement:e});const i=Di(e);if(Ri(e.id)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Bi(i),sizes:o}})(o);n.push(r),S(()=>(he("core defineTag - add to the queue",{placement:e,preparedTag:o}),Ki.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},eo=e=>{const t=e.filter(({id:e})=>Ri(e)).map(({id:e})=>e);t.length&&S(()=>(he("core loadTags",{placementsIdsToLoad:t}),Ki.loadTags([...t])))},to=(e,t)=>B(void 0,void 0,void 0,function*(){const{appearanceConfig:n,deviceType:i}=M.get(),{threshold:o,refresh:r}=e,s=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),a=null==n?void 0:n.defaultThreshold[i];s&&(he("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,threshold:o,deviceDefaultThreshold:a}),yield Zn(s,null!=o?o:a)),s&&r&&(he("core showAd - setup refreshing",{placement:e,adObj:t}),s.dataset.refresh=r.toString())}),no=e=>e.some(({id:e})=>Ji.some(t=>e.includes(t))),io=e=>B(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{requestSize:t=D,queryConfig:{placementBatches:n}={},deviceType:i}=M.get(),o=un(e),r=Object.keys((null==n?void 0:n[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),s=new Set(r.flat().map(({id:e})=>e)),a=e.filter(({id:e})=>!s.has(e));return[...r,...li(a,t)]})(i);for(const e of o)no(e)?(he("core loadAds without lazy loading",{placementsToLoad:e}),yield Qi(e)):e.length&&(he("core loadAds with lazy loading",{placementsToLoad:e}),yield oo(e));const{finnBlink:r}=M.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield import("./index-DB_MwA1R.js");yield e(n)}}),oo=e=>B(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=M.get(),i=[];if(!t)return he("lazy load is not enabled",{placements:e}),void(yield Qi(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{he("lazy load is enabled - handler start",{loadedPlacementIds:i,placements:e});const o=e.every(e=>i.includes(e.id)),r=e.map(e=>e.id);!o&&i.push(...r),!o&&Qi(e),he("lazy load is enabled - handler stop",{loadedPlacementIds:i,placements:e,arePlacementsLoaded:o,placementIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.id);t&&(he("lazy loading - observe element",{placementId:e.id,element:t}),o.observe(t))})}),ro=()=>B(void 0,void 0,void 0,function*(){const{siteEvents:t,initNativeAd:n}=M.getHandlers(),{wallpaper:a,fullscreenScroll:c}=M.get(),u=[];S(()=>{Ki.onEvent("adRequested",()=>{t.adRequested()}),Ki.onEvent("adAvailable",e=>B(void 0,void 0,void 0,function*(){var r,u,p,g,h,m;he("core adAvailable start",{placementsAvailable:Gi,adObj:e,isFullscreenScrollAd:i(e),isFinnBlink:v(e.targetId),isNativeAd:o(e),isMediation:Te(e),isTakeoverAd:s(e),isCollapseAd:l(e),isWallpaperAd:d(e)});const y=null===(p=null===(u=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===u?void 0:u.tags[e.targetId])||void 0===p?void 0:p.adResponse.ads;if(Te(e)&&y&&(null===(g=y[1])||void 0===g?void 0:g.rtb)&&(e.banner=null===(m=null===(h=y[1])||void 0===h?void 0:h.rtb)||void 0===m?void 0:m.banner),i(e)){const{modifyFullscreenScrollAd:t}=yield Promise.resolve().then(function(){return Xt});t(e)}const{widescreenSwitching:b}=M.get();if(f(e)&&(null==b?void 0:b.enabled)){const{initWidescreenSwitching:e}=yield import("./index-CkmoQGC0.js");e()}if(i(e)&&!v(e.targetId)){const{createFullscreenScrollAd:t}=yield Promise.resolve().then(function(){return Xt});t(e,c)}if(!o(e)||Te(e)||v(e.targetId)||null==n||n(e,M.get()),s(e)&&!l(e)){const{modifyTakeoverAdContent:t,createTakeoverAd:n}=yield import("./index-C2OzlhzE.js");t(e.targetId),yield n(e)}if(d(e)&&(null==a?void 0:a.enabled)){const{initWallpaperAd:t}=yield Promise.resolve().then(function(){return Z});t(()=>S(()=>window.apntag.showTag(e.targetId)),a),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(e)&&U.setData("horseshoe",{isAvailable:!0}),qi({adObj:e}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(e),t.adAvailable(e);const w=Gi.find(({id:t})=>t===e.targetId);w&&(yield to(w,e),Gi=Gi.filter(e=>e.id!==w.id)),he("core adAvailable stop",{placementsAvailable:Gi,adObj:e,isFullscreenScrollAd:i(e),isFinnBlink:v(e.targetId),isNativeAd:o(e),isMediation:Te(e),isTakeoverAd:s(e),isCollapseAd:l(e),isWallpaperAd:d(e)})})),Ki.onEvent("adLoaded",i=>B(void 0,void 0,void 0,function*(){const{refreshConfig:a,appearanceConfig:d,wallpaper:c,adScaleConfig:p}=M.get(),g=document.getElementById(i.targetId);if(v(i.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield import("./events-X-6ybuAW.js");e(i)}if(u.includes(i.targetId)&&o(i)&&(null==n||n(i,M.get()),qi({adObj:i})),!u.includes(i.targetId)&&Te(i)&&u.push(i.targetId),l(i)&&te(i.targetId),s(i)){const{modifyTakeoverIframe:e}=yield import("./index-C2OzlhzE.js");e(Ki,i.targetId)}if(r(i)){const{prepareContainerForFullWidthFormat:e}=yield import("./index-C-DeCUQj.js");e(i)}if((t=>w(t,e.VERTICAL_FULLWIDTH))(i)){const{scaleVerticalFullWidthAd:e}=yield import("./index-C-DeCUQj.js");e(i)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;si({adWrapper:o,placementContainer:i});const{delayTime:r=1e3}=t,s=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&di(i,s,r))})(i,a),(null==d?void 0:d.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(i.targetId);if(U.getData("horseshoe").isAvailable&&(null==c?void 0:c.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return Z});e(i.targetId)}if(null==p?void 0:p.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield import("./index-BYUVIP7N.js");e(i),t(i)}var h,m;t.adLoaded(i),h=i.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${h}`)&&(null===(m=window.gdpr)||void 0===m?void 0:m.setupButton)&&window.gdpr.setupButton(h),g&&(g.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=M.get(),i=null!==(t=null==n?void 0:n.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>i&&e.setAttribute("data-two-column-ad-layout","true")})(g)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:i.targetId,adFormat:Fi(i)}}))})),Ki.onEvent("adNoBid",e=>B(void 0,void 0,void 0,function*(){var n;if(te(e.targetId),null===(n=M.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:t}=yield import("./index-B6uwl_4i.js");yield t(M.get(),e)}if(s(e)){const{handleTakeoverCookieOnAdNotShown:t}=yield Promise.resolve().then(function(){return ji});yield t(e)}t.adNoBid(e)})),Ki.onEvent("adError",(e,n)=>B(void 0,void 0,void 0,function*(){if(s(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return ji});yield e(n)}t.adError(e,n)})),Ki.onEvent("adCollapse",()=>{t.adCollapse()}),Ki.onEvent("adRequestFailure",e=>{te(e.targetId),t.adRequestFailure(e)}),Ki.onEvent("adBadRequest",e=>{te(e.targetId),t.adBadRequest(e)}),Ki.onEvent("adLoadedMediated",e=>t.adLoadedMediated(e)),Ki.onEvent("adNoBidMediated",e=>t.adNoBidMediated(e))})}),so=(e,t)=>B(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:s}=null!=t?t:{};if(i)return rn(),[];o&&(rn(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{ne(e.id)})),q(null!=e?e:{}),yield Xi();let a=ln(s);return r&&(a=a.filter(e=>v(e.id))),a.length>0&&(Gi=[...Gi,...a.map(e=>Object.assign({},e))],ui(a),pi(a),yield io(a)),Gi}),ao=(e,t)=>B(void 0,void 0,void 0,function*(){var n,i,o,r,s,a;if(M.set(e),M.setHandlers(t),U.initialize(),window.addEventListener("message",Yn,!1),Ki=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=Ki,he("Apn tag is set up on window"),yield Promise.allSettled([B(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=M.get();(yield Ke(e,t,n,"xandr-endpoint"))||Ki.setEndpoint("ib.adnxs-simple.com",!0)}),B(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:i}=M.get(),o=yield Ke(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Pt(null==e?void 0:e.url))}),mt(e),B(void 0,void 0,void 0,function*(){const{astUrl:e}=M.get();yield Pt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),B(void 0,void 0,void 0,function*(){const{gptUrl:e,tcf:t,isMobileApp:n,country:i}=M.get();(yield Ke(t,n,i,"gpt-endpoint"))&&(yield Pt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),(null===(n=e.brandmetrics)||void 0===n?void 0:n.enabled)?import("./index-DTlZ0fcx.js").then(({loadBrandmetricsScript:e})=>e()):Promise.resolve(),Je(),B(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=M.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Pt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null===(i=e.norstat)||void 0===i?void 0:i.enabled){const{loadNorstat:e}=yield import("./index-Dv8OrWsV.js");yield e()}if(he("Libraries have been loaded and trackers have been set"),yield ro(),yield Xi(),he("Page options have been set"),Yi(e),he("Advertory is setup on window"),Gi=ln(),ui(Gi),pi(Gi),yield io(Gi),he("Ads has been loaded",Gi),Ui(Gi),null===(o=e.finnBlink)||void 0===o?void 0:o.enabled){const{replaceAdsWithFinnBlink:t}=yield import("./index-DB_MwA1R.js");yield t(e.finnBlink)}if(null===(r=e.drEdition)||void 0===r?void 0:r.enabled){const{handleDrEdition:t}=yield import("./index-B6uwl_4i.js");yield t(e)}if(null===(s=e.rightColumnSplit)||void 0===s?void 0:s.enabled){const{initRightColumnSplit:t}=yield import("./index-DQlbgZ8n.js");t(e.rightColumnSplit)}if(null===(a=e.kilkaya)||void 0===a?void 0:a.enabled){const{runKilkaya:t}=yield import("./index-DFjDcsEY.js");yield t(e)}}),lo=(e,t)=>B(void 0,void 0,void 0,function*(){yield((e,t)=>B(void 0,void 0,void 0,function*(){const{initConsentManager:n,getConsentAsync:i}=xe(e.tcf,e.isMobileApp,e.country),o=yield Wi(e);yield me(),yield zi(n),yield zi(i),he("TCF resolved successfully"),yield ao(o,t),he("Run function resolved successfully")}))(e,t)}),co="native_override_desc2",uo=(e,t,n)=>{var i;const{image:o,icon:r,sponsoredBy:s,title:a,clickUrl:d,cta:l,body:c,desc2:u,video:v,description:p,customTitle1:g,customTitle2:h,customTitle3:m,customTitle4:f,customIcon2:y}=e,b=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:b(o),imgWidth:null==o?void 0:o.width,imgHeight:null==o?void 0:o.height,imgAltText:null!=a?a:"",logo:b(r),sponsoredBy:null!=s?s:"",title:null!=a?a:"",url:null!=d?d:"",cta:null!=l?l:"",description:null!==(i=null!=c?c:p)&&void 0!==i?i:"",desc2:null!=u?u:"",video:v,customTitle1:null!=g?g:"",customTitle2:null!=h?h:"",customTitle3:null!=m?m:"",customTitle4:null!=f?f:"",logo2:b(y)},t)},vo=(e,t)=>{const n=(i=co,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(co),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},po=(e,t)=>{const n=document.querySelector(`#${t}`);if(n)for(const t of Object.keys(e))n.style.setProperty(t,e[t])},go=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(St).includes(i);n&&r&&le(i,e,ge.NATIVE_AD,o)})(o,n),i())},ho=e=>{var t;const n=document.querySelector(`#${e.targetId}`);if(!n||!(null===(t=e.native)||void 0===t?void 0:t.clickTrackers))return;(null==n?void 0:n.querySelectorAll("a.ad-link")).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])bo(i)}),t.dataset.tracked="true")})},mo=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(yo):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},fo=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:s,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:a=!1}={}}=t,d=a?{rootMargin:`${l=null!==(n=null==s?void 0:s.defaultThreshold[null!=r?r:ce.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,mo(e),c.disconnect();break}},d);c.observe(o)},yo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?bo(e):window.navigator.sendBeacon(e)},bo=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},wo=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,s="default";if(!e.native)return null;const{native:a,targetId:d}=e,{desc2:l=s}=e.native,c=l.toLowerCase(),u=null!==(i=vo(e.targetId,l))&&void 0!==i?i:c,v=Ht[t.language||Oe.NO],p=uo(a,v,d);return(a.video?r[u]:o[u]||o.default)(p,t)})(e,t,n);go(e.targetId,i,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{ho(e),fo(e,t)})(e,t)})},Eo="viewable",To="adClick";var Io=e=>(t,n,i)=>{const{video:o,img:r,url:s}=t,{publisher:a,productTag:d}=n,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const u=Math.ceil(1e5*Math.random()),v=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",p=`ad-player-${u}`,g=So(o.content,s),h=Co({id:u,nodeId:p,poster:v,tagURL:g,publisher:a,productTag:d,videoLoop:c});return ko({playerConfig:h,clickUrl:s,pluginsNames:l}),`${e(t,n,p)}`};const So=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},Co=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",productTag:r="xandr",videoLoop:s=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:s,repeat:s,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:i}}},pulse:{provider:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},Ln(e)?e:{}),{provider:Object.assign(Object.assign({},Ln(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),ko=e=>B(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:o}=t,r=yield Cn(t);An(n),r.once("assetReady",()=>{Sn(r,n)}),r.on(Eo,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(To,()=>{window.open(i,"_blank")}),o&&r.on("pause",()=>{r.play()})}),Ao=(e,t,n)=>{const i=e===In.ARTICLE||e===In.OTHER?.79:1;return{desktopTitleSize:t?Number(t)*i+"px":"clamp(22px, 3.6rem, 59px)",mobileTitleSize:n?`${n}px`:"clamp(22px, 3.6rem, 59px)"}},Oo={0:633,1:395,2:562,3:541,4:630,5:549,6:596,7:493,8:579,9:596,A:702,B:651,C:644,D:724,E:598,F:560,G:690,H:773,I:356,J:344,K:680,L:576,M:897,N:714,O:725,P:618,Q:725,R:675,S:555,T:610,U:710,V:703,W:1004,X:745,Y:684,Z:608,"Æ":906,"Ø":727,"Å":702,a:541,b:595,c:479,d:612,e:480,f:383,g:528,h:629,i:322,j:303,k:603,l:315,m:916,n:636,o:563,p:607,q:595,r:481,s:445,t:367,u:632,v:573,w:815,x:586,y:574,z:540,"æ":743,"ø":569,"ö":563,"å":541,"ä":541,"é":480,"è":480,"(":343,")":343,"«":567,"»":567,".":253,",":257,"!":259,"?":446,"¿":441,"*":410,"&":783,"-":334,"–":545,":":276,";":278,"%":744,$:549,"€":722,"#":519,"+":600,"=":600,'"':389,"'":202,"`":347,"’":237,"\\":395,"/":395,"@":844," ":181,"­":0},$o=(e,t)=>{const n={"É":"E","é":"e","ü":"u"," ":" "};return[...e].reduce((e,i)=>e+(Oo[n[i]||i]||Oo.m)*t/1e3,0)},Po=(e,t,n=12,i=300)=>{let o=n,r=i,s=n;for(;o<=r;){const n=Math.floor((o+r)/2);$o(e,n)<=t?(s=n,o=n+1):r=n-1}const a=((e,t,n,i)=>{const o=Math.floor(e/t*(n-2));return o<i?i:o})(s,$o(e,s),t,n);return{fontSize:a,content:e}},Lo=(e,t)=>{const[n,i]=(e=>{const t=e.trim().split(/\s+/);if(t.length<=1)return[e,""];let n=[e,""],i=1/0;for(let e=1;e<t.length;e++){const o=t.slice(0,e).join(" "),r=t.slice(e).join(" "),s=Math.abs(o.length-r.length);s<i&&(i=s,n=[o,r])}return n})(e);return[Po(n,t),Po(i,t)]},xo=({title:e,options:t})=>{if(!t)return e;const{pageType:n,appearanceConfig:{mainColumnWidth:i}={}}=t,o=n===In.ARTICLE||n===In.OTHER?"em":"rem";return Lo(e,(i||734)-64).map(({content:e,fontSize:t})=>`<span style="display: block; font-size: ${`${(t||16)/16}${o}`}">${e}</span>`).join("")},No=({containerId:e,url:t,adContent:n,logo:i,description:o,title:r,customTitle1:s,customTitle2:a},d,l)=>{const{desktopTitleSize:c,mobileTitleSize:u}=Ao(null==d?void 0:d.pageType,s,a),v=xo({title:r,options:d});return po({"--desktopTitleSize":`${c}`,"--mobileTitleSize":`${u}`},e),`<article class="advertory-vg-ad-native-content">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <span>${n}</span>\n <img alt="${r}" class="ad-logo" src="${i}" loading="lazy" />\n </div>\n <div class="ad-image-container">\n <div class="ad-player-wrapper">\n <div id="${null!=l?l:0}"></div>\n </div>\n </div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-text-container">\n <div class="ad-description">${o}</div>\n <h2 class="ad-title">\n ${v}\n </h2>\n </div>\n </a>\n </div>\n </div>\n </div>\n </article>`},jo=({containerId:e,adText:t,url:n,adFrom:i,sponsoredBy:o,title:r},s,a)=>`<article class="advertory-vg-ad-native-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <span>${t}</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-player-wrapper">\n <div id="${a}"></div>\n </div>\n </div>\n <a class="ad-link" href="${n}" target="_blank">\n <div class="ad-text-container">\n <span class="sponsored-by">\n ${i} ${o}\n </span>\n <span class="title">${r}</span>\n </div>\n </a>\n </div>\n </article>`,_o=({containerId:e,adText:t,url:n},i,o)=>{return`<article class="advertory-vg-ad-native-ukesmeny-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <span>${r=t,r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-player-wrapper">\n <div id="${o}"></div>\n </div>\n <a class="ad-link" href="${n}" target="_blank"></a>\n </div>\n </div>\n </article>`;var r},Do=["IntegrationMenu"],Ro={CONTENT:(e,t)=>{const{video:n}=e;return(null==n?void 0:n.content)?Io(No)(e,t):(({containerId:e,url:t,adContent:n,logo:i,imgAltText:o,img:r,description:s,title:a,customTitle1:d,customTitle2:l,imgWidth:c,imgHeight:u},v)=>{const{desktopTitleSize:p,mobileTitleSize:g}=Ao(null==v?void 0:v.pageType,d,l),h=c?`width="${c}"`:"",m=u?`height="${u}"`:"",f=xo({title:a,options:v});return po({"--desktopTitleSize":`${p}`,"--mobileTitleSize":`${g}`},e),`<article class="advertory-vg-ad-native-content">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-header">\n <span>${n}</span>\n <img alt="${a}" class="ad-logo" src="${i}" loading="lazy" />\n </div>\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${r}" loading="lazy" ${h} ${m} />\n </div>\n <div class="ad-text-container">\n <div class="ad-description">${s}</div>\n <h2 class="ad-title">\n ${f}\n </h2>\n </div>\n </div>\n </a>\n </article>`})(e,t)},INHOUSE:({containerId:e,url:t,title:n,img:i,logo:o,sponsoredBy:r,imgWidth:s,imgHeight:a})=>`<article class="advertory-vg-ad-native-inhouse flexible">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${i}" loading="lazy" ${s?`width="${s}"`:""} ${a?`height="${a}"`:""} />\n ${o&&`<img alt="${r}" class="ad-logo" src="${o}" loading="lazy" />`}\n </div>\n <div class="ad-text-container">\n <span class="sponsored-by">\n <span class="sponsor-name">${r}</span>${r?"- En tjeneste fra VG":""}\n </span>\n <span class="ad-title">${n}</span>\n </div>\n </div>\n </a>\n </article>`,SPONSORSTRIPE:({title:e,sponsoredBy:t,logo:n})=>`\n <article class="advertory-vg-ad-native-sponsorstripe">\n <div id="advertory-vg-sponsorstripe-info" class="ad-info">\n <button id="sponsorstripe-info-close-button" class="ad-info-close-button" aria-label="Lukk">\n \n <svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none">\n <path d="M0.992123 0.0487634C1.05718 -0.0162892 1.1627 -0.0162197 1.2278 0.0487634L5.14642 3.96738C5.21145 4.03235 5.31701 4.03226 5.3821 3.96738L9.30007 0.0494144C9.36515 -0.015673 9.47066 -0.015673 9.53574 0.0494144L10.4798 0.992774C10.5448 1.05783 10.5447 1.16336 10.4798 1.22845L6.56178 5.14642C6.4967 5.2115 6.49671 5.31701 6.56178 5.3821L10.4798 9.30007C10.5448 9.3651 10.5447 9.47064 10.4798 9.53574L9.53574 10.4798C9.47064 10.5447 9.3651 10.5448 9.30007 10.4798L5.3821 6.56178C5.31701 6.49671 5.2115 6.4967 5.14642 6.56178L1.22845 10.4798C1.16336 10.5447 1.05783 10.5448 0.992774 10.4798L0.0494145 9.53574C-0.0156729 9.47066 -0.0156729 9.36515 0.0494145 9.30007L3.96738 5.3821C4.03226 5.31701 4.03235 5.21145 3.96738 5.14642L0.0487635 1.2278C-0.0162198 1.1627 -0.0162892 1.05718 0.0487635 0.992123L0.992123 0.0487634Z" fill="#470000"/>\n </svg>\n </button>\n <p class="ad-info-description">\n Annonsøren som presenterer denne saken har betalt for profilering av logoen i artikler som omhandler ${e.split(" ")[0].toLowerCase()}. \n <a class="ad-info-link" href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232">\n Les mer\n </a>\n </p>\n </div>\n <div class="ad-wrapper">\n <button id="sponsorstripe-info-open-button" class="ad-info-open-button" aria-label="Sponset innhold - Klikk for detaljer">i</button>\n <span class="ad-title">${e}</span>\n <div class="ad-logo-wrapper">\n <img alt="${t}" class="ad-logo" src="${n}" />\n </div>\n </div>\n </article>`,UKESMENY_SPONSORSTRIPE:({containerId:e,sponsoredBy:t,url:n,logo:i,title:o,customTitle1:r,customTitle2:s},{appearanceConfig:a})=>{const{isDarkModeEnabled:d}=null!=a?a:{},l=r?`${r}px`:"clamp(10px, 2rem, 30px)",c=s?`${s}px`:"clamp(10px, 1.8rem, 30px)",u=((e=":export{}")=>{const[,t]=e.split(":export{"),n=t.slice(0,-1).split(";").map(e=>e.split(":"));return Object.fromEntries(n)})(),v=d?u["c-white-primary"]:u["c-brown-primary"];po({"--desktopTitleSize":`${l}`,"--mobileTitleSize":`${c}`,"--fontColor":`${v}`},e);const p=`${e}-description`;return`<article class="advertory-vg-ad-native-ukesmeny-sponsor-stripe">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <a class="ad-link" href="${n}" target="_blank">\n <span style="--desktopTitleSize: ${l}; --mobileTitleSize: ${c};" class="title">${o}</span>\n </a>\n <a class="ad-link" href="${n}" target="_blank"> \n <img alt="${t}" class="ad-logo" src="${i}" />\n </a>\n <div class="info-button-wrapper" onClick="${(e=>`\n const adDescription = window.document.getElementById('${e}');\n adDescription.classList.toggle('hide');\n `)(p)}"><div class="info-button"></div></div>\n </div>\n <div id="${p}" class="description hide"> <span>Annonsøren som presenterer ukemenyen har betalt for profilering av logoen på VG-forsiden og Godt.no, og annonsen mellom oppskriftene.</span> <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">Les mer</a></div>\n </div>\n </article>`},UKESMENY:({containerId:e,url:t,imgAltText:n,img:i})=>`<article class="advertory-vg-ad-native-ukesmeny">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header"><span>Annonse</span></div>\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${i}" />\n </div>\n </div>\n </a>\n </article>`,UKESMENY_VIDEO:(e,t)=>Io(_o)(e,t,{pluginsNames:Do,videoLoop:true}),DEFAULT:({containerId:e,url:t,adText:n,img:i,logo:o,adFrom:r,sponsoredBy:s,title:a,imgWidth:d,imgHeight:l})=>`<article class="advertory-vg-ad-native">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header"><span>${n}</span></div>\n <div class="ad-image-container">\n <img alt="${a}" class="ad-image" src="${i}" loading="lazy" ${d?`width="${d}"`:""} ${l?`height="${l}"`:""} />\n ${o&&`<img alt="${s}" class="ad-logo" src="${o}" loading="lazy" />`}\n </div>\n <div class="ad-text-container">\n <span class="sponsored-by">${r} ${s}</span>\n <span class="title">${a}</span>\n </div>\n </div>\n </a>\n</article>`,RECIRC:({containerId:e,url:t,title:n,img:i,adText:o,sponsoredBy:r,logo:s,description:a,imgWidth:d,imgHeight:l})=>`<article class="advertory-shared-ad-native-recirc">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${i}" loading="lazy" ${d?`width="${d}"`:""} ${l?`height="${l}"`:""} />\n <img alt="${r}" class="ad-logo" src="${s}" loading="lazy" />\n </div>\n <div class="ad-text-container">\n <span class="ad-sponsor">${o} ${r}</span>\n <h6 class="ad-title">${n}</h6>\n <span class="ad-description">${a}</span>\n </div>\n </div>\n </a>\n </article>`,PODME:({url:e,title:t,description:n,img:i,logo:o})=>`<article class="advertory-vg-ad-native-podme">\n <a class="ad-link" href="${e}" target="_blank">\n <div class="ad-content-wrapper">\n <div class="ad-content">\n <div class="ad-main-content">\n <div class="ad-text-container">\n <span class="ad-title">${t}</span>\n <span class="ad-description">${n}</span>\n </div>\n <div class="ad-small-image-container">\n <img alt="${t}" class="ad-small-image" src="${i}" loading="lazy" />\n </div>\n <div class="ad-logo">\n <img alt="Podme logo" src="${o}" loading="lazy" />\n </div>\n </div>\n </div>\n </div>\n </a>\n</article>`,PODME_SECTION:({url:e,title:t,description:n,img:i,logo:o})=>`<article class="advertory-vg-ad-native-podme-section">\n <a class="ad-link" href="${e}" target="_blank">\n <div class="ad-content-wrapper">\n <div class="ad-text-container">\n <span class="ad-title">\n ${t}\n </span>\n <span class="ad-description">\n ${n}\n </div>\n </div>\n <div class="ad-image-container">\n <img alt="podme-ad" class="ad-image" src="${i}" loading="lazy" />\n </div>\n <div class="ad-logo-container">\n <img alt="podme-logo" class="ad-logo" src="${o}" loading="lazy" />\n </div>\n </div>\n </a>\n</article>`,FISHFINGER:({img:e,title:t,sponsoredBy:n,logo:i,url:o})=>`<article class="advertory-vg-ad-native-fishfinger">\n <a class="ad-link" href="${o}" rel="noopener noreferrer" target="_blank">\n <div class="ad-content">\n <img class="ad-image" src="${e}" alt="${n}" />\n <span class="ad-title">${t}</span>\n <img class="ad-logo" src="${i}" alt="${n}" />\n </div>\n </a>\n </article>`,SHOPPING:({containerId:e,url:t,logo:n,imgAltText:i,img:o,description:r,title:s,imgWidth:a,imgHeight:d},l)=>`<article class="advertory-vg-ad-native-affiliate">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-header">\n <span>ANNONSE</span>\n ${n?`<img alt="${s}" class="ad-logo" src="${n}" loading="lazy" />`:""}\n </div>\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" loading="lazy" ${a?`width="${a}"`:""} ${d?`height="${d}"`:""} />\n </div>\n <div id="testxd" class="ad-text-container">\n ${r?`<div class="ad-description">${r}</div>`:""}\n <h2 id="scalable-text-container" class="ad-title">\n ${xo({title:s,options:l})}\n </h2>\n </div>\n </div>\n </a>\n </article>`,DEFAULT_VIDEO:(e,t)=>Io(jo)(e,t)},Mo={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(import("./styles-Dafbl73v.js").then(function(e){return e.s}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`),NATIVE_RECIRC:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(import("./styles-Dafbl73v.js").then(function(e){return e.a}),`<article class="advertory-no-ad-native-recirc">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`),NATIVE_SEAMLESS:({containerId:e,url:t,adText:n,img:i,cta:o,description:r,logo:s,sponsoredBy:a,title:d,customTitle2:l})=>(import("./styles-Dafbl73v.js").then(function(e){return e.b}),`<article class="advertory-no-ad-native-seamless">\n <div class="ad-info" id="${e}-button">\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div class="ad-brand">\n ${s&&`<img alt="${a}" class="ad-logo" src="${s}" loading="lazy" />`}\n <div class="ad-brand-text">\n <div class="sponsored-by">${a}</div>\n <div class="ad-annons">${n}</div>\n </div>\n </div>\n <h2 class="ad-headline">${d}</h2>\n </div>\n <div class="ad-image-container">\n <img alt="${d}" class="ad-image" src="${i}" loading="lazy">\n </div>\n <div class="ad-footer">\n <div class="ad-row">\n <div class="ad-text-wrapper">\n <div class="ad-domain">${l}</div>\n <div class="ad-description">${r}</div>\n </div>\n <div class="ad-action">${o}</div>\n </div>\n </div>\n </div>\n </a>\n </div>\n </article>`)},qo={displayTemplates:{content:Ro.CONTENT,content_internal:Ro.CONTENT,inhouse:Ro.INHOUSE,sponsorstripe:Ro.SPONSORSTRIPE,"ukesmeny-stripe":Ro.UKESMENY_SPONSORSTRIPE,ukesmeny:Ro.UKESMENY,sponsor:Ro.SPONSORSTRIPE,sponsortop:Ro.SPONSORSTRIPE,standard:Ro.STANDARD,recirc:Ro.RECIRC,podme:Ro.PODME,podme_section:Ro.PODME_SECTION,fishfinger:Ro.FISHFINGER,shopping:Ro.SHOPPING,native:Mo.NATIVE_TEMPLATE,native_recirc:Mo.NATIVE_RECIRC,seamless:Mo.NATIVE_SEAMLESS,default:Ro.DEFAULT},videoTemplates:{content:Ro.CONTENT,recirc:Ro.DEFAULT_VIDEO,default:Ro.DEFAULT_VIDEO,menu:Ro.UKESMENY_VIDEO}},Fo=(e,t)=>{e.style.position="fixed",e.style.transform=`translateY(${t}px)`},Bo=(e,t)=>{const n=document.querySelector(t),i=document.querySelector(`#${e}`);if(!i||!n)return;const o=i.parentElement,r=new IntersectionObserver(([e])=>((e,t,n)=>{const i=e?t.offsetHeight:0;Fo(n,i)})(e.isIntersecting,n,o)),s=new ResizeObserver(()=>((e,t)=>{Fo(t,e.offsetHeight)})(n,o));r.observe(n),s.observe(n)},Vo=e=>document.querySelector(e)||document.querySelector(`[class*="${e}"]`),Uo=(e,t)=>{if(!t||!c(e))return;const{toggleEnabled:n,headerSelector:i,containersSelectors:o}=t,{targetId:r}=e;if(!n)return;const s=document.querySelector(".advertory-takeover-wrapper"),a=[()=>i&&Bo(r,i),()=>o&&((e,t)=>{const n=document.querySelector(`#${e}`);if(!n)return;const[i,o]=t;if(!i)return;const r=()=>{const e=Vo(i),t=o?Vo(o):null,r=n.querySelector("article");if(!r||!e)return;const s=e.getBoundingClientRect().left,a=((e,t)=>{const n=e.getBoundingClientRect(),i=null==t?void 0:t.getBoundingClientRect();return i?i.right-n.left:n.width})(e,t);r.style.left=`${s}px`,r.style.width=`${a}px`};r(),new ResizeObserver(r).observe(document.body)})(r,o),()=>s&&((e,t)=>{const n=document.querySelector(`#${e}`);if(!n||!t)return;new IntersectionObserver(([e])=>{n.style.visibility=e.isIntersecting?"hidden":"visible"}).observe(t)})(r,s)];a.forEach(e=>e())},zo=e=>{e.style.removeProperty("min-height"),e.style.removeProperty("min-width")},Ho=((e,t)=>n=>lo(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e,i=document.querySelector(`#${n}`);if(!i)return;o(e)&&zo(i);const{pageType:r=In.FRONT,nativeTrackingConfig:s,appearanceConfig:a,deviceType:d}=null!=t?t:{},l={language:Oe.NO,publisher:St.VG,deviceType:d,pageType:r,nativeTrackingConfig:s,appearanceConfig:a,productTag:"partnerstudio"};wo(e,l,qo),Uo(e,null==t?void 0:t.sponsorstripe)},preparePageOptions:Tt,prepareTag:e=>{const{keywords:t,targetId:i,invCode:o}=e,{useAppTabletInvCode:r=!0}=M.get(),s=((e,t)=>{const{isMobileApp:n}=M.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(o,r),a=(e=>{const{keywords:t,dynamicSizeWidthCheck:i}=e,o=`${Ye()}-adformat`,r=t?t[o]:[];if(!r)return{};const s=(Array.isArray(r)?r:[r]).filter(e=>!(e in n)||window.innerWidth>=n[e]);return{[o]:i?s:r}})(e),d=(e=>{const t=`${Ye()}-targetid`;return e?{[t]:[e]}:{}})(i),l=It(),c=(e=>kt(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(o),u=((e,t)=>kt(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(o);return Object.assign(Object.assign({},e),{invCode:s,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),c),l),rendererOptions:u})},siteEvents:Ce},{publisherClassName:St.VG,fullWidthFormatClassName:"netboard"});export{ge as A,de as B,Oe as C,se as D,oe as E,ee as F,ae as G,Zn as H,pe as I,we as J,ne as K,Li as L,Ht as M,St as N,Ni as O,Oi as P,$i as Q,xi as R,e as S,yi as T,xt as U,Ho as V,so as W,wt as X,B as _,le as a,qi as b,M as c,Yt as d,o as e,w as f,an as g,ve as h,i,Fi as j,jn as k,Fn as l,qn as m,Pt as n,Ke as o,bt as p,ci as q,he as r,fe as s,I as t,xe as u,te as v,je as w,ke as x,ot as y,F as z};