{"version":3,"sources":["webpack:///./src/components/common/app-text-ellipsis.vue?eefb","webpack:///./src/pages/shop/shop.vue","webpack:///./src/components/common/app-product-card.vue","webpack:///./src/components/common/app-text-ellipsis.vue","webpack:///src/components/common/app-text-ellipsis.vue","webpack:///./src/components/common/app-text-ellipsis.vue?b80f","webpack:///./src/components/common/app-text-ellipsis.vue?6609","webpack:///./src/components/common/shop/app-shop-price-view.vue","webpack:///src/components/common/shop/app-shop-price-view.vue","webpack:///./src/components/common/shop/app-shop-price-view.vue?76e2","webpack:///./src/components/common/shop/app-shop-price-view.vue?7f15","webpack:///./src/components/common/shop/app-shop-basket-icon.vue","webpack:///src/components/common/shop/app-shop-basket-icon.vue","webpack:///./src/components/common/shop/app-shop-basket-icon.vue?7889","webpack:///./src/components/common/shop/app-shop-basket-icon.vue?3002","webpack:///src/components/common/app-product-card.vue","webpack:///./src/components/common/app-product-card.vue?2aa2","webpack:///./src/components/common/app-product-card.vue?bfad","webpack:///./src/components/common/shop/app-shop-basket.vue","webpack:///src/components/common/shop/app-shop-basket.vue","webpack:///./src/components/common/shop/app-shop-basket.vue?e98f","webpack:///./src/components/common/shop/app-shop-basket.vue?4e43","webpack:///src/pages/shop/shop.vue","webpack:///./src/pages/shop/shop.vue?e013","webpack:///./src/pages/shop/shop.vue?0dc5","webpack:///./src/pages/shop/shop.vue?f3da"],"names":["render","_vm","this","_c","_self","staticClass","shop","attrs","description","scopedSlots","_u","key","fn","alertStatus","_v","_s","alertInfo","proxy","_e","_l","tickets","item","index","product","on","$event","addProductToBasket","others","length","$tr","createOrder","staticRenderFns","name","currency","price","priceRub","isTicket","isTicketNotAvailableToPurchase","isThisItemSelected","updateTicketAmount","amount","userCanBuyCount","$emit","isSomeTicketSelected","maxQuantityLimited","ref","text","ellipsis","class","show","openMore","props","lines","type","default","data","mounted","window","beforeUnmount","methods","resize","ellipses","parseFloat","truncateTextParts","truncateElement","component","priceInRub","priceInCurrency","staticStyle","popTipText","required","computed","upToDateCurrency","isHighlighted","components","AppTextEllipsis","AppShopPriceView","AppShopAppBasketIcon","productsInBasket","totalAmount","clearProducts","sum","isShopNotAvailableByTime","accumulator","AppInfoBlock","AppMarkdown","AppProductCard","AppShopBasket","test","orderItem","newAmount","console","id","count","path"],"mappings":"+HAAA,W,gECAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,aAAa,CAAEJ,EAAIK,KAAMH,EAAG,eAAe,CAACE,YAAY,kBAAkBE,MAAM,CAAC,MAAQ,GAAG,YAAcN,EAAIK,KAAKE,aAAaC,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,WAAW,MAAO,CAACT,EAAG,QAAQ,CAACI,MAAM,CAAC,KAAON,EAAIY,YAAY,OAAS,KAAK,CAACZ,EAAIa,GAAG,IAAIb,EAAIc,GAAGd,EAAIe,WAAW,SAASC,OAAM,GAAM,CAACN,IAAI,OAAOC,GAAG,WAAW,MAAO,CAACT,EAAG,cAAc,CAACI,MAAM,CAAC,KAAON,EAAIK,KAAKE,iBAAiBS,OAAM,IAAO,MAAK,EAAM,cAAchB,EAAIiB,KAAKf,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,MAAM,CAACE,YAAY,OAAOJ,EAAIkB,GAAIlB,EAAImB,SAAS,SAASC,EAAKC,GAAO,OAAOnB,EAAG,MAAM,CAACQ,IAAIW,EAAMjB,YAAY,wCAAwC,CAACF,EAAG,iBAAiB,CAACE,YAAY,yBAAyBE,MAAM,CAAC,QAAUc,EAAKE,SAASC,GAAG,CAAC,gBAAgB,SAASC,GAAQ,OAAOxB,EAAIyB,mBAAmBL,EAAMI,QAAa,MAAK,KAAKtB,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAAEJ,EAAI0B,QAAU1B,EAAI0B,OAAOC,OAAQzB,EAAG,KAAK,CAACE,YAAY,wBAAwB,CAACJ,EAAIa,GAAG,IAA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A,0DAEA,OACA,4DAEA,8CAEA,kBACA,iBACAC,wDAIA,SACA,WACA,+BAEAH,mBAGA,sBACA,+CACA,6CAEA,iBACA,mDAEA,qBACA,cAAAvE,SAAAO,SAAA,gCAEA,oDAAAJ,UAAAiB,YAEA,mDAAAjB,UAAAiB,eC9J6V,ICQzV,G,UAAY,eACd,EACAxC,EACA+B,GACA,EACA,KACA,KACA,OAIa,e,2CCnBf","file":"js/shop.18d58d3f.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-text-ellipsis.vue?vue&type=style&index=0&id=df7f8b50&prod&lang=css&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"shop-page\"},[(_vm.shop)?_c('AppInfoBlock',{staticClass:\"shop-page__info\",attrs:{\"limit\":85,\"description\":_vm.shop.description},scopedSlots:_vm._u([{key:\"alert\",fn:function(){return [_c('Alert',{attrs:{\"type\":_vm.alertStatus,\"banner\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.alertInfo)+\" \")])]},proxy:true},{key:\"text\",fn:function(){return [_c('AppMarkdown',{attrs:{\"text\":_vm.shop.description}})]},proxy:true}],null,false,1662086700)}):_vm._e(),_c('div',{staticClass:\"shop-page__tickets\"},[_c('div',{staticClass:\"row\"},_vm._l((_vm.tickets),function(item,index){return _c('div',{key:index,staticClass:\"col-xxl-1 col-xl-2 col-lg-3 col-md-6\"},[_c('AppProductCard',{staticClass:\"shop-page__item-ticket\",attrs:{\"product\":item.product},on:{\"change-amount\":function($event){return _vm.addProductToBasket(item, $event)}}})],1)}),0)]),_c('div',{staticClass:\"shop-page__other\"},[(_vm.others && _vm.others.length)?_c('h4',{staticClass:\"shop-page__sub-title\"},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.products.additionally'))+\" \")]):_vm._e(),_c('div',{staticClass:\"row\"},_vm._l((_vm.others),function(item,index){return _c('div',{key:index,staticClass:\"col-xxl-1 col-xl-2 col-lg-3 col-md-6\"},[_c('AppProductCard',{attrs:{\"product\":item.product},on:{\"change-amount\":function($event){return _vm.addProductToBasket(item, $event)}}})],1)}),0)]),_c('AppShopBasket',{attrs:{\"shop\":_vm.shop},on:{\"create-order\":_vm.createOrder}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"shop-page__item-ticket shop-ticket s-card\"},[_c('AppTextEllipsis',{staticClass:\"shop-ticket__title\",attrs:{\"text\":_vm.product.name,\"lines\":2}}),_c('AppTextEllipsis',{staticClass:\"shop-ticket__description\",attrs:{\"text\":_vm.product.description,\"lines\":2}}),_c('AppShopPriceView',{attrs:{\"currency\":_vm.product.currency,\"price\":_vm.product.price,\"price-rub\":_vm.product.priceRub}}),(_vm.isTicket)?[_c('div',{staticClass:\"shop-ticket__btn-block\"},[_c('Button',{staticClass:\"ivu-btn-primary-light shop-ticket__btn\",attrs:{\"disabled\":_vm.isTicketNotAvailableToPurchase,\"type\":_vm.isThisItemSelected ? 'error' : 'primary',\"long\":\"\"},on:{\"click\":_vm.updateTicketAmount}},[_vm._v(\" \"+_vm._s(_vm.isThisItemSelected ? _vm.$tr('shop.btn.delete') : _vm.$tr('shop.btn.order'))+\" \")])],1)]:[(_vm.isThisItemSelected)?_c('div',{staticClass:\"shop-ticket__btn-block\"},[_c('InputNumber',{attrs:{\"value\":_vm.amount,\"editable\":false,\"controls-outside\":\"\",\"min\":0,\"max\":_vm.userCanBuyCount},on:{\"input\":function($event){return _vm.$emit('change-amount', $event)}}})],1):_c('div',{staticClass:\"shop-ticket__btn-block\"},[_c('Button',{staticClass:\"ivu-btn-primary-light shop-ticket__btn\",attrs:{\"disabled\":_vm.userCanBuyCount <= 0,\"type\":\"primary\",\"long\":\"\"},on:{\"click\":function($event){return _vm.$emit('change-amount', 1)}}},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.btn.order'))+\" \")])],1)],_c('AppShopAppBasketIcon',{attrs:{\"is-highlighted\":_vm.isThisItemSelected}}),(_vm.isTicket)?[_c('div',{staticClass:\"shop-ticket__bottom-info\"},[(_vm.userCanBuyCount <= 0)?[_c('div',[_vm._v(_vm._s(_vm.$tr('shop.product.other.outOfStock')))])]:(!_vm.isSomeTicketSelected || _vm.isThisItemSelected)?[_c('div',{staticClass:\"shop-ticket__basket-info\"},[_vm._v(\" \"+_vm._s(`${_vm.$tr('shop.product.inBasket')}: ${_vm.amount}`)+\" \")]),(_vm.maxQuantityLimited)?_c('div',{staticClass:\"shop-ticket__access-info\"},[_vm._v(\" \"+_vm._s(`${_vm.$tr('shop.product.available')}: ${_vm.userCanBuyCount - _vm.amount}`)+\" \")]):_vm._e()]:[_c('div',[_vm._v(_vm._s(_vm.$tr('shop.product.ticket.alreadySelected')))])]],2)]:[_c('div',{staticClass:\"shop-ticket__bottom-info\"},[(_vm.userCanBuyCount > 0)?[_c('div',{staticClass:\"shop-ticket__basket-info\"},[_vm._v(\" \"+_vm._s(`${_vm.$tr('shop.product.inBasket')}: ${_vm.amount}`)+\" \")]),(_vm.maxQuantityLimited)?_c('div',{staticClass:\"shop-ticket__access-info\"},[_vm._v(\" \"+_vm._s(`${_vm.$tr('shop.product.available')}: ${_vm.userCanBuyCount - _vm.amount}`)+\" \")]):_vm._e()]:[_c('div',[_vm._v(_vm._s(_vm.$tr('shop.product.other.outOfStock')))])]],2)]],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"ellipsis-wrapper\"},[_c('div',{staticClass:\"ellipsis-block\"},[_c('div',{ref:\"truncate\"},[_vm._v(\" \"+_vm._s(_vm.text)+\" \")]),(_vm.ellipsis)?_c('div',{staticClass:\"ellipsis-block__btn-block\"},[_c('div',{staticClass:\"ellipsis-block__btn\",class:_vm.show ? 'ellipsis-block__btn--active' : '',on:{\"click\":_vm.openMore}},[_vm._v(\" ... \")])]):_vm._e()])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"ellipsis-wrapper\">\n    <div class=\"ellipsis-block\">\n      <div ref=\"truncate\">\n        {{ text }}\n      </div>\n      <div v-if=\"ellipsis\" class=\"ellipsis-block__btn-block\">\n        <div\n          :class=\"show ? 'ellipsis-block__btn--active' : ''\"\n          class=\"ellipsis-block__btn\"\n          @click=\"openMore\"\n        >\n          ...\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  props: {\n    lines: {\n      type: Number,\n      default: 3,\n    },\n    text: {\n      type: String,\n      default: '',\n    },\n  },\n  data() {\n    return {\n      ellipsis: false,\n      show: false,\n    }\n  },\n  mounted() {\n    this.ellipses()\n    window.addEventListener('resize', this.resize)\n  },\n  beforeUnmount() {\n    window.removeEventListener('resize', this.resize)\n  },\n  methods: {\n    resize() {\n      if (this.$refs.truncate) {\n        this.$refs.truncate.textContent = this.text\n      }\n      this.ellipses()\n    },\n    ellipses() {\n      const truncateElement = this.$refs.truncate\n      const truncateText = truncateElement.textContent\n\n      const getLineHeight = function (element) {\n        const lineHeight =\n          window.getComputedStyle(truncateElement)['line-height']\n        if (lineHeight === 'normal') {\n          // fuck chrome\n          return (\n            1.16 *\n            parseFloat(window.getComputedStyle(truncateElement)['font-size'])\n          )\n        } else {\n          return parseFloat(lineHeight)\n        }\n      }\n      const truncateTextParts = truncateText.split(' ')\n      const lineHeight = getLineHeight(truncateElement)\n      if (!this.show) {\n        while (this.lines * lineHeight < truncateElement.clientHeight) {\n          // console.log(truncateTextParts.length, this.lines * lineHeight, truncateElement.clientHeight);\n          truncateTextParts.pop()\n          // truncateElement.innerHTML = truncateTextParts.join(' ') + '...';\n          truncateElement.innerHTML = truncateTextParts.join(' ')\n          this.ellipsis = true\n        }\n      } else {\n        this.$refs.truncate.textContent = this.text\n      }\n    },\n    openMore() {\n      this.show = !this.show\n      this.ellipses()\n    },\n  },\n}\n</script>\n<style>\n.ellipsis-block {\n  position: relative;\n}\n.ellipsis-block__btn {\n  background-color: #f9f9fa;\n  border-radius: 3px;\n  display: flex;\n  padding: 6px 8px;\n  line-height: 0px;\n  height: 16px;\n  cursor: pointer;\n}\n.ellipsis-block__btn-block {\n  position: absolute;\n  display: flex;\n  line-height: 0px;\n  height: 20px;\n  width: 50px;\n  right: 0px;\n  bottom: 0px;\n  background-color: var(--s-white-color);\n  justify-content: center;\n}\n.ellipsis-block__btn--active {\n  background-color: #dbdde0;\n}\n.ellipsis-wrapper {\n  height: 100%;\n  width: 100%;\n}\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-text-ellipsis.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-text-ellipsis.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-text-ellipsis.vue?vue&type=template&id=df7f8b50&\"\nimport script from \"./app-text-ellipsis.vue?vue&type=script&lang=js&\"\nexport * from \"./app-text-ellipsis.vue?vue&type=script&lang=js&\"\nimport style0 from \"./app-text-ellipsis.vue?vue&type=style&index=0&id=df7f8b50&prod&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"shop-ticket__price\"},[_c('div',{staticClass:\"shop-ticket__price-rub\"},[_vm._v(\" \"+_vm._s(_vm.priceInRub)+\" \")]),(_vm.priceInCurrency)?_c('div',{staticClass:\"shop-ticket__price-cur\"},[_c('span',{staticStyle:{\"margin-right\":\"5px\"}},[_vm._v(\" \"+_vm._s(_vm.priceInCurrency)+\" \")]),_c('Poptip',{attrs:{\"content\":_vm.popTipText,\"width\":\"270\",\"placement\":\"top\"}},[_c('div',{staticClass:\"shop-ticket__price-help\"},[_c('feather',{staticStyle:{\"position\":\"relative\",\"top\":\"2px\"},attrs:{\"type\":\"help-circle\",\"size\":\"16\",\"stroke\":\"var(--s-black-color-80)\"}})],1)])],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"shop-ticket__price\">\n    <div class=\"shop-ticket__price-rub\">\n      {{ priceInRub }}\n    </div>\n    <div v-if=\"priceInCurrency\" class=\"shop-ticket__price-cur\">\n      <span style=\"margin-right: 5px\">\n        {{ priceInCurrency }}\n      </span>\n      <Poptip :content=\"popTipText\" width=\"270\" placement=\"top\">\n        <div class=\"shop-ticket__price-help\">\n          <feather\n            style=\"position: relative; top: 2px\"\n            type=\"help-circle\"\n            size=\"16\"\n            stroke=\"var(--s-black-color-80)\"\n          />\n        </div>\n      </Poptip>\n    </div>\n  </div>\n</template>\n<script>\nimport { CURRENCY_ENUM, CURRENCY_SYMBOL_ENUM } from '@/utils/constants'\n\nexport default {\n  props: {\n    priceRub: { type: Number, required: true },\n    price: { type: Number, required: true },\n    currency: { type: String, required: true },\n  },\n  computed: {\n    priceInRub() {\n      return `${this.priceRub} ${CURRENCY_SYMBOL_ENUM.RUB}`\n    },\n    priceInCurrency() {\n      if (this.currency !== CURRENCY_ENUM.RUB) {\n        return `${this.price} ${CURRENCY_SYMBOL_ENUM[this.currency]}`\n      }\n      return null\n    },\n    popTipText() {\n      const currSymbol = CURRENCY_SYMBOL_ENUM[this.currency]\n      const rubSymbol = CURRENCY_SYMBOL_ENUM[CURRENCY_ENUM.RUB]\n\n      return (\n        this.$tr('shop.product.helpText') +\n        ` 1${currSymbol} = ${this.upToDateCurrency} ${rubSymbol}`\n      )\n    },\n    upToDateCurrency() {\n      const currencies = this.$store.state.shop.currencies\n      if (currencies?.length) {\n        const curr = currencies.find((c) => c.label === this.currency)\n        if (!curr) {\n          return ''\n        }\n        return curr.value\n      }\n      return ''\n    },\n  },\n}\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-price-view.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-price-view.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-shop-price-view.vue?vue&type=template&id=13b98999&\"\nimport script from \"./app-shop-price-view.vue?vue&type=script&lang=js&\"\nexport * from \"./app-shop-price-view.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"shop-ticket__basket\",class:{ 'shop-ticket__basket--active': _vm.isHighlighted }},[_c('feather',{staticClass:\"shop-ticket__icon\",attrs:{\"type\":\"shopping-bag\",\"size\":\"20\",\"stroke\":\"var(--s-black-color-80)\"}}),(_vm.isHighlighted)?_c('div',{staticClass:\"shop-ticket__basket-text d-none d-md-flex\"},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.product.inBasket'))+\" \")]):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div\n    :class=\"{ 'shop-ticket__basket--active': isHighlighted }\"\n    class=\"shop-ticket__basket\"\n  >\n    <feather\n      class=\"shop-ticket__icon\"\n      type=\"shopping-bag\"\n      size=\"20\"\n      stroke=\"var(--s-black-color-80)\"\n    />\n    <div v-if=\"isHighlighted\" class=\"shop-ticket__basket-text d-none d-md-flex\">\n      {{ $tr('shop.product.inBasket') }}\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  props: {\n    isHighlighted: { type: Boolean, required: true },\n  },\n}\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-basket-icon.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-basket-icon.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-shop-basket-icon.vue?vue&type=template&id=111af154&\"\nimport script from \"./app-shop-basket-icon.vue?vue&type=script&lang=js&\"\nexport * from \"./app-shop-basket-icon.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","<template>\n  <div class=\"shop-page__item-ticket shop-ticket s-card\">\n    <AppTextEllipsis\n      :text=\"product.name\"\n      :lines=\"2\"\n      class=\"shop-ticket__title\"\n    />\n    <AppTextEllipsis\n      :text=\"product.description\"\n      :lines=\"2\"\n      class=\"shop-ticket__description\"\n    />\n    <AppShopPriceView\n      :currency=\"product.currency\"\n      :price=\"product.price\"\n      :price-rub=\"product.priceRub\"\n    />\n    <!--    todo: возможно стоит разбить на два компонента - для билета и другого-->\n    <template v-if=\"isTicket\">\n      <div class=\"shop-ticket__btn-block\">\n        <Button\n          :disabled=\"isTicketNotAvailableToPurchase\"\n          class=\"ivu-btn-primary-light shop-ticket__btn\"\n          :type=\"isThisItemSelected ? 'error' : 'primary'\"\n          long\n          @click=\"updateTicketAmount\"\n        >\n          {{\n            isThisItemSelected ? $tr('shop.btn.delete') : $tr('shop.btn.order')\n          }}\n        </Button>\n      </div>\n    </template>\n\n    <template v-else>\n      <div v-if=\"isThisItemSelected\" class=\"shop-ticket__btn-block\">\n        <InputNumber\n          :value=\"amount\"\n          :editable=\"false\"\n          controls-outside\n          :min=\"0\"\n          :max=\"userCanBuyCount\"\n          @input=\"$emit('change-amount', $event)\"\n        ></InputNumber>\n      </div>\n\n      <div v-else class=\"shop-ticket__btn-block\">\n        <Button\n          :disabled=\"userCanBuyCount <= 0\"\n          class=\"ivu-btn-primary-light shop-ticket__btn\"\n          type=\"primary\"\n          long\n          @click=\"$emit('change-amount', 1)\"\n        >\n          {{ $tr('shop.btn.order') }}\n        </Button>\n      </div>\n    </template>\n\n    <AppShopAppBasketIcon :is-highlighted=\"isThisItemSelected\" />\n\n    <template v-if=\"isTicket\">\n      <div class=\"shop-ticket__bottom-info\">\n        <!--        todo: много условий, нужно провести рефакторинг-->\n        <template v-if=\"userCanBuyCount <= 0\">\n          <div>{{ $tr('shop.product.other.outOfStock') }}</div>\n        </template>\n        <template v-else-if=\"!isSomeTicketSelected || isThisItemSelected\">\n          <div class=\"shop-ticket__basket-info\">\n            {{ `${$tr('shop.product.inBasket')}: ${amount}` }}\n          </div>\n          <div v-if=\"maxQuantityLimited\" class=\"shop-ticket__access-info\">\n            {{\n              `${$tr('shop.product.available')}: ${userCanBuyCount - amount}`\n            }}\n          </div>\n        </template>\n        <template v-else>\n          <div>{{ $tr('shop.product.ticket.alreadySelected') }}</div>\n        </template>\n      </div>\n    </template>\n    <template v-else>\n      <div class=\"shop-ticket__bottom-info\">\n        <template v-if=\"userCanBuyCount > 0\">\n          <div class=\"shop-ticket__basket-info\">\n            {{ `${$tr('shop.product.inBasket')}: ${amount}` }}\n          </div>\n          <div v-if=\"maxQuantityLimited\" class=\"shop-ticket__access-info\">\n            {{\n              `${$tr('shop.product.available')}: ${userCanBuyCount - amount}`\n            }}\n          </div>\n        </template>\n        <template v-else>\n          <div>{{ $tr('shop.product.other.outOfStock') }}</div>\n        </template>\n      </div>\n    </template>\n  </div>\n</template>\n\n<script>\nimport AppTextEllipsis from '@/components/common/app-text-ellipsis'\nimport AppShopPriceView from '@/components/common/shop/app-shop-price-view'\nimport AppShopAppBasketIcon from '@/components/common/shop/app-shop-basket-icon'\nimport { mapState, mapGetters } from 'vuex'\nimport ShopService from '@/domain/services/shop-service'\nimport ProductService from '@/domain/services/product-service'\n\nexport default {\n  components: { AppTextEllipsis, AppShopPriceView, AppShopAppBasketIcon },\n  props: {\n    product: { type: Object, required: true },\n  },\n  computed: {\n    ...mapGetters({\n      isSomeTicketSelected: 'shop/isSomeTicketSelected',\n    }),\n    ...mapState('shop', ['productsInBasket']),\n    userCanBuyCount() {\n      return ShopService.getRemainsByProduct(this.product)\n    },\n    amount() {\n      return ShopService.getAmountItemById(\n        this.product.id,\n        this.productsInBasket,\n      )\n    },\n    isTicket() {\n      return ProductService.isTicket(this.product)\n    },\n    isThisItemSelected() {\n      return ShopService.isItemAlreadySelected(\n        this.product.id,\n        this.productsInBasket,\n      )\n    },\n    maxQuantityLimited() {\n      return this.userCanBuyCount !== Infinity\n    },\n    isTicketNotAvailableToPurchase() {\n      return (\n        (this.isSomeTicketSelected && !this.isThisItemSelected) ||\n        this.userCanBuyCount <= 0\n      )\n    },\n  },\n  methods: {\n    updateTicketAmount() {\n      if (this.isThisItemSelected) {\n        // если билет выбран - убрать, если не выбран - добавить\n        this.$emit('change-amount', 0)\n      } else {\n        this.$emit('change-amount', 1)\n      }\n    },\n  },\n}\n</script>\n\n<style scoped></style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-product-card.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-product-card.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-product-card.vue?vue&type=template&id=33ee1978&scoped=true&\"\nimport script from \"./app-product-card.vue?vue&type=script&lang=js&\"\nexport * from \"./app-product-card.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"33ee1978\",\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.productsInBasket.length)?_c('div',{staticClass:\"shop-page__orders-block orders-block\"},[_c('div',{staticClass:\"orders-block__left-block\"},[_c('div',{staticClass:\"orders-block__selected-item\"},[_c('feather',{staticClass:\"orders-block__icon\",attrs:{\"type\":\"shopping-bag\",\"size\":\"20\",\"stroke\":\"var(--s-black-color-80)\"}}),_c('div',{staticClass:\"orders-block__selected-text label-primary d-none d-lg-flex\"},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.orderBar.selected'))+\" \"+_vm._s(_vm.productsInBasket.length)+\" \"+_vm._s(_vm.$tr('shop.orderBar.product'))+\" \")]),_c('div',{staticClass:\"orders-block__selected-text label-primary d-lg-none\"},[_vm._v(\" \"+_vm._s(_vm.totalAmount)+\" \")]),_c('feather',{staticClass:\"orders-block__icon-cancel\",attrs:{\"type\":\"x\",\"size\":\"20\",\"stroke\":\"var(--s-black-color-80)\"},on:{\"click\":_vm.clearProducts}})],1),_c('div',{staticClass:\"orders-block__sum\"},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.orderBar.sum'))+\": \"),_c('div',{staticClass:\"orders-block__sum-number\"},[_vm._v(_vm._s(_vm.sum)+\" ₽\")])])]),(_vm.isShopNotAvailableByTime)?_c('Alert',{staticClass:\"orders-block__alert\",attrs:{\"type\":_vm.alertStatus,\"banner\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.alertInfo)+\" \")]):_c('Button',{staticClass:\"orders-block__btn\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.createOrder}},[_vm._v(\" \"+_vm._s(_vm.$tr('shop.btn.makeOrder'))+\" \")])],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div\n    v-if=\"productsInBasket.length\"\n    class=\"shop-page__orders-block orders-block\"\n  >\n    <div class=\"orders-block__left-block\">\n      <div class=\"orders-block__selected-item\">\n        <feather\n          class=\"orders-block__icon\"\n          type=\"shopping-bag\"\n          size=\"20\"\n          stroke=\"var(--s-black-color-80)\"\n        />\n\n        <!-- Hidden mobile start -->\n        <div class=\"orders-block__selected-text label-primary d-none d-lg-flex\">\n          {{ $tr('shop.orderBar.selected') }} {{ productsInBasket.length }}\n          {{ $tr('shop.orderBar.product') }}\n        </div>\n        <!-- Hidden mobile end -->\n\n        <!-- Only mobile start -->\n        <div class=\"orders-block__selected-text label-primary d-lg-none\">\n          {{ totalAmount }}\n        </div>\n        <!-- Only mobile end -->\n\n        <feather\n          class=\"orders-block__icon-cancel\"\n          type=\"x\"\n          size=\"20\"\n          stroke=\"var(--s-black-color-80)\"\n          @click=\"clearProducts\"\n        />\n      </div>\n      <div class=\"orders-block__sum\">\n        {{ $tr('shop.orderBar.sum') }}:\n        <div class=\"orders-block__sum-number\">{{ sum }} ₽</div>\n      </div>\n    </div>\n    <Alert\n      v-if=\"isShopNotAvailableByTime\"\n      :type=\"alertStatus\"\n      class=\"orders-block__alert\"\n      banner\n    >\n      {{ alertInfo }}\n    </Alert>\n    <Button\n      v-else\n      class=\"orders-block__btn\"\n      type=\"primary\"\n      @click=\"createOrder\"\n    >\n      {{ $tr('shop.btn.makeOrder') }}\n    </Button>\n  </div>\n</template>\n\n<script>\nimport { mapState } from 'vuex'\nimport { TIME_STATUSES } from '@/utils/constants'\nimport ShopService from '@/domain/services/shop-service'\nexport default {\n  props: {\n    shop: { type: Object, default: () => ({}) },\n  },\n  computed: {\n    ...mapState({\n      productsInBasket: (state) => state.shop.productsInBasket,\n    }),\n\n    alertInfo() {\n      if (!this.shop) {\n        return\n      }\n      return ShopService.getShopDateStatusMessage(this.$i18n.locale, this.shop)\n    },\n\n    alertStatus() {\n      if (!this.shop) {\n        return\n      }\n      if (this.shop.sellingTimeStatus === TIME_STATUSES.ENDED) {\n        return 'warning'\n      }\n      return 'success'\n    },\n    isShopNotAvailableByTime() {\n      if (!this.shop) {\n        return\n      }\n      return this.shop.sellingTimeStatus !== TIME_STATUSES.IN_PROGRESS\n    },\n\n    sum() {\n      const sum = this.productsInBasket.reduce(\n        (accumulator, currentValue) =>\n          accumulator + currentValue.product.priceRub * currentValue.amount,\n        0,\n      )\n      return +sum.toFixed(2)\n    },\n\n    totalAmount() {\n      return this.productsInBasket.reduce((acc, curr) => acc + curr.amount, 0)\n    },\n  },\n  methods: {\n    clearProducts() {\n      this.$store.commit('shop/CLEAR_BASKET')\n    },\n    createOrder() {\n      this.$emit('create-order')\n    },\n  },\n}\n</script>\n\n<style scoped></style>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-basket.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-shop-basket.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-shop-basket.vue?vue&type=template&id=8eb1a4ae&scoped=true&\"\nimport script from \"./app-shop-basket.vue?vue&type=script&lang=js&\"\nexport * from \"./app-shop-basket.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"8eb1a4ae\",\n  null\n  \n)\n\nexport default component.exports","<template>\n  <div class=\"shop-page\">\n    <AppInfoBlock\n      v-if=\"shop\"\n      :limit=\"85\"\n      :description=\"shop.description\"\n      class=\"shop-page__info\"\n    >\n      <template v-slot:alert>\n        <Alert :type=\"alertStatus\" banner>\n          {{ alertInfo }}\n        </Alert>\n      </template>\n      <template v-slot:text>\n        <AppMarkdown :text=\"shop.description\"></AppMarkdown>\n      </template>\n    </AppInfoBlock>\n    <div class=\"shop-page__tickets\">\n      <div class=\"row\">\n        <div\n          v-for=\"(item, index) in tickets\"\n          :key=\"index\"\n          class=\"col-xxl-1 col-xl-2 col-lg-3 col-md-6\"\n        >\n          <AppProductCard\n            class=\"shop-page__item-ticket\"\n            :product=\"item.product\"\n            @change-amount=\"addProductToBasket(item, $event)\"\n          />\n        </div>\n      </div>\n    </div>\n    <div class=\"shop-page__other\">\n      <h4 v-if=\"others && others.length\" class=\"shop-page__sub-title\">\n        {{ $tr('shop.products.additionally') }}\n      </h4>\n      <div class=\"row\">\n        <div\n          v-for=\"(item, index) in others\"\n          :key=\"index\"\n          class=\"col-xxl-1 col-xl-2 col-lg-3 col-md-6\"\n        >\n          <AppProductCard\n            :product=\"item.product\"\n            @change-amount=\"addProductToBasket(item, $event)\"\n          />\n        </div>\n      </div>\n    </div>\n    <AppShopBasket :shop=\"shop\" @create-order=\"createOrder\"></AppShopBasket>\n  </div>\n</template>\n<script>\n// IMPORTANT! сущность store (таблица store) на фронте используется под именем shop (чтобы не было пересечения с vuex)\nimport AppInfoBlock from '@/components/common/app-info-block'\nimport AppMarkdown from '@/components/common/app-markdown'\nimport AppProductCard from '@/components/common/app-product-card'\nimport AppShopBasket from '@/components/common/shop/app-shop-basket'\nimport { mapGetters, mapState } from 'vuex'\nimport { TIME_STATUSES } from '@/utils/constants'\nimport useShop from '@/domain/composables/shop/use-shop'\nimport ShopService from '@/domain/services/shop-service.js'\n\nexport default {\n  components: {\n    AppInfoBlock,\n    AppMarkdown,\n    AppProductCard,\n    AppShopBasket,\n  },\n  data() {\n    return {\n      test: 0,\n      tickets: null,\n      others: null,\n      shop: null,\n    }\n  },\n  computed: {\n    ...mapGetters('event', ['currentEventId']),\n    ...mapGetters('shop', ['shopId']),\n    ...mapState('shop', ['productsInBasket']),\n    alertInfo() {\n      if (!this.shop) {\n        return\n      }\n      return ShopService.getShopDateStatusMessage(this.$i18n.locale, this.shop)\n    },\n    alertStatus() {\n      if (!this.shop) {\n        return\n      }\n      if (this.shop.sellingTimeStatus === TIME_STATUSES.ENDED) {\n        return 'warning'\n      }\n      return 'success'\n    },\n  },\n  async mounted() {\n    await this.getShopData()\n  },\n  methods: {\n    addProductToBasket(orderItem, newAmount) {\n      this.$store.commit('shop/UPDATE_AMOUNT_IN_BASKET', {\n        orderItem,\n        newAmount,\n      })\n    },\n    async getShopData() {\n      const methods = [\n        this.getShop(this.shopId),\n        this.getProducts(this.shopId),\n        this.getCurrencies(),\n      ]\n      try {\n        await Promise.all(methods)\n      } catch (e) {\n        console.error(e)\n      }\n    },\n    async createOrder() {\n      const orders = this.productsInBasket.map((item) => ({\n        id: item.product.id,\n        count: item.amount,\n      }))\n      try {\n        const res = await useShop().createOrder(orders, this.shopId)\n\n        if (res.id) {\n          this.$Message.success(this.$tr('shop.alerts.successOrder'))\n\n          this.$store.commit('shop/CLEAR_BASKET')\n\n          await this.$router.push(\n            this.localePath({\n              path: `/event/${this.currentEventId}/orders/${res.id}`,\n            }),\n          )\n        }\n      } catch (e) {\n        if (e.message) {\n          this.$Message.error(e.message)\n        }\n        console.error(e)\n      }\n    },\n    async getCurrencies() {\n      const currencies = await useShop().getCurrencies()\n      this.$store.commit('shop/SET_CURRENCIES', currencies)\n    },\n    async getShop(storeId) {\n      this.shop = await useShop().getEventStore(storeId)\n    },\n    async getProducts(storeId) {\n      const { tickets, others } = await useShop().getProducts(storeId)\n\n      this.tickets = tickets?.map((ticket) => ({ product: ticket, amount: 0 }))\n\n      this.others = others?.map((other) => ({ product: other, amount: 0 }))\n    },\n  },\n}\n</script>\n\n<style lang=\"scss\">\n@import '~@/styles/pages/shop.scss';\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shop.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shop.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./shop.vue?vue&type=template&id=6cb7db2a&\"\nimport script from \"./shop.vue?vue&type=script&lang=js&\"\nexport * from \"./shop.vue?vue&type=script&lang=js&\"\nimport style0 from \"./shop.vue?vue&type=style&index=0&id=6cb7db2a&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/style-resources-loader/lib/index.js??ref--9-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shop.vue?vue&type=style&index=0&id=6cb7db2a&prod&lang=scss&\""],"sourceRoot":""}