text: (self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_views_backend_users_UpdatePassword_vue"],{
  
  /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js&":
  /*!******************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js& ***!
    \******************************************************************************************************************************************************************************************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  /* harmony export */ });
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var _config_response__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../config/response */ "./resources/js/config/response.js");
  /* harmony import */ var _mixins_validationErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../mixins/validationErrors */ "./resources/js/mixins/validationErrors.js");
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  
  
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
  
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
  
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
    name: 'UpdatePassword',
    mixins: [_mixins_validationErrors__WEBPACK_IMPORTED_MODULE_2__.default],
    data: function data() {
      return {
        user: {
          old_password: '',
          password: '',
          password_confirmation: ''
        },
        success: false,
        successMsg: '',
        validating: false,
        status: null,
        error: null
      };
    },
    mounted: function mounted() {
      var _this = this;
  
      return _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().mark(function _callee() {
        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _context.next = 2;
                return _this.$broadcast();
  
              case 2:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    computed: {
      buttonText: function buttonText() {
        return this.validating === true ? 'Submitting...' : 'Submit';
      },
      hasErrors: function hasErrors() {
        return 422 === this.status && this.errors !== null;
      }
    },
    methods: {
      resetPassword: function resetPassword() {
        var _this2 = this;
  
        return _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().mark(function _callee2() {
          var response;
          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().wrap(function _callee2$(_context2) {
            while (1) {
              switch (_context2.prev = _context2.next) {
                case 0:
                  _this2.error = null;
                  _this2.errors = null;
                  _this2.status = null;
                  _this2.validating = true;
                  _this2.success = false;
                  _this2.successMsg = '';
                  _context2.prev = 6;
                  _context2.next = 9;
                  return axios.post('/backend/password/update', _objectSpread({}, _this2.user));
  
                case 9:
                  response = _context2.sent;
                  _this2.successMsg = response.data.message;
                  _this2.success = true;
                  _context2.next = 21;
                  break;
  
                case 14:
                  _context2.prev = 14;
                  _context2.t0 = _context2["catch"](6);
                  console.log(_context2.t0);
  
                  if ((0,_config_response__WEBPACK_IMPORTED_MODULE_1__.is422)(_context2.t0)) {
                    _this2.errors = _context2.t0.response.data.errors;
                  }
  
                  if ((0,_config_response__WEBPACK_IMPORTED_MODULE_1__.is400)(_context2.t0)) {
                    _this2.error = _context2.t0.response.data.error;
                  }
  
                  if ((0,_config_response__WEBPACK_IMPORTED_MODULE_1__.is401)(_context2.t0)) {
                    _this2.$logOut();
                  }
  
                  _this2.status = _context2.t0.response.status;
  
                case 21:
                  _this2.validating = false;
  
                case 22:
                case "end":
                  return _context2.stop();
              }
            }
          }, _callee2, null, [[6, 14]]);
        }))();
      }
    }
  });
  
  /***/ }),
  
  /***/ "./resources/js/config/response.js":
  /*!*****************************************!*\
    !*** ./resources/js/config/response.js ***!
    \*****************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "is400": () => (/* binding */ is400),
  /* harmony export */   "is401": () => (/* binding */ is401),
  /* harmony export */   "is403": () => (/* binding */ is403),
  /* harmony export */   "is422": () => (/* binding */ is422)
  /* harmony export */ });
  var is400 = function is400(err) {
    return isErrorWithResponseAndStatus(err) && 400 === err.response.status;
  };
  var is401 = function is401(err) {
    return isErrorWithResponseAndStatus(err) && 401 === err.response.status;
  };
  var is403 = function is403(err) {
    return isErrorWithResponseAndStatus(err) && 403 === err.response.status;
  };
  var is422 = function is422(err) {
    return isErrorWithResponseAndStatus(err) && 422 === err.response.status;
  };
  
  var isErrorWithResponseAndStatus = function isErrorWithResponseAndStatus(err) {
    return err.response && err.response.status;
  };
  
  /***/ }),
  
  /***/ "./resources/js/mixins/validationErrors.js":
  /*!*************************************************!*\
    !*** ./resources/js/mixins/validationErrors.js ***!
    \*************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  /* harmony export */ });
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
    data: function data() {
      return {
        errors: null
      };
    },
    methods: {
      errorFor: function errorFor(field) {
        return null !== this.errors && this.errors[field] ? this.errors[field] : null;
      }
    }
  });
  
  /***/ }),
  
  /***/ "./resources/js/views/backend/users/UpdatePassword.vue":
  /*!*************************************************************!*\
    !*** ./resources/js/views/backend/users/UpdatePassword.vue ***!
    \*************************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  /* harmony export */ });
  /* harmony import */ var _UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UpdatePassword.vue?vue&type=template&id=8d40dcb6& */ "./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6&");
  /* harmony import */ var _UpdatePassword_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./UpdatePassword.vue?vue&type=script&lang=js& */ "./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js&");
  /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
  
  
  
  
  
  /* normalize component */
  ;
  var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__.default)(
    _UpdatePassword_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__.default,
    _UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__.render,
    _UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
    false,
    null,
    null,
    null
    
  )
  
  /* hot reload */
  if (false) { var api; }
  component.options.__file = "resources/js/views/backend/users/UpdatePassword.vue"
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
  
  /***/ }),
  
  /***/ "./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js&":
  /*!**************************************************************************************!*\
    !*** ./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js& ***!
    \**************************************************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  /* harmony export */ });
  /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UpdatePassword_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UpdatePassword.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=script&lang=js&");
   /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UpdatePassword_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__.default); 
  
  /***/ }),
  
  /***/ "./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6&":
  /*!********************************************************************************************!*\
    !*** ./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6& ***!
    \********************************************************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__.render),
  /* harmony export */   "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
  /* harmony export */ });
  /* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_UpdatePassword_vue_vue_type_template_id_8d40dcb6___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UpdatePassword.vue?vue&type=template&id=8d40dcb6& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6&");
  
  
  /***/ }),
  
  /***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6&":
  /*!***********************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/backend/users/UpdatePassword.vue?vue&type=template&id=8d40dcb6& ***!
    \***********************************************************************************************************************************************************************************************************************************/
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  /* harmony export */   "render": () => (/* binding */ render),
  /* harmony export */   "staticRenderFns": () => (/* binding */ staticRenderFns)
  /* harmony export */ });
  var render = function() {
    var _vm = this
    var _h = _vm.$createElement
    var _c = _vm._self._c || _h
    return _c("div", { staticClass: "container-fluid" }, [
      _c("div", { staticClass: "row" }, [
        _c(
          "div",
          { staticClass: "col-lg-12" },
          [
            _vm.success
              ? [_c("v-success", [_vm._v(_vm._s(_vm.successMsg))])]
              : _vm._e(),
            _vm._v(" "),
            _vm.error
              ? [
                  _c("v-error", { attrs: { variant: "danger", icon: "alert" } }, [
                    _vm._v(_vm._s(_vm.error))
                  ])
                ]
              : _vm._e(),
            _vm._v(" "),
            _c("div", { staticClass: "mm-edit-list-data" }, [
              _c("div", { staticClass: "card" }, [
                _vm._m(0),
                _vm._v(" "),
                _c("div", { staticClass: "card-body" }, [
                  _c(
                    "form",
                    {
                      on: {
                        submit: function($event) {
                          $event.preventDefault()
                          return _vm.resetPassword.apply(null, arguments)
                        }
                      }
                    },
                    [
                      _c(
                        "div",
                        { staticClass: "form-group" },
                        [
                          _c("label", { attrs: { for: "cpass" } }, [
                            _vm._v("Current Password:")
                          ]),
                          _vm._v(" "),
                          _c("input", {
                            directives: [
                              {
                                name: "model",
                                rawName: "v-model",
                                value: _vm.user.old_password,
                                expression: "user.old_password"
                              }
                            ],
                            staticClass: "form-control",
                            class: [
                              { "is-invalid": _vm.errorFor("old_password") }
                            ],
                            attrs: { type: "Password", id: "cpass" },
                            domProps: { value: _vm.user.old_password },
                            on: {
                              input: function($event) {
                                if ($event.target.composing) {
                                  return
                                }
                                _vm.$set(
                                  _vm.user,
                                  "old_password",
                                  $event.target.value
                                )
                              }
                            }
                          }),
                          _vm._v(" "),
                          _c("v-errors", {
                            attrs: { errors: _vm.errorFor("old_password") }
                          })
                        ],
                        1
                      ),
                      _vm._v(" "),
                      _c(
                        "div",
                        { staticClass: "form-group" },
                        [
                          _c("label", { attrs: { for: "npass" } }, [
                            _vm._v("New Password:")
                          ]),
                          _vm._v(" "),
                          _c("input", {
                            directives: [
                              {
                                name: "model",
                                rawName: "v-model",
                                value: _vm.user.password,
                                expression: "user.password"
                              }
                            ],
                            staticClass: "form-control",
                            class: [{ "is-invalid": _vm.errorFor("password") }],
                            attrs: { type: "Password", id: "npass" },
                            domProps: { value: _vm.user.password },
                            on: {
                              input: function($event) {
                                if ($event.target.composing) {
                                  return
                                }
                                _vm.$set(
                                  _vm.user,
                                  "password",
                                  $event.target.value
                                )
                              }
                            }
                          }),
                          _vm._v(" "),
                          _c("v-errors", {
                            attrs: { errors: _vm.errorFor("password") }
                          })
                        ],
                        1
                      ),
                      _vm._v(" "),
                      _c("div", { staticClass: "form-group" }, [
                        _c("label", { attrs: { for: "vpass" } }, [
                          _vm._v("Verify Password:")
                        ]),
                        _vm._v(" "),
                        _c("input", {
                          directives: [
                            {
                              name: "model",
                              rawName: "v-model",
                              value: _vm.user.password_confirmation,
                              expression: "user.password_confirmation"
                            }
                          ],
                          staticClass: "form-control",
                          attrs: { type: "Password", id: "vpass" },
                          domProps: { value: _vm.user.password_confirmation },
                          on: {
                            input: function($event) {
                              if ($event.target.composing) {
                                return
                              }
                              _vm.$set(
                                _vm.user,
                                "password_confirmation",
                                $event.target.value
                              )
                            }
                          }
                        })
                      ]),
                      _vm._v(" "),
                      _c(
                        "button",
                        {
                          staticClass: "btn btn-primary mr-2",
                          attrs: { type: "submit", disabled: _vm.validating }
                        },
                        [
                          _vm._v(
                            "\n                          " +
                              _vm._s(_vm.buttonText) +
                              "\n                       "
                          )
                        ]
                      )
                    ]
                  )
                ])
              ])
            ])
          ],
          2
        )
      ])
    ])
  }
  var staticRenderFns = [
    function() {
      var _vm = this
      var _h = _vm.$createElement
      var _c = _vm._self._c || _h
      return _c(
        "div",
        { staticClass: "card-header d-flex justify-content-between" },
        [
          _c("div", { staticClass: "mm-header-title" }, [
            _c("h4", { staticClass: "card-title" }, [_vm._v("Change Password")])
          ])
        ]
      )
    }
  ]
  render._withStripped = true
  
  
  
  /***/ })
  
  }]);