{"version":3,"sources":["webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?465f","webpack:///./infrastructure/presentation/views/shop/Bag.vue?8938","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?2722","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue?ddd3","webpack:///./infrastructure/presentation/components/application/shop/Receipt.vue","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?a0f4","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?9ddc","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue","webpack:///./domain/entities/shop/order/order.ts","webpack:///./infrastructure/presentation/views/shop/Bag.vue?0180","webpack:///./infrastructure/presentation/views/shop/Bag.vue","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?a68f","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?1c2d","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue","webpack:///./infrastructure/presentation/components/application/shop/ModalAlert.vue?a094","webpack:///./infrastructure/presentation/assets/static/nothing-found.svg","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?bbb1","webpack:///./infrastructure/presentation/views/shop/Bag.vue?43b6"],"names":["_withScopeId","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","args","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","store","route","orderID","Number","getters","async","dispatch","value","push","e","message","console","error","Intl","NumberFormat","format","loadInformation","__exports__","modalAlertOpened","Order","NaN","Array","this","TUIViewer","ModalAlert","ReceiptModal","Receipt","setup","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","__injectCSSVars__","__setup__","ctx","module","exports"],"mappings":"kHAAA,W,oFCEA,MAAMA,EAAeC,IAAM,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,EAA2BR,EAAa,IAAmB,eAAoB,OAAQ,KAAM,KAAM,IACnGS,EAA2BT,EAAa,IAAmB,eAAoB,OAAQ,KAAM,gBAAiB,IAC9GU,EAAa,CAAEP,MAAO,eACtBQ,EAAa,CAAER,MAAO,cACtBS,EAA2BZ,EAAa,IAAmB,eAAoB,KAAM,KAAM,uBAAwB,IACnHa,EAAc,CAAC,YACfC,EAAc,CAAEX,MAAO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,EAAoB,KAC1B,eAAYpJ,IAAQ,CAClB,WAAaA,EAAK2I,gBAEdU,EAAYb,EAAYvC,MAC9BuC,EAAYvC,MAAQoD,EAChB,CAACZ,EAAOa,KAAUF,IAA2BC,EAAUZ,EAAOa,IAC9DF,EAEW,Q,iCCzEf,MAAM7D,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASxF,GAAQ,CAAC,YAAY,qBAE1E,U,oCCTf,W,qBCAAwJ,EAAOC,QAAU,IAA0B,kC,kCCA3C,W,kCCAA,W","file":"js/chunk-34ba4e53.a7750387.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-v16/dist/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-v16/dist/index.js??ref--1-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:\\\\Users\\\\guilherme.brisida\\\\AppData\\\\Local\\\\Temp\\\\decolabuild\\\\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:\\\\Users\\\\guilherme.brisida\\\\AppData\\\\Local\\\\Temp\\\\decolabuild\\\\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:\\\\Users\\\\guilherme.brisida\\\\AppData\\\\Local\\\\Temp\\\\decolabuild\\\\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:\\\\Users\\\\guilherme.brisida\\\\AppData\\\\Local\\\\Temp\\\\decolabuild\\\\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--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/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-v16/dist/index.js??ref--1-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--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/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-v16/dist/index.js??ref--1-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--7-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/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-v16/dist/index.js??ref--1-1!./Bag.vue?vue&type=style&index=0&id=7392688c&scoped=true&lang=css\""],"sourceRoot":""}