{"version":3,"sources":["webpack:///./src/views/subscription/components/StripePaymentElementForm.vue?21e5","webpack:///./src/views/subscription/components/StripePaymentElementForm.vue?e8ee","webpack:///./node_modules/vuelidate-property-decorators/dist/vuelidate-decorators.js","webpack:///./src/views/subscription/components/StripePaymentElementForm.vue","webpack:///./src/views/subscription/components/StripePaymentElementForm.vue?61a2","webpack:///./src/views/subscription/components/StripePaymentElementForm.vue?8019","webpack:///../../../src/mixins/rippleable/index.ts","webpack:///../../../src/components/VCheckbox/VCheckbox.ts","webpack:///./src/core/plugins/eu-vat-rates/index.ts","webpack:///../../../src/mixins/selectable/index.ts"],"names":["render","this$1","this","_vm","_h","$createElement","_c","_self","ref","staticClass","attrs","pk","elementsOptions","confirmParams","createOptions","locale","on","validatePaymentMethod","VCheckbox","staticStyle","$t","vatServiceValidated","buyAsCompany","vatId","companyName","$v","$touch","validateVatInput","$reset","$nextTick","$refs","focus","model","value","callback","$$v","expression","VForm","$event","preventDefault","validateVatService","VLabel","_v","_s","VTextField","companyNameErrors","type","indexOf","_k","keyCode","key","vatIdErrors","blur","VBtn","vatServiceLoading","_e","VIcon","VDivider","VCard","VSpacer","cancel","nextEnabled","next","staticRenderFns","validationCreator","validations","$vnode","componentOptions","Ctor","options","__validations","ret","k","hasOwnProperty","val","call","Object","assign","Validations","StripePaymentElementForm","Settings","publishableKey","appearance","theme","testMode","mode","currency","amount","grossAmount","loader","LocalStorage","getLocale","layout","defaultCollapsed","radios","spacedAccordionItems","paymentRefPolling","undefined","paymentComplete","addressComplete","vatComplete","vatServiceError","watchLocalStorage","e","stopImmediatePropagation","detail","storage","console","log","paymentElement","paymentRef","elements","update","fields","phone","display","name","defaultValues","userName","address","country","email","userEmail","required","minLength","maxLength","vatIdRules","euCountries","keys","EUVat","rates","includes","euVat","validation_rule","helpers","regex","errors","$dirty","push","then","length","vatValidated","validateNext","isEUCountry","toString","displaySnackbar","data","endpoint","api","post","result","code","description","setTimeout","succeeded","catch","error","debug","event","complete","addressElement","create","addressOptions","mount","linkAuthElement","linkAuthOptions","validateAddress","step","$router","paymentElementRef","checkoutEnabled","window","addEventListener","setInterval","mountAddressElement","mountLocalStorageWatcher","clearInterval","removeEventListener","Vue","__decorate","Prop","default","PropSync","Number","Boolean","String","Getter","Action","Watch","immediate","Component","mixins","validationMixin","computed","components","StripeElementPayment","component","extend","directives","ripple","props","methods","genRipple","center","Selectable","indeterminate","indeterminateIcon","offIcon","onIcon","inputIndeterminate","classes","VInput","computedIcon","isActive","validationState","isDisabled","hasError","shouldValidate","hasSuccess","hasColor","computedColor","watch","$emit","genCheckbox","attrs$","checkboxAttrs","title","setTextColor","dense","dark","light","genInput","rippleState","genDefaultSlot","genLabel","source","last_updated","disclaimer","AT","vat_name","vat_abbr","standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","BE","BG","CY","CZ","DE","DK","EE","GR","ES","FI","FR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK","prevent","Rippleable","Comparable","prop","id","inputValue","falseValue","trueValue","multiple","label","lazyValue","color","isDark","appIsDark","isMultiple","Array","isArray","internalValue","input","some","item","valueComparator","isDirty","click","disabled","computedId","role","domProps","checked","onBlur","change","onChange","onFocus","keydown","onKeydown","onClick","isInteractive","filter","validate","isFocused"],"mappings":"oJAAA,W,yJCUIA,EAAS,WACb,IAAIC,EAASC,KACTC,EAAID,KAASE,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,IAAI,cAAcC,YAAY,OAAOC,MAAM,CAAC,GAAK,uBAAuBJ,EAAG,MAAM,CAACE,IAAI,aAAaC,YAAY,YAAYC,MAAM,CAAC,GAAK,qBAAqBJ,EAAG,yBAAyB,CAACE,IAAI,aAAaE,MAAM,CAAC,GAAKP,EAAIQ,GAAG,mBAAmBR,EAAIS,gBAAgB,iBAAiBT,EAAIU,cAAc,iBAAiBV,EAAIW,cAAc,O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KAAKoR,WACtCpR,KAAKmS,gBAAgBH,EAAOhS,KAAKqR,WAAarR,KAAKoR,WAAapR,KAAKqR,UACpEtP,EACD/B,KAAKmS,gBAAgBH,EAAOjQ,GAAS,KAAOA,GAE3CiQ,EAGXhS,KAAKoT,UAAS,EAAMpB,GACpBhS,KAAK+R,cAAgBC,EACrBhS,KAAKyN,SAAWuE,IAElBc,QAAO,SAAEzM,GACPrG,KAAKqT,WAAY,EACjBrT,KAAK4N,MAAM,QAASvH,IAEtBsM,OAAM,SAAEtM,GACNrG,KAAKqT,WAAY,EACjBrT,KAAK4N,MAAM,OAAQvH,IAGrB2M,UAAS,SAAE3M","file":"assets/js/chunk-9d1a26fa.a612c87e.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/lib/loaders/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/lib/index.js??vue-loader-options!./StripePaymentElementForm.vue?vue&type=style&index=0&id=95ce06e4&prod&lang=css&\"","import { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCheckbox } from 'vuetify/lib/components/VCheckbox';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VLabel } from 'vuetify/lib/components/VLabel';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\n\nvar render = function () {\nvar this$1 = this;\nvar _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{ref:\"linkAuthRef\",staticClass:\"px-1\",attrs:{\"id\":\"link-auth-element\"}}),_c('div',{ref:\"addressRef\",staticClass:\"px-1 my-8\",attrs:{\"id\":\"address-element\"}}),_c('stripe-element-payment',{ref:\"paymentRef\",attrs:{\"pk\":_vm.pk,\"elements-options\":_vm.elementsOptions,\"confirm-params\":_vm.confirmParams,\"create-options\":_vm.createOptions,\"locale\":_vm.locale},on:{\"element-change\":_vm.validatePaymentMethod}}),_c('div',{staticClass:\"px-1 my-8\"},[_c(VCheckbox,{staticStyle:{\"width\":\"fit-content\"},attrs:{\"label\":_vm.$t('subscription.buyAsCompany')},on:{\"change\":function () {\n _vm.vatServiceValidated = _vm.buyAsCompany;\n // Only trigger error if text input was made\n _vm.vatId && _vm.companyName && this$1.$v.$touch();\n _vm.validateVatInput();\n // Reset to prevent company/vat init in error state\n !_vm.vatId && !_vm.companyName && this$1.$v.$reset();\n\n _vm.$nextTick(function () {\n // @ts-ignore\n _vm.buyAsCompany && _vm.$refs.companyName.focus();\n });\n }},model:{value:(_vm.buyAsCompany),callback:function ($$v) {_vm.buyAsCompany=$$v},expression:\"buyAsCompany\"}}),(_vm.buyAsCompany)?_c(VForm,{on:{\"submit\":function($event){$event.preventDefault();return _vm.validateVatService($event)}}},[_c(VLabel,[_vm._v(_vm._s(_vm.$t(\"subscription.vatData\")))]),_c(VTextField,{ref:\"companyName\",staticClass:\"input-fix mb-4\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"error-messages\":_vm.companyNameErrors,\"placeholder\":_vm.$t('subscription.enterCompanyName')},on:{\"blur\":function () {\n this$1.$v.companyName.$touch();\n _vm.validateVatInput();\n },\"change\":function () {\n _vm.vatServiceValidated = false;\n _vm.validateVatInput();\n },\"keyup\":[_vm.validateVatInput,function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return (function () {\n // @ts-ignore\n _vm.$refs.vatId.focus();\n })($event)}]},model:{value:(_vm.companyName),callback:function ($$v) {_vm.companyName=$$v},expression:\"companyName\"}}),_c(VTextField,{ref:\"vatId\",staticClass:\"input-fix mb-4\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"error-messages\":_vm.vatIdErrors,\"placeholder\":_vm.$t('subscription.enterVatId')},on:{\"blur\":function () {\n this$1.$v.vatId.$touch();\n _vm.validateVatInput();\n },\"change\":function () {\n _vm.vatServiceValidated = false;\n _vm.validateVatInput;\n },\"keyup\":[_vm.validateVatInput,function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return (function () {\n _vm.validateVatService();\n // @ts-ignore\n _vm.$refs.vatId.blur();\n })($event)}]},model:{value:(_vm.vatId),callback:function ($$v) {_vm.vatId=$$v},expression:\"vatId\"}}),(_vm.isEUCountry)?_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"primary\",\"disabled\":_vm.vatServiceValidated,\"loading\":_vm.vatServiceLoading},on:{\"click\":_vm.validateVatService}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"subscription.confirmVatId\")))])]):_vm._e(),(_vm.vatServiceValidated)?_c('div',{staticClass:\"ml-4 d-inline-block input-fix\"},[_c('span',{staticClass:\"v-messages__message\"},[_c(VIcon,{staticClass:\"mr-1 mb-1\",attrs:{\"color\":\"primary\"}},[_vm._v(\"mdi-check-circle\")]),_vm._v(_vm._s(_vm.$t(\"subscription.vatIdValidated\")))],1)]):_vm._e()],1):_vm._e()],1),_c(VDivider,{staticClass:\"my-4\"}),_c(VCardActions,[_c(VSpacer),_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"accent\"},on:{\"click\":_vm.cancel}},[_c('span',{staticClass:\"main--text\"},[_vm._v(_vm._s(_vm.$t(\"subscription.cancel\")))])]),_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"primary\",\"disabled\":!_vm.nextEnabled},on:{\"click\":_vm.next}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"subscription.next\")))])])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/** vuelidate-property-decorators MIT LICENSE copyright 2019 Mirek Simek\n *\n * https://github.com/mesemus/vuelidate-property-decorators\n *\n **/\nimport { createDecorator, mixins } from 'vue-class-component';\n\nconst validationCreator = function () {\n const validations = this.$vnode.componentOptions.Ctor.options.__validations || {};\n const ret = {};\n\n for (const k in validations) {\n if (!validations.hasOwnProperty(k)) continue;\n let val = validations[k];\n\n if (k === '__validations__') {\n val = this[val];\n }\n\n if (typeof val === \"function\") {\n val = val.call(this);\n }\n\n if (k === '__validations__') {\n Object.assign(ret, val);\n } else {\n ret[k] = val;\n }\n }\n\n return ret;\n};\n/**\n * decorator for validations for all fields. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * name = '';\n *\n * @Validations()\n * validations = {\n * name: {required},\n * }\n * }\n *\n *\n * Template:\n *\n * \n *\n * validations may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validations()\n * validations() {\n * return {\n * // something with this.\n * }\n * }\n *\n */\n\n\nexport function Validations() {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations['__validations__'] = k;\n componentOptions.validations = validationCreator;\n });\n}\n/**\n * decorator for a validation on a single field. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * @Validate({required}})\n * name = '';\n *\n * }\n *\n * Template:\n *\n * \n *\n * validation options may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validate(() => ({'minLen': minLength(this.dynamicMinLength) }) )\n * name = ''\n */\n\nexport function Validate(rules) {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations[k] = rules;\n componentOptions.validations = validationCreator;\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\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\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\r\nimport Vue from \"vue\";\r\nimport { Component, Prop, PropSync, Watch } from \"vue-property-decorator\";\r\nimport { StripeElementPayment } from \"@vue-stripe/vue-stripe\";\r\nimport * as Settings from \"@/settings\";\r\nimport LocalStorage from \"@/core/utils/LocalStorage\";\r\nimport {\r\n StripeAddressElementChangeEvent,\r\n StripeElementLocale,\r\n StripeElements,\r\n StripePaymentElementChangeEvent,\r\n} from \"@stripe/stripe-js\";\r\nimport { Action, Getter } from \"vuex-class\";\r\nimport { validationMixin } from \"vuelidate\";\r\nimport {\r\n helpers,\r\n maxLength,\r\n minLength,\r\n required,\r\n} from \"vuelidate/lib/validators\";\r\nimport { Validations } from \"vuelidate-property-decorators\";\r\nimport { EUVat, EUVatRate } from \"@/core/plugins/eu-vat-rates\";\r\nimport api from \"@/core/utils/api\";\r\n\r\n@Component({\r\n mixins: [validationMixin],\r\n computed: {\r\n LocalStorage() {\r\n return LocalStorage;\r\n },\r\n },\r\n components: {\r\n StripeElementPayment,\r\n },\r\n})\r\nexport default class StripePaymentElementForm extends Vue {\r\n @Prop({ default: () => null }) pricing!: {\r\n tier: string;\r\n cycle: string;\r\n };\r\n @Prop({ default: () => 0 }) grossAmount!: number;\r\n @PropSync(\"stepProp\", { type: Number }) step!: number;\r\n @PropSync(\"checkoutEnabledProp\", { type: Boolean }) checkoutEnabled!: boolean;\r\n @PropSync(\"paymentElementRefProp\", {})\r\n paymentElementRef!: HTMLFormElement | null;\r\n @PropSync(\"vatIdProp\", { type: String }) vatId!: string;\r\n @PropSync(\"companyNameProp\", { type: String }) companyName!: string;\r\n @PropSync(\"countryProp\", { type: String }) country!: string;\r\n @PropSync(\"buyAsCompanyProp\", { type: Boolean }) buyAsCompany!: boolean;\r\n @PropSync(\"vatValidatedProp\", { type: Boolean }) vatValidated!: boolean;\r\n @PropSync(\"euVatProp\", {}) euVat!: EUVatRate;\r\n @Getter(\"profile/getUserName\") userName!: string;\r\n @Getter(\"profile/getUserEmail\") userEmail!: string;\r\n @Action(\"displaySnackbar\") displaySnackbar!: (msg: string) => void;\r\n\r\n pk = Settings.paymentSettings.publishableKey;\r\n elementsOptions = {\r\n appearance: { theme: \"stripe\" },\r\n testMode: Settings.paymentSettings.testMode,\r\n mode: \"subscription\",\r\n currency: \"eur\",\r\n amount: this.grossAmount,\r\n loader: \"always\",\r\n };\r\n locale = LocalStorage.getLocale();\r\n createOptions = {\r\n layout: {\r\n type: \"accordion\",\r\n defaultCollapsed: false,\r\n radios: false,\r\n spacedAccordionItems: true,\r\n },\r\n };\r\n get addressOptions() {\r\n return {\r\n mode: \"billing\",\r\n fields: {\r\n phone: \"always\",\r\n },\r\n display: {\r\n name: \"full\",\r\n },\r\n defaultValues: {\r\n name: this.userName,\r\n address: {\r\n country: \"DE\",\r\n //city: \"New York\",\r\n //line1: \"123 Main St\",\r\n //line2: \"Floor 45\",\r\n //postal_code: \"10001\",\r\n //state: \"NY\",\r\n },\r\n },\r\n };\r\n }\r\n get linkAuthOptions() {\r\n return {\r\n defaultValues: {\r\n email: this.userEmail,\r\n },\r\n };\r\n }\r\n confirmParams = {\r\n // return_url: // success url -> set in PurchaseOverview\r\n };\r\n paymentRefPolling: any = undefined;\r\n\r\n paymentComplete = false;\r\n addressComplete = false;\r\n vatComplete = true;\r\n nextEnabled = false;\r\n\r\n vatServiceValidated = true;\r\n vatServiceError = \"\";\r\n vatServiceLoading = false;\r\n\r\n @Validations()\r\n validations() {\r\n if (this.buyAsCompany)\r\n return {\r\n companyName: {\r\n required,\r\n minLength: minLength(2),\r\n maxLength: maxLength(200),\r\n },\r\n vatId: {\r\n required,\r\n vatIdRules: this.vatIdRules,\r\n },\r\n };\r\n }\r\n\r\n get isEUCountry() {\r\n let euCountries = [...Object.keys(EUVat.rates)];\r\n\r\n return euCountries.includes(this.country);\r\n }\r\n\r\n get vatIdRules() {\r\n if (this.euVat?.validation_rule)\r\n return helpers.regex(\"vatIdRules\", this.euVat.validation_rule);\r\n\r\n // Covers all non EU patterns supported by Stripe: https://docs.stripe.com/invoicing/customer/tax-ids\r\n return helpers.regex(\"vatIdRules\", /^[0-9A-Z-. ]{5,20}$/);\r\n }\r\n\r\n get vatIdErrors() {\r\n const errors: any[] = [];\r\n if (!this.$v.vatId!.$dirty) return errors;\r\n !this.$v.vatId!.required &&\r\n errors.push(this.$t(\"subscription.vatIdRequired\"));\r\n !this.$v.vatId!.vatIdRules &&\r\n errors.push(this.$t(\"subscription.vatIdInvalid\"));\r\n return errors;\r\n }\r\n\r\n get companyNameErrors() {\r\n const errors: any[] = [];\r\n if (!this.$v.companyName!.$dirty) return errors;\r\n !this.$v.companyName!.required &&\r\n errors.push(this.$t(\"subscription.companyNameRequired\"));\r\n !this.$v.companyName!.minLength &&\r\n errors.push(this.$t(\"subscription.companyNameMin\"));\r\n return errors;\r\n }\r\n\r\n async validateVatInput() {\r\n await this.$nextTick().then(() => {\r\n if (this.buyAsCompany) {\r\n this.vatComplete =\r\n !(this.vatIdErrors.length > 0) &&\r\n !(this.companyNameErrors.length > 0);\r\n if (this.vatId && this.companyName)\r\n this.vatValidated = this.vatComplete;\r\n } else {\r\n this.vatComplete = true;\r\n this.vatServiceValidated = true;\r\n this.vatValidated = false;\r\n }\r\n\r\n this.validateNext();\r\n });\r\n }\r\n\r\n async validateVatService() {\r\n if (this.isEUCountry) {\r\n this.$v.$touch();\r\n this.vatServiceValidated = false;\r\n if (!this.vatId) {\r\n this.vatServiceError = this.$t(\"subscription.vatIdRequired\").toString();\r\n this.displaySnackbar(this.vatServiceError);\r\n return;\r\n }\r\n if (!this.vatValidated) {\r\n this.vatServiceError = this.$t(\"subscription.vatIdInvalid\").toString();\r\n this.displaySnackbar(this.vatServiceError);\r\n return;\r\n }\r\n\r\n const data = { vatId: this.vatId };\r\n const endpoint = \"/api/Purchase/ValidateVat\";\r\n this.vatServiceLoading = true;\r\n\r\n return await api\r\n .post(endpoint, data)\r\n .then((result: any) => {\r\n if (result.errors.length) {\r\n console.log(result.errors[0].code, result.errors[0].description);\r\n this.displaySnackbar(\r\n this.$t(\"subscription.couldNotValidate\").toString(),\r\n );\r\n this.vatServiceLoading = false;\r\n return;\r\n }\r\n setTimeout(() => {\r\n // Vat ID is valid and exists, add more checks here e.g. compare company name/address\r\n if (result.succeeded) this.vatServiceValidated = result.succeeded;\r\n this.validateNext();\r\n this.displaySnackbar(\r\n this.$t(\"subscription.vatIdConfirmed\").toString(),\r\n );\r\n this.vatServiceLoading = false;\r\n }, 900);\r\n })\r\n .catch(error => {\r\n if (error.description === \"MS_UNAVAILABLE\") {\r\n this.vatServiceError = this.$t(\r\n \"subscription.vatServiceDown\",\r\n ).toString();\r\n this.displaySnackbar(this.vatServiceError);\r\n this.vatServiceLoading = false;\r\n return;\r\n }\r\n if (error.description === \"MS_MAX_CONCURRENT_REQ\") {\r\n this.vatServiceError = this.$t(\r\n \"subscription.vatServiceOverload\",\r\n ).toString();\r\n this.displaySnackbar(this.vatServiceError);\r\n this.vatServiceLoading = false;\r\n return;\r\n }\r\n });\r\n }\r\n }\r\n\r\n @Watch(\"vatServiceValidated\")\r\n logVatServiceValidated() {\r\n console.debug(\"vatServiceValidated\", this.vatServiceValidated);\r\n }\r\n\r\n async validatePaymentMethod(event: StripePaymentElementChangeEvent) {\r\n // Simply checks everything with potential valid input according\r\n // to Stripe: https://docs.stripe.com/js/element/events/on_change?type=paymentElement\r\n this.paymentComplete = event.complete;\r\n this.validateNext();\r\n }\r\n\r\n async validateAddress(event: StripeAddressElementChangeEvent) {\r\n this.addressComplete = event.complete;\r\n this.validateNext();\r\n // Forward country\r\n this.country = event.value.address.country;\r\n }\r\n\r\n mountAddressElement() {\r\n const elements = ((this.$refs.paymentRef as HTMLFormElement)\r\n ?.elements as unknown) as StripeElements;\r\n // @ts-ignore\r\n const addressElement = elements.create(\"address\", this.addressOptions);\r\n addressElement.mount(\"#address-element\");\r\n\r\n const linkAuthElement = elements.create(\r\n \"linkAuthentication\",\r\n this.linkAuthOptions,\r\n );\r\n linkAuthElement.mount(\"#link-auth-element\");\r\n\r\n addressElement.on(\"change\", event => {\r\n this.validateAddress(event);\r\n });\r\n }\r\n\r\n cancel() {\r\n this.step = 1;\r\n this.$router.push(\"/subscription/pricing\");\r\n }\r\n\r\n next() {\r\n this.$v.$touch();\r\n if (this.vatComplete && (this.vatServiceValidated || !this.isEUCountry))\r\n this.step = 2;\r\n else\r\n this.displaySnackbar(\r\n this.$t(\"subscription.companyIncomplete\").toString(),\r\n );\r\n\r\n this.paymentElementRef = this.$refs.paymentRef as HTMLFormElement;\r\n }\r\n\r\n validateNext() {\r\n this.paymentComplete &&\r\n this.addressComplete &&\r\n this.vatComplete &&\r\n (this.vatServiceValidated || !this.isEUCountry)\r\n ? (this.nextEnabled = true)\r\n : (this.nextEnabled = false);\r\n // Enable checkout separately in case of more next steps\r\n this.paymentComplete &&\r\n this.addressComplete &&\r\n this.vatComplete &&\r\n (this.vatServiceValidated || !this.isEUCountry)\r\n ? (this.checkoutEnabled = true)\r\n : (this.checkoutEnabled = false);\r\n }\r\n\r\n @Watch(\"country\", { immediate: true })\r\n async updateVatValidation() {\r\n this.vatServiceValidated = false;\r\n await this.validateVatInput();\r\n }\r\n\r\n watchLocalStorage = (e: any) => {\r\n e.stopImmediatePropagation();\r\n\r\n this.locale = e.detail?.storage;\r\n console.log(\"get storage event:\", this.locale);\r\n\r\n const paymentElement = this.$refs?.paymentRef as HTMLFormElement;\r\n const elements = (paymentElement?.elements as unknown) as StripeElements;\r\n\r\n elements.update({ locale: this.locale as StripeElementLocale });\r\n };\r\n\r\n mountLocalStorageWatcher() {\r\n window.addEventListener(\r\n \"locale-localstorage-changed\",\r\n this.watchLocalStorage,\r\n );\r\n }\r\n\r\n created() {\r\n // Conditional mount Address & Link Elements\r\n if (!this.paymentRefPolling)\r\n this.paymentRefPolling = setInterval(() => {\r\n // Wait till payment is mounted and user is available for prefill\r\n if (this.$refs.paymentRef && this.userName && this.userEmail) {\r\n this.mountAddressElement();\r\n this.mountLocalStorageWatcher();\r\n clearInterval(this.paymentRefPolling);\r\n this.paymentRefPolling = undefined;\r\n }\r\n }, 200);\r\n }\r\n\r\n beforeDestroy() {\r\n window.removeEventListener(\r\n \"locale-localstorage-changed\",\r\n this.watchLocalStorage,\r\n );\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StripePaymentElementForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StripePaymentElementForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./StripePaymentElementForm.vue?vue&type=template&id=95ce06e4&\"\nimport script from \"./StripePaymentElementForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./StripePaymentElementForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./StripePaymentElementForm.vue?vue&type=style&index=0&id=95ce06e4&prod&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 null,\n null\n \n)\n\nexport default component.exports","// Directives\nimport ripple from '../../directives/ripple'\n\n// Types\nimport Vue, { VNode, VNodeData, VNodeDirective } from 'vue'\n\nexport default Vue.extend({\n name: 'rippleable',\n\n directives: { ripple },\n\n props: {\n ripple: {\n type: [Boolean, Object],\n default: true,\n },\n },\n\n methods: {\n genRipple (data: VNodeData = {}): VNode | null {\n if (!this.ripple) return null\n\n data.staticClass = 'v-input--selection-controls__ripple'\n\n data.directives = data.directives || []\n data.directives.push({\n name: 'ripple',\n value: { center: true },\n } as VNodeDirective)\n\n return this.$createElement('div', data)\n },\n },\n})\n","// Styles\nimport './VCheckbox.sass'\nimport '../../styles/components/_selection-controls.sass'\n\n// Components\nimport VIcon from '../VIcon'\nimport VInput from '../VInput'\n\n// Mixins\nimport Selectable from '../../mixins/selectable'\n\n/* @vue/component */\nexport default Selectable.extend({\n name: 'v-checkbox',\n\n props: {\n indeterminate: Boolean,\n indeterminateIcon: {\n type: String,\n default: '$checkboxIndeterminate',\n },\n offIcon: {\n type: String,\n default: '$checkboxOff',\n },\n onIcon: {\n type: String,\n default: '$checkboxOn',\n },\n },\n\n data () {\n return {\n inputIndeterminate: this.indeterminate,\n }\n },\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-input--selection-controls': true,\n 'v-input--checkbox': true,\n 'v-input--indeterminate': this.inputIndeterminate,\n }\n },\n computedIcon (): string {\n if (this.inputIndeterminate) {\n return this.indeterminateIcon\n } else if (this.isActive) {\n return this.onIcon\n } else {\n return this.offIcon\n }\n },\n // Do not return undefined if disabled,\n // according to spec, should still show\n // a color when disabled and active\n validationState (): string | undefined {\n if (this.isDisabled && !this.inputIndeterminate) return undefined\n if (this.hasError && this.shouldValidate) return 'error'\n if (this.hasSuccess) return 'success'\n if (this.hasColor !== null) return this.computedColor\n return undefined\n },\n },\n\n watch: {\n indeterminate (val) {\n // https://github.com/vuetifyjs/vuetify/issues/8270\n this.$nextTick(() => (this.inputIndeterminate = val))\n },\n inputIndeterminate (val) {\n this.$emit('update:indeterminate', val)\n },\n isActive () {\n if (!this.indeterminate) return\n this.inputIndeterminate = false\n },\n },\n\n methods: {\n genCheckbox () {\n const { title, ...checkboxAttrs } = this.attrs$\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input',\n }, [\n this.$createElement(VIcon, this.setTextColor(this.validationState, {\n props: {\n dense: this.dense,\n dark: this.dark,\n light: this.light,\n },\n }), this.computedIcon),\n this.genInput('checkbox', {\n ...checkboxAttrs,\n 'aria-checked': this.inputIndeterminate\n ? 'mixed'\n : this.isActive.toString(),\n }),\n this.genRipple(this.setTextColor(this.rippleState)),\n ])\n },\n genDefaultSlot () {\n return [\n this.genCheckbox(),\n this.genLabel(),\n ]\n },\n },\n})\n","// TODO add to fork of benbucksch/eu-vat-rates on Github\r\nexport const EUVat: EUVatData = {\r\n source:\r\n \"https://europa.eu/youreurope/business/taxation/vat/vat-rules-rates/index_en.htm#inline-nav-8\",\r\n last_updated: \"2024-06-17T05:08Z\",\r\n disclaimer:\r\n \"This data is compiled from official European Commission and other sources to be as accurate as possible, however no guarantee of accuracy is provided. Use at your own risk. Don't trust random people on the internet without doing your own research.\",\r\n\r\n rates: {\r\n AT: {\r\n country: \"Austria\",\r\n vat_name: \"Umsatzsteuer\",\r\n vat_abbr: \"USt\",\r\n standard_rate: 20.0,\r\n reduced_rate: 10.0,\r\n reduced_rate_alt: 13.0,\r\n super_reduced_rate: false,\r\n parking_rate: 13.0,\r\n validation_rule: /^(AT)?U[0-9]{8}$/,\r\n },\r\n BE: {\r\n country: \"Belgium\",\r\n vat_name: \"Taxe sur la valeur ajoutée\",\r\n vat_abbr: \"TVA/BTW\",\r\n standard_rate: 21.0,\r\n reduced_rate: 6.0,\r\n reduced_rate_alt: 12.0,\r\n super_reduced_rate: false,\r\n parking_rate: 12.0,\r\n validation_rule: /^(BE)?0[0-9]{9}$/,\r\n },\r\n BG: {\r\n country: \"Bulgaria\",\r\n vat_name: \"Dana Dobavena Stoynost\",\r\n vat_abbr: \"DDS\",\r\n standard_rate: 20.0,\r\n reduced_rate: 9.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(BG)?[0-9]{9,10}$/,\r\n },\r\n CY: {\r\n country: \"Cyprus\",\r\n vat_name: \"Foros prostithemenis axias\",\r\n vat_abbr: \"FPA\",\r\n standard_rate: 19.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 9.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(CY)?[0-9]{8}L$/,\r\n },\r\n CZ: {\r\n country: \"Czech Republic\",\r\n vat_name: \"Dani z pridane hotnoty\",\r\n vat_abbr: \"DPH\",\r\n standard_rate: 21.0,\r\n reduced_rate: 12.0,\r\n reduced_rate_alt: 15.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(CZ)?[0-9]{8,10}$/,\r\n },\r\n DE: {\r\n country: \"Germany\",\r\n vat_name: \"Umsatzsteuer\",\r\n vat_abbr: \"USt\",\r\n standard_rate: 19.0,\r\n reduced_rate: 7.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(DE)?[0-9]{9}$/,\r\n },\r\n DK: {\r\n country: \"Denmark\",\r\n vat_name: \"Omsaetningsavgift\",\r\n vat_abbr: \"MOMS\",\r\n standard_rate: 25.0,\r\n reduced_rate: false,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(DK)?[0-9]{8}$/,\r\n },\r\n EE: {\r\n country: \"Estonia\",\r\n vat_name: \"Käibemaks\",\r\n vat_abbr: \"KMKR\",\r\n standard_rate: 22.0,\r\n reduced_rate: 9.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(EE)?[0-9]{9}$/,\r\n },\r\n GR: {\r\n country: \"Greece\",\r\n vat_name: \"Foros prostithemenis axias\",\r\n vat_abbr: \"FPA\",\r\n standard_rate: 24.0,\r\n reduced_rate: 6.0,\r\n reduced_rate_alt: 13.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(EL|GR)?[0-9]{9}$/,\r\n },\r\n ES: {\r\n country: \"Spain\",\r\n vat_name: \"Impuesto sobre el valor añadido\",\r\n vat_abbr: \"IVA\",\r\n standard_rate: 21.0,\r\n reduced_rate: 10.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]$/,\r\n },\r\n FI: {\r\n country: \"Finland\",\r\n vat_name: \"Arvonlisävero\",\r\n vat_abbr: \"ALV\",\r\n standard_rate: 24.0,\r\n reduced_rate: 10.0,\r\n reduced_rate_alt: 14.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(FI)?[0-9]{8}$/,\r\n },\r\n FR: {\r\n country: \"France\",\r\n vat_name: \"Taxe sur la valeur ajoutée\",\r\n vat_abbr: \"TVA\",\r\n standard_rate: 20.0,\r\n reduced_rate: 5.5,\r\n reduced_rate_alt: 10.0,\r\n super_reduced_rate: 2.1,\r\n parking_rate: false,\r\n validation_rule: /^(FR)?[0-9A-Z]{2}[0-9]{9}$/,\r\n },\r\n HR: {\r\n country: \"Croatia\",\r\n vat_name: \"Porez na dodanu vrijednost\",\r\n vat_abbr: \"PDV\",\r\n standard_rate: 25.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 13.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(HR)?[0-9]{11}$/,\r\n },\r\n HU: {\r\n country: \"Hungary\",\r\n vat_name: \"Általános forgalmi adó\",\r\n vat_abbr: \"AFA\",\r\n standard_rate: 27.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 18.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(HU)?[0-9]{8}$/,\r\n },\r\n IE: {\r\n country: \"Ireland\",\r\n vat_name: \"Value added tax\",\r\n vat_abbr: \"VAT\",\r\n standard_rate: 23.0,\r\n reduced_rate: 9.0,\r\n reduced_rate_alt: 13.5,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(IE)?[0-9]{1}[0-9A-Z]{1}[0-9]{5}[A-Z]{1,2}$/,\r\n },\r\n IT: {\r\n country: \"Italy\",\r\n vat_name: \"Imposta sul valore aggiunto\",\r\n vat_abbr: \"IVA\",\r\n standard_rate: 22.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 10.0,\r\n super_reduced_rate: 4.0,\r\n parking_rate: false,\r\n validation_rule: /^(IT)?[0-9]{11}$/,\r\n },\r\n LT: {\r\n country: \"Lithuania\",\r\n vat_name: \"Pridetines vertes mokestis\",\r\n vat_abbr: \"PVM\",\r\n standard_rate: 21.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 9.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(LT)?([0-9]{9}|[0-9]{12})$/,\r\n },\r\n LU: {\r\n country: \"Luxembourg\",\r\n vat_name: \"Taxe sur la valeur ajoutée\",\r\n vat_abbr: \"TVA\",\r\n standard_rate: 17.0,\r\n reduced_rate: 8.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: 3.0,\r\n parking_rate: 14.0,\r\n validation_rule: /^(LU)?[0-9]{8}$/,\r\n },\r\n LV: {\r\n country: \"Latvia\",\r\n vat_name: \"Pievienotas vertibas nodoklis\",\r\n vat_abbr: \"PVN\",\r\n standard_rate: 21.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 12.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(LV)?[0-9]{11}$/,\r\n },\r\n MT: {\r\n country: \"Malta\",\r\n vat_name: \"Value added tax\",\r\n vat_abbr: \"VAT\",\r\n standard_rate: 18.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 7.0,\r\n super_reduced_rate: false,\r\n parking_rate: 12.0,\r\n validation_rule: /^(MT)?[0-9]{8}$/,\r\n },\r\n NL: {\r\n country: \"Netherlands\",\r\n vat_name: \"Omzetbelasting\",\r\n vat_abbr: \"OB\",\r\n standard_rate: 21.0,\r\n reduced_rate: 9.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(NL)?[0-9]{9}B[0-9]{2}$/,\r\n },\r\n PL: {\r\n country: \"Poland\",\r\n vat_name: \"Podatek od towaròw i uslug\",\r\n vat_abbr: \"VAT\",\r\n standard_rate: 23.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 8.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(PL)?[0-9]{10}$/,\r\n },\r\n PT: {\r\n country: \"Portugal\",\r\n vat_name: \"Imposto sobre o valor acrescentado\",\r\n vat_abbr: \"IVA\",\r\n standard_rate: 23.0,\r\n reduced_rate: 6.0,\r\n reduced_rate_alt: 13.0,\r\n super_reduced_rate: false,\r\n parking_rate: 13.0,\r\n validation_rule: /^(PT)?[0-9]{9}$/,\r\n },\r\n RO: {\r\n country: \"Romania\",\r\n vat_name: \"Taxa pe valoarea adãugata\",\r\n vat_abbr: \"TVA\",\r\n standard_rate: 19.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 9.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(RO)?[0-9]{2,10}$/,\r\n },\r\n SE: {\r\n country: \"Sweden\",\r\n vat_name: \"Mervärdeskatt\",\r\n vat_abbr: \"ML\",\r\n standard_rate: 25.0,\r\n reduced_rate: 6.0,\r\n reduced_rate_alt: 12.0,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(SE)?[0-9]{12}$/,\r\n },\r\n SI: {\r\n country: \"Slovenia\",\r\n vat_name: \"Davek na dodano vred nost\",\r\n vat_abbr: \"DDV\",\r\n standard_rate: 22.0,\r\n reduced_rate: 5.0,\r\n reduced_rate_alt: 9.5,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(SI)?[0-9]{8}$/,\r\n },\r\n SK: {\r\n country: \"Slovakia\",\r\n vat_name: \"Dan z pridanej hodnoty\",\r\n vat_abbr: \"DPH\",\r\n standard_rate: 20.0,\r\n reduced_rate: 10.0,\r\n reduced_rate_alt: false,\r\n super_reduced_rate: false,\r\n parking_rate: false,\r\n validation_rule: /^(SK)?[0-9]{10}$/,\r\n },\r\n },\r\n};\r\n\r\nexport interface EUVatRate {\r\n country: string;\r\n vat_name: string;\r\n vat_abbr: string;\r\n standard_rate: number | boolean;\r\n reduced_rate: number | boolean;\r\n reduced_rate_alt: number | boolean;\r\n super_reduced_rate: number | boolean;\r\n parking_rate: number | boolean;\r\n validation_rule: any;\r\n}\r\nexport type EUVatRates = { [id: string]: EUVatRate };\r\n\r\nexport interface EUVatData {\r\n source: string;\r\n last_updated: string;\r\n disclaimer: string;\r\n rates: EUVatRates;\r\n}\r\n","// Components\nimport VInput from '../../components/VInput'\n\n// Mixins\nimport Rippleable from '../rippleable'\nimport Comparable from '../comparable'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\nexport function prevent (e: Event) {\n e.preventDefault()\n}\n\n/* @vue/component */\nexport default mixins(\n VInput,\n Rippleable,\n Comparable\n).extend({\n name: 'selectable',\n\n model: {\n prop: 'inputValue',\n event: 'change',\n },\n\n props: {\n id: String,\n inputValue: null as any,\n falseValue: null as any,\n trueValue: null as any,\n multiple: {\n type: Boolean,\n default: null,\n },\n label: String,\n },\n\n data () {\n return {\n hasColor: this.inputValue,\n lazyValue: this.inputValue,\n }\n },\n\n computed: {\n computedColor (): string | undefined {\n if (!this.isActive) return undefined\n if (this.color) return this.color\n if (this.isDark && !this.appIsDark) return 'white'\n return 'primary'\n },\n isMultiple (): boolean {\n return this.multiple === true || (this.multiple === null && Array.isArray(this.internalValue))\n },\n isActive (): boolean {\n const value = this.value\n const input = this.internalValue\n\n if (this.isMultiple) {\n if (!Array.isArray(input)) return false\n\n return input.some(item => this.valueComparator(item, value))\n }\n\n if (this.trueValue === undefined || this.falseValue === undefined) {\n return value\n ? this.valueComparator(value, input)\n : Boolean(input)\n }\n\n return this.valueComparator(input, this.trueValue)\n },\n isDirty (): boolean {\n return this.isActive\n },\n rippleState (): string | undefined {\n return !this.isDisabled && !this.validationState\n ? undefined\n : this.validationState\n },\n },\n\n watch: {\n inputValue (val) {\n this.lazyValue = val\n this.hasColor = val\n },\n },\n\n methods: {\n genLabel () {\n const label = VInput.options.methods.genLabel.call(this)\n\n if (!label) return label\n\n label!.data!.on = {\n // Label shouldn't cause the input to focus\n click: prevent,\n }\n\n return label\n },\n genInput (type: string, attrs: object) {\n return this.$createElement('input', {\n attrs: Object.assign({\n 'aria-checked': this.isActive.toString(),\n disabled: this.isDisabled,\n id: this.computedId,\n role: type,\n type,\n }, attrs),\n domProps: {\n value: this.value,\n checked: this.isActive,\n },\n on: {\n blur: this.onBlur,\n change: this.onChange,\n focus: this.onFocus,\n keydown: this.onKeydown,\n click: prevent,\n },\n ref: 'input',\n })\n },\n onClick (e: Event) {\n this.onChange()\n this.$emit('click', e)\n },\n onChange () {\n if (!this.isInteractive) return\n\n const value = this.value\n let input = this.internalValue\n\n if (this.isMultiple) {\n if (!Array.isArray(input)) {\n input = []\n }\n\n const length = input.length\n\n input = input.filter((item: any) => !this.valueComparator(item, value))\n\n if (input.length === length) {\n input.push(value)\n }\n } else if (this.trueValue !== undefined && this.falseValue !== undefined) {\n input = this.valueComparator(input, this.trueValue) ? this.falseValue : this.trueValue\n } else if (value) {\n input = this.valueComparator(input, value) ? null : value\n } else {\n input = !input\n }\n\n this.validate(true, input)\n this.internalValue = input\n this.hasColor = input\n },\n onFocus (e: FocusEvent) {\n this.isFocused = true\n this.$emit('focus', e)\n },\n onBlur (e: FocusEvent) {\n this.isFocused = false\n this.$emit('blur', e)\n },\n /** @abstract */\n onKeydown (e: Event) {},\n },\n})\n"],"sourceRoot":""}