{"version":3,"sources":["webpack:///./src/views/FreeCredits.vue?6ff2","webpack:///./src/views/FreeCredits.vue","webpack:///./src/views/FreeCredits.vue?fa86","webpack:///./src/views/FreeCredits.vue?23c1"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","toolbar","staticClass","staticStyle","_v","_s","tenant","credits","totalCredits","meteredRate","class","$vuetify","breakpoint","xsOnly","_l","col","i","key","card","j","style","title","_e","text","on","callback","buttonText","staticRenderFns","Vue","extend","data","left","icon","back","tooltip","permission","computed","mapGetters","isApp","plan","subscription","columns","cols","cards","goToReferAFriend","goToLeaveFeedback","goToRepost","metadata","meta","message_allowance","trial_message_allowance","amt","parseInt","methods","window","open","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCol","VRow"],"mappings":"qHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAAgB,CAACE,MAAM,CAAC,QAAUN,EAAIO,UAAU,CAACH,EAAG,MAAM,CAACI,YAAY,QAAQ,CAACJ,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACI,YAAY,eAAe,CAACJ,EAAG,OAAO,CAACK,YAAY,CAAC,YAAY,OAAO,cAAc,MAAM,iBAAiB,aAAa,MAAQ,YAAY,CAACT,EAAIU,GAAG,IAAIV,EAAIW,GAA0B,IAAvBX,EAAIY,OAAOC,QAAgBb,EAAIY,OAAOC,QAAU,IAAMb,EAAIc,aAAe,wBAA0B,oCAAsCd,EAAIe,aAAc,UAAU,IAAI,GAAGX,EAAG,MAAM,CAACK,YAAY,CAAC,cAAc,MAAM,YAAY,SAAS,OAAS,SAAS,CAACL,EAAG,QAAQ,CAACI,YAAY,YAAYQ,MAAMhB,EAAIiB,SAASC,WAAWC,OAAS,OAAS,QAAQnB,EAAIoB,GAAIpB,EAAW,SAAE,SAASqB,EAAIC,GAAG,OAAOlB,EAAG,QAAQ,CAACmB,IAAID,E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,KAAKC,OAAA","file":"js/free-credits.a7c87ff4.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('page-template',{attrs:{\"toolbar\":_vm.toolbar}},[_c('div',{staticClass:\"pa-6\"},[_c('v-row',[_c('v-col',{staticClass:\" ml-2 mr-12\"},[_c('span',{staticStyle:{\"font-size\":\"45px\",\"font-weight\":\"600\",\"text-transform\":\"capitalize\",\"color\":\"#4d4d4d\"}},[_vm._v(\" \"+_vm._s(_vm.tenant.credits !== 0 ? _vm.tenant.credits + '/' + _vm.totalCredits + ' message credits left': (\"metered: each message now costs $\" + _vm.meteredRate))+\" \")])])],1)],1),_c('div',{staticStyle:{\"padding-top\":\"6px\",\"max-width\":\"1800px\",\"margin\":\"auto\"}},[_c('v-row',{staticClass:\"ma-2 pa-6\",class:_vm.$vuetify.breakpoint.xsOnly ? 'pa-2' : 'pa-0'},_vm._l((_vm.columns),function(col,i){return _c('v-col',{key:i,staticClass:\"ma-0 pa-0\",staticStyle:{\"flex-grow\":\"1\"},attrs:{\"cols\":\"12\",\"lg\":\"6\"}},_vm._l((col.cards),function(card,j){return _c('v-card',{key:j,style:(i===1 ? 'height: 100%; width:76%;' : ''),attrs:{\"outlined\":\"\",\"elevation\":\"3\"}},[(i!==1)?_c('v-card-title',{staticClass:\"pa-6\",staticStyle:{\"font-size\":\"35px\",\"font-weight\":\"600\",\"text-transform\":\"capitalize\",\"line-height\":\"100%\",\"word-break\":\"break-word\",\"color\":\"#4d4d4d\"}},[_vm._v(\" \"+_vm._s(card.title)+\" \")]):_vm._e(),(i===1)?_c('v-card-title',{staticClass:\"pa-6\",staticStyle:{\"font-size\":\"35px\",\"font-weight\":\"600\",\"text-transform\":\"capitalize\",\"line-height\":\"100%\",\"word-break\":\"break-word\",\"color\":\"#4d4d4d\"}},[_vm._v(\" share \"),_c('br'),_vm._v(\" MessageDesk, \"),_c('br'),_vm._v(\" get free credits \")]):_vm._e(),_c('v-card-text',{staticClass:\"mt-2\",staticStyle:{\"font-size\":\"16px\",\"color\":\"#4d4d4d\"}},[_c('span',{staticClass:\"ml-3 d-flex\",staticStyle:{\"letter-spacing\":\"1%\",\"line-height\":\"100%\",\"word-break\":\"break-word\"},attrs:{\"align\":\"left\"}},[_vm._v(_vm._s(card.text))])]),_c('v-card-actions',{staticClass:\"mt-8 pa-6\"},[_c('v-btn',{staticStyle:{\"text-transform\":\"capitalize\",\"position\":\"absolute\",\"bottom\":\"16px\",\"font-size\":\"16px\",\"width\":\"200px\"},attrs:{\"large\":\"\",\"color\":\"primary\"},on:{\"click\":card.callback}},[_vm._v(_vm._s(card.buttonText))])],1)],1)}),1)}),1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue'\nimport { mapGetters } from 'vuex'\ninterface Cols {\n cards: Cards[]\n}\ninterface Cards {\n title?: string\n text: string\n buttonText: string\n callback?: Function\n}\nexport default Vue.extend({\n data() {\n return {\n // Enables back button and page title on top of the page\n toolbar: {\n title: 'Message Credit Usage',\n left: [\n {\n title: 'Back',\n icon: 'mdi-chevron-left',\n back: '/media',\n tooltip: 'Back',\n permission: 0\n }\n ]\n }\n }\n },\n computed: {\n ...mapGetters({\n isApp: 'isApp',\n plan: 'plan',\n meteredRate: 'meteredRate',\n subscription: 'subscription',\n tenant: 'tenant'\n }),\n // Iteritable array to display the elements within each of our cards on the page\n columns(): Cols[] {\n const cols = [\n {\n cards: [\n {\n title: 'refer a friend, get free credits',\n text: 'Invite your friends or coworkers to use MessageDesk and earn 500 free credits when they sign-up',\n buttonText: 'Refer a Friend',\n callback: () => this.goToReferAFriend()\n },\n {\n title: 'leave feedback, get free credits',\n text: 'Complete our customer satisfaction survey and redeem 500 free credits',\n buttonText: 'leave feedback',\n callback: () => this.goToLeaveFeedback()\n }\n ]\n },\n {\n cards: [\n {\n text: 'Get 500 free credits when you post a video review of MessageDesk on YouTube, TikTok, Facebook, or Linkedin',\n buttonText: 'repost video',\n callback: () => this.goToRepost()\n }\n ]\n }\n ]\n return cols\n },\n // Gives us the total number of credits a user is allowed to use before getting metered billing\n totalCredits(): number {\n // If they aren't on a subscription, no credits given\n if (!this.subscription) return 0\n\n // If they aren't on a plan, no credits given\n if (!this.plan.metadata) return 0\n\n // Store the user's metadata from their plan\n const meta = this.plan.metadata\n\n // If they have no message allowance on their plan nor do they have credits on a trial plan, no credits given\n if (!meta.message_allowance && !meta.trial_message_allowance) return 0\n\n // Otherwise get the amount of credits they're allowed to use from one of their plans, either trialing or payment\n const amt =\n parseInt(meta.message_allowance) || parseInt(meta.trial_message_allowance)\n\n // Return the amount of credits given or 0 in case of edge case\n return amt || 0\n }\n },\n methods: {\n // Go to the feedback typeform link\n goToLeaveFeedback(): void {\n // Open TypeForm CSAT on new window\n window.open(\n 'https://messagedesk.typeform.com/to/v6mzBo77',\n this.isApp ? '_system' : '_blank'\n )\n },\n // Go to repost video typeform link\n goToRepost(): void {\n // Open TypeForm repost video on new window\n window.open(\n 'https://messagedesk.typeform.com/to/KjYuiBTT',\n this.isApp ? '_system' : '_blank'\n )\n },\n // Go to refer a friend typeform link\n goToReferAFriend(): void {\n // Open TypeForm friend referral page on new window\n window.open(\n 'https://messagedesk.typeform.com/to/qVkzf7Dw',\n this.isApp ? '_system' : '_blank'\n )\n }\n }\n})\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FreeCredits.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FreeCredits.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./FreeCredits.vue?vue&type=template&id=17fcad9d&\"\nimport script from \"./FreeCredits.vue?vue&type=script&lang=ts&\"\nexport * from \"./FreeCredits.vue?vue&type=script&lang=ts&\"\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\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VRow})\n"],"sourceRoot":""}