PageSourceSearch

https://atomicpoet.org/packs/js/features/edit_password-495c49a0cceb587c8ae2.chunk.js

js atomicpoet.org collected 2026-10-04 02:43:21 UTC 4,769 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkmangane_fe=self.webpackChunkmangane_fe||[]).push([[33],{1197:function(e,t,a){a.r(t);var r=a(1855),s=a(1840),n=(a(1),a(111),a(0)),o=a(1841),i=a(1842),u=a(32),l=a(96),c=a(12),d=a(2),f=a(3),w=a(405);function p(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(Object(a),!0).forEach((function(t){(0,s.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var g=(0,o.vU)({updatePasswordSuccess:{id:"security.update_password.success",defaultMessage:"Password successfully updated."},updatePasswordFail:{id:"security.update_password.fail",defaultMessage:"Update password failed."},oldPasswordFieldLabel:{id:"security.fields.old_password.label",defaultMessage:"Current password"},newPasswordFieldLabel:{id:"security.fields.new_password.label",defaultMessage:"New password"},confirmationFieldLabel:{id:"security.fields.password_confirmation.label",defaultMessage:"New password (again)"},header:{id:"edit_password.header",defaultMessage:"Change Password"},submit:{id:"security.submit",defaultMessage:"Save changes"},cancel:{id:"common.cancel",defaultMessage:"Cancel"}}),h={currentPassword:"",newPassword:"",newPasswordConfirmation:""};t.default=function(){var e=(0,i.Z)(),t=(0,f.TL)(),a=(0,f.hz)().passwordRequirements,s=n.useState(h),o=s[0],p=s[1],m=n.useState(!1),v=m[0],y=m[1],P=n.useState(!a),Z=P[0],O=P[1],M=o.currentPassword,C=o.newPassword,k=o.newPasswordConfirmation,j=function(){return p(h)},S=n.useCallback((function(e){e.persist(),p((function(t){var a;return b(b({},t),{},((a={})[e.target.name]=e.target.value,a))}))}),[]),x=n.useCallback((function(){y(!0),t((0,l.Cp)(M,C,k)).then((function(){return a=void 0,r=void 0,n=function(){return function(e,t){var a,r,s,n,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function i(n){return function(i){return function(n){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,r&&(s=2&n[0]?r.return:n[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return o.label++,{value:n[1],done:!1};case 5:o.label++,r=n[1],n=[0];continue;case 7:n=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){o.label=n[1];break}if(6===n[0]&&o.label<s[1]){o.label=s[1],s=n;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(n);break}s[2]&&o.ops.pop(),o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e],r=0}finally{a=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,i])}}}(this,(function(a){switch(a.label){case 0:return j(),[4,t(c.ZP.success(e.formatMessage(g.updatePasswordSuccess)))];case 1:return a.sent(),t((0,u.ni)()),[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{u(n.next(e))}catch(e){t(e)}}function i(e){try{u(n.throw(e))}catch(e){t(e)}}function u(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(o,i)}u((n=n.apply(a,r||[])).next())}));var a,r,s,n})).finally((function(){y(!1)})).catch((function(){j(),t(c.ZP.error(e.formatMessage(g.updatePasswordFail)))}))}),[M,C,k,t,e]);return(0,r.Z)(d.sg,{label:e.formatMessage(g.header),transparent:!0,withHeader:!1},void 0,(0,r.Z)(d.Zb,{variant:"rounded"},void 0,(0,r.Z)(d.Ol,{backHref:"/settings"},void 0,(0,r.Z)(d.ll,{title:e.formatMessage(g.header)})),(0,r.Z)(d.eW,{},void 0,(0,r.Z)(d.l0,{onSubmit:x},void 0,(0,r.Z)(d.cw,{labelText:e.formatMessage(g.oldPasswordFieldLabel)},void 0,(0,r.Z)(d.II,{type:"password",name:"currentPassword",onChange:S,value:M})),(0,r.Z)(d.cw,{labelText:e.formatMessage(g.newPasswordFieldLabel)},void 0,(0,r.Z)(d.II,{type:"password",name:"newPassword",onChange:S,value:C}),a&&(0,r.Z)(w.Z,{password:C,onChange:O})),(0,r.Z)(d.cw,{labelText:e.formatMessage(g.confirmationFieldLabel)},void 0,(0,r.Z)(d.II,{type:"password",name:"newPasswordConfirmation",onChange:S,value:k})),(0,r.Z)(d.iN,{},void 0,(0,r.Z)(d.zx,{to:"/settings",theme:"ghost"},void 0,e.formatMessage(g.cancel)),(0,r.Z)(d.zx,{type:"submit",theme:"primary",disabled:v||!Z},void 0,e.formatMessage(g.submit)))))))}}}]);
2//# sourceMappingURL=edit_password-495c49a0cceb587c8ae2.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.