{"version":3,"sources":["webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?4b08","webpack:///./infrastructure/presentation/views/shop/Bag.vue?7dcf","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?f451","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?7bf7","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?13cc","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?b9fa","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue","webpack:///./domain/entities/shop/order/order.ts","webpack:///./infrastructure/presentation/views/shop/Bag.vue?b3b7","webpack:///./infrastructure/presentation/views/shop/Bag.vue","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?3b30","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?86bc","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?59cd","webpack:///./infrastructure/presentation/assets/static/nothing-found.svg","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?8901","webpack:///./infrastructure/presentation/views/shop/Bag.vue?c436"],"names":["n","_hoisted_1","class","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","render","_ctx","_cache","$props","$setup","$data","$options","_component_receipt_modal","_component_router_link","_component_HoverGallery","_component_TUIViewer","_component_modal_alert","isModalOpened","bagProducts","length","to","name","default","_","shouldButtonDisabled","disabled","onClick","finishOrder","formatDecoins","amountTotal","userDoNotHaveDecoinsEnough","product","index","notStock","checkProductDecoins","checkProductIsActive","params","productID","id","gallery","imagesUrl","description","$event","seeMoreDescription","decoins","amount","quantity","decreaseProduct","stock","increaseProduct","isProductOutOfStock","checkEnough","checkQuantity","exceededStock","isActive","removeFromBag","isModalAlertOpened","type","close","user","email","option","href","receipt","formattedDate","createAt","grossValue","products","shop","receiptUrl","target","download","modalOpened","components","HoverGallery","setup","store","route","orderID","Number","getters","dispatch","value","push","message","console","error","Intl","NumberFormat","format","loadInformation","__exports__","modalAlertOpened","NaN","Array","this","TUIViewer","ModalAlert","ReceiptModal","Receipt","bagProductsUpdated","hasUnavailableProduct","hasUserDecoins","quantityOfStock","bagProductQuantity","hasProductStock","success","total","forEach","item","totalQuantityOfProducts","totalOfProducts","balance","dcoins","updateBagProducts","showSeeMoreButton","order","code","bagProduct","quantityProduct","decoinsProduct","userDecoins","buttonReadMore","document","querySelector","innerText","classList","remove","add","offsetHeight","style","display","alt","onMouseover","isHover","onMouseout","src","renderImage","__default__","props","required","colorBorder","String","renderIndex","nextImage","url","intervalId","setInterval","clearInterval","immediate","__setup__","ctx","module","exports"],"mappings":"kHAAA,W,kHCEM,EAAe,SAAAA,GAAC,OAAK,eAAa,mBAAmBA,EAAEA,IAAI,iBAAcA,GACzEC,EAAa,CACjBC,MAAO,OACP,YAAa,IAETC,EAAa,CACjBC,IAAK,EACLF,MAAO,OAEHG,EAAa,CAAEH,MAAO,YACtBI,EAA0B,eAAiB,iBAC3CC,EAA2B,GAAa,kBAAmB,eAAoB,OAAQ,KAAM,KAAM,MACnGC,EAA2B,GAAa,kBAAmB,eAAoB,OAAQ,KAAM,gBAAiB,MAC9GC,EAAa,CAAEP,MAAO,eACtBQ,EAAa,CAAER,MAAO,cACtBS,EAA2B,GAAa,kBAAmB,eAAoB,KAAM,KAAM,uBAAwB,MACnHC,EAAc,CAAC,YACfC,EAAc,CAAEX,MAAO,eACvBY,EAA2B,eAAiB,YAC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,kCCAA,W","file":"js/chunk-34ba4e53.c9c07283.js","sourcesContent":["export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Receipt.vue?vue&type=style&index=0&id=ffd5031c&scoped=true&lang=css\"","import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7392688c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n class: \"view\",\n \"data-view\": \"\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"bag\"\n}\nconst _hoisted_3 = { class: \"bag__nav\" }\nconst _hoisted_4 = /*#__PURE__*/_createTextVNode(\" decola shop \")\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"/\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"meu carrinho\", -1))\nconst _hoisted_7 = { class: \"bag__header\" }\nconst _hoisted_8 = { class: \"bag__title\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"carrinho de compras\", -1))\nconst _hoisted_10 = [\"disabled\"]\nconst _hoisted_11 = { class: \"bag__amount\" }\nconst _hoisted_12 = /*#__PURE__*/_createTextVNode(\" Total: \")\nconst _hoisted_13 = {\n key: 0,\n class: \"bag__validation\"\n}\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", { class: \"line\" }, null, -1))\nconst _hoisted_15 = { class: \"bag__container\" }\nconst _hoisted_16 = { class: \"img-limiter\" }\nconst _hoisted_17 = { class: \"bag__information\" }\nconst _hoisted_18 = [\"data-description\"]\nconst _hoisted_19 = [\"data-see-more\", \"onClick\"]\nconst _hoisted_20 = { class: \"bag__total\" }\nconst _hoisted_21 = /*#__PURE__*/_createTextVNode(\"Preço unit: \")\nconst _hoisted_22 = { class: \"decoins\" }\nconst _hoisted_23 = /*#__PURE__*/_createTextVNode(\"Preço total: \")\nconst _hoisted_24 = { class: \"decoins\" }\nconst _hoisted_25 = { class: \"bag__buttons\" }\nconst _hoisted_26 = [\"onClick\", \"disabled\"]\nconst _hoisted_27 = [\"onClick\", \"disabled\"]\nconst _hoisted_28 = {\n key: 0,\n class: \"bag__validation\"\n}\nconst _hoisted_29 = {\n key: 1,\n class: \"bag__validation\"\n}\nconst _hoisted_30 = {\n key: 2,\n class: \"bag__validation\"\n}\nconst _hoisted_31 = {\n key: 3,\n class: \"bag__validation\"\n}\nconst _hoisted_32 = {\n key: 0,\n class: \"bag__validation\"\n}\nconst _hoisted_33 = [\"onClick\"]\nconst _hoisted_34 = {\n key: 2,\n class: \"bag__empty\"\n}\nconst _hoisted_35 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"bag__title-span\" }, \"Seu carrinho está vazio no momento.\", -1))\nconst _hoisted_36 = /*#__PURE__*/_createTextVNode(\" voltar à loja \")\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_receipt_modal = _resolveComponent(\"receipt-modal\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_HoverGallery = _resolveComponent(\"HoverGallery\")!\n const _component_TUIViewer = _resolveComponent(\"TUIViewer\")!\n const _component_modal_alert = _resolveComponent(\"modal-alert\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.isModalOpened)\n ? (_openBlock(), _createBlock(_component_receipt_modal, { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.bagProducts?.length)\n ? (_openBlock(), _createElementBlock(\"section\", _hoisted_2, [\n _createElementVNode(\"nav\", _hoisted_3, [\n _createVNode(_component_router_link, {\n to: { name: 'shop' },\n class: \"bag__link\"\n }, {\n default: _withCtx(() => [\n _hoisted_4\n ]),\n _: 1\n }),\n _hoisted_5,\n _hoisted_6\n ]),\n _createElementVNode(\"header\", _hoisted_7, [\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: _normalizeClass([\r\n 'bag__button__finish',\r\n _ctx.shouldButtonDisabled ? 'blocked' : '',\r\n ]),\n disabled: _ctx.shouldButtonDisabled,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.finishOrder && _ctx.finishOrder(...args)))\n }, \" finalizar compra \", 10, _hoisted_10)\n ]),\n _createElementVNode(\"p\", _hoisted_11, [\n _hoisted_12,\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.formatDecoins(_ctx.amountTotal)), 1)\n ]),\n (_ctx.userDoNotHaveDecoinsEnough())\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, \"Valor total ultrapassou seus decoins. Não é possível finalizar a compra!\"))\n : _createCommentVNode(\"\", true),\n _hoisted_14\n ]),\n _createElementVNode(\"ul\", _hoisted_15, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.bagProducts, (product, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: index,\n class: \"bag__product\"\n }, [\n _createVNode(_component_router_link, {\n class: _normalizeClass([\r\n 'bag__detail',\r\n _ctx.notStock(product) ||\r\n _ctx.checkProductDecoins(product) ||\r\n _ctx.checkProductIsActive(product)\r\n ? 'disabled'\r\n : '',\r\n ]),\n to: { name: 'product_detail', params: { productID: product.id } }\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_HoverGallery, {\n gallery: product.imagesUrl\n }, null, 8, [\"gallery\"])\n ]),\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"h2\", null, _toDisplayString(product.name), 1),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"p\", { \"data-description\": index }, [\n _createVNode(_component_TUIViewer, {\n \"model-value\": product.description\n }, null, 8, [\"model-value\"])\n ], 8, _hoisted_18),\n _createElementVNode(\"button\", {\n \"data-see-more\": index,\n class: \"products__see-more\",\n onClick: _withModifiers(($event: any) => (_ctx.seeMoreDescription(index)), [\"stop\",\"prevent\"])\n }, \" ver mais \", 8, _hoisted_19)\n ]),\n _createElementVNode(\"span\", _hoisted_20, [\n _createElementVNode(\"span\", null, [\n _hoisted_21,\n _createElementVNode(\"span\", _hoisted_22, _toDisplayString(_ctx.formatDecoins(product.decoins)), 1)\n ]),\n _createElementVNode(\"span\", null, [\n _hoisted_23,\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.amount(product.decoins, product.quantity)), 1)\n ])\n ]),\n _createElementVNode(\"span\", {\n class: _normalizeClass([\r\n _ctx.notStock(product)\r\n ? 'bag__span-not-stock'\r\n : 'bag__span-in-stock',\r\n ])\n }, _toDisplayString(_ctx.notStock(product) ? \"Sem estoque\" : \"Em estoque\"), 3)\n ])\n ]),\n _: 2\n }, 1032, [\"class\", \"to\"]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\r\n 'bag__content',\r\n _ctx.checkProductIsActive(product) ? 'disabled' : '',\r\n ])\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\r\n 'bag__add-button__remove-button',\r\n _ctx.notStock(product) ? 'disabled' : '',\r\n ])\n }, [\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.decreaseProduct(product)),\n disabled: \r\n _ctx.disabled(product.quantity) || _ctx.checkProductIsActive(product)\r\n \n }, \" - \", 8, _hoisted_26),\n _createElementVNode(\"span\", null, _toDisplayString(product.quantity) + \" / \" + _toDisplayString(product.stock), 1),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.increaseProduct(product)),\n disabled: \r\n _ctx.isProductOutOfStock(product) ||\r\n _ctx.checkEnough(product) ||\r\n _ctx.checkQuantity(product) ||\r\n _ctx.checkProductIsActive(product)\r\n \n }, \" + \", 8, _hoisted_27)\n ], 2),\n (_ctx.exceededStock(product))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_28, \"estoque máximo atingido!\"))\n : _createCommentVNode(\"\", true),\n (_ctx.notStock(product))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_29, \"produto sem estoque, remova-o do carrinho!\"))\n : _createCommentVNode(\"\", true),\n (\r\n _ctx.checkProductDecoins(product) &&\r\n !_ctx.checkQuantity(product) &&\r\n !_ctx.checkProductIsActive(product)\r\n )\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_30, \" valor do produto modificado, você não possui decoins para finalizar a compra. Remova este produto! \"))\n : _createCommentVNode(\"\", true),\n (_ctx.checkQuantity(product))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_31, \" preço total do produto ultrapassou seu saldo, diminua a quantidade! \"))\n : _createCommentVNode(\"\", true)\n ], 2),\n (product.isActive === false)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_32, \" Produto indisponível! \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.removeFromBag(product)),\n class: \"bag__remove-button\"\n }, \" Remover \", 8, _hoisted_33)\n ])\n ]))\n }), 128))\n ]),\n (_ctx.isModalAlertOpened)\n ? (_openBlock(), _createBlock(_component_modal_alert, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_34, [\n _hoisted_35,\n _createVNode(_component_router_link, {\n to: { name: 'shop' },\n class: \"bag__button-span\"\n }, {\n default: _withCtx(() => [\n _hoisted_36\n ]),\n _: 1\n })\n ]))\n ]))\n}","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, vShow as _vShow, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-ffd5031c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"modal\" }\nconst _hoisted_2 = { class: \"modal__container\" }\nconst _hoisted_3 = { class: \"modal__header\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Comprovante do pedido\", -1))\nconst _hoisted_5 = { class: \"modal__information\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h3\", { class: \"modal__title\" }, \"Pedido finalizado com sucesso!\", -1))\nconst _hoisted_7 = { class: \"modal__subTitle\" }\nconst _hoisted_8 = { key: 0 }\nconst _hoisted_9 = /*#__PURE__*/_createTextVNode(\" Enviamos para seu email \")\nconst _hoisted_10 = /*#__PURE__*/_createTextVNode(\" mais detalhes do seu pedido. \")\nconst _hoisted_11 = /*#__PURE__*/_createTextVNode(\" Você também pode acompanhar seu pedido \")\nconst _hoisted_12 = /*#__PURE__*/_createTextVNode(\" clicando aqui. \")\nconst _hoisted_13 = /*#__PURE__*/_createTextVNode(\" Em caso de dúvida, você pode enviar um e-mail para \")\nconst _hoisted_14 = [\"href\"]\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \" Lembre-se, o que tem maior valor é o seu aprendizado! \", -1))\nconst _hoisted_16 = { class: \"modal__receipt\" }\nconst _hoisted_17 = { class: \"modal__order\" }\nconst _hoisted_18 = { class: \"modal__total\" }\nconst _hoisted_19 = { class: \"modal__texts\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h5\", null, \"Total de produtos:\", -1))\nconst _hoisted_21 = { class: \"modal__texts\" }\nconst _hoisted_22 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h5\", null, \"Valor total:\", -1))\nconst _hoisted_23 = { class: \"modal__products\" }\nconst _hoisted_24 = { class: \"image_limiter\" }\nconst _hoisted_25 = { class: \"modal__text-product\" }\nconst _hoisted_26 = { class: \"modal__title-product\" }\nconst _hoisted_27 = { class: \"modal__title-product\" }\nconst _hoisted_28 = { class: \"modal__values\" }\nconst _hoisted_29 = { class: \"modal__footer\" }\nconst _hoisted_30 = [\"href\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_HoverGallery = _resolveComponent(\"HoverGallery\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"header\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"button\", {\n type: \"button\",\n class: \"modal__button-close\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => ($setup.close()))\n })\n ]),\n _createElementVNode(\"section\", _hoisted_5, [\n _hoisted_6,\n _createElementVNode(\"div\", _hoisted_7, [\n ($setup.user.email)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"span\", null, _toDisplayString($setup.user.email), 1),\n _hoisted_10\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"p\", null, [\n _hoisted_11,\n _createVNode(_component_router_link, { to: { name: 'profile', params: { option: 'history-order' } } }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }),\n _hoisted_13,\n _createElementVNode(\"a\", {\n href: `malito:` + $setup.email\n }, _toDisplayString($setup.email) + \".\", 9, _hoisted_14)\n ]),\n _hoisted_15\n ]),\n _createElementVNode(\"section\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"h5\", null, \"Pedido #\" + _toDisplayString($setup.receipt.id), 1),\n _createElementVNode(\"h5\", null, \"Data: \" + _toDisplayString($setup.formattedDate($setup.receipt.createAt)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", _hoisted_19, [\n _hoisted_20,\n _createElementVNode(\"h5\", null, _toDisplayString($setup.receipt.quantity), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_21, [\n _hoisted_22,\n _createElementVNode(\"h5\", null, _toDisplayString($setup.receipt.grossValue) + \" decoins\", 1)\n ])\n ])\n ]),\n _createElementVNode(\"section\", _hoisted_23, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.receipt.products, (product, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"modal__cards\",\n key: index\n }, [\n _createElementVNode(\"div\", _hoisted_24, [\n _createVNode(_component_HoverGallery, {\n gallery: product.imagesUrl\n }, null, 8, [\"gallery\"])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"h5\", null, _toDisplayString(product.name), 1),\n _createElementVNode(\"span\", null, _toDisplayString(product.shop.name), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_27, [\n _createElementVNode(\"h5\", null, \"Qtde: \" + _toDisplayString(product.quantity), 1),\n _createElementVNode(\"div\", _hoisted_28, [\n _createElementVNode(\"h5\", null, \"Valor unit. \" + _toDisplayString(product.decoins) + \" decoins\", 1),\n _createElementVNode(\"h5\", null, \"Valor total \" + _toDisplayString($setup.amount(product)) + \" decoins\", 1)\n ])\n ])\n ])\n ]))\n }), 128))\n ])\n ]),\n _createElementVNode(\"footer\", _hoisted_29, [\n _createElementVNode(\"a\", {\n class: \"modal__button-receipt\",\n href: $setup.receipt.receiptUrl,\n target: \"_blank\",\n download: \"\"\n }, \" Baixar comprovante \", 8, _hoisted_30)\n ])\n ])\n ], 512)), [\n [_vShow, $setup.modalOpened]\n ])\n}","\r\nimport { ComputedRef, onMounted, Ref, ref } from \"vue\";\r\nimport router from \"../../../../../src/routes\";\r\nimport { computed } from \"@vue/reactivity\";\r\nimport { useStore } from \"vuex\";\r\nimport { User } from \"../../../../../domain/entities/entities\";\r\nimport { useRoute } from \"vue-router\";\r\nimport { dispatchErrorBox, formattedDate } from \"../../mixins\";\r\nimport { Receipt } from \"../../../../../domain/entities/shop/order/receipt\";\r\nimport { Product } from \"../../../../../domain/entities/shop/product/product\";\r\nimport { RepositoryException } from \"../../../../../domain/exceptions/exceptions\";\r\nimport HoverGallery from \"./HoverGallery.vue\";\r\n\r\nexport default {\r\n name: \"receiptModal\",\r\n components: { HoverGallery },\r\n\r\n setup() {\r\n const store = useStore();\r\n const route = useRoute();\r\n\r\n /** Variable get the order id by route.*/\r\n const orderID = Number(route.params.orderID);\r\n\r\n /** Variable that controls the opening and closing of the modal. */\r\n const modalOpened: Ref = ref(true);\r\n\r\n /** Getter containing the receipt data. */\r\n const receipt: ComputedRef = computed(() => {\r\n return store.getters[\"shop_module/currentReceipt\"];\r\n });\r\n\r\n /** Variable to get the user data. */\r\n const user: ComputedRef = computed(() => {\r\n return store.getters[\"userProfile_module/user\"];\r\n });\r\n\r\n const email: Ref = ref(\"\");\r\n\r\n onMounted(async () => {\r\n try {\r\n await loadInformation();\r\n await store.dispatch(\"shop_module/getReceipt\", orderID);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n });\r\n\r\n /** Function triggered when the modal closes.\r\n * When the modal is closed, all products are removed from the cart and the order id is removed from the route. */\r\n async function close(): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/removeAllProductsFromBag\");\r\n modalOpened.value = !modalOpened.value;\r\n if (modalOpened.value === false) {\r\n await router.push({\r\n name: \"shop\"\r\n });\r\n }\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for formatting the decoins to Brazilian currency. */\r\n function formatDecoins(decoins: number) {\r\n return Intl.NumberFormat(\"pt-br\").format(decoins);\r\n }\r\n\r\n /** Function that returns the product value according to the amount of products added.*/\r\n function amount(product: Product): string {\r\n const amount = product.decoins * product.quantity;\r\n return formatDecoins(amount);\r\n }\r\n\r\n const loadInformation = (): void => {\r\n switch (process.env.VUE_APP_THEME) {\r\n case \"circulo\":\r\n email.value = \"sac.circulo@circulo.com.br\";\r\n break;\r\n case \"construcolor\":\r\n email.value = \"midia@construcolor.com.br\";\r\n break;\r\n default:\r\n email.value = \"decola@lince.com.br\";\r\n }\r\n };\r\n return {\r\n modalOpened,\r\n receipt,\r\n user,\r\n email,\r\n close,\r\n formattedDate,\r\n amount\r\n };\r\n }\r\n};\r\n","import { render } from \"./Receipt.vue?vue&type=template&id=ffd5031c&scoped=true&ts=true\"\nimport script from \"./Receipt.vue?vue&type=script&lang=ts\"\nexport * from \"./Receipt.vue?vue&type=script&lang=ts\"\n\nimport \"./Receipt.vue?vue&type=style&index=0&id=ffd5031c&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-ffd5031c\"]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-29185dc3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"modal__backdrop\" }\nconst _hoisted_2 = { class: \"modal__information\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h1\", null, \"Compra finalizada com sucesso!\", -1))\nconst _hoisted_4 = /*#__PURE__*/_createTextVNode(\" Você pode acompanhar seu pedido \")\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\"aqui.\")\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"button\", {\n type: \"button\",\n class: \"modal__button\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.close()))\n }),\n _hoisted_3,\n _createElementVNode(\"p\", null, [\n _hoisted_4,\n _createVNode(_component_router_link, {\n to: { name: 'profile'},\n class: \"modal__link\"\n }, {\n default: _withCtx(() => [\n _hoisted_5\n ]),\n _: 1\n })\n ])\n ])\n ], 512)), [\n [_vShow, _ctx.modalAlertOpened]\n ])\n}","\r\nimport {defineComponent, Ref, ref} from \"vue\";\r\nimport {useStore} from \"vuex\";\r\nimport {dispatchErrorBox} from \"../../mixins\";\r\nimport {RepositoryException} from \"../../../../../domain/exceptions/exceptions\";\r\n\r\nexport default defineComponent({\r\n name: \"modalAlert\",\r\n\r\n setup() {\r\n const store = useStore();\r\n\r\n /** Variable that controls the opening and closing of the modal. */\r\n const modalAlertOpened: Ref = ref(true);\r\n\r\n /** Function triggered when the modal closes.\r\n * When the modal is closed, all products are removed from the cart and the order id is removed from the route. */\r\n async function close() {\r\n try {\r\n await store.dispatch(\"shop_module/removeAllProductsFromBag\");\r\n modalAlertOpened.value = !modalAlertOpened.value;\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n return {\r\n modalAlertOpened,\r\n close\r\n };\r\n }\r\n});\r\n","import { render } from \"./ModalAlert.vue?vue&type=template&id=29185dc3&scoped=true&ts=true\"\nimport script from \"./ModalAlert.vue?vue&type=script&lang=ts\"\nexport * from \"./ModalAlert.vue?vue&type=script&lang=ts\"\n\nimport \"./ModalAlert.vue?vue&type=style&index=0&id=29185dc3&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-29185dc3\"]])\n\nexport default __exports__","/** Class used to finalize orders referring to shop. */\r\n\r\nimport {Product} from \"../product/product\";\r\n\r\nexport class Order{\r\n\r\n /** Total amount of products added. */\r\n public quantity: number;\r\n\r\n /** Total order amount. */\r\n public grossValue: number;\r\n\r\n /** List of purchased products. */\r\n public products: Array;\r\n\r\n public id: number;\r\n\r\n constructor(\r\n quantity = NaN,\r\n grossValue = NaN,\r\n products = new Array(),\r\n id = NaN,\r\n ) {\r\n this.quantity = quantity;\r\n this.grossValue = grossValue;\r\n this.products = products;\r\n this.id = id;\r\n }\r\n}\r\n","\r\nimport {\r\n computed,\r\n ComputedRef,\r\n defineComponent,\r\n onBeforeMount,\r\n Ref,\r\n ref,\r\n} from \"vue\";\r\nimport { useStore } from \"vuex\";\r\nimport router from \"../../../../src/routes\";\r\nimport ReceiptModal from \"../../components/application/shop/Receipt.vue\";\r\nimport { useRoute } from \"vue-router\";\r\nimport ModalAlert from \"../../components/application/shop/ModalAlert.vue\";\r\nimport { Product } from \"../../../../domain/entities/shop/product/product\";\r\nimport { Receipt } from \"../../../../domain/entities/shop/order/receipt\";\r\nimport { Order } from \"../../../../domain/entities/shop/order/order\";\r\nimport { User } from \"../../../../domain/entities/entities\";\r\nimport { dispatchErrorBox } from \"../../components/mixins\";\r\nimport { RepositoryException } from \"../../../../domain/exceptions/exceptions\";\r\nimport { wrapLoading } from \"../../utils/wrap_loading\";\r\nimport TUIViewer from \"../../components/application/TUIViewer.vue\";\r\nimport HoverGallery from \"../../components/application/shop/HoverGallery.vue\";\r\n\r\nexport default defineComponent({\r\n components: { HoverGallery, TUIViewer, ModalAlert, ReceiptModal },\r\n setup: function() {\r\n const store = useStore();\r\n const route = useRoute();\r\n\r\n /** Variable used to open or close the checkout modal. */\r\n const isModalOpened: Ref = ref(false);\r\n\r\n /** Variable used to open or close the modal when there is no receipt. */\r\n const isModalAlertOpened: Ref = ref(false);\r\n\r\n /** Variable used to receive products from the updated bag. */\r\n const bagProductsUpdated: Ref> = ref([]);\r\n\r\n /** Tells to the bag has unavailable product */\r\n const hasUnavailableProduct: Ref = ref(false);\r\n\r\n /** Checks if the user has enough decoins to buy the product in the bag. */\r\n const hasUserDecoins: Ref = ref(false);\r\n\r\n /** Variable used to check the amount of product stock.*/\r\n const quantityOfStock: Ref = ref(1);\r\n\r\n /** Number of products added to the bag. */\r\n const bagProductQuantity: Ref = ref(1);\r\n\r\n /** Checks if the product is in stock. */\r\n const hasProductStock: Ref = ref(false);\r\n\r\n /** Computed from the products in the bag.\r\n * @see Product */\r\n const bagProducts: ComputedRef> = computed(() => {\r\n return store.getters[\"shop_module/productsInBag\"];\r\n });\r\n\r\n /** Computed of the modal of actions that were performed successfully.*/\r\n const success = computed(() => {\r\n return store.getters[\"miscellany_module/success\"];\r\n });\r\n\r\n /** Computed from receipt returned at checkout.\r\n * @see Receipt */\r\n const receipt: ComputedRef = computed(() => {\r\n return store.getters[\"shop_module/receiptOrder\"];\r\n });\r\n\r\n /** Computed that sums the values of the products added to the bag. */\r\n const amountTotal: ComputedRef = computed(() => {\r\n const bagProducts = store.getters[\"shop_module/productsInBag\"];\r\n\r\n let total = 0;\r\n\r\n bagProducts.forEach((item) => {\r\n total += item.decoins * item.quantity;\r\n });\r\n\r\n return total;\r\n });\r\n\r\n /** Variable that receives the total sum of products in the bag. */\r\n const totalQuantityOfProducts: ComputedRef = computed(() => {\r\n let totalOfProducts = 0;\r\n\r\n bagProducts.value.forEach((item) => {\r\n totalOfProducts += item.quantity;\r\n });\r\n\r\n return totalOfProducts;\r\n });\r\n\r\n /** List of registered products coming from the request. */\r\n const products: ComputedRef> = computed(() => {\r\n return store.getters[\"shop_module/products\"];\r\n });\r\n\r\n /** Getter of the decoins with the subtraction of the values of the products added in the bag. */\r\n const balance: ComputedRef = computed(() => {\r\n return store.getters[\"shop_module/balance\"];\r\n });\r\n\r\n /** User information getter. */\r\n const user: ComputedRef = computed(() => {\r\n return store.getters[\"userProfile_module/user\"];\r\n });\r\n\r\n onBeforeMount(async () => {\r\n try {\r\n await store.dispatch(\"shop_module/products\");\r\n await store.dispatch(\"userProfile_module/loadUser\");\r\n await store.dispatch(\"shop_module/loadBagProducts\");\r\n await store.dispatch(\r\n \"shop_module/setDecoinsInWallet\",\r\n user.value.dcoins\r\n );\r\n await updateBagProducts();\r\n if (route.params.orderID) {\r\n isModalOpened.value = !isModalOpened.value;\r\n }\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n\r\n showSeeMoreButton();\r\n });\r\n\r\n /** Function that returns the product value according to the amount of products added.\r\n * @param decoins product value.\r\n * @param quantity quantity of products added. */\r\n function amount(decoins: number, quantity: number): string {\r\n const amount = decoins * quantity;\r\n return formatDecoins(amount);\r\n }\r\n\r\n /** Function responsible for disabling the button to decrease the amount of product, when the amount is less than or equal to 1.\r\n * @param quantity quantity of products added. */\r\n const disabled = (quantity: number): boolean => {\r\n return quantity <= 1;\r\n };\r\n\r\n /** Function responsible for disabling the add more products button when the quantity added is equal to the current stock or\r\n * when the quantity is greater than the stock.\r\n * @param product parameter that takes an object of type Product. */\r\n const isProductOutOfStock = (product: Product): boolean => {\r\n return (\r\n product.quantity === product.stock || product.quantity > product.stock\r\n );\r\n };\r\n\r\n /** Function responsible for checking if the product is still in stock.\r\n * @param product parameter that takes an object of type Product.*/\r\n const notStock = (product: Product): boolean => {\r\n return product.stock === 0;\r\n };\r\n\r\n /** Function responsible for validating if the amount of products added exceeds the current stock value.\r\n * @param product parameter that takes an object of type Product.*/\r\n const exceededStock = (product: Product): boolean => {\r\n return product.quantity > product.stock && product.stock !== 0;\r\n };\r\n\r\n /** Function responsible for removing the product from the bag.\r\n * @param product product to be removed.\r\n * @see Product */\r\n async function removeFromBag(product: Product): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/removeFromBag\", product);\r\n await updateBagProducts();\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for finalizing the user's purchase.\r\n * At the end of the purchase, the modal with the order details is opened. */\r\n async function finishOrder(): Promise {\r\n const order: Order = new Order(\r\n totalQuantityOfProducts.value,\r\n amountTotal.value,\r\n bagProducts.value\r\n );\r\n\r\n try {\r\n if (userDoNotHaveDecoinsEnough()) {\r\n return;\r\n } else {\r\n await wrapLoading(async () => {\r\n await store.dispatch(\"shop_module/order\", order);\r\n await store.dispatch(\"userProfile_module/loadUser\");\r\n });\r\n\r\n await router.push({\r\n name: \"bag\",\r\n params: { orderID: receipt.value.id },\r\n });\r\n\r\n await store.dispatch(\"shop_module/removeAllProductsFromBag\");\r\n isModalOpened.value = !isModalOpened.value;\r\n }\r\n } catch (e) {\r\n if (\r\n e instanceof RepositoryException &&\r\n e.code === \"ERROR_ON_CREATE_RECEIPT\"\r\n ) {\r\n console.error(e.message);\r\n isModalAlertOpened.value = !isModalAlertOpened.value;\r\n } else if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for increasing the amount of products in the bag. */\r\n async function increaseProduct(product: Product): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/increaseProduct\", product);\r\n product.quantity++;\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for decreasing the amount of products in the bag. */\r\n async function decreaseProduct(product: Product): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/decreaseProduct\", product);\r\n hasProductStock.value = false;\r\n product.quantity--;\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for updating the products that were added to the bag. */\r\n async function updateBagProducts() {\r\n for (let bagProduct of bagProducts.value) {\r\n let product = new Product();\r\n\r\n try {\r\n product = await store.dispatch(\r\n \"shop_module/getProduct\",\r\n bagProduct.id\r\n );\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado\");\r\n }\r\n }\r\n\r\n try {\r\n await store.dispatch(\"shop_module/removeFromBag\", bagProduct);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado\");\r\n }\r\n }\r\n\r\n if (!product || product.isActive === false) {\r\n bagProduct.isActive = false;\r\n hasUnavailableProduct.value = true;\r\n\r\n try {\r\n await store.dispatch(\"shop_module/addToBag\", bagProduct);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado\");\r\n }\r\n }\r\n\r\n return;\r\n } else {\r\n hasUnavailableProduct.value = false;\r\n }\r\n\r\n const quantityProduct: boolean = checkQuantity(product);\r\n const decoinsProduct: boolean = checkProductDecoins(product);\r\n\r\n hasUserDecoins.value = quantityProduct || decoinsProduct;\r\n\r\n product.quantity = bagProduct.quantity;\r\n if (\r\n product.stock === 0 ||\r\n (product.quantity > product.stock && product.stock !== 0)\r\n ) {\r\n hasProductStock.value = true;\r\n } else {\r\n hasProductStock.value = false;\r\n }\r\n\r\n try {\r\n await store.dispatch(\"shop_module/addToBag\", product);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Function used to control whether for each product added to the bag it is still possible for the user to add\r\n * the other products that are available\r\n * @param product product to do validation. */\r\n function checkEnough(product: Product) {\r\n if (product.quantity >= product.stock) {\r\n return false;\r\n }\r\n if (product.decoins > user.value.dcoins && product.quantity === 1) {\r\n return true;\r\n }\r\n return balance.value < product.decoins;\r\n }\r\n\r\n /** Function responsible for checking if the value of the product is greater than the amount of user decoins.\r\n * @param product product to do validation. */\r\n function checkProductDecoins(product: Product): boolean {\r\n return product.decoins > user.value.dcoins;\r\n }\r\n\r\n /** Function used to validate if the amount of added products exceeds the user's decoins.\r\n * @param product product to do validation. */\r\n function checkQuantity(product: Product): boolean {\r\n if (product.quantity > 1 && product.decoins <= user.value.dcoins) {\r\n if (product.quantity * product.decoins > user.value.dcoins) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /** Function responsible for checking if the checkout button should be disabled. */\r\n const shouldButtonDisabled = computed(() => {\r\n const userDecoins = userDoNotHaveDecoinsEnough();\r\n\r\n if (hasUnavailableProduct.value) {\r\n return true;\r\n }\r\n\r\n if (hasProductStock.value) {\r\n return true;\r\n }\r\n\r\n if (hasUserDecoins.value) {\r\n return true;\r\n }\r\n\r\n if (userDecoins) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n /** Function responsible for checking if the purchase total is greater than the user's decoins. */\r\n function userDoNotHaveDecoinsEnough(): boolean {\r\n return amountTotal.value > user.value.dcoins;\r\n }\r\n\r\n /** Function responsible for formatting the decoins to Brazilian currency. */\r\n function formatDecoins(decoins: number) {\r\n return Intl.NumberFormat(\"pt-br\").format(decoins);\r\n }\r\n\r\n /** Function responsible for checking if the product was removed from the shop. */\r\n function checkProductIsActive(product: Product): boolean {\r\n return product.isActive === false;\r\n }\r\n\r\n /** Function to toggle the description visibility between \"see more\" and \"see less\" */\r\n function seeMoreDescription(index: number): void {\r\n const buttonReadMore = document.querySelector(\r\n `[data-see-more=\"${index}\"]`\r\n ) as HTMLButtonElement;\r\n const description = document.querySelector(\r\n `[data-description=\"${index}\"]`\r\n ) as HTMLParagraphElement;\r\n\r\n if (buttonReadMore && description) {\r\n if (buttonReadMore.innerText === \"ver mais\") {\r\n buttonReadMore.innerText = \"ver menos\";\r\n description.classList.remove(\"dots\");\r\n } else {\r\n buttonReadMore.innerText = \"ver mais\";\r\n description.classList.add(\"dots\");\r\n }\r\n }\r\n }\r\n\r\n /** Function to display the \"see more\" button if the description is too long */\r\n function showSeeMoreButton(): void {\r\n if (!products.value) return;\r\n products.value.forEach((product: Product, index: number) => {\r\n const buttonReadMore = document.querySelector(\r\n `[data-see-more=\"${index}\"]`\r\n ) as HTMLButtonElement;\r\n const description = document.querySelector(\r\n `[data-description=\"${index}\"]`\r\n ) as HTMLParagraphElement;\r\n\r\n if (description.offsetHeight > 100) {\r\n buttonReadMore.style.display = \"flex\";\r\n description.classList.add(\"dots\");\r\n } else buttonReadMore.style.display = \"none\";\r\n });\r\n }\r\n\r\n return {\r\n bagProducts,\r\n success,\r\n quantityOfStock,\r\n isModalOpened,\r\n isModalAlertOpened,\r\n amountTotal,\r\n products,\r\n bagProductsUpdated,\r\n bagProductQuantity,\r\n balance,\r\n shouldButtonDisabled,\r\n amount,\r\n disabled,\r\n removeFromBag,\r\n finishOrder,\r\n isProductOutOfStock,\r\n increaseProduct,\r\n decreaseProduct,\r\n exceededStock,\r\n notStock,\r\n checkEnough,\r\n checkProductDecoins,\r\n checkQuantity,\r\n userDoNotHaveDecoinsEnough,\r\n formatDecoins,\r\n checkProductIsActive,\r\n seeMoreDescription,\r\n showSeeMoreButton,\r\n };\r\n },\r\n});\r\n","import { render } from \"./Bag.vue?vue&type=template&id=7392688c&scoped=true&ts=true\"\nimport script from \"./Bag.vue?vue&type=script&lang=ts\"\nexport * from \"./Bag.vue?vue&type=script&lang=ts\"\n\nimport \"./Bag.vue?vue&type=style&index=0&id=7392688c&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-7392688c\"]])\n\nexport default __exports__","import { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-da81f2f4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"img\", {\n alt: \"Foto do produto\",\n class: \"image\",\n onMouseover: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHover = true)),\n onMouseout: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHover = false)),\n src: _ctx.renderImage\n }, null, 40, _hoisted_1))\n}","\r\nimport {\r\n computed,\r\n defineComponent,\r\n onMounted,\r\n PropType,\r\n ref,\r\n watch\r\n} from \"vue\";\r\nimport { imagesUrl } from \"../../../../../domain/entities/shop/product/product\";\r\n\r\nconst __default__ = defineComponent({\r\n name: \"HoverGallery\",\r\n props: {\r\n gallery: {\r\n type: Array as PropType,\r\n required: true\r\n },\r\n colorBorder: {\r\n type: String,\r\n default: \"#c4c4c4\"\r\n }\r\n },\r\n setup(props) {\r\n const isHover = ref(false);\r\n const gallery = computed(() => props.gallery);\r\n const renderImage = ref(\"\");\r\n const renderIndex = ref(0);\r\n\r\n onMounted(() => {\r\n if (!gallery.value || !gallery.value[0])\r\n return (renderImage.value = require(\"../../../assets/static/nothing-found.svg\"));\r\n\r\n renderImage.value = gallery.value[0].url;\r\n });\r\n\r\n function nextImage() {\r\n renderIndex.value = renderIndex.value + 1;\r\n\r\n if (gallery?.value[renderIndex.value]?.url)\r\n return (renderImage.value = gallery.value[renderIndex.value].url);\r\n\r\n renderIndex.value = -1;\r\n }\r\n\r\n const intervalId = ref();\r\n watch(\r\n () => isHover.value,\r\n isHover => {\r\n if (isHover) return (intervalId.value = setInterval(nextImage, 950));\r\n\r\n clearInterval(intervalId.value);\r\n },\r\n { immediate: true }\r\n );\r\n\r\n watch(\r\n () => gallery.value,\r\n async () => {\r\n renderImage.value = gallery.value[0].url;\r\n }\r\n );\r\n\r\n return {\r\n renderImage,\r\n isHover\r\n };\r\n }\r\n});\r\n\nimport { useCssVars as _useCssVars } from 'vue'\nconst __injectCSSVars__ = () => {\n_useCssVars(_ctx => ({\n \"1fb69869\": (_ctx.colorBorder)\n}))}\nconst __setup__ = __default__.setup\n__default__.setup = __setup__\n ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n : __injectCSSVars__\n\nexport default __default__","import { render } from \"./HoverGallery.vue?vue&type=template&id=da81f2f4&scoped=true&ts=true\"\nimport script from \"./HoverGallery.vue?vue&type=script&lang=ts\"\nexport * from \"./HoverGallery.vue?vue&type=script&lang=ts\"\n\nimport \"./HoverGallery.vue?vue&type=style&index=0&id=da81f2f4&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-da81f2f4\"]])\n\nexport default __exports__","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./ModalAlert.vue?vue&type=style&index=0&id=29185dc3&scoped=true&lang=css\"","module.exports = __webpack_public_path__ + \"img/nothing-found.8d0d0b35.svg\";","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./HoverGallery.vue?vue&type=style&index=0&id=da81f2f4&scoped=true&lang=css\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Bag.vue?vue&type=style&index=0&id=7392688c&scoped=true&lang=css\""],"sourceRoot":""}