{"version":3,"sources":["webpack:///resources/js/src/app/components/item/ItemPrice.vue","webpack:///./resources/js/src/app/components/item/ItemPrice.vue?8091","webpack:///./resources/js/src/app/components/item/ItemPrice.vue","webpack:///./resources/js/src/app/components/item/ItemPrice.vue?525a","webpack:///./resources/js/src/app/components/item/ItemPrice.vue?2fa3"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA;AACA;AACA,oBADA;AAGA,SACA;AACA,oBACA;AACA,mBADA;AAEA;AAFA;AAFA,GAJA;AAYA;AACA;AACA;AADA;AADA,GAZA;AAkBA,YACA;AACA,oBADA,8BACA;AACA;AACA,KAHA;AAKA,iBALA,2BAKA;AACA,8DACA,uGADA;AAGA,mDACA,sCADA,IAEA,gHAFA;AAIA;AACA,KAdA;AAgBA,mBAhBA,6BAgBA;AACA;AACA,KAlBA;AAoBA,2BApBA,qCAoBA;AACA;AACA,KAtBA;AAwBA,uBAxBA,iCAwBA;AACA;AACA,KA1BA;AA4BA,oBA5BA,8BA4BA;AACA;AACA,0EACA,mEADA,KAEA,wEACA,mCAHA;AAIA,KAlCA;AAoCA,wCApCA,kDAoCA;AAAA;;AACA;AACA;AACA,+FACA,gEACA,2DAFA;AAKA,OAPA;AAQA;AA7CA,GAnBA;AAkEA;AACA,+CADA,uDACA,QADA,EACA;AACA,oCACA,sBADA,IAEA,uBAFA,IAGA,+BAHA;AAIA,KANA;AAQA,UARA,kBAQA,QARA,EASA;AACA;AACA;AAXA;AAlEA,G;;;;;;;;;;;;ACnEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,oBAAoB,SAAS,sCAAsC,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,WAAW;AACX;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+CAA+C;AAC1D;AACA,6BAA6B,2BAA2B;AACxD;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC5OA;AAAA;AAAA;AAAA;AAAwF;AAC3B;AACL;;;AAGxD;AACsG;AACtG,gBAAgB,2GAAU;AAC1B,EAAE,+EAAM;AACR,EAAE,oFAAM;AACR,EAAE,6FAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;ACtCf;AAAA;AAAA,wCAAiM,CAAgB,6OAAG,EAAC,C;;;;;;;;;;;;ACArN;AAAA;AAAA;AAAA;AAAA;AAAA","file":"chunks/ceres-client-40.js","sourcesContent":["<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","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 { 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","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&\"","export * from \"-!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ItemPrice.vue?vue&type=template&id=27592de8&\""],"sourceRoot":""}