{"version":3,"sources":["webpack:///./resources/js/src/app/components/item/ItemImageCarousel.vue?55b3","webpack:///./resources/js/src/app/components/item/ItemImageCarousel.vue","webpack:///./resources/js/src/app/components/item/ItemImageCarousel.vue?df97","webpack:///./resources/js/src/app/components/item/ItemImageCarousel.vue?f260"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","isImageSet","isEngravingSlide","on","mousedown","$event","startMoveImage","touchstart","mousemove","moveImage","touchmove","mouseup","endMoveImage","touchend","click","eventPrevent","_v","_uid","attrs","itemscope","itemtype","_l","singleImages","image","index","href","url","configuratorImage","length","mounted","sliderActive","currentVariation","variation","id","currentSwiperIndex","_e","modalActive","name","key","reInitialized","_t","alt","_f","title","_withStripped","props","maxQuantity","type","Number","default","imageUrlAccessor","String","pluginPath","inject","itemId","data","configuratorOpen","configuratorMoving","singleSwiper","engravingImageIndex","swiperInitialized","itemImageSet","modal","computed","mapState","engravingConfiguratorConfig","state","engravingConfigurator","config","engravingConfiguratorValues","imageValues","imageFrontendLoading","mapGetters","$store","getters","orderByPosition","$options","filters","itemImages","images","slice","isImageEngraving","i","isImageUploaded","values","filter","imageConfig","inputFile","watch","$nextTick","reInitialize","that","document","addEventListener","split","pop","findIndex","slideTo","loadLightbox","then","initCarousel","catch","event","console","log","ModalService","findModal","getElementById","show","hide","window","innerWidth","methods","destroy","Swiper","slidesPerView","spaceBetween","centeredSlides","pagination","el","clickable","navigation","nextEl","prevEl","allowTouchMove","breakpoints","992","slideChange","swiper","activeIndex","init","isNullOrUndefined","lightbox","option","wrapAround","list","sort","entryA","entryB","position","getAltText","alternate","itemName","getImageName","Promise","resolve","reject","script","querySelector","createElement","src","body","appendChild","commit","value","preventDefault","stopPropagation","touches","x","clientX","y","clientY","dispatchEvent","CustomEvent","getImageValuesById","svgWidth","maskScale","Object","assign","component","options","__file"],"mappings":"kGAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,I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AAOd,YAAYgG,UAC9EN,EAAG5E,EAAO4E,GAAM1D,EAAM2D,QAAUvK,KAAK+D,mBAAmBuG,GAAG5E,EAAOd,YAAYgG,YAItF/G,EAAKhC,MAAQgJ,OAAOC,OAAOpF,EAAQ7B,EAAKhC,OACxC7B,KAAK+E,OAAOgF,OAAO,qBAAsBlG,GACzCqC,SAASsE,cAAc,IAAIC,YAAY,oCAEvCzK,KAAK+D,mBAAqB,CACtBqG,EAAGxD,EAAMyD,QACTC,EAAG1D,EAAM2D,aAM7BrJ,aA1KK,SA0KQ0F,GACN5G,KAAK8D,kBAAoB9D,KAAKuF,mBAC7BvF,KAAKqB,aAAauF,GAClB5G,KAAK+D,mBAAqB,S,QE1YtCgH,EAAY,YACd,EACAjL,EHyJoB,IGvJpB,EACA,KACA,KACA,MAuBFiL,EAAUC,QAAQC,OAAS,6DACZ,UAAAF,E","file":"chunks/ceres-client-43.min.js","sourcesContent":["var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", [\n _c(\"div\", { staticClass: \"position-relative single-swiper__outer\" }, [\n _c(\"div\", {\n staticClass: \"engraving__move d-none\",\n class: { \"d-lg-block\": _vm.isImageSet && _vm.isEngravingSlide },\n on: {\n mousedown: function($event) {\n return _vm.startMoveImage($event)\n },\n touchstart: function($event) {\n return _vm.startMoveImage($event)\n },\n mousemove: function($event) {\n return _vm.moveImage($event)\n },\n touchmove: function($event) {\n return _vm.moveImage($event)\n },\n mouseup: function($event) {\n return _vm.endMoveImage($event)\n },\n touchend: function($event) {\n return _vm.endMoveImage($event)\n },\n click: function($event) {\n return _vm.eventPrevent($event)\n }\n }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"swiper-container swiper-container--single\",\n class: \"swiper-container--\" + _vm._uid,\n attrs: { itemscope: \"\", itemtype: \"http://schema.org/Thing\" }\n },\n [\n _c(\n \"div\",\n { staticClass: \"swiper-wrapper mt-0\" },\n _vm._l(_vm.singleImages, function(image, index) {\n return _c(\"div\", { staticClass: \"swiper-slide\" }, [\n _c(\n \"a\",\n {\n staticClass: \"d-block cursor-zoom\",\n attrs: {\n href: image.url,\n \"data-lightbox\": \"single-item-image\" + _vm._uid\n }\n },\n [\n _vm.configuratorImage(image.url).length > 0 && _vm.mounted\n ? [\n _vm.sliderActive\n ? _c(\"engraving-image\", {\n attrs: {\n \"current-variation-id\":\n _vm.currentVariation.variation.id,\n image: image,\n \"configurator-image\": _vm.configuratorImage(\n image.url\n ),\n \"current-swiper-index\":\n _vm.currentSwiperIndex,\n \"touch-handler\": [\n _vm.startMoveImage,\n _vm.moveImage,\n _vm.endMoveImage\n ]\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.modalActive\n ? _c(\"engraving-modal\", {\n attrs: {\n \"current-variation-id\":\n _vm.currentVariation.variation.id,\n image: image,\n \"configurator-image\": _vm.configuratorImage(\n image.url\n ),\n \"current-swiper-index\":\n _vm.currentSwiperIndex,\n \"touch-handler\": [\n _vm.startMoveImage,\n _vm.moveImage,\n _vm.endMoveImage\n ]\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _vm.isImageSet\n ? _c(\n \"div\",\n {\n key: \"transition--move\",\n staticClass:\n \"engraving__move-hint text-center d-none d-lg-block\"\n },\n [\n _vm._v(\n \"\\n Hier Bildauschnitt definieren\\n \"\n )\n ]\n )\n : _vm._e()\n ])\n ]\n : [\n index === 0 && !_vm.reInitialized\n ? _vm._t(\"default\")\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"lazy-img\", {\n class:\n index === 0 && !_vm.reInitialized\n ? \"single__image--hidden\"\n : \"\",\n attrs: {\n \"picture-class\": \"img-fluid\",\n \"image-url\": image.url,\n alt: _vm._f(\"itemName\")(_vm.currentVariation),\n title: _vm._f(\"itemName\")(_vm.currentVariation)\n }\n })\n ]\n ],\n 2\n )\n ])\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", {\n staticClass: \"swiper-button-prev\",\n class: \"swiper-button-prev--\" + _vm._uid\n }),\n _vm._v(\" \"),\n _c(\"div\", {\n staticClass: \"swiper-button-next\",\n class: \"swiper-button-next--\" + _vm._uid\n }),\n _vm._v(\" \"),\n _c(\"div\", {\n staticClass: \"swiper-pagination\",\n class: \"swiper-pagination--\" + _vm._uid\n })\n ])\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { isNullOrUndefined } from 'ceres/app/helper/utils';\nimport { Swiper } from 'swiper';\nimport { mapState, mapGetters } from 'vuex';\nimport ModalService from 'ceres/app/services/ModalService';\n\nexport default {\n props: {\n maxQuantity: {\n type: Number,\n default: 10\n },\n imageUrlAccessor: {\n type: String,\n default: 'url'\n },\n pluginPath: {\n type: String,\n default: ''\n }\n },\n\n inject: {\n itemId: {\n default: null\n }\n },\n\n data() {\n return {\n configuratorOpen : false,\n configuratorMoving : null,\n singleSwiper : null,\n engravingImageIndex : null,\n currentSwiperIndex : 0,\n swiperInitialized : false,\n reInitialized : false,\n itemImageSet : false,\n modalActive : false,\n sliderActive : true,\n modal : null,\n mounted : false\n };\n },\n\n computed: {\n ...mapState({\n engravingConfiguratorConfig : state => state.engravingConfigurator.config,\n engravingConfiguratorValues : state => state.engravingConfigurator.imageValues,\n imageFrontendLoading : state => state.engravingConfigurator.imageFrontendLoading\n }),\n ...mapGetters([\n 'getImageValuesById'\n ]),\n currentVariation() {\n return this.$store.getters[`${this.itemId}/currentItemVariation`]\n },\n singleImages() {\n return this.orderByPosition(\n this.$options.filters.itemImages(\n this.currentVariation.images,\n this.imageUrlAccessor\n )\n ).slice(0, this.maxQuantity);\n },\n isImageEngraving() {\n\n for(let i = 0; i < this.engravingConfiguratorConfig.length; i++) {\n if(this.engravingConfiguratorConfig[i].type === 'image') {\n return true;\n }\n }\n\n return false;\n },\n isImageUploaded() {\n\n const values = this.engravingConfiguratorValues.filter(imageConfig => imageConfig.key === 'image');\n\n if(values && values.length > 0) {\n return values[0].image.inputFile;\n }\n\n return false;\n },\n isImageSet() {\n return this.isImageEngraving && this.configuratorOpen && this.isImageUploaded && !this.imageFrontendLoading\n },\n isEngravingSlide() {\n return this.engravingImageIndex === this.currentSwiperIndex;\n }\n },\n\n watch: {\n currentVariation() {\n this.$nextTick(() => {\n this.reInitialized = true;\n this.configuratorOpen = false;\n this.itemImageSet = false;\n this.reInitialize();\n })\n }\n },\n\n mounted() {\n\n let that = this;\n\n this.mounted = true;\n\n document.addEventListener('showEngravingImage', () => {\n for(let i = 0; i < that.singleImages.length; i++) {\n\n let image = that.singleImages[i].url.split('/').pop();\n\n if(that.engravingConfiguratorConfig.findIndex(config => config.image === image) > -1) {\n\n this.singleSwiper.slideTo(i);\n\n that.configuratorOpen = true;\n that.engravingImageIndex = i;\n\n break;\n }\n }\n });\n // document.addEventListener('closeEngravingConfigurator', () => {\n // that.configuratorOpen = false;\n // });\n\n this.$nextTick(() => {\n this.loadLightbox().then(() => {\n this.initCarousel();\n // this.initThumbCarousel(); //no thumb carousel\n }).catch(event => {\n console.log(\"error while loading lightbox\", event);\n });\n });\n\n this.modal = ModalService.findModal(document.getElementById('engraving-modal'));\n document.addEventListener('showEngravingModal', () => {\n this.modal.show();\n });\n document.addEventListener('hideEngravingModal', () => {\n this.modal.hide();\n });\n this.modal.on('show.bs.modal', () => {\n this.sliderActive = false;\n this.modalActive = true;\n });\n this.modal.on('hide.bs.modal', () => {\n this.modalActive = false;\n this.sliderActive = true;\n });\n window.addEventListener('resize', () => {\n if (window.innerWidth >= 992) {\n this.modal.hide();\n }\n })\n },\n\n methods: {\n reInitialize() {\n if(this.singleSwiper !== null) {\n this.singleSwiper.destroy();\n this.initCarousel();\n }\n },\n initCarousel() {\n\n this.singleSwiper = new Swiper('.swiper-container--' + this._uid, {\n slidesPerView : 1,\n spaceBetween : 8,\n centeredSlides : true,\n pagination : {\n el : '.swiper-pagination--' + this._uid,\n clickable : true\n },\n navigation: {\n nextEl: '.swiper-button-next--' + this._uid,\n prevEl: '.swiper-button-prev--' + this._uid,\n },\n allowTouchMove: true,\n breakpoints: {\n // when window width is >= 992px\n 992: {\n allowTouchMove: false\n }\n },\n on: {\n slideChange: (swiper) => {\n this.currentSwiperIndex = swiper.activeIndex;\n },\n init: () => {\n this.swiperInitialized = true;\n }\n }\n });\n\n if (!isNullOrUndefined(window.lightbox)) {\n lightbox.option({\n wrapAround: true\n });\n }\n },\n orderByPosition(list) {\n return list.sort((entryA, entryB) => {\n\n if (entryA.position > entryB.position) {\n return 1;\n }\n if (entryA.position < entryB.position) {\n return -1;\n }\n\n return 0;\n });\n },\n getAltText(image)\n {\n return image && image.alternate ? image.alternate : this.$options.filters.itemName(this.currentVariation);\n },\n\n getImageName(image)\n {\n return image && image.name ? image.name : this.$options.filters.itemName(this.currentVariation);\n },\n loadLightbox() {\n return new Promise((resolve, reject) => {\n const script = document.querySelector(\"script#lightboxscript\");\n\n if (!isNullOrUndefined(script)) {\n resolve();\n }else {\n const script = document.createElement(\"script\");\n\n script.type = \"text/javascript\";\n script.id = \"lightboxscript\";\n script.src = `${ this.pluginPath }/js/dist/lightbox.min.js`;\n\n script.addEventListener(\"load\", () => resolve(), false);\n script.addEventListener(\"error\", event => reject(event), false);\n\n document.body.appendChild(script);\n }\n });\n },\n configuratorImage(url) {\n\n if(isNullOrUndefined(url)) {\n return '';\n }\n\n let image = url.split('/').pop();\n let images = this.engravingConfiguratorConfig.filter(config => config.image === image);\n\n if(images.length > 0 && !this.itemImageSet) {\n this.$store.commit('setSettingValueByKey', {\n key : 'itemImageInEngravingImage',\n value : url\n });\n this.itemImageSet = true;\n }\n\n return images;\n },\n eventPrevent(event) {\n if(this.configuratorOpen) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n startMoveImage(event) {\n\n if(this.configuratorOpen && this.isImageEngraving) {\n\n this.eventPrevent(event);\n\n if (event.type === 'touchstart' && event.touches.length === 1) {\n event = event.touches[0];\n }else if(event.type === 'touchstart') {\n return;\n }\n\n this.configuratorMoving = {\n x: event.clientX,\n y: event.clientY\n };\n\n document.dispatchEvent(new CustomEvent('showEngravingConfiguratorShadow'));\n }\n },\n moveImage(event) {\n\n if(this.configuratorOpen && this.isImageEngraving) {\n\n this.eventPrevent(event);\n\n if (event.type === 'touchmove' && event.touches.length === 1) {\n event = event.touches[0];\n }else if(event.type === 'touchmove') {\n return;\n }\n\n if (this.configuratorMoving !== null) {\n\n let values = this.getImageValuesById(this.currentVariation.variation.id).image;\n\n if (typeof values.imageValues.svgWidth !== 'undefined') {\n\n let data = {\n id : this.currentVariation.variation.id,\n key : 'image',\n image: {\n x: values.x + ((event.clientX - this.configuratorMoving.x)*values.imageValues.maskScale),\n y: values.y + ((event.clientY - this.configuratorMoving.y)*values.imageValues.maskScale)\n }\n };\n\n data.image = Object.assign(values, data.image);\n this.$store.commit('setImageValuesById', data);\n document.dispatchEvent(new CustomEvent('showEngravingConfiguratorShadow'));\n\n this.configuratorMoving = {\n x: event.clientX,\n y: event.clientY\n };\n }\n }\n }\n },\n endMoveImage(event) {\n if(this.configuratorOpen && this.isImageEngraving) {\n this.eventPrevent(event);\n this.configuratorMoving = null;\n }\n }\n },\n}\n","import mod from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ItemImageCarousel.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ItemImageCarousel.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ItemImageCarousel.vue?vue&type=template&id=5285279e&\"\nimport script from \"./ItemImageCarousel.vue?vue&type=script&lang=js&\"\nexport * from \"./ItemImageCarousel.vue?vue&type=script&lang=js&\"\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\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/fhartwig/Sites/pp-heySilvity/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5285279e')) {\n api.createRecord('5285279e', component.options)\n } else {\n api.reload('5285279e', component.options)\n }\n module.hot.accept(\"./ItemImageCarousel.vue?vue&type=template&id=5285279e&\", function () {\n api.rerender('5285279e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"resources/js/src/app/components/item/ItemImageCarousel.vue\"\nexport default component.exports"],"sourceRoot":""}