{"version":3,"sources":["webpack:///./src/components/Card-Promotion/MgnlCard-Promotion.vue?41fe","webpack:///src/components/Card-Promotion/MgnlCard-Promotion.vue","webpack:///./src/components/Card-Promotion/MgnlCard-Promotion.vue?8da0","webpack:///./src/components/Card-Promotion/MgnlCard-Promotion.vue","webpack:///./src/components/Card-Promotion/Card-Promotion.vue?931e","webpack:///src/components/Card-Promotion/Card-Promotion.vue","webpack:///./src/components/Card-Promotion/Card-Promotion.vue?377e","webpack:///./src/components/Card-Promotion/Card-Promotion.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","jcrUuid","model","staticRenderFns","component","item","Object","keys","length","$config","editMode","isPromotionInDateRange","componentIs","tag","class","classes","mainCategory","href","targetBlank","linkNofollow","_v","_e","_t","_f","imageMobile","image","altImage","isSmall","_s","duration","title","domProps","text","promoMobile","name","components","PgButton","PgImage","filters","formatDate","data","props","type","default","value","String","Array","select","size","computed","$mq","selectClass","sizeClass","isFuture","isExpired","mounted","isSelect","uuid","$eventHub","emit"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,UAAU,CAACE,YAAY,UAAUC,MAAM,CAAC,GAAM,QAAUP,EAAIQ,UAAW,CAACJ,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,iBAAiB,CAACG,MAAM,CAAC,KAAOP,EAAIS,UAAU,MACrQC,EAAkB,G,wBCWtB,GACE,OAAF,SAEE,KAAF,oBACE,WAAF,CACI,cAAJ,SCjB2W,I,YCOvWC,EAAY,eACd,EACAZ,EACAW,GACA,EACA,KACA,KACA,MAIa,aAAAC,E,2CClBf,IAAIZ,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAQF,EAAIY,MAAQC,OAAOC,KAAKd,EAAIY,MAAM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IAAN,uDAIM,MAHoB,WAAhBvB,KAAKqD,QAAuC,YAAhBrD,KAAKqD,SACnC9B,GAAO,GAEFA,GAETN,uBAjDJ,WAkDM,OAAQjB,KAAKW,KAAKgD,WAAa3D,KAAKW,KAAKiD,YAG7CC,QApFF,WAqFI7D,KAAK8D,SAA2B,WAAhB9D,KAAKqD,QAAuC,YAAhBrD,KAAKqD,OAEjDrD,KAAKiC,QAAwB,OAAdjC,KAAKsD,MAA+B,QAAdtD,KAAKsD,KAE1CtD,KAAKW,MAAQX,KAAKW,KAAKoD,MAAQ/D,KAAKgE,UAAUC,KAAK,6BAA8B,MAArF,0BCtJuW,I,YCOnWvD,EAAY,eACd,EACAZ,EACAW,GACA,EACA,KACA,KACA,MAIa,OAAAC,E","file":"js/chunk-ec435bf0-25a7e37753436436659b.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"section\",attrs:{\"id\":(\"uuid-\" + _vm.jcrUuid)}},[_c('div',{staticClass:\"section__container\"},[_c('card-promotion',{attrs:{\"item\":_vm.model}})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <section class=\"section\" :id=\"`uuid-${jcrUuid}`\">\n    <div class=\"section__container\">\n      <card-promotion :item=\"model\"/>\n    </div>\n  </section>\n</template>\n\n<script>\n  import {mgnlComponentMixin} from \"@wl-vue-mixins/mixins.js\";\n  import CardPromotion from \"./Card-Promotion.vue\";\n\n  export default {\n    mixins: [mgnlComponentMixin], // !!! all the mgnl components must be configured with mgnlComponentMixin !!!\n\n    name: \"MgnlCardPromotion\",\n    components: {\n      CardPromotion\n    }\n  };\n</script>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MgnlCard-Promotion.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MgnlCard-Promotion.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MgnlCard-Promotion.vue?vue&type=template&id=2ed9d744&\"\nimport script from \"./MgnlCard-Promotion.vue?vue&type=script&lang=js&\"\nexport * from \"./MgnlCard-Promotion.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\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.item && Object.keys(_vm.item).length > 0 && (_vm.$config.editMode || _vm.isPromotionInDateRange))?_c(_vm.componentIs,{tag:\"component\",staticClass:\"card-promotion\",class:[_vm.classes , (\"\" + (_vm.item.mainCategory==='aftersales'?' card-promotion-aftersales ':' card-promotion-sales '))],attrs:{\"href\":_vm.href,\"targetBlank\":_vm.item.targetBlank,\"linkNofollow\":_vm.item.linkNofollow,\"id\":(\"id-\" + (_vm.item.uuid))}},[(_vm.$config.editMode && !_vm.isPromotionInDateRange)?_c('div',{staticClass:\"edit-alert-msg\"},[_vm._v(\" Attention: promotion is expired or future or it was removed \")]):_vm._e(),_vm._t(\"select\"),_c('div',{staticClass:\"card-promotion__img\"},[(_vm.isSmall)?_c('pg-image',{attrs:{\"lazy-src\":_vm._f(\"mgnlMedia\")(_vm.item.imageMobile,'url')}}):_c('picture',[(_vm.item.imageMobile)?_c('source',{attrs:{\"media\":\"(min-width:0) and (max-width:640px)\",\"srcset\":_vm._f(\"mgnlMedia\")(_vm.item.imageMobile,'url')}}):_vm._e(),_c('source',{attrs:{\"media\":\"(min-width:641px)\",\"srcset\":_vm._f(\"mgnlMedia\")(_vm.item.image,'url')}}),_c('pg-image',{attrs:{\"lazy-src\":_vm._f(\"mgnlMedia\")(_vm.item.image,'url'),\"alt\":_vm.item.altImage}})],1)],1),_c('div',{staticClass:\"card-promotion__content\"},[_c('div',[(!_vm.isSmall)?_c('p',{staticClass:\"card-promotion__duration\"},[_c('msg',{attrs:{\"id\":\"common.card.promo.expiration\"}}),_vm._v(\" \"+_vm._s(_vm.item.duration)+\" \")],1):_vm._e(),_c('h3',{staticClass:\"card-promotion__title\"},[_vm._v(_vm._s(_vm.item.title))]),_c('p',{staticClass:\"card-promotion__text\"},[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.item.text)}})]),(!_vm.promoMobile)?_c('p',{staticClass:\"card-promotion__cta\"},[_c('msg',{attrs:{\"id\":\"common.card.promo.cta\"}})],1):_vm._e()])]),(!_vm.isSmall)?_c('i',{staticClass:\"icon-plus\",attrs:{\"aria-hidden\":\"true\"}}):_vm._e()],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <component\n    :is=\"componentIs\"\n    class=\"card-promotion\"\n    :href=\"href\"\n    :targetBlank=\"item.targetBlank\"\n    :linkNofollow=\"item.linkNofollow\"\n    v-if=\"item && Object.keys(item).length > 0 && ($config.editMode || isPromotionInDateRange)\"\n    :class=\"[classes , `${item.mainCategory==='aftersales'?' card-promotion-aftersales ':' card-promotion-sales '}`]\"\n    :id=\"`id-${item.uuid}`\"\n  >\n    <div v-if=\"$config.editMode && !isPromotionInDateRange\"\n         class=\"edit-alert-msg\">\n      Attention: promotion is expired or future or it was removed\n    </div>\n    <slot name=\"select\"></slot>\n    <div class=\"card-promotion__img\">\n      <pg-image\n        v-if=\"isSmall\"\n        :lazy-src=\"item.imageMobile | mgnlMedia('url')\"\n      />\n      <picture v-else>\n        <source\n          media=\"(min-width:0) and (max-width:640px)\"\n          :srcset=\"item.imageMobile | mgnlMedia('url')\"\n          v-if=\"item.imageMobile\"\n        />\n        <source\n          media=\"(min-width:641px)\"\n          :srcset=\"item.image | mgnlMedia('url')\"\n        />\n        <pg-image\n          :lazy-src=\"item.image | mgnlMedia('url')\"\n          :alt=\"item.altImage\"\n        />\n      </picture>\n    </div>\n    <div class=\"card-promotion__content\">\n      <div>\n        <p class=\"card-promotion__duration\" v-if=\"!isSmall\">\n          <msg id=\"common.card.promo.expiration\" />\n          {{ item.duration }}\n        </p>\n        <h3 class=\"card-promotion__title\">{{ item.title }}</h3>\n        <p class=\"card-promotion__text\">\n          <span v-html=\"item.text\"></span>\n        </p>\n        <p v-if=\"!promoMobile\" class=\"card-promotion__cta\">\n          <msg id=\"common.card.promo.cta\" />\n        </p>\n      </div>\n    </div>\n    <i class=\"icon-plus\" aria-hidden=\"true\" v-if=\"!isSmall\"></i>\n  </component>\n</template>\n\n<script>\nimport PgButton from \"../Button/Button.vue\";\nimport PgImage from \"../Image/Image.vue\";\nimport {formatDate}      from \"../../filters/datetime\"\n\nexport default {\n  name: \"CardPromotion\",\n  components: {\n    PgButton,\n    PgImage,\n  },\n  filters: {\n    formatDate\n  },\n  data: () => ({\n    isSelect: false,\n    isSmall: false\n  }),\n  props: {\n    item: {\n      type: Object,\n      default: () => {},\n    },\n    value: {\n      type: [String, Array],\n      default: \"\",\n    },\n    select: {\n      type: String,\n      default: \"\",\n    },\n    size: {\n      type: String,\n      default: \"\",\n    }\n  },\n  computed: {\n    promoMobile() {\n      return this.$mq === 'small';\n    },\n    componentIs() {\n      let component = \"a\";\n\n      if (this.select === \"direct\") {\n        component = \"label\";\n      } else if (this.select === \"confirm\") {\n        component = \"button\";\n      }\n      return component;\n    },\n    classes() {\n      let selectClass = \"\";\n\n      if (\n        this.$slots.select !== undefined &&\n        (this.value === this.item.uuid || this.value.includes(this.item.uuid))\n      ) {\n        selectClass = \"is-selected\";\n      } else if (this.$slots.select !== undefined) {\n        selectClass = \"is-not-selected\";\n      }\n\n      let sizeClass = \"\";\n\n      switch (this.size) {\n        case \"sm\":\n          sizeClass = \"card-promotion--sm\";\n          break;\n        case \"smh\":\n          sizeClass = \"card-promotion--smh\";\n          break;\n        default:\n          sizeClass = \"card-promotion--lg\";\n          break;\n      }\n\n      return [sizeClass, selectClass];\n    },\n    href() {\n      let href = this.$options.filters.mgnlLink(this.item.link, \"url\");\n      if (this.select === \"direct\" || this.select === \"confirm\") {\n        href = false;\n      }\n      return href;\n    },\n    isPromotionInDateRange() {\n      return !this.item.isFuture && !this.item.isExpired;\n    }\n  },\n  mounted() {\n    this.isSelect = this.select === \"direct\" || this.select === \"confirm\";\n\n    this.isSmall = this.size === \"sm\" || this.size === \"smh\";\n\n    this.item && this.item.uuid && this.$eventHub.emit(\"cardPromotion:active-promo\", `id-${this.item.uuid}`);\n  }\n};\n</script>\n\n<!--<style scoped>\n#root > .card-promotion&#45;&#45;lg {\n  max-width: 1024px;\n}\n\n#root > .card-promotion&#45;&#45;sm {\n  max-width: 333px;\n}\n\n#root > .card-promotion&#45;&#45;smh {\n  max-width: 333px;\n}\n</style>-->\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Card-Promotion.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Card-Promotion.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Card-Promotion.vue?vue&type=template&id=6fc9db70&\"\nimport script from \"./Card-Promotion.vue?vue&type=script&lang=js&\"\nexport * from \"./Card-Promotion.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\nexport default component.exports"],"sourceRoot":""}