1import{d as k,i as j,h as M,e as $,a8 as C,ay as F,b5 as P,aH as H,o as A,b as L,F as K,k as m,aN as O,w as V,aQ as q,m as l,ac as T,a as U,z as y}from"./zYj6vDai.js";import{l as b}from"./C8Y_YUgq.js";const R={class:"lc-feed-container"},z={style:{"text-align":"center"}},D=k({__name:"allerLiveBlog",props:{componentContent:{type:Object,required:!0},adPostInterval:{type:Number,default:3},showAds:{type:Boolean,default:!0},scrollElementId:{type:String,default:"linked-post"}},setup(i){const s=i;j(async()=>{await x(),E(),B()});const p=y(),r=y();function E(){const e=window.NcPosts,t=window.NcLiveCenterExtensions;!e||!t||(s.showAds&&e.hookOptionsAfterDefaults(n=>I(e,n)),e.start({channelId:s.componentContent.channelId,tenantKey:s.componentContent.tenantKey,container:p.value,showMoreElement:r.value,extensionContainer:t,baseUrl:"https://livecenter.norkon.net/",wsBaseUrl:"wss://livecenterws.norkon.net/"}))}const v=M("liveCenterLoaded",()=>!1);async function x(){v.value||(await b("https://livecenter.norkon.net/scripts/ncposts/ncposts-6.1.1.min.js"),await b(`https://livecentercdn.norkon.net/LiveCenter/ExtensionJs/${s.componentContent.tenantKey}`),v.value=!0)}const w=$();function B(){if(w.query.p){const e=document.getElementById(s.scrollElementId);e&&C(()=>e.scrollIntoView())}}function I(e,t){let n=null;const o=[];t.starting=e.appendFunction(t.starting,d=>{d.listManager.listChanged=e.appendFunction(d.listManager.listChanged,c=>{c.forEach((a,f)=>{const S=c.findIndex(u=>u.id===n);((u,g)=>g?u-g:u)(f,S)%s.adPostInterval===0&&!o.includes(a.id)&&(o.push(a.id),N(a.container))}),n=o[o.length-1]})})}const _=[];F(()=>{_.forEach(e=>e())});function N(e){const t="mob_intext_ad_liveblog",n="dsk_intext_ad_liveblog";h(t,e),h(n,e)}function h(e,t){if(t.hasAttribute(`data-ad-loaded-${e}`))return;t.setAttribute(`data-ad-loaded-${e}`,"true");const n=document.createElement("div");n.setAttribute("data-type","ad");const{isMobileAd:o,minHeight:d,cleanupAd:c,injectAd:a}=P({},H(n)),f=o?["lg:hidden","flex"]:["hidden","lg:flex"];n.classList.add(...f,"items-center","justify-center","mb-20"),n.style.minHeight=`${d}px`,t.parentNode?.insertBefore(n,t.nextSibling),C(a),_.push(c)}return(e,t)=>{const n=q,o=O;return A(),L(K,null,[m(o,null,{default:V(()=>[m(n,{href:"https://livecenter.norkon.net/scripts/ncposts/ncposts-6.1.1.min.css",rel:"stylesheet"}),m(n,{href:`https://livecentercdn.norkon.net/LiveCenter/ExtensionCss/${i.componentContent.tenantKey}`,rel:"stylesheet"},null,8,["href"])]),_:1}),l("div",R,[t[1]||(t[1]=l("div",{id:"linked-post"},null,-1)),l("div",{ref_key:"feedElement",ref:p},null,512),l("div",z,[l("button",{ref_key:"loadMoreElement",ref:r,class:"lc-load-more"},[T(e.$slots,"buttonContent",{},()=>[t[0]||(t[0]=U(" Læs mere ",-1))])],512)])])],64)}}}),J=Object.assign(D,{__name:"AllerLiveBlog"}),Q=k({__name:"liveBlog",props:{componentContent:{type:Object,required:!0}},setup(i){return(s,p)=>{const r=J;return A(),L("div",null,[m(r,{componentContent:i.componentContent},null,8,["componentContent"])])}}}),Y=Object.assign(Q,{__name:"ContentLiveBlog"});export{Y as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.