(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[319],{H7SZ:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.loading||t.loadingAggregations||!t.staticWidgetPath?t._e():i("tb-w-quicksearch-events",{attrs:{"filled-options":t.filledOptions,categories:t.categories,cities:t.cities}}),t._v(" "),i("skeleton-loader",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"mt-4",attrs:{width:"100%",height:"8rem",animation:"fade",type:"rect",radius:6,rounded:!0}})],1)};n._withStripped=!0;var a=i("xBaG"),s=i("J1wL"),r={name:"QuicksearchEvents",data:()=>({loading:!0,loadingAggregations:!0,categories:{},cities:{},filledOptions:{}}),computed:{...Object(a.e)(["language","serializedConfiguration","staticWidgetPath"]),...Object(a.e)("displayConfig",["cityFilterCategories"])},created(){this.fetchData()},methods:{fetchData(){Promise.all([this.fetchAggregations(),this.fetchCategories(),this.fetchCities()]).then(()=>this.loading=!1)},async fetchCities(){var t;Array.isArray(this.cityFilterCategories)&&null!==(t=this.cityFilterCategories)&&void 0!==t&&t.length?this.cities=await Object(s.a)(this.cityFilterCategories,this.articleRepository,this.$store):this.cities=await Object(s.b)("city",this.recordRepository,this.$store)},async fetchCategories(){this.categories=await this.categoryRepository.listFlattened({language:this.language})},async fetchAggregations(){this.loadingAggregations=!0;const t={language:this.language,withAggregates:!0,withResults:!1,filter:{element:"events",clientIncludingManaged:"",date:{after:"today",includeOnDemand:!0}}},e=await this.eventDateRepository.list(t);this.filledOptions=e._attributes.aggregations,this.loadingAggregations=!1}}},o=i("KHd+"),l=Object(o.a)(r,n,[],!1,null,null,null);e.default=l.exports},J1wL:function(t,e,i){"use strict";async function n(t,e,i){var n,a,s;const r=await e.getNames({filter:{categoryType:t,clientIncludingManaged:null!==(n=null===(a=i.state.actualListQuery)||void 0===a||null===(s=a.filter)||void 0===s?void 0:s.clientIncludingManaged)&&void 0!==n?n:"current"},sorting:{property:"name"},language:i.state.language,unlicensed:1});return Array.isArray(r)?{}:r}async function a(t,e,i,n=1){var a,s,r;const o=null!==(a=null===(s=i.state.actualListQuery)||void 0===s||null===(r=s.filter)||void 0===r?void 0:r.clientIncludingManaged)&&void 0!==a?a:"current",l=await e.list({filter:{category:t,clientIncludingManaged:o},sorting:{property:"name"},language:i.state.language,unlicensed:1,minimal:n}).then(t=>t.payload);return Array.isArray(l)?{}:l}i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return a}))},"KHd+":function(t,e,i){"use strict";function n(t,e,i,n,a,s,r,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),r?(l=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var g=c.beforeCreate;c.beforeCreate=g?[].concat(g,l):[l]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))}}]);