{"version":3,"sources":["webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue?1774","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue?00e0","webpack:///resources/js/src/app/components/customer/login/ForgotPassword.vue","webpack:///./resources/js/src/app/components/customer/login/ForgotPassword.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","id","_uid","method","ref","tabindex","role","_v","_s","$translate","type","directives","name","rawName","value","honeypot","expression","autocomplete","domProps","on","input","$event","target","composing","username","for","_t","currentTemplate","click","preventDefault","cancelResetPwd","_e","disabled","isDisabled","validateResetPwd","icon","loading","_withStripped","component","options","__file"],"mappings":"kGAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EACL,OACA,CACEE,YAAa,sCACbC,MAAO,CAAEC,GAAI,kBAAoBR,EAAIS,KAAMC,OAAQ,SAErD,CACEN,EACE,MACA,CACEO,IAAK,WACLL,YAAa,aACbC,MAAO,CAAEC,GAAI,WAAYI,SAAU,KAAMC,KAAM,WAEjD,CACET,EAAG,MAAO,CAAEE,YAAa,gBAAkB,CACzCF,EAAG,MAAO,CAAEE,YAAa,iBAAmB,CAC1CF,EAAG,MAAO,CAAEE,YAAa,gBAAkB,CACzCF,EAAG,MAAO,CAAEE,YAAa,kBAAoB,CAC3CN,EAAIc,GACFd,EAAIe,GACFf,EAAIgB,WAAW,2CAIrBhB,EAAIc,GAAG,KACPV,EACE,SACA,CACEE,YAAa,QACbC,MAAO,CACLU,KAAM,SACN,eAAgB,QAChB,cAAe,OACf,aAAcjB,EAAIgB,WAAW,+BAGjC,CAAChB,EAAIc,GAAG,SAGZd,EAAIc,GAAG,KACPV,EAAG,MAAO,CAAEE,YAAa,cAAgB,CACvCF,EACE,MACA,CAAEE,YAAa,0CACf,CACEF,EAAG,OAAQ,CAAEE,YAAa,cAAgB,CACxCN,EAAIc,GACFd,EAAIe,GACFf,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QACA,4CACA,WAII,WA1DJ,WA4DM,EAAN,gD,OCxJIC,EAAY,YACd,EACA9C,EHwNoB,IGtNpB,EACA,KACA,KACA,MAuBF8C,EAAUC,QAAQC,OAAS,oEACZ,UAAAF,E","file":"chunks/ceres-31.min.js","sourcesContent":["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 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&\"","<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","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"],"sourceRoot":""}