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ACA,6BAED,oBAAqB,CACpB,MACA,8BAED,YAAa,CACZ,MACA,sBAED,iBAAkB,CACjB,MACA,2BAED,mBAAoB,CACnB,KACA,6BAED,qBAAsB,CACrB,MACA,+BAED,aAAc,CACb,KACA,uBAED,aAAc,CACb,MACA,wBAGF,SAASmI,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAEtI,EAAKoI,GAC9B,OAAOG,QAAQC,UAAUhE,MAAK,WAC7B,IAAIiE,EAAI,IAAI9J,MAAM,uBAAyByJ,EAAM,KAEjD,MADAK,EAAEC,KAAO,mBACHD,CACP,IAGD,IAAIE,EAAM3I,EAAIoI,GAAMQ,EAAKD,EAAI,GAC7B,OAAON,EAAoBI,EAAEE,EAAI,IAAInE,MAAK,WACzC,OAAO6D,EAAoBQ,EAAED,EAAI,GAClC,GACD,CACAT,EAAoBjK,KAAO,WAAa,OAAO4K,OAAO5K,KAAK8B,EAAM,EACjEmI,EAAoBS,GAAK,MACzB1M,EAAOC,QAAUgM,C","sources":["webpack://company-webapp/./src/views/Home/index.vue?4750","webpack://company-webapp/./src/amplitude-events/resume.amplitude.js","webpack://company-webapp/./src/utils/math.manager.js","webpack://company-webapp/./src/utils/number.utils.js","webpack://company-webapp/./src/components/emerald/atoms/EmeraldIcon.vue","webpack://company-webapp/src/components/emerald/atoms/EmeraldIcon.vue","webpack://company-webapp/./src/components/emerald/atoms/EmeraldIcon.vue?d989","webpack://company-webapp/./src/components/emerald/atoms/EmeraldIcon.vue?d476","webpack://company-webapp/./src/views/Home/index.vue","webpack://company-webapp/./src/utils/print-view-by-ref.js","webpack://company-webapp/src/views/Home/index.vue","webpack://company-webapp/./src/views/Home/index.vue?2c60","webpack://company-webapp/./src/views/Home/index.vue?91b5","webpack://company-webapp/./src/views/Home/index.vue?e158","webpack://company-webapp/./src/assets/emeraldicons/ "],"sourcesContent":["module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"pt-BR\":{\"tippy-report\":\"Clique para imprimir o relatório em pdf.\"},\"en-US\":{\"tippy-report\":\"Click to print the report in pdf.\"}}')\n delete Component.options._Ctor\n}\n","import analiticaInstance from '@/vendor/analitica.vendor'\n\n/**\n * @typedef {import('@stone-payments/analitica').EventFactory} EventFactory\n * @description This is the event that will be sent to the Amplitude plugin\n * @description import Amplitude from '@amplitude/resume.amplitude'\n * @example Amplitude.events.actions.exportDataClicked()\n * @description\n * @example context: { filters: {}, viewed: {loadView: () => ({})}, actions: {} }\n */\n\nconst resumeEvents = analiticaInstance?.eventFactory('Resume', {\n view: {\n loadView: filters => ({\n label: 'page viewed - pagarme dash',\n metadata: { filters }\n })\n },\n filters: {\n periodChanged: period => ({\n label: 'resume - period filter changed',\n metadata: { period }\n }),\n chargeTypeChanged: type => ({\n label: 'resume - charge type changed',\n metadata: { type }\n }),\n paymentMethodsTypeValueChanged: type => ({\n label: 'resume - payment methods type value changed',\n metadata: { type }\n }),\n brandsTypeValueChanged: type => ({\n label: 'resume - brands type value changed',\n metadata: { type }\n })\n },\n actions: {\n exportDataClicked: filters => ({\n label: 'resume - export data button clicked',\n metadata: { filters }\n })\n }\n})\n\nexport default resumeEvents\n","import { DashInstance } from '@/store'\nimport { toFixed, toInteger, toFloat } from './number.utils'\n\nclass MathManager {\n /**\n * sumByKeys is used to sum the values of the specified keys in a list object,\n * which is assumed to be an instance variable of the class that this function is defined in.\n * The function uses the reduce method to iterate through the list object, adding the values of the specified keys\n * together and returning a new object with the summed values for those keys.\n *\n * The result is stored back in the list object and the function returns this to allow for method chaining.\n * @param {Array} items list sumed\n * @param {Array} keys list of properties keys to be summed\n * @returns new object with the sum of the last items\n */\n static sumByKeys (items = [], keys = ['quantity']) {\n if (items.length <= 0) return []\n\n const r = (acc, curr) => {\n return keys.reduce((rem, key) => {\n rem[key] = acc[key] + curr[key]\n return rem\n }, {})\n }\n\n return items.reduce((acc, curr) => ({\n ...acc,\n ...r(acc, curr)\n }))\n }\n\n /**\n * Calculates the overall conversion rate using weighted averages.\n *\n * @param {number[]} participations - An array of participation values for each category.\n * @param {number[]} rates - An array of conversion rates corresponding to each category.\n * @returns {number} - The overall weighted conversion rate.\n * @throws {Error} - If the lengths of the `participations` and `rates` arrays are not equal.\n */\n static calculateConversionRate (participations, rates) {\n if (participations.length !== rates.length) {\n throw new Error(\n 'The participation and rate arrays must have the same length.'\n )\n }\n\n if (participations.length === 0 || rates.length === 0) {\n return 0\n }\n\n let weightedSum = 0\n let totalParticipations = 0\n\n for (let i = 0; i < participations.length; i++) {\n weightedSum += participations[i] * rates[i]\n totalParticipations += participations[i]\n }\n\n return weightedSum / totalParticipations\n }\n\n /**\n * convertToMonetary is used to divide by 100 due to the amount of decimal places returned in the bff\n * api for monetary values\n * @param {number} value monetary number returned by bff api\n * @returns the value divide by 100\n */\n static convertToMonetary (value) {\n return value / 100 || 0\n }\n\n static percentageCalculator (value, total) {\n return DashInstance.commons.percentageCalculator(total, value)\n }\n\n static formatCurrencyBRL (value) {\n return DashInstance.commons.formatCurrencyBRL(value)\n }\n\n static formatCurrency (value, currency = 'BRL', lang = 'pt-BR') {\n return new Intl.NumberFormat(lang, {\n style: 'currency',\n currency\n }).format(value)\n }\n\n static convertCentsToBRL (value) {\n return DashInstance.commons.convertCentsToBRL(value)\n }\n\n static formatConversionNumber (value) {\n return DashInstance.insights.formatConversionNumber(value)\n }\n\n /**\n * Convert number in decimal number extesion\n * ex. input: 2000 - output 2.000\n * @param {Number} value\n * @returns Number\n */\n static formatNumberDecimal (value, lang = 'pt-BR') {\n return new Intl.NumberFormat(lang).format(value)\n }\n\n static numberBase (value) {\n const [coefficient, exponent] = value\n .toExponential()\n .split('e')\n .map(item => Number(item))\n\n return [coefficient, exponent]\n }\n\n static largestNumberInArray (array) {\n return array.reduce((a, b) => Math.max(a, b))\n }\n\n /**\n * @description Converts the value into a fixed float\n * @param valueToConvert the value to be converted into a fixed float\n */\n static getValue (valueToConvert, precisionValue) {\n return toFixed(toFloat(valueToConvert, 0), precisionValue)\n }\n\n /**\n * @description Validates the max value and defaults to 100 for invalid values 0, nan, -number\n * @param valuetoconvert the value to be converted into a fixed float\n */\n static getMax (valueToConvert) {\n const _max = toFloat(valueToConvert)\n return _max > 0 ? _max : 100\n }\n\n /**\n * @description Defaults to 0 for invalid values -number, NaN\n * @param precisionValue the value for the precision @default 0\n */\n static getPrecision (precisionValue = 0) {\n return Math.max(toInteger(precisionValue, 0), 0)\n }\n\n /**\n * @description Calculates the progress value, max value and precision value into the correct processed value\n * @param progressValue the value for the progress\n * @param maxValue the max value of the progress bat\n * @param precisionValue the precision value @default 0\n */\n static getProgress (progressValue, maxValue, precisionValue = 0) {\n const _precision = MathManager.getPrecision(precisionValue)\n const pow = Math.pow(10, _precision)\n return toFixed(\n (100 * pow * MathManager.getValue(progressValue)) /\n MathManager.getMax(maxValue) /\n pow,\n _precision\n )\n }\n}\n\nexport default MathManager\n","/**\n * @description\n Converts a value (string, number, etc.) to a string\n representation with `precision` digits after the decimal\n Returns the string 'NaN' if the value cannot be converted\n * @param valueToConvert the value for the progress\n * @param precisionValue the precision value @default 0\n */\nfunction toFixed (valueToConvert, precisionValue = 0) {\n return toFloat(valueToConvert).toFixed(toInteger(precisionValue, 0))\n}\n\n/**\n * @description Converts a value (string, number, etc.) to a number\n * @param value the value for the progress\n * @param defaultValue the default value in case the validation fails @default NaN\n */\nfunction toFloat (value, defaultValue = NaN) {\n const float = parseFloat(value)\n return isNaN(float) ? defaultValue : float\n}\n\n/**\n * @description\n Converts a value (string, number, etc.) to an integer number\n Assumes radix base 10\n * @param value the value for the progress\n * @param defaultValue the default value in case the validation fails @default NaN\n */\nfunction toInteger (value, defaultValue = NaN) {\n const integer = parseInt(value, 10)\n return isNaN(integer) ? defaultValue : integer\n}\n\n/**\n * @description Filter only numbers from a string and transform it into number\n * @param unformatted Unformatted string that will be converted\n */\nfunction onlyNumbers (unformatted) {\n return Number(unformatted.replace(/\\D/g, ''))\n}\n\nexport { toFixed, toInteger, toFloat, onlyNumbers }\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.dynamicIcon,{tag:\"component\",staticClass:\"emeraldicons\"})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n\n\n\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EmeraldIcon.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EmeraldIcon.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./EmeraldIcon.vue?vue&type=template&id=b87507ae\"\nimport script from \"./EmeraldIcon.vue?vue&type=script&lang=js\"\nexport * from \"./EmeraldIcon.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"home-container\"},[_c('section',{staticClass:\"eu-flex eu-justify_end eu-align-items_end eu-px_2_md\"},[_c('date-select',{attrs:{\"is-loading\":_vm.isLoading}}),_c('emd-tippy',{staticClass:\"eu-cursor_pointer\",attrs:{\"id\":\"tippy-report\",\"type\":\"simple\",\"position\":\"bottom\",\"content\":_vm.$t('tippy-report')}},[_c('button',{staticClass:\"emd-action-button eu-ml_3\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.printDashboard}},[_c('emerald-icon',{staticStyle:{\"width\":\"16px\",\"height\":\"16px\"},attrs:{\"icon\":\"download\"}})],1)])],1),(_vm.isLoading)?_c('onboarding-loading'):_c('section',{ref:\"dashboard\",staticClass:\"dashboard-container\"},[_c('div',{staticClass:\"charges\"},[_c('charges',{attrs:{\"data\":_vm.charges}})],1),_c('div',{staticClass:\"status\"},[_c('transaction-status',{attrs:{\"data\":_vm.status,\"total\":_vm.totalQuantity}})],1),_c('div',{staticClass:\"paymentMethods\"},[_c('payment-methods',{attrs:{\"data\":_vm.paymentMethods}}),_c('brands',{attrs:{\"data\":_vm.brands}})],1),_c('div',{staticClass:\"paymentMethods2\"},[_c('acquirer',{attrs:{\"data\":_vm.acquirers}}),_c('refusal-codes',{attrs:{\"data\":_vm.refusalCodes,\"total\":_vm.totalQuantity}})],1),_c('div',{staticClass:\"bestAccounts\"},[_c('conversion',{attrs:{\"data\":_vm.paymentMethods}}),_c('best-accounts')],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { jsPDF as JsPDF } from 'jspdf'\nimport html2canvas from 'html2canvas'\n\nconst IMG_WIDTH = 210\nconst MARGIN = 5\n\nexport default function printViewByRef (ref, docName) {\n const DATE_FORMATTED = new Intl.DateTimeFormat('pt-BR').format(new Date())\n\n html2canvas(ref, {\n backgroundColor: '#ffffff'\n }).then(function (canvas) {\n const IMG_DATA = canvas.toDataURL('image/png')\n const IMG_HEIGHT = (canvas.height * IMG_WIDTH) / canvas.width\n\n const doc = new JsPDF('p', 'mm', 'A4')\n doc.setFillColor(255, 255, 255)\n\n doc.rect(\n MARGIN,\n MARGIN,\n IMG_WIDTH - MARGIN * 2,\n IMG_HEIGHT - MARGIN * 2,\n 'F'\n )\n\n doc.addImage(\n IMG_DATA,\n 'PNG',\n MARGIN,\n MARGIN,\n IMG_WIDTH - MARGIN * 2,\n IMG_HEIGHT - MARGIN * 2,\n '',\n 'FAST'\n )\n\n doc.save(`dashboard-${docName}-${DATE_FORMATTED}.pdf`)\n })\n}\n","\n \n
\n\n
\n\n
\n \n \n
\n\n \n \n
\n\n \n\n \n\n \n \n \n
\n \n
\n\n\n\n\n\n{\n \"pt-BR\": {\n \"tippy-report\": \"Clique para imprimir o relatório em pdf.\"\n },\n \"en-US\": {\n \"tippy-report\": \"Click to print the report in pdf.\"\n }\n}\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import mod from \"-!../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"; export default mod; export * from \"-!../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=4bfd12b0&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=4bfd12b0&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4bfd12b0\",\n null\n \n)\n\n/* custom blocks */\nimport block0 from \"./index.vue?vue&type=custom&index=0&blockType=i18n\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","var map = {\n\t\"./account.svg\": [\n\t\t84813,\n\t\t\"icons/icon-account-svg\"\n\t],\n\t\"./charges.svg\": [\n\t\t79903,\n\t\t\"icons/icon-charges-svg\"\n\t],\n\t\"./configuration.svg\": [\n\t\t30840,\n\t\t\"icons/icon-configuration-svg\"\n\t],\n\t\"./dashboard.svg\": [\n\t\t99902,\n\t\t\"icons/icon-dashboard-svg\"\n\t],\n\t\"./download.svg\": [\n\t\t43030,\n\t\t\"icons/icon-download-svg\"\n\t],\n\t\"./ellipsis.svg\": [\n\t\t61421,\n\t\t\"icons/icon-ellipsis-svg\"\n\t],\n\t\"./info.svg\": [\n\t\t4382,\n\t\t\"icons/icon-info-svg\"\n\t],\n\t\"./merchant.svg\": [\n\t\t42794,\n\t\t\"icons/icon-merchant-svg\"\n\t],\n\t\"./navigation.svg\": [\n\t\t35224,\n\t\t\"icons/icon-navigation-svg\"\n\t],\n\t\"./pix-outline.svg\": [\n\t\t29608,\n\t\t\"icons/icon-pix-outline-svg\"\n\t],\n\t\"./pix.svg\": [\n\t\t97048,\n\t\t\"icons/icon-pix-svg\"\n\t],\n\t\"./security.svg\": [\n\t\t27076,\n\t\t\"icons/icon-security-svg\"\n\t],\n\t\"./statistics.svg\": [\n\t\t2405,\n\t\t\"icons/icon-statistics-svg\"\n\t],\n\t\"./subscription.svg\": [\n\t\t55211,\n\t\t\"icons/icon-subscription-svg\"\n\t],\n\t\"./test.svg\": [\n\t\t8886,\n\t\t\"icons/icon-test-svg\"\n\t],\n\t\"./user.svg\": [\n\t\t89437,\n\t\t\"icons/icon-user-svg\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__.t(id, 7 | 16);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 71801;\nmodule.exports = webpackAsyncContext;"],"names":["module","exports","Component","options","__i18n","push","_Ctor","resumeEvents","analiticaInstance","eventFactory","view","loadView","filters","label","metadata","periodChanged","period","chargeTypeChanged","type","paymentMethodsTypeValueChanged","brandsTypeValueChanged","actions","exportDataClicked","MathManager","_classCallCheck","_createClass","key","value","items","arguments","length","undefined","keys","r","acc","curr","reduce","rem","_objectSpread","participations","rates","Error","weightedSum","totalParticipations","i","total","DashInstance","commons","percentageCalculator","formatCurrencyBRL","currency","lang","Intl","NumberFormat","style","format","convertCentsToBRL","insights","formatConversionNumber","_value$toExponential$","toExponential","split","map","item","Number","_value$toExponential$2","_slicedToArray","coefficient","exponent","array","a","b","Math","max","valueToConvert","precisionValue","toFixed","toFloat","_max","toInteger","progressValue","maxValue","_precision","getPrecision","pow","getValue","getMax","defaultValue","NaN","float","parseFloat","isNaN","integer","parseInt","render","_vm","this","_c","_self","dynamicIcon","tag","staticClass","staticRenderFns","name","props","icon","String","required","computed","_this","component","attrs","isLoading","$t","on","printDashboard","staticStyle","ref","charges","status","totalQuantity","paymentMethods","brands","acquirers","refusalCodes","IMG_WIDTH","MARGIN","printViewByRef","docName","DATE_FORMATTED","DateTimeFormat","Date","html2canvas","backgroundColor","then","canvas","IMG_DATA","toDataURL","IMG_HEIGHT","height","width","doc","JsPDF","setFillColor","rect","addImage","save","concat","components","EmeraldIcon","EmdTippy","OnboardingLoading","DateSelect","TransactionStatus","PaymentMethods","Acquirer","Brands","RefusalCodes","BestAccounts","Conversion","Charges","mapGetters","data","quantity","buckets","_this$data$buckets","_this$data","payment_method","_this$buckets","filter","authorized_tpv","_this$buckets2","_this$status$find$buc","_this$status$find","find","tpvLabel","convertToMonetary","tpv","ticketLabel","average_ticket_authorized","salesLabel","time_series","mounted","$nextTick","Amplitude","events","$route","query","methods","date_filters","refDashboard","$refs","dashboard","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","e","code","ids","id","t","Object"],"sourceRoot":""}