{"version":3,"sources":["webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/images/index.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/store/reducer.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/carousel-offers-aub/client/js/config.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/card-gallery-aub/client/js/index.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/carousel-offers-aub/client/js/index.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/store/actions.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/index.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/carousel-offers-aub/client/js/prototype.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/carousel-offers-aub/client/js/store/reducer.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/carousel-offers-aub/client/js/store/actions.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/card-gallery-aub/client/js/store/actions.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/card-gallery-aub/client/js/config.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/config.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/banner-offers-aub/client/js/prototype.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/card-gallery-aub/client/js/store/reducer.js","webpack:///./node_modules/@logitravel/alex-aubergine/components/card-gallery-aub/client/js/prototype.js"],"names":["Image","require","module","exports","initDeals","instance","inst","type","config","selector","deals","_toConsumableArray","element","querySelectorAll","map","item","index","concat","dealsType","destroyDeals","forEach","deal","actions","destroy","types","initialState","reducer","state","arguments","length","undefined","action","DESTROY","component","init","css","base","title","bannerCss","cardCss","carouselCss","banner","card","carousel","swiper","slidesPerView","slidesPerGroup","slidesPerColumn","spaceBetween","breakpoints","840","1100","1400","1600","elementExist","imageClient","prototype","configuration","Object","create","document","querySelector","_objectSpread","dataset","result","JSON","parse","carouselClient","bannerClient","cardClient","cards","filter","items","hasNavigation","hasPagination","hasAutoplay","hasBreakpoints","galleryCard","allowTouchMove","preventClicks","image","imgType","Store","_require2","setupStore","this","store","setupActions","_this","dispatch","setupReactions","_this2","reactions","subscribe","keys","key","unsubscribe","parentNode","removeChild","promos","suboperation","width","height","quality","imageResize","dealsCss","imgCss","dealsResize","imgResize","_require4","setupImages","i"],"mappings":";wIAKA,IAAMA,EAAQC,EAAQ,QA4BtBC,EAAOC,QAAU,CACbC,UA1BJ,SAAmBC,GACf,IAAMC,EAAOD,EAGLE,EAASF,EAASG,OAAlBD,KAGAE,EAAaJ,EAAbI,SAGRH,EAAKI,MAAQC,EAAIL,EAAKM,QAAQC,iBAAiB,iCAAiCC,KAAI,SAACC,EAAMC,GAAK,OAC5FhB,EAAM,GAADiB,OAAIR,EAAQ,6CAAAQ,OAA4CV,EAAKW,UAAS,KAAAD,OAAID,EAAK,WAgBxFG,aAXJ,SAAsBd,GAClB,IAAMC,EAAOD,EAGbA,EAASK,MAAMU,SAAQ,SAAAC,GAAI,OAAIA,EAAKC,QAAQC,oBACrCjB,EAAKI,S,uBCxBhB,IAAQc,EAAUvB,EAAQ,QAAlBuB,MAGFC,EAAe,GAYrBvB,EAAOC,QAAU,CACbuB,QAXJ,WAA+C,IAA9BC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGH,EAAcM,EAAMH,UAAAC,OAAA,EAAAD,UAAA,QAAAE,EACzC,OAAQC,EAAOxB,MACX,KAAKiB,EAAMQ,QAEX,QACI,OAAOL,M,qBCRnB,IAAMnB,EAAS,CACXyB,UAAW,oBACXC,MAAM,EACNC,IAAK,CACDC,KAAM,sBACNC,MAAO,6BACPC,UAAW,8BACXC,QAAS,4BACTC,YAAa,uCAEjBjC,KAAM,CACFkC,OAAQ,6BACRC,KAAM,0BACNC,SAAU,gCAEdC,OAAQ,CACJV,MAAM,EACNW,cAAe,EACfC,eAAgB,EAChBC,gBAAiB,EACjBC,aAAc,GAG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AAF,OAAQiE,EAAKF,MAAMG,SAASnE,EAAQC,cAHtB8D,MAS7BK,eAAc,WAAG,IAAAC,EAAA,KACb,OAAIN,KAAKO,YAETP,KAAKO,UAAY,CACbrE,QAAS8D,KAAKC,MAAMO,WAAU,SAAClE,EAAOI,GAC9BA,EAAOxB,OAASiB,EAAMQ,UAG1BrB,EAAI+C,OAAOoC,KAAKH,EAAKC,YAAYxE,SAAQ,SAAA2E,GAAG,OAAIJ,EAAKC,UAAUG,GAAKC,iBAGpEL,EAAK/E,QAAQqF,WAAWC,YAAYP,EAAK/E,SAGzCD,EAAI+C,OAAOoC,KAAKH,IAAOvE,SAAQ,SAAA2E,GAAG,cAAWJ,EAAKI,YAb/BV,MAoB/BnD,KAAI,WACA,OAAKmD,KAAK7E,OAAO0B,MAEjBmD,KAAKD,aAGLC,KAAKE,eAGLF,KAAKK,iBAGLL,KAAKyB,cAEEzB,MAbuBA,OAkBtCnF,EAAOC,QAAUqD","file":"carousel-banners.1453c2b40b0529f58afa.bundle.js","sourcesContent":["/* ==========================================================================\n MBlog > Client > Offers\n ========================================================================== */\n\n/* Modules */\nconst Image = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\n\n/* Init */\nfunction initDeals(instance) {\n const inst = instance;\n\n /* Config */\n const { type } = instance.config;\n\n /* Selector */\n const { selector } = instance;\n\n /* Image */\n inst.deals = [...inst.element.querySelectorAll('[data-component=\"ImageRxjs\"]')].map((item, index) =>\n Image(`${selector} [data-component=\"ImageRxjs\"][data-type=\"${type.dealsType}-${index}\"]`)\n );\n}\n\n/* Destroy */\nfunction destroyDeals(instance) {\n const inst = instance;\n\n /* Reference */\n instance.deals.forEach(deal => deal.actions.destroy());\n delete inst.deals;\n}\n\n/* Exports */\nmodule.exports = {\n initDeals,\n destroyDeals\n};\n","/* ==========================================================================\n BannerOffersAub > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {};\n\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return state;\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n CarouselOffersAub > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'CarouselOffersAub',\n init: true,\n css: {\n base: 'carousel-offers-aub',\n title: 'carousel-offers-aub__title',\n bannerCss: 'carousel-offers-aub__banner',\n cardCss: 'carousel-offers-aub__card',\n carouselCss: 'carousel-offers-aub__carousel-cards'\n },\n type: {\n banner: 'carousel-offers-aub-banner',\n card: 'carousel-offers-aubcard',\n carousel: 'carousel-offers-aub-carousel'\n },\n swiper: {\n init: true,\n slidesPerView: 2,\n slidesPerGroup: 1,\n slidesPerColumn: 2,\n spaceBetween: 10,\n\n // Responsive breakpoints\n breakpoints: {\n // when window width is <= 768px\n 840: {\n slidesPerView: 1,\n slidesPerGroup: 1\n },\n // when window width is <= 1200px\n 1100: {\n slidesPerView: 1,\n slidesPerGroup: 1\n },\n // when window width is <= 1600px\n 1400: {\n slidesPerView: 2,\n slidesPerGroup: 1\n },\n // when window width is <= 1600px\n 1600: {\n slidesPerView: 2,\n slidesPerGroup: 1\n }\n }\n }\n};\n\nmodule.exports = () => config;\n","/* ==========================================================================\n CardGalleryAub > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst imageClient = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * CardGalleryAub component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function CardGalleryAub(selector = '[data-component=CardGalleryAub]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Selector */\n instance.selector = selector;\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* deals */\n instance.deals = imageClient(\n `${selector} [data-component=\"ImageRxjs\"][data-type=\"${config().type.dealsType}\"]`\n );\n\n /* Config */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n /* Init */\n if (instance.config.init) instance.init();\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n CarouselOffersAub > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst carouselClient = require('@bluekiri/alexandria-contrib-components/components/carousel-rxjs/client/js');\nconst bannerClient = require('../../../banner-offers-aub/client/js');\nconst cardClient = require('../../../card-gallery-aub/client/js');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * CarouselOffersAub component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function CarouselOffersAub(selector = '[data-component=CarouselOffersAub]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Selector */\n instance.selector = selector;\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n instance.banner = bannerClient(\n `${selector} [data-component=\"BannerOffersAub\"][data-type=\"${config().type.banner}\"]`\n );\n\n instance.cards = [...instance.element.querySelectorAll('[data-component=\"CardGalleryAub\"]')]\n .filter(item => item.dataset.type)\n .map((items, index) =>\n cardClient(`${selector} [data-component=\"CardGalleryAub\"][data-type=\"${config().type.card}-${index}\"]`)\n );\n\n instance.carousel = carouselClient(\n `${selector} [data-component=\"CarouselRxjs\"][data-type=\"${config().type.carousel}\"]`,\n {\n hasNavigation: true,\n hasPagination: true,\n hasAutoplay: false,\n hasBreakpoints: false,\n swiper: { init: true, slidesPerView: 2, slidesPerGroup: 1, slidesPerColumn: 2 }\n }\n );\n\n const galleryCard = instance.cards.length;\n if (galleryCard < 5) {\n instance.carousel.swiper.allowTouchMove = false;\n instance.carousel.swiper.preventClicks = false;\n }\n\n /* Init */\n if (instance.config.init) instance.init();\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n BannerOffersAub > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'BANNER_CTA::DESTROY';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\n\n/* Export */\nmodule.exports = {\n types: {\n DESTROY\n },\n actions: {\n destroy\n }\n};\n","/* ==========================================================================\n BannerOffersAub > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst imageClient = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * BannerOffersAub component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function BannerOffersAub(selector = '[data-component=BannerOffersAub]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Selector */\n instance.selector = selector;\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n /* image */\n instance.image = imageClient(`${selector} [data-component=\"ImageRxjs\"][data-type=\"${config().type.imgType}\"]`);\n\n /* Init */\n if (instance.config.init) instance.init();\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n CarouselOffersAub > Client > Prototype\n ========================================================================== */\n\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\nconst { actions, types } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\nconst prototype = {\n /* Setup store */\n setupStore() {\n if (this.store) return this;\n this.store = new Store({\n carousel: reducer\n });\n\n return this;\n },\n /* Setup actions */\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => this.store.dispatch(actions.destroy())\n };\n\n return this;\n },\n /* Setup reactions */\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Unsubscribe */\n [...Object.keys(this.reactions)].forEach(key => this.reactions[key].unsubscribe());\n\n /* Clean DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean reference */\n [...Object.keys(this)].forEach(key => delete this[key]);\n })\n };\n\n return this;\n },\n /* Init */\n init() {\n if (!this.config.init) return this;\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/* ==========================================================================\n CarouselOffersAub > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {};\n\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return state;\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n CarouselOffersAub > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'CAROUSEL_OFFERS_CTA::DESTROY';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\n\n/* Export */\nmodule.exports = {\n types: {\n DESTROY\n },\n actions: {\n destroy\n }\n};\n","/* ==========================================================================\n CardGalleryAub > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'CARD_GALLERY::DESTROY';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\n\n/* Export */\nmodule.exports = {\n types: {\n DESTROY\n },\n actions: {\n destroy\n }\n};\n","/* ==========================================================================\n CardGalleryAub > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'CardGalleryAub',\n init: true,\n type: {\n promos: 'card-gallery-aub-deals',\n image: 'card-gallery-aub-image'\n },\n css: {\n base: 'card-gallery-aub',\n promos: 'card-gallery-aub__deals',\n image: 'card-gallery-aub__image'\n },\n promos: {\n suboperation: '',\n width: 300,\n height: 80,\n quality: 97\n },\n imageResize: {\n width: 600,\n height: 240,\n quality: 97\n }\n};\n\nmodule.exports = () => config;\n","/* ==========================================================================\n BannerOffersAub > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'BannerOffersAub',\n init: true,\n type: {\n dealsType: 'banner-offers-aub-deals',\n imgType: 'banner-offers-aub-image'\n },\n css: {\n base: 'banner-offers-aub',\n dealsCss: 'banner-offers-aub__deals-img',\n imgCss: 'banner-offers-aub__image'\n },\n dealsResize: {\n suboperation: '',\n width: 300,\n height: 80,\n quality: 97\n },\n imgResize: {\n width: 435,\n height: 535,\n quality: 97\n }\n};\n\nmodule.exports = () => config;\n","/* ==========================================================================\n BannerOffersAub > Client > Prototype\n ========================================================================== */\n\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\nconst { actions, types } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\nconst { initDeals, destroyDeals } = require('./images');\n\nconst prototype = {\n /* Setup store */\n setupStore() {\n if (this.store) return this;\n this.store = new Store({\n banner: reducer\n });\n\n return this;\n },\n /* Setup actions */\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => this.store.dispatch(actions.destroy())\n };\n\n return this;\n },\n /* Setup reactions */\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Destroy */\n destroyDeals(this);\n\n /* Unsubscribe */\n [...Object.keys(this.reactions)].forEach(key => this.reactions[key].unsubscribe());\n\n /* Clean DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean reference */\n [...Object.keys(this)].forEach(key => delete this[key]);\n })\n };\n\n return this;\n },\n /* Init */\n init() {\n if (!this.config.init) return this;\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n /* Init deals */\n initDeals(this);\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/* ==========================================================================\n CardGalleryAub > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {};\n\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return state;\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n CardGalleryAub > Client > Prototype\n ========================================================================== */\n\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\n\nconst Image = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\n\nconst { actions, types } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\nconst prototype = {\n /* Setup Carousel */\n setupImages() {\n /* Config */\n const { type } = this.config;\n\n /* Selector */\n const { selector } = this;\n\n /* Image */\n this.image = Image(`${selector} [data-component=\"ImageRxjs\"][data-type=\"${type.image}\"]`);\n\n /* promos */\n this.promos = [...this.element.querySelectorAll('[data-component=\"ImageRxjs\"]')]\n .filter(item => item.dataset.type)\n .map((item, i) => Image(`${selector} [data-component=\"ImageRxjs\"][data-type=\"${type.promos}-${i}\"]`));\n\n return this;\n },\n /* Setup store */\n setupStore() {\n if (this.store) return this;\n this.store = new Store({\n card: reducer\n });\n\n return this;\n },\n /* Setup actions */\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => this.store.dispatch(actions.destroy())\n };\n\n return this;\n },\n /* Setup reactions */\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Unsubscribe */\n [...Object.keys(this.reactions)].forEach(key => this.reactions[key].unsubscribe());\n\n /* Clean DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean reference */\n [...Object.keys(this)].forEach(key => delete this[key]);\n })\n };\n\n return this;\n },\n /* Init */\n init() {\n if (!this.config.init) return this;\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n /* Stup Images */\n this.setupImages();\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n"],"sourceRoot":""}