(self.webpackChunkwips_components_scripts=self.webpackChunkwips_components_scripts||[]).push([[75837],{"4ce88fde8c49d3ee":(e,t,a)=>{"use strict";a.d(t,{fusionTemplateApp:()=>w});var n=a("8e9d2c8e11471bbf");class r{constructor(e,t,a,n){this.articleListUrl=e,this.currentArticleUrl=t,this.filter=a,this.additionalListUrlApiParams=n}createFilterParams(){const e=[];return Object.entries(this.filter??{}).forEach((([t,a])=>{a instanceof Array?a.forEach((a=>{e.push(["docFilter["+t+"][]",a])})):e.push(["docFilter["+t,"]"+a])})),Object.entries(this.additionalListUrlApiParams??{}).forEach((([t,a])=>{e.push([t,""+a])})),e}createPagedUrl(e){if(!this.articleListUrl)return null;const t=[];e>1&&t.push(["p",""+e]),this.filter&&t.push(...this.createFilterParams());const a=new URL(this.articleListUrl);return t.forEach((([e,t])=>a.searchParams.append(e,t))),a.toString()}async fetchArticlesByPageNumber(e){e<1&&(e=1);const t=this.createPagedUrl(e);if(!t)return[];const a=await fetch(t),n=await a.json();return n?.articles??[]}async fetchCurrentArticle(){return null!==(this.currentArticle??null)?Promise.resolve(this.currentArticle):(null!==(this.currentArticlePromise??null)||(this.currentArticlePromise=new Promise((e=>{this.currentArticleUrl?(async()=>{const t=await fetch(new URL(this.currentArticleUrl??""),{}),a=await t.json();this.currentArticle=a?.article??null,e(this.currentArticle)})():e(null)}))),this.currentArticlePromise)}}var i=a("c40486de06e3466e"),s=a("6f4d764aaa9897a7"),c=a("097ef43c0fdcbe0a"),o=a("6f02679a733e0662");async function l(e,t){const a=await new FormData;a.append("pageId",""+e),a.append("duplicateArticles",t?"1":"0");const n=await fetch("/Api/fusion/setSlideshowSettings",{method:"post",body:a});n.ok&&(await n.json()).succeeded&&top.location.reload()}var d=a("46f567f79d41a730"),h=a("78b30e5cedd9ffbf");async function p(e,t){const a=await new FormData;a.append("pageId",""+e),a.append("fullscreen",t?"1":"0");const n=await fetch("/Api/fusion/setSlideshowSettings",{method:"post",body:a});n.ok&&(await n.json()).succeeded&&top.location.reload()}const u=(0,i.D)(s.G),f=(0,c.n)(s.G),m=new Promise((e=>{document.addEventListener("DOMContentLoaded",(()=>e())),"loading"!=document.readyState&&e()})),w=new class{duplicateSlideshowArticles=l;showSlideshowInFullscreen=p;pinArticle=d.k;unpinArticle=h.P;constructor(){this.headerRendered=new Promise((e=>{this.headerRenderedResolve=e})),this.contentRendered=new Promise((e=>{this.contentRenderedResolve=e})),this.articleListingRendered=new Promise((e=>{this.articleListingResolve=e})),this.articleFetchers=new Map,this.setTemplateReady()}async setTemplateReady(){await Promise.all([m,this.headerRendered,this.contentRendered]),(0,i.D)(s.G).setTemplateReady(!0)}async createPageArticleFetcher(e){let t=null,a=null;const n=f.viewMode;"article-view"==n&&(a=f.articleApiUrl),"article-list"==n&&(t=f.articleListingData?.articleListUrl??null);const i=JSON.stringify(e)+(t??"")+(a??""),s=this.articleFetchers.get(i)??null;if(s)return s;const c=new r(t,a,e?.filter??{},e?.articleListApiUrlParams??{});return this.articleFetchers.set(i,c),c}setCurrentDocument(e,t){u.$patch({currentDocumentId:t,currentPageDocumentType:e})}setPageTemplateMode(e){f.$patch({templateMode:e})}setArticleApiUrl(e){f.$patch({articleApiUrl:e})}async waitForHeaderRender(){await this.headerRendered}setContentIsRendered(){this.contentRenderedResolve()}async fullContentLoaded(){await this.contentRendered,"article-list"==await(0,o.w)(c.n,"viewMode")&&await this.articleListingRendered}setViewMode(e){f.$patch({viewMode:e})}setContentData(e){f.$patch({contentData:e})}setFooterData(e){f.$patch({footerData:e})}setReadmoreArticleData(e){f.$patch({readmoreArticleData:e})}getArticleListingData(){return(0,o.w)(c.n,"articleListingData")}async renderV1Template(e){await this.render("div#container",(()=>a("adf4df728c3aad73")("./"+(e.layoutName??"")+"/App.vue")),e,m,{headerReady:()=>{this.headerRenderedResolve()}})}setHeaderData(e){f.$patch({headerData:e}),u.$patch({currentPageLanguage:e.general?.language??null})}async render(e,t,a={},r=null,i={}){const s=Promise.all([...r?[r]:[],m]);await n.default.instance().renderVueComponentToElement(e,t,{attrs:a,on:i},s)}async renderArticleListing(e){const t=e.mode;f.$patch({articleListingData:e}),"default"==t&&null!==(e?.pageTitle??null)&&await n.default.instance().setPageTitle(e.pageTitle),this.articleListingResolve()}async renderLegacyEcwidPage(e){await this.renderContentComponent((()=>Promise.all([a.e(14486),a.e(32047),a.e(46613),a.e(14280),a.e(49333),a.e(65895),a.e(53831)]).then(a.bind(a,"12c4fb6aea409fa1"))),e)}async renderEcwidV2Page(e){await this.renderContentComponent((()=>Promise.all([a.e(16523),a.e(14486),a.e(32047),a.e(46613),a.e(14280),a.e(49333),a.e(87300),a.e(65895),a.e(49796)]).then(a.bind(a,"9707007cb877c64d"))),e)}async renderPetroarcticProfile(e){await this.renderContentComponent((()=>Promise.all([a.e(14486),a.e(62890)]).then(a.bind(a,"6211bec7892c5c46"))),e)}async renderPetroarcticProfileList(e){await this.renderContentComponent((()=>Promise.all([a.e(14486),a.e(11869)]).then(a.bind(a,"6c4224328e4c4ede"))),e)}async renderPetroarcticProfileAdmin(e){await this.renderContentComponent((()=>Promise.all([a.e(14486),a.e(19284)]).then(a.bind(a,"e790b9b315fb1be5"))),e)}renderContentComponent(e,t={}){f.$patch({viewMode:"content-component",contentData:{contentComponent:{component:e,attrs:t}}})}}},adf4df728c3aad73:(e,t,a)=>{var n={"./design-1/App.vue":["fbb0ad4ad9477d65",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,71768],"./design-2/App.vue":["0deaf8bd236124b4",72810,14937,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,79972,77981,50391,86682,76178,91318,45477,69296,10044],"./design-3/App.vue":["80aa5374725374e6",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,35369],"./design-4/App.vue":["d02e348f66f13539",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,84587],"./design-5/App.vue":["e3521111987b5b1c",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,64099],"./design-6/App.vue":["fe4a1a5c44a22a5b",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,48914],"./design-8/App.vue":["b95976f5e83670e5",72810,14937,54514,66872,19447,16523,45647,25276,14486,17334,32627,83989,37839,51285,61527,9101,950,33981,32047,63174,77981,50391,86682,76178,91318,45477,31603,69296,81588,60903],"./design-9/App.vue":["13057d122f9273c4",72810,14937,66872,19447,16523,25276,14486,17334,83989,37839,61527,9101,32047,63174,77981,50391,66682]};function r(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return Promise.all(t.slice(1).map(a.e)).then((()=>a(r)))}r.keys=()=>Object.keys(n),r.id="adf4df728c3aad73",e.exports=r}}]);