{"version":3,"sources":["webpack:///resources/js/src/app/components/customer/login/ForgotPassword.vue","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue?1774","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue?00e0","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue?e6ba"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA,+BAFA;AAIA;AACA;AADA,GAJA;AAQA,MARA,kBASA;AACA;AACA,kBADA;AAEA,uBAFA;AAGA;AAHA;AAKA,GAfA;AAiBA,SAjBA,qBAkBA;AAAA;;AACA,+BACA;AACA,gEACA;AACA;AACA,OAHA;AAKA;;AAEA,2IACA;AACA;AAEA;AACA;AACA,KAfA;AAgBA,GAnCA;AAqCA,SACA;AACA,YADA,oBACA,GADA,EACA,MADA,EAEA;AACA;AACA;AAJA,GAtCA;AA6CA,WACA;AACA,oBADA,8BAEA;AAAA;;AACA,0EACA,QADA,CACA,mBADA,EAEA,IAFA,CAEA,YACA;AACA;AACA,OALA,EAMA,IANA,CAMA,yBACA;AACA;AACA,OATA;AAUA,KAbA;;AAeA;AACA;AACA;AACA,gBAlBA,0BAmBA;AAAA;;AACA;AAEA;AAAA;AAAA;AAAA,SACA,IADA,CACA,YACA;AACA;AACA;AAEA,sFACA,qDADA,EAEA,UAFA,CAEA,IAFA;AAIA,OAVA,EAWA,IAXA,CAWA,YACA;AACA;AAEA,oFACA,kEADA,EAEA,UAFA,CAEA,IAFA;AAGA,OAlBA;AAmBA,KAzCA;AA2CA,kBA3CA,4BA4CA;AACA;AAEA,qEACA,SADA,CACA,mBADA,EAEA,IAFA,GAGA,IAHA,CAGA,YACA;AACA,uEACA,SADA,CACA,gCADA,EAEA,IAFA;AAGA,OARA;AASA,KAxDA;AA0DA,cA1DA,wBA2DA;AACA;AACA;AA7DA;AA9CA,G;;;;;;;;;;;;ACrDA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,SAAS;AACT;AACA,qBAAqB,8BAA8B;AACnD,uBAAuB,+BAA+B;AACtD,yBAAyB,8BAA8B;AACvD,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA,mBAAmB,wDAAwD;AAC3E;AACA,gCAAgC,4BAA4B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,iCAAiC,sBAAsB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,qCAAqC,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,qCAAqC,SAAS,yBAAyB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,sCAAsC;AACtC,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClOA;AAAA;AAAA;AAAA;AAA6F;AAC3B;AACL;;;AAG7D;AACyG;AACzG,gBAAgB,2GAAU;AAC1B,EAAE,oFAAM;AACR,EAAE,yFAAM;AACR,EAAE,kGAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;ACtCf;AAAA;AAAA,wCAA4M,CAAgB,kPAAG,EAAC,C;;;;;;;;;;;;ACAhO;AAAA;AAAA;AAAA;AAAA;AAAA","file":"chunks/ceres-32.js","sourcesContent":["<template>\n\t<form :id=\"'reset-pwd-form-' + _uid\" method=\"post\" class=\"reset-pwd-container login-pwd-reset\">\n\t\t<div class=\"modal fade\" id=\"resetPwd\" ref=\"pwdModal\" tabindex=\"-1\" role=\"dialog\">\n\t\t\t<div class=\"modal-dialog\">\n\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t\t<div class=\"modal-title h3\">{{ $translate(\"Ceres::Template.loginForgotPassword\") }}</div>\n\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" :aria-label=\"$translate('Ceres::Template.closeIcon')\">&times;</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"modal-body\">\n\t\t\t\t\t\t<div class=\"alert alert-info w-100 pwd-forgot-info\">\n\t\t\t\t\t\t\t<span class=\"info-badge\">{{ $translate(\"Ceres::Template.loginForgotPasswordInfo\") }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-12\">\n                                <input class=\"honey\" type=\"text\" name=\"username\" autocomplete=\"new-password\" tabindex=\"-1\" v-model=\"honeypot\">\n\t\t\t\t\t\t\t\t<div class=\"input-unit no-bottom\" data-validate=\"mail\">\n\t\t\t\t\t\t\t\t\t<input type=\"email\" name=\"email\" autocomplete=\"email\" :id=\"'mail' + _uid\" v-model=\"username\" data-autofocus>\n\t\t\t\t\t\t\t\t\t<label :for=\"'mail' + _uid\">{{ $translate(\"Ceres::Template.loginEmail\") }}*</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<span class=\"error-msg\">{{ $translate(\"Ceres::Template.loginEnterConfirmEmail\") }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t<div>\n                            <slot name=\"extend-overlay-buttons\"></slot>\n\n                            <button v-if=\"!!currentTemplate && currentTemplate != 'tpl.login'\" type=\"button\" @click.prevent=\"cancelResetPwd\" class=\"btn btn-danger btn-medium mr-2\">\n                                <i class=\"fa fa-arrow-left\" aria-hidden=\"true\"></i>\n                                {{ $translate(\"Ceres::Template.loginBackToLogin\") }}\n                            </button>\n\n\t\t\t\t\t\t\t<button @click.prevent=\"validateResetPwd\" :disabled=\"isDisabled\" class=\"btn btn-primary btn-medium\">\n\t\t\t\t\t\t\t\t{{ $translate(\"Ceres::Template.loginSend\") }}\n\t\t\t\t\t\t\t\t<icon icon=\"paper-plane-o\" :loading=\"isDisabled\"></icon>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport ApiService from \"../../../services/ApiService\";\nimport NotificationService from \"../../../services/NotificationService\";\nimport ModalService from \"../../../services/ModalService\";\nimport ValidationService from \"../../../services/ValidationService\";\nimport UrlService from \"../../../services/UrlService\";\nimport { isNullOrUndefined } from \"../../../helper/utils\";\n\nexport default {\n\n    name: \"forgot-password-modal\",\n\n    props: {\n        currentTemplate: String\n    },\n\n    data()\n    {\n        return {\n            username: \"\",\n            isDisabled: false,\n            honeypot: \"\"\n        };\n    },\n\n    mounted()\n    {\n        this.$nextTick(() =>\n        {\n            $(this.$refs.pwdModal).on(\"hidden.bs.modal\", () =>\n            {\n                this.username = \"\";\n            });\n\n            const urlParams = UrlService.getUrlParams(document.location.search);\n\n            if (!isNullOrUndefined(urlParams.show) && urlParams.show === \"forgotPassword\")\n            {\n                ModalService.findModal(this.$refs.pwdModal).show();\n\n                this.username = !isNullOrUndefined(urlParams.email) ? urlParams.email : \"\";\n            }\n        });\n    },\n\n    watch:\n    {\n        username(val, oldVal)\n        {\n            this.resetError();\n        }\n    },\n\n    methods:\n    {\n        validateResetPwd()\n        {\n            ValidationService\n                .validate(this.$refs.pwdModal)\n                .done(() =>\n                {\n                    this.sendResetPwd();\n                })\n                .fail(invalidFields =>\n                {\n                    ValidationService.markInvalidFields(invalidFields, \"error\");\n                });\n        },\n\n        /**\n         *  Reset password\n         */\n        sendResetPwd()\n        {\n            this.isDisabled = true;\n\n            ApiService.post(\"/rest/io/customer/password_reset\", { email: this.username, honeypot: this.honeypot })\n                .done(() =>\n                {\n                    ModalService.findModal(this.$refs.pwdModal).hide();\n                    this.isDisabled = false;\n\n                    NotificationService.success(\n                        this.$translate(\"Ceres::Template.loginSendEmailOk\")\n                    ).closeAfter(5000);\n\n                })\n                .fail(() =>\n                {\n                    this.isDisabled = false;\n\n                    NotificationService.error(\n                        this.$translate(\"Ceres::Template.loginResetPwDErrorOnSendEmail\")\n                    ).closeAfter(5000);\n                });\n        },\n\n        cancelResetPwd()\n        {\n            this.resetError();\n\n            ModalService\n                .findModal(this.$refs.pwdModal)\n                .hide()\n                .then(() =>\n                {\n                    ModalService\n                        .findModal(document.getElementById(\"login\"))\n                        .show();\n                });\n        },\n\n        resetError()\n        {\n            ValidationService.unmarkAllFields(this.$refs.pwdModal);\n        }\n    }\n}\n</script>\n","var render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"form\",\n    {\n      staticClass: \"reset-pwd-container login-pwd-reset\",\n      attrs: { id: \"reset-pwd-form-\" + _vm._uid, method: \"post\" }\n    },\n    [\n      _c(\n        \"div\",\n        {\n          ref: \"pwdModal\",\n          staticClass: \"modal fade\",\n          attrs: { id: \"resetPwd\", tabindex: \"-1\", role: \"dialog\" }\n        },\n        [\n          _c(\"div\", { staticClass: \"modal-dialog\" }, [\n            _c(\"div\", { staticClass: \"modal-content\" }, [\n              _c(\"div\", { staticClass: \"modal-header\" }, [\n                _c(\"div\", { staticClass: \"modal-title h3\" }, [\n                  _vm._v(\n                    _vm._s(\n                      _vm.$translate(\"Ceres::Template.loginForgotPassword\")\n                    )\n                  )\n                ]),\n                _vm._v(\" \"),\n                _c(\n                  \"button\",\n                  {\n                    staticClass: \"close\",\n                    attrs: {\n                      type: \"button\",\n                      \"data-dismiss\": \"modal\",\n                      \"aria-hidden\": \"true\",\n                      \"aria-label\": _vm.$translate(\"Ceres::Template.closeIcon\")\n                    }\n                  },\n                  [_vm._v(\"×\")]\n                )\n              ]),\n              _vm._v(\" \"),\n              _c(\"div\", { staticClass: \"modal-body\" }, [\n                _c(\n                  \"div\",\n                  { staticClass: \"alert alert-info w-100 pwd-forgot-info\" },\n                  [\n                    _c(\"span\", { staticClass: \"info-badge\" }, [\n                      _vm._v(\n                        _vm._s(\n                          _vm.$translate(\n                            \"Ceres::Template.loginForgotPasswordInfo\"\n                          )\n                        )\n                      )\n                    ])\n                  ]\n                ),\n                _vm._v(\" \"),\n                _c(\"div\", { staticClass: \"row\" }, [\n                  _c(\"div\", { staticClass: \"col-12\" }, [\n                    _c(\"input\", {\n                      directives: [\n                        {\n                          name: \"model\",\n                          rawName: \"v-model\",\n                          value: _vm.honeypot,\n                          expression: \"honeypot\"\n                        }\n                      ],\n                      staticClass: \"honey\",\n                      attrs: {\n                        type: \"text\",\n                        name: \"username\",\n                        autocomplete: \"new-password\",\n                        tabindex: \"-1\"\n                      },\n                      domProps: { value: _vm.honeypot },\n                      on: {\n                        input: function($event) {\n                          if ($event.target.composing) {\n                            return\n                          }\n                          _vm.honeypot = $event.target.value\n                        }\n                      }\n                    }),\n                    _vm._v(\" \"),\n                    _c(\n                      \"div\",\n                      {\n                        staticClass: \"input-unit no-bottom\",\n                        attrs: { \"data-validate\": \"mail\" }\n                      },\n                      [\n                        _c(\"input\", {\n                          directives: [\n                            {\n                              name: \"model\",\n                              rawName: \"v-model\",\n                              value: _vm.username,\n                              expression: \"username\"\n                            }\n                          ],\n                          attrs: {\n                            type: \"email\",\n                            name: \"email\",\n                            autocomplete: \"email\",\n                            id: \"mail\" + _vm._uid,\n                            \"data-autofocus\": \"\"\n                          },\n                          domProps: { value: _vm.username },\n                          on: {\n                            input: function($event) {\n                              if ($event.target.composing) {\n                                return\n                              }\n                              _vm.username = $event.target.value\n                            }\n                          }\n                        }),\n                        _vm._v(\" \"),\n                        _c(\"label\", { attrs: { for: \"mail\" + _vm._uid } }, [\n                          _vm._v(\n                            _vm._s(\n                              _vm.$translate(\"Ceres::Template.loginEmail\")\n                            ) + \"*\"\n                          )\n                        ])\n                      ]\n                    ),\n                    _vm._v(\" \"),\n                    _c(\"span\", { staticClass: \"error-msg\" }, [\n                      _vm._v(\n                        _vm._s(\n                          _vm.$translate(\n                            \"Ceres::Template.loginEnterConfirmEmail\"\n                          )\n                        )\n                      )\n                    ])\n                  ])\n                ])\n              ]),\n              _vm._v(\" \"),\n              _c(\"div\", { staticClass: \"modal-footer\" }, [\n                _c(\n                  \"div\",\n                  [\n                    _vm._t(\"extend-overlay-buttons\"),\n                    _vm._v(\" \"),\n                    !!_vm.currentTemplate && _vm.currentTemplate != \"tpl.login\"\n                      ? _c(\n                          \"button\",\n                          {\n                            staticClass: \"btn btn-danger btn-medium mr-2\",\n                            attrs: { type: \"button\" },\n                            on: {\n                              click: function($event) {\n                                $event.preventDefault()\n                                return _vm.cancelResetPwd($event)\n                              }\n                            }\n                          },\n                          [\n                            _c(\"i\", {\n                              staticClass: \"fa fa-arrow-left\",\n                              attrs: { \"aria-hidden\": \"true\" }\n                            }),\n                            _vm._v(\n                              \"\\n                                \" +\n                                _vm._s(\n                                  _vm.$translate(\n                                    \"Ceres::Template.loginBackToLogin\"\n                                  )\n                                ) +\n                                \"\\n                            \"\n                            )\n                          ]\n                        )\n                      : _vm._e(),\n                    _vm._v(\" \"),\n                    _c(\n                      \"button\",\n                      {\n                        staticClass: \"btn btn-primary btn-medium\",\n                        attrs: { disabled: _vm.isDisabled },\n                        on: {\n                          click: function($event) {\n                            $event.preventDefault()\n                            return _vm.validateResetPwd($event)\n                          }\n                        }\n                      },\n                      [\n                        _vm._v(\n                          \"\\n\\t\\t\\t\\t\\t\\t\\t\\t\" +\n                            _vm._s(\n                              _vm.$translate(\"Ceres::Template.loginSend\")\n                            ) +\n                            \"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"\n                        ),\n                        _c(\"icon\", {\n                          attrs: {\n                            icon: \"paper-plane-o\",\n                            loading: _vm.isDisabled\n                          }\n                        })\n                      ],\n                      1\n                    )\n                  ],\n                  2\n                )\n              ])\n            ])\n          ])\n        ]\n      )\n    ]\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ForgotPassword.vue?vue&type=template&id=7f94eb33&\"\nimport script from \"./ForgotPassword.vue?vue&type=script&lang=js&\"\nexport * from \"./ForgotPassword.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\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/home/runner/work/plugin-ceres/plugin-ceres/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('7f94eb33')) {\n      api.createRecord('7f94eb33', component.options)\n    } else {\n      api.reload('7f94eb33', component.options)\n    }\n    module.hot.accept(\"./ForgotPassword.vue?vue&type=template&id=7f94eb33&\", function () {\n      api.rerender('7f94eb33', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"resources/js/src/app/components/customer/login/ForgotPassword.vue\"\nexport default component.exports","import mod from \"-!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ForgotPassword.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!./ForgotPassword.vue?vue&type=script&lang=js&\"","export * from \"-!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ForgotPassword.vue?vue&type=template&id=7f94eb33&\""],"sourceRoot":""}