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AAM,CAACE,YAAY,iBAAiB,CAAEL,EAAIrD,cAAcO,EAAc,SAAiB,eAAM8C,EAAIrD,cAAcO,EAAc,SAAiB,aAAGiD,EAAG,OAAO,CAACE,YAAY,oBAAoB,CAACL,EAAIQ,GAAGR,EAAIgB,GAAGhB,EAAIrD,cAAcO,EAAc,SAAiB,aAAEmE,kBAAkBrB,EAAIO,KAAKP,EAAIQ,GAAG,KAAKL,EAAG,OAAO,CAACE,YAAY,SAAS,CAACL,EAAIQ,GAAGR,EAAIgB,GAAGhB,EAAIrD,cAAcO,EAAc,SAAiB,aAAEmE,oBAAoBrB,EAAIQ,GAAG,KAAKL,EAAG,IAAI,CAACE,YAAY,qBAAqBC,MAAM,CAAC,KAAOpD,EAAc,QAAW,UAAI,CAAC8C,EAAIQ,GAAGR,EAAIgB,GAAGhB,EAAIsB,GAAG,uBAAuB,KAAI,EAAE,EACzsEC,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/shop-by-look/ShopByLookImage.vue?e211","webpack:///./resources/area/web/default/js/shared/helpers/catalog-helper/index.ts","webpack:///./resources/area/web/default/js/components/shop-by-look/ShopByLookImage.vue","webpack:///./resources/area/web/default/js/components/shop-by-look/ShopByLookImage.vue?13ee","webpack:///./resources/area/web/default/js/components/shop-by-look/ShopByLookImage.vue?c82d"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport {Component, Vue, Prop} from 'vue-property-decorator';\nimport ServiceContainer from '@flashpointbv/solar-service-container';\nimport {catalogHelper} from '../../shared/helpers/catalog-helper';\n\n@Component({\n name: 'shop-by-look-image',\n components: ServiceContainer().getComponents()\n})\n\nexport default class extends Vue {\n @Prop({required: true}) private shopByLook!: object;\n\n private activeSpot: number | null = null;\n\n private productPrices(product): object {\n return catalogHelper.getProductPrice(product);\n }\n\n private productImage(product): string {\n return catalogHelper.resolveProductImage(product, 150);\n }\n\n private spotLocation(spot, position): number {\n return this.$mobileDetect.mobile() && this.shopByLook['mobileImage'] !== null ? spot['position_mobile_' + position] : spot['position_desktop_' + position];\n }\n\n private selectSpot(key): void {\n if (this.activeSpot === key) {\n this.activeSpot = null;\n return;\n }\n this.activeSpot = key;\n }\n\n private mounted(): void {\n document.addEventListener('click', e => {\n if (!(e.target as HTMLElement).classList.contains('item__details') && !(e.target as HTMLElement).classList.contains('show__hotspot')) {\n this.activeSpot = null;\n }\n });\n }\n}\n","import Environment from '@flashpointbv/solar-ui-environment';\n\nclass CatalogHelper {\n getProductPrice(product: object, customerGroupId: number = 0): object {\n let priceObject = {\n productPrice: product[`price_incl_tax`] || 0,\n specialPrice: product[`final_price_incl_tax`] || 0,\n discountPrice: product[`price_incl_tax`] || 0\n };\n\n if (priceObject.productPrice !== priceObject.specialPrice) {\n priceObject.discountPrice = priceObject.specialPrice;\n }\n\n return priceObject;\n }\n\n resolveProductImage(product: object, size: number): string {\n const env = window.Config.hasOwnProperty('environment') ? window.Config['environment'] : 'production';\n\n if (env !== 'production') {\n return `https://www.xenos.nl/pub/cdn/${product['sku']}/${size}/${product['sku']}.jpg`;\n }\n\n return this.resolveGalleryImage(product, size);\n }\n\n resolveGalleryImage(product: object, size: number, index: number = 0): string {\n if(Object.keys(product).length === 0) {\n return '';\n }\n\n const selectedItem = product['media_gallery'][index] || false;\n\n if (false === selectedItem) {\n return '';\n }\n\n if (selectedItem['type'] === 'video') {\n return selectedItem['thumbnail'] || '';\n }\n\n if (Environment().get('environment') !== 'production') {\n return `https://www.xenos.nl/pub/cdn/${product['sku']}/${size}/${product['sku']}.jpg`;\n }\n\n return selectedItem['placeholder_url'].replace(/\\{size}/, size);\n }\n\n getProductLabel(product: object): object | null {\n if (product.hasOwnProperty('action_labels')) {\n return {\n label: product['action_labels'][0]['name'],\n color: product['action_labels'][0]['color']\n };\n }\n\n if (product['promotion']) {\n let backgroundColor = '#ec008c';\n\n switch (product['promotion']) {\n case '50% korting':\n backgroundColor = '#1a9bdb';\n break;\n case '30% korting':\n backgroundColor = '#75ad3f';\n break;\n }\n\n return {\n label: product['promotion'],\n color: backgroundColor\n };\n }\n\n if (product['discount_amount'] > 0) {\n return {\n label: `${Math.round(product['discount_percentage'])}% korting`,\n color: '#ec008c'\n };\n }\n\n return null;\n }\n}\n\nconst catalogHelper = new CatalogHelper();\n\nexport {catalogHelper};\n","import { render, staticRenderFns } from \"./ShopByLookImage.vue?vue&type=template&id=0f3bcb1e&\"\nimport script from \"./ShopByLookImage.vue?vue&type=script&lang=ts&\"\nexport * from \"./ShopByLookImage.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopByLookImage.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopByLookImage.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"hotspot__container\"},[_c('picture',[(_vm.shopByLook['mobileImage'])?_c('source',{attrs:{\"srcset\":(\"/cdn/605/800/\" + (_vm.shopByLook['mobileImage']['location'])),\"media\":\"(max-width: 767px)\"}}):_vm._e(),_vm._v(\" \"),_c('img',{attrs:{\"src\":(\"/cdn/605/800/\" + (_vm.shopByLook['desktopImage']['location'])),\"alt\":_vm.shopByLook['title'],\"width\":_vm.shopByLook['desktopImage']['width'],\"height\":_vm.shopByLook['desktopImage']['height'],\"loading\":\"lazy\"}})]),_vm._v(\" \"),_vm._l((_vm.shopByLook['products']),function(spot,key){return _c('div',{staticClass:\"hotspot__item\",style:({ left: ((_vm.spotLocation(spot, 'x')) + \"%\"), top: ((_vm.spotLocation(spot, 'y')) + \"%\")})},[_c('div',{staticClass:\"hotspot__item__content\",class:{ '--active': key === _vm.activeSpot }},[_c('button',{staticClass:\"show__hotspot\",class:{ '--active': key === _vm.activeSpot },on:{\"click\":function($event){return _vm.selectSpot(key)}}},[_vm._v(_vm._s(spot['list_position']))]),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(key === _vm.activeSpot),expression:\"key === activeSpot\"}],staticClass:\"hotspot__item__detail\",class:{ '--right': _vm.spotLocation(spot, 'x') > 50, '--bottom': _vm.spotLocation(spot, 'y') > 50 }},[_c('a',{staticClass:\"image__holder\",attrs:{\"href\":spot['product']['url_key']}},[_c('img',{attrs:{\"src\":_vm.productImage(spot['product']),\"alt\":spot['product']['name'],\"width\":\"95\",\"height\":\"95\"}})]),_vm._v(\" \"),_c('div',{staticClass:\"item__details\"},[_c('a',{attrs:{\"href\":spot['product']['url_key']}},[_vm._v(_vm._s(spot['product']['name']))]),_vm._v(\" \"),_c('div',{staticClass:\"price__holder\"},[(_vm.productPrices(spot['product'])['specialPrice'] !== _vm.productPrices(spot['product'])['productPrice'])?_c('span',{staticClass:\"price__old-price\"},[_vm._v(_vm._s(_vm.productPrices(spot['product'])['productPrice'].priceFormat()))]):_vm._e(),_vm._v(\" \"),_c('span',{staticClass:\"price\"},[_vm._v(_vm._s(_vm.productPrices(spot['product'])['specialPrice'].priceFormat()))])]),_vm._v(\" \"),_c('a',{staticClass:\"--button --chevron\",attrs:{\"href\":spot['product']['url_key']}},[_vm._v(_vm._s(_vm.$t('Shop now')))])])])])])})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","activeSpot","productPrices","product","catalogHelper","getProductPrice","productImage","resolveProductImage","spotLocation","spot","position","this","$mobileDetect","mobile","shopByLook","selectSpot","key","mounted","document","addEventListener","e","target","classList","contains","Prop","required","Component","name","components","getComponents","CatalogHelper","customerGroupId","priceObject","productPrice","specialPrice","discountPrice","size","window","Config","hasOwnProperty","resolveGalleryImage","index","Object","keys","length","selectedItem","get","replace","getProductLabel","label","color","backgroundColor","Math","round","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","_e","_v","_l","style","left","top","class","on","$event","_s","directives","rawName","value","expression","priceFormat","$t","staticRenderFns"],"sourceRoot":""}