{"version":3,"sources":["webpack:///./resources/js/src/app/components/item/ItemPrice.vue?8091","webpack:///./resources/js/src/app/components/item/ItemPrice.vue?db31","webpack:///resources/js/src/app/components/item/ItemPrice.vue","webpack:///./resources/js/src/app/components/item/ItemPrice.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","class","hasCrossPrice","showCrossPrice","staticClass","hasSpecialOffer","_v","_s","_f","currentVariation","prices","default","unitPrice","formatted","rrp","_e","showDynamicPrice","$translate","price","$options","filters","currency","variationTotalPrice","propertiesWithAdditionalCostsVisible","length","_l","property","key","propertyId","names","name","propertySurcharge","properties","hasTax","lowestPrice","value","domProps","innerHTML","unit","content","unitOfMeasurement","variation","mayShowUnitPrice","variationGraduatedPrice","basePrice","_withStripped","component","options","__file"],"mappings":"kGAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EAAG,MAAO,CAAEE,MAAO,CAAE,iBAAkBN,EAAIO,gBAAmB,CACnEP,EAAIQ,gBAAkBR,EAAIO,cACtBH,EACE,MACA,CACEK,YAAa,aACbH,MAAO,CAAE,mBAAoBN,EAAIU,kBAEnC,CACEN,EACE,MACA,CAAEK,YAAa,oCACf,CACET,EAAIU,gBACA,CACEV,EAAIW,GACF,qBACEX,EAAIY,GACFZ,EAAIa,GAAG,iBAAPb,CACEA,EAAIc,iBAAiBC,OAAOC,QAAQC,UACjCC,WACH,IAGJ,mBAGN,CACElB,EAAIW,GACF,qBACEX,EAAIY,GACFZ,EAAIa,GAAG,iBAAPb,CACEA,EAAIc,iBAAiBC,OAAOI,IAAIF,UAC7BC,YAGP,oBAIZ,KAINlB,EAAIoB,KACRpB,EAAIW,GAAG,KACPP,EACE,OACA,CACEK,YAAa,WACbH,MAAO,CAAE,mBAAoBN,EAAIU,kBAEnC,CACEN,EACE,OACA,CACEJ,EAAIqB,iBACA,CACErB,EAAIW,GACF,qBACEX,EAAIY,GACFZ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AiBM,QAAN,2CAGI,wBApBJ,WAqBM,OAAN,wEAGI,oBAxBJ,WAyBM,OAAN,oEAGI,iBA5BJ,WA6BM,IAAN,uCACM,OAAN,yDACA,4DACA,gEACA,gCAGI,qCApCJ,WAoCM,IAAN,OACM,OAAN,qDACQ,IAAR,aACQ,OAAR,sDACA,oDACA,uDAME,QAAF,CACI,4CADJ,SACA,GACM,OAAN,cACA,iBACA,kBACA,iCAGI,OARJ,SAQA,GAEM,OAAN,kB,OCxIIC,EAAY,YACd,EACApD,EHkOoB,IGhOpB,EACA,KACA,KACA,MAuBFoD,EAAUC,QAAQC,OAAS,qDACZ,UAAAF,E","file":"chunks/ceres-40.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\", { class: { \"has-crossprice\": _vm.hasCrossPrice } }, [\n _vm.showCrossPrice && _vm.hasCrossPrice\n ? _c(\n \"div\",\n {\n staticClass: \"crossprice\",\n class: { \"is-special-offer\": _vm.hasSpecialOffer }\n },\n [\n _c(\n \"del\",\n { staticClass: \"text-muted small text-appearance\" },\n [\n _vm.hasSpecialOffer\n ? [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm._f(\"itemCrossPrice\")(\n _vm.currentVariation.prices.default.unitPrice\n .formatted,\n true\n )\n ) +\n \"\\n \"\n )\n ]\n : [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm._f(\"itemCrossPrice\")(\n _vm.currentVariation.prices.rrp.unitPrice\n .formatted\n )\n ) +\n \"\\n \"\n )\n ]\n ],\n 2\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"span\",\n {\n staticClass: \"price h1\",\n class: { \"is-special-offer\": _vm.hasSpecialOffer }\n },\n [\n _c(\n \"span\",\n [\n _vm.showDynamicPrice\n ? [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm.$translate(\n \"Ceres::Template.dynamicVariationPrice\",\n {\n price: _vm.$options.filters.currency(\n _vm.variationTotalPrice,\n _vm.currentVariation.prices.default.currency\n )\n }\n )\n ) +\n \"\\n \"\n )\n ]\n : [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm._f(\"currency\")(\n _vm.variationTotalPrice,\n _vm.currentVariation.prices.default.currency\n )\n ) +\n \"\\n \"\n )\n ]\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"sup\", [\n _vm._v(_vm._s(_vm.$translate(\"Ceres::Template.singleItemFootnote1\")))\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.propertiesWithAdditionalCostsVisible.length\n ? _c(\n \"ul\",\n { staticClass: \"text-muted pl-0 list-unstyled\" },\n _vm._l(_vm.propertiesWithAdditionalCostsVisible, function(property) {\n return _c(\"li\", { key: property.propertyId }, [\n _c(\n \"span\",\n { staticClass: \"d-block\" },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(property.property.names.name) +\n \" \"\n ),\n _vm.$options.filters.propertySurcharge(\n _vm.currentVariation.properties,\n property.propertyId\n ) > 0\n ? [\n _vm._v(\n \"(\" +\n _vm._s(\n _vm.$translate(\"Ceres::Template.basketPlusAbbr\")\n ) +\n \" \" +\n _vm._s(\n _vm._f(\"currency\")(\n _vm._f(\"propertySurcharge\")(\n _vm.currentVariation.properties,\n property.propertyId\n )\n )\n ) +\n \")\"\n )\n ]\n : _vm._e(),\n _vm._v(\" \"),\n _vm.hasTax(property)\n ? [\n _vm._v(\n _vm._s(\n _vm.$translate(\n \"Ceres::Template.singleItemFootnote1\"\n )\n )\n )\n ]\n : _vm._e()\n ],\n 2\n )\n ])\n }),\n 0\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.currentVariation.prices.default.lowestPrice.value &&\n _vm.showCrossPrice &&\n _vm.hasCrossPrice\n ? _c(\"div\", { staticClass: \"lowest-price text-muted mb-3\" }, [\n _c(\"div\", {\n domProps: {\n innerHTML: _vm._s(\n _vm.$translate(\"Ceres::Template.singleItemLowestPrice\", {\n price:\n _vm.currentVariation.prices.default.lowestPrice.formatted\n })\n )\n }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.currentVariation.unit\n ? _c(\n \"div\",\n {\n staticClass: \"base-price text-muted my-3\",\n class: {\n \"is-single-piece\":\n _vm.currentVariation.unit &&\n _vm.currentVariation.unit.content === 1 &&\n _vm.currentVariation.unit.unitOfMeasurement === \"C62\"\n }\n },\n [\n _c(\"div\", [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.$translate(\"Ceres::Template.singleItemContent\")) +\n \"\\n \"\n ),\n _c(\"span\", [\n _vm._v(\n _vm._s(\n _vm._f(\"numberFormat\")(_vm.currentVariation.unit.content)\n ) + \" \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"span\", [_vm._v(_vm._s(_vm.currentVariation.unit.names.name))])\n ]),\n _vm._v(\" \"),\n _vm.currentVariation.variation.mayShowUnitPrice\n ? _c(\"div\", [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm.$translate(\"Ceres::Template.singleItemUnitPrice\")\n ) +\n \"\\n \"\n ),\n _c(\"span\", { staticClass: \"base-price-value\" }, [\n _vm._v(\n \"\\n \" +\n _vm._s(\n _vm._f(\"specialOffer\")(\n _vm.variationGraduatedPrice.basePrice,\n _vm.currentVariation.prices,\n \"basePrice\"\n )\n ) +\n \"\\n \"\n )\n ])\n ])\n : _vm._e()\n ]\n )\n : _vm._e()\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ItemPrice.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!./ItemPrice.vue?vue&type=script&lang=js&\"","<template>\n <div :class=\"{ 'has-crossprice': hasCrossPrice }\">\n <div class=\"crossprice\" v-if=\"showCrossPrice && hasCrossPrice\" :class=\"{ 'is-special-offer': hasSpecialOffer }\">\n <del class=\"text-muted small text-appearance\">\n <template v-if=\"hasSpecialOffer\">\n {{ currentVariation.prices.default.unitPrice.formatted | itemCrossPrice(true) }}\n </template>\n <template v-else>\n {{ currentVariation.prices.rrp.unitPrice.formatted | itemCrossPrice }}\n </template>\n </del>\n </div>\n\n <span class=\"price h1\" :class=\"{ 'is-special-offer': hasSpecialOffer }\">\n <span>\n <template v-if=\"showDynamicPrice\">\n {{ $translate(\"Ceres::Template.dynamicVariationPrice\",\n {\n price: $options.filters.currency(variationTotalPrice, currentVariation.prices.default.currency)\n }\n ) }}\n </template>\n\n <template v-else>\n {{ variationTotalPrice | currency(currentVariation.prices.default.currency) }}\n </template>\n </span>\n <sup>{{ $translate(\"Ceres::Template.singleItemFootnote1\") }}</sup>\n </span>\n\n <ul class=\"text-muted pl-0 list-unstyled\" v-if=\"propertiesWithAdditionalCostsVisible.length\">\n <li v-for=\"property in propertiesWithAdditionalCostsVisible\" :key=\"property.propertyId\">\n <span class=\"d-block\">\n {{ property.property.names.name }} <template v-if=\"$options.filters.propertySurcharge(currentVariation.properties, property.propertyId) > 0\">({{ $translate(\"Ceres::Template.basketPlusAbbr\") }} {{ currentVariation.properties | propertySurcharge(property.propertyId) | currency }})</template>\n <template v-if=\"hasTax(property)\">{{ $translate(\"Ceres::Template.singleItemFootnote1\") }}</template>\n </span>\n </li>\n </ul>\n\n <!-- lowest price, according to ยง 11 PAngV -->\n <div class=\"lowest-price text-muted mb-3\" v-if=\"currentVariation.prices.default.lowestPrice.value && showCrossPrice && hasCrossPrice\">\n <div v-html=\"$translate('Ceres::Template.singleItemLowestPrice', {'price': currentVariation.prices.default.lowestPrice.formatted})\">\n </div>\n </div>\n \n <!-- class .is-single-piece is added for customers to hide the unit if it is C62 -->\n <div class=\"base-price text-muted my-3\"\n v-if=\"currentVariation.unit\"\n :class=\"{ 'is-single-piece': currentVariation.unit && currentVariation.unit.content === 1 && currentVariation.unit.unitOfMeasurement === 'C62' }\">\n <div>\n {{ $translate(\"Ceres::Template.singleItemContent\") }}\n <span>{{ currentVariation.unit.content | numberFormat }} </span>\n <span>{{ currentVariation.unit.names.name }}</span>\n </div>\n <div v-if=\"currentVariation.variation.mayShowUnitPrice\">\n {{ $translate(\"Ceres::Template.singleItemUnitPrice\") }}\n <span class=\"base-price-value\">\n {{ variationGraduatedPrice.basePrice | specialOffer(currentVariation.prices, \"basePrice\") }}\n </span>\n </div>\n </div>\n\n </div>\n</template>\n\n<script>\nimport { hasVat } from \"../../helper/OrderPropertyHelper\";\nexport default {\n name: \"item-price\",\n\n props:\n {\n showCrossPrice:\n {\n type: Boolean,\n default: true\n }\n },\n\n inject: {\n itemId: {\n default: null\n }\n },\n\n computed:\n {\n currentVariation() {\n return this.$store.getters[`${this.itemId}/currentItemVariation`]\n },\n\n hasCrossPrice() {\n const hasRrpPrice = !!this.currentVariation.prices.rrp &&\n this.currentVariation.prices.rrp.unitPrice.value > this.currentVariation.prices.default.unitPrice.value;\n\n const hasBeforePrice = this.hasSpecialOffer &&\n !!this.currentVariation.prices.default &&\n this.currentVariation.prices.default.unitPrice.value > this.currentVariation.prices.specialOffer.unitPrice.value;\n\n return hasRrpPrice || hasBeforePrice;\n },\n\n hasSpecialOffer() {\n return !!this.currentVariation.prices.specialOffer;\n },\n\n variationGraduatedPrice() {\n return this.$store.getters[`${this.itemId}/variationGraduatedPrice`];\n },\n\n variationTotalPrice() {\n return this.$store.getters[`${this.itemId}/variationTotalPrice`];\n },\n\n showDynamicPrice() {\n const state = this.$store.state.items[this.itemId];\n return App.config.item.showPleaseSelect && App.isCheapestSorting\n && (state.variationSelect && !state.variationSelect.isVariationSelected)\n && (state.pleaseSelectVariationId === this.currentVariation.variation.id\n || state.pleaseSelectVariationId === 0);\n },\n\n propertiesWithAdditionalCostsVisible() {\n return this.currentVariation.properties.filter(entry => {\n const property = entry.property;\n return property && property.isShownAsAdditionalCosts && property.isShownOnItemPage\n && ((!property.isOderProperty && !App.useVariationOrderProperties)\n || this.isVariationOrderPropertyRequiredPreselected(property))\n\n\n });\n }\n },\n methods: {\n isVariationOrderPropertyRequiredPreselected(property) {\n return property.isRequired \n && property.isPreSelected \n && property.isOderProperty \n && App.useVariationOrderProperties\n },\n\n hasTax(property)\n {\n return hasVat(property);\n }\n }\n}\n</script>\n","import { render, staticRenderFns } from \"./ItemPrice.vue?vue&type=template&id=27592de8&\"\nimport script from \"./ItemPrice.vue?vue&type=script&lang=js&\"\nexport * from \"./ItemPrice.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(\"/home/runner/work/plugin-ceres/plugin-ceres/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('27592de8')) {\n api.createRecord('27592de8', component.options)\n } else {\n api.reload('27592de8', component.options)\n }\n module.hot.accept(\"./ItemPrice.vue?vue&type=template&id=27592de8&\", function () {\n api.rerender('27592de8', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"resources/js/src/app/components/item/ItemPrice.vue\"\nexport default component.exports"],"sourceRoot":""}