{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.array.flat.js","webpack:///./node_modules/core-js/modules/es.object.values.js","webpack:///./node_modules/core-js/internals/object-to-array.js","webpack:///./infrastructure/presentation/views/Statement.vue?808f","webpack:///./node_modules/core-js/internals/flatten-into-array.js","webpack:///./infrastructure/presentation/views/Statement.vue?32a3","webpack:///./domain/enums/statement.ts","webpack:///./infrastructure/presentation/views/Statement.vue?ee0e","webpack:///./infrastructure/presentation/views/Statement.vue"],"names":["$","flattenIntoArray","toObject","toLength","toInteger","arraySpeciesCreate","target","proto","flat","depthArg","arguments","length","undefined","O","this","sourceLen","A","$values","values","stat","DESCRIPTORS","objectKeys","toIndexedObject","propertyIsEnumerable","f","createMethod","TO_ENTRIES","it","key","keys","i","result","call","push","module","exports","entries","isArray","bind","original","source","start","depth","mapper","thisArg","element","targetIndex","sourceIndex","mapFn","TypeError","n","_hoisted_1","class","_hoisted_2","_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_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","render","_ctx","_cache","$props","$setup","$data","$options","_component_router_link","statements","formatDecoins","user","dcoins","statement","index","formatDate","date","clickable","type","StatementType","PRODUCT","COURSE","collapsed","isOpenedIndex","onClick","$event","toggleStatement","formatName","debit","transactionType","TransactionType","DEBIT","credit","CREDIT","canceled","typeCanceled","StatementTypeCanceled","CANCELED","formattedTransaction","decoins","contents","content","title","order","products","product","name","formattedQuantity","quantity","to","default","_","setup","store","getters","orderStatementsByDate","Array","Intl","NumberFormat","format","Date","toLocaleDateString","arrayOfStatements","forEach","object","sameDateList","obj","Object","isCanceled","dispatch","message","console","error","id","ACCESS","PILL","EVENT","value","__exports__"],"mappings":"kH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/G,KAAK8G,GAGlBvD,EAAWsD,SAAQ,SAACG,EAAgBnH,GAC9BgE,EAAWmD,EAAIlD,OAASD,EAAWiD,EAAOhD,OAASjE,EAAI+D,GACzDmD,EAAa/G,KAAKgH,MAItBJ,EAAkB5G,KAAK+G,OAGlBE,OAAOhI,OAAO2H,GAAmBrI,OAI1C,SAAS6G,EACPpB,EACAkD,GAEA,OAAIA,IAAehC,EAAsBC,SAChC,YAELnB,IAASY,EAAgBG,OACpB,UAELf,IAASY,EAAgBC,MACpB,SAEF,IAIT,SAASgB,EAAkBC,GACzB,OAAIA,EAAW,EACN,IAEA,GApFX,eAAa,wCAAC,uHAEJK,EAAMgB,SAAS,mCAFX,uBAGJhB,EAAMgB,SAAS,+BAHX,+DAKN,gBAAa,QALP,kCAMF,eAAiB,KAAEC,SANjB,uCAQRC,QAAQC,MAAR,MARQ,UASF,eAAiB,+BATf,0DAwFd,IAAM7C,EAAa,SAACd,GAClB,OAAQA,EAAUK,MAChB,KAAKC,EAAcE,OACjB,6BAAuBR,EAAUiC,MACnC,KAAK3B,EAAcC,QACjB,yBAAmBP,EAAU8B,MAAM8B,IACrC,KAAKtD,EAAcuD,OACjB,6BACF,KAAKvD,EAAcwD,KACjB,wBAAkB9D,EAAUiC,MAC9B,KAAK3B,EAAcyD,MACjB,wBAAkB/D,EAAUiC,QAI5BpB,EAAkB,SAACZ,GACvBS,EAAcsD,MAAQtD,EAAcsD,QAAU/D,EAAQ,KAAOA,GAG/D,MAAO,CACLsB,wBACAN,kBACAX,gBACAV,aACAE,OACAY,gBACAR,aACAL,gBACA4B,uBACAS,oBACApB,aACAD,sB,iCCtJN,MAAMoD,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7E,GAAQ,CAAC,YAAY,qBAE1E","file":"js/chunk-f8f70f5c.c5ddc7ff.js","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://tc39.es/ecma262/#sec-array.prototype.flat\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","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!./Statement.vue?vue&type=style&index=0&id=b02d1ede&scoped=true&lang=css\"","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b02d1ede\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"view\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"statement\"\n}\nconst _hoisted_3 = { class: \"statement__header\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Extrato de Decoins\", -1))\nconst _hoisted_5 = { class: \"statement__balance\" }\nconst _hoisted_6 = /*#__PURE__*/_createTextVNode(\" Saldo atual: \")\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", { class: \"statement__line\" }, null, -1))\nconst _hoisted_8 = { class: \"statement__list\" }\nconst _hoisted_9 = { class: \"statement__container\" }\nconst _hoisted_10 = { class: \"statement__date\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = { class: \"statement__title\" }\nconst _hoisted_13 = { class: \"statement__name\" }\nconst _hoisted_14 = { class: \"statement__transaction\" }\nconst _hoisted_15 = { class: \"statement__date-course\" }\nconst _hoisted_16 = { key: 0 }\nconst _hoisted_17 = { class: \"statement__contents\" }\nconst _hoisted_18 = { class: \"statement__content-title\" }\nconst _hoisted_19 = {\n key: 0,\n class: \"statement__content-decoins\"\n}\nconst _hoisted_20 = { key: 1 }\nconst _hoisted_21 = { class: \"statement__orders\" }\nconst _hoisted_22 = { class: \"statement__order-title\" }\nconst _hoisted_23 = { class: \"statement__order-quantity\" }\nconst _hoisted_24 = { class: \"statement__value\" }\nconst _hoisted_25 = {\n key: 1,\n class: \"statement__message-box\"\n}\nconst _hoisted_26 = { class: \"statement__message\" }\nconst _hoisted_27 = /*#__PURE__*/_createTextVNode(\" Você não possui extratos, acesse o \")\nconst _hoisted_28 = /*#__PURE__*/_createTextVNode(\"dashboard\")\nconst _hoisted_29 = /*#__PURE__*/_createTextVNode(\" e finalize algum treinamento para obter decoins. \")\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 (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.statements.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createElementVNode(\"header\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"h2\", null, [\n _hoisted_6,\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.formatDecoins(_ctx.user.dcoins)), 1)\n ])\n ])\n ]),\n _hoisted_7,\n _createElementVNode(\"ul\", _hoisted_8, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.statements, (statement, index) => {\n return (_openBlock(), _createElementBlock(\"li\", { key: index }, [\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(_ctx.formatDate(statement.date)), 1),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\r\n 'statement__information',\r\n {\r\n clickable:\r\n statement.type === _ctx.StatementType.PRODUCT ||\r\n statement.type === _ctx.StatementType.COURSE\r\n },\r\n {\r\n collapsed: _ctx.isOpenedIndex === index\r\n }\r\n ]),\n onClick: ($event: any) => (_ctx.toggleStatement(index))\n }, [\n _createElementVNode(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", _hoisted_13, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.formatName(statement)), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _createElementVNode(\"h4\", {\n class: _normalizeClass([\r\n 'statement__type-course',\r\n {\r\n debit:\r\n statement.transactionType === _ctx.TransactionType.DEBIT\r\n },\r\n {\r\n credit:\r\n statement.transactionType === _ctx.TransactionType.CREDIT\r\n },\r\n {\r\n canceled:\r\n statement.typeCanceled ===\r\n _ctx.StatementTypeCanceled.CANCELED\r\n }\r\n ])\n }, _toDisplayString(_ctx.formattedTransaction(\r\n statement.transactionType,\r\n statement.typeCanceled\r\n )), 3),\n _createElementVNode(\"h4\", _hoisted_15, _toDisplayString(_ctx.formatDate(statement.date)), 1),\n _createElementVNode(\"h4\", {\n class: _normalizeClass([\r\n 'statement__total',\r\n {\r\n debit:\r\n statement.transactionType === _ctx.TransactionType.DEBIT\r\n },\r\n {\r\n credit:\r\n statement.transactionType === _ctx.TransactionType.CREDIT\r\n },\r\n {\r\n canceled:\r\n statement.typeCanceled ===\r\n _ctx.StatementTypeCanceled.CANCELED\r\n }\r\n ])\n }, _toDisplayString(_ctx.formatDecoins(statement.decoins)), 3)\n ])\n ], 10, _hoisted_11),\n (statement.type === _ctx.StatementType.COURSE)\n ? _withDirectives((_openBlock(), _createElementBlock(\"ul\", _hoisted_16, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(statement.contents, (content, index) => {\n return (_openBlock(), _createElementBlock(\"li\", { key: index }, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"p\", _hoisted_18, _toDisplayString(content.title), 1),\n false\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_19, _toDisplayString(_ctx.formatDecoins(content.dCoins)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n }), 128))\n ], 512)), [\n [_vShow, _ctx.isOpenedIndex === index]\n ])\n : (statement.type === _ctx.StatementType.PRODUCT)\n ? _withDirectives((_openBlock(), _createElementBlock(\"ul\", _hoisted_20, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(statement.order.products, (product, index) => {\n return (_openBlock(), _createElementBlock(\"li\", { key: index }, [\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"p\", _hoisted_22, _toDisplayString(product.name), 1),\n _createElementVNode(\"p\", _hoisted_23, \" Qtde\" + _toDisplayString(_ctx.formattedQuantity(product.quantity)) + \": \" + _toDisplayString(product.quantity), 1),\n _createElementVNode(\"p\", _hoisted_24, \" -\" + _toDisplayString(_ctx.formatDecoins(product.decoins)), 1)\n ])\n ]))\n }), 128))\n ], 512)), [\n [_vShow, _ctx.isOpenedIndex === index]\n ])\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_25, [\n _createElementVNode(\"p\", _hoisted_26, [\n _hoisted_27,\n _createVNode(_component_router_link, {\n class: \"statement__highlighted-text\",\n to: { name: 'dashboard' }\n }, {\n default: _withCtx(() => [\n _hoisted_28\n ]),\n _: 1\n }),\n _hoisted_29\n ])\n ]))\n ]))\n}","export enum TransactionType {\r\n CREDIT = 0,\r\n DEBIT = 1\r\n}\r\n\r\nexport enum StatementType {\r\n COURSE = 1,\r\n EVENT = 2,\r\n PILL = 3,\r\n ACCESS = 4,\r\n PRODUCT = 5\r\n}\r\n\r\nexport enum StatementTypeCanceled {\r\n CANCELED = 1,\r\n VALID = 0\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 { User } from \"../../../domain/entities/entities\";\r\nimport { useStore } from \"vuex\";\r\nimport { dispatchErrorBox } from \"../components/mixins\";\r\nimport { RepositoryException } from \"../../../domain/exceptions/exceptions\";\r\nimport { Statement } from \"../../../domain/entities/statement\";\r\nimport {\r\n StatementType,\r\n StatementTypeCanceled,\r\n TransactionType\r\n} from \"../../../domain/enums/statement\";\r\n\r\nexport default defineComponent({\r\n setup() {\r\n const store = useStore();\r\n\r\n const isOpenedIndex: Ref = ref(null);\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 /** Statements sorted by date. . */\r\n const statements: ComputedRef = computed(() => {\r\n return orderStatementsByDate(\r\n store.getters[\"statement_module/statements\"] || Array()\r\n );\r\n });\r\n\r\n onBeforeMount(async () => {\r\n try {\r\n await store.dispatch(\"statement_module/loadStatements\");\r\n await store.dispatch(\"userProfile_module/loadUser\");\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): string {\r\n return Intl.NumberFormat(\"pt-br\").format(decoins);\r\n }\r\n\r\n /** Function responsible for formatting the date in the Brazilian standard. */\r\n function formatDate(date: string): string {\r\n return new Date(date).toLocaleDateString(\"pt-BR\");\r\n }\r\n\r\n /** Function responsible for grouping statements with the same date. */\r\n function orderStatementsByDate(\r\n statements: Array\r\n ): Array {\r\n if (!statements) {\r\n return new Array();\r\n }\r\n\r\n const arrayOfStatements = new Array>();\r\n\r\n statements.forEach((object: Statement, index) => {\r\n if (\r\n index > 0 &&\r\n index < statements.length &&\r\n formatDate(object.date) == formatDate(statements[index - 1].date)\r\n ) {\r\n return;\r\n }\r\n\r\n /** current date list instance. */\r\n const sameDateList: Array = [];\r\n\r\n /** add the current object to the list. */\r\n sameDateList.push(object);\r\n\r\n /** check if there is an item equal to the current one in all the next items in the list. */\r\n statements.forEach((obj: Statement, i) => {\r\n if (formatDate(obj.date) == formatDate(object.date) && i > index) {\r\n sameDateList.push(obj);\r\n }\r\n });\r\n\r\n arrayOfStatements.push(sameDateList);\r\n });\r\n\r\n return Object.values(arrayOfStatements).flat();\r\n }\r\n\r\n /** Function responsible for handling the type of transaction. */\r\n function formattedTransaction(\r\n type: TransactionType,\r\n isCanceled: StatementTypeCanceled\r\n ): string {\r\n if (isCanceled === StatementTypeCanceled.CANCELED) {\r\n return \"cancelado\";\r\n }\r\n if (type === TransactionType.CREDIT) {\r\n return \"crédito\";\r\n }\r\n if (type === TransactionType.DEBIT) {\r\n return \"débito\";\r\n }\r\n return \"-\";\r\n }\r\n\r\n /** Function to add 's' when the amount is greater than 1.*/\r\n function formattedQuantity(quantity: number): string {\r\n if (quantity > 1) {\r\n return \"s\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n const formatName = (statement: Statement): string => {\r\n switch (statement.type) {\r\n case StatementType.COURSE:\r\n return `Treinamento: ${statement.name}`;\r\n case StatementType.PRODUCT:\r\n return `Pedido: #${statement.order.id}`;\r\n case StatementType.ACCESS:\r\n return `Acesso na plataforma`;\r\n case StatementType.PILL:\r\n return `Pílula: ${statement.name}`;\r\n case StatementType.EVENT:\r\n return `Evento: ${statement.name}`;\r\n }\r\n };\r\n\r\n const toggleStatement = (index: number) => {\r\n isOpenedIndex.value = isOpenedIndex.value === index ? null : index;\r\n };\r\n\r\n return {\r\n StatementTypeCanceled,\r\n TransactionType,\r\n StatementType,\r\n statements,\r\n user,\r\n isOpenedIndex,\r\n formatDate,\r\n formatDecoins,\r\n formattedTransaction,\r\n formattedQuantity,\r\n formatName,\r\n toggleStatement\r\n };\r\n }\r\n});\r\n","import { render } from \"./Statement.vue?vue&type=template&id=b02d1ede&scoped=true&ts=true\"\nimport script from \"./Statement.vue?vue&type=script&lang=ts\"\nexport * from \"./Statement.vue?vue&type=script&lang=ts\"\n\nimport \"./Statement.vue?vue&type=style&index=0&id=b02d1ede&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-b02d1ede\"]])\n\nexport default __exports__"],"sourceRoot":""}