@schibsted/advertory 2.71.17 → 2.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/aftenposten/es/index.css +1 -1
- package/core/aftenposten/es/index.d.ts +3 -1
- package/core/aftenposten/es/index.js +1 -1
- package/core/aftenposten/index.d.ts +3 -1
- package/core/aftenposten/index.js +1 -1
- package/core/aftenpostenv2/es/index.css +1 -1
- package/core/aftenpostenv2/es/index.d.ts +3 -1
- package/core/aftenpostenv2/es/index.js +1 -1
- package/core/aftonbladet/es/index.css +1 -1
- package/core/aftonbladet/es/index.d.ts +3 -1
- package/core/aftonbladet/es/index.js +1 -1
- package/core/aftonbladet/index.d.ts +3 -1
- package/core/aftonbladet/index.js +1 -1
- package/core/aftonbladetv2/es/index.css +1 -1
- package/core/aftonbladetv2/es/index.d.ts +3 -1
- package/core/aftonbladetv2/es/index.js +1 -1
- package/core/bt/es/index.css +1 -1
- package/core/bt/es/index.d.ts +3 -1
- package/core/bt/es/index.js +1 -1
- package/core/bt/index.d.ts +3 -1
- package/core/bt/index.js +1 -1
- package/core/btv2/es/index.css +1 -1
- package/core/btv2/es/index.d.ts +3 -1
- package/core/btv2/es/index.js +1 -1
- package/core/e24/es/index.css +1 -1
- package/core/e24/es/index.d.ts +3 -1
- package/core/e24/es/index.js +1 -1
- package/core/e24/index.d.ts +3 -1
- package/core/e24/index.js +1 -1
- package/core/fotbollskanalen/es/index.css +1 -1
- package/core/fotbollskanalen/es/index.d.ts +3 -1
- package/core/fotbollskanalen/es/index.js +1 -1
- package/core/fotbollskanalen/index.d.ts +3 -1
- package/core/fotbollskanalen/index.js +1 -1
- package/core/godare/index.d.ts +3 -1
- package/core/godare/index.js +1 -1
- package/core/godt/index.d.ts +3 -1
- package/core/godt/index.js +1 -1
- package/core/klart/index.d.ts +3 -1
- package/core/klart/index.js +1 -1
- package/core/koket/es/index.css +1 -1
- package/core/koket/es/index.d.ts +3 -1
- package/core/koket/es/index.js +1 -1
- package/core/koket/index.d.ts +3 -1
- package/core/koket/index.js +1 -1
- package/core/kompakt/index.d.ts +3 -1
- package/core/kompakt/index.js +1 -1
- package/core/minmote/index.d.ts +3 -1
- package/core/minmote/index.js +1 -1
- package/core/pent/index.d.ts +3 -1
- package/core/pent/index.js +1 -1
- package/core/sa/es/index.css +1 -1
- package/core/sa/es/index.d.ts +3 -1
- package/core/sa/es/index.js +1 -1
- package/core/sa/index.d.ts +3 -1
- package/core/sa/index.js +1 -1
- package/core/sav2/es/index.css +1 -1
- package/core/sav2/es/index.d.ts +3 -1
- package/core/sav2/es/index.js +1 -1
- package/core/svd/es/index.css +1 -1
- package/core/svd/es/index.d.ts +3 -1
- package/core/svd/es/index.js +1 -1
- package/core/svd/index.d.ts +3 -1
- package/core/svd/index.js +1 -1
- package/core/svdv2/es/index.css +1 -1
- package/core/svdv2/es/index.d.ts +3 -1
- package/core/svdv2/es/index.js +1 -1
- package/core/tek/index.d.ts +3 -1
- package/core/tek/index.js +1 -1
- package/core/tv4/es/index.d.ts +3 -1
- package/core/tv4/es/index.js +1 -1
- package/core/tv4/index.d.ts +3 -1
- package/core/tv4/index.js +1 -1
- package/core/tvnu/index.d.ts +3 -1
- package/core/tvnu/index.js +1 -1
- package/core/vg/es/index.css +1 -1
- package/core/vg/es/index.d.ts +3 -1
- package/core/vg/es/index.js +1 -1
- package/core/vg/index.d.ts +3 -1
- package/core/vg/index.js +1 -1
- package/core/vgv2/es/index.css +1 -1
- package/core/vgv2/es/index.d.ts +3 -1
- package/core/vgv2/es/index.js +1 -1
- package/features/ad-native/index.d.ts +2 -0
- package/features/ad-native/index.js +1 -1
- package/features/dr-edition/es/index.d.ts +2 -0
- package/features/dr-edition/index.d.ts +2 -0
- package/features/kilkaya/es/index.d.ts +2 -0
- package/features/kilkaya/index.d.ts +2 -0
- package/features/tracker/index.d.ts +4 -1
- package/features/tracker/index.js +1 -1
- package/package.json +1 -1
- package/sites/aftenposten/es/index.css +1 -1
- package/sites/aftenpostenv2/es/index.css +1 -1
- package/sites/aftonbladet/es/index.css +1 -1
- package/sites/aftonbladetv2/es/index.css +1 -1
- package/sites/bt/es/index.css +1 -1
- package/sites/btv2/es/index.css +1 -1
- package/sites/e24/es/index.css +1 -1
- package/sites/fotbollskanalen/es/index.css +1 -1
- package/sites/koket/es/index.css +1 -1
- package/sites/sa/es/index.css +1 -1
- package/sites/sav2/es/index.css +1 -1
- package/sites/svd/es/index.css +1 -1
- package/sites/svdv2/es/index.css +1 -1
- package/sites/vg/es/index.css +1 -1
- package/sites/vgv2/es/index.css +1 -1
- package/types/core/interface/ast.d.ts +1 -1
- package/types/core/interface/config.d.ts +2 -0
- package/types/features/ad-native/trackers/trackers.d.ts +1 -1
- package/types/features/ad-server-side/banner-object.d.ts +4 -0
- package/types/features/ad-server-side/banner-object.test.d.ts +1 -0
- package/types/features/ad-server-side/cogwheel.d.ts +3 -0
- package/types/features/ad-server-side/constants.d.ts +2 -0
- package/types/features/ad-server-side/index.d.ts +5 -0
- package/types/features/ad-server-side/keywords.d.ts +3 -0
- package/types/features/ad-server-side/keywords.test.d.ts +1 -0
- package/types/features/ad-server-side/native-request.d.ts +42 -0
- package/types/features/ad-server-side/native-request.test.d.ts +1 -0
- package/types/features/ad-server-side/server-side-xandr-renderer.d.ts +3 -0
- package/types/features/ad-server-side/server-side-xandr-service.d.ts +7 -0
- package/types/features/cogwheel/index.d.ts +1 -1
- package/types/features/interface/ad-native.d.ts +1 -0
- package/types/features/interface/ad-server-side.d.ts +48 -0
- package/types/features/tracker/index.d.ts +3 -2
package/core/klart/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{d(i.next(e))}catch(e){o(e)}}function s(e){try{d(i.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;const t=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},n=e=>new URLSearchParams(window.location.search).get(e),i="takeover",r="native_override_desc2",o=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return t("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let r=!1;const o=e=>{r||(t("Resolving advertising permission value obtained"),r=!0,n(e))},a=setTimeout(()=>{t("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{t("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const n=Number(e);t("Advertising permission value obtained asynchronously: ",e),o(Boolean(n))})}),a={NO:"no",SE:"se"},s="cmp:loaded";let d="undefined"!=typeof window?window._tcf_:void 0,l=!1;const c=(i,r,c)=>{const u=!!(null==i?void 0:i.enabled),v=(null==i?void 0:i.timeout)||3e3,p=n("bypass_tcf"),g=()=>{if(!(null==i?void 0:i.enabled))return!0;if(((e,n)=>e?!!n&&(t("TCF bypass param detected, returning consent: true"),!0):(t("TCF is not enabled, returning consent: true"),!0))(u,p))return!0;if(l)return null;if(!d)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=d.getConsentedToAllSync();return t(`TCF consented to all is: ${e}`),d.getConsentedToAllSync()};return{initConsentManager:()=>(null==i?void 0:i.enabled)?new Promise((e,n)=>{if(t("Getting TCF consent manager..."),window._tcf_)return t("TCF consent manager is already available"),d=window._tcf_,void e(d);t("TCF consent manager is not available");const i=()=>{t("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(d=window._tcf_,e(d)):n(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(s,i),l=!0,n(new Error("Timeout waiting for CMP to load"))},v);t("Listening for CMP loaded event..."),document.addEventListener(s,i,{once:!0})}):Promise.resolve(null),getConsentSync:g,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==i?void 0:i.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${i.schibstedAdChoicesOverrideValue}`),Boolean(Number(i.schibstedAdChoicesOverrideValue));const e=(null==i?void 0:i.schibstedAdChoicesEnabled)&&c===a.SE,n=(null==i?void 0:i.schibstedAdChoicesEnabled)&&c===a.NO;if(e||n)return t("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield o(i);if(!(null==i?void 0:i.enabled))return!0;const r=g();return null!==r?r:yield new Promise((e,n)=>{try{if(!d)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=t=>{n||(n=!0,e(t))},r=setTimeout(()=>{t("TCF isConsentedToAll timed out, resolving with false"),i(!1)},v);d.onTcfReady(()=>{t("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),d.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){n(e)}})})}},u=(n,i,r,...o)=>e(void 0,[n,i,r,...o],void 0,function*(e,n,i,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return t(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=c(e,0,i);return(yield o())?(t(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(t(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}),v=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g,h;var m=p(function(){if(h)return g;h=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,i){var a={};return i.isMergeableObject(e)&&r(e).forEach(function(t){a[t]=n(e[t],i)}),r(t).forEach(function(r){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(o(e,r)&&i.isMergeableObject(t[r])?a[r]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(r,i)(e[r],t[r],i):a[r]=n(t[r],i))}),a}function s(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(r);return s===Array.isArray(t)?s?o.arrayMerge(t,r,o):a(t,r,o):n(r,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},g=s}());const y=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],f={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},w=6;class b{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 y){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=m(b.DEFAULT_SITE_HANDLERS,e)}}b.DEFAULT_SITE_HANDLERS={siteEvents:f,initNativeAd:function(){}};const E=new b,k=E.modifyConfigProperties.bind(E),T={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},I=9826;class A{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=T.DESKTOP,isMobileApp:t}=E.get();if(t){return{"aa-sch-supply_type":`app_${e===T.MOBILE?"phone":T.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(t){return e(this,void 0,void 0,function*(){return Object.assign(Object.assign({},t),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},t.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(t.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return e(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(()=>{const e=v("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return e(this,void 0,void 0,function*(){return yield(t=>e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i}=t,{getConsentAsync:r}=c(e,0,i);if(!(yield r()))return;const o=v("_pulse2data");return o?o.split(",")[9]:void 0}))(E.get())})}isTrackingForbidden(){return e(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=I}=E.get();return"true"===n("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{publisher:e}=E.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=E.get(),{getConsentAsync:i}=c(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=E.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}=E.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 x=new A;x.prepare.bind(x);function S(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(),r=(()=>{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:r,mobileOS:["ios","android"].includes(r)?r:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}class C extends A{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=T.DESKTOP}=E.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(o=null===(r=window.screen)||void 0===r?void 0:r.height)&&void 0!==o?o:0};var n,i,r,o;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{isMobileApp:e}=E.get(),{appMode:t,mobileOS:n}=S(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=E.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const P=864e5,O=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return t("Error with parsing localStorage data"),null}},n=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:n,setWithTimestamp:(e,t,i=P)=>{const r={data:t,expirationTime:(new Date).getTime()+i};n(e,JSON.stringify(r))},getByTimestamp:(n,i=P)=>{const r=e(n);if(!r)return null;if(!i)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return t("Error with parsing localStorage data"),null}}}})(),L="glimrTags",j=["glwe_","glwet_"],$={geofenceTags:[],geoTags:[],weatherTags:[]},N=(...t)=>e(void 0,[...t],void 0,function*(e=E.get()){const{tcf:t,isMobileApp:n,country:i}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield u(t,n,i,"glimr")}const{getConsentAsync:r}=c(t,0,i);return yield r()}),_=()=>e(void 0,void 0,void 0,function*(){const{glimr:n}=E.get();if(!(yield N())||!(null==n?void 0:n.enabled))return void t("No consent for glimr data fetching.");const i=yield(r=500,e(void 0,void 0,void 0,function*(){return yield Promise.race([e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),r))])}));var r;if(i)try{i.setTagCacheTimeInSeconds(300),yield new Promise(e=>{i.getTags(n.clientId,(t,n)=>{O.setWithTimestamp(L,{tags:t,tagMappings:n}),e(!0)})})}catch(e){t(`Error during getting glimr data: ${e}`)}else t("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:i})}),D={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"},q=e=>j.some(t=>e.startsWith(t)),M=e=>e.startsWith("glgc_"),B=e=>!q(e)&&!M(e),R=e=>e===a.NO?"no-sno":"se-generic",F=()=>{const{country:e,publisher:t}=E.get();return`${e}-${t}`},V=(e,t)=>{const n=U();if(!n)return $;const i=((e=[])=>e.filter(q))(n),r=((e=[])=>e.filter(M))(n),o=((e=[],t,n)=>{const i=e.filter(B);if(n&&t){const{publisher:e}=t,n=D[e]||e;i.push(n)}return i})(n,e,t);return{geoTags:o,geofenceTags:r,weatherTags:i}},U=()=>{const e=O.getByTimestamp(L);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},z={get:(t,n)=>e(void 0,void 0,void 0,function*(){const e=yield fetch(t,n);if(!e.ok)throw new Error(e.statusText);return yield e.json()}),post:(t,n,i)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(i),r=yield fetch(t,{method:"POST",headers:n,body:e});if(!r.ok)throw new Error(r.statusText);return yield r.json()})},H="advertory:ppids-cache",W={[a.SE]:`SCH${a.SE.toUpperCase()}-EnvHash`,[a.NO]:`SCH${a.NO.toUpperCase()}-EnvHash`},K={[a.SE]:`SCH${a.SE.toUpperCase()}-UserHash`,[a.NO]:`SCH${a.NO.toUpperCase()}-UserHash`},G={[a.SE]:`sch${a.SE}-envhash-v3`,[a.NO]:`sch${a.NO}-envhash-v3`},J={[a.SE]:`sch${a.SE}-userhash-v3`,[a.NO]:`sch${a.NO}-userhash-v3`},Y={[a.SE]:`'sch${a.SE}-iosid-v3'`,[a.NO]:`'sch${a.NO}-iosid-v3'`},Q={[a.SE]:`sch${a.SE}-androidid-v3`,[a.NO]:`sch${a.NO}-androidid-v3`},X={[a.SE]:"sdrn:schibsted.com:user",[a.NO]:"sdrn:spid.no:user"};class Z{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 ee=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(t){return e(this,arguments,void 0,function*(e,t=1e4){var n,i;const r=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=r.xandr)||void 0===n?void 0:n.ppId1,null===(i=r.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},te=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(t,n){return e(this,void 0,void 0,function*(){var e,i,r,o,a,s,d,l,c,u,v;const p=O.get(H),g=yield this.getNewPPIDs(t,n);if(this.shouldHash(p,g)){const n=null!==(e=t.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(r=g.anId)||void 0===r?void 0:r.plain),void this.setPPIDs(null!==(o=c.userId)&&void 0!==o?o:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(s=g.idfv)||void 0===s?void 0:s.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,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",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 r in e){if((null===(n=e[r])||void 0===n?void 0:n.plain)!==(null===(i=t[r])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const r=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}}:{});O.set(H,r)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield z.post(i,e,n)}catch(e){return t("Error with hashing PPIDs",e),null}})}getNewPPIDs(t,n){return e(this,arguments,void 0,function*({clientId:t,instance:n},i){const r=yield((t,n)=>e(void 0,void 0,void 0,function*(){const e=yield t.getUserId();return e?`${X[n]}:${e}`:null}))(n,i),o=yield(t=>e(void 0,void 0,void 0,function*(){const e=yield t.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(n),a=window.advertory_idfv,s=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:t},userId:{plain:r},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),s?{anId:{plain:s}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:r}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:r.plain}}},ne=n=>e(void 0,void 0,void 0,function*(){const{tracker:e,tcf:i,country:r,isMobileApp:o}=n;if(!(yield u(i,o,r,"setXandrPPIDs")))return;if(!e)return;(yield Promise.allSettled([ee.processPPIDs(e,null==i?void 0:i.timeout),te.processPPIDs(e,r)])).forEach((e,n)=>{if("rejected"===e.status){t(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),ie=e=>{const{ppid1:t,ppid2:n}=ee.getPPIDs(),{ppid1:i,ppid2:r,idfv:o,anId:a}=te.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Z).add(n,W[e]).add(t,K[e]).add(r,G[e]).add(i,J[e]).add(o,Y[e]).add(a,Q[e]).buildEids()}]}},re=e=>{const{ppid1:t,ppid2:n}=ee.getPPIDs(),{ppid1:i,ppid2:r,idfv:o,anId:a}=te.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Z).add(n,W[e]).add(t,K[e]).add(r,G[e]).add(i,J[e]).add(o,Y[e]).add(a,Q[e]).buildRyEids()}}]}}};const oe=new class extends C{prepare(n){return e(this,void 0,void 0,function*(){const i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"aa-sch-country_code":a.SE},this.getPublisherKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),this.getScreenKeywords()),yield this.getAdvertisingConsentKeywords()),this.getAnalyticsConsentKeywords()),yield this.getExternalIdSrc()),this.getHasContextKeywords(n.keywords)),yield(r=E.get(),e(void 0,void 0,void 0,function*(){const{addPublisherToGeo:e}={},{glimr:n,country:i}=r,o=yield N(r);if(!(null==n?void 0:n.enabled)||!o)return t("No consent for getting glimr tags."),{};const a=R(i),s=V(r,Boolean(e));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}))),(()=>{const{ppid1:e,ppid2:t}=ee.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),n.keywords);var r;return Object.assign(Object.assign({},n),{keywords:i,user:Object.assign(Object.assign({},ie(a.SE)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ae=oe.prepare.bind(oe);const se={adRequested:()=>{},adAvailable:()=>{},adLoaded:e=>{(e=>{var t;const n=null===(t=document.getElementById(`${e.targetId}`))||void 0===t?void 0:t.parentElement;n&&e.width>=1260&&e.width<=1280&&n.classList.add("advertory-klart-l-format")})(e)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},de={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"},le={publisherClassName:de.KLART,fullWidthFormatClassName:"panorama",classesToRemoveOnRefresh:["advertory-klart-l-format"]};class ce{initialize(){this.DATA=Object.assign({},ce.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)}}ce.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const ue=new ce,ve=()=>(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),pe=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),ge=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},country:r}=E.get(),o=[`${R(r)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?o:[]],s=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:s}}},d)}},he=(t,...n)=>e(void 0,[t,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const r=document.createElement("script");r.async=!0,r.src=e;const o=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{r.removeEventListener("load",o),r.removeEventListener("error",a),clearTimeout(d)};r.addEventListener("load",o),r.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(r)}).catch(e=>{console.error(e)}))}),me="ABSOLUTE_FULLSCREEN",ye="ANY_FULLSCREEN",fe="VERTICAL_FULLWIDTH",we="FULLWIDTH",be="TAKEOVER",Ee="VELVET_TAKEOVER",ke="WALLPAPER",Te="COLLAPSE",Ie={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}]},Ae={wallpaper:1600,"l-format":1600},xe=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Fe(e,ye)},Se=e=>{const{native:t}=e;return!!t},Ce=e=>Fe(e,we),Pe=e=>{const{targetId:t}=e;return t.includes("takeover")||Fe(e,be)},Oe=e=>Fe(e,be),Le=e=>Fe(e,ke),je=e=>Fe(e,Te),$e=e=>e.targetId.includes("sponsorstripe"),Ne=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},_e=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),De=e=>e.targetId.startsWith("midboard"),qe=e=>e.targetId.includes("widescreen"),Me=e=>e.width>=1260&&e.width<=1280,Be=e=>e.width>=1600&&e.width<=1620,Re=e=>{var t,n;return"string"==typeof(null===(t=e.native)||void 0===t?void 0:t.desc2)&&(null===(n=e.native)||void 0===n?void 0:n.desc2.endsWith("_alcohol"))},Fe=(e,t)=>{const n=Ie[t];if(!n)return!1;return!!n.find(t=>{var n,i;const r=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,o=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===r,s=!t.height||t.height===o;return a&&s})},Ve="advertory-fullscreen-scroll",Ue="advertory-fullscreen-scroll-wrapper",ze="fullscreen-scroll-in-screen",He="in-screen",We=e=>e.includes("snoap.no"),Ke=e=>{var t,n,i,r,o;return!!(null===(o=null===(r=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===r?void 0:r.ads[1])||void 0===o?void 0:o.rtb)},Ge=(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()),r=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),o=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...o,r).toString()},Je=Ge([],()=>{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:r,clientHeight:o}=i,a=e/r,s=t/o;i.style.transform=`scale(${a},${s})`,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}),Ye=e=>{const t=Ge([],()=>{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},Qe=[],Xe={},Ze=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=tt(e);n?(et(i,n),nt(e,i,t)):(et(i,n),it(e,i,t))})},et=(e,t)=>{var n,i;const r=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;const o=t?"showFullscreen":"hideFullscreen";null===(i=r.contentWindow)||void 0===i||i.postMessage(`advertory:${o}-${e}`,"*")},tt=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},nt=(e,t,n)=>{e.classList.add(He),document.body.classList.add(ze),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Qe.includes(t)||Qe.push(t),n&&window.addEventListener("scroll",Xe[t],{passive:!0})},it=(e,t,n)=>{Qe.includes(t)&&(n&&window.removeEventListener("scroll",Xe[t]),document.body.classList.remove(ze),e.classList.remove(He),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},rt=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:r=3}=t,o=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&o.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{o.length&&ot(e,o,r,0),a.length&&ot(e,a,r,40)}},ot=(e,t,n,i)=>{const r=e.offsetHeight,o=window.scrollY,a=e.getBoundingClientRect().top+o;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>o?(a-o)/t-i:(o+t-(a+r))/t;const d=s<=0;e.style.visibility=d?"hidden":"",e.style.zIndex=d?"":n.toString(),e.style.pointerEvents=d?"none":"all",e.style.opacity=s.toString()})};function at(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}at('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const st={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 dt=null;const lt=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\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 ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${Je})()`,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(We(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=Ye(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>We(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)),We(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)),Ke(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},ct=()=>{dt=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,r=document.documentElement;r.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),r.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),r.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},ut=()=>{dt||(dt=window.requestAnimationFrame(ct))},vt=(e,t)=>{var n,i,r,o;const{country:a}=E.get(),{targetId:s}=e;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==t?void 0:t.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:r="16px 0",beforeContentValue:o=""}=e,a=t/2,s=document.createElement("style");s.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${i} calc(50% - ${a}px),\n ${i} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${r};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${o&&"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: '${o}' !important;\n }`,s.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(s)})(null!==(i=null==t?void 0:t.overlayStyles)&&void 0!==i?i:{});const d=document.getElementById(s),l=null==d?void 0:d.parentElement;if(!d||!l)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>Ze(e,n),{}),r=tt(e);i.observe(e),n&&(Xe[r]=rt(e,t))})(l,t),d.className=Ve;const c=Fe(e,me)?"absolute":"fixed";d.style.position=c,l.className=Ue,l.dataset.showTagSubscribeId=s,d.setAttribute("data-ad-label",st[a].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(d.dataset.moveCogwheelToTheLeft="true"),ut(),window.addEventListener("resize",ut),null===(r=window.visualViewport)||void 0===r||r.addEventListener("resize",ut),null===(o=window.visualViewport)||void 0===o||o.addEventListener("scroll",ut)},pt=({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=Ke(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=Ke(e)?1:0,r=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;r&&(r.banner.content=t)})(e,lt(t,e))},gt=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},ht="ad-loaded",mt=()=>null!==n("disable_prebid"),yt=()=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:n,country:i,isMobileApp:r,fullscreenScroll:o}=E.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:a}=E.getHandlers(),{getConsentAsync:s}=c(n,0,i),d=yield s(),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 r=ve(),{prebid:{relevantCbTimeout:o}={}}=E.get(),a="relevantCb"===i&&o?o:n[i].timeout,s=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,r.loadTags&&r.loadTags())},a);t.push(s)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),u=ve(),v=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=ve();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:p=""}={},keywords:g}=v;(()=>{const e=pe();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!u.loadTags)return t("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!u.loadTags,condition:"or"}),void l.cleanup();const n=pe();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const r=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};t("prebid consentManagement",r),n.addPrebidConfig(Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},re(i)),ge(g,p))),t("core add prebid config",Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},re(i)),ge(g,p))),n.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,u.loadTags(e)),l.cleanup()}},customNativeRender:e=>{ft(e,a)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const s=i(n),d=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(xe(d)?(vt(d,o),(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()})(s)):((e=>{if(!(null==e?void 0:e.classList.contains(Ve)))return;e.classList.remove(Ve),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(Ue))&&(t.classList.remove(Ue),t.classList.remove(He))})(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(ht),((e,t,n)=>{var i,r,o,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s),(null===(r=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===r?void 0:r.adResponse)||(null!==(o=(a=window.apntag).requests)&&void 0!==o||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),gt(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()})(l,c,null==r?void 0:r.creativeId))}}),t("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,u.loadTags(e))}},customNativeRender:e=>{ft(e,a)},directRenderFn:()=>{}})})}),ft=(e,t)=>{var n;const{divId:i,native:r,bid:o}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],s=`RY-${a.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)})(a,s);const d=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:r,targetId:s},E.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:o.adId}),"*")},wt="0123456789abcdefghijklmnopqrstuvwxyz",bt=()=>Promise.resolve(),Et=()=>{},kt=e=>{window.apntag.anq.push(e)},Tt=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),It=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})});let At="";const xt=new Map,St=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},Ct="advertory-wallpaper-background",Pt=()=>{const e=document.querySelector(`.${Ct}`);e&&e.remove()},Ot=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,Lt=e=>{if("0"===n("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const i=t.parentElement;i&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),i.style.setProperty("display","none","important"),e.includes("wallpaper")&&Pt())},jt=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"))},$t=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`)},Nt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=ue.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},_t=()=>{Pt();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Lt(e.id),Nt(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=St(e.id)}),kt(()=>window.apntag.clearRequest())},Dt="noGroupedPlacements",qt=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Mt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Bt=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:r}=E.get(),o=n[r].filter(Mt)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=o.reduce((e,t)=>{const n=qt(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=o.filter(({id:e})=>e.match(t)),s=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${r}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,d=a.querySelectorAll(s),l=Array.from(d).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const r=Rt(e,t,n),o=r.finnBlink&&!r.finnBlink.renderOnlyWithAdBlock,a=o&&(null===(i=r.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),s=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=wt[Math.floor(36*Math.random())];return t})(6)}`;return e.id=s,e.setAttribute("data-advertory-ad-rendered","true"),o&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&ue.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({},r),{id:s})});return(e=>{const{keywordsConfig:t}=E.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(At!==window.location.pathname&&(xt.clear(),At=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=xt.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${F()}-count`]=i,xt.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))})(s)},Rt=(e,t,n)=>{const i=n[t],r=n[n.length-1],o=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==r?void 0:r.id)?r:o||r},Ft=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=E.get(),i=(null==t?void 0:t[n])||{},r=Object.values(i).flat(),o=(e=>{const t={};return e.forEach(e=>{const n=St(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,r]of Object.entries(t))n[i]=e.filter(e=>r.includes(St(e.id)));return n})(e,i),s=Object.keys(o),d=((e,t)=>e.filter(e=>!t.has(St(e.id))))(e,new Set([...s,...r]));return Object.assign(Object.assign(Object.assign({},a),o),{[Dt]:d})},Vt=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:r}=window,[o,a]=t;if(!i.dataset.lockedsize&&a&&o)i.style.width=`${o}px`,i.style.height=`${a}px`,n&&(r.resizeAd(i.id,[o,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=o.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&r.resizeAd(i.id,[e,t])}},Ut=["netboard","board"];class zt{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:r}=e,o=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",r),o&&s.searchParams.append("urlData",o),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(n){return e(this,void 0,void 0,function*(){var e,i,r;const o=yield this.identityFacade.getIdentityUser(),a=null!==(r=yield null===(i=null===(e=this.tracker)||void 0===e?void 0:e.getEnvironmentId)||void 0===i?void 0:i.call(e))&&void 0!==r?r:"",s=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(n,{envId:a,spid:s});try{t("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},n=yield z.get(d,e);return t("Fetch operation completed successfully."),n}catch(e){t("Error during fetch operation:",e)}return null})}}let Ht=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:r,creativeId:o}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:r,utm_medium:s},o&&{utm_id:`df-${o}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),r=new URLSearchParams(decodeURIComponent(e.search)),o=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{r.has(e)||o.set(e,null!=t?t:"")}),o.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 r=this.getDrEditionUTMParams(e,t),o=new URL(i);return Object.entries(r).forEach(([e,t])=>{o.searchParams.has(e)||o.searchParams.set(e,null!=t?t:"")}),o.toString()}handleVideo(t,n){return e(this,void 0,void 0,function*(){const{id:e,autoplay:i,mute:r,videoLoop:o,vendor:a}=n.videoConfiguration;t.classList.add("vgtv-video-container"),Object.assign(t.dataset,{vgtvVideoId:e,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:r,vgtvLoop:!!o,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:r}=new URL(n);if(!i.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const o=r.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Wt=e=>{const n=e.parentElement;n?n.classList.remove("dr-edition-lock-height"):t("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Kt{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(n,i){return e(this,void 0,void 0,function*(){var e,r;const{drEditionConfig:{containerSelector:o},renderAsBackfill:a=!1}=i,s=n.querySelector(o);if(!s)return void t(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(i);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(t("No Dr. Edition ads available to render. Collapsing whole placement."),Lt(n.id),void Wt(s)):((null==d?void 0:d.itemId)&&a&&(t("Dr. Edition ad available to render as a Xandr backfill."),jt(n.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,i),yield null===(e=this.videoManager)||void 0===e?void 0:e.handle(d,i),Wt(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(n,d,i),null===(r=n.querySelector("a"))||void 0===r||r.addEventListener("pointerup",()=>null)):Wt(s))):(t("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(n),void Wt(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:"";jt(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let r=null;const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(r&&clearTimeout(r),r=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{o.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{o.observe(e)}),!0}}class Gt{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(t,n,i){return e(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:e}=c(i.tcf,i.isMobileApp,i.country),r=yield e(),o=i.device===T.MOBILE?n.mobileHTML:n.desktopHTML;const a=r?o:o.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");t.innerHTML=a,t.querySelectorAll("a").forEach(e=>{var t,r,o;e.search=null!==(o=null===(r=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===r?void 0:r.call(t,e,n,i))&&void 0!==o?o:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class Jt{constructor(e){this.strategy=e}handle(t,n){return e(this,void 0,void 0,function*(){const{videoConfiguration:{id:e,preview:i}={}}=t;(e||i)&&(yield this.importScript(n),yield this.createVideoElement(t,n))})}importScript(n){return e(this,void 0,void 0,function*(){const e=n.drEditionConfig.videoScriptUrl,i=document.querySelector(`script[src="${e}"]`);if(e&&!window.autoplayQueue&&!i)try{yield he(e)}catch(e){t("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(t,n){return e(this,void 0,void 0,function*(){const e=document.createElement("div"),{node:i}=t.videoConfiguration,r=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(t,n))return;this.strategy.handleVideo(e,t),null==r||r.appendChild(e),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const o=null==r?void 0:r.parentNode;if(!o)return;const a=o.closest("a");o.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,r;const{preview:{url:o,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!o)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",o),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(r=(i=t.drEditionConfig).addPreviewVideo)||void 0===r||r.call(i,s),!0))}}let Yt=class{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,r=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t,n,i){return e(this,void 0,void 0,function*(){var e,r,o,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(t,n,i,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(o=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===o||o.call(r,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(t,n,i){return e(this,void 0,void 0,function*(){var e,r,o,a,s,d;if(!this.pulse)return;const l=this.getEventInput(t,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(r=(e=this.pulse).trackLegacyClickUIElement)||void 0===r||r.call(e,l):this.pulse.trackClickUIElement?null===(a=(o=this.pulse).trackClickUIElement)||void 0===a||a.call(o,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class Qt extends Yt{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:r="",creativeId:o}={}}=t,{columnName:a,primaryPosition:s}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:a,primaryPosition:s},"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":o},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Xt=class extends Yt{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,r,o,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(o=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getPulseObjectId)||void 0===o?void 0:o.call(r))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var r,o,a,s;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"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(s=null!==(a=null===(o=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getUrlWithParams)||void 0===o?void 0:o.call(r,t,n))&&void 0!==a?a:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Zt={FRONT:"front"},en=t=>e(void 0,void 0,void 0,function*(){var e,n;return(null===(e=null===window||void 0===window?void 0:window.SVP)||void 0===e?void 0:e.Player)?new window.SVP.Player(t):((()=>{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(t):yield new Promise(e=>{window.addEventListener("onSvpPlayerReady",()=>e(new window.SVP.Player(t)))}))}),tn={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 e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Jr})})}})}};class nn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:r,mute:o,vendor:a}}){yield e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const s=["ContentMutePlugin"],d=this.createPlayerOverlay(t);var l,c;c=d,null==(l=s)||l.forEach(e=>{tn[e](c)});const u={id:n,node:i,autoplay:r,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield en(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.once("ready",()=>{const e=t;new MutationObserver(t=>{t.forEach(({type:t,attributeName:n})=>{"attributes"===t&&"class"===n&&(e.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),e.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(e,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Zt.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),r=i.split("/").filter(Boolean);return r.length?[...r.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 rn="https://www.aftonbladet.se/video-player-extras/latest/";class on{handleVideo(t,n){return e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:r,vendor:o}}){const a={id:t,node:n,autoplay:i,mute:r,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${rn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${rn}external-link.js`]:{name:"ExternalLink"}}};yield en(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const an=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class sn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:r,mute:o,vendor:a}}){const s={id:n,node:i,autoplay:r,mute:o,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},an(e)?e:{}),{provider:Object.assign(Object.assign({},an(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-${n}`]},requestSettings:{}}}},d=yield en(s);d.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield d.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===Zt.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let dn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ln=(e,t,n)=>{var i;const{publisher:r,pageType:o,country:s}=e,d={[de.VG]:new Ht,[de.E24]:new nn,[de.AFTONBLADET]:new on,[de.SVD]:new sn}[r]||new dn,l=new(s===a.SE?Qt:Xt)(n,d,o),c=new zt(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),u=new Gt(d,l),v=new Jt(d);return new Kt(c,u,v,l)},cn=()=>e(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 un{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 e(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 t("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return e(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 vn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,r=document.querySelectorAll(i),o=new IntersectionObserver((i,r)=>((e,t,n,i,r)=>{const o=ln(n,i,r);e.forEach(e=>{var i,r,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(i=s.dataset.editionName)&&void 0!==i?i:"",l=null!==(r=s.dataset.pulseColumnname)&&void 0!==r?r:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";o.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(i,r,e,t,n),{rootMargin:"400% 0px"});r.forEach(e=>o.observe(e))},pn=()=>e(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)}}),gn=[],hn=(n,i)=>e(void 0,void 0,void 0,function*(){var e;const{pulse:r,tcf:o,deviceType:a,drEdition:s,publisher:d,pageType:l,country:c,isMobileApp:v}=n;if(!(yield u(o,v,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:i,placements:r,drEdition:{fallbackGlobalEditionName:o}={}}=e,a=r[i]||r.desktop,s=St(t.targetId),d=a.find(e=>e.id===s),l=Ut.some(e=>s.startsWith(e)),c=gn.includes(s),u=(null===(n=null==d?void 0:d.drEdition)||void 0===n?void 0:n.editionName)||o;return d&&l&&!c&&u?(gn.push(s),Object.assign(Object.assign({},d),{drEdition:Object.assign(Object.assign({},d.drEdition),{editionName:u})})):null})(n,i);if(!p)return;if(!(null==r?void 0:r.instance))return void t("Pulse has not been passed as a prop, aborting");const g=yield cn(),h=new un(g),m=ln({publisher:d,pageType:l,country:c},h,null==r?void 0:r.instance),y=document.getElementById(i.targetId);if(!y||!s)return;y.classList.value="";const f=document.createElement("div");f.className=s.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=f.outerHTML;const w={editionName:(null===(e=null==p?void 0:p.drEdition)||void 0===e?void 0:e.editionName)||"",drEditionConfig:s,device:a,tcf:o,isMobileApp:v,country:c,renderAsBackfill:!0};yield m.fetchAndRenderAd(y,w)}),mn=(n,i)=>{var r,o,a,s;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void t("Ad block not enabled, Dr. Edition backfills will not be rendered");t("Ad block is enabled, Dr. Edition backfills will be rendered");const d=null!==(s=null===(a=null===(o=null===(r=n.finnBlink)||void 0===r?void 0:r.replacementConfig)||void 0===o?void 0:o.adsToReplace)||void 0===a?void 0:a.map(([e])=>e))&&void 0!==s?s:[],l=new IntersectionObserver((t,i)=>e(void 0,void 0,void 0,function*(){for(const e of t){if(!e.isIntersecting)continue;const t=e.target;i.unobserve(t),yield hn(n,{targetId:t.id})}}),{rootMargin:"400% 0px"});i.filter(e=>!d.some(t=>e.id.startsWith(t))).forEach(e=>{const t=document.getElementById(e.id);t&&l.observe(t)})},yn="collapseAd",fn="hideAd",wn="resizeAd",bn="renderDrEditionFallback",En="wallpaperImageUrl",kn="wallpaperColor",Tn="velvet",In=[wn,En,kn,yn,fn,bn,Tn];let An;const xn=e=>{if("object"==typeof e)return e;if(t=e,Ot.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:En,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:kn,wallpaperColor:t}}if(e.startsWith(bn)){const t=e.split(":")[1];return{name:bn,targetId:t}}if(e.startsWith(yn)||e.startsWith(fn)){const t=e.split(":")[1];return{name:yn,targetId:t}}if(e.includes("name")&&In.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Sn=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=xn(t);if(!n)return;if(!n.name||!In.some(e=>n.name===e))return;const{name:i,targetId:r,wallpaperImageUrl:o,wallpaperColor:a,cmd:s,size:d}=n;i===Tn&&s&&(s.includes("noScroll")&&(An=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(s.includes("close")||s.includes("ended"))&&(null==An||An(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==yn&&i!==fn||!r||Lt(r),i===wn&&r&&s&&Vt(r,s),i===bn&&r&&(Lt(r),hn(E.get(),{targetId:r})),"resizeMediationAd"===i&&r&&d&&Vt(r,d,!0),i===En&&o&&(e=>{const t=document.querySelector(`.${Ct}`);t&&(t.style.backgroundImage=`url(${e})`)})(o),i===kn&&a&&(e=>{const t=document.querySelector(`.${Ct}`);t&&(t.style.backgroundColor=e)})(a)},Cn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Pn=()=>{const{publisher:t,country:n,finnBlink:i}=E.get(),{loadFinnBlinkAd:r,wallpaperHandlers:{adjustAdToHorseshoe:o}}=E.getHandlers(),a=window.apntag,s={publisher:t,country:n,finnBlink:i},d=e=>{jt(e),kt(()=>a.showTag(e))};return{withXandrAd:d,withFinnBlinkAd:t=>e(void 0,void 0,void 0,function*(){yield r(t,s,null)}),withFullAdsChain:t=>e(void 0,void 0,void 0,function*(){yield r(t,s,d,()=>{ue.getData("horseshoe").isAvailable&&o(t)})})}},On=(e,n,i)=>{const r="true"===i.dataset.isFinnBlinkOnlyPlacement;return Ne(n)&&r?(t(`loading finn blink ad for blink only placement for ${n}`),void Pn().withFinnBlinkAd(n)):Ne(n)?(t(`loading finn blink ad with full ads chain for ${n}`),void Pn().withFullAdsChain(n)):void kt(()=>(t("core showTag",{id:n}),e.showTag(n)))},Ln=(n,i)=>e(void 0,void 0,void 0,function*(){yield Tt,yield It;const e=new IntersectionObserver((e,i)=>((e,n,i,r)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),s=document.getElementById(a);t("core log from intersection observer handler",{targetId:a,element:s}),i(window.apntag,a,r),s&&(n.unobserve(s),n.disconnect())})})(e,i,On,n),Cn(i));e.observe(n)}),jn=new Map,$n=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Nn=".brandstudio-premium-content-widget",_n=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Dn=({adWrapper:e,placementContainer:t})=>{const n=_n({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Nt(i=t),i.innerHTML=""},qn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Mn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=E.get(),i=$n.includes(n)&&Boolean(t.closest(Nn));const r=i?t.closest(Nn):null,o=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!r)return;if(a)return qn(e),void o.disconnect();const s=t.closest('[style*="height"]'),d=r;s&&d.contains(s)?qn(s):d.hasAttribute("style")&&qn(d),o.disconnect()})})});try{o.observe(t,{childList:!0,subtree:!0})}catch(e){o.disconnect()}},Bn=(e,t,n,i,r,o)=>{var a;const s=performance.now(),d=null!==(a=jn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,r)&&n<0;s-d>=r&&l&&(jn.set(t,s),((e,t,n)=>{const{country:i}=E.get(),r=null==n?void 0:n.parentElement;r&&n&&Dn({adWrapper:r,placementContainer:n}),kt(()=>{e.setKeywords([t],{[`${R(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,o))},Rn=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:r,boundingClientRect:o}=e;t(window.apntag,r.id,o.y,n,i,r)})})(e,Bn,t,n),Cn(300));i.observe(e)},Fn=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const r=e.slice(i,i+t);n.push(r)}return n},Vn=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Un=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},zn=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=E.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Jn(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Hn=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const r of i){const i=e.find(e=>{var t;return e.id===(null===(t=r.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),o=null==i?void 0:i.threshold;Un(r,o)&&i&&($t(i.id),n.length&&r.classList.remove(...n),Jn([i],t))}},Wn=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=E.get();t&&(e.forEach(({id:e})=>{const t=Kn(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Hn(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Hn(e,!1,t))};n.persisted&&(Vn()?window.addEventListener("scroll",i,{passive:!0}):Hn(e,!1,t))})})(e,n))},Kn=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Gn=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Kn(t)),r=(e=>1===e[0]&&1===e[1])(i),o={sizes:[i],allowedFormats:r?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return r||(o.native=void 0),o},Jn=(e,t=!1)=>{const{requestSize:n=w}=E.get(),i=e.map(({id:e})=>e),r=Fn(i,n);if(t)for(const t of e){const e=Gn(t);window.apntag.modifyTag(t.id,e)}for(const e of r)kt(()=>window.apntag.refresh(e))};const Yn="#fff",Qn="#0098da",Xn="splash",Zn="welcomePage",ei="topscroller",ti="velvet",ni="takeover-displayed",ii="takeover-visit-count",ri=14400,oi=()=>{const e=v(ii);return e?parseInt(e):0},ai=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=E.get();return"0"!==n(i)&&("1"===n(i)||!(!e||(()=>{var e;const t=(null===(e=E.get().takeover)||void 0===e?void 0:e.cookieCapName)||ni;return"true"===v(t)})())&&(!t||si()))},si=()=>{const e=oi();return 0===e?((()=>{const e=oi(),{takeover:{cookieCapTime:t=ri}={}}=E.get(),n=document.location.hostname;window.document.cookie=`${ii}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`})(),!1):1===e},di=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),li=()=>{const{takeover:e}=E.get();return Boolean(null==e?void 0:e.topscroller)},ci=()=>e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=ni,cookieCapTime:n=ri}={},isMobileApp:i,tcf:r,country:o}=E.get(),a=yield u(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),ui=e=>{var t;const n=!!(null===(t=E.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return Pe(e)&&n},vi=(e,t)=>{var n;if(t===ei){const{topscroller:t}=e;return null!=t?t:{}}if(t===Xn){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},pi=(e,t)=>{t!==Xn?(e=>{var t,n,i;const r=null===(n=null===(t=E.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,o=null===(i=E.get().takeover)||void 0===i?void 0:i.topscroller;if(!r||o)return;const a=document.querySelector(r),s=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),l=document.querySelector(".advertory-welcome-page-scroll");if(!(a&&s&&l&&d))return;const c=null==a?void 0:a.offsetHeight,u=Oe(e)?"60svh":`calc(100svh - ${c}px)`,v=Oe(e)?"calc(40svh + 30px)":`calc(${c}px + 30px)`;s.style.setProperty("height",u,"important"),d.style.setProperty("height",u,"important"),l.style.setProperty("bottom",v,"important")})(e):(e=>{var t;if(!(null===(t=E.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 r=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",r,"important")})(e)},gi=Ge([],()=>{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})}),hi=(e,t=!0)=>{(e===Zn||e===ei)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},mi=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},yi=e=>{document.body.style.overflow=e?"initial":"hidden"},fi=e=>{const t=bi(e),n=wi(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),yi(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},wi=e=>{const t=()=>fi(e);return window.addEventListener("advertory:closeTakeover",t),mi(),t},bi=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&fi(e)};return mi(),window.addEventListener("keydown",t),t},Ei=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(bi(e),wi(e),mi(),t.addEventListener("click",()=>{fi(e)}),yi(!1))},ki=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),wi(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Ti=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>fi(e))})(e)},Ii=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=E.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=st.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ai=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=st.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},xi=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=st.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Si=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=st.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ci=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Pi=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${gi})()`,e+t.outerHTML})(e)),n},Oi=e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=Ke(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=Ke(e)?1:0,r=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;r&&(r.banner.content=t)})(e,Pi(t))},Li=t=>e(void 0,void 0,void 0,function*(){const{takeover:e}=E.get(),{targetId:n}=t,i=document.querySelector(`#${n}`),r=document.querySelector(".advertory-takeover-wrapper");if(!i||!r||!e)return;const o=(e=>{const{width:t,height:n}=e;return di(t,n)?Xn:Fe(e,Ee)?ti:li()?ei:Zn})(t),a=r.offsetHeight,s=window.scrollY>a;r.style.display="block",!s&&hi(o,!1),((e,t)=>{({[Zn]:xi,[Xn]:Ii,[ei]:Ai,[ti]:Si})[t](e)})(r,o),Ci(),((e,t)=>{({[Zn]:ki,[ei]:ki,[Xn]:Ei,[ti]:Ti})[t](e)})(r,o),((e,t,n)=>{if(!n)return;({[Zn]:()=>{const{buttonLabel:i}=vi(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Xn]:()=>{const{themeColors:i,logotype:r,buttonLabel:o,showArrowIcon:a}=vi(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=o?o:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&r&&(n.setAttribute("src",r.url),n.setAttribute("alt",r.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Yn,"important"),n.style.color=null!=t?t:Qn}}})},[ei]:()=>{const{buttonLabel:i,showArrowIcon:r,showCloseButton:o=!0}=vi(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[ti]:()=>{}})[t]()})(r,o,e),yield ci(),!s&&hi(o,!0),pi(t,o)});at(".advertory-brandmetrics-survey{width:100%}");const ji="advertory-brandmetrics-survey",$i=()=>e(void 0,void 0,void 0,function*(){const{norstat:{enabled:t}={},country:n,isMobileApp:i,tcf:r}=E.get(),o=yield u(r,i,n,"norstat");if(!t||i||!o)return;const s=(e=>{const{ppid1:t,ppid2:n}=ee.getPPIDs(),{ppid1:i,ppid2:r}=te.getPPIDs(),o=(new Z).add(n,W[e]).add(t,K[e]).add(r,G[e]).add(i,J[e]);return`${o.buildNorstatPath()}?${o.buildNorstatQuery("alias").toString()}`})(n);((t,n,...i)=>{e(void 0,[t,n,...i],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${n===a.NO?"schibsted":"schibstedse"}/map/${s}`,"norstat")}),Ni={nativeAd:e=>Se(e)&&!$e(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Ce,fullscreenScroll:xe,topscroller:e=>Pe(e)&&li(),splash:e=>Pe(e)&&di(e.width,e.height),welcomePage:Pe,wallpaper:Le,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Me,hFormat:Be,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Be(e)&&!Me(e),topboard:e=>e.targetId.startsWith("topboard")&&!Pe(e),widescreen:qe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:$e,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!_e(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!De(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:_e,midboard:De},_i=({adObj:e,preferredTestIdData:t})=>{var n,i;const r=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!r)return;const o=null===(i=document.querySelector(`#${r}`))||void 0===i?void 0:i.parentElement;if(!o)return;if(((e,t)=>{var n,i,r,o;const a=null===(o=null===(r=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===r?void 0:r[e])||void 0===o?void 0:o.invCode;a&&(t.dataset.invCode=a)})(r,o),null==t?void 0:t.testId)return void(o.dataset.testid=t.testId);const a="DIV"===(null==o?void 0:o.tagName);e&&a&&((e,t)=>{var n,i;for(const[r,o]of Object.entries(Ni))if(o(e)){if("nativeAd"===r){const o="default";t.dataset.testid=`${r}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:o}`;break}t.dataset.testid=r;break}})(e,o)},Di=e=>{var t;return(null===(t=Object.entries(Ni).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},qi=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Mi=new Map;Mi.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Mi.set("panorama",{scale:.79,transformOrigin:"center center"}),Mi.set("outstream",{scale:.79,transformOrigin:"center center"}),Mi.set("integration",{scale:.79,transformOrigin:"center center"}),Mi.set("toppanorama",{scale:.8,transformOrigin:"left center"});const Bi=e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=Di(e),r=Mi.get(i),o=document.querySelector(`#${e.targetId}`);if(!o||!r)return;if(o.style.transformOrigin=r.transformOrigin,o.style.transform=`scale(${r.scale})`,!(null==r?void 0:r.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),s=null==o?void 0:o.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},Ri=e=>{var t,n,i,r,o,a;const{adScaleConfig:s,deviceType:d}=E.get();if(!(null==s?void 0:s.enabled))return;if(Fe(e,ye))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=qt(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),p=null!==(r=null==v?void 0:v.offsetWidth)&&void 0!==r?r:window.screen.width,g=null!==(a=null===(o=null==v?void 0:v.parentElement)||void 0===o?void 0:o.offsetWidth)&&void 0!==a?a:window.screen.width;((e,t=window.screen.width)=>{const n=qi(e,t),i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${n})`,i.style.transformOrigin="left top")})(e,(p<g?p:g)-u)},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,Vi=e=>`externalImpId:'${e}'`,Ui=e=>{var n;const{forwardExternalImpId:i=!1,tracker:r}=E.get(),o=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${F()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const r=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:r})})(e),{id:a,sizes:s,keywords:d,allowedFormats:l,invCode:c,ssa:u=!1,nativeCustomProperties:v,safeframeConfig:p,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ai())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!==ei),r=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),o=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:o,keywords:r})})(o),h=Object.assign({invCode:c,sizes:s,targetId:a,keywords:Fi(d,u),allowedFormats:l,dynamicSizeWidthCheck:g},p&&{safeframeConfig:p}),m=(e=>{var n,i,r,o,a,s,d;return e?(null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)?(null===(r=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===r?void 0:r.pageViewId)?(t("Tracker state pageViewId is:",null===(a=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===a?void 0:a.pageViewId),null===(d=null===(s=null==e?void 0:e.instance)||void 0===s?void 0:s.state)||void 0===d?void 0:d.pageViewId):(t("Tracker state does not contain field pageViewId or it is empty"),""):(t("Tracker state is empty"),""):(t("Tracker is not configured in initAdvertory function"),"")})(r);i&&m&&(t("External Impression ID assigned to defineTag:",Vi(m)),h.externalImpId=Vi(m));const y=(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},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{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}}))(v);return(null===(n=e.allowedFormats)||void 0===n?void 0:n.includes("native"))&&(h.native=y),h},zi=e=>!e.includes("takeover")||ai(),Hi=e=>{const{source:t}=e;return"csm"===t},Wi="native-ad",Ki=e=>{if(!e)return e;const{country:t}=E.get(),n=R(t),i=e[`${n}-targetid`],r=i?St(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[r]})},Gi=e=>{const{country:t}=E.get(),n=R(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Ji=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],r=e.find(e=>e.invCode===i),o=document.querySelector(`[id^=${null==r?void 0:r.id}]`);o&&o.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"})})()},Yi=(t,n)=>e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{t().then(t=>{e(null!=t?t:null)}).catch(t=>{e(null)})})}),Qi={arrayMerge:(e,t)=>t},Xi=n=>e(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))})(n))return n;try{const i=yield(n=>e(void 0,void 0,void 0,function*(){const e=(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})(n);if(!e)return null;const i=new AbortController,r=setTimeout(()=>i.abort(),5e3);try{return yield z.get(e,{method:"GET",signal:i.signal})}catch(n){throw t("Failed to fetch S3 config",{error:n,url:e}),n}finally{clearTimeout(r)}}))(n);return i?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:r,placements:o,threshold:a,batchSize:s}=t,d=m.all([e.placements,o],Qi),l=m(e.pageOptions,{keywords:i},Qi),c=m(e.appearanceConfig,{defaultThreshold:a},Qi),u=m(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:r},Qi);return Object.assign(Object.assign({},e),{placements:d,requestSize:null!=s?s:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:u})})({siteConfig:n,configOverrides:i}):n}catch(e){return t("Error fetching S3 config, using site config",{error:e}),n}}),Zi=".advertory-right-column-track",er="--advertory-right-column-track-height",tr=e=>e.getBoundingClientRect().top+window.scrollY,nr=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},ir=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},rr=(e,t)=>`${e}-${t}`,or=(e,t,n)=>{var i;const r=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),o=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===o.length)return;const a=tr(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=nr(e);ir("--advertory-newsroom-header-height",t)})(),o.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=tr(e),r=rr(er,t),o=i-n,a=rr("--advertory-right-column-split-point-height",t),s=nr(e);ir(r,o),ir(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=rr("--advertory-right-column-ad-height",t),i=nr(e);ir(n,i)})(r[t])});((e,t)=>{const n=tr(e);ir(er,n-t)})(o[Math.min(r.length,o.length-1)].point,a)};let ar=!1;class sr{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:r}=new URL(n);if(!i.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const o=r.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class dr{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class lr{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t){return e(this,void 0,void 0,function*(){var e,n,i,r,o,a,s,d,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(e=this.parseKilkayaData(t))||void 0===e?void 0:e.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(t,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(l=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===l||l.call(d,u)})}trackContentClick(t){return e(this,void 0,void 0,function*(){var e,n,i,r,o,a;if(!this.pulse)return;const s=this.getEventInput(t,"click");this.pulse.trackLegacyClickUIElement?null===(n=(e=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(e,s):this.pulse.trackClickUIElement?null===(r=(i=this.pulse).trackClickUIElement)||void 0===r||r.call(i,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class cr extends lr{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,r,o,a;const{clientName:s,creativeId:d,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),v=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(r=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==r?r:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=d?d:l},page:{"@id":null!=v?v:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const ur="[data-k5a-teaser-analytics]",vr=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const r=new cr(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(ur);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(r.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ur);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(r.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{s.observe(e),e.addEventListener("click",()=>r.trackContentClick(e))})};class pr{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[de.VG]:new sr}[n]||new dr;vr(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var n;const i=null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.streamSlot;if(!i)return;const r=i.parentElement;r&&(t(`Kilkaya placement ${i.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r))})}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:"";jt(i)}loadKilkayaScript(t){return e(this,void 0,void 0,function*(){yield he(t)})}run(t){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i,kilkaya:r}=t;if(!(null==r?void 0:r.enabled))return;const o=yield u(e,n,i,"kilkaya");o&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(o),yield this.loadKilkayaScript(r.url),this.handleKilkayaStreamTracking(t))})}}const gr=1e4,hr=e=>e.some(e=>e.some(e=>!!e&&Un(e,0)));let mr;const yr=()=>{const{widescreenSwitching:e}=E.get(),{enabled:t,rotationInterval:n=gr,widescreenIdPrefix:i}=null!=e?e:{};if(!t)return;const r=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=E.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let o=0,a=Date.now(),s=hr(r);if(!r.length)return;mr&&window.removeEventListener("scroll",mr);const d=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(r);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=hr(r)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(o),t=r.map(e=>e[o]),n=r.map(t=>t[e]);d(t,"opacity","0"),setTimeout(()=>{d(t,"display","none"),d(n,"opacity","0"),d(n,"display","block"),setTimeout(()=>{d(n,"opacity","1")},450)},450)})(),o=l(o),a=Date.now())},1e3);mr=c,window.addEventListener("scroll",c)};at('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const fr=e=>document.querySelector(`#${e}`);let wr,br=[];const Er=["takeover","wallpaper"],kr=e=>{const t=(e=>{const t=ue.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:r,glimr:o,appearanceConfig:a,requestSize:s=w,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:r,requestSize:s,isMobileApp:v,useAppTabletInvCode:m},o&&{glimr:o}),n&&{queryConfig:n}),a&&{appearanceConfig:a}),g&&{takeover:g}),h&&{fullscreenScroll:h})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Tr=()=>e(void 0,void 0,void 0,function*(){const{pageOptions:t}=E.get(),{preparePageOptions:n}=E.getHandlers(),i=(()=>{const{sandboxAdIframeEnabled:e=!0}=E.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"]}})(),r=yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=E.get();return(yield u(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},t),{renderingManagement:Object.assign({},i)}),r));(e=>{const t=ue.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Gi(e);ue.setData("alertoryConfigKeywords",n)})(o.keywords),kt(()=>wr.setPageOpts(o))}),Ir=n=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:i,isMobileApp:r,country:o}=E.get(),a=yield u(i,r,o,"loadPlacements"),s=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>Lt(e.id)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(n,a);Ar(s);(null==e?void 0:e.enabled)&&a&&!mt()?(t("core loadPlacements prebid enabled"),yield yt()):(t("core load tags invoked without prebid enabled"),xr(s))}),Ar=e=>{const{prepareTag:n}=E.getHandlers(),i=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),r=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===r?-1:-1===i&&-1!==r?1:i-r})})(e).forEach(e=>{t("core defineTags",{placement:e});const r=Ui(e);if(zi(e.id)){const o=n(r),a=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:r}=e;return{adTypes:t,invCode:n,keywords:Ki(i),sizes:r}})(o);i.push(a),kt(()=>(t("core defineTag - add to the queue",{placement:e,preparedTag:o}),wr.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)})(i)},xr=e=>{const n=e.filter(({id:e})=>zi(e)).map(({id:e})=>e);n.length&&kt(()=>(t("core loadTags",{placementsIdsToLoad:n}),wr.loadTags([...n])))},Sr=(n,i)=>e(void 0,void 0,void 0,function*(){const{appearanceConfig:e,deviceType:r}=E.get(),{threshold:o,refresh:a}=n,s=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(i),d=null==e?void 0:e.defaultThreshold[r];s&&(t("core showAd - subscribe for show tag with thresholds",{placement:n,adObj:i,threshold:o,deviceDefaultThreshold:d}),yield Ln(s,null!=o?o:d)),s&&a&&(t("core showAd - setup refreshing",{placement:n,adObj:i}),s.dataset.refresh=a.toString())}),Cr=e=>e.some(({id:e})=>Er.some(t=>e.includes(t))),Pr=n=>e(void 0,void 0,void 0,function*(){var i;if(!(null===(i=null===window||void 0===window?void 0:window.advertory)||void 0===i?void 0:i.initialized))return;const[r,o]=(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]]},[[],[]]))(n),a=(e=>{const{requestSize:t=w,queryConfig:{placementBatches:n}={},deviceType:i}=E.get(),r=Ft(e),o=Object.keys((null==n?void 0:n[i])||{}).map(e=>r[e]||[]).filter(e=>e.length>0),a=new Set(o.flat().map(({id:e})=>e)),s=e.filter(({id:e})=>!a.has(e));return[...o,...Fn(s,t)]})(o);for(const e of a)Cr(e)?(t("core loadAds without lazy loading",{placementsToLoad:e}),yield Ir(e)):e.length&&(t("core loadAds with lazy loading",{placementsToLoad:e}),yield Or(e));yield(t=>e(void 0,void 0,void 0,function*(){if(!t.length)return;const{appearanceConfig:e,deviceType:n}=E.get(),i=null==e?void 0:e.defaultThreshold[n];for(const e of t){const{threshold:t,id:n}=e,r=fr(n);r&&(yield Ln(r,null!=t?t:i))}}))(r)}),Or=n=>e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:e=!1,rootMargin:i="200% 0px"}={}}={}}=E.get(),r=[];if(!e)return t("lazy load is not enabled",{placements:n}),void(yield Ir(n));const o=new IntersectionObserver((e,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{t("lazy load is enabled - handler start",{loadedPlacementIds:r,placements:n});const o=n.every(e=>r.includes(e.id)),a=n.map(e=>e.id);!o&&r.push(...a),!o&&Ir(n),t("lazy load is enabled - handler stop",{loadedPlacementIds:r,placements:n,arePlacementsLoaded:o,placementIds:a}),i.disconnect()})},{rootMargin:i});n.forEach(e=>{const n=document.getElementById(e.id);n&&(t("lazy loading - observe element",{placementId:e.id,element:n}),o.observe(n))})}),Lr=()=>e(void 0,void 0,void 0,function*(){const{siteEvents:n,initNativeAd:i,wallpaperHandlers:{initWallpaperAd:r,adjustAdToHorseshoe:o}}=E.getHandlers(),{wallpaper:a,fullscreenScroll:s}=E.get(),d=[];kt(()=>{wr.onEvent("adRequested",()=>{n.adRequested()}),wr.onEvent("adAvailable",o=>e(void 0,void 0,void 0,function*(){var e,d,l,c,u,v;t("core adAvailable start",{placementsAvailable:br,adObj:o,isFullscreenScrollAd:xe(o),isFinnBlink:Ne(o.targetId),isNativeAd:Se(o),isMediation:Hi(o),isTakeoverAd:Pe(o),isCollapseAd:je(o),isWallpaperAd:Le(o)});const p=null===(l=null===(d=null===(e=null===window||void 0===window?void 0:window.apntag)||void 0===e?void 0:e.requests)||void 0===d?void 0:d.tags[o.targetId])||void 0===l?void 0:l.adResponse.ads;Hi(o)&&p&&(null===(c=p[1])||void 0===c?void 0:c.rtb)&&(o.banner=null===(v=null===(u=p[1])||void 0===u?void 0:u.rtb)||void 0===v?void 0:v.banner),xe(o)&&pt(o),qe(o)&&yr(),xe(o)&&!Ne(o.targetId)&&vt(o,s),!Se(o)||Hi(o)||Ne(o.targetId)||i(o,E.get()),Pe(o)&&!je(o)&&(Oi(o.targetId),yield Li(o)),Le(o)&&(r(()=>kt(()=>window.apntag.showTag(o.targetId)),a),ue.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&ue.setData("horseshoe",{isAvailable:!0}),_i({adObj:o}),(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:r}=e;r?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),n.adAvailable(o);const g=br.find(({id:e})=>e===o.targetId);g&&(yield Sr(g,o),br=br.filter(e=>e.id!==g.id)),t("core adAvailable stop",{placementsAvailable:br,adObj:o,isFullscreenScrollAd:xe(o),isFinnBlink:Ne(o.targetId),isNativeAd:Se(o),isMediation:Hi(o),isTakeoverAd:Pe(o),isCollapseAd:je(o),isWallpaperAd:Le(o)})})),wr.onEvent("adLoaded",e=>{const{refreshConfig:t,appearanceConfig:r}=E.get(),a=document.getElementById(e.targetId);Ne(e.targetId)&&(e=>{const{fullscreenScroll:t}=E.get(),{initNativeAd:n}=E.getHandlers();xe(e)&&vt(e,t),Se(e)&&n(e,E.get())})(e);d.includes(e.targetId)&&Se(e)&&(i(e,E.get()),_i({adObj:e})),!d.includes(e.targetId)&&Hi(e)&&d.push(e.targetId),je(e)&&Lt(e.targetId),Pe(e)&&((e,t)=>{var n;const i="100%",r="100%";e.resizeAd(t,[i,r]);const o=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(o),t=e.width,n=e.height;t===i&&n===r||(o.style.width=i,o.style.height=r)}}).observe(o,{attributes:!0,attributeFilter:["style"]})})(wr,e.targetId),Ce(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=E.get();if(!t||!n||!i)return;const r=t.parentElement;r&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),r.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(e),(e=>Fe(e,fe))(e)&&(e=>{var t;const n=document.querySelector(`#${e.targetId}`),i=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,r=null==n?void 0:n.querySelector("iframe"),o=null==r?void 0:r.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:s}={}}=E.get();if(!(n&&r&&o&&i))return;i.classList.add(`advertory-${a}-${s}__vertical-full-width-ad-wrapper`);const d=window.innerWidth,l=Math.round(d/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${s}__vertical-full-width-ad`);const c=qi(e,n.offsetWidth);o.style.transform=`scale(${c})`,o.style.transformOrigin="left top"})(e),((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),r=null==i?void 0:i.parentElement;if(!r||!i)return;Mn({adWrapper:r,placementContainer:i});const{delayTime:o=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Rn(i,a,o))})(e,t),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(e.targetId);ue.getData("horseshoe").isAvailable&&o(e.targetId),Ri(e),n.adLoaded(e),gt(e.targetId),a&&(a.classList.add(ht),(e=>{var t,n;const{siteSpecificConfig:i}=E.get(),r=null!==(t=null==i?void 0:i.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(a)),Bi(e),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:e.targetId,adFormat:Di(e)}}))}),wr.onEvent("adNoBid",t=>e(void 0,void 0,void 0,function*(){Lt(t.targetId),yield hn(E.get(),t),ui(t)&&(yield ci()),n.adNoBid(t)})),wr.onEvent("adError",(t,i)=>e(void 0,void 0,void 0,function*(){ui(i)&&(yield ci()),n.adError(t,i)})),wr.onEvent("adCollapse",()=>{n.adCollapse()}),wr.onEvent("adRequestFailure",t=>e(void 0,void 0,void 0,function*(){Lt(t.targetId),yield hn(E.get(),t),n.adRequestFailure(t)})),wr.onEvent("adBadRequest",t=>e(void 0,void 0,void 0,function*(){Lt(t.targetId),yield hn(E.get(),t),n.adBadRequest(t)})),wr.onEvent("adLoadedMediated",e=>n.adLoadedMediated(e)),wr.onEvent("adNoBidMediated",t=>e(void 0,void 0,void 0,function*(){yield hn(E.get(),t),n.adNoBidMediated(t)}))})}),jr=(n,i)=>e(void 0,void 0,void 0,function*(){var r;E.set(n),E.setHandlers(i),ue.initialize(),window.addEventListener("message",Sn,!1),wr=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=wr,t("Apn tag is set up on window"),yield Promise.allSettled([e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=E.get();(yield u(e,t,n,"xandr-endpoint"))||wr.setEndpoint("ib.adnxs-simple.com",!0)}),e(void 0,void 0,void 0,function*(){if(mt())return;const{prebid:e,tcf:t,isMobileApp:n,country:i}=E.get(),r=yield u(t,n,i,"prebid");(null==e?void 0:e.enabled)&&r&&(yield he(null==e?void 0:e.url))}),ne(n),e(void 0,void 0,void 0,function*(){const{astUrl:e}=E.get();yield he(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),e(void 0,void 0,void 0,function*(){const{gptUrl:e,tcf:t,isMobileApp:n,country:i}=E.get();(yield u(t,n,i,"gpt-endpoint"))&&(yield he(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:r}=E.get(),{getConsentAsync:o}=c(n,0,r),a=yield o();if(e&&t&&a){if(yield he(t),document.querySelector(`.${ji}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(ji)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),_(),e(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=E.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield he(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield $i(),t("Libraries have been loaded and trackers have been set"),yield(r=i.librariesToLoad,e(void 0,void 0,void 0,function*(){const e=r.map(e=>he(e));yield Promise.all(e)})),yield Lr(),yield Tr(),t("Page options have been set"),kr(n),t("Advertory is setup on window"),br=Bt(),zn(br),Wn(br),yield Pr(br),t("Ads has been loaded",br),mn(n,br),Ji(br),yield i.replaceAdsWithFinnBlink(n.finnBlink),yield(t=>e(void 0,void 0,void 0,function*(){var e;if(!t.drEdition)return;if(!(yield u(t.tcf,t.isMobileApp,t.country,"handleDrEdition")))return;const n=yield cn(),i=new un(n);vn({publisher:t.publisher,drEditionConfig:t.drEdition,device:t.deviceType,pageType:t.pageType,country:t.country},i,null===(e=t.pulse)||void 0===e?void 0:e.instance)}))(n),(e=>{if(!(null==e?void 0:e.enabled)||ar)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Zi}=e,r=document.querySelector(i);if(!r)return;ar=!0;const o=()=>{or(r,n,t)};o(),window.addEventListener("resize",o),window.addEventListener("orientationchange",o),window.addEventListener("load",o),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(o)}),new ResizeObserver(o).observe(r)})(n.rightColumnSplit),yield(t=>e(void 0,void 0,void 0,function*(){const e=new pr;yield e.run(t)}))(n)}),$r=(n,i)=>e(void 0,void 0,void 0,function*(){yield((n,i)=>e(void 0,void 0,void 0,function*(){const{initConsentManager:e,getConsentAsync:r}=c(n.tcf,n.isMobileApp,n.country),o=yield Xi(n);yield pn(),yield Yi(e),yield Yi(r),t("TCF resolved successfully"),yield jr(o,i),t("Run function resolved successfully")}))(n,i)}),Nr=()=>{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},_r=(e,t,n,i)=>{var r;const{image:o,icon:a,sponsoredBy:s,title:d,clickUrl:l,cta:c,body:u,desc2:v,video:p,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:E}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(o),imgWidth:null==o?void 0:o.width,imgHeight:null==o?void 0:o.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==v?void 0:v.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(r=null!=u?u:g)&&void 0!==r?r:"",desc2:null!=v?v:"",video:p,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=E?E:""},t)},Dr=(e,t)=>{const n=(i=r,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(r),a=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?a?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},qr=(e,t,n,i)=>{const r=document.querySelector(`#${e}`);r&&t&&(r.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:r}=t,o=i&&Object.values(de).includes(i);n&&o&&((e,t,n,i)=>{const r=t.parentElement;if(!r)return;const o=e?`-${e}`:"",a=i?`__${i}`:"",s=`advertory${o}-${n}${a}`,d=`advertory${o}-${n}-wrapper${a}`;t.classList.remove(...t.classList),r.classList.remove(...r.classList),t.classList.add(s),r.classList.add(d),t.dataset.adType=n})(i,e,Wi,r)})(r,n),i())},Mr=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:[])Vr(i)}),t.dataset.tracked="true")})},Br=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Fr):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},Rr=(e,t)=>{var n;let i=!1;const r=document.querySelector(`#${e.targetId}`);if(!r||!e.native)return;const{deviceType:o,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=o?o:T.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,Br(e),c.disconnect();break}},d);c.observe(r)},Fr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Vr(e):window.navigator.sendBeacon(e)},Vr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Ur=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:r,videoTemplates:o}=n,s="default";if(!e.native)return null;const{native:d,targetId:l}=e,{desc2:c=s}=e.native,u=c.toLowerCase(),v=null!==(i=Dr(e.targetId,c))&&void 0!==i?i:u,p=st[t.language||a.NO],g=_r(d,p,l,t);return(d.video?o[v]:r[v]||r.default)(g,t)})(e,t,n);qr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Mr(e),Rr(e,t)})(e,t)})};at('@import"https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap";.advertory-klart-ad-native-content{position:relative;font-family:Roboto,sans-serif;font-style:normal;background-color:#e4f0ff;font-size:12px;margin-top:8px;width:100%;box-shadow:rgba(0,0,0,.05) 0 2px 2px 0}.advertory-klart-ad-native-content .ad-info{position:absolute;right:5px;top:2px;height:26px;width:26px;z-index:50;border-bottom-left-radius:13px;border-top-right-radius:13px}.advertory-klart-ad-native-content .ad-info svg path{fill:#fff}.advertory-klart-ad-native-content .ad-link{color:inherit;text-decoration:none}.advertory-klart-ad-native-content .ad-link .ad-header{position:absolute;z-index:9;width:100%;box-sizing:border-box;font-family:Roboto,sans-serif;background-color:rgba(42,114,221,.7);border:1px solid rgba(34,34,34,.1);border-bottom:none}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-header{position:relative}}.advertory-klart-ad-native-content .ad-link .ad-header .ad-annonse{display:inline-block;font-weight:bold;color:#fff;line-height:15px;background-color:#2a72dd;padding:6px 16px}.advertory-klart-ad-native-content .ad-link .ad-content{display:flex;flex-direction:column;background-color:#fff;padding:0}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content{display:flex;flex-direction:row;justify-content:space-between;padding:10px 16px 12px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content{display:flex;flex-direction:column;justify-content:space-between;order:2;margin:8px 16px;width:calc(100% - 32px)}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content{order:1;margin:0;width:inherit}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-subtitle{order:3;padding:10px 16px 0 0;font-size:14px;line-height:16px;color:#444}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-subtitle{order:2;padding:10px 16px 16px 0}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-sponsored{order:1;margin-bottom:4px;color:#2a72dd;font-family:Roboto,sans-serif;font-style:normal;font-weight:bold;line-height:13px;text-transform:uppercase}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-sponsored{order:3;margin-top:8px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-title{color:#222;font-size:22px;font-style:normal;font-weight:bold;line-height:25px;order:2}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-title{font-size:24px;line-height:28px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container{order:1}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container{order:2}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{position:relative;margin-top:0;width:100%;height:auto;aspect-ratio:1200/628}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{width:268px;max-height:140px;margin:0 0 10px 0}}.advertory-klart-ad-native-content .ad-link .ad-gambling{display:flex;justify-content:space-between;border-top:1px solid #ccc;padding-top:8px;padding-bottom:8px;margin:0 16px 0 16px}.advertory-klart-ad-native-content .ad-link .ad-gambling .ad-gambling-text{line-height:14px;color:#6a6a6a}.advertory-klart-ad-native-content .ad-link .ad-gambling .ad-gambling-link{line-height:14px;color:#0078bd;text-decoration:underline !important}.advertory-klart-ad-native-content.article{border-left:4px solid #2a72dd}@media screen and (min-width: 768px){.advertory-klart-ad-native-content.article{border-left:unset}}.advertory-klart-ad-native-content.article .ad-content{display:flex;flex-direction:row-reverse;align-items:center}@media screen and (min-width: 768px){.advertory-klart-ad-native-content.article .ad-content{flex-direction:unset}}.advertory-klart-ad-native-content.article .ad-content .ad-data-content{display:flex;margin:0 10px 0 0}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-annonse{order:1;color:#fff;background-color:#0366b4;font-size:12px;padding:2px 4px;text-transform:uppercase;font-weight:bold;margin-bottom:unset;width:fit-content}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-title{order:2;line-height:23px;font-size:15px}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-subtitle{order:3;font-size:15px}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-sponsored{order:4;color:gray}.advertory-klart-ad-native-content.article .ad-content .ad-image-container{width:150px;margin:10px}');at('@import"https://fonts.googleapis.com/css?family=Roboto:400&display=swap";.advertory-klart-ad-native-classic{border-top:4px solid #2a72dd;position:relative;font-family:Roboto,sans-serif;font-style:normal;background-color:#fff;color:#000;width:100%}.advertory-klart-ad-native-classic .ad-info{top:2px;right:0;position:absolute;height:26px;width:26px;z-index:1000;border-bottom-left-radius:13px;border-top-right-radius:13px}.advertory-klart-ad-native-classic .ad-link{color:inherit;text-decoration:none;display:block}.advertory-klart-ad-native-classic .ad-link .ad-content{border-left:1px solid rgba(34,34,34,.1);border-right:1px solid rgba(34,34,34,.1);border-bottom:1px solid rgba(34,34,34,.1);display:flex;flex-direction:column}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-header{display:flex;padding:8px 16px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-header .ad-annonse{font-size:14px;font-weight:bold;color:#2a72dd;content:"ANNONS";display:inline-block;text-align:left;vertical-align:middle}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content{padding:8px 16px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-subtitle{font-family:Roboto,sans-serif;font-size:15px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-subtitle .ad-sponsored{color:#2a72dd;font-weight:bold;text-transform:uppercase}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-title{font-weight:bold;font-size:30px;letter-spacing:-1px;line-height:1.08;margin:0 0 4px}@media screen and (min-width: 768px){.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-title{font-size:54px;letter-spacing:-1.8px;font-weight:bold}}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-image-container .ad-image{position:relative;width:100%;height:100%;aspect-ratio:2.8;object-fit:cover;object-position:center}.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:24px;font-weight:700;border:5px solid #000;padding:10px 0;text-align:center;justify-content:center;background:#fff;font-family:Roboto,sans-serif;color:#000;display:flex;flex-direction:column;box-sizing:border-box}@media screen and (min-width: 440px){.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:30px}}@media screen and (min-width: 768px){.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:48px}}[data-theme=dark] .advertory-klart-ad-native-classic{background-color:#222;color:#fff}');const zr={CONTENT_DISPLAY:({containerId:e,url:t,adContentFrom:n,adText:i,sponsoredBy:r,title:o,img:a,description:s,desc2:d})=>`<article class="advertory-klart-ad-native-content">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-header">\n <span class="ad-annonse">${i}</span>\n </div>\n <div class="ad-content">\n <div class="ad-data-content">\n <div class="ad-title">${o}</div>\n ${s&&`<div class="ad-subtitle">${s}</div>`}\n <div class="ad-sponsored">${n} ${r}</div> \n </div>\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${a}" />\n </div>\n </div>\n ${"gambling"===d?'<div class="ad-gambling">\n <div class="ad-gambling-text">Åldersgräns för spel är 18 år.</div>\n <div class="ad-gambling-link">www.stodlinjen.se</div>\n </div>':""}\n </a>\n </article>`,CLASSIC:({containerId:e,url:t,adText:n,sponsoredBy:i,title:r,img:o,description:a,desc2:s},d)=>{const l=Re({native:{desc2:s}}),c=l?"advertory-klart-ad-native-classic-alcohol":"",u=l?'<div class="alcohol-warning">Alkohol kan skada din hälsa</div>':"",{deviceType:v}=d,p=(e=>e===T.DESKTOP)(v)?"":' target="_blank" rel="noopener"';return`<article class="advertory-klart-ad-native-classic ${c}">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"${p}>\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">${n}</span>\n </div>\n <div class="ad-image-container">\n <img alt="${r}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-data-content">\n <div class="ad-title">${r}</div>\n <div class="ad-subtitle">\n <span class="ad-sponsored">${i}</span> ${a}\n </div>\n </div>\n </div>\n ${u}\n </a>\n </article>`}},Hr={displayTemplates:{brandstudio_native_ad:zr.CLASSIC,brandstudio_native_ad_alcohol:zr.CLASSIC,default:zr.CONTENT_DISPLAY,gambling:zr.CONTENT_DISPLAY},videoTemplates:{}},Wr=e=>{const t=e.querySelector(".advertory-klart-ad-native-classic-alcohol");if(!t)return;const n=t.querySelector(".ad-content"),i=t.querySelector(".alcohol-warning");if(!i||!n)return;const r=(e=>{const t=e.getBoundingClientRect().height;return Math.floor(.25*t)})(n);i.style.height=`${r}px`};at(".advertory-klart-native-ad-wrapper__front{align-items:center;clear:both;display:flex;justify-content:center;overflow:hidden}.advertory-klart-native-ad-wrapper__front .advertory-klart-native-ad__front{position:relative;width:100%;min-height:120px;z-index:10}");const Kr=((e,t)=>n=>$r(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e,i=document.querySelector(`#${n}`);if(!i)return;const{pageType:r=Zt.FRONT,deviceType:o,nativeTrackingConfig:s,appearanceConfig:d}=null!=t?t:{},l={language:a.SE,publisher:de.KLART,deviceType:o,pageType:r,nativeTrackingConfig:s,appearanceConfig:d};Ur(e,l,Hr),Re(e)&&Wr(i)},wallpaperHandlers:{initWallpaperAd:Et,adjustAdToHorseshoe:Et},loadFinnBlinkAd:bt,replaceAdsWithFinnBlink:bt,preparePageOptions:ae,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:r=!0}=E.get(),o=((e,t)=>{const{isMobileApp:n}=E.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,r),a=(e=>{const{country:t}=E.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,r=`${R(t)}-adformat`,o=n?n[r]:[];if(!o)return{};const a=(Array.isArray(o)?o:[o]).filter(e=>!(e in Ae)||window.innerWidth>=Ae[e]);return{[r]:i?a:o}})(e),s=(e=>{const{country:t}=E.get(),n=`${R(t)}-targetid`;return e?{[n]:[e]}:{}})(n),d=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(o),l=Nr();return Object.assign(Object.assign({},e),{invCode:o,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),d),l)})},siteEvents:se,librariesToLoad:[]},le),Gr=at("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var Jr=Object.freeze({__proto__:null,default:Gr});exports.getVideoPPIDs=t=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:n}=ee.getPPIDs(),{ppid1:i,ppid2:r}=te.getPPIDs(),o=(new Z).add(n,W[t]).add(e,K[t]).add(r,G[t]).add(i,J[t]);return yield new Promise(e=>{e(o.buildVideoEids())})}),exports.initAdvertoryPackage=Kr,exports.updateAdvertory=(t,n)=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return[];const{clearAds:i,reloadExistingAds:r,renderFinnBlinkPlacements:o,contextSelector:a}=null!=n?n:{};if(i)return _t(),[];r&&(_t(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{jt(e.id)})),k(null!=t?t:{}),yield Tr();let s=Bt(a);return o&&(s=s.filter(e=>Ne(e.id))),s.length>0&&(br=[...br,...s.map(e=>Object.assign({},e))],zn(s),Wn(s),yield Pr(s)),br});
|
|
1
|
+
"use strict";function e(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;const t=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},n=e=>new URLSearchParams(window.location.search).get(e),i="takeover",r="native_override_desc2",o=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return t("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let r=!1;const o=e=>{r||(t("Resolving advertising permission value obtained"),r=!0,n(e))},a=setTimeout(()=>{t("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{t("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const n=Number(e);t("Advertising permission value obtained asynchronously: ",e),o(Boolean(n))})}),a={NO:"no",SE:"se"},d="cmp:loaded";let s="undefined"!=typeof window?window._tcf_:void 0,l=!1;const c=(i,r,c)=>{const u=!!(null==i?void 0:i.enabled),v=(null==i?void 0:i.timeout)||3e3,p=n("bypass_tcf"),g=()=>{if(!(null==i?void 0:i.enabled))return!0;if(((e,n)=>e?!!n&&(t("TCF bypass param detected, returning consent: true"),!0):(t("TCF is not enabled, returning consent: true"),!0))(u,p))return!0;if(l)return null;if(!s)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=s.getConsentedToAllSync();return t(`TCF consented to all is: ${e}`),s.getConsentedToAllSync()};return{initConsentManager:()=>(null==i?void 0:i.enabled)?new Promise((e,n)=>{if(t("Getting TCF consent manager..."),window._tcf_)return t("TCF consent manager is already available"),s=window._tcf_,void e(s);t("TCF consent manager is not available");const i=()=>{t("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(s=window._tcf_,e(s)):n(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(d,i),l=!0,n(new Error("Timeout waiting for CMP to load"))},v);t("Listening for CMP loaded event..."),document.addEventListener(d,i,{once:!0})}):Promise.resolve(null),getConsentSync:g,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==i?void 0:i.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${i.schibstedAdChoicesOverrideValue}`),Boolean(Number(i.schibstedAdChoicesOverrideValue));const e=(null==i?void 0:i.schibstedAdChoicesEnabled)&&c===a.SE,n=(null==i?void 0:i.schibstedAdChoicesEnabled)&&c===a.NO;if(e||n)return t("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield o(i);if(!(null==i?void 0:i.enabled))return!0;const r=g();return null!==r?r:yield new Promise((e,n)=>{try{if(!s)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=t=>{n||(n=!0,e(t))},r=setTimeout(()=>{t("TCF isConsentedToAll timed out, resolving with false"),i(!1)},v);s.onTcfReady(()=>{t("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),s.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){n(e)}})})}},u=(n,i,r,...o)=>e(void 0,[n,i,r,...o],void 0,function*(e,n,i,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return t(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=c(e,0,i);return(yield o())?(t(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(t(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}),v=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},p=t=>e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i}=t,{getConsentAsync:r}=c(e,0,i);if(!(yield r()))return;const o=v("_pulse2data");return o?o.split(",")[9]:void 0});function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,m;var y=g(function(){if(m)return h;m=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)?d((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 r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,i){var a={};return i.isMergeableObject(e)&&r(e).forEach(function(t){a[t]=n(e[t],i)}),r(t).forEach(function(r){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(o(e,r)&&i.isMergeableObject(t[r])?a[r]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"==typeof n?n:d}(r,i)(e[r],t[r],i):a[r]=n(t[r],i))}),a}function d(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var d=Array.isArray(r);return d===Array.isArray(t)?d?o.arrayMerge(t,r,o):a(t,r,o):n(r,o)}return d.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return d(e,n,t)},{})},h=d}());const f=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],w={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},b=6;class E{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 f){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=y(E.DEFAULT_SITE_HANDLERS,e)}}E.DEFAULT_SITE_HANDLERS={siteEvents:w,initNativeAd:function(){}};const k=new E,T=k.modifyConfigProperties.bind(k),I={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},A=9826;class S{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=I.DESKTOP,isMobileApp:t}=k.get();if(t){return{"aa-sch-supply_type":`app_${e===I.MOBILE?"phone":I.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(t){return e(this,void 0,void 0,function*(){return Object.assign(Object.assign({},t),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},t.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(t.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return e(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(()=>{const e=v("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return e(this,void 0,void 0,function*(){return yield p(k.get())})}isTrackingForbidden(){return e(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=A}=k.get();return"true"===n("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{publisher:e}=k.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=k.get(),{getConsentAsync:i}=c(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=k.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}=k.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 x=new S;x.prepare.bind(x);function C(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(),r=(()=>{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:r,mobileOS:["ios","android"].includes(r)?r:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}class P extends S{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=I.DESKTOP}=k.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(o=null===(r=window.screen)||void 0===r?void 0:r.height)&&void 0!==o?o:0};var n,i,r,o;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{isMobileApp:e}=k.get(),{appMode:t,mobileOS:n}=C(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=k.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const O=864e5,L=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return t("Error with parsing localStorage data"),null}},n=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:n,setWithTimestamp:(e,t,i=O)=>{const r={data:t,expirationTime:(new Date).getTime()+i};n(e,JSON.stringify(r))},getByTimestamp:(n,i=O)=>{const r=e(n);if(!r)return null;if(!i)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return t("Error with parsing localStorage data"),null}}}})(),j="glimrTags",$=["glwe_","glwet_"],N={geofenceTags:[],geoTags:[],weatherTags:[]},_=(...t)=>e(void 0,[...t],void 0,function*(e=k.get()){const{tcf:t,isMobileApp:n,country:i}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield u(t,n,i,"glimr")}const{getConsentAsync:r}=c(t,0,i);return yield r()}),q=()=>e(void 0,void 0,void 0,function*(){const{glimr:n}=k.get();if(!(yield _())||!(null==n?void 0:n.enabled))return void t("No consent for glimr data fetching.");const i=yield(r=500,e(void 0,void 0,void 0,function*(){return yield Promise.race([e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),r))])}));var r;if(i)try{i.setTagCacheTimeInSeconds(300),yield new Promise(e=>{i.getTags(n.clientId,(t,n)=>{L.setWithTimestamp(j,{tags:t,tagMappings:n}),e(!0)})})}catch(e){t(`Error during getting glimr data: ${e}`)}else t("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:i})}),D={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"},M=e=>$.some(t=>e.startsWith(t)),R=e=>e.startsWith("glgc_"),B=e=>!M(e)&&!R(e),F=e=>e===a.NO?"no-sno":"se-generic",U=()=>{const{country:e,publisher:t}=k.get();return`${e}-${t}`},V=(e,t)=>{const n=z();if(!n)return N;const i=((e=[])=>e.filter(M))(n),r=((e=[])=>e.filter(R))(n),o=((e=[],t,n)=>{const i=e.filter(B);if(n&&t){const{publisher:e}=t,n=D[e]||e;i.push(n)}return i})(n,e,t);return{geoTags:o,geofenceTags:r,weatherTags:i}},z=()=>{const e=L.getByTimestamp(j);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},H={get:(t,n)=>e(void 0,void 0,void 0,function*(){const e=yield fetch(t,n);if(!e.ok)throw new Error(e.statusText);return yield e.json()}),post:(t,n,i)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(i),r=yield fetch(t,{method:"POST",headers:n,body:e});if(!r.ok)throw new Error(r.statusText);return yield r.json()})},W="advertory:ppids-cache",K={[a.SE]:`SCH${a.SE.toUpperCase()}-EnvHash`,[a.NO]:`SCH${a.NO.toUpperCase()}-EnvHash`},G={[a.SE]:`SCH${a.SE.toUpperCase()}-UserHash`,[a.NO]:`SCH${a.NO.toUpperCase()}-UserHash`},J={[a.SE]:`sch${a.SE}-envhash-v3`,[a.NO]:`sch${a.NO}-envhash-v3`},Y={[a.SE]:`sch${a.SE}-userhash-v3`,[a.NO]:`sch${a.NO}-userhash-v3`},Q={[a.SE]:`'sch${a.SE}-iosid-v3'`,[a.NO]:`'sch${a.NO}-iosid-v3'`},X={[a.SE]:`sch${a.SE}-androidid-v3`,[a.NO]:`sch${a.NO}-androidid-v3`},Z={[a.SE]:"sdrn:schibsted.com:user",[a.NO]:"sdrn:spid.no:user"};class ee{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 te=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(t){return e(this,arguments,void 0,function*(e,t=1e4){var n,i;const r=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=r.xandr)||void 0===n?void 0:n.ppId1,null===(i=r.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},ne=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(t,n){return e(this,void 0,void 0,function*(){var e,i,r,o,a,d,s,l,c,u,v;const p=L.get(W),g=yield this.getNewPPIDs(t,n);if(this.shouldHash(p,g)){const n=null!==(e=t.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(r=g.anId)||void 0===r?void 0:r.plain),void this.setPPIDs(null!==(o=c.userId)&&void 0!==o?o:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.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,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",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 r in e){if((null===(n=e[r])||void 0===n?void 0:n.plain)!==(null===(i=t[r])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const r=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}}:{});L.set(W,r)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield H.post(i,e,n)}catch(e){return t("Error with hashing PPIDs",e),null}})}getNewPPIDs(t,n){return e(this,arguments,void 0,function*({clientId:t,instance:n},i){const r=yield((t,n)=>e(void 0,void 0,void 0,function*(){const e=yield t.getUserId();return e?`${Z[n]}:${e}`:null}))(n,i),o=yield(t=>e(void 0,void 0,void 0,function*(){const e=yield t.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(n),a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:t},userId:{plain:r},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:r}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:r.plain}}},ie=n=>e(void 0,void 0,void 0,function*(){const{tracker:e,tcf:i,country:r,isMobileApp:o}=n;if(!(yield u(i,o,r,"setXandrPPIDs")))return;if(!e)return;(yield Promise.allSettled([te.processPPIDs(e,null==i?void 0:i.timeout),ne.processPPIDs(e,r)])).forEach((e,n)=>{if("rejected"===e.status){t(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),re=e=>{const{ppid1:t,ppid2:n}=te.getPPIDs(),{ppid1:i,ppid2:r,idfv:o,anId:a}=ne.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new ee).add(n,K[e]).add(t,G[e]).add(r,J[e]).add(i,Y[e]).add(o,Q[e]).add(a,X[e]).buildEids()}]}},oe=e=>{const{ppid1:t,ppid2:n}=te.getPPIDs(),{ppid1:i,ppid2:r,idfv:o,anId:a}=ne.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new ee).add(n,K[e]).add(t,G[e]).add(r,J[e]).add(i,Y[e]).add(o,Q[e]).add(a,X[e]).buildRyEids()}}]}}},ae=e=>{const{ppid1:t,ppid2:n}=te.getPPIDs(),{ppid1:i,ppid2:r}=ne.getPPIDs();return(new ee).add(n,K[e]).add(t,G[e]).add(r,J[e]).add(i,Y[e]).buildRyEids()};const de=new class extends P{prepare(n){return e(this,void 0,void 0,function*(){const i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"aa-sch-country_code":a.SE},this.getPublisherKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),this.getScreenKeywords()),yield this.getAdvertisingConsentKeywords()),this.getAnalyticsConsentKeywords()),yield this.getExternalIdSrc()),this.getHasContextKeywords(n.keywords)),yield(r=k.get(),e(void 0,void 0,void 0,function*(){const{addPublisherToGeo:e}={},{glimr:n,country:i}=r,o=yield _(r);if(!(null==n?void 0:n.enabled)||!o)return t("No consent for getting glimr tags."),{};const a=F(i),d=V(r,Boolean(e));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}))),(()=>{const{ppid1:e,ppid2:t}=te.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),n.keywords);var r;return Object.assign(Object.assign({},n),{keywords:i,user:Object.assign(Object.assign({},re(a.SE)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var se=de.prepare.bind(de);const le={adRequested:()=>{},adAvailable:()=>{},adLoaded:e=>{(e=>{var t;const n=null===(t=document.getElementById(`${e.targetId}`))||void 0===t?void 0:t.parentElement;n&&e.width>=1260&&e.width<=1280&&n.classList.add("advertory-klart-l-format")})(e)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ce={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"},ue={publisherClassName:ce.KLART,fullWidthFormatClassName:"panorama",classesToRemoveOnRefresh:["advertory-klart-l-format"]};class ve{initialize(){this.DATA=Object.assign({},ve.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)}}ve.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const pe=new ve,ge=()=>(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),he=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),me=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},country:r}=k.get(),o=[`${F(r)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?o:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},ye=(t,...n)=>e(void 0,[t,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const r=document.createElement("script");r.async=!0,r.src=e;const o=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{r.removeEventListener("load",o),r.removeEventListener("error",a),clearTimeout(s)};r.addEventListener("load",o),r.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(r)}).catch(e=>{console.error(e)}))}),fe="ABSOLUTE_FULLSCREEN",we="ANY_FULLSCREEN",be="VERTICAL_FULLWIDTH",Ee="FULLWIDTH",ke="TAKEOVER",Te="VELVET_TAKEOVER",Ie="WALLPAPER",Ae="COLLAPSE",Se={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}]},xe={wallpaper:1600,"l-format":1600},Ce=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Ve(e,we)},Pe=e=>{const{native:t}=e;return!!t},Oe=e=>Ve(e,Ee),Le=e=>{const{targetId:t}=e;return t.includes("takeover")||Ve(e,ke)},je=e=>Ve(e,ke),$e=e=>Ve(e,Ie),Ne=e=>Ve(e,Ae),_e=e=>e.targetId.includes("sponsorstripe"),qe=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},De=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Me=e=>e.targetId.startsWith("midboard"),Re=e=>e.targetId.includes("widescreen"),Be=e=>e.width>=1260&&e.width<=1280,Fe=e=>e.width>=1600&&e.width<=1620,Ue=e=>{var t,n;return"string"==typeof(null===(t=e.native)||void 0===t?void 0:t.desc2)&&(null===(n=e.native)||void 0===n?void 0:n.desc2.endsWith("_alcohol"))},Ve=(e,t)=>{const n=Se[t];if(!n)return!1;return!!n.find(t=>{var n,i;const r=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,o=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===r,d=!t.height||t.height===o;return a&&d})},ze="advertory-fullscreen-scroll",He="advertory-fullscreen-scroll-wrapper",We="fullscreen-scroll-in-screen",Ke="in-screen",Ge=e=>e.includes("snoap.no"),Je=e=>{var t,n,i,r,o;return!!(null===(o=null===(r=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===r?void 0:r.ads[1])||void 0===o?void 0:o.rtb)},Ye=(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()),r=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),o=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...o,r).toString()},Qe=Ye([],()=>{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:r,clientHeight:o}=i,a=e/r,d=t/o;i.style.transform=`scale(${a},${d})`,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}),Xe=e=>{const t=Ye([],()=>{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},Ze=[],et={},tt=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=it(e);n?(nt(i,n),rt(e,i,t)):(nt(i,n),ot(e,i,t))})},nt=(e,t)=>{var n,i;const r=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;const o=t?"showFullscreen":"hideFullscreen";null===(i=r.contentWindow)||void 0===i||i.postMessage(`advertory:${o}-${e}`,"*")},it=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},rt=(e,t,n)=>{e.classList.add(Ke),document.body.classList.add(We),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Ze.includes(t)||Ze.push(t),n&&window.addEventListener("scroll",et[t],{passive:!0})},ot=(e,t,n)=>{Ze.includes(t)&&(n&&window.removeEventListener("scroll",et[t]),document.body.classList.remove(We),e.classList.remove(Ke),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},at=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:r=3}=t,o=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&o.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{o.length&&dt(e,o,r,0),a.length&&dt(e,a,r,40)}},dt=(e,t,n,i)=>{const r=e.offsetHeight,o=window.scrollY,a=e.getBoundingClientRect().top+o;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>o?(a-o)/t-i:(o+t-(a+r))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function st(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}st('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const lt={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 ct=null;const ut=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\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 ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${Qe})()`,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(Ge(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=Xe(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Ge(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)),Ge(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)),Je(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},vt=()=>{ct=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,r=document.documentElement;r.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),r.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),r.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},pt=()=>{ct||(ct=window.requestAnimationFrame(vt))},gt=(e,t)=>{var n,i,r,o;const{country:a}=k.get(),{targetId:d}=e;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==t?void 0:t.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:r="16px 0",beforeContentValue:o=""}=e,a=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${i} calc(50% - ${a}px),\n ${i} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${r};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${o&&"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: '${o}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(i=null==t?void 0:t.overlayStyles)&&void 0!==i?i:{});const s=document.getElementById(d),l=null==s?void 0:s.parentElement;if(!s||!l)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>tt(e,n),{}),r=it(e);i.observe(e),n&&(et[r]=at(e,t))})(l,t),s.className=ze;const c=Ve(e,fe)?"absolute":"fixed";s.style.position=c,l.className=He,l.dataset.showTagSubscribeId=d,s.setAttribute("data-ad-label",lt[a].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(s.dataset.moveCogwheelToTheLeft="true"),pt(),window.addEventListener("resize",pt),null===(r=window.visualViewport)||void 0===r||r.addEventListener("resize",pt),null===(o=window.visualViewport)||void 0===o||o.addEventListener("scroll",pt)},ht=({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=Je(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=Je(e)?1:0,r=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;r&&(r.banner.content=t)})(e,ut(t,e))},mt=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},yt=(e,t,n)=>{var i,r,o,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(r=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===r?void 0:r.adResponse)||(null!==(o=(a=window.apntag).requests)&&void 0!==o||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),mt(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},ft="ad-loaded",wt=()=>null!==n("disable_prebid"),bt=()=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:n,country:i,isMobileApp:r,fullscreenScroll:o}=k.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:a}=k.getHandlers(),{getConsentAsync:d}=c(n,0,i),s=yield d(),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 r=ge(),{prebid:{relevantCbTimeout:o}={}}=k.get(),a="relevantCb"===i&&o?o:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,r.loadTags&&r.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),u=ge(),v=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=ge();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:p=""}={},keywords:g}=v;(()=>{const e=he();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!u.loadTags)return t("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!u.loadTags,condition:"or"}),void l.cleanup();const n=he();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const r=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};t("prebid consentManagement",r),n.addPrebidConfig(Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},oe(i)),me(g,p))),t("core add prebid config",Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},oe(i)),me(g,p))),n.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,u.loadTags(e)),l.cleanup()}},customNativeRender:e=>{Et(e,a)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const d=i(n),s=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(Ce(s)?(gt(s,o),(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()})(d)):((e=>{if(!(null==e?void 0:e.classList.contains(ze)))return;e.classList.remove(ze),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(He))&&(t.classList.remove(He),t.classList.remove(Ke))})(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(ft),(null==r?void 0:r.creativeId)&&yt(l,c,Number(null==r?void 0:r.creativeId)))}}),t("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,u.loadTags(e))}},customNativeRender:e=>{Et(e,a)},directRenderFn:()=>{}})})}),Et=(e,t)=>{var n;const{divId:i,native:r,bid:o}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.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)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:r,targetId:d},k.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:o.adId}),"*")},kt="0123456789abcdefghijklmnopqrstuvwxyz",Tt=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=kt[Math.floor(36*Math.random())]}return t},It=()=>Promise.resolve(),At=()=>{},St=e=>{window.apntag.anq.push(e)},xt=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),Ct=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})});let Pt="";const Ot=new Map,Lt=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},jt="advertory-wallpaper-background",$t=()=>{const e=document.querySelector(`.${jt}`);e&&e.remove()},Nt=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,_t=e=>{if("0"===n("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const i=t.parentElement;i&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),i.style.setProperty("display","none","important"),e.includes("wallpaper")&&$t())},qt=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"))},Dt=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`)},Mt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=pe.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},Rt=()=>{$t();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{_t(e.id),Mt(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=Lt(e.id)}),St(()=>window.apntag.clearRequest())},Bt="noGroupedPlacements",Ft=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Ut=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Vt=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:r}=k.get(),o=n[r].filter(Ut)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=o.reduce((e,t)=>{const n=Ft(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=o.filter(({id:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${r}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const r=zt(e,t,n),o=r.finnBlink&&!r.finnBlink.renderOnlyWithAdBlock,a=o&&(null===(i=r.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${Tt(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),o&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&pe.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({},r),{id:d})});return(e=>{const{keywordsConfig:t}=k.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(Pt!==window.location.pathname&&(Ot.clear(),Pt=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=Ot.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${U()}-count`]=i,Ot.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))})(d)},zt=(e,t,n)=>{const i=n[t],r=n[n.length-1],o=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==r?void 0:r.id)?r:o||r},Ht=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=k.get(),i=(null==t?void 0:t[n])||{},r=Object.values(i).flat(),o=(e=>{const t={};return e.forEach(e=>{const n=Lt(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,r]of Object.entries(t))n[i]=e.filter(e=>r.includes(Lt(e.id)));return n})(e,i),d=Object.keys(o),s=((e,t)=>e.filter(e=>!t.has(Lt(e.id))))(e,new Set([...d,...r]));return Object.assign(Object.assign(Object.assign({},a),o),{[Bt]:s})},Wt=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:r}=window,[o,a]=t;if(!i.dataset.lockedsize&&a&&o)i.style.width=`${o}px`,i.style.height=`${a}px`,n&&(r.resizeAd(i.id,[o,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=o.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&r.resizeAd(i.id,[e,t])}},Kt=["netboard","board"];class Gt{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:r}=e,o=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",r),o&&d.searchParams.append("urlData",o),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(n){return e(this,void 0,void 0,function*(){var e,i,r;const o=yield this.identityFacade.getIdentityUser(),a=null!==(r=yield null===(i=null===(e=this.tracker)||void 0===e?void 0:e.getEnvironmentId)||void 0===i?void 0:i.call(e))&&void 0!==r?r:"",d=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(n,{envId:a,spid:d});try{t("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},n=yield H.get(s,e);return t("Fetch operation completed successfully."),n}catch(e){t("Error during fetch operation:",e)}return null})}}let Jt=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:r,creativeId:o}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:r,utm_medium:d},o&&{utm_id:`df-${o}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),r=new URLSearchParams(decodeURIComponent(e.search)),o=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{r.has(e)||o.set(e,null!=t?t:"")}),o.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 r=this.getDrEditionUTMParams(e,t),o=new URL(i);return Object.entries(r).forEach(([e,t])=>{o.searchParams.has(e)||o.searchParams.set(e,null!=t?t:"")}),o.toString()}handleVideo(t,n){return e(this,void 0,void 0,function*(){const{id:e,autoplay:i,mute:r,videoLoop:o,vendor:a}=n.videoConfiguration;t.classList.add("vgtv-video-container"),Object.assign(t.dataset,{vgtvVideoId:e,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:r,vgtvLoop:!!o,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:r}=new URL(n);if(!i.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const o=r.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Yt=e=>{const n=e.parentElement;n?n.classList.remove("dr-edition-lock-height"):t("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Qt{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(n,i){return e(this,void 0,void 0,function*(){var e,r;const{drEditionConfig:{containerSelector:o},renderAsBackfill:a=!1}=i,d=n.querySelector(o);if(!d)return void t(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(i);return(null==s?void 0:s.itemId)||a?!(null==s?void 0:s.itemId)&&a?(t("No Dr. Edition ads available to render. Collapsing whole placement."),_t(n.id),void Yt(d)):((null==s?void 0:s.itemId)&&a&&(t("Dr. Edition ad available to render as a Xandr backfill."),qt(n.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(d,s,i),yield null===(e=this.videoManager)||void 0===e?void 0:e.handle(s,i),Yt(d),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(n,s,i),null===(r=n.querySelector("a"))||void 0===r||r.addEventListener("pointerup",()=>null)):Yt(d))):(t("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(d),this.showBackfill(n),void Yt(d))})}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:"";qt(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let r=null;const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(r&&clearTimeout(r),r=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{o.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{o.observe(e)}),!0}}class Xt{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(t,n,i){return e(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:e}=c(i.tcf,i.isMobileApp,i.country),r=yield e(),o=i.device===I.MOBILE?n.mobileHTML:n.desktopHTML;const a=r?o:o.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");t.innerHTML=a,t.querySelectorAll("a").forEach(e=>{var t,r,o;e.search=null!==(o=null===(r=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===r?void 0:r.call(t,e,n,i))&&void 0!==o?o:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class Zt{constructor(e){this.strategy=e}handle(t,n){return e(this,void 0,void 0,function*(){const{videoConfiguration:{id:e,preview:i}={}}=t;(e||i)&&(yield this.importScript(n),yield this.createVideoElement(t,n))})}importScript(n){return e(this,void 0,void 0,function*(){const e=n.drEditionConfig.videoScriptUrl,i=document.querySelector(`script[src="${e}"]`);if(e&&!window.autoplayQueue&&!i)try{yield ye(e)}catch(e){t("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(t,n){return e(this,void 0,void 0,function*(){const e=document.createElement("div"),{node:i}=t.videoConfiguration,r=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(t,n))return;this.strategy.handleVideo(e,t),null==r||r.appendChild(e),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const o=null==r?void 0:r.parentNode;if(!o)return;const a=o.closest("a");o.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,r;const{preview:{url:o,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!o)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",o),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(r=(i=t.drEditionConfig).addPreviewVideo)||void 0===r||r.call(i,d),!0))}}let en=class{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,r=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t,n,i){return e(this,void 0,void 0,function*(){var e,r,o,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(t,n,i,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(o=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===o||o.call(r,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(t,n,i){return e(this,void 0,void 0,function*(){var e,r,o,a,d,s;if(!this.pulse)return;const l=this.getEventInput(t,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(r=(e=this.pulse).trackLegacyClickUIElement)||void 0===r||r.call(e,l):this.pulse.trackClickUIElement?null===(a=(o=this.pulse).trackClickUIElement)||void 0===a||a.call(o,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class tn extends en{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:r="",creativeId:o}={}}=t,{columnName:a,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:a,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":o},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let nn=class extends en{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,r,o,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(o=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getPulseObjectId)||void 0===o?void 0:o.call(r))&&void 0!==a?a:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,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 r,o,a,d;const{pulseData:{algorithm:s="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"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=null!==(a=null===(o=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getUrlWithParams)||void 0===o?void 0:o.call(r,t,n))&&void 0!==a?a:p)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const rn={FRONT:"front"},on=t=>e(void 0,void 0,void 0,function*(){var e,n;return(null===(e=null===window||void 0===window?void 0:window.SVP)||void 0===e?void 0:e.Player)?new window.SVP.Player(t):((()=>{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(t):yield new Promise(e=>{window.addEventListener("onSvpPlayerReady",()=>e(new window.SVP.Player(t)))}))}),an={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 e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return vo})})}})}};class dn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:r,mute:o,vendor:a}}){yield e(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 d=["ContentMutePlugin"],s=this.createPlayerOverlay(t);var l,c;c=s,null==(l=d)||l.forEach(e=>{an[e](c)});const u={id:n,node:i,autoplay:r,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield on(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,d)}),v.once("ready",()=>{const e=t;new MutationObserver(t=>{t.forEach(({type:t,attributeName:n})=>{"attributes"===t&&"class"===n&&(e.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),e.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(e,{attributes:!0,attributeFilter:["class"]})}),v.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield v.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===rn.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),r=i.split("/").filter(Boolean);return r.length?[...r.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 sn="https://www.aftonbladet.se/video-player-extras/latest/";class ln{handleVideo(t,n){return e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:r,vendor:o}}){const a={id:t,node:n,autoplay:i,mute:r,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${sn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${sn}external-link.js`]:{name:"ExternalLink"}}};yield on(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const cn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class un{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:r,mute:o,vendor:a}}){const d={id:n,node:i,autoplay:r,mute:o,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},cn(e)?e:{}),{provider:Object.assign(Object.assign({},cn(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-${n}`]},requestSettings:{}}}},s=yield on(d);s.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield s.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===rn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let vn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const pn=(e,t,n)=>{var i;const{publisher:r,pageType:o,country:d}=e,s={[ce.VG]:new Jt,[ce.E24]:new dn,[ce.AFTONBLADET]:new ln,[ce.SVD]:new un}[r]||new vn,l=new(d===a.SE?tn:nn)(n,s,o),c=new Gt(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),u=new Xt(s,l),v=new Zt(s);return new Qt(c,u,v,l)},gn=()=>e(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 hn{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 e(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 t("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return e(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 mn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,r=document.querySelectorAll(i),o=new IntersectionObserver((i,r)=>((e,t,n,i,r)=>{const o=pn(n,i,r);e.forEach(e=>{var i,r,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(r=d.dataset.pulseColumnname)&&void 0!==r?r:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";o.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,r,e,t,n),{rootMargin:"400% 0px"});r.forEach(e=>o.observe(e))},yn=()=>e(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)}}),fn=[],wn=(n,i)=>e(void 0,void 0,void 0,function*(){var e;const{pulse:r,tcf:o,deviceType:a,drEdition:d,publisher:s,pageType:l,country:c,isMobileApp:v}=n;if(!(yield u(o,v,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:i,placements:r,drEdition:{fallbackGlobalEditionName:o}={}}=e,a=r[i]||r.desktop,d=Lt(t.targetId),s=a.find(e=>e.id===d),l=Kt.some(e=>d.startsWith(e)),c=fn.includes(d),u=(null===(n=null==s?void 0:s.drEdition)||void 0===n?void 0:n.editionName)||o;return s&&l&&!c&&u?(fn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:u})})):null})(n,i);if(!p)return;if(!(null==r?void 0:r.instance))return void t("Pulse has not been passed as a prop, aborting");const g=yield gn(),h=new hn(g),m=pn({publisher:s,pageType:l,country:c},h,null==r?void 0:r.instance),y=document.getElementById(i.targetId);if(!y||!d)return;y.classList.value="";const f=document.createElement("div");f.className=d.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=f.outerHTML;const w={editionName:(null===(e=null==p?void 0:p.drEdition)||void 0===e?void 0:e.editionName)||"",drEditionConfig:d,device:a,tcf:o,isMobileApp:v,country:c,renderAsBackfill:!0};yield m.fetchAndRenderAd(y,w)}),bn=(n,i)=>{var r,o,a,d;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void t("Ad block not enabled, Dr. Edition backfills will not be rendered");t("Ad block is enabled, Dr. Edition backfills will be rendered");const s=null!==(d=null===(a=null===(o=null===(r=n.finnBlink)||void 0===r?void 0:r.replacementConfig)||void 0===o?void 0:o.adsToReplace)||void 0===a?void 0:a.map(([e])=>e))&&void 0!==d?d:[],l=new IntersectionObserver((t,i)=>e(void 0,void 0,void 0,function*(){for(const e of t){if(!e.isIntersecting)continue;const t=e.target;i.unobserve(t),yield wn(n,{targetId:t.id})}}),{rootMargin:"400% 0px"});i.filter(e=>!s.some(t=>e.id.startsWith(t))).forEach(e=>{const t=document.getElementById(e.id);t&&l.observe(t)})},En="collapseAd",kn="hideAd",Tn="resizeAd",In="renderDrEditionFallback",An="wallpaperImageUrl",Sn="wallpaperColor",xn="velvet",Cn=[Tn,An,Sn,En,kn,In,xn];let Pn;const On=e=>{if("object"==typeof e)return e;if(t=e,Nt.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:An,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Sn,wallpaperColor:t}}if(e.startsWith(In)){const t=e.split(":")[1];return{name:In,targetId:t}}if(e.startsWith(En)||e.startsWith(kn)){const t=e.split(":")[1];return{name:En,targetId:t}}if(e.includes("name")&&Cn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Ln=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=On(t);if(!n)return;if(!n.name||!Cn.some(e=>n.name===e))return;const{name:i,targetId:r,wallpaperImageUrl:o,wallpaperColor:a,cmd:d,size:s}=n;i===xn&&d&&(d.includes("noScroll")&&(Pn=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==Pn||Pn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==En&&i!==kn||!r||_t(r),i===Tn&&r&&d&&Wt(r,d),i===In&&r&&(_t(r),wn(k.get(),{targetId:r})),"resizeMediationAd"===i&&r&&s&&Wt(r,s,!0),i===An&&o&&(e=>{const t=document.querySelector(`.${jt}`);t&&(t.style.backgroundImage=`url(${e})`)})(o),i===Sn&&a&&(e=>{const t=document.querySelector(`.${jt}`);t&&(t.style.backgroundColor=e)})(a)},jn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),$n=()=>{const{publisher:t,country:n,finnBlink:i}=k.get(),{loadFinnBlinkAd:r,wallpaperHandlers:{adjustAdToHorseshoe:o}}=k.getHandlers(),a=window.apntag,d={publisher:t,country:n,finnBlink:i},s=e=>{qt(e),St(()=>a.showTag(e))};return{withXandrAd:s,withFinnBlinkAd:t=>e(void 0,void 0,void 0,function*(){yield r(t,d,null)}),withFullAdsChain:t=>e(void 0,void 0,void 0,function*(){yield r(t,d,s,()=>{pe.getData("horseshoe").isAvailable&&o(t)})})}},Nn=(e,n,i)=>{const r="true"===i.dataset.isFinnBlinkOnlyPlacement;return qe(n)&&r?(t(`loading finn blink ad for blink only placement for ${n}`),void $n().withFinnBlinkAd(n)):qe(n)?(t(`loading finn blink ad with full ads chain for ${n}`),void $n().withFullAdsChain(n)):void St(()=>(t("core showTag",{id:n}),e.showTag(n)))},_n=(n,i)=>e(void 0,void 0,void 0,function*(){yield xt,yield Ct;const e=new IntersectionObserver((e,i)=>((e,n,i,r)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),d=document.getElementById(a);t("core log from intersection observer handler",{targetId:a,element:d}),i(window.apntag,a,r),d&&(n.unobserve(d),n.disconnect())})})(e,i,Nn,n),jn(i));e.observe(n)}),qn=new Map,Dn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Mn=".brandstudio-premium-content-widget",Rn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Bn=({adWrapper:e,placementContainer:t})=>{const n=Rn({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Mt(i=t),i.innerHTML=""},Fn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Un=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=k.get(),i=Dn.includes(n)&&Boolean(t.closest(Mn));const r=i?t.closest(Mn):null,o=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!r)return;if(a)return Fn(e),void o.disconnect();const d=t.closest('[style*="height"]'),s=r;d&&s.contains(d)?Fn(d):s.hasAttribute("style")&&Fn(s),o.disconnect()})})});try{o.observe(t,{childList:!0,subtree:!0})}catch(e){o.disconnect()}},Vn=(e,t,n,i,r,o)=>{var a;const d=performance.now(),s=null!==(a=qn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,r)&&n<0;d-s>=r&&l&&(qn.set(t,d),((e,t,n)=>{const{country:i}=k.get(),r=null==n?void 0:n.parentElement;r&&n&&Bn({adWrapper:r,placementContainer:n}),St(()=>{e.setKeywords([t],{[`${F(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,o))},zn=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:r,boundingClientRect:o}=e;t(window.apntag,r.id,o.y,n,i,r)})})(e,Vn,t,n),jn(300));i.observe(e)},Hn=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const r=e.slice(i,i+t);n.push(r)}return n},Wn=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Kn=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Gn=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=k.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Zn(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Jn=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const r of i){const i=e.find(e=>{var t;return e.id===(null===(t=r.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),o=null==i?void 0:i.threshold;Kn(r,o)&&i&&(Dt(i.id),n.length&&r.classList.remove(...n),Zn([i],t))}},Yn=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=k.get();t&&(e.forEach(({id:e})=>{const t=Qn(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Jn(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Jn(e,!1,t))};n.persisted&&(Wn()?window.addEventListener("scroll",i,{passive:!0}):Jn(e,!1,t))})})(e,n))},Qn=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Xn=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Qn(t)),r=(e=>1===e[0]&&1===e[1])(i),o={sizes:[i],allowedFormats:r?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return r||(o.native=void 0),o},Zn=(e,t=!1)=>{const{requestSize:n=b}=k.get(),i=e.map(({id:e})=>e),r=Hn(i,n);if(t)for(const t of e){const e=Xn(t);window.apntag.modifyTag(t.id,e)}for(const e of r)St(()=>window.apntag.refresh(e))};const ei="#fff",ti="#0098da",ni="splash",ii="welcomePage",ri="topscroller",oi="velvet",ai="takeover-displayed",di="takeover-visit-count",si=14400,li=()=>{const e=v(di);return e?parseInt(e):0},ci=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=k.get();return"0"!==n(i)&&("1"===n(i)||!(!e||(()=>{var e;const t=(null===(e=k.get().takeover)||void 0===e?void 0:e.cookieCapName)||ai;return"true"===v(t)})())&&(!t||ui()))},ui=()=>{const e=li();return 0===e?((()=>{const e=li(),{takeover:{cookieCapTime:t=si}={}}=k.get(),n=document.location.hostname;window.document.cookie=`${di}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`})(),!1):1===e},vi=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),pi=()=>{const{takeover:e}=k.get();return Boolean(null==e?void 0:e.topscroller)},gi=()=>e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=ai,cookieCapTime:n=si}={},isMobileApp:i,tcf:r,country:o}=k.get(),a=yield u(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),hi=e=>{var t;const n=!!(null===(t=k.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return Le(e)&&n},mi=(e,t)=>{var n;if(t===ri){const{topscroller:t}=e;return null!=t?t:{}}if(t===ni){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},yi=(e,t)=>{t!==ni?(e=>{var t,n,i;const r=null===(n=null===(t=k.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,o=null===(i=k.get().takeover)||void 0===i?void 0:i.topscroller;if(!r||o)return;const a=document.querySelector(r),d=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),l=document.querySelector(".advertory-welcome-page-scroll");if(!(a&&d&&l&&s))return;const c=null==a?void 0:a.offsetHeight,u=je(e)?"60svh":`calc(100svh - ${c}px)`,v=je(e)?"calc(40svh + 30px)":`calc(${c}px + 30px)`;d.style.setProperty("height",u,"important"),s.style.setProperty("height",u,"important"),l.style.setProperty("bottom",v,"important")})(e):(e=>{var t;if(!(null===(t=k.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 r=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",r,"important")})(e)},fi=Ye([],()=>{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})}),wi=(e,t=!0)=>{(e===ii||e===ri)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},bi=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ei=e=>{document.body.style.overflow=e?"initial":"hidden"},ki=e=>{const t=Ii(e),n=Ti(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ei(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Ti=e=>{const t=()=>ki(e);return window.addEventListener("advertory:closeTakeover",t),bi(),t},Ii=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&ki(e)};return bi(),window.addEventListener("keydown",t),t},Ai=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ii(e),Ti(e),bi(),t.addEventListener("click",()=>{ki(e)}),Ei(!1))},Si=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Ti(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},xi=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>ki(e))})(e)},Ci=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=k.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=lt.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Pi=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=lt.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Oi=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=lt.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Li=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=lt.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},ji=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},$i=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${fi})()`,e+t.outerHTML})(e)),n},Ni=e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=Je(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=Je(e)?1:0,r=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;r&&(r.banner.content=t)})(e,$i(t))},_i=t=>e(void 0,void 0,void 0,function*(){const{takeover:e}=k.get(),{targetId:n}=t,i=document.querySelector(`#${n}`),r=document.querySelector(".advertory-takeover-wrapper");if(!i||!r||!e)return;const o=(e=>{const{width:t,height:n}=e;return vi(t,n)?ni:Ve(e,Te)?oi:pi()?ri:ii})(t),a=r.offsetHeight,d=window.scrollY>a;r.style.display="block",!d&&wi(o,!1),((e,t)=>{({[ii]:Oi,[ni]:Ci,[ri]:Pi,[oi]:Li})[t](e)})(r,o),ji(),((e,t)=>{({[ii]:Si,[ri]:Si,[ni]:Ai,[oi]:xi})[t](e)})(r,o),((e,t,n)=>{if(!n)return;({[ii]:()=>{const{buttonLabel:i}=mi(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[ni]:()=>{const{themeColors:i,logotype:r,buttonLabel:o,showArrowIcon:a}=mi(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=o?o:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&r&&(n.setAttribute("src",r.url),n.setAttribute("alt",r.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:ei,"important"),n.style.color=null!=t?t:ti}}})},[ri]:()=>{const{buttonLabel:i,showArrowIcon:r,showCloseButton:o=!0}=mi(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[oi]:()=>{}})[t]()})(r,o,e),yield gi(),!d&&wi(o,!0),yi(t,o)});st(".advertory-brandmetrics-survey{width:100%}");const qi="advertory-brandmetrics-survey",Di=()=>e(void 0,void 0,void 0,function*(){const{norstat:{enabled:t}={},country:n,isMobileApp:i,tcf:r}=k.get(),o=yield u(r,i,n,"norstat");if(!t||i||!o)return;const d=(e=>{const{ppid1:t,ppid2:n}=te.getPPIDs(),{ppid1:i,ppid2:r}=ne.getPPIDs(),o=(new ee).add(n,K[e]).add(t,G[e]).add(r,J[e]).add(i,Y[e]);return`${o.buildNorstatPath()}?${o.buildNorstatQuery("alias").toString()}`})(n);((t,n,...i)=>{e(void 0,[t,n,...i],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${n===a.NO?"schibsted":"schibstedse"}/map/${d}`,"norstat")}),Mi={nativeAd:e=>Pe(e)&&!_e(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Oe,fullscreenScroll:Ce,topscroller:e=>Le(e)&&pi(),splash:e=>Le(e)&&vi(e.width,e.height),welcomePage:Le,wallpaper:$e,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Be,hFormat:Fe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Fe(e)&&!Be(e),topboard:e=>e.targetId.startsWith("topboard")&&!Le(e),widescreen:Re,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:_e,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!De(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Me(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:De,midboard:Me},Ri=({adObj:e,preferredTestIdData:t})=>{var n,i;const r=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!r)return;const o=null===(i=document.querySelector(`#${r}`))||void 0===i?void 0:i.parentElement;if(!o)return;if(((e,t)=>{var n,i,r,o;const a=null===(o=null===(r=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===r?void 0:r[e])||void 0===o?void 0:o.invCode;a&&(t.dataset.invCode=a)})(r,o),null==t?void 0:t.testId)return void(o.dataset.testid=t.testId);const a="DIV"===(null==o?void 0:o.tagName);e&&a&&((e,t)=>{var n,i;for(const[r,o]of Object.entries(Mi))if(o(e)){if("nativeAd"===r){const o="default";t.dataset.testid=`${r}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:o}`;break}t.dataset.testid=r;break}})(e,o)},Bi=e=>{var t;return(null===(t=Object.entries(Mi).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Fi=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Ui=new Map;Ui.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Ui.set("panorama",{scale:.79,transformOrigin:"center center"}),Ui.set("outstream",{scale:.79,transformOrigin:"center center"}),Ui.set("integration",{scale:.79,transformOrigin:"center center"}),Ui.set("toppanorama",{scale:.8,transformOrigin:"left center"});const Vi=e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=Bi(e),r=Ui.get(i),o=document.querySelector(`#${e.targetId}`);if(!o||!r)return;if(o.style.transformOrigin=r.transformOrigin,o.style.transform=`scale(${r.scale})`,!(null==r?void 0:r.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==o?void 0:o.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},zi=e=>{var t,n,i,r,o,a;const{adScaleConfig:d,deviceType:s}=k.get();if(!(null==d?void 0:d.enabled))return;if(Ve(e,we))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=Ft(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),p=null!==(r=null==v?void 0:v.offsetWidth)&&void 0!==r?r:window.screen.width,g=null!==(a=null===(o=null==v?void 0:v.parentElement)||void 0===o?void 0:o.offsetWidth)&&void 0!==a?a:window.screen.width;((e,t=window.screen.width)=>{const n=Fi(e,t),i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${n})`,i.style.transformOrigin="left top")})(e,(p<g?p:g)-u)},Hi=(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,Wi=e=>`externalImpId:'${e}'`,Ki=e=>{var n;const{forwardExternalImpId:i=!1,tracker:r}=k.get(),o=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${U()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const r=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:r})})(e),{id:a,sizes:d,keywords:s,allowedFormats:l,invCode:c,ssa:u=!1,nativeCustomProperties:v,safeframeConfig:p,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ci())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!==ri),r=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),o=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:o,keywords:r})})(o),h=Object.assign({invCode:c,sizes:d,targetId:a,keywords:Hi(s,u),allowedFormats:l,dynamicSizeWidthCheck:g},p&&{safeframeConfig:p}),m=(e=>{var n,i,r,o,a,d,s;return e?(null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)?(null===(r=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===r?void 0:r.pageViewId)?(t("Tracker state pageViewId is:",null===(a=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===a?void 0:a.pageViewId),null===(s=null===(d=null==e?void 0:e.instance)||void 0===d?void 0:d.state)||void 0===s?void 0:s.pageViewId):(t("Tracker state does not contain field pageViewId or it is empty"),""):(t("Tracker state is empty"),""):(t("Tracker is not configured in initAdvertory function"),"")})(r);i&&m&&(t("External Impression ID assigned to defineTag:",Wi(m)),h.externalImpId=Wi(m));const y=(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},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{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}}))(v);return(null===(n=e.allowedFormats)||void 0===n?void 0:n.includes("native"))&&(h.native=y),h},Gi=e=>!e.includes("takeover")||ci(),Ji=e=>{const{source:t}=e;return"csm"===t},Yi=(e,t,n,i)=>{const r=t.parentElement;if(!r)return;const o=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${o}-${n}${a}`,s=`advertory${o}-${n}-wrapper${a}`;t.classList.remove(...t.classList),r.classList.remove(...r.classList),t.classList.add(d),r.classList.add(s),t.dataset.adType=n},Qi="native-ad",Xi=e=>{if(!e)return e;const{country:t}=k.get(),n=F(t),i=e[`${n}-targetid`],r=i?Lt(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[r]})},Zi=e=>{const{country:t}=k.get(),n=F(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},er=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],r=e.find(e=>e.invCode===i),o=document.querySelector(`[id^=${null==r?void 0:r.id}]`);o&&o.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"})})()},tr=(t,n)=>e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{t().then(t=>{e(null!=t?t:null)}).catch(t=>{e(null)})})}),nr="https://dr-edition-teaser-server.inventory.schibsted.io/xandr";new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"}));const ir={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},rr={no:"NOK",se:"SEK"},or={no:"no",se:"sv"};class ar{buildFetchObject(t,n,i,r){return e(this,void 0,void 0,function*(){const{country:o,pageOptions:a}=r,{invCode:d,xandrPlacementId:s}=t,l=yield e(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var r;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(r=n.tcString)&&void 0!==r?r:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),c=(u=Object.assign(Object.assign({},n),i),Object.entries(u).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var u;const v=new URL(window.location.href),g=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(ir),ver:"1.1"}})(t),h=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(t);return{id:Tt(36),imp:[Object.assign(Object.assign(Object.assign({id:d},g&&{native:g}),h&&{banner:h}),{secure:1,tagid:d,ext:{appnexus:Object.assign(Object.assign({},s&&{placement_id:s}),{code:d,keywords:c,use_pmt_rule:!1})}})],site:{domain:v.hostname,page:v.href,publisher:{id:String(a.publisherId),domain:v.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||or[o]||"no").split("-")[0]},regs:{ext:{gdpr:l.gdpr||0}},user:{id:yield p(r),ext:{consent:l.gdpr_consent||"",eids:ae(o)}},at:1,cur:[rr[o]],source:{tid:Tt(36)},ext:{prebid:{bidder:{appnexus:{member:a.member}}}}}})}fetchData(n,i,r,o){return e(this,void 0,void 0,function*(){try{t("Starting fetching Studio ad from Xandr:",nr);const e=new Headers({"Content-Type":"application/json"}),a=new URLSearchParams(window.location.search),d=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=a.get(e);return t?[[e,t]]:[]})),s=d.size>0?`${nr}?${d.toString()}`:nr,l=yield this.buildFetchObject(n,i,r,o),c=yield H.post(s,e,l);return t("Fetch operation completed successfully.",c),c}catch(e){t("Error during fetch operation:",e)}return null})}}const dr=0,sr=3,lr=(e,t)=>{cr(e,t),vr(e,t)},cr=(e,t)=>{var n,i;const r=document.querySelector(`#${e.targetId}`);if(!r||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const o=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==r?void 0:r.querySelectorAll(o)).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:[])gr(i)}),t.dataset.tracked="true")})},ur=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),r="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!r?null==n||n.forEach(pr):window.apntag.fireImpressionTrackers(e);const o=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(o)},vr=(e,t)=>{var n;let i=!1;const r=document.querySelector(`#${e.targetId}`);if(!r||!e.native)return;const{deviceType:o,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=o?o:I.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,ur(e),c.disconnect();break}},s);c.observe(r)},pr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?gr(e):window.navigator.sendBeacon(e)},gr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},hr=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),mr=(n,i)=>e(void 0,void 0,void 0,function*(){var e,r;const{deviceType:o,appearanceConfig:a}=i,d=null==a?void 0:a.defaultThreshold[o],s=null!==(e=n.threshold)&&void 0!==e?e:d,l=document.getElementById(n.id);if(!l)return void t(`Server-side ad container not found: ${n.id}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},jn(s)).observe(l)});const{prepareTag:c}=k.getHandlers(),u=pe.getData("alertoryConfigKeywords"),v=null!==(r=c(Ki(n)).keywords)&&void 0!==r?r:{},p=new ar,g=yield p.fetchData(n,u,v,i);g&&(((e,t,n)=>{const i=n===I.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===dr){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,g,o),g.adType===sr&&(Yi(i.publisher,l,Qi,i.pageType),lr({targetId:n.id,native:{clickTrackers:g.clickTrackers,impressionTrackers:g.impTrackers}},{deviceType:o,appearanceConfig:a,nativeTrackingConfig:i.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var r,o,a;let d;(null===(r=window.apntag.requests)||void 0===r?void 0:r.tags[e])||(null!==(o=(a=window.apntag).requests)&&void 0!==o||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),yt(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(n.id,n.invCode,l,g.bid))}),yr=(e,n)=>{e.forEach(e=>mr(e,n).catch(e=>{t("Failed to handle server-side ad:",e)}))},fr={arrayMerge:(e,t)=>t},wr=n=>e(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))})(n))return n;try{const i=yield(n=>e(void 0,void 0,void 0,function*(){const e=(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})(n);if(!e)return null;const i=new AbortController,r=setTimeout(()=>i.abort(),5e3);try{return yield H.get(e,{method:"GET",signal:i.signal})}catch(n){throw t("Failed to fetch S3 config",{error:n,url:e}),n}finally{clearTimeout(r)}}))(n);return i?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:r,placements:o,threshold:a,batchSize:d}=t,s=y.all([e.placements,o],fr),l=y(e.pageOptions,{keywords:i},fr),c=y(e.appearanceConfig,{defaultThreshold:a},fr),u=y(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:r},fr);return Object.assign(Object.assign({},e),{placements:s,requestSize:null!=d?d:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:u})})({siteConfig:n,configOverrides:i}):n}catch(e){return t("Error fetching S3 config, using site config",{error:e}),n}}),br=".advertory-right-column-track",Er="--advertory-right-column-track-height",kr=e=>e.getBoundingClientRect().top+window.scrollY,Tr=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Ir=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Ar=(e,t)=>`${e}-${t}`,Sr=(e,t,n)=>{var i;const r=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),o=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===o.length)return;const a=kr(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Tr(e);Ir("--advertory-newsroom-header-height",t)})(),o.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=kr(e),r=Ar(Er,t),o=i-n,a=Ar("--advertory-right-column-split-point-height",t),d=Tr(e);Ir(r,o),Ir(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ar("--advertory-right-column-ad-height",t),i=Tr(e);Ir(n,i)})(r[t])});((e,t)=>{const n=kr(e);Ir(Er,n-t)})(o[Math.min(r.length,o.length-1)].point,a)};let xr=!1;class Cr{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:r}=new URL(n);if(!i.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const o=r.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Pr{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Or{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t){return e(this,void 0,void 0,function*(){var e,n,i,r,o,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(e=this.parseKilkayaData(t))||void 0===e?void 0:e.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(t,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(t){return e(this,void 0,void 0,function*(){var e,n,i,r,o,a;if(!this.pulse)return;const d=this.getEventInput(t,"click");this.pulse.trackLegacyClickUIElement?null===(n=(e=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(e,d):this.pulse.trackClickUIElement?null===(r=(i=this.pulse).trackClickUIElement)||void 0===r||r.call(i,d):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,d)})}}class Lr extends Or{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,r,o,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),v=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(r=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==r?r:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=v?v:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const jr="[data-k5a-teaser-analytics]",$r=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const r=new Lr(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(jr);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(r.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(jr);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(r.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>r.trackContentClick(e))})};class Nr{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[ce.VG]:new Cr}[n]||new Pr;$r(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var n;const i=null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.streamSlot;if(!i)return;const r=i.parentElement;r&&(t(`Kilkaya placement ${i.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r))})}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:"";qt(i)}loadKilkayaScript(t){return e(this,void 0,void 0,function*(){yield ye(t)})}run(t){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i,kilkaya:r}=t;if(!(null==r?void 0:r.enabled))return;const o=yield u(e,n,i,"kilkaya");o&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(o),yield this.loadKilkayaScript(r.url),this.handleKilkayaStreamTracking(t))})}}const _r=1e4,qr=e=>e.some(e=>e.some(e=>!!e&&Kn(e,0)));let Dr;const Mr=()=>{const{widescreenSwitching:e}=k.get(),{enabled:t,rotationInterval:n=_r,widescreenIdPrefix:i}=null!=e?e:{};if(!t)return;const r=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=k.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let o=0,a=Date.now(),d=qr(r);if(!r.length)return;Dr&&window.removeEventListener("scroll",Dr);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(r);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=qr(r)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(o),t=r.map(e=>e[o]),n=r.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),o=l(o),a=Date.now())},1e3);Dr=c,window.addEventListener("scroll",c)};st('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const Rr=e=>document.querySelector(`#${e}`);let Br,Fr=[];const Ur=["takeover","wallpaper"],Vr=e=>{const t=(e=>{const t=pe.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:r,glimr:o,appearanceConfig:a,requestSize:d=b,publisher:s,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:s,country:l,pageType:c,deviceType:u,placements:i,tcf:r,requestSize:d,isMobileApp:v,useAppTabletInvCode:m},o&&{glimr:o}),n&&{queryConfig:n}),a&&{appearanceConfig:a}),g&&{takeover:g}),h&&{fullscreenScroll:h})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},zr=()=>e(void 0,void 0,void 0,function*(){const{pageOptions:t}=k.get(),{preparePageOptions:n}=k.getHandlers(),i=(()=>{const{sandboxAdIframeEnabled:e=!0}=k.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"]}})(),r=yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=k.get();return(yield u(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},t),{renderingManagement:Object.assign({},i)}),r));(e=>{const t=pe.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Zi(e);pe.setData("alertoryConfigKeywords",n)})(o.keywords),St(()=>Br.setPageOpts(o))}),Hr=n=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:i,isMobileApp:r,country:o}=k.get(),a=yield u(i,r,o,"loadPlacements"),d=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>_t(e.id)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(n,a);Wr(d);(null==e?void 0:e.enabled)&&a&&!wt()?(t("core loadPlacements prebid enabled"),yield bt()):(t("core load tags invoked without prebid enabled"),Kr(d))}),Wr=e=>{const{prepareTag:n}=k.getHandlers(),i=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),r=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===r?-1:-1===i&&-1!==r?1:i-r})})(e).forEach(e=>{t("core defineTags",{placement:e});const r=Ki(e);if(Gi(e.id)){const o=n(r),a=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:r}=e;return{adTypes:t,invCode:n,keywords:Xi(i),sizes:r}})(o);i.push(a),St(()=>(t("core defineTag - add to the queue",{placement:e,preparedTag:o}),Br.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)})(i)},Kr=e=>{const n=e.filter(({id:e})=>Gi(e)).map(({id:e})=>e);n.length&&St(()=>(t("core loadTags",{placementsIdsToLoad:n}),Br.loadTags([...n])))},Gr=(n,i)=>e(void 0,void 0,void 0,function*(){const{appearanceConfig:e,deviceType:r}=k.get(),{threshold:o,refresh:a}=n,d=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(i),s=null==e?void 0:e.defaultThreshold[r];d&&(t("core showAd - subscribe for show tag with thresholds",{placement:n,adObj:i,threshold:o,deviceDefaultThreshold:s}),yield _n(d,null!=o?o:s)),d&&a&&(t("core showAd - setup refreshing",{placement:n,adObj:i}),d.dataset.refresh=a.toString())}),Jr=e=>e.some(({id:e})=>Ur.some(t=>e.includes(t))),Yr=n=>e(void 0,void 0,void 0,function*(){var i;if(!(null===(i=null===window||void 0===window?void 0:window.advertory)||void 0===i?void 0:i.initialized))return;const[r,o]=(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]]},[[],[]]))(n),a=(e=>{const{requestSize:t=b,queryConfig:{placementBatches:n}={},deviceType:i}=k.get(),r=Ht(e),o=Object.keys((null==n?void 0:n[i])||{}).map(e=>r[e]||[]).filter(e=>e.length>0),a=new Set(o.flat().map(({id:e})=>e)),d=e.filter(({id:e})=>!a.has(e));return[...o,...Hn(d,t)]})(o);for(const e of a)Jr(e)?(t("core loadAds without lazy loading",{placementsToLoad:e}),yield Hr(e)):e.length&&(t("core loadAds with lazy loading",{placementsToLoad:e}),yield Qr(e));yield(t=>e(void 0,void 0,void 0,function*(){if(!t.length)return;const{appearanceConfig:e,deviceType:n}=k.get(),i=null==e?void 0:e.defaultThreshold[n];for(const e of t){const{threshold:t,id:n}=e,r=Rr(n);r&&(yield _n(r,null!=t?t:i))}}))(r)}),Qr=n=>e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:e=!1,rootMargin:i="200% 0px"}={}}={}}=k.get(),r=[];if(!e)return t("lazy load is not enabled",{placements:n}),void(yield Hr(n));const o=new IntersectionObserver((e,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{t("lazy load is enabled - handler start",{loadedPlacementIds:r,placements:n});const o=n.every(e=>r.includes(e.id)),a=n.map(e=>e.id);!o&&r.push(...a),!o&&Hr(n),t("lazy load is enabled - handler stop",{loadedPlacementIds:r,placements:n,arePlacementsLoaded:o,placementIds:a}),i.disconnect()})},{rootMargin:i});n.forEach(e=>{const n=document.getElementById(e.id);n&&(t("lazy loading - observe element",{placementId:e.id,element:n}),o.observe(n))})}),Xr=()=>e(void 0,void 0,void 0,function*(){const{siteEvents:n,initNativeAd:i,wallpaperHandlers:{initWallpaperAd:r,adjustAdToHorseshoe:o}}=k.getHandlers(),{wallpaper:a,fullscreenScroll:d}=k.get(),s=[];St(()=>{Br.onEvent("adRequested",()=>{n.adRequested()}),Br.onEvent("adAvailable",o=>e(void 0,void 0,void 0,function*(){var e,s,l,c,u,v;t("core adAvailable start",{placementsAvailable:Fr,adObj:o,isFullscreenScrollAd:Ce(o),isFinnBlink:qe(o.targetId),isNativeAd:Pe(o),isMediation:Ji(o),isTakeoverAd:Le(o),isCollapseAd:Ne(o),isWallpaperAd:$e(o)});const p=null===(l=null===(s=null===(e=null===window||void 0===window?void 0:window.apntag)||void 0===e?void 0:e.requests)||void 0===s?void 0:s.tags[o.targetId])||void 0===l?void 0:l.adResponse.ads;Ji(o)&&p&&(null===(c=p[1])||void 0===c?void 0:c.rtb)&&(o.banner=null===(v=null===(u=p[1])||void 0===u?void 0:u.rtb)||void 0===v?void 0:v.banner),Ce(o)&&ht(o),Re(o)&&Mr(),Ce(o)&&!qe(o.targetId)&>(o,d),!Pe(o)||Ji(o)||qe(o.targetId)||i(o,k.get()),Le(o)&&!Ne(o)&&(Ni(o.targetId),yield _i(o)),$e(o)&&(r(()=>St(()=>window.apntag.showTag(o.targetId)),a),pe.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&pe.setData("horseshoe",{isAvailable:!0}),Ri({adObj:o}),(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:r}=e;r?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),n.adAvailable(o);const g=Fr.find(({id:e})=>e===o.targetId);g&&(yield Gr(g,o),Fr=Fr.filter(e=>e.id!==g.id)),t("core adAvailable stop",{placementsAvailable:Fr,adObj:o,isFullscreenScrollAd:Ce(o),isFinnBlink:qe(o.targetId),isNativeAd:Pe(o),isMediation:Ji(o),isTakeoverAd:Le(o),isCollapseAd:Ne(o),isWallpaperAd:$e(o)})})),Br.onEvent("adLoaded",e=>{const{refreshConfig:t,appearanceConfig:r}=k.get(),a=document.getElementById(e.targetId);qe(e.targetId)&&(e=>{const{fullscreenScroll:t}=k.get(),{initNativeAd:n}=k.getHandlers();Ce(e)&>(e,t),Pe(e)&&n(e,k.get())})(e);s.includes(e.targetId)&&Pe(e)&&(i(e,k.get()),Ri({adObj:e})),!s.includes(e.targetId)&&Ji(e)&&s.push(e.targetId),Ne(e)&&_t(e.targetId),Le(e)&&((e,t)=>{var n;const i="100%",r="100%";e.resizeAd(t,[i,r]);const o=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(o),t=e.width,n=e.height;t===i&&n===r||(o.style.width=i,o.style.height=r)}}).observe(o,{attributes:!0,attributeFilter:["style"]})})(Br,e.targetId),Oe(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=k.get();if(!t||!n||!i)return;const r=t.parentElement;r&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),r.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(e),(e=>Ve(e,be))(e)&&(e=>{var t;const n=document.querySelector(`#${e.targetId}`),i=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,r=null==n?void 0:n.querySelector("iframe"),o=null==r?void 0:r.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={}}=k.get();if(!(n&&r&&o&&i))return;i.classList.add(`advertory-${a}-${d}__vertical-full-width-ad-wrapper`);const s=window.innerWidth,l=Math.round(s/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${d}__vertical-full-width-ad`);const c=Fi(e,n.offsetWidth);o.style.transform=`scale(${c})`,o.style.transformOrigin="left top"})(e),((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),r=null==i?void 0:i.parentElement;if(!r||!i)return;Un({adWrapper:r,placementContainer:i});const{delayTime:o=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&zn(i,a,o))})(e,t),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(e.targetId);pe.getData("horseshoe").isAvailable&&o(e.targetId),zi(e),n.adLoaded(e),mt(e.targetId),a&&(a.classList.add(ft),(e=>{var t,n;const{siteSpecificConfig:i}=k.get(),r=null!==(t=null==i?void 0:i.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(a)),Vi(e),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:e.targetId,adFormat:Bi(e)}}))}),Br.onEvent("adNoBid",t=>e(void 0,void 0,void 0,function*(){_t(t.targetId),yield wn(k.get(),t),hi(t)&&(yield gi()),n.adNoBid(t)})),Br.onEvent("adError",(t,i)=>e(void 0,void 0,void 0,function*(){hi(i)&&(yield gi()),n.adError(t,i)})),Br.onEvent("adCollapse",()=>{n.adCollapse()}),Br.onEvent("adRequestFailure",t=>e(void 0,void 0,void 0,function*(){_t(t.targetId),yield wn(k.get(),t),n.adRequestFailure(t)})),Br.onEvent("adBadRequest",t=>e(void 0,void 0,void 0,function*(){_t(t.targetId),yield wn(k.get(),t),n.adBadRequest(t)})),Br.onEvent("adLoadedMediated",e=>n.adLoadedMediated(e)),Br.onEvent("adNoBidMediated",t=>e(void 0,void 0,void 0,function*(){yield wn(k.get(),t),n.adNoBidMediated(t)}))})}),Zr=(n,i)=>e(void 0,void 0,void 0,function*(){var r;k.set(n),k.setHandlers(i),pe.initialize(),window.addEventListener("message",Ln,!1),Br=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=Br,t("Apn tag is set up on window"),yield Promise.allSettled([e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=k.get();(yield u(e,t,n,"xandr-endpoint"))||Br.setEndpoint("ib.adnxs-simple.com",!0)}),e(void 0,void 0,void 0,function*(){if(wt())return;const{prebid:e,tcf:t,isMobileApp:n,country:i}=k.get(),r=yield u(t,n,i,"prebid");(null==e?void 0:e.enabled)&&r&&(yield ye(null==e?void 0:e.url))}),ie(n),e(void 0,void 0,void 0,function*(){const{astUrl:e}=k.get();yield ye(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),e(void 0,void 0,void 0,function*(){const{gptUrl:e,tcf:t,isMobileApp:n,country:i}=k.get();(yield u(t,n,i,"gpt-endpoint"))&&(yield ye(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:r}=k.get(),{getConsentAsync:o}=c(n,0,r),a=yield o();if(e&&t&&a){if(yield ye(t),document.querySelector(`.${qi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(qi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),q(),e(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=k.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield ye(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Di(),t("Libraries have been loaded and trackers have been set"),yield(r=i.librariesToLoad,e(void 0,void 0,void 0,function*(){const e=r.map(e=>ye(e));yield Promise.all(e)})),yield Xr(),yield zr(),t("Page options have been set"),Vr(n),t("Advertory is setup on window");const{clientSidePlacements:o,serverSidePlacements:a}=hr(Vt());Fr=o,yr(a,n),Gn(Fr),Yn(Fr),yield Yr(Fr),t("Ads has been loaded",Fr),bn(n,Fr),er(Fr),yield i.replaceAdsWithFinnBlink(n.finnBlink),yield(t=>e(void 0,void 0,void 0,function*(){var e;if(!t.drEdition)return;if(!(yield u(t.tcf,t.isMobileApp,t.country,"handleDrEdition")))return;const n=yield gn(),i=new hn(n);mn({publisher:t.publisher,drEditionConfig:t.drEdition,device:t.deviceType,pageType:t.pageType,country:t.country},i,null===(e=t.pulse)||void 0===e?void 0:e.instance)}))(n),(e=>{if(!(null==e?void 0:e.enabled)||xr)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=br}=e,r=document.querySelector(i);if(!r)return;xr=!0;const o=()=>{Sr(r,n,t)};o(),window.addEventListener("resize",o),window.addEventListener("orientationchange",o),window.addEventListener("load",o),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(o)}),new ResizeObserver(o).observe(r)})(n.rightColumnSplit),yield(t=>e(void 0,void 0,void 0,function*(){const e=new Nr;yield e.run(t)}))(n)}),eo=(n,i)=>e(void 0,void 0,void 0,function*(){yield((n,i)=>e(void 0,void 0,void 0,function*(){const{initConsentManager:e,getConsentAsync:r}=c(n.tcf,n.isMobileApp,n.country),o=yield wr(n);yield yn(),yield tr(e),yield tr(r),t("TCF resolved successfully"),yield Zr(o,i),t("Run function resolved successfully")}))(n,i)}),to=()=>{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},no=(e,t,n,i)=>{var r;const{image:o,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:v,video:p,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:E}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(o),imgWidth:null==o?void 0:o.width,imgHeight:null==o?void 0:o.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==v?void 0:v.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(r=null!=u?u:g)&&void 0!==r?r:"",desc2:null!=v?v:"",video:p,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=E?E:""},t)},io=(e,t)=>{const n=(i=r,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(r),a=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?a?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},ro=(e,t,n,i)=>{const r=document.querySelector(`#${e}`);r&&t&&(r.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:r}=t,o=i&&Object.values(ce).includes(i);n&&o&&Yi(i,e,Qi,r)})(r,n),i())},oo=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:r,videoTemplates:o}=n,d="default";if(!e.native)return null;const{native:s,targetId:l}=e,{desc2:c=d}=e.native,u=c.toLowerCase(),v=null!==(i=io(e.targetId,c))&&void 0!==i?i:u,p=lt[t.language||a.NO],g=no(s,p,l,t);return(s.video?o[v]:r[v]||r.default)(g,t)})(e,t,n);ro(e.targetId,i,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&lr(e,t)})};st('@import"https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap";.advertory-klart-ad-native-content{position:relative;font-family:Roboto,sans-serif;font-style:normal;background-color:#e4f0ff;font-size:12px;margin-top:8px;width:100%;box-shadow:rgba(0,0,0,.05) 0 2px 2px 0}.advertory-klart-ad-native-content .ad-info{position:absolute;right:5px;top:2px;height:26px;width:26px;z-index:50;border-bottom-left-radius:13px;border-top-right-radius:13px}.advertory-klart-ad-native-content .ad-info svg path{fill:#fff}.advertory-klart-ad-native-content .ad-link{color:inherit;text-decoration:none}.advertory-klart-ad-native-content .ad-link .ad-header{position:absolute;z-index:9;width:100%;box-sizing:border-box;font-family:Roboto,sans-serif;background-color:rgba(42,114,221,.7);border:1px solid rgba(34,34,34,.1);border-bottom:none}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-header{position:relative}}.advertory-klart-ad-native-content .ad-link .ad-header .ad-annonse{display:inline-block;font-weight:bold;color:#fff;line-height:15px;background-color:#2a72dd;padding:6px 16px}.advertory-klart-ad-native-content .ad-link .ad-content{display:flex;flex-direction:column;background-color:#fff;padding:0}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content{display:flex;flex-direction:row;justify-content:space-between;padding:10px 16px 12px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content{display:flex;flex-direction:column;justify-content:space-between;order:2;margin:8px 16px;width:calc(100% - 32px)}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content{order:1;margin:0;width:inherit}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-subtitle{order:3;padding:10px 16px 0 0;font-size:14px;line-height:16px;color:#444}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-subtitle{order:2;padding:10px 16px 16px 0}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-sponsored{order:1;margin-bottom:4px;color:#2a72dd;font-family:Roboto,sans-serif;font-style:normal;font-weight:bold;line-height:13px;text-transform:uppercase}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-sponsored{order:3;margin-top:8px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-title{color:#222;font-size:22px;font-style:normal;font-weight:bold;line-height:25px;order:2}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-data-content .ad-title{font-size:24px;line-height:28px}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container{order:1}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container{order:2}}.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{position:relative;margin-top:0;width:100%;height:auto;aspect-ratio:1200/628}@media screen and (min-width: 768px){.advertory-klart-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{width:268px;max-height:140px;margin:0 0 10px 0}}.advertory-klart-ad-native-content .ad-link .ad-gambling{display:flex;justify-content:space-between;border-top:1px solid #ccc;padding-top:8px;padding-bottom:8px;margin:0 16px 0 16px}.advertory-klart-ad-native-content .ad-link .ad-gambling .ad-gambling-text{line-height:14px;color:#6a6a6a}.advertory-klart-ad-native-content .ad-link .ad-gambling .ad-gambling-link{line-height:14px;color:#0078bd;text-decoration:underline !important}.advertory-klart-ad-native-content.article{border-left:4px solid #2a72dd}@media screen and (min-width: 768px){.advertory-klart-ad-native-content.article{border-left:unset}}.advertory-klart-ad-native-content.article .ad-content{display:flex;flex-direction:row-reverse;align-items:center}@media screen and (min-width: 768px){.advertory-klart-ad-native-content.article .ad-content{flex-direction:unset}}.advertory-klart-ad-native-content.article .ad-content .ad-data-content{display:flex;margin:0 10px 0 0}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-annonse{order:1;color:#fff;background-color:#0366b4;font-size:12px;padding:2px 4px;text-transform:uppercase;font-weight:bold;margin-bottom:unset;width:fit-content}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-title{order:2;line-height:23px;font-size:15px}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-subtitle{order:3;font-size:15px}.advertory-klart-ad-native-content.article .ad-content .ad-data-content .ad-sponsored{order:4;color:gray}.advertory-klart-ad-native-content.article .ad-content .ad-image-container{width:150px;margin:10px}');st('@import"https://fonts.googleapis.com/css?family=Roboto:400&display=swap";.advertory-klart-ad-native-classic{border-top:4px solid #2a72dd;position:relative;font-family:Roboto,sans-serif;font-style:normal;background-color:#fff;color:#000;width:100%}.advertory-klart-ad-native-classic .ad-info{top:2px;right:0;position:absolute;height:26px;width:26px;z-index:1000;border-bottom-left-radius:13px;border-top-right-radius:13px}.advertory-klart-ad-native-classic .ad-link{color:inherit;text-decoration:none;display:block}.advertory-klart-ad-native-classic .ad-link .ad-content{border-left:1px solid rgba(34,34,34,.1);border-right:1px solid rgba(34,34,34,.1);border-bottom:1px solid rgba(34,34,34,.1);display:flex;flex-direction:column}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-header{display:flex;padding:8px 16px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-header .ad-annonse{font-size:14px;font-weight:bold;color:#2a72dd;content:"ANNONS";display:inline-block;text-align:left;vertical-align:middle}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content{padding:8px 16px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-subtitle{font-family:Roboto,sans-serif;font-size:15px}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-subtitle .ad-sponsored{color:#2a72dd;font-weight:bold;text-transform:uppercase}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-title{font-weight:bold;font-size:30px;letter-spacing:-1px;line-height:1.08;margin:0 0 4px}@media screen and (min-width: 768px){.advertory-klart-ad-native-classic .ad-link .ad-content .ad-data-content .ad-title{font-size:54px;letter-spacing:-1.8px;font-weight:bold}}.advertory-klart-ad-native-classic .ad-link .ad-content .ad-image-container .ad-image{position:relative;width:100%;height:100%;aspect-ratio:2.8;object-fit:cover;object-position:center}.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:24px;font-weight:700;border:5px solid #000;padding:10px 0;text-align:center;justify-content:center;background:#fff;font-family:Roboto,sans-serif;color:#000;display:flex;flex-direction:column;box-sizing:border-box}@media screen and (min-width: 440px){.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:30px}}@media screen and (min-width: 768px){.advertory-klart-ad-native-classic .ad-link .alcohol-warning{font-size:48px}}[data-theme=dark] .advertory-klart-ad-native-classic{background-color:#222;color:#fff}');const ao={CONTENT_DISPLAY:({containerId:e,url:t,adContentFrom:n,adText:i,sponsoredBy:r,title:o,img:a,description:d,desc2:s})=>`<article class="advertory-klart-ad-native-content">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-header">\n <span class="ad-annonse">${i}</span>\n </div>\n <div class="ad-content">\n <div class="ad-data-content">\n <div class="ad-title">${o}</div>\n ${d&&`<div class="ad-subtitle">${d}</div>`}\n <div class="ad-sponsored">${n} ${r}</div> \n </div>\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${a}" />\n </div>\n </div>\n ${"gambling"===s?'<div class="ad-gambling">\n <div class="ad-gambling-text">Åldersgräns för spel är 18 år.</div>\n <div class="ad-gambling-link">www.stodlinjen.se</div>\n </div>':""}\n </a>\n </article>`,CLASSIC:({containerId:e,url:t,adText:n,sponsoredBy:i,title:r,img:o,description:a,desc2:d},s)=>{const l=Ue({native:{desc2:d}}),c=l?"advertory-klart-ad-native-classic-alcohol":"",u=l?'<div class="alcohol-warning">Alkohol kan skada din hälsa</div>':"",{deviceType:v}=s,p=(e=>e===I.DESKTOP)(v)?"":' target="_blank" rel="noopener"';return`<article class="advertory-klart-ad-native-classic ${c}">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"${p}>\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">${n}</span>\n </div>\n <div class="ad-image-container">\n <img alt="${r}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-data-content">\n <div class="ad-title">${r}</div>\n <div class="ad-subtitle">\n <span class="ad-sponsored">${i}</span> ${a}\n </div>\n </div>\n </div>\n ${u}\n </a>\n </article>`}},so={displayTemplates:{brandstudio_native_ad:ao.CLASSIC,brandstudio_native_ad_alcohol:ao.CLASSIC,default:ao.CONTENT_DISPLAY,gambling:ao.CONTENT_DISPLAY},videoTemplates:{}},lo=e=>{const t=e.querySelector(".advertory-klart-ad-native-classic-alcohol");if(!t)return;const n=t.querySelector(".ad-content"),i=t.querySelector(".alcohol-warning");if(!i||!n)return;const r=(e=>{const t=e.getBoundingClientRect().height;return Math.floor(.25*t)})(n);i.style.height=`${r}px`};st(".advertory-klart-native-ad-wrapper__front{align-items:center;clear:both;display:flex;justify-content:center;overflow:hidden}.advertory-klart-native-ad-wrapper__front .advertory-klart-native-ad__front{position:relative;width:100%;min-height:120px;z-index:10}");const co=((e,t)=>n=>eo(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e,i=document.querySelector(`#${n}`);if(!i)return;const{pageType:r=rn.FRONT,deviceType:o,nativeTrackingConfig:d,appearanceConfig:s}=null!=t?t:{},l={language:a.SE,publisher:ce.KLART,deviceType:o,pageType:r,nativeTrackingConfig:d,appearanceConfig:s};oo(e,l,so),Ue(e)&&lo(i)},wallpaperHandlers:{initWallpaperAd:At,adjustAdToHorseshoe:At},loadFinnBlinkAd:It,replaceAdsWithFinnBlink:It,preparePageOptions:se,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:r=!0}=k.get(),o=((e,t)=>{const{isMobileApp:n}=k.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,r),a=(e=>{const{country:t}=k.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,r=`${F(t)}-adformat`,o=n?n[r]:[];if(!o)return{};const a=(Array.isArray(o)?o:[o]).filter(e=>!(e in xe)||window.innerWidth>=xe[e]);return{[r]:i?a:o}})(e),d=(e=>{const{country:t}=k.get(),n=`${F(t)}-targetid`;return e?{[n]:[e]}:{}})(n),s=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(o),l=to();return Object.assign(Object.assign({},e),{invCode:o,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),s),l)})},siteEvents:le,librariesToLoad:[]},ue),uo=st("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var vo=Object.freeze({__proto__:null,default:uo});exports.getVideoPPIDs=t=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:n}=te.getPPIDs(),{ppid1:i,ppid2:r}=ne.getPPIDs(),o=(new ee).add(n,K[t]).add(e,G[t]).add(r,J[t]).add(i,Y[t]);return yield new Promise(e=>{e(o.buildVideoEids())})}),exports.initAdvertoryPackage=co,exports.updateAdvertory=(t,n)=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return[];const{clearAds:i,reloadExistingAds:r,renderFinnBlinkPlacements:o,contextSelector:a}=null!=n?n:{};if(i)return Rt(),[];r&&(Rt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{qt(e.id)})),T(null!=t?t:{}),yield zr();const{clientSidePlacements:d,serverSidePlacements:s}=hr(Vt(a));let l=d;return o&&(l=l.filter(e=>qe(e.id))),yr(s,k.get()),l.length>0&&(Fr=[...Fr,...l.map(e=>Object.assign({},e))],Gn(l),Yn(l),yield Yr(l)),Fr});
|