(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[421,446,447,448],{"KHd+":function(t,e,i){"use strict";function o(t,e,i,o,n,s,a,p){var r,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),o&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),a?(r=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=r):n&&(r=p?function(){n.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:n),r)if(u.functional){u._injectStyles=r;var l=u.render;u.render=function(t,e){return r.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,r):[r]}return{exports:t,options:u}}i.d(e,"a",(function(){return o}))},WCn9:function(t,e,i){"use strict";i.r(e);var o=function(){var t=this.$createElement,e=this._self._c||t;return this.popupOpenState&&this.point?e("tb-w-map-info-window-mapbox",{attrs:{item:this.point,type:this.computedType}}):this._e()};o._withStripped=!0;var n=i("4/cP");const s=["articleTypeAttributes","awards","classifications","mainImage","media","openingTimes","tourStages","tourVariants","geometry","geometryForStages"],a=["mainImage","media","price"];var p={name:"TbWMapboxPopupPointQuery",props:{pointMini:{type:Object,required:!0},hideDetailsButton:{type:Boolean,default:!1},linkTarget:{type:String,default:"_blank"},type:{type:String,required:!0},apiVersion:{type:Number,default:1}},inject:{popup:{default:null}},data:()=>({popupOpenState:!1,point:null}),mounted(){this.$nextTick(()=>{this.popup.on("open",()=>{this.popupOpenState=!0})}),this.$nextTick(()=>{this.popup.on("close",()=>{this.popupOpenState=!1})})},computed:{computedType(){return this.type!==n.a.RECORD?this.type:this.pointMini.modelType===n.a.EVENT?n.a.EVENT:n.a.ARTICLE}},methods:{fetchPointDetails(){this.computedType===n.a.ARTICLE?this.fetchArticle(this.pointMini.id):this.computedType===n.a.EVENT&&this.fetchEvent(this.pointMini.id)},emitTourCoordinates(){var t,e,i,o,n,s,a,p;this.$emit("setTourPolyline",(null===(t=this.point)||void 0===t||null===(e=t.tour)||void 0===e||null===(i=e.geometry)||void 0===i?void 0:i.coordinates)||(null===(o=this.point)||void 0===o||null===(n=o.tour)||void 0===n||null===(s=n.tourStageCollections)||void 0===s||null===(a=s[0])||void 0===a||null===(p=a.geometry)||void 0===p?void 0:p.coordinates)||[])},async fetchArticle(t){const e=await this.articleRepository.fetch(t,{language:this.$store.state.language,include:s},this.apiVersion);this.point=null==e?void 0:e.payload,this.emitTourCoordinates(this.point)},async fetchEvent(t){const e=await this.eventRepository.fetch(t,{language:this.$store.state.language,include:a});this.point=null==e?void 0:e.payload,this.emitTourCoordinates(this.point)}},watch:{popupOpenState(t){t?this.fetchPointDetails():this.$emit("setTourPolyline",[])}}},r=i("KHd+"),u=Object(r.a)(p,o,[],!1,null,null,null);e.default=u.exports}}]);