(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[171],{"G3r+":function(e,i,t){"use strict";t.r(i);var d=function(){var e=this,i=e.$createElement,t=e._self._c||i;return e.highlightFieldGroups.length>0?t("tb-w-section",{attrs:{background:""},scopedSlots:e._u([{key:"content",fn:function(){return[t("tb-w-feature-highlight-group",{attrs:{"field-groups":e.highlightFieldGroups},scopedSlots:e._u([e._l(e.highlightFieldGroups,(function(i){return{key:i.id,fn:function(){return e._l(i.fieldSets,(function(i){return t("tb-w-dynamic-field-set-preview",{key:i.id,attrs:{"field-set":i,"field-values":e.fieldValues}})}))},proxy:!0}}))],null,!0)})]},proxy:!0}],null,!1,2744171320)}):t("div")};d._withStripped=!0;var l=t("YFxB"),n={name:"TbWDetailHighlightGroups",props:{category:{type:Object,required:!0},fieldGroups:{type:Array,required:!0},fieldValues:{type:Object,required:!0}},computed:{highlightFieldGroups(){return this.category.fieldGroupTypesWithParents?Object(l.e)(this.category.fieldGroupTypesWithParents.highlight,this.fieldGroups,this.fieldValues):[]}}},s=t("KHd+"),r=Object(s.a)(n,d,[],!1,null,"7d678c01",null);r.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-detail-highlight-field-groups.vue";i.default=r.exports},YFxB:function(e,i,t){"use strict";function d(e){return(e=parseInt(e,10))<1e3?e+" m":e<1e4?Math.round(e/100)/10+" km":Math.round(e/1e3)+" km"}function l(e,i,t,d=null){return 0===(e=e||[]).length?[]:i.filter(i=>{if(!1===e.includes(i.id))return!1;for(const e of i.fieldSets)for(const i of e.fields){if(i.type===d)continue;if(i.hidden)continue;const e=t[i.id];if(e&&e instanceof Array&&e.length)return e.some(e=>n(e,i))}return!1})}function n(e,i){return["check","radio","select"].includes(i.type)?e.selected.length>0:!!["input","textarea","faq"].includes(i.type)&&""!==e.value.text}function s(e,i,t){let d={};return e.forEach(e=>{e.fieldSets.forEach(l=>{l.fields.forEach(s=>{(i[s.id]||[]).forEach(i=>{s.type===t&&i&&n(i,s)&&(d[e.id]=d[e.id]||{title:e.name,fieldSets:{}},d[e.id].fieldSets[l.id]=d[e.id].fieldSets[l.id]||{title:l.name,fields:{}},d[e.id].fieldSets[l.id].fields[s.id]=d[e.id].fieldSets[l.id].fields[s.id]||{blueprint:s,fieldValues:[]},d[e.id].fieldSets[l.id].fields[s.id].fieldValues.push(i))})})})}),d}function r(e,i,t){let d={};return e.forEach(e=>{d[e.id]=d[e.id]||{title:e.name,fieldSets:{}},e.fieldSets.forEach(l=>{d[e.id].fieldSets[l.id]=d[e.id].fieldSets[l.id]||{title:l.name,fields:{}},l.fields.forEach(s=>{d[e.id].fieldSets[l.id].fields[s.id]=d[e.id].fieldSets[l.id].fields[s.id]||{blueprint:s,fieldValues:[]},(i[s.id]||[]).forEach((i,r)=>{const f=s.tags.some(e=>t.includes(e))&&i&&n(i,s);d[e.id].fieldSets[l.id].fields[s.id].fieldValues[r]=f?i:null})})})}),Object.keys(d).forEach(e=>{Object.keys(d[e].fieldSets).forEach(i=>{Object.keys(d[e].fieldSets[i].fields).forEach(t=>{!1===d[e].fieldSets[i].fields[t].fieldValues.some(e=>e)&&delete d[e].fieldSets[i].fields[t]}),0===Object.keys(d[e].fieldSets[i].fields).length&&delete d[e].fieldSets[i]}),0===Object.keys(d[e].fieldSets).length&&delete d[e]}),d}function f(e,i="",t){const l=/(%s)+/;return i.match(l)?""===e?"":("m"===t?e=d(e):t&&(e=`${e} ${t}`),i.replace(l,e)):i}function u(e,i="",t){if(""===e)return"";"m"===t?e=d(e):t&&(e=`${e} ${t}`);const l=/(%s)+/;return i.match(l)?i.replace(l,e):e}t.d(i,"e",(function(){return l})),t.d(i,"b",(function(){return s})),t.d(i,"a",(function(){return r})),t.d(i,"c",(function(){return f})),t.d(i,"d",(function(){return u}))}}]);