(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[141],{"7yoQ":function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return r}));var a=n("6dQ1");function s(t){return Object(a.a)()?e.from(t,"utf-8").toString("base64"):btoa(t)}function r(t){return Object(a.a)()?e.from(t,"base64").toString("utf-8"):atob(t)}}).call(this,n("tjlA").Buffer)},VjoN:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return r}));var a=n("7yoQ");function s(e){return encodeURIComponent(Object(a.b)(JSON.stringify(e)))}const r={created(){for(const e of this.$options.urlState)this.restoreStateFromUrl(e),this.$watch(e,t=>this.saveStateToUrl(e,t),{deep:!0})},methods:{saveStateToUrl(e,t=this[e]){const n=Object.assign({},this.$route.query);n[e]=s(t),this.$router.push({name:this.$route.name,query:n}).catch(e=>{if(!(""+e.message).includes("redundant navigation"))throw e})},restoreStateFromUrl(e){if(!this.$route.query[e])return null;try{const t=function(e){return JSON.parse(Object(a.a)(decodeURIComponent(e)))}(this.$route.query[e]);return this.$set(this,e,t),t}catch(t){return console.warn(`Could not restore state ${e} from URL parameter ${e}`,t),null}}}}},ruXV:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.areaEvents.length?n("div",[n("tb-w-section",{staticClass:"tb-w-area-events",attrs:{background:""},scopedSlots:e._u([{key:"content",fn:function(){return[n("tb-w-slider",[e._l(e.areaEvents.slice(0,6),(function(e){return n("tb-w-slider-item",{key:e.id},[n("tb-w-teaser-card-event-date",{attrs:{"event-date":e}})],1)})),e._v(" "),e.areaEvents.length>6?n("tb-w-show-all",{attrs:{href:e.buildUrl({name:"event.list",query:{params:e.getEventLocationFilterParams(e.article.id)}})}},[e._v("\n                    "+e._s(e.$t("message.allEvents"))+"\n                ")]):e._e()],2)]},proxy:!0}],null,!1,867906218)},[e._v("\n        "+e._s(e.$t("message.ourEvents"))+"\n\n        ")])],1):n("div")};a._withStripped=!0;var s=n("g8pp"),r=n("6dQ1"),o=n("vqf1"),l=n("VjoN"),i={props:{article:{type:Object,required:!0}},mixins:[o.a],data:()=>({areaEvents:[],today:Object(s.a)(new Date,"y-M-d")}),async created(){if(!Object(r.a)()){const e=await this.eventDateRepository.listMerged({filter:{clientIncludingManaged:"current",locationArea:this.article.id,date:{after:this.today}},language:this.$store.state.language});this.areaEvents=e.payload}},methods:{getEventLocationFilterParams:e=>Object(l.b)({filter:{locationArea:[e]}})},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{ourEvents:"Unsere Veranstaltungen",allEvents:"Alle Events anzeigen",cancelled:"Abgesagt"}},en:{message:{ourEvents:"Our events",allEvents:"Show all events",cancelled:"Canceled"}},fr:{message:{ourEvents:"Nos manifestations",allEvents:"Montrer tous les événements",cancelled:"Annulé"}},it:{message:{ourEvents:"I nostri eventi",allEvents:"Mostrare tutte le manifestazioni",cancelled:"Annullata"}},es:{message:{ourEvents:"Nuestros eventos",allEvents:"Mostrar todos los eventos",cancelled:"Cancelada"}},nl:{message:{ourEvents:"Onze evenementen",allEvents:"Toon alle evenementen",cancelled:"Geannuleerd"}},cz:{message:{ourEvents:"Naše události",allEvents:"Zobrazit všechny události",cancelled:"Zrušeno"}}}}},c=n("KHd+"),u=Object(c.a)(i,a,[],!1,null,null,null);u.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-area-events.vue";t.default=u.exports},vqf1:function(e,t,n){"use strict";var a=n("g8pp"),s=n("N8I4"),r=n("sdSa");t.a={methods:{getDatesToDisplay:(e,t)=>e.firstDate.id===e.lastDate.id?Object(a.a)(new Date(e.firstDate.date),"d.M.Y"):function(e,t){Object(r.a)(2,arguments);var n=Object(s.a)(e),a=Object(s.a)(t);return n.getFullYear()===a.getFullYear()}(new Date(t||e.firstDate.date),new Date(e.lastDate.date))?`${Object(a.a)(new Date(t||e.firstDate.date),"d.M.")} - ${Object(a.a)(new Date(e.lastDate.date),"d.M.Y")}`:`${Object(a.a)(new Date(t||e.firstDate.date),"d.M.Y")} - ${Object(a.a)(new Date(e.lastDate.date),"d.M.Y")}`}}}}]);