{"version":3,"file":"forgotPassword.e161505730b43b6184a3.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;AACA;AACA;AACA","sources":["webpack://advantshop/./bundle_config/forgotPassword.js","webpack://advantshop/./scripts/appDependency.js","webpack://advantshop/./scripts/forgotPassword/controllers/forgotPasswordController.js","webpack://advantshop/./scripts/forgotPassword/forgotPassword.module.js"],"sourcesContent":["import forgotPasswordModule from '../scripts/forgotPassword/forgotPassword.module.js';\nimport appDependency from '../scripts/appDependency.js';\nappDependency.addItem(forgotPasswordModule);","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar AppDependency = /*#__PURE__*/function () {\n function AppDependency() {\n _classCallCheck(this, AppDependency);\n\n if (!window.___appDependency) {\n window.___appDependency = this;\n window.___appDependencyList = [];\n }\n\n return window.___appDependency;\n }\n\n _createClass(AppDependency, [{\n key: \"addItem\",\n value: function addItem(moduleName) {\n window.___appDependencyList.push(moduleName);\n }\n }, {\n key: \"addList\",\n value: function addList(moduleNameList) {\n window.___appDependencyList = window.___appDependencyList.concat(moduleNameList);\n }\n }, {\n key: \"get\",\n value: function get() {\n return window.___appDependencyList;\n }\n }]);\n\n return AppDependency;\n}();\n\nexport default new AppDependency();","ForgotPasswordCtrl.$inject = [\"$http\", \"toaster\", \"$sce\"];\n\n/* @ngInject */\nfunction ForgotPasswordCtrl($http, toaster, $sce) {\n var ctrl = this;\n\n ctrl.submitForgotPassword = function () {\n var captchaExist = typeof CaptchaSource != \"undefined\" && CaptchaSource != null;\n var captchaInstanceId = captchaExist ? CaptchaSource.InstanceId : null;\n $http.post(\"/user/forgotPasswordJson\", {\n email: ctrl.email,\n lpId: ctrl.lpId,\n captchaCode: ctrl.captchaCode,\n captchaSource: captchaInstanceId\n }).then(function (response) {\n var result = response.data;\n\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', result.error);\n\n if (result.requestCaptcha == true && ctrl.showCaptcha != result.requestCaptcha) {\n ctrl.showCaptcha = result.requestCaptcha;\n ctrl.initCaptcha(\"forgotPassword.captchaCode\").then(function (data) {\n ctrl.captchaHtml = data;\n });\n }\n\n if (captchaExist) {\n CaptchaSource.ReloadImage();\n }\n } else {\n ctrl.view = 'forgotpassSuccess';\n }\n });\n };\n\n ctrl.submitRecover = function () {\n var params = {\n newPassword: ctrl.newPassword,\n newPasswordConfirm: ctrl.newPasswordConfirm,\n email: ctrl.email,\n recoveryCode: ctrl.recoveryCode,\n lpId: ctrl.lpId\n };\n $http.post(\"/user/changePasswordJson\", params).then(function (response) {\n var result = response.data;\n\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', result.error);\n } else {\n ctrl.view = 'recoverySuccess';\n\n if (ctrl.lpId != null) {\n window.location.assign('/lp/user/redirect/' + ctrl.lpId);\n }\n }\n });\n };\n\n ctrl.initCaptcha = function (ngModel) {\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel\n }).then(function (response) {\n return $sce.trustAsHtml(response.data);\n });\n };\n}\n\n;\nexport default ForgotPasswordCtrl;","import ForgotPasswordCtrl from './controllers/forgotPasswordController.js';\nvar moduleName = 'forgotPassword';\nangular.module(moduleName, []).controller('ForgotPasswordCtrl', ForgotPasswordCtrl);\nexport default moduleName;"],"names":[],"sourceRoot":""}