{"version":3,"sources":["webpack:///./node_modules/eslint-loader/index.js","webpack:///./src/modules/products/components/PriceTooltips.vue?d710","webpack:///./src/modules/products/components/PriceTooltips.vue?e03b","webpack:///./src/modules/products/components/PriceTooltips.vue?1412","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/modules/products/components/PriceTooltips.vue?fdf9","webpack:///./src/modules/products/components/PriceTooltips.vue"],"names":["go_to_nomenclature","id","name","Products","Pages","PRODUCT_DETAIL","params","CATALOG","module","exports","shared_cart_store","actions","add_to_cart","upd_item_cart_quantity","get_cart","cart_getters","getters","orders_getters","orders_store","products_actions","products_store","products_state","state","products_mutations","mutations","CatalogPageMixin","selected","snackbar","cart_blocked_dialog","license_item","license_items_arr","related_products","related_products_arr","combined_products_arr","license_key","accreditation_dialog","products","debounce","item","project_id","warehouse_id","product","check_item_in_cart","new_val","old_val","this","add_product_dialog","visible","products_in_cart","project_choosen","cart_store","accreditation_popup_message","added_prod_to_cart","accreditation_message_dialog","not_added_product_ids","value","UPD_PRODUCTS_SELECT_ALL","length","forEach","upd_item","quantity","upd_product_qty","Number","find","i","filter","push","UPD_PRODUCTS_SELECT","TOGGLE_ADDED_PROD_TO_CARD","val","selected_items_model","Array","isArray","is_license","is_required_license","is_related","UPD_ADD_PRODUCT_DIALOG","key","related","map","p","full_price","prices","actual","base","rub","prod","items_without_related","items_with_license","is_rltd","el","$route","query","_bid","productsWithBannerId","query_categories","includes","category_id","banner_id","item_with_banner_id","data","type","select_all_clicked","CLEAR_ACCREDITATION_POPUP_MESSAGE","TOGGLE_ACCREDITATION_MESSAGE_DIALOG","Vue","__decorate","Watch","Component","render","_vm","_h","$createElement","_c","_self","attrs","scopedSlots","_u","fn","ref","on","_g","_b","class","$style","icon","_v","_l","price_rub","priceListItem","priceVals","priceVal","_s","_f","priceType","price_translate","_e","staticRenderFns","PriceTooltips","ProductPriceTypeTranslate","Object","keys","reduce","acc","curr","exclude_list","ProductPriceType","BASE","price_usd","usd","Prop","default","injectStyles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EAAIuB,GAAG,eAAPvB,CAAuBxE,EAAK0F,YAAY,SAASf,EAAG,MAAM,CAACU,MAAMb,EAAIc,OAAOU,WAAW,CAACxB,EAAIgB,GAAG,IAAIhB,EAAIsB,GAAGtB,EAAIyB,gBAAgBjG,EAAK+D,OAAO,SAASS,EAAI0B,MAAM,MAAK,IAAI,IACrlBC,EAAkB,G,8HCqDDC,EAAa,wDAAlC,iD,0BAIE,EAAAH,gBAAkBI,QAJpB,EAAkC,0CAMhC,WAAS,WACP,OAAOC,OAAOC,KAAKhG,KAAKqC,QAAQ4D,QAAO,SAACC,EAAqBC,GAC3D,IAAMC,EAAe,CACnBC,QAAiBC,KACjB,WACA,OAGF,IAAKF,EAAajD,SAASgD,GAAO,CAChC,IAAMhF,EAAkB,CACtBqC,KAAM2C,EACNhB,UAAW,KACXoB,UAAW,MAGPpB,EAAY,EAAK9C,OAAO8D,GAAkC3D,IAC1D+D,EAAY,EAAKlE,OAAO8D,GAAkCK,IAE9C,OAAdrB,IACFhE,EAAEgE,UAAYA,GAGE,OAAdoB,IACFpF,EAAEoF,UAAYA,GAGhBL,EAAI7E,KAAKF,GAEX,OAAO+E,IACN,QAnC2B,GAAStC,QAEzCC,gBADC4C,eAAK,CAAEjD,KAAMuC,OAAQW,QAAS,iBAAO,OACtC,6BAFmBb,EAAa,gBADjC9B,QACoB8B,WCzDuZ,I,yGCQ5a,SAASc,EAAcC,GAErB5G,KAAK,UAAa,aAAO6G,QAAU,aAMrC,IAAIC,EAAY,eACd,EACA9C,EACA4B,GACA,EACAe,EACA,KACA,MAIa,aAAAG,EAAiB,QAShC,IAAkBA,EAAW,CAACC,QAAA,KAAMC,QAAA,KAAMC,YAAA,KAAUC,eAAA,OAAeC,QAAA","file":"js/home1142.c7e4ac83.js","sourcesContent":["import { Component, Vue, Watch } from 'vue-property-decorator';\nimport {\n products_store, shared_cart_store, orders_store, cart_store,\n} from '@/store';\nimport { check_item_in_cart } from '@/modules/cart/shared/services';\nimport { debounce } from '@/utils';\nimport { Products } from '../types';\nimport { go_to_nomenclature } from '../shared/services';\n\n// cart\nconst { add_to_cart, upd_item_cart_quantity, get_cart } = shared_cart_store.actions;\nconst cart_getters = shared_cart_store.getters;\n\n// orders\n\nconst orders_getters = orders_store.getters;\n\n// products\nconst products_actions = products_store.actions;\nconst products_state = products_store.state;\nconst products_mutations = products_store.mutations;\n\n@Component\nexport default class CatalogPageMixin extends Vue {\n @Watch('product_dialog')\n on_prop_width_change(new_val: number | string, old_val: number | string) {\n if (!new_val) {\n this.related_products = [];\n this.license_item = {} as Products.Product;\n this.license_items_arr = [];\n }\n }\n\n products_actions = products_actions;\n\n products_state = products_state;\n\n products_mutations = products_mutations;\n\n cart_getters = cart_getters;\n\n selected: Products.Product[] = [];\n\n snackbar = false;\n\n cart_blocked_dialog = false;\n\n license_item: Products.Product = {} as Products.Product;\n\n license_items_arr: Products.Product[] = [];\n\n related_products: Products.Product[] = [];\n\n related_products_arr: Products.Product[] = [];\n\n combined_products_arr: Products.Product[] = [];\n\n license_key = '';\n\n accreditation_dialog = false;\n\n products = [] as Products.Product[]\n\n upd_item_cart_quantity = debounce((item: Products.Product) => {\n const { project_id, warehouse_id } = orders_getters;\n\n upd_item_cart_quantity({\n product: item, warehouse_id, project_id,\n });\n }, 200);\n\n add_to_cart = add_to_cart;\n\n get product_dialog() {\n return this.products_state.add_product_dialog.visible;\n }\n\n check_item_in_cart = check_item_in_cart;\n\n get_cart = get_cart;\n\n go_to_nomenclature = go_to_nomenclature;\n\n get cart_items() {\n return this.cart_getters.products_in_cart;\n }\n\n get project_choosen() {\n return shared_cart_store.getters.project_choosen;\n }\n\n get accreditation_popup_message() {\n return cart_store.state.accreditation_popup_message;\n }\n\n get added_prod_to_cart() {\n return cart_store.state.added_prod_to_cart;\n }\n\n get accreditation_message_dialog() {\n return cart_store.state.accreditation_message_dialog;\n }\n\n get not_added_product_ids() {\n return cart_store.state.not_added_product_ids;\n }\n\n select_all_clicked(value: boolean) {\n if (value) {\n this.selected = [...this.products_state.products];\n } else {\n this.selected = [];\n }\n this.products_mutations.UPD_PRODUCTS_SELECT_ALL(value);\n\n if (this.selected.length) {\n this.selected.forEach((item) => {\n const upd_item = item;\n\n upd_item.quantity = item?.quantity || 1;\n\n if (this.check_item_in_cart(item)) {\n this.upd_item_cart_quantity(upd_item);\n } else if (typeof item?.id !== 'undefined' && typeof item?.quantity !== 'undefined') {\n this.products_actions.upd_product_qty({ id: item.id, quantity: Number(item.quantity) });\n }\n });\n this.snackbar = true;\n } else {\n this.snackbar = false;\n }\n }\n\n select_item_clicked(item: Products.Product) {\n const selected = this.selected.find((i) => i.id === item.id);\n\n if (!selected) {\n this.selected.push(item);\n } else {\n this.selected = this.selected.filter((i) => i.id !== item.id);\n }\n this.products_mutations.UPD_PRODUCTS_SELECT({ item, value: !!selected });\n\n if (this.selected.length) {\n this.selected.forEach((item) => {\n const upd_item = item;\n\n upd_item.quantity = item?.quantity || 1;\n\n if (this.check_item_in_cart(item)) {\n this.upd_item_cart_quantity(upd_item);\n } else if (typeof item?.id !== 'undefined' && typeof item?.quantity !== 'undefined') {\n this.products_actions.upd_product_qty({ id: item.id, quantity: Number(item.quantity) });\n }\n });\n this.snackbar = true;\n } else {\n this.snackbar = false;\n }\n }\n\n close_added_dialog() {\n this.products_mutations.UPD_PRODUCTS_SELECT_ALL(false);\n cart_store.mutations.TOGGLE_ADDED_PROD_TO_CARD(false);\n this.selected = [];\n }\n\n get selected_items_model() {\n return this.selected;\n }\n\n set selected_items_model(val: Products.Product[]) {\n this.selected = val;\n\n if (val.length) {\n this.selected.forEach((item) => {\n const upd_item = item;\n\n upd_item.quantity = item?.quantity || 1;\n\n if (this.check_item_in_cart(item)) {\n this.upd_item_cart_quantity(upd_item);\n } else if (typeof item?.id !== 'undefined' && typeof item?.quantity !== 'undefined') {\n this.products_actions.upd_product_qty({ id: item.id, quantity: Number(item.quantity) });\n }\n });\n this.snackbar = true;\n } else {\n this.snackbar = false;\n }\n }\n\n async add_cart(item: Products.Product | Products.Product[] = this.selected_items_model) {\n if (Array.isArray(item)) {\n const is_license: Products.Product | undefined = item.find((i: Products.Product) => i.is_required_license);\n const is_related: Products.Product | undefined = item.find((i: Products.Product) => i.related_products);\n\n if (is_license && !is_related) {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'license_key' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n\n this.license_items_arr = item.filter((i) => i.is_required_license);\n return;\n }\n if (is_related) {\n this.related_products = [];\n\n const related: Products.Product[] = is_related.related_products.map((p) => ({\n ...p,\n quantity: is_related.quantity || 1,\n full_price: p.prices.actual.base.rub ? p.prices.actual.base.rub * Number(is_related.quantity) : 0,\n is_related: true,\n }));\n\n const full_price = is_related.prices.actual.base.rub\n ? is_related.prices.actual.base.rub * Number(is_related.quantity) : 0;\n\n const prod = {\n ...is_related,\n full_price,\n };\n\n const items_without_related = item.filter((i) => !i.related_products);\n\n const items_with_license = item.filter((i) => {\n const is_rltd = i.related_products;\n\n return !is_rltd && i.is_required_license;\n });\n\n if (items_with_license.length > 0) {\n this.license_items_arr = [...items_with_license];\n }\n\n this.related_products = [\n prod, ...related,\n ];\n this.related_products_arr = [...items_without_related];\n\n if (is_license) {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'combined' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n } else {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'related' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n }\n\n return;\n }\n }\n\n if (typeof this.project_choosen === 'number') {\n this.cart_blocked_dialog = true;\n } else {\n if (!Array.isArray(item)) {\n const el = item;\n\n // this.product_item = item;\n\n el.quantity = el.quantity || 1;\n this.upd_item_cart_quantity(el);\n\n if (item.is_required_license && !item.related_products) {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'license_key' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n this.license_item = item;\n\n return;\n }\n if (item?.related_products) {\n const related: Products.Product[] = item.related_products.map((p) => ({\n ...p,\n quantity: el.quantity,\n full_price: p.prices.actual.base.rub ? p.prices.actual.base.rub * Number(el.quantity) : 0,\n }));\n\n const prod = {\n ...item,\n full_price: item.prices.actual.base.rub ? item.prices.actual.base.rub * Number(el.quantity) : 0,\n };\n\n this.related_products = [\n prod, ...related,\n ];\n\n if (item.is_required_license) {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'combined' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n } else {\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'type', value: 'related' });\n this.products_mutations.UPD_ADD_PRODUCT_DIALOG({ key: 'visible', value: 'true' });\n }\n\n return;\n }\n }\n\n // eslint-disable-next-line no-underscore-dangle\n if (this.$route.query._bid) {\n if (!Array.isArray(item)) {\n if (products_state.query_categories.includes(item.category_id)) {\n const item_with_banner_id = {\n ...item,\n // eslint-disable-next-line no-underscore-dangle\n banner_id: +(this.$route.query._bid),\n };\n\n this.add_to_cart(item_with_banner_id);\n } else {\n this.add_to_cart(item);\n }\n } else if (Array.isArray(item)) {\n const productsWithBannerId = item.map((product) => {\n if (products_state.query_categories.includes(product.category_id)) {\n return {\n ...product,\n // eslint-disable-next-line no-underscore-dangle\n banner_id: +(this.$route.query._bid),\n };\n }\n // Важно вернуть оригинальный продукт, если условие не выполняется\n return product;\n });\n\n this.add_to_cart(productsWithBannerId);\n }\n cart_store.mutations.TOGGLE_ADDED_PROD_TO_CARD(true);\n this.snackbar = false;\n return;\n }\n\n this.snackbar = false;\n const data = await this.add_to_cart(item);\n\n return data;\n }\n }\n\n add_cart_confirm() {\n if (this.products_state.add_product_dialog.type === 'license_key') {\n if (this.license_items_arr.length) {\n // eslint-disable-next-line no-underscore-dangle\n if (this.$route.query._bid) {\n this.selected = this.selected.map((product) => ({\n ...product,\n // eslint-disable-next-line no-underscore-dangle\n banner_id: +(this.$route.query._bid),\n }));\n }\n this.add_to_cart(this.selected);\n } else {\n // eslint-disable-next-line no-underscore-dangle\n if (this.$route.query._bid) {\n if (products_state.query_categories.includes(this.license_item.category_id)) {\n this.license_item = {\n ...this.license_item,\n // eslint-disable-next-line no-underscore-dangle\n banner_id: +(this.$route.query._bid),\n };\n }\n }\n this.add_to_cart(this.license_item);\n }\n }\n if (this.products_state.add_product_dialog.type === 'related' || this.products_state.add_product_dialog.type === 'combined') {\n if (this.related_products_arr.length) {\n const products = [\n ...this.related_products_arr, ...this.related_products,\n ];\n\n this.add_to_cart(products);\n } else {\n this.add_to_cart(this.related_products);\n }\n }\n\n this.select_all_clicked(false);\n }\n\n close_accreditation_dialog() {\n cart_store.mutations.CLEAR_ACCREDITATION_POPUP_MESSAGE();\n cart_store.mutations.TOGGLE_ACCREDITATION_MESSAGE_DIALOG(false);\n\n this.not_added_product_ids.forEach((id) => {\n this.products_actions.upd_product_qty({ id, quantity: Number(0) });\n });\n }\n}\n","export { default } from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-0-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-0-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-0-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-0-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceTooltips.vue?vue&type=style&index=0&module=true&lang=scss&\"; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-0-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-0-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-0-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-0-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceTooltips.vue?vue&type=style&index=0&module=true&lang=scss&\"","// extracted by mini-css-extract-plugin\nmodule.exports = {\"v-application\":\"PriceTooltips_v-application_1qnkd\",\"text-h1\":\"PriceTooltips_text-h1_2VkrA\",\"text-h2\":\"PriceTooltips_text-h2_2fRxd\",\"priceListItem\":\"PriceTooltips_priceListItem_2Vw9A\",\"priceVal\":\"PriceTooltips_priceVal_1Guke\",\"icon\":\"PriceTooltips_icon_iPO1S\"};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-menu',{attrs:{\"open-on-click\":\"\",\"offset-y\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({class:_vm.$style.icon},'v-icon',attrs,false),on),[_vm._v(\" mdi-information-outline \")])]}}])},[_c('v-list',{attrs:{\"width\":\"320px\"}},_vm._l((_vm.items),function(item,i){return _c('v-list-item',{key:i,attrs:{\"dense\":\"\"}},[(item.price_rub !== null)?_c('v-list-item-title',{class:_vm.$style.priceListItem},[_c('div',{class:_vm.$style.priceVals},[_c('span',{class:_vm.$style.priceVal},[_vm._v(\" \"+_vm._s(_vm._f(\"currency_rub\")(item.price_rub))+\" \")])]),_c('div',{class:_vm.$style.priceType},[_vm._v(\" \"+_vm._s(_vm.price_translate[item.type])+\" \")])]):_vm._e()],1)}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Vue } from 'vue-property-decorator';\nimport { ProductPriceType, ProductPriceTypeTranslate } from '@/enums';\nimport { ProductPriceShared } from '@/modules/products/shared/types';\n\ninterface PricesFormat {\n type: string,\n price_rub: number | null,\n price_usd: number | null,\n}\n\n@Component\nexport default class PriceTooltips extends Vue {\n @Prop({ type: Object, default: () => ({}) })\n prices!: ProductPriceShared;\n\n price_translate = ProductPriceTypeTranslate;\n\n get items(): PricesFormat[] {\n return Object.keys(this.prices).reduce((acc: PricesFormat[], curr) => {\n const exclude_list = [\n ProductPriceType.BASE,\n 'discount',\n 'nds',\n ];\n\n if (!exclude_list.includes(curr)) {\n const i: PricesFormat = {\n type: curr,\n price_rub: null,\n price_usd: null,\n };\n\n const price_rub = this.prices[curr as keyof ProductPriceShared].rub;\n const price_usd = this.prices[curr as keyof ProductPriceShared].usd;\n\n if (price_rub !== null) {\n i.price_rub = price_rub;\n }\n\n if (price_usd !== null) {\n i.price_usd = price_usd;\n }\n\n acc.push(i);\n }\n return acc;\n }, []);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceTooltips.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceTooltips.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PriceTooltips.vue?vue&type=template&id=0fc80d3a&\"\nimport script from \"./PriceTooltips.vue?vue&type=script&lang=ts&\"\nexport * from \"./PriceTooltips.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PriceTooltips.vue?vue&type=style&index=0&module=true&lang=scss&\"\n\n\n\n\nfunction injectStyles (context) {\n \n this[\"$style\"] = (style0.locals || style0)\n\n}\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n injectStyles,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\ninstallComponents(component, {VIcon,VList,VListItem,VListItemTitle,VMenu})\n"],"sourceRoot":""}