@perevorot/shop 2.0.158 → 2.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CartItem.js","sources":["../../../../src/components/shop/cart/CartItem.vue","../../../../src/components/shop/cart/CartItem.vue?vue&type=template&id=30ed1a56&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>"],"names":["script","name","props","item","Object","setup","cartStorage","inject","store","useStore","loading","ref","input","options","attributes","length","optionsToggled","auth","computed","getters","value","price","code","category","categoryFull","brand","property","index","itemListName","quantity","difference","dispatch","cart","product","id","finally","callback","object","ecommerce","currency","parseFloat","items","item_name","item_id","event","item_brand","item_list_name","indexOf","split","forEach","segment","trim","item_category","item_variant","$env","debug","console","log","window","dataLayer","push","watch","values","increase","decrease","remove","q","gotoProduct","href","addEventListener","commit","location","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_15","_hoisted_16","_hoisted_17","shop-product-category","_hoisted_20","shop-product-name","_hoisted_23","_hoisted_33","_hoisted_38","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_48","_hoisted_54","_hoisted_56","_hoisted_59","_hoisted_65","_hoisted_67","$props","deleted","_createElementBlock","createElementBlock","_normalizeClass","inactive","active","is-bundle","bundle","data-code","shop-product","_openBlock","_hoisted_2","_toDisplayString","_ctx","__","mb-0","onClick","$setup","apply","arguments","disabled","_createBlock","_component_wishlist_add","productId","no-thumb","image","src","_hoisted_12","_hoisted_14","_renderSlot","$slots","_hoisted_18","toDisplayString","_hoisted_19","openBlock","_hoisted_21","_hoisted_22","type","min","onUpdate:modelValue","_cache","$event","_vModelText","_hoisted_30","innerHTML","_createTextVNode","renderSlot","filters","$filters","bundle-price","priceOld","amount","percent","sum","shop-product-price","_hoisted_37","_withDirectives","_Fragment","option","key","is-checked","for","_hoisted_42","description","_hoisted_43","_hoisted_46","_hoisted_47","_hoisted_49","second","_hoisted_51","_hoisted_53","_hoisted_55","third","_hoisted_57","_hoisted_58","_hoisted_60","_hoisted_62","_hoisted_64","_hoisted_66"],"mappings":"oDAiJeA,EAAA,CACXC,K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AAW0J,OAAOvK,MAAG,0CAI5DkG,GAAIhG,KAACW,WAAW6F,QAAUR,GAAIhG,KAACW,WAAW8J,OAA5E9D,EAAAwB,YAAAjC,EAAAA,mBAuBK,MAvBLwE,EAuBK,CAtBDC,GAGAjG,EAAAA,mBAYK,MAZLmB,GAYK,CAXD+E,GAGAlG,EAOGC,mBAAA,IAAA,CAPCsC,QAAKwB,EAAA,MAAAA,EAAA,IAAA,SAAAC,GAAA,OAAExB,eAAYlB,GAAAhG,KAAKW,WAAW8J,MAAMxG,UACzCS,EAKQC,mBAAA,SAAA,CALAN,MAAK+B,EAAAA,eAAA,CAAC,kBAA+C,CAAAqB,YAAAzB,GAAAhG,KAAKW,WAAW8J,MAAM/C,WACjC1B,GAAAhG,KAAKW,WAAW8J,MAAM/C,qBAApExB,EAA4EC,mBAAA,MAAA,OAAtEwB,IAAK3B,GAAIhG,KAACW,WAAW8J,MAAM/C,kCACjCxB,qBAEK,MAAA2E,GAAAC,aAIjBpG,EAAAA,mBAKK,MALLoB,GAKK,CAJuBE,GAAAhG,KAAKW,WAAW8J,MAAMtJ,MAA9CwF,EAAAwB,YAAAjC,EAAAA,mBAAoH,MAApH6E,GAAuDlE,EAAAA,gBAAAC,EAAAC,GAAwB,mBAAA,IAAGF,EAAAoB,gBAAAjC,GAAAhG,KAAKW,WAAW8J,MAAMtJ,MAAK,oCAC7GuD,EAAAC,mBAEK,MAFLoB,GAEK,CADDrB,EAAAA,mBAAuF,IAAA,CAAnFuC,QAAKwB,EAAA,MAAAA,EAAA,IAAA,SAAAC,GAAA,OAAExB,eAAYlB,GAAAhG,KAAKW,WAAW8J,MAAMxG,SAAU4C,kBAAAb,GAAAhG,KAAKW,WAAW8J,MAAM3K,MAAG"}
1
+ {"version":3,"file":"CartItem.js","sources":["../../../../src/components/shop/cart/CartItem.vue","../../../../src/components/shop/cart/CartItem.vue?vue&type=template&id=7bd8b5c0&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>"],"names":["script","name","props","item","Object","setup","cartStorage","inject","store","useStore","loading","ref","input","options","attributes","length","optionsToggled","auth","computed","getters","value","price","code","category","categoryFull","brand","property","index","itemListName","quantity","difference","dispatch","cart","product","id","finally","callback","_$env$locale2","object","ecommerce","currency","$env","locale","parseFloat","items","item_name","item_id","event","item_brand","item_list_name","indexOf","split","forEach","segment","trim","item_category","item_variant","debug","console","log","window","dataLayer","push","watch","values","increase","decrease","remove","_$env$locale","q","gotoProduct","href","addEventListener","commit","location","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_15","_hoisted_16","_hoisted_17","shop-product-category","_hoisted_20","shop-product-name","_hoisted_23","_hoisted_33","_hoisted_38","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_48","_hoisted_54","_hoisted_56","_hoisted_59","_hoisted_65","_hoisted_67","$props","deleted","_createElementBlock","createElementBlock","_normalizeClass","inactive","active","is-bundle","bundle","data-code","shop-product","_openBlock","_hoisted_2","_toDisplayString","_ctx","__","mb-0","onClick","$setup","apply","arguments","disabled","_createBlock","_component_wishlist_add","productId","no-thumb","image","src","_hoisted_12","_hoisted_14","_renderSlot","$slots","_hoisted_18","toDisplayString","_hoisted_19","openBlock","_hoisted_21","_hoisted_22","type","min","onUpdate:modelValue","_cache","$event","_vModelText","_hoisted_30","innerHTML","_createTextVNode","renderSlot","filters","$filters","bundle-price","priceOld","amount","percent","sum","shop-product-price","_hoisted_37","_withDirectives","_Fragment","option","key","is-checked","for","_hoisted_42","description","_hoisted_43","_hoisted_46","_hoisted_47","_hoisted_49","second","_hoisted_51","_hoisted_53","_hoisted_55","third","_hoisted_57","_hoisted_58","_hoisted_60","_hoisted_62","_hoisted_64","_hoisted_66"],"mappings":"oDAiJeA,EAAA,CACXC,KAAM,WACNC,MAAO,CACHC,KAAMC,QAEVC,MAAK,SAACH,GACF,IAAII,EAAcC,SAAO,eACzBD,EAAcA,GAA4B,OAE1C,IAAME,EAAQC,EAAAA,WACRC,EAAUC,OAAI,GACdC,EAAQD,EAAA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OAAO1K,MAAG,0CAI5DqG,GAAInG,KAACW,WAAWgG,QAAUR,GAAInG,KAACW,WAAWiK,OAA5E9D,EAAAwB,YAAAjC,EAAAA,mBAuBK,MAvBLwE,EAuBK,CAtBDC,GAGAjG,EAAAA,mBAYK,MAZLmB,GAYK,CAXD+E,GAGAlG,EAOGC,mBAAA,IAAA,CAPCsC,QAAKwB,EAAA,MAAAA,EAAA,IAAA,SAAAC,GAAA,OAAExB,eAAYlB,GAAAnG,KAAKW,WAAWiK,MAAMxG,UACzCS,EAKQC,mBAAA,SAAA,CALAN,MAAK+B,EAAAA,eAAA,CAAC,kBAA+C,CAAAqB,YAAAzB,GAAAnG,KAAKW,WAAWiK,MAAM/C,WACjC1B,GAAAnG,KAAKW,WAAWiK,MAAM/C,qBAApExB,EAA4EC,mBAAA,MAAA,OAAtEwB,IAAK3B,GAAInG,KAACW,WAAWiK,MAAM/C,kCACjCxB,qBAEK,MAAA2E,GAAAC,aAIjBpG,EAAAA,mBAKK,MALLoB,GAKK,CAJuBE,GAAAnG,KAAKW,WAAWiK,MAAMzJ,MAA9C2F,EAAAwB,YAAAjC,EAAAA,mBAAoH,MAApH6E,GAAuDlE,EAAAA,gBAAAC,EAAAC,GAAwB,mBAAA,IAAGF,EAAAoB,gBAAAjC,GAAAnG,KAAKW,WAAWiK,MAAMzJ,MAAK,oCAC7G0D,EAAAC,mBAEK,MAFLoB,GAEK,CADDrB,EAAAA,mBAAuF,IAAA,CAAnFuC,QAAKwB,EAAA,MAAAA,EAAA,IAAA,SAAAC,GAAA,OAAExB,eAAYlB,GAAAnG,KAAKW,WAAWiK,MAAMxG,SAAU4C,kBAAAb,GAAAnG,KAAKW,WAAWiK,MAAM9K,MAAG"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("@perevorot/shop/dist/helpers"),o=require("vuex"),n=require("formvuelate"),r=require("@formvuelate/plugin-vee-validate"),a=require("@perevorot/shop/dist/forms/FormText"),l=require("@perevorot/shop/dist/forms/FormRadio"),i=require("yup"),c=require("vue-toastification");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var u=s(r),m=s(a),p=s(l),v=d(i),h=e.defineComponent({name:"CheckoutItem",props:{item:Object},setup:function(t){var o=e.computed((function(){return t.item.attributes.options&&t.item.attributes.options.length?t.item.attributes.options:[]}));return{itemOptions:e.computed((function(){return t.item.options&&t.item.options.length?t.item.options.filter((function(e){return-1!==o.value.indexOf(e.id)})):[]}))}}}),f={key:0,class:"column is-12"},y={class:"bundle-title"},g={class:"column name"},k={class:"column is-narrow"},_=["href"],E=["src"],V={key:1},N=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],b={class:"column"},B={class:"columns is-gapless mb-0"},C={class:"column"},w={key:0,class:"code"},S={class:"title"},D=["href"],T={class:"column is-2 has-text-centered is-relative"},x={class:"quantity"},L={key:0,class:"quantity-price"},M=["innerHTML"],P={class:"column is-2 has-text-right"},F=["innerHTML"],O=["innerHTML"],H=["innerHTML"],q={key:0,class:"options is-toggled"},$={class:"toggler"},U={class:"wrapper"},z={class:"column"},R={class:"option-title"},A={class:"column is-2 has-text-right"},j=["innerHTML"],W={key:0,class:"bundle columns"},J={class:"column is-narrow"},I=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),G=["href"],K=["src"],Q={key:1},X=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Y={class:"column"},Z={key:0,class:"code"},ee={class:"title"},te=["href"],oe={key:1,class:"bundle columns"},ne={class:"column is-narrow"},re=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),ae=["href"],le=["src"],ie={key:1},ce=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],se={class:"column"},de={key:0,class:"code"},ue={class:"title"},me=["href"];function pe(e,t,o){return o?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ve(){}function he(e){return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}h.render=function(t,o,n,r,a,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["columns is-multiline shop-cart-item",{"is-bundle":t.item.attributes.bundle}])},[t.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",y,e.toDisplayString(t.__("shop.cart.bundle")),1)])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",g,[e.createElementVNode("div",{class:e.normalizeClass(["columns",{"mb-0":t.item.attributes.bundle}])},[e.createElementVNode("div",k,[e.createElementVNode("a",{href:t.item.attributes.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.image}])},[t.item.attributes.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.image},null,8,E)):(e.openBlock(),e.createElementBlock("svg",V,N))],2)],8,_)]),e.createElementVNode("div",b,[e.createElementVNode("div",B,[e.createElementVNode("div",C,[t.item.attributes.code?(e.openBlock(),e.createElementBlock("div",w,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",S,[e.createElementVNode("a",{href:t.item.attributes.href},e.toDisplayString(t.item.name),9,D)])]),e.createElementVNode("div",T,[e.createElementVNode("div",x,"⨉ "+e.toDisplayString(t.item.quantity),1),parseInt(t.item.quantity)>1?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.item.attributes.price)},null,8,M),e.createTextVNode(" / "+e.toDisplayString(t.__("shop.cart.q")),1)])):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",P,[e.createElementVNode("div",{class:e.normalizeClass(["price",{"bundle-price":t.item.attributes.bundle}])},[t.item.attributes.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(t.item.attributes.priceOld*t.item.quantity)},null,8,F)):e.createCommentVNode("v-if",!0),t.item.attributes.bundle&&t.item.attributes.amount?(e.openBlock(),e.createElementBlock("div",{key:1,class:"bundle-amount",innerHTML:t.__("shop.cart.bundle_amount")+(t.item.attributes.amount.percent?t.item.attributes.amount.percent+"%":t.$filters.price(t.item.attributes.amount.sum*t.item.quantity))},null,8,O)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{innerHTML:t.$filters.price(t.item.attributes.price*t.item.quantity)},null,8,H)],2)])]),t.itemOptions&&t.itemOptions.length?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",$,[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.cart.additional"))+" "+e.toDisplayString(t.itemOptions.length),1)]),e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.itemOptions,(function(o,n){return e.openBlock(),e.createElementBlock("div",{key:n,class:"columns is-checked"},[e.createElementVNode("div",z,[e.createElementVNode("div",R,e.toDisplayString(o.name),1)]),e.createElementVNode("div",A,[e.createTextVNode("+"),e.createElementVNode("span",{innerHTML:t.$filters.price(o.price)},null,8,j)])])})),128))])])):e.createCommentVNode("v-if",!0)])],2),t.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",J,[I,e.createElementVNode("a",{href:t.item.attributes.second.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.second.image}])},[t.item.attributes.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.second.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,X))],2)],8,G)]),e.createElementVNode("div",Y,[t.item.attributes.second.code?(e.openBlock(),e.createElementBlock("div",Z,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.second.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ee,[e.createElementVNode("a",{href:t.item.attributes.second.href},e.toDisplayString(t.item.attributes.second.name),9,te)])])])):e.createCommentVNode("v-if",!0),t.item.attributes.bundle&&t.item.attributes.third?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[re,e.createElementVNode("a",{href:t.item.attributes.third.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.third.image}])},[t.item.attributes.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.third.image},null,8,le)):(e.openBlock(),e.createElementBlock("svg",ie,ce))],2)],8,ae)]),e.createElementVNode("div",se,[t.item.attributes.third.code?(e.openBlock(),e.createElementBlock("div",de,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.third.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ue,[e.createElementVNode("a",{href:t.item.attributes.third.href},e.toDisplayString(t.item.attributes.third.name),9,me)])])])):e.createCommentVNode("v-if",!0)])],2)},v.addMethod(v.string,"numberFilled",(function(e,t){return this.test({name:"numberFilled",exclusive:!0,message:__("auth.validation.number"),params:{min:e},test:function(e){return!(""==e||isNaN(e))}})})),e.markRaw(m.default),e.markRaw(p.default);var fe=n.SchemaFormFactory([u.default({})]),ye={props:{message:""},template:'<div v-html="message"></div>'};window.viewedSwiperOptions={slidesPerView:"auto",freeMode:!0,slideClass:"product",mousewheel:{forceToAxis:!0},navigation:{nextEl:".next",prevEl:".prev"},observer:!0,observeParents:!0};var ge=e.defineComponent({components:{CheckoutItem:h,SchemaForm:fe},props:{isLogin:{type:Boolean,default:!0},isPhoneMasked:{type:Boolean,default:!0},isPromoCode:{type:Boolean,default:!0},isConsent:{type:Boolean,default:!1},isPaymentMethodOverSummary:{type:Boolean,default:!1},userFields:{type:Array,default:["last_name","name","email","phone"]},redirectOnEmpty:{type:String,default:!1},showPlaceholders:{type:Boolean,default:!1},isTrackAfterSuccessOnlinePurchase:{type:Boolean,default:!1}},name:"order-checkout",setup:function(r){var a=e.useSlots(),l=c.useToast(),i=o.useStore(),s=e.ref(!1),d=e.computed((function(){return i.getters["cart/quantity"]})),u=e.computed((function(){return i.getters["cart/items"]})),h=e.computed((function(){return i.getters["cart/total"]})),f=e.computed((function(){return i.getters["auth/is"]})),y=e.computed((function(){return i.getters["checkout/user"]})),g=e.ref(!0),k=e.ref(null),_=e.ref(!1),E=e.ref(null),V=e.ref(!1),N=e.ref(null),b=e.ref({}),B=e.ref([]),C=e.ref([]),w=e.ref("new"),S=e.ref(null),D=e.computed((function(){return i.getters["checkout/shippingData"]})),T=e.ref(!1),x=e.ref(!1),L=e.ref(""),M=e.ref(null),P=e.ref(!1),F=e.getCurrentInstance(),O=e.computed((function(){var e=u.value.reduce((function(e,t){return e+(t.attributes.loyalty?t.attributes.loyalty.points*t.quantity:0)}),0);return{points:e,name:t.pluralize(e,__("shop.pluralize.points"))}})),H=e.ref(""),q=e.ref(!1),$=e.computed((function(){return t.numberFormat(y.value.loyalty_points-(q.value?H.value:0))})),U=e.computed((function(){return r.isConsent&&V.value||!r.isConsent})),z=e.computed({get:function(){return i.getters["checkout/dontcall"]},set:function(e){i.commit("checkout/dontcall",e)}}),R=e.computed({get:function(){var e=i.getters["checkout/comment"];return e&&(T.value=!0),e},set:function(e){i.commit("checkout/comment",e)}});e.watch(R,(function(e){e.length>1e3&&(R.value=R.value.substring(0,1e3))}));var A=function(t,o){return e.computed({get:function(){return y.value[t]?y.value[t]:o},set:function(e){var o=JSON.parse(JSON.stringify(y.value));o[t]=e,i.commit("checkout/user",o)}})};e.provide("field",A);var j=e.ref({last_name:A("last_name"),middle_name:A("middle_name"),name:A("name"),email:A("email"),phone:A("phone"),registration_number:A("registration_number"),company_name:A("company_name"),user_type:A("user_type","individual")});e.provide("user",j),i.dispatch("auth/me",{finally:function(){}});var W=e.computed({get:function(){return i.getters["checkout/shipping"]},set:function(e){i.commit("checkout/shipping",e)}}),J=e.computed({get:function(){return i.getters["checkout/payment"]},set:function(e){i.commit("checkout/payment",e)}}),I=e.computed((function(){return W.value?B.value.find((function(e){return e.id==W.value})):{}})),G=e.computed((function(){return J.value?C.value.find((function(e){return e.id==J.value})):{}})),K=e.computed((function(){return ee(B.value,W.value)})),Q=e.computed((function(){return ee(C.value,J.value)})),X=e.computed((function(){return te(B.value)})),Y=e.computed((function(){return te(C.value)})),Z=e.computed((function(){var e=[];return u.value.forEach((function(t){-1===e.indexOf(t.category_id)&&e.push(t.category_id)})),e})),ee=function(e,t){var o=0;if(t){var n=e.find((function(e){return e.id==t}));n&&(o="sum"==n.type?n.amount:Math.round(h.value*n.amount/100))}return o},te=function(e){var t=[];return e.forEach((function(e){if(e.restrictions&&Object.keys(e.restrictions).length){var o=!0,n=e.restrictions;n.price_min&&n.price_max?(o=h.value>=n.price_min&&h.value<=n.price_max,e.restrictedForce=!o):n.price_min?(o=h.value>=n.price_min,e.restrictedForce=!o):n.price_max&&(o=h.value<=n.price_max,e.restrictedForce=!o),o&&W.value&&n.shipping_type&&n.shipping_type.length&&(o=-1!==n.shipping_type.indexOf(W.value)),o&&J.value&&n.payment_method&&n.payment_method.length&&(o=-1!==n.payment_method.indexOf(J.value)),o&&n.categories&&n.categories.length&&(o=!Z.value.filter((function(e){return!n.categories.includes(e)})).length,e.restrictedForce=!o),o&&"user_type"===n.code&&(o=n.value===j.value.user_type,e.restrictedForce=!o),e.restricted=!o}else e.restricted=!1;e.restrictedForce||t.push(e)})),t},oe=e.computed((function(){var e=0;return u.value.forEach((function(t){var o=0;t.attributes.priceOld&&(o=t.attributes.priceOld-t.attributes.price),e+=o*t.quantity})),e}));$http.post(window.location.href).then((function(e){B.value=e.data.shipping,C.value=e.data.payment})),e.watch(w,(function(e){"login"==e&&i.commit("auth/modal","login")}));var ne={user_type:{component:p.default,model:"user_type",label:"",list:[{code:"individual",value:__("auth.registration.form.user_type_individual")},{code:"legal",value:__("auth.registration.form.user_type_legal")}]},name:{component:m.default,label:__("auth.registration.form.name"),model:"first_name",placeholder:r.showPlaceholders?__("auth.registration.form.name"):""},last_name:{component:m.default,label:__("auth.registration.form.last_name"),model:"last_name",placeholder:r.showPlaceholders?__("auth.registration.form.last_name"):""},middle_name:{component:m.default,label:__("auth.registration.form.middle_name"),model:"middle_name",placeholder:r.showPlaceholders?__("auth.registration.form.middle_name"):""},phone:{component:m.default,label:__("auth.registration.form.phone"),model:"phone",type:"phone"},registration_number:{component:m.default,label:__("auth.registration.form.registration_number"),model:"registration_number",condition:function(e){return"legal"===e.user_type},placeholder:r.showPlaceholders?__("auth.registration.form.registration_number"):""},company_name:{component:m.default,label:__("auth.registration.form.company_name"),model:"company_name",condition:function(e){return"legal"===e.user_type},placeholder:r.showPlaceholders?__("auth.registration.form.company_name"):""},email:{component:m.default,label:__("auth.login.form.email"),model:"email",placeholder:r.showPlaceholders?__("auth.login.form.email"):""}};r.isPhoneMasked&&(ne.phone.mask="(###) ###-##-##");var re=Object.keys(ne).reduce((function(e,t){return r.userFields.includes(t)&&(e[t]=ne[t]),e}),{});re=r.userFields.reduce((function(e,t){return e[t]=re[t],e}),{});var ae=e.ref(re);n.useSchemaForm(j);var le={last_name:v.string().trim().required(__("auth.validation.required")),middle_name:v.string().trim().required(__("auth.validation.required")),name:v.string().trim().required(__("auth.validation.required")),phone:r.isPhoneMasked?v.string().required(__("auth.validation.phone")).matches(/^\(\d{3}\) \d{3}\-\d{2}\-\d{2}$/,__("auth.validation.phone")):v.string().required(__("auth.validation.phone")),email:v.string().trim().email(__("auth.validation.email")).required(__("auth.validation.required")),registration_number:v.string().when("user_type",(function(e){if("legal"==e)return v.string().numberFilled()})),company_name:v.string().when("user_type",(function(e){if("legal"==e)return v.string().required(__("auth.validation.required"))}))},ie=Object.keys(le).reduce((function(e,t){return r.userFields.includes(t)&&(e[t]=le[t]),e}),{}),ce=v.object().shape(ie);window.addEventListener("beforeunload",(function(){i.commit("auth/modal",null)})),window.addEventListener("pagehide",(function(){i.commit("auth/modal",null)}));var se=he((function(){return function(e){var t=e();if(t&&t.then)return t.then(ve)}((function(){if("function"==typeof de.value)return pe(de.value(),(function(e){S.value&&S.value.click(),ce.isValid(j.value).then((function(t){g.value=t&&J.value&&U.value&&W.value&&(!I.value.component||I.value.component&&D.value[I.value.code]&&D.value[I.value.code].isValid)&&e}))}))}))})),de=e.ref(null);e.provide("shippingComponentValid",de);var ue=e.ref({});e.provide("shippingComponentUserData",ue);var me=e.ref(!1),fe=function(e){_.value=!0,E.value=e,document.querySelector("html").classList.add("is-checkout-thanks"),ke()};e.watch((function(){return j}),(function(e){if(e&&e.value.phone){var t=e.value.phone;t&&t.match(/^(\+38|38)/)&&(j.value.phone=t.replace(/^(\+38|38)/,""))}}),{deep:!0});var ge=he((function(){var t="function"==typeof de.value?de.value():null;return I.value&&!I.value.component&&(t=!0),ce.isValid(j.value).then((function(o){if(o)if(W.value)if(!I.value.component||D.value[I.value.code]&&D.value[I.value.code].isValid)if(t)if(J.value)if(U.value){var n,a=D.value[I.value.code]?JSON.parse(JSON.stringify(D.value[I.value.code])):{};delete a.isValid;var c=JSON.parse(JSON.stringify(ue.value));if(document.cookie)document.cookie.split(";").forEach((function(e){var t=e.split("=");"_ga"===t[0].trim()&&(n=t[1].split(".")[2]+"."+t[1].split(".")[3])}));var d={checkout:!0,user:{last_name:j.value.last_name,middle_name:j.value.middle_name,name:j.value.name,phone:j.value.phone,email:j.value.email,user_type:j.value.user_type,registration_number:j.value.registration_number,company_name:j.value.company_name},shipping:{id:W.value,data:a,user:c},payment:{id:J.value},comment:R.value,dontcall:z.value,promoCode:L.value,loyalty:H.value,clientId:n};s.value=!0,$http.post(window.location.href,d).then((function(t){if(t.data&&t.data.error&&t.data.message)l(t.data.message,{type:"error"});else{var o=[];u.value.forEach((function(e){var t={item_name:e.name,item_id:e.attributes.code,price:e.price,quantity:e.quantity};e.attributes.brand&&(t.item_brand=e.attributes.brand),e.attributes.property&&(t.item_variant=e.attributes.property),e.attributes.categoryFull&&(-1!==e.attributes.categoryFull.indexOf("/")?e.attributes.categoryFull.split("/").forEach((function(e,o){t["item_category"+(o?o+1:"")]=e.trim()})):t.item_category=e.attributes.categoryFull),e.attributes.index&&(t.index=e.attributes.index),e.attributes.itemListName&&(t.item_list_name=e.attributes.itemListName),o.push(t)}));var n={payment_type:G.value.name,shipping_tier:I.value.name,ecommerce:{transaction_id:t.data.order.id,affiliation:"main",value:parseFloat(h.value),shipping:0,currency:"UAH",items:o},event:"purchase"};j.value.user_type&&(n.user_type=__("auth.registration.form.user_type_"+j.value.user_type)),L.value&&(n.ecommerce.coupon=L.value),r.isTrackAfterSuccessOnlinePurchase&&(t.data.redirect||t.data.payment_widget_data&&window.Wayforpay)?localStorage.setItem("ecommerce",JSON.stringify(n)):($env.debug.ecommerce&&console.log(n),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(n))),t.data.redirect&&(b.value={url:t.data.redirect.url,data:t.data.redirect.data},e.nextTick((function(){setTimeout((function(){k.value.submit()}),400)}))),t.data.payment_widget_data&&window.Wayforpay?function(e,t){var o=new Wayforpay;window.addEventListener("message",(function(e){"WfpWidgetEventClose"==e.data||"WfpWidgetEventDeclined"==e.data||e.data,"WfpWidgetEventApproved"==e.data&&(fe(t),me.value=!0,i.dispatch("cart/clear",{finally:function(){}}))})),o.run(e)}(JSON.parse(t.data.payment_widget_data),t.data.order):fe(t.data.order)}})).catch((function(e){l(__("shop.order.error"),{type:"error"}),console.error(e)})).finally((function(){s.value=!1}))}else l(__("shop.order.validate_consent"),{type:"error"});else l(__("shop.order.validate_payment"),{type:"error"});else l(__("shop.order.validate_shipping1")+": «"+I.value.name+"»",{type:"error"});else l(__("shop.order.validate_shipping1")+": «"+I.value.name+"»",{type:"error"});else l(__("shop.order.validate_shipping"),{type:"error"});else w.value="new",S.value.click(),l(__("shop.order.validate_user"),{type:"error"})})),pe()})),ke=function(){i.commit("checkout/reset"),i.commit("cart/clear")};return e.onMounted((function(){!d.value&&r.redirectOnEmpty&&(window.location.href=r.redirectOnEmpty);var e=[];if(u.value.forEach((function(t){var o={item_name:t.name,item_id:t.attributes.code,price:parseFloat(t.attributes.price),quantity:t.quantity};t.attributes.brand&&(o.item_brand=t.attributes.brand),t.attributes.property&&(o.item_variant=t.attributes.property),t.attributes.categoryFull&&(-1!==t.attributes.categoryFull.indexOf("/")?t.attributes.categoryFull.split("/").forEach((function(e,t){o["item_category"+(t?t+1:"")]=e.trim()})):o.item_category=t.attributes.categoryFull),t.attributes.index&&(o.index=t.attributes.index),t.attributes.itemListName&&(o.item_list_name=t.attributes.itemListName),e.push(o)})),e.length){var t={ecommerce:{currency:"UAH",items:e,value:parseFloat(h.value)},event:"begin_checkout"};$env.debug.ecommerce&&console.log(t),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t))}})),{auth:f,userType:w,facebook:function(){window.location.href=$ziggy("auth.login.social",{provider:"facebook"})},google:function(){window.location.href=$ziggy("auth.login.social",{provider:"google"})},loginCallback:function(){w.value="new"},quantity:d,items:u,loading:s,pluralize:t.pluralize,discount:oe,total:h,shipping:W,shippingPrice:K,payment:J,fee:Q,userValidation:ce,userSchema:ae,userSubmitButton:S,checkout:ge,ifCheckoutReady:g,validate:se,shippingTypesRestricted:X,paymentMethodsRestricted:Y,toggleShippingRadio:function(e){W.value===e&&(W.value=null)},togglePaymentRadio:function(e){J.value===e&&(J.value=null)},shippingSelected:I,paymentSelected:G,shippingComponentData:D,shippingStoreData:function(e,t,o){var n=JSON.parse(JSON.stringify(D.value));t.isValid=o,n[e]=t,i.commit("checkout/shippingData",n)},resertStore:ke,user:j,dontcall:z,comment:R,isCommentToggled:T,commentMaxLength:1e3,userCheckout:y,thanks:_,order:E,redirect:b,redirectForm:k,home:function(){window.location.href=$env.locale.url?$env.locale.url:"/"},isPromoCodeToggled:x,applyPromoCode:function(){L.value&&(P.value=!0,$http.post(window.location.href,{promoCodeApply:L.value,email:j.value.email,total:h.value}).then((function(e){M.value=e.data})).catch((function(e){e.response&&e.response.data.length&&(e.response.data.forEach((function(e){var t={component:ye,props:{message:__("shop.order.promo.error_"+e.error,{number:F.appContext.config.globalProperties.$filters.price(e.number)})}};l(t,{type:"error"}),"not_found"==e.error&&(L.value="")})),M.value=null)})).finally((function(){P.value=!1})))},promoCode:L,isPromoLoading:P,promoCodeApplied:M,resetPromoCode:function(){L.value="",M.value=null},calculateWithPromoCodeDiscount:function(){var e=h.value+Q.value+K.value;return M.value&&"percent"==M.value.type?Math.round(e-e*M.value.amount/100):M.value&&"discount"==M.value.type?Math.max(0,e-M.value.amount):e},consent:V,shippingComponent:N,slots:a,isPayed:me,loyalty:O,loyaltyUse:H,loyaltyUseApplied:q,resetLoyaltyUse:function(){H.value=0,q.value=!1},applyLoyaltyUse:function(){H.value&&(q.value=!0)},readableUserLoyaltyPoints:$}}}),ke={class:"cart checkout"},_e=["action"],Ee=["name","value"],Ve={key:1,class:"items-wrapper"},Ne={class:"checkout-title"},be={class:"columns"},Be={class:"column checkout-blocks-wrapper"},Ce={class:"checkout-block is-cart"},we={class:"wrapper"},Se={class:"title-row"},De={class:"items-title"},Te=["textContent"],xe=["innerHTML"],Le=["onClick"],Me=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-edit"})],-1),Pe={class:"checkout-block is-user auth-user"},Fe={class:"wrapper"},Oe={class:"items-title"},He={key:0,class:"user-tabs"},qe={class:"columns"},$e={class:"column user-form"},Ue={type:"submit",ref:"userSubmitButton",class:"is-hidden"},ze={key:0,class:"column user-login user-form"},Re={key:1,class:"column"},Ae={key:0,class:"social-auth"},je={class:"socials"},We={class:"description"},Je={class:"buttons"},Ie=[e.createElementVNode("svg",{class:"icon fb-btn"},[e.createElementVNode("use",{"xlink:href":"#logo-facebook-icon"})],-1),e.createElementVNode("span",null,"Facebook",-1)],Ge=[e.createElementVNode("svg",{class:"icon google-btn"},[e.createElementVNode("use",{"xlink:href":"#logo-google-icon"})],-1),e.createElementVNode("span",null,"Google",-1)],Ke={class:"checkout-block is-shipping"},Qe={class:"wrapper shipping-type-block"},Xe={class:"rows"},Ye={class:"item"},Ze={class:"row"},et={class:"info"},tt={class:"items-title mb-1"},ot={key:0,class:"value"},nt={class:"next-dates"},rt={class:"row"},at={class:"info"},lt=["value","onClick"],it=["src"],ct={key:1,class:"icon"},st=[e.createElementVNode("use",{"xlink:href":"#shipping"},null,-1)],dt={key:0,class:"description"},ut={class:"value"},mt={key:0,class:"green"},pt=["innerHTML"],vt={key:0},ht={key:0,class:"checkout-block is-payment"},ft={class:"wrapper payment-method-block"},yt={class:"rows"},gt={class:"item"},kt={class:"row"},_t={class:"info"},Et={class:"items-title mb-1"},Vt={class:"info"},Nt=["value","onClick"],bt={key:0,class:"description"},Bt={key:0,class:"value"},Ct=["innerHTML"],wt={class:"column is-4"},St={class:"checkout-block summary"},Dt={key:0,class:"inner payment-method-block"},Tt={class:"rows"},xt={class:"item"},Lt={class:"row"},Mt={class:"info"},Pt={class:"items-title mb-1"},Ft={class:"info"},Ot=["value","onClick"],Ht={key:0,class:"description"},qt={key:0,class:"value"},$t=["innerHTML"],Ut=e.createElementVNode("div",{class:"divider is-hidden"},null,-1),zt={class:"inner"},Rt={class:"items-title"},At={class:"rows"},jt={class:"row products"},Wt={class:"info"},Jt=["textContent"],It={class:"value"},Gt=["innerHTML"],Kt={key:0,class:"row discount"},Qt={class:"info"},Xt={class:"value"},Yt=["innerHTML"],Zt={key:1,class:"row fee"},eo={class:"info"},to={class:"value"},oo=["innerHTML"],no={key:2,class:"row shipping"},ro={class:"info"},ao={class:"value"},lo=["innerHTML"],io={key:1,class:"green"},co={key:3,class:"row promo"},so={class:"info"},uo=e.createElementVNode("br",null,null,-1),mo={class:"green"},po={class:"value"},vo=["innerHTML"],ho={class:"row price"},fo={class:"info"},yo={class:"value orange"},go=["innerHTML"],ko={key:0,class:"user-loyalty"},_o={class:"notice"},Eo={class:"user-form is-loyalty-use"},Vo={class:"control"},No=["disabled"],bo=["disabled"],Bo={class:"checkbox-wrapper nocall"},Co={key:1,class:"consent"},wo={class:"checkbox-wrapper"},So=["innerHTML"],Do=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),To={class:"user-form is-promo-code"},xo={class:"control"},Lo=["disabled"],Mo={class:"label",for:"promo-code-applied"},Po=["disabled"],Fo=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),Oo={class:"user-form"},Ho={key:0,class:"chars-count"},qo={key:2,class:"checkout-block thanks"},$o={class:"title"},Uo={class:"columns"},zo={key:0,class:"column is-6"},Ro={class:"subtitle"},Ao={key:1,class:"column is-6"},jo={class:"column is-6"},Wo={key:0,class:"info-wrapper"},Jo={class:"title"},Io={class:"columns"},Go=["innerHTML"],Ko=["innerHTML"],Qo={key:1,class:"info-wrapper"},Xo={class:"title"},Yo={class:"columns"},Zo=["innerHTML"],en=["innerHTML"],tn={key:2,class:"info-wrapper"},on={class:"title"},nn={class:"columns"},rn={class:"column is-6"},an=["innerHTML"],ln={key:3,class:"checkout-block empty"},cn={class:"title"},sn={class:"message"},dn=["href"],un=e.createElementVNode("br",null,null,-1),mn=["href"];ge.render=function(t,o,n,r,a,l){var i=e.resolveComponent("checkout-item"),c=e.resolveComponent("cart-trigger"),s=e.resolveComponent("SchemaForm"),d=e.resolveComponent("login");return e.openBlock(),e.createElementBlock("div",ke,[t.redirect.url?(e.openBlock(),e.createElementBlock("form",{key:0,ref:"redirectForm",action:t.redirect.url,style:{position:"absolute",left:"-1000px",top:"-1000px"},method:"post"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.redirect.data,(function(t,o,n){return e.openBlock(),e.createElementBlock("input",{type:"hidden",name:o,value:t,key:n},null,8,Ee)})),128))],8,_e)):e.createCommentVNode("v-if",!0),t.items.length&&!t.thanks?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,e.toDisplayString(t.__("shop.order.checkout_title")),1),e.createElementVNode("div",be,[e.createElementVNode("div",Be,[e.renderSlot(t.$slots,"header"),e.createElementVNode("div",Ce,[e.createCommentVNode("items"),e.createElementVNode("div",we,[e.createElementVNode("div",Se,[e.createElementVNode("div",De,[e.createTextVNode(e.toDisplayString(t.__("shop.order.your_order"))+" ",1),e.createElementVNode("span",{class:"ml-3",textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,Te),e.createTextVNode(" "),e.createElementVNode("span",{innerHTML:t.__("shop.cart.bysum")+" "+t.$filters.price(t.total)},null,8,xe)])]),e.renderSlot(t.$slots,"cart",{items:t.items},(function(){return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(i,{key:t.id,item:t},null,8,["item"])})),128)),e.createVNode(c,{class:"trigger"},{default:e.withCtx((function(o){return[e.createElementVNode("button",{class:"button",onClick:o.open},[Me,e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.edit")),1)],8,Le)]})),_:1})]})),e.renderSlot(t.$slots,"cart-footer",{total:t.total})])]),e.createElementVNode("div",Pe,[e.createElementVNode("div",Fe,[e.createElementVNode("div",Oe,e.toDisplayString(t.__("shop.order.contact_title")),1),!t.auth&&t.isLogin?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[0]||(o[0]=function(e){return t.userType=e}),value:"new"},null,512),[[e.vModelRadio,t.userType]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.auth_new")),1)]),e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[1]||(o[1]=function(e){return t.userType=e}),value:"login"},null,512),[[e.vModelRadio,t.userType]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.auth_old")),1)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",qe,[e.withDirectives(e.createElementVNode("div",$e,[e.createVNode(s,{schemaRowClasses:"field",schema:t.userSchema,"validation-schema":t.userValidation,preventModelCleanupOnSchemaChange:!0},{afterForm:e.withCtx((function(){return[e.createElementVNode("button",Ue,null,512)]})),_:1},8,["schema","validation-schema"])],512),[[e.vShow,"new"==t.userType]]),t.isLogin?e.withDirectives((e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(d,{"login-callback":t.loginCallback},null,8,["login-callback"])],512)),[[e.vShow,"login"==t.userType]]):e.createCommentVNode("v-if",!0),t.isLogin?(e.openBlock(),e.createElementBlock("div",Re,[t.auth?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",je,[e.createElementVNode("div",We,e.toDisplayString(t.__("shop.order.auth_social")),1),e.createElementVNode("div",Je,[e.createElementVNode("a",{class:"button",onClick:o[2]||(o[2]=function(){return t.facebook&&t.facebook.apply(t,arguments)})},Ie),e.createElementVNode("a",{class:"button",onClick:o[3]||(o[3]=function(){return t.google&&t.google.apply(t,arguments)})},Ge)])])]))])):e.createCommentVNode("v-if",!0)])])]),e.createElementVNode("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("div",Xe,[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createElementVNode("div",tt,e.toDisplayString(t.__("shop.order.shipping")),1)]),t.shippingSelected&&t.shippingSelected.nextDates?(e.openBlock(),e.createElementBlock("div",ot,[e.createElementVNode("div",nt,"на "+e.toDisplayString(t.shippingSelected.nextDates),1)])):e.createCommentVNode("v-if",!0),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shippingTypesRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",rt,[e.createElementVNode("div",at,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[5]||(o[5]=function(e){return t.shipping=e}),value:n.id,onClick:function(e){return t.toggleShippingRadio(n.id)}},null,8,lt),[[e.vModelRadio,t.shipping]]),n.icon?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",src:n.icon},null,8,it)):(e.openBlock(),e.createElementBlock("svg",ct,st)),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",ut,[!n.amount&&n.price_label?(e.openBlock(),e.createElementBlock("span",mt,e.toDisplayString(n.price_label),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,pt))])]),t.slots.shippingFooter?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",vt,[n.component&&n.id==t.shipping?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.component),{key:0,commit:t.shippingStoreData,data:t.shippingComponentData,item:n},null,8,["commit","data","item"])):e.createCommentVNode("v-if",!0)]))],2)})),128))]),e.renderSlot(t.$slots,"shipping-footer",{shippingTypesRestricted:t.shippingTypesRestricted,shipping:t.shipping,shippingStoreData:t.shippingStoreData,shippingComponentData:t.shippingComponentData})])]),t.isPaymentMethodOverSummary?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",ft,[e.createElementVNode("div",yt,[e.createElementVNode("div",gt,[e.createElementVNode("div",kt,[e.createElementVNode("div",_t,[e.createElementVNode("div",Et,e.toDisplayString(t.__("shop.order.payment")),1)]),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.paymentMethodsRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["row no-icon","is-"+n.code])},[e.createElementVNode("div",Vt,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[7]||(o[7]=function(e){return t.payment=e}),value:n.id,onClick:function(e){return t.togglePaymentRadio(n.id)}},null,8,Nt),[[e.vModelRadio,t.payment]]),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",bt,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),n.amount?(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("span",{innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,Ct)])):e.createCommentVNode("v-if",!0)],2)],2)})),128))])])]))]),e.createElementVNode("div",wt,[e.createElementVNode("div",St,[t.isPaymentMethodOverSummary?(e.openBlock(),e.createElementBlock("div",Dt,[e.createElementVNode("div",Tt,[e.createElementVNode("div",xt,[e.createElementVNode("div",Lt,[e.createElementVNode("div",Mt,[e.createElementVNode("div",Pt,e.toDisplayString(t.__("shop.order.payment")),1)]),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.paymentMethodsRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["row no-icon","is-"+n.code])},[e.createElementVNode("div",Ft,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[9]||(o[9]=function(e){return t.payment=e}),value:n.id,onClick:function(e){return t.togglePaymentRadio(n.id)}},null,8,Ot),[[e.vModelRadio,t.payment]]),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),n.amount?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("span",{innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,$t)])):e.createCommentVNode("v-if",!0)],2)],2)})),128))])])):e.createCommentVNode("v-if",!0),Ut,e.createElementVNode("div",zt,[e.createElementVNode("div",Rt,e.toDisplayString(t.__("shop.order.total")),1),e.createElementVNode("div",At,[e.createElementVNode("div",jt,[e.createElementVNode("div",Wt,[e.createElementVNode("span",{textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,Jt),e.createTextVNode(" "+e.toDisplayString(t.__("shop.cart.bysum")),1)]),e.createElementVNode("div",It,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,Gt)])]),t.discount?(e.openBlock(),e.createElementBlock("div",Kt,[e.createElementVNode("div",Qt,e.toDisplayString(t.__("shop.order.discount")),1),e.createElementVNode("div",Xt,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.discount)},null,8,Yt)])])):e.createCommentVNode("v-if",!0),t.fee>0?(e.openBlock(),e.createElementBlock("div",Zt,[e.createElementVNode("div",eo,e.toDisplayString(t.__("shop.order.fee")),1),e.createElementVNode("div",to,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.fee)},null,8,oo)]),e.renderSlot(t.$slots,"fee")])):e.createCommentVNode("v-if",!0),t.shipping?(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("div",ro,e.toDisplayString(t.__("shop.order.shipping_price")),1),e.createElementVNode("div",ao,[t.shippingPrice>0?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:t.$filters.price(t.shippingPrice)},null,8,lo)):t.shippingSelected&&t.shippingSelected.price_label?(e.openBlock(),e.createElementBlock("span",io,e.toDisplayString(t.shippingSelected.price_label),1)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.promoCodeApplied?(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("div",so,[e.createTextVNode(e.toDisplayString(t.__("shop.order.promo_code")),1),uo,e.createElementVNode("span",mo,e.toDisplayString(t.promoCode),1)]),e.createElementVNode("div",po,[e.createElementVNode("span",{innerHTML:"percent"==t.promoCodeApplied.type?t.promoCodeApplied.amount+"%":t.$filters.price(t.promoCodeApplied.amount)},null,8,vo)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ho,[e.createElementVNode("div",fo,e.toDisplayString(t.__("shop.order.price")),1),e.createElementVNode("div",yo,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.calculateWithPromoCodeDiscount())},null,8,go)])])]),e.renderSlot(t.$slots,"loyalty",{loyalty:t.loyalty}),t.userCheckout.loyalty_points>0?(e.openBlock(),e.createElementBlock("div",ko,[e.createElementVNode("div",_o,e.toDisplayString(t.pluralize(t.readableUserLoyaltyPoints,t.__("shop.pluralize.points")))+" в наявності",1),e.createElementVNode("div",Eo,[e.createElementVNode("div",Vo,[e.withDirectives(e.createElementVNode("input",{type:"number",class:"input",placeholder:"Сума бонусів","onUpdate:modelValue":o[10]||(o[10]=function(e){return t.loyaltyUse=e}),disabled:t.loyaltyUseApplied},null,8,No),[[e.vModelText,t.loyaltyUse]])]),t.loyaltyUseApplied?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-reset",onClick:o[12]||(o[12]=function(){return t.resetLoyaltyUse&&t.resetLoyaltyUse.apply(t,arguments)})},"Відмінити")):(e.openBlock(),e.createElementBlock("button",{key:0,class:"button",onClick:o[11]||(o[11]=function(){return t.applyLoyaltyUse&&t.applyLoyaltyUse.apply(t,arguments)}),disabled:!t.loyaltyUse||t.loyaltyUse>t.userCheckout.loyalty_points},"Використати",8,bo))])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Bo,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":o[13]||(o[13]=function(e){return t.dontcall=e})},null,512),[[e.vModelCheckbox,t.dontcall]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.nocall")),1)])]),e.createElementVNode("button",{class:e.normalizeClass(["button submit",{red:!t.ifCheckoutReady,"is-loading":t.loading}]),onClick:o[14]||(o[14]=function(){return t.checkout&&t.checkout.apply(t,arguments)})},e.toDisplayString(t.__("shop.order.action")),3),e.renderSlot(t.$slots,"submit",{total:t.total}),t.isConsent?(e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("div",wo,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":o[15]||(o[15]=function(e){return t.consent=e})},null,512),[[e.vModelCheckbox,t.consent]]),e.createElementVNode("div",{class:"label",innerHTML:t.__("shop.order.consent")},null,8,So)])])])):e.createCommentVNode("v-if",!0),t.isPromoCode?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["comment-wrapper is-promo-code",{"is-open":t.isPromoCodeToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:o[16]||(o[16]=function(e){return t.isPromoCodeToggled=!t.isPromoCodeToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.promo_code")),1),Do]),e.createElementVNode("div",To,[e.createElementVNode("div",xo,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"input",placeholder:" ","onUpdate:modelValue":o[17]||(o[17]=function(e){return t.promoCode=e}),disabled:t.promoCodeApplied,id:"promo-code-applied"},null,8,Lo),[[e.vModelText,t.promoCode]]),e.createElementVNode("label",Mo,e.toDisplayString(t.__("shop.order.promo.placeholder")),1)]),t.promoCodeApplied?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button",onClick:o[19]||(o[19]=function(){return t.resetPromoCode&&t.resetPromoCode.apply(t,arguments)})},e.toDisplayString(t.__("shop.order.promo.reset")),1)):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["button",{"is-loading":t.isPromoLoading}]),onClick:o[18]||(o[18]=function(){return t.applyPromoCode&&t.applyPromoCode.apply(t,arguments)}),disabled:!t.promoCode},e.toDisplayString(t.__("shop.order.promo.apply")),11,Po))])],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(["comment-wrapper",{"is-open":t.isCommentToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:o[20]||(o[20]=function(e){return t.isCommentToggled=!t.isCommentToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.comment")),1),Fo]),e.createElementVNode("div",Oo,[e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":o[21]||(o[21]=function(e){return t.comment=e})},null,512),[[e.vModelText,t.comment]]),t.comment.length?(e.openBlock(),e.createElementBlock("div",Ho,e.toDisplayString(t.commentMaxLength-t.comment.length),1)):e.createCommentVNode("v-if",!0)])],2)])])])])])):t.thanks&&t.order?(e.openBlock(),e.createElementBlock("div",qo,[e.renderSlot(t.$slots,"thanks",{order:t.order,redirect:t.redirect,redirectForm:t.redirectForm,home:t.home,auth:t.auth,filters:t.$filters},(function(){return[e.createElementVNode("div",$o,[e.createTextVNode(e.toDisplayString(t.__("shop.order.order"))+" ",1),e.createElementVNode("span",null,"№"+e.toDisplayString(t.order.id),1),e.createTextVNode(" "+e.toDisplayString(t.isPayed?t.__("shop.order.payed"):t.__("shop.order.success")),1)]),e.createElementVNode("div",Uo,[t.redirect.url?(e.openBlock(),e.createElementBlock("div",zo,[e.createElementVNode("div",Ro,e.toDisplayString(t.__("shop.order.pay_online")),1),e.createElementVNode("button",{class:"button is-payment",onClick:o[22]||(o[22]=function(e){return t.redirectForm.submit()})},e.toDisplayString(t.__("shop.order.pay_online_go")),1)])):(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("button",{class:"button is-orange",onClick:o[23]||(o[23]=function(){return t.home&&t.home.apply(t,arguments)})},e.toDisplayString(t.__("shop.cart.continue")),1)])),e.createElementVNode("div",jo,[t.order.shipping[0]?(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("div",Jo,e.toDisplayString(t.__("shop.order.shipping")),1),e.createElementVNode("div",Io,[t.order.shipping[0]?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column is-6",innerHTML:t.order.shipping[0]},null,8,Go)):e.createCommentVNode("v-if",!0),t.order.shipping[1]?(e.openBlock(),e.createElementBlock("div",{key:1,class:"column is-6",innerHTML:t.order.shipping[1]},null,8,Ko)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.order.payment[0]?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",Xo,e.toDisplayString(t.__("shop.order.payment")),1),e.createElementVNode("div",Yo,[t.order.payment[0]?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column is-6",innerHTML:t.order.payment[0]},null,8,Zo)):e.createCommentVNode("v-if",!0),t.order.payment[1]?(e.openBlock(),e.createElementBlock("div",{key:1,class:"column is-6",innerHTML:t.order.payment[1]},null,8,en)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.order.promoCode?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",on,e.toDisplayString(t.__("shop.order.promo_code")),1),e.createElementVNode("div",nn,[e.createElementVNode("div",rn,[e.createElementVNode("span",{innerHTML:t.order.promoCode,class:"green"},null,8,an)])])])):e.createCommentVNode("v-if",!0)])])]}))])):t.redirectOnEmpty?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",cn,e.toDisplayString(t.__("shop.cart.no_no")),1),e.createElementVNode("div",sn,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.no_prop"))+" ",1),e.createElementVNode("a",{href:t.$env.locale.url?t.$env.locale.url:"/"},e.toDisplayString(t.__("shop.cart.no_home")),9,dn),e.createTextVNode(", "),un,e.createTextVNode(e.toDisplayString(t.__("shop.cart.no_search")),1)]),e.createElementVNode("a",{class:"button continue",href:t.$env.locale.url?t.$env.locale.url:"/"},e.toDisplayString(t.__("shop.cart.continue")),9,mn)]))])},module.exports=ge;
1
+ "use strict";var e=require("vue"),t=require("@perevorot/shop/dist/helpers"),o=require("vuex"),n=require("formvuelate"),r=require("@formvuelate/plugin-vee-validate"),a=require("@perevorot/shop/dist/forms/FormText"),l=require("@perevorot/shop/dist/forms/FormRadio"),i=require("yup"),c=require("vue-toastification");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var u=s(r),m=s(a),p=s(l),v=d(i),h=e.defineComponent({name:"CheckoutItem",props:{item:Object},setup:function(t){var o=e.computed((function(){return t.item.attributes.options&&t.item.attributes.options.length?t.item.attributes.options:[]}));return{itemOptions:e.computed((function(){return t.item.options&&t.item.options.length?t.item.options.filter((function(e){return-1!==o.value.indexOf(e.id)})):[]}))}}}),f={key:0,class:"column is-12"},y={class:"bundle-title"},g={class:"column name"},k={class:"column is-narrow"},_=["href"],E=["src"],V={key:1},N=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],b={class:"column"},B={class:"columns is-gapless mb-0"},C={class:"column"},w={key:0,class:"code"},S={class:"title"},D=["href"],T={class:"column is-2 has-text-centered is-relative"},x={class:"quantity"},L={key:0,class:"quantity-price"},M=["innerHTML"],P={class:"column is-2 has-text-right"},F=["innerHTML"],O=["innerHTML"],$=["innerHTML"],H={key:0,class:"options is-toggled"},q={class:"toggler"},U={class:"wrapper"},z={class:"column"},R={class:"option-title"},A={class:"column is-2 has-text-right"},j=["innerHTML"],W={key:0,class:"bundle columns"},J={class:"column is-narrow"},I=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),G=["href"],K=["src"],Q={key:1},X=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Y={class:"column"},Z={key:0,class:"code"},ee={class:"title"},te=["href"],oe={key:1,class:"bundle columns"},ne={class:"column is-narrow"},re=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),ae=["href"],le=["src"],ie={key:1},ce=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],se={class:"column"},de={key:0,class:"code"},ue={class:"title"},me=["href"];function pe(e,t,o){return o?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ve(){}function he(e){return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}h.render=function(t,o,n,r,a,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["columns is-multiline shop-cart-item",{"is-bundle":t.item.attributes.bundle}])},[t.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",y,e.toDisplayString(t.__("shop.cart.bundle")),1)])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",g,[e.createElementVNode("div",{class:e.normalizeClass(["columns",{"mb-0":t.item.attributes.bundle}])},[e.createElementVNode("div",k,[e.createElementVNode("a",{href:t.item.attributes.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.image}])},[t.item.attributes.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.image},null,8,E)):(e.openBlock(),e.createElementBlock("svg",V,N))],2)],8,_)]),e.createElementVNode("div",b,[e.createElementVNode("div",B,[e.createElementVNode("div",C,[t.item.attributes.code?(e.openBlock(),e.createElementBlock("div",w,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",S,[e.createElementVNode("a",{href:t.item.attributes.href},e.toDisplayString(t.item.name),9,D)])]),e.createElementVNode("div",T,[e.createElementVNode("div",x,"⨉ "+e.toDisplayString(t.item.quantity),1),parseInt(t.item.quantity)>1?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.item.attributes.price)},null,8,M),e.createTextVNode(" / "+e.toDisplayString(t.__("shop.cart.q")),1)])):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",P,[e.createElementVNode("div",{class:e.normalizeClass(["price",{"bundle-price":t.item.attributes.bundle}])},[t.item.attributes.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(t.item.attributes.priceOld*t.item.quantity)},null,8,F)):e.createCommentVNode("v-if",!0),t.item.attributes.bundle&&t.item.attributes.amount?(e.openBlock(),e.createElementBlock("div",{key:1,class:"bundle-amount",innerHTML:t.__("shop.cart.bundle_amount")+(t.item.attributes.amount.percent?t.item.attributes.amount.percent+"%":t.$filters.price(t.item.attributes.amount.sum*t.item.quantity))},null,8,O)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{innerHTML:t.$filters.price(t.item.attributes.price*t.item.quantity)},null,8,$)],2)])]),t.itemOptions&&t.itemOptions.length?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",q,[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.cart.additional"))+" "+e.toDisplayString(t.itemOptions.length),1)]),e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.itemOptions,(function(o,n){return e.openBlock(),e.createElementBlock("div",{key:n,class:"columns is-checked"},[e.createElementVNode("div",z,[e.createElementVNode("div",R,e.toDisplayString(o.name),1)]),e.createElementVNode("div",A,[e.createTextVNode("+"),e.createElementVNode("span",{innerHTML:t.$filters.price(o.price)},null,8,j)])])})),128))])])):e.createCommentVNode("v-if",!0)])],2),t.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",J,[I,e.createElementVNode("a",{href:t.item.attributes.second.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.second.image}])},[t.item.attributes.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.second.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,X))],2)],8,G)]),e.createElementVNode("div",Y,[t.item.attributes.second.code?(e.openBlock(),e.createElementBlock("div",Z,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.second.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ee,[e.createElementVNode("a",{href:t.item.attributes.second.href},e.toDisplayString(t.item.attributes.second.name),9,te)])])])):e.createCommentVNode("v-if",!0),t.item.attributes.bundle&&t.item.attributes.third?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[re,e.createElementVNode("a",{href:t.item.attributes.third.href},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!t.item.attributes.third.image}])},[t.item.attributes.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.item.attributes.third.image},null,8,le)):(e.openBlock(),e.createElementBlock("svg",ie,ce))],2)],8,ae)]),e.createElementVNode("div",se,[t.item.attributes.third.code?(e.openBlock(),e.createElementBlock("div",de,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(t.item.attributes.third.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ue,[e.createElementVNode("a",{href:t.item.attributes.third.href},e.toDisplayString(t.item.attributes.third.name),9,me)])])])):e.createCommentVNode("v-if",!0)])],2)},v.addMethod(v.string,"numberFilled",(function(e,t){return this.test({name:"numberFilled",exclusive:!0,message:__("auth.validation.number"),params:{min:e},test:function(e){return!(""==e||isNaN(e))}})})),e.markRaw(m.default),e.markRaw(p.default);var fe=n.SchemaFormFactory([u.default({})]),ye={props:{message:""},template:'<div v-html="message"></div>'};window.viewedSwiperOptions={slidesPerView:"auto",freeMode:!0,slideClass:"product",mousewheel:{forceToAxis:!0},navigation:{nextEl:".next",prevEl:".prev"},observer:!0,observeParents:!0};var ge=e.defineComponent({components:{CheckoutItem:h,SchemaForm:fe},props:{isLogin:{type:Boolean,default:!0},isPhoneMasked:{type:Boolean,default:!0},isPromoCode:{type:Boolean,default:!0},isConsent:{type:Boolean,default:!1},isPaymentMethodOverSummary:{type:Boolean,default:!1},userFields:{type:Array,default:["last_name","name","email","phone"]},redirectOnEmpty:{type:String,default:!1},showPlaceholders:{type:Boolean,default:!1},isTrackAfterSuccessOnlinePurchase:{type:Boolean,default:!1}},name:"order-checkout",setup:function(r){var a=e.useSlots(),l=c.useToast(),i=o.useStore(),s=e.ref(!1),d=e.computed((function(){return i.getters["cart/quantity"]})),u=e.computed((function(){return i.getters["cart/items"]})),h=e.computed((function(){return i.getters["cart/total"]})),f=e.computed((function(){return i.getters["auth/is"]})),y=e.computed((function(){return i.getters["checkout/user"]})),g=e.ref(!0),k=e.ref(null),_=e.ref(!1),E=e.ref(null),V=e.ref(!1),N=e.ref(null),b=e.ref({}),B=e.ref([]),C=e.ref([]),w=e.ref("new"),S=e.ref(null),D=e.computed((function(){return i.getters["checkout/shippingData"]})),T=e.ref(!1),x=e.ref(!1),L=e.ref(""),M=e.ref(null),P=e.ref(!1),F=e.getCurrentInstance(),O=e.computed((function(){var e=u.value.reduce((function(e,t){return e+(t.attributes.loyalty?t.attributes.loyalty.points*t.quantity:0)}),0);return{points:e,name:t.pluralize(e,__("shop.pluralize.points"))}})),$=e.ref(""),H=e.ref(!1),q=e.computed((function(){return t.numberFormat(y.value.loyalty_points-(H.value?$.value:0))})),U=e.computed((function(){return r.isConsent&&V.value||!r.isConsent})),z=e.computed({get:function(){return i.getters["checkout/dontcall"]},set:function(e){i.commit("checkout/dontcall",e)}}),R=e.computed({get:function(){var e=i.getters["checkout/comment"];return e&&(T.value=!0),e},set:function(e){i.commit("checkout/comment",e)}});e.watch(R,(function(e){e.length>1e3&&(R.value=R.value.substring(0,1e3))}));var A=function(t,o){return e.computed({get:function(){return y.value[t]?y.value[t]:o},set:function(e){var o=JSON.parse(JSON.stringify(y.value));o[t]=e,i.commit("checkout/user",o)}})};e.provide("field",A);var j=e.ref({last_name:A("last_name"),middle_name:A("middle_name"),name:A("name"),email:A("email"),phone:A("phone"),registration_number:A("registration_number"),company_name:A("company_name"),user_type:A("user_type","individual")});e.provide("user",j),i.dispatch("auth/me",{finally:function(){}});var W=e.computed({get:function(){return i.getters["checkout/shipping"]},set:function(e){i.commit("checkout/shipping",e)}}),J=e.computed({get:function(){return i.getters["checkout/payment"]},set:function(e){i.commit("checkout/payment",e)}}),I=e.computed((function(){return W.value?B.value.find((function(e){return e.id==W.value})):{}})),G=e.computed((function(){return J.value?C.value.find((function(e){return e.id==J.value})):{}})),K=e.computed((function(){return ee(B.value,W.value)})),Q=e.computed((function(){return ee(C.value,J.value)})),X=e.computed((function(){return te(B.value)})),Y=e.computed((function(){return te(C.value)})),Z=e.computed((function(){var e=[];return u.value.forEach((function(t){-1===e.indexOf(t.category_id)&&e.push(t.category_id)})),e})),ee=function(e,t){var o=0;if(t){var n=e.find((function(e){return e.id==t}));n&&(o="sum"==n.type?n.amount:Math.round(h.value*n.amount/100))}return o},te=function(e){var t=[];return e.forEach((function(e){if(e.restrictions&&Object.keys(e.restrictions).length){var o=!0,n=e.restrictions;n.price_min&&n.price_max?(o=h.value>=n.price_min&&h.value<=n.price_max,e.restrictedForce=!o):n.price_min?(o=h.value>=n.price_min,e.restrictedForce=!o):n.price_max&&(o=h.value<=n.price_max,e.restrictedForce=!o),o&&W.value&&n.shipping_type&&n.shipping_type.length&&(o=-1!==n.shipping_type.indexOf(W.value)),o&&J.value&&n.payment_method&&n.payment_method.length&&(o=-1!==n.payment_method.indexOf(J.value)),o&&n.categories&&n.categories.length&&(o=!Z.value.filter((function(e){return!n.categories.includes(e)})).length,e.restrictedForce=!o),o&&"user_type"===n.code&&(o=n.value===j.value.user_type,e.restrictedForce=!o),e.restricted=!o}else e.restricted=!1;e.restrictedForce||t.push(e)})),t},oe=e.computed((function(){var e=0;return u.value.forEach((function(t){var o=0;t.attributes.priceOld&&(o=t.attributes.priceOld-t.attributes.price),e+=o*t.quantity})),e}));$http.post(window.location.href).then((function(e){B.value=e.data.shipping,C.value=e.data.payment})),e.watch(w,(function(e){"login"==e&&i.commit("auth/modal","login")}));var ne={user_type:{component:p.default,model:"user_type",label:"",list:[{code:"individual",value:__("auth.registration.form.user_type_individual")},{code:"legal",value:__("auth.registration.form.user_type_legal")}]},name:{component:m.default,label:__("auth.registration.form.name"),model:"first_name",placeholder:r.showPlaceholders?__("auth.registration.form.name"):""},last_name:{component:m.default,label:__("auth.registration.form.last_name"),model:"last_name",placeholder:r.showPlaceholders?__("auth.registration.form.last_name"):""},middle_name:{component:m.default,label:__("auth.registration.form.middle_name"),model:"middle_name",placeholder:r.showPlaceholders?__("auth.registration.form.middle_name"):""},phone:{component:m.default,label:__("auth.registration.form.phone"),model:"phone",type:"phone"},registration_number:{component:m.default,label:__("auth.registration.form.registration_number"),model:"registration_number",condition:function(e){return"legal"===e.user_type},placeholder:r.showPlaceholders?__("auth.registration.form.registration_number"):""},company_name:{component:m.default,label:__("auth.registration.form.company_name"),model:"company_name",condition:function(e){return"legal"===e.user_type},placeholder:r.showPlaceholders?__("auth.registration.form.company_name"):""},email:{component:m.default,label:__("auth.login.form.email"),model:"email",placeholder:r.showPlaceholders?__("auth.login.form.email"):""}};r.isPhoneMasked&&(ne.phone.mask="(###) ###-##-##");var re=Object.keys(ne).reduce((function(e,t){return r.userFields.includes(t)&&(e[t]=ne[t]),e}),{});re=r.userFields.reduce((function(e,t){return e[t]=re[t],e}),{});var ae=e.ref(re);n.useSchemaForm(j);var le={last_name:v.string().trim().required(__("auth.validation.required")),middle_name:v.string().trim().required(__("auth.validation.required")),name:v.string().trim().required(__("auth.validation.required")),phone:r.isPhoneMasked?v.string().required(__("auth.validation.phone")).matches(/^\(\d{3}\) \d{3}\-\d{2}\-\d{2}$/,__("auth.validation.phone")):v.string().required(__("auth.validation.phone")),email:v.string().trim().email(__("auth.validation.email")).required(__("auth.validation.required")),registration_number:v.string().when("user_type",(function(e){if("legal"==e)return v.string().numberFilled()})),company_name:v.string().when("user_type",(function(e){if("legal"==e)return v.string().required(__("auth.validation.required"))}))},ie=Object.keys(le).reduce((function(e,t){return r.userFields.includes(t)&&(e[t]=le[t]),e}),{}),ce=v.object().shape(ie);window.addEventListener("beforeunload",(function(){i.commit("auth/modal",null)})),window.addEventListener("pagehide",(function(){i.commit("auth/modal",null)}));var se=he((function(){return function(e){var t=e();if(t&&t.then)return t.then(ve)}((function(){if("function"==typeof de.value)return pe(de.value(),(function(e){S.value&&S.value.click(),ce.isValid(j.value).then((function(t){g.value=t&&J.value&&U.value&&W.value&&(!I.value.component||I.value.component&&D.value[I.value.code]&&D.value[I.value.code].isValid)&&e}))}))}))})),de=e.ref(null);e.provide("shippingComponentValid",de);var ue=e.ref({});e.provide("shippingComponentUserData",ue);var me=e.ref(!1),fe=function(e){_.value=!0,E.value=e,document.querySelector("html").classList.add("is-checkout-thanks"),ke()};e.watch((function(){return j}),(function(e){if(e&&e.value.phone){var t=e.value.phone;t&&t.match(/^(\+38|38)/)&&(j.value.phone=t.replace(/^(\+38|38)/,""))}}),{deep:!0});var ge=he((function(){var t="function"==typeof de.value?de.value():null;return I.value&&!I.value.component&&(t=!0),ce.isValid(j.value).then((function(o){if(o)if(W.value)if(!I.value.component||D.value[I.value.code]&&D.value[I.value.code].isValid)if(t)if(J.value)if(U.value){var n,a=D.value[I.value.code]?JSON.parse(JSON.stringify(D.value[I.value.code])):{};delete a.isValid;var c=JSON.parse(JSON.stringify(ue.value));if(document.cookie)document.cookie.split(";").forEach((function(e){var t=e.split("=");"_ga"===t[0].trim()&&(n=t[1].split(".")[2]+"."+t[1].split(".")[3])}));var d={checkout:!0,user:{last_name:j.value.last_name,middle_name:j.value.middle_name,name:j.value.name,phone:j.value.phone,email:j.value.email,user_type:j.value.user_type,registration_number:j.value.registration_number,company_name:j.value.company_name},shipping:{id:W.value,data:a,user:c},payment:{id:J.value},comment:R.value,dontcall:z.value,promoCode:L.value,loyalty:$.value,clientId:n};s.value=!0,$http.post(window.location.href,d).then((function(t){var o;if(t.data&&t.data.error&&t.data.message)l(t.data.message,{type:"error"});else{var n=[];u.value.forEach((function(e){var t={item_name:e.name,item_id:e.attributes.code,price:e.price,quantity:e.quantity};e.attributes.brand&&(t.item_brand=e.attributes.brand),e.attributes.property&&(t.item_variant=e.attributes.property),e.attributes.categoryFull&&(-1!==e.attributes.categoryFull.indexOf("/")?e.attributes.categoryFull.split("/").forEach((function(e,o){t["item_category"+(o?o+1:"")]=e.trim()})):t.item_category=e.attributes.categoryFull),e.attributes.index&&(t.index=e.attributes.index),e.attributes.itemListName&&(t.item_list_name=e.attributes.itemListName),n.push(t)}));var a={payment_type:G.value.name,shipping_tier:I.value.name,ecommerce:{transaction_id:t.data.order.id,affiliation:"main",value:parseFloat(h.value),shipping:0,currency:null!==(o=$env.locale)&&void 0!==o&&o.currency?$env.locale.currency:"UAH",items:n},event:"purchase"};j.value.user_type&&(a.user_type=__("auth.registration.form.user_type_"+j.value.user_type)),L.value&&(a.ecommerce.coupon=L.value),r.isTrackAfterSuccessOnlinePurchase&&(t.data.redirect||t.data.payment_widget_data&&window.Wayforpay)?localStorage.setItem("ecommerce",JSON.stringify(a)):($env.debug.ecommerce&&console.log(a),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(a))),t.data.redirect&&(b.value={url:t.data.redirect.url,data:t.data.redirect.data},e.nextTick((function(){setTimeout((function(){k.value.submit()}),400)}))),t.data.payment_widget_data&&window.Wayforpay?function(e,t){var o=new Wayforpay;window.addEventListener("message",(function(e){"WfpWidgetEventClose"==e.data||"WfpWidgetEventDeclined"==e.data||e.data,"WfpWidgetEventApproved"==e.data&&(fe(t),me.value=!0,i.dispatch("cart/clear",{finally:function(){}}))})),o.run(e)}(JSON.parse(t.data.payment_widget_data),t.data.order):fe(t.data.order)}})).catch((function(e){l(__("shop.order.error"),{type:"error"}),console.error(e)})).finally((function(){s.value=!1}))}else l(__("shop.order.validate_consent"),{type:"error"});else l(__("shop.order.validate_payment"),{type:"error"});else l(__("shop.order.validate_shipping1")+": «"+I.value.name+"»",{type:"error"});else l(__("shop.order.validate_shipping1")+": «"+I.value.name+"»",{type:"error"});else l(__("shop.order.validate_shipping"),{type:"error"});else w.value="new",S.value.click(),l(__("shop.order.validate_user"),{type:"error"})})),pe()})),ke=function(){i.commit("checkout/reset"),i.commit("cart/clear")};return e.onMounted((function(){!d.value&&r.redirectOnEmpty&&(window.location.href=r.redirectOnEmpty);var e=[];if(u.value.forEach((function(t){var o={item_name:t.name,item_id:t.attributes.code,price:parseFloat(t.attributes.price),quantity:t.quantity};t.attributes.brand&&(o.item_brand=t.attributes.brand),t.attributes.property&&(o.item_variant=t.attributes.property),t.attributes.categoryFull&&(-1!==t.attributes.categoryFull.indexOf("/")?t.attributes.categoryFull.split("/").forEach((function(e,t){o["item_category"+(t?t+1:"")]=e.trim()})):o.item_category=t.attributes.categoryFull),t.attributes.index&&(o.index=t.attributes.index),t.attributes.itemListName&&(o.item_list_name=t.attributes.itemListName),e.push(o)})),e.length){var t,o={ecommerce:{currency:null!==(t=$env.locale)&&void 0!==t&&t.currency?$env.locale.currency:"UAH",items:e,value:parseFloat(h.value)},event:"begin_checkout"};$env.debug.ecommerce&&console.log(o),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(o))}})),{auth:f,userType:w,facebook:function(){window.location.href=$ziggy("auth.login.social",{provider:"facebook"})},google:function(){window.location.href=$ziggy("auth.login.social",{provider:"google"})},loginCallback:function(){w.value="new"},quantity:d,items:u,loading:s,pluralize:t.pluralize,discount:oe,total:h,shipping:W,shippingPrice:K,payment:J,fee:Q,userValidation:ce,userSchema:ae,userSubmitButton:S,checkout:ge,ifCheckoutReady:g,validate:se,shippingTypesRestricted:X,paymentMethodsRestricted:Y,toggleShippingRadio:function(e){W.value===e&&(W.value=null)},togglePaymentRadio:function(e){J.value===e&&(J.value=null)},shippingSelected:I,paymentSelected:G,shippingComponentData:D,shippingStoreData:function(e,t,o){var n=JSON.parse(JSON.stringify(D.value));t.isValid=o,n[e]=t,i.commit("checkout/shippingData",n)},resertStore:ke,user:j,dontcall:z,comment:R,isCommentToggled:T,commentMaxLength:1e3,userCheckout:y,thanks:_,order:E,redirect:b,redirectForm:k,home:function(){window.location.href=$env.locale.url?$env.locale.url:"/"},isPromoCodeToggled:x,applyPromoCode:function(){L.value&&(P.value=!0,$http.post(window.location.href,{promoCodeApply:L.value,email:j.value.email,total:h.value}).then((function(e){M.value=e.data})).catch((function(e){e.response&&e.response.data.length&&(e.response.data.forEach((function(e){var t={component:ye,props:{message:__("shop.order.promo.error_"+e.error,{number:F.appContext.config.globalProperties.$filters.price(e.number)})}};l(t,{type:"error"}),"not_found"==e.error&&(L.value="")})),M.value=null)})).finally((function(){P.value=!1})))},promoCode:L,isPromoLoading:P,promoCodeApplied:M,resetPromoCode:function(){L.value="",M.value=null},calculateWithPromoCodeDiscount:function(){var e=h.value+Q.value+K.value;return M.value&&"percent"==M.value.type?Math.round(e-e*M.value.amount/100):M.value&&"discount"==M.value.type?Math.max(0,e-M.value.amount):e},consent:V,shippingComponent:N,slots:a,isPayed:me,loyalty:O,loyaltyUse:$,loyaltyUseApplied:H,resetLoyaltyUse:function(){$.value=0,H.value=!1},applyLoyaltyUse:function(){$.value&&(H.value=!0)},readableUserLoyaltyPoints:q}}}),ke={class:"cart checkout"},_e=["action"],Ee=["name","value"],Ve={key:1,class:"items-wrapper"},Ne={class:"checkout-title"},be={class:"columns"},Be={class:"column checkout-blocks-wrapper"},Ce={class:"checkout-block is-cart"},we={class:"wrapper"},Se={class:"title-row"},De={class:"items-title"},Te=["textContent"],xe=["innerHTML"],Le=["onClick"],Me=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-edit"})],-1),Pe={class:"checkout-block is-user auth-user"},Fe={class:"wrapper"},Oe={class:"items-title"},$e={key:0,class:"user-tabs"},He={class:"columns"},qe={class:"column user-form"},Ue={type:"submit",ref:"userSubmitButton",class:"is-hidden"},ze={key:0,class:"column user-login user-form"},Re={key:1,class:"column"},Ae={key:0,class:"social-auth"},je={class:"socials"},We={class:"description"},Je={class:"buttons"},Ie=[e.createElementVNode("svg",{class:"icon fb-btn"},[e.createElementVNode("use",{"xlink:href":"#logo-facebook-icon"})],-1),e.createElementVNode("span",null,"Facebook",-1)],Ge=[e.createElementVNode("svg",{class:"icon google-btn"},[e.createElementVNode("use",{"xlink:href":"#logo-google-icon"})],-1),e.createElementVNode("span",null,"Google",-1)],Ke={class:"checkout-block is-shipping"},Qe={class:"wrapper shipping-type-block"},Xe={class:"rows"},Ye={class:"item"},Ze={class:"row"},et={class:"info"},tt={class:"items-title mb-1"},ot={key:0,class:"value"},nt={class:"next-dates"},rt={class:"row"},at={class:"info"},lt=["value","onClick"],it=["src"],ct={key:1,class:"icon"},st=[e.createElementVNode("use",{"xlink:href":"#shipping"},null,-1)],dt={key:0,class:"description"},ut={class:"value"},mt={key:0,class:"green"},pt=["innerHTML"],vt={key:0},ht={key:0,class:"checkout-block is-payment"},ft={class:"wrapper payment-method-block"},yt={class:"rows"},gt={class:"item"},kt={class:"row"},_t={class:"info"},Et={class:"items-title mb-1"},Vt={class:"info"},Nt=["value","onClick"],bt={key:0,class:"description"},Bt={key:0,class:"value"},Ct=["innerHTML"],wt={class:"column is-4"},St={class:"checkout-block summary"},Dt={key:0,class:"inner payment-method-block"},Tt={class:"rows"},xt={class:"item"},Lt={class:"row"},Mt={class:"info"},Pt={class:"items-title mb-1"},Ft={class:"info"},Ot=["value","onClick"],$t={key:0,class:"description"},Ht={key:0,class:"value"},qt=["innerHTML"],Ut=e.createElementVNode("div",{class:"divider is-hidden"},null,-1),zt={class:"inner"},Rt={class:"items-title"},At={class:"rows"},jt={class:"row products"},Wt={class:"info"},Jt=["textContent"],It={class:"value"},Gt=["innerHTML"],Kt={key:0,class:"row discount"},Qt={class:"info"},Xt={class:"value"},Yt=["innerHTML"],Zt={key:1,class:"row fee"},eo={class:"info"},to={class:"value"},oo=["innerHTML"],no={key:2,class:"row shipping"},ro={class:"info"},ao={class:"value"},lo=["innerHTML"],io={key:1,class:"green"},co={key:3,class:"row promo"},so={class:"info"},uo=e.createElementVNode("br",null,null,-1),mo={class:"green"},po={class:"value"},vo=["innerHTML"],ho={class:"row price"},fo={class:"info"},yo={class:"value orange"},go=["innerHTML"],ko={key:0,class:"user-loyalty"},_o={class:"notice"},Eo={class:"user-form is-loyalty-use"},Vo={class:"control"},No=["disabled"],bo=["disabled"],Bo={class:"checkbox-wrapper nocall"},Co={key:1,class:"consent"},wo={class:"checkbox-wrapper"},So=["innerHTML"],Do=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),To={class:"user-form is-promo-code"},xo={class:"control"},Lo=["disabled"],Mo={class:"label",for:"promo-code-applied"},Po=["disabled"],Fo=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),Oo={class:"user-form"},$o={key:0,class:"chars-count"},Ho={key:2,class:"checkout-block thanks"},qo={class:"title"},Uo={class:"columns"},zo={key:0,class:"column is-6"},Ro={class:"subtitle"},Ao={key:1,class:"column is-6"},jo={class:"column is-6"},Wo={key:0,class:"info-wrapper"},Jo={class:"title"},Io={class:"columns"},Go=["innerHTML"],Ko=["innerHTML"],Qo={key:1,class:"info-wrapper"},Xo={class:"title"},Yo={class:"columns"},Zo=["innerHTML"],en=["innerHTML"],tn={key:2,class:"info-wrapper"},on={class:"title"},nn={class:"columns"},rn={class:"column is-6"},an=["innerHTML"],ln={key:3,class:"checkout-block empty"},cn={class:"title"},sn={class:"message"},dn=["href"],un=e.createElementVNode("br",null,null,-1),mn=["href"];ge.render=function(t,o,n,r,a,l){var i=e.resolveComponent("checkout-item"),c=e.resolveComponent("cart-trigger"),s=e.resolveComponent("SchemaForm"),d=e.resolveComponent("login");return e.openBlock(),e.createElementBlock("div",ke,[t.redirect.url?(e.openBlock(),e.createElementBlock("form",{key:0,ref:"redirectForm",action:t.redirect.url,style:{position:"absolute",left:"-1000px",top:"-1000px"},method:"post"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.redirect.data,(function(t,o,n){return e.openBlock(),e.createElementBlock("input",{type:"hidden",name:o,value:t,key:n},null,8,Ee)})),128))],8,_e)):e.createCommentVNode("v-if",!0),t.items.length&&!t.thanks?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,e.toDisplayString(t.__("shop.order.checkout_title")),1),e.createElementVNode("div",be,[e.createElementVNode("div",Be,[e.renderSlot(t.$slots,"header"),e.createElementVNode("div",Ce,[e.createCommentVNode("items"),e.createElementVNode("div",we,[e.createElementVNode("div",Se,[e.createElementVNode("div",De,[e.createTextVNode(e.toDisplayString(t.__("shop.order.your_order"))+" ",1),e.createElementVNode("span",{class:"ml-3",textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,Te),e.createTextVNode(" "),e.createElementVNode("span",{innerHTML:t.__("shop.cart.bysum")+" "+t.$filters.price(t.total)},null,8,xe)])]),e.renderSlot(t.$slots,"cart",{items:t.items},(function(){return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(i,{key:t.id,item:t},null,8,["item"])})),128)),e.createVNode(c,{class:"trigger"},{default:e.withCtx((function(o){return[e.createElementVNode("button",{class:"button",onClick:o.open},[Me,e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.edit")),1)],8,Le)]})),_:1})]})),e.renderSlot(t.$slots,"cart-footer",{total:t.total})])]),e.createElementVNode("div",Pe,[e.createElementVNode("div",Fe,[e.createElementVNode("div",Oe,e.toDisplayString(t.__("shop.order.contact_title")),1),!t.auth&&t.isLogin?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[0]||(o[0]=function(e){return t.userType=e}),value:"new"},null,512),[[e.vModelRadio,t.userType]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.auth_new")),1)]),e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[1]||(o[1]=function(e){return t.userType=e}),value:"login"},null,512),[[e.vModelRadio,t.userType]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.auth_old")),1)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",He,[e.withDirectives(e.createElementVNode("div",qe,[e.createVNode(s,{schemaRowClasses:"field",schema:t.userSchema,"validation-schema":t.userValidation,preventModelCleanupOnSchemaChange:!0},{afterForm:e.withCtx((function(){return[e.createElementVNode("button",Ue,null,512)]})),_:1},8,["schema","validation-schema"])],512),[[e.vShow,"new"==t.userType]]),t.isLogin?e.withDirectives((e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(d,{"login-callback":t.loginCallback},null,8,["login-callback"])],512)),[[e.vShow,"login"==t.userType]]):e.createCommentVNode("v-if",!0),t.isLogin?(e.openBlock(),e.createElementBlock("div",Re,[t.auth?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",je,[e.createElementVNode("div",We,e.toDisplayString(t.__("shop.order.auth_social")),1),e.createElementVNode("div",Je,[e.createElementVNode("a",{class:"button",onClick:o[2]||(o[2]=function(){return t.facebook&&t.facebook.apply(t,arguments)})},Ie),e.createElementVNode("a",{class:"button",onClick:o[3]||(o[3]=function(){return t.google&&t.google.apply(t,arguments)})},Ge)])])]))])):e.createCommentVNode("v-if",!0)])])]),e.createElementVNode("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("div",Xe,[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createElementVNode("div",tt,e.toDisplayString(t.__("shop.order.shipping")),1)]),t.shippingSelected&&t.shippingSelected.nextDates?(e.openBlock(),e.createElementBlock("div",ot,[e.createElementVNode("div",nt,"на "+e.toDisplayString(t.shippingSelected.nextDates),1)])):e.createCommentVNode("v-if",!0),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shippingTypesRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",rt,[e.createElementVNode("div",at,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[5]||(o[5]=function(e){return t.shipping=e}),value:n.id,onClick:function(e){return t.toggleShippingRadio(n.id)}},null,8,lt),[[e.vModelRadio,t.shipping]]),n.icon?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",src:n.icon},null,8,it)):(e.openBlock(),e.createElementBlock("svg",ct,st)),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",ut,[!n.amount&&n.price_label?(e.openBlock(),e.createElementBlock("span",mt,e.toDisplayString(n.price_label),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,pt))])]),t.slots.shippingFooter?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",vt,[n.component&&n.id==t.shipping?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.component),{key:0,commit:t.shippingStoreData,data:t.shippingComponentData,item:n},null,8,["commit","data","item"])):e.createCommentVNode("v-if",!0)]))],2)})),128))]),e.renderSlot(t.$slots,"shipping-footer",{shippingTypesRestricted:t.shippingTypesRestricted,shipping:t.shipping,shippingStoreData:t.shippingStoreData,shippingComponentData:t.shippingComponentData})])]),t.isPaymentMethodOverSummary?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",ft,[e.createElementVNode("div",yt,[e.createElementVNode("div",gt,[e.createElementVNode("div",kt,[e.createElementVNode("div",_t,[e.createElementVNode("div",Et,e.toDisplayString(t.__("shop.order.payment")),1)]),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.paymentMethodsRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["row no-icon","is-"+n.code])},[e.createElementVNode("div",Vt,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[7]||(o[7]=function(e){return t.payment=e}),value:n.id,onClick:function(e){return t.togglePaymentRadio(n.id)}},null,8,Nt),[[e.vModelRadio,t.payment]]),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",bt,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),n.amount?(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("span",{innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,Ct)])):e.createCommentVNode("v-if",!0)],2)],2)})),128))])])]))]),e.createElementVNode("div",wt,[e.createElementVNode("div",St,[t.isPaymentMethodOverSummary?(e.openBlock(),e.createElementBlock("div",Dt,[e.createElementVNode("div",Tt,[e.createElementVNode("div",xt,[e.createElementVNode("div",Lt,[e.createElementVNode("div",Mt,[e.createElementVNode("div",Pt,e.toDisplayString(t.__("shop.order.payment")),1)]),e.createCommentVNode("v-if",!0)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.paymentMethodsRestricted,(function(n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item",{"is-disabled":n.restricted}]),key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["row no-icon","is-"+n.code])},[e.createElementVNode("div",Ft,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"radio","onUpdate:modelValue":o[9]||(o[9]=function(e){return t.payment=e}),value:n.id,onClick:function(e){return t.togglePaymentRadio(n.id)}},null,8,Ot),[[e.vModelRadio,t.payment]]),e.createElementVNode("span",null,e.toDisplayString(n.name),1)]),n.description?(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(n.description),1)):e.createCommentVNode("v-if",!0)]),n.amount?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("span",{innerHTML:"percent"==n.type?n.amount+"%":t.$filters.price(n.amount)},null,8,qt)])):e.createCommentVNode("v-if",!0)],2)],2)})),128))])])):e.createCommentVNode("v-if",!0),Ut,e.createElementVNode("div",zt,[e.createElementVNode("div",Rt,e.toDisplayString(t.__("shop.order.total")),1),e.createElementVNode("div",At,[e.createElementVNode("div",jt,[e.createElementVNode("div",Wt,[e.createElementVNode("span",{textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,Jt),e.createTextVNode(" "+e.toDisplayString(t.__("shop.cart.bysum")),1)]),e.createElementVNode("div",It,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,Gt)])]),t.discount?(e.openBlock(),e.createElementBlock("div",Kt,[e.createElementVNode("div",Qt,e.toDisplayString(t.__("shop.order.discount")),1),e.createElementVNode("div",Xt,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.discount)},null,8,Yt)])])):e.createCommentVNode("v-if",!0),t.fee>0?(e.openBlock(),e.createElementBlock("div",Zt,[e.createElementVNode("div",eo,e.toDisplayString(t.__("shop.order.fee")),1),e.createElementVNode("div",to,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.fee)},null,8,oo)]),e.renderSlot(t.$slots,"fee")])):e.createCommentVNode("v-if",!0),t.shipping?(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("div",ro,e.toDisplayString(t.__("shop.order.shipping_price")),1),e.createElementVNode("div",ao,[t.shippingPrice>0?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:t.$filters.price(t.shippingPrice)},null,8,lo)):t.shippingSelected&&t.shippingSelected.price_label?(e.openBlock(),e.createElementBlock("span",io,e.toDisplayString(t.shippingSelected.price_label),1)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.promoCodeApplied?(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("div",so,[e.createTextVNode(e.toDisplayString(t.__("shop.order.promo_code")),1),uo,e.createElementVNode("span",mo,e.toDisplayString(t.promoCode),1)]),e.createElementVNode("div",po,[e.createElementVNode("span",{innerHTML:"percent"==t.promoCodeApplied.type?t.promoCodeApplied.amount+"%":t.$filters.price(t.promoCodeApplied.amount)},null,8,vo)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ho,[e.createElementVNode("div",fo,e.toDisplayString(t.__("shop.order.price")),1),e.createElementVNode("div",yo,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.calculateWithPromoCodeDiscount())},null,8,go)])])]),e.renderSlot(t.$slots,"loyalty",{loyalty:t.loyalty}),t.userCheckout.loyalty_points>0?(e.openBlock(),e.createElementBlock("div",ko,[e.createElementVNode("div",_o,e.toDisplayString(t.pluralize(t.readableUserLoyaltyPoints,t.__("shop.pluralize.points")))+" в наявності",1),e.createElementVNode("div",Eo,[e.createElementVNode("div",Vo,[e.withDirectives(e.createElementVNode("input",{type:"number",class:"input",placeholder:"Сума бонусів","onUpdate:modelValue":o[10]||(o[10]=function(e){return t.loyaltyUse=e}),disabled:t.loyaltyUseApplied},null,8,No),[[e.vModelText,t.loyaltyUse]])]),t.loyaltyUseApplied?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-reset",onClick:o[12]||(o[12]=function(){return t.resetLoyaltyUse&&t.resetLoyaltyUse.apply(t,arguments)})},"Відмінити")):(e.openBlock(),e.createElementBlock("button",{key:0,class:"button",onClick:o[11]||(o[11]=function(){return t.applyLoyaltyUse&&t.applyLoyaltyUse.apply(t,arguments)}),disabled:!t.loyaltyUse||t.loyaltyUse>t.userCheckout.loyalty_points},"Використати",8,bo))])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Bo,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":o[13]||(o[13]=function(e){return t.dontcall=e})},null,512),[[e.vModelCheckbox,t.dontcall]]),e.createTextVNode(e.toDisplayString(t.__("shop.order.nocall")),1)])]),e.createElementVNode("button",{class:e.normalizeClass(["button submit",{red:!t.ifCheckoutReady,"is-loading":t.loading}]),onClick:o[14]||(o[14]=function(){return t.checkout&&t.checkout.apply(t,arguments)})},e.toDisplayString(t.__("shop.order.action")),3),e.renderSlot(t.$slots,"submit",{total:t.total}),t.isConsent?(e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("div",wo,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":o[15]||(o[15]=function(e){return t.consent=e})},null,512),[[e.vModelCheckbox,t.consent]]),e.createElementVNode("div",{class:"label",innerHTML:t.__("shop.order.consent")},null,8,So)])])])):e.createCommentVNode("v-if",!0),t.isPromoCode?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["comment-wrapper is-promo-code",{"is-open":t.isPromoCodeToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:o[16]||(o[16]=function(e){return t.isPromoCodeToggled=!t.isPromoCodeToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.promo_code")),1),Do]),e.createElementVNode("div",To,[e.createElementVNode("div",xo,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"input",placeholder:" ","onUpdate:modelValue":o[17]||(o[17]=function(e){return t.promoCode=e}),disabled:t.promoCodeApplied,id:"promo-code-applied"},null,8,Lo),[[e.vModelText,t.promoCode]]),e.createElementVNode("label",Mo,e.toDisplayString(t.__("shop.order.promo.placeholder")),1)]),t.promoCodeApplied?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button",onClick:o[19]||(o[19]=function(){return t.resetPromoCode&&t.resetPromoCode.apply(t,arguments)})},e.toDisplayString(t.__("shop.order.promo.reset")),1)):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["button",{"is-loading":t.isPromoLoading}]),onClick:o[18]||(o[18]=function(){return t.applyPromoCode&&t.applyPromoCode.apply(t,arguments)}),disabled:!t.promoCode},e.toDisplayString(t.__("shop.order.promo.apply")),11,Po))])],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(["comment-wrapper",{"is-open":t.isCommentToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:o[20]||(o[20]=function(e){return t.isCommentToggled=!t.isCommentToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.order.comment")),1),Fo]),e.createElementVNode("div",Oo,[e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":o[21]||(o[21]=function(e){return t.comment=e})},null,512),[[e.vModelText,t.comment]]),t.comment.length?(e.openBlock(),e.createElementBlock("div",$o,e.toDisplayString(t.commentMaxLength-t.comment.length),1)):e.createCommentVNode("v-if",!0)])],2)])])])])])):t.thanks&&t.order?(e.openBlock(),e.createElementBlock("div",Ho,[e.renderSlot(t.$slots,"thanks",{order:t.order,redirect:t.redirect,redirectForm:t.redirectForm,home:t.home,auth:t.auth,filters:t.$filters},(function(){return[e.createElementVNode("div",qo,[e.createTextVNode(e.toDisplayString(t.__("shop.order.order"))+" ",1),e.createElementVNode("span",null,"№"+e.toDisplayString(t.order.id),1),e.createTextVNode(" "+e.toDisplayString(t.isPayed?t.__("shop.order.payed"):t.__("shop.order.success")),1)]),e.createElementVNode("div",Uo,[t.redirect.url?(e.openBlock(),e.createElementBlock("div",zo,[e.createElementVNode("div",Ro,e.toDisplayString(t.__("shop.order.pay_online")),1),e.createElementVNode("button",{class:"button is-payment",onClick:o[22]||(o[22]=function(e){return t.redirectForm.submit()})},e.toDisplayString(t.__("shop.order.pay_online_go")),1)])):(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("button",{class:"button is-orange",onClick:o[23]||(o[23]=function(){return t.home&&t.home.apply(t,arguments)})},e.toDisplayString(t.__("shop.cart.continue")),1)])),e.createElementVNode("div",jo,[t.order.shipping[0]?(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("div",Jo,e.toDisplayString(t.__("shop.order.shipping")),1),e.createElementVNode("div",Io,[t.order.shipping[0]?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column is-6",innerHTML:t.order.shipping[0]},null,8,Go)):e.createCommentVNode("v-if",!0),t.order.shipping[1]?(e.openBlock(),e.createElementBlock("div",{key:1,class:"column is-6",innerHTML:t.order.shipping[1]},null,8,Ko)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.order.payment[0]?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",Xo,e.toDisplayString(t.__("shop.order.payment")),1),e.createElementVNode("div",Yo,[t.order.payment[0]?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column is-6",innerHTML:t.order.payment[0]},null,8,Zo)):e.createCommentVNode("v-if",!0),t.order.payment[1]?(e.openBlock(),e.createElementBlock("div",{key:1,class:"column is-6",innerHTML:t.order.payment[1]},null,8,en)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.order.promoCode?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",on,e.toDisplayString(t.__("shop.order.promo_code")),1),e.createElementVNode("div",nn,[e.createElementVNode("div",rn,[e.createElementVNode("span",{innerHTML:t.order.promoCode,class:"green"},null,8,an)])])])):e.createCommentVNode("v-if",!0)])])]}))])):t.redirectOnEmpty?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",cn,e.toDisplayString(t.__("shop.cart.no_no")),1),e.createElementVNode("div",sn,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.no_prop"))+" ",1),e.createElementVNode("a",{href:t.$env.locale.url?t.$env.locale.url:"/"},e.toDisplayString(t.__("shop.cart.no_home")),9,dn),e.createTextVNode(", "),un,e.createTextVNode(e.toDisplayString(t.__("shop.cart.no_search")),1)]),e.createElementVNode("a",{class:"button continue",href:t.$env.locale.url?t.$env.locale.url:"/"},e.toDisplayString(t.__("shop.cart.continue")),9,mn)]))])},module.exports=ge;
2
2
  //# sourceMappingURL=Checkout.js.map