(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[130],{UVSg: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.specificFieldGroups.length>0?t("tb-w-section",{scopedSlots:e._u([{key:"content",fn:function(){return e._l(e.specificFieldGroups,(function(i){return t("tb-w-feature-specific",{key:i.id,attrs:{icon:i.icon},scopedSlots:e._u([{key:"title",fn:function(){return[e._v("\n                "+e._s(i.name)+"\n            ")]},proxy:!0}],null,!0)},[e._v(" "),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}})}))],2)}))},proxy:!0}],null,!1,3967386948)}):t("div")};d._withStripped=!0;var n=t("YFxB"),s={name:"TbWDetailSpecificFieldGroups",props:{category:{type:Object,required:!0},fieldGroups:{type:Array,required:!0},fieldValues:{type:Object,required:!0}},computed:{specificFieldGroups(){return this.category.fieldGroupTypesWithParents?Object(n.e)(this.category.fieldGroupTypesWithParents.specific,this.fieldGroups,this.fieldValues,"faq"):[]}}},l=t("KHd+"),f=Object(l.a)(s,d,[],!1,null,"250c6c51",null);f.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-detail-specific-field-groups.vue";i.default=f.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 n(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)return e.some(e=>s(e,i))}return!1})}function s(e,i){return["check","radio","select"].includes(i.type)?e.selected.length>0:!!["input","textarea","faq"].includes(i.type)&&""!==e.value.text}function l(e,i,t){let d={};return e.forEach(e=>{e.fieldSets.forEach(n=>{n.fields.forEach(l=>{(i[l.id]||[]).forEach(i=>{l.type===t&&i&&s(i,l)&&(d[e.id]=d[e.id]||{title:e.name,fieldSets:{}},d[e.id].fieldSets[n.id]=d[e.id].fieldSets[n.id]||{title:n.name,fields:{}},d[e.id].fieldSets[n.id].fields[l.id]=d[e.id].fieldSets[n.id].fields[l.id]||{blueprint:l,fieldValues:[]},d[e.id].fieldSets[n.id].fields[l.id].fieldValues.push(i))})})})}),d}function f(e,i,t){let d={};return e.forEach(e=>{d[e.id]=d[e.id]||{title:e.name,fieldSets:{}},e.fieldSets.forEach(n=>{d[e.id].fieldSets[n.id]=d[e.id].fieldSets[n.id]||{title:n.name,fields:{}},n.fields.forEach(l=>{d[e.id].fieldSets[n.id].fields[l.id]=d[e.id].fieldSets[n.id].fields[l.id]||{blueprint:l,fieldValues:[]},(i[l.id]||[]).forEach((i,f)=>{const r=l.tags.some(e=>t.includes(e))&&i&&s(i,l);d[e.id].fieldSets[n.id].fields[l.id].fieldValues[f]=r?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 r(e,i="",t){const n=/(%s)+/;return i.match(n)?""===e?"":("m"===t?e=d(e):t&&(e=`${e} ${t}`),i.replace(n,e)):i}function c(e,i="",t){if(""===e)return"";"m"===t?e=d(e):t&&(e=`${e} ${t}`);const n=/(%s)+/;return i.match(n)?i.replace(n,e):e}t.d(i,"e",(function(){return n})),t.d(i,"b",(function(){return l})),t.d(i,"a",(function(){return f})),t.d(i,"c",(function(){return r})),t.d(i,"d",(function(){return c}))}}]);