(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[419],{"KHd+":function(e,t,o){"use strict";function n(e,t,o,n,s,r,i,a){var c,p="function"==typeof e?e.options:e;if(t&&(p.render=t,p.staticRenderFns=o,p._compiled=!0),n&&(p.functional=!0),r&&(p._scopeId="data-v-"+r),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},p._ssrRegister=c):s&&(c=a?function(){s.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(p.functional){p._injectStyles=c;var d=p.render;p.render=function(e,t){return c.call(t),d(e,t)}}else{var l=p.beforeCreate;p.beforeCreate=l?[].concat(l,c):[c]}return{exports:e,options:p}}o.d(t,"a",(function(){return n}))},u5Kv:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("tb-w-section",{directives:[{name:"show",rawName:"v-show",value:!e.loaderSuspense,expression:"!loaderSuspense"}],attrs:{"no-container":e.noSectionSpacing,"no-spacing":e.noSectionSpacing},scopedSlots:e._u([{key:"content",fn:function(){return[o("skeleton-loader",{attrs:{width:"100%",height:"25rem",animation:"fade",type:"rect",radius:6,rounded:!0}})]},proxy:!0}])}),e._v(" "),o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.loaderSuspense,expression:"loaderSuspense"}]},[e.mergedSnowReports.length?o("tb-w-article-detail-snow-reports",{attrs:{"snow-reports":e.mergedSnowReports,"no-section-spacing":e.noSectionSpacing,"hide-headline":""}}):e._e()],1)])],1)};n._withStripped=!0;var s=o("m5nq"),r={name:"SnowReport",props:{id:{type:String,required:!0},type:{type:String,required:!0},noSectionSpacing:{type:Boolean,default:!1}},data:()=>({article:null,snowReports:[],snowReportsInherited:[],loaderSuspense:!1}),computed:{visibleInheritedSnowReports(){var e,t;let o=this.snowReportsInherited;return o.length?(null!==(e=this.article)&&void 0!==e&&null!==(t=e.snowReportsHidden)&&void 0!==t&&t.length&&(o=o.filter(e=>!this.article.snowReportsHidden.includes(e.id))),o):[]},mergedSnowReports(){return[...this.snowReports,...this.visibleInheritedSnowReports]}},methods:{async fetchArticle(e,t){this.article=null;try{const o=await this.articleRepository.fetch(e,{language:this.$store.state.language},t);this.article=o.payload}catch(e){console.error(e)}},async fetchSnowReports(e,t){try{const o=await this.articleRepository.snowReports(e,t);this.snowReports=o.payload}catch(e){console.error(e)}},async fetchSnowReportsInherited(e,t){try{const o=await this.articleRepository.snowReportsInherited(e,t);this.snowReportsInherited=o.payload}catch(e){console.error(e)}},async fetchArticleAndSnowReports(e=this.id){const t="skiArea"===this.type?s.a.VERSION_2:s.a.VERSION_1,o=[];this.articleRepository&&o.push(this.fetchArticle(e,t)),this.articleRepository&&t===s.a.VERSION_2?o.push(this.fetchSnowReports(e,t)):this.articleRepository&&o.push(this.fetchSnowReports(e,t),this.fetchSnowReportsInherited(e,t)),await Promise.all(o)}},watch:{article(){this.article&&setTimeout(()=>{this.loaderSuspense=!0},300)},id:{immediate:!0,handler(e){this.fetchArticleAndSnowReports(e)}}}},i=o("KHd+"),a=Object(i.a)(r,n,[],!1,null,null,null);t.default=a.exports}}]);