{"version":3,"sources":["webpack:///./resources/js/src/app/ceres/mixins/buttonSizeProperty.mixin.js","webpack:///./resources/js/src/app/eros/components/customer/login/Login.vue","webpack:///./resources/js/src/app/eros/components/customer/login/Login.vue?4a59","webpack:///resources/js/src/app/eros/components/customer/login/Login.vue","webpack:///./resources/js/src/app/eros/components/customer/login/Login.vue?8434"],"names":["BUTTON_SIZES","LEGACY_CLASS_MAP","ButtonSizePropertyMixin","props","buttonSize","type","String","default","validator","value","concat","_toConsumableArray","Object","keys","indexOf","computed","buttonSizeClass","hasOwnProperty","this","render","_vm","_c","_self","staticClass","isFromGuestInput","attrs","_v","_s","$translate","_e","ref","_uid","class","modalElement","directives","name","rawName","username","expression","domProps","on","$event","target","composing","password","row","showResetPwdView","_t","isDisabled","preventDefault","validateLogin","apply","arguments","allowGuestCheckout","authGuest","_withStripped","component"],"mappings":"87BAAA,IAAMA,EAAe,CAAC,SAAU,UAE1BC,EAAmB,CACrB,GAAM,SACN,GAAM,GACN,GAAM,UAGGC,EACb,CACIC,MAAO,CACHC,WACA,CACIC,KAAM,CAACC,OAAQ,MACfC,QAAS,KACTC,UAAW,SAAAC,GAEP,OAIsB,IAJf,CACH,IAAEC,OACCV,EAAYW,EACZC,OAAOC,KAAKZ,KACjBa,QAAQL,MAKtBM,SAAU,CACNC,gBAAe,WAEX,OAAIf,EAAiBgB,eAAeC,KAAKd,YAE9BH,EAAiBiB,KAAKd,YAG1Bc,KAAKd,e,wCClCxB,IAAIe,EAAS,WAAkB,IAAIC,EAAIF,KAAKG,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAAEH,EAAII,iBAAkBH,EAAG,MAAM,CAACE,YAAY,8CAA8C,CAACF,EAAG,MAAM,CAACE,YAAY,qBAAqB,CAACF,EAAG,MAAM,CAACI,MAAM,CAAC,MAAQ,6BAA6B,QAAU,cAAc,MAAQ,KAAK,OAAS,OAAO,CAACJ,EAAG,SAAS,CAACI,MAAM,C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EAEA,iCAIA,OACA,uBACA,mBAGA,uBACA,oBAIA,SAIA,qBACA,kEAGA,oCACA,0CACA,iBACA,iBAEA,kBACA,qCAGA,gCACA,mBAEA,uDACA,iBACA,YACA,2CACA,+BACA,2BAGA,kBACA,oBASA,gCACA,mBAEA,eACA,0BACA,6CACA,2BAEA,kBACA,sBAEA,mFAEA,8BACA,gDACA,0BACA,iCAEA,qBAGA,kBAGA,OAFA,gBAEA,cACA,SACA,gFAEA,oCAEA,gEACA,kCAEA,iDACA,MACA,QACA,YAKA,uCACA,kBAEA,8DAEA,yBACA,0CACA,eAEA,0BAEA,iDAEA,eACA,sEAEA,QAKA,sBACA,sFACA,iD,OC7PIC,EAAY,YACd,EACArC,EHPoB,IGSpB,EACA,KACA,KACA,MAIa,UAAAqC,E","file":"chunks/eros-base-client-4.min.js","sourcesContent":["const BUTTON_SIZES = [\"btn-sm\", \"btn-lg\"];\n\nconst LEGACY_CLASS_MAP = {\n \"sm\": \"btn-sm\",\n \"md\": \"\",\n \"lg\": \"btn-lg\"\n};\n\nexport const ButtonSizePropertyMixin =\n{\n props: {\n buttonSize:\n {\n type: [String, null],\n default: null,\n validator: value =>\n {\n return [\n \"\",\n ...BUTTON_SIZES,\n ...Object.keys(LEGACY_CLASS_MAP)\n ].indexOf(value) !== -1;\n }\n }\n },\n\n computed: {\n buttonSizeClass()\n {\n if (LEGACY_CLASS_MAP.hasOwnProperty(this.buttonSize))\n {\n return LEGACY_CLASS_MAP[this.buttonSize];\n }\n\n return this.buttonSize;\n }\n }\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"login-pwd-reset\"},[(_vm.isFromGuestInput)?_c('div',{staticClass:\"alert alert-success w-100 text-body d-flex\"},[_c('div',{staticClass:\"align-self-center\"},[_c('svg',{attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"viewBox\":\"0 0 100 100\",\"width\":\"30\",\"height\":\"30\"}},[_c('circle',{attrs:{\"cx\":\"50\",\"cy\":\"50\",\"r\":\"45\",\"stroke\":\"#617b25\",\"stroke-width\":\"5\",\"fill\":\"none\"}}),_vm._v(\" \"),_c('ellipse',{attrs:{\"cx\":\"30\",\"cy\":\"35\",\"rx\":\"5\",\"ry\":\"5\",\"fill\":\"#617b25\"}}),_vm._v(\" \"),_c('ellipse',{attrs:{\"cx\":\"70\",\"cy\":\"35\",\"rx\":\"5\",\"ry\":\"5\",\"fill\":\"#617b25\"}}),_vm._v(\" \"),_c('path',{attrs:{\"d\":\"M30,55 Q50,85 70,55\",\"stroke\":\"#617b25\",\"stroke-width\":\"5\",\"fill\":\"none\"}})])]),_vm._v(\" \"),_c('div',{staticClass:\"col pr-0\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.$translate('Eros::Template.loginAlreadyHasAnAccount'))+\"\\n \")])]):_vm._e(),_vm._v(\" \"),_c('form',{ref:\"loginForm\",attrs:{\"id\":'login-form-' + _vm._uid,\"method\":\"post\"}},[_c('div',{class:{ 'modal-body': _vm.modalElement }},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"input-unit\",attrs:{\"data-validate\":\"mail\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"data-testing\":\"email-login\",\"type\":\"email\",\"name\":\"email\",\"autocomplete\":\"email\",\"id\":'email' + _vm._uid,\"data-autofocus\":\"\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing)return;_vm.username=$event.target.value}}}),_vm._v(\" \"),_c('label',{attrs:{\"for\":'email' + _vm._uid}},[_vm._v(_vm._s(_vm.$translate(\"Ceres::Template.loginEmail\"))+\"*\")])]),_vm._v(\" \"),_c('span',{staticClass:\"error-msg\"},[_vm._v(_vm._s(_vm.$translate(\"Ceres::Template.loginEnterConfirmEmail\")))])]),_vm._v(\" \"),_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"input-unit\",class:{ 'no-bottom': _vm.modalElement },attrs:{\"data-validate\":\"text\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"data-testing\":\"password-login\",\"type\":\"password\",\"name\":\"password\",\"autocomplete\":\"current-password\",\"id\":'password' + _vm._uid},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing)return;_vm.password=$event.target.value}}}),_vm._v(\" \"),_c('label',{attrs:{\"for\":'password' + _vm._uid}},[_vm._v(_vm._s(_vm.$translate(\"Ceres::Template.loginPassword\"))+\"*\")])]),_vm._v(\" \"),_c('span',{staticClass:\"error-msg\"},[_vm._v(_vm._s(_vm.$translate(\"Ceres::Template.loginEmptyPassword\")))])])])]),_vm._v(\" \"),_c('div',{class:{ 'modal-footer justify-content-between': _vm.modalElement, row: !_vm.modalElement }},[_c('div',{class:{ 'col-7 col-sm-4': !_vm.modalElement }},[_c('a',{staticClass:\"small text-appearance\",attrs:{\"href\":\"javascript:void(0)\"},on:{\"click\":_vm.showResetPwdView}},[_vm._v(_vm._s(_vm.$translate(\"Ceres::Template.loginForgotPassword\"))+\"?\")])]),_vm._v(\" \"),_c('div',{class:{ 'col-5 col-sm-8 text-sm-right': !_vm.modalElement }},[_vm._t(\"extend-overlay-buttons\"),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-primary btn-appearance btn-medium\",class:[{ 'float-right': !_vm.modalElement }, _vm.buttonSizeClass],attrs:{\"data-testing\":\"submit-login\",\"disabled\":_vm.isDisabled},on:{\"click\":function($event){$event.preventDefault();return _vm.validateLogin.apply(null, arguments)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.$translate(\"Ceres::Template.login\"))+\"\\n\\t\\t\\t\\t\\t\\t\"),_c('icon',{attrs:{\"icon\":\"user\",\"loading\":_vm.isDisabled}})],1),_vm._v(\" \"),(_vm.isFromGuestInput && _vm.allowGuestCheckout)?_c('button',{staticClass:\"btn btn-primary btn-appearance btn-medium float-right mt-3\",class:[_vm.buttonSizeClass],attrs:{\"data-testing\":\"guest-login\",\"disabled\":_vm.isDisabled},on:{\"click\":function($event){$event.preventDefault();return _vm.authGuest.apply(null, arguments)}}},[_c('span',{staticClass:\"pr-2\"},[_vm._v(_vm._s(_vm.$translate(\"Eros::Template.continueAsGuest\")))]),_vm._v(\" \"),_c('icon',{attrs:{\"icon\":\"arrow-right\",\"loading\":_vm.isDisabled}})],1):_vm._e()],2)])])])\n}\nvar staticRenderFns = []\nrender._withStripped = true\nexport { render, staticRenderFns }","import mod from \"-!../../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.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!./Login.vue?vue&type=script&lang=js\"","<template>\n\t<div class=\"login-pwd-reset\">\n\t\t<div v-if=\"isFromGuestInput\" class=\"alert alert-success w-100 text-body d-flex\">\n <div class=\"align-self-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" width=\"30\" height=\"30\">\n <!-- Äußerer Kreis -->\n <circle cx=\"50\" cy=\"50\" r=\"45\" stroke=\"#617b25\" stroke-width=\"5\" fill=\"none\"></circle>\n <!-- Augen -->\n <ellipse cx=\"30\" cy=\"35\" rx=\"5\" ry=\"5\" fill=\"#617b25\"></ellipse>\n <ellipse cx=\"70\" cy=\"35\" rx=\"5\" ry=\"5\" fill=\"#617b25\"></ellipse>\n <!-- Mund -->\n <path d=\"M30,55 Q50,85 70,55\" stroke=\"#617b25\" stroke-width=\"5\" fill=\"none\"></path>\n </svg>\n </div>\n <div class=\"col pr-0\">\n\t\t\t\t{{ $translate('Eros::Template.loginAlreadyHasAnAccount') }}\n </div>\n </div>\n\t\t<form ref=\"loginForm\" :id=\"'login-form-' + _uid\" method=\"post\">\n\t\t\t<div :class=\"{ 'modal-body': modalElement }\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t<div class=\"input-unit\" data-validate=\"mail\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tdata-testing=\"email-login\"\n\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\tautocomplete=\"email\"\n\t\t\t\t\t\t\t\t:id=\"'email' + _uid\"\n\t\t\t\t\t\t\t\tv-model=\"username\"\n\t\t\t\t\t\t\t\tdata-autofocus\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<label :for=\"'email' + _uid\">{{ $translate(\"Ceres::Template.loginEmail\") }}*</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"error-msg\">{{ $translate(\"Ceres::Template.loginEnterConfirmEmail\") }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t<div class=\"input-unit\" :class=\"{ 'no-bottom': modalElement }\" data-validate=\"text\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tdata-testing=\"password-login\"\n\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\tautocomplete=\"current-password\"\n\t\t\t\t\t\t\t\t:id=\"'password' + _uid\"\n\t\t\t\t\t\t\t\tv-model=\"password\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<label :for=\"'password' + _uid\">{{ $translate(\"Ceres::Template.loginPassword\") }}*</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"error-msg\">{{ $translate(\"Ceres::Template.loginEmptyPassword\") }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div :class=\"{ 'modal-footer justify-content-between': modalElement, row: !modalElement }\">\n\t\t\t\t<div :class=\"{ 'col-7 col-sm-4': !modalElement }\">\n\t\t\t\t\t<a href=\"javascript:void(0)\" @click=\"showResetPwdView\" class=\"small text-appearance\"\n\t\t\t\t\t\t>{{ $translate(\"Ceres::Template.loginForgotPassword\") }}?</a\n\t\t\t\t\t>\n\t\t\t\t</div>\n\t\t\t\t<div :class=\"{ 'col-5 col-sm-8 text-sm-right': !modalElement }\">\n\t\t\t\t\t<slot name=\"extend-overlay-buttons\"></slot>\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-testing=\"submit-login\"\n\t\t\t\t\t\t@click.prevent=\"validateLogin\"\n\t\t\t\t\t\t:disabled=\"isDisabled\"\n\t\t\t\t\t\tclass=\"btn btn-primary btn-appearance btn-medium\"\n\t\t\t\t\t\t:class=\"[{ 'float-right': !modalElement }, buttonSizeClass]\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $translate(\"Ceres::Template.login\") }}\n\t\t\t\t\t\t<icon icon=\"user\" :loading=\"isDisabled\"></icon>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tv-if=\"isFromGuestInput && allowGuestCheckout\"\n\t\t\t\t\t\tdata-testing=\"guest-login\"\n\t\t\t\t\t\t@click.prevent=\"authGuest\"\n\t\t\t\t\t\t:disabled=\"isDisabled\"\n\t\t\t\t\t\tclass=\"btn btn-primary btn-appearance btn-medium float-right mt-3\"\n\t\t\t\t\t\t:class=\"[buttonSizeClass]\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"pr-2\">{{ $translate(\"Eros::Template.continueAsGuest\") }}</span>\n\t\t\t\t\t\t<icon icon=\"arrow-right\" :loading=\"isDisabled\"></icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>\n\t</div>\n</template>\n\n<script>\nimport { ButtonSizePropertyMixin } from \"../../../../ceres/mixins/buttonSizeProperty.mixin\";\n\nimport ApiService from \"../../../../ceres/services/ApiService\";\nimport NotificationService from \"../../../../ceres/services/NotificationService\";\nimport ModalService from \"../../../../ceres/services/ModalService\";\nimport AutoFocusService from \"../../../../ceres/services/AutoFocusService\";\nimport ValidationService from \"../../../../ceres/services/ValidationService\";\nimport { navigateTo } from \"../../../services/UrlService\";\nimport { getContainingComponent, isDefined } from \"../../../../ceres/helper/utils\";\n\nexport default {\n\tmixins: [ButtonSizePropertyMixin],\n\n\tprops: {\n\t\tbacklink: {\n\t\t\ttype: String\n\t\t},\n\t\tmodalElement: {\n\t\t\ttype: String\n\t\t},\n\t\thasToForward: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tinitialMail: {\n\t\t\ttype: String,\n\t\t\tdefault: \"\"\n\t\t},\n\t\tallowGuestCheckout: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tpassword: \"\",\n\t\t\tusername: \"\",\n\t\t\tloginFields: [],\n\t\t\tisDisabled: false,\n\t\t\tisLogin: App.templateType === \"login\",\n\t\t\tisFromGuestInput: false\n\t\t};\n\t},\n\n\tcreated() {\n\t\tif (this.initialMail.length > 0) {\n\t\t\tthis.isFromGuestInput = true;\n\t\t\tthis.username = this.initialMail;\n\t\t}\n\t},\n\n\tmounted() {\n\t\tthis.$nextTick(() => {\n\t\t\tthis.loginFields = this.$refs.loginForm.querySelectorAll(\".input-unit\");\n\n\t\t\tAutoFocusService.triggerAutoFocus();\n\t\t});\n\t},\n\n\twatch: {\n\t\tpassword(val, oldVal) {\n\t\t\tthis.resetError();\n\t\t},\n\n\t\tusername(val, oldVal) {\n\t\t\tthis.resetError();\n\t\t}\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Open the login modal\n\t\t */\n\t\tshowLogin() {\n\t\t\tModalService.findModal(document.getElementById(this.modalElement)).show();\n\t\t},\n\n\t\tvalidateLogin() {\n\t\t\tValidationService.validate($(\"#login-form-\" + this._uid))\n\t\t\t\t.done(() => {\n\t\t\t\t\tthis.sendLogin();\n\t\t\t\t})\n\t\t\t\t.fail((invalidFields) => {\n\t\t\t\t\tValidationService.markInvalidFields(invalidFields, \"error\");\n\t\t\t\t});\n\t\t},\n\t\tauthGuest() {\n\t\t\tthis.isDisabled = true;\n\n\t\t\tApiService.post(\"/rest/io/guest\", { email: this.username })\n\t\t\t\t.done(() => {\n\t\t\t\t\tnavigateTo(\n\t\t\t\t\t\tisDefined(this.backlink) && this.backlink.length\n\t\t\t\t\t\t\t? decodeURIComponent(this.backlink)\n\t\t\t\t\t\t\t: window.location.origin\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t\t.fail((__) => {\n\t\t\t\t\tthis.isDisabled = false;\n\t\t\t\t});\n\n\t\t},\n\n\n\t\t/**\n\t\t * Send the login data\n\t\t */\n\t\tsendLogin() {\n\t\t\tthis.isDisabled = true;\n\n\t\t\tApiService.post(\n\t\t\t\t\"/rest/io/customer/login\",\n\t\t\t\t{ email: this.username, password: this.password },\n\t\t\t\t{ supressNotifications: true }\n\t\t\t)\n\t\t\t\t.done((response) => {\n\t\t\t\t\tApiService.setToken(response);\n\n\t\t\t\t\tNotificationService.success(this.$translate(\"Ceres::Template.loginSuccessful\")).closeAfter(3000);\n\n\t\t\t\t\tif (this.backlink !== null && this.backlink) {\n\t\t\t\t\t\tlocation.assign(decodeURIComponent(this.backlink));\n\t\t\t\t\t} else if (this.hasToForward || this.isLogin) {\n\t\t\t\t\t\tlocation.assign(location.origin);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.fail((response) => {\n\t\t\t\t\tthis.isDisabled = false;\n\n\t\t\t\t\tswitch (response.error.code) {\n\t\t\t\t\t\tcase 401:\n\t\t\t\t\t\t\tthis.loginFields.forEach((element) => element.classList.add(\"has-login-error\"));\n\n\t\t\t\t\t\t\tlet translationKey = \"Ceres::Template.loginFailed\";\n\n\t\t\t\t\t\t\tif (response.error.message.length > 0 && response.error.message === \"user is blocked\") {\n\t\t\t\t\t\t\t\ttranslationKey = \"Ceres::Template.loginBlocked\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNotificationService.error(this.$translate(translationKey)).closeAfter(10000);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\t\tshowResetPwdView() {\n\t\t\tthis.resetError();\n\n\t\t\tthis.$store.dispatch(\"loadComponent\", \"forgot-password-modal\");\n\n\t\t\tVue.nextTick(() => {\n\t\t\t\tlet modalDOM = document.querySelector(\"#resetPwd\");\n\t\t\t\tlet modalVue = getContainingComponent(modalDOM);\n\n\t\t\t\tmodalVue.$data.username = this.username;\n\n\t\t\t\tlet showModal = () => ModalService.findModal(modalDOM).show();\n\n\t\t\t\tif (this.modalElement) {\n\t\t\t\t\tModalService.findModal(document.getElementById(this.modalElement)).hide().then(showModal);\n\t\t\t\t} else {\n\t\t\t\t\tshowModal();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tresetError() {\n\t\t\tthis.loginFields.forEach((element) => element.classList.remove(\"has-login-error\"));\n\t\t\tValidationService.unmarkAllFields(\"#login-form-\" + this._uid);\n\t\t}\n\t}\n};\n</script>\n","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=2c336e5b\"\nimport script from \"./Login.vue?vue&type=script&lang=js\"\nexport * from \"./Login.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"],"sourceRoot":""}