PageSourceSearch

https://diariodecuba.net/cp/javascript/app/login/recovery-password.js?a027bd206b78773e298f

js diariodecuba.net collected 2026-10-03 22:40:55 UTC 4,223 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["app/login/recovery-password"],{1920(e,s,t){t.r(s),t.d(s,{default:()=>h});var n=t(99),r=t(397),i=t(396),o=t(787),a=t.n(o),c=t(95),l=t(1569),d=t(663);class p extends i.Component{constructor(e){if(super(e),(0,n.default)(this,"state",{recoveryLink:"",recoveryEmail:"",isActionInProgress:!1,isDrawerOpen:!1,isSendingInProgress:!1}),(0,n.default)(this,"handleAction",()=>{if(this.state.isActionInProgress)return;if(this.state.recoveryLink)return void this.setState({isDrawerOpen:!0});this.setState({isActionInProgress:!0});const{userType:e,userId:s}=this.props;c.api.post((0,c.prepareUrl)(`${this.endpoint}/generate-secret`),{userType:e,userId:s}).then(e=>{"success"===e.status?this.setState({recoveryLink:e.link,recoveryEmail:e.email,isActionInProgress:!1,isDrawerOpen:!0}):location.reload()})}),(0,n.default)(this,"handleSend",()=>{if(this.state.isSendingInProgress)return;this.setState({isSendingInProgress:!0});const{messages:e}=this.props,{userType:s,userId:t}=this.props;c.api.post((0,c.prepareUrl)(`${this.endpoint}/send-secret`),{userType:s,userId:t,secret:this.state.recoveryLink}).then(s=>{"success"===s.status?(this.setState({isDrawerOpen:!1}),(0,d.addToast)({intent:"success",message:e.linkSendedMessage}),this.setState({isSendingInProgress:!1,recoveryLink:null})):location.reload()})}),(0,n.default)(this,"handleClose",()=>{this.setState({isDrawerOpen:!1,recoveryLink:null})}),2===this.props.userType)this.endpoint="/admin/reseller";else if(4===this.props.userType)this.endpoint="/admin/customer";else if(8===this.props.userType)this.endpoint="/smb/user";else{if(32!==this.props.userType)throw new Error("Unexpected user type.");this.endpoint="/smb/email-address"}}render(){const{renderAction:e}=this.props,s=e?.(this.handleAction,this.state.isActionInProgress)??(0,i.jsx)(r.Action,{onClick:this.handleAction,progress:this.state.isActionInProgress,children:(0,i.jsx)(r.Translate,{content:"action"})});return(0,i.jsxs)(i.Fragment,{children:[s,(0,i.jsxs)(r.Drawer,{size:"sm",isOpen:this.state.isDrawerOpen,title:(0,i.jsx)(r.Translate,{content:"title"}),cancelTitle:(0,i.jsx)(r.Translate,{content:"closeButton"}),onClose:this.handleClose,"data-type":"recovery-password",children:[(0,i.jsx)(r.Paragraph,{children:(0,i.jsx)(r.Translate,{content:"copyText",params:{email:(0,i.jsx)(r.Text,{bold:!0,children:this.state.recoveryEmail})}})}),(0,i.jsxs)(r.Alert,{intent:"info",children:[(0,i.jsx)("div",{"data-cy":"recovery-link",children:this.state.recoveryLink}),(0,i.jsx)("br",{}),(0,i.jsx)("div",{children:(0,i.jsx)(l.default,{content:this.state.recoveryLink||"",onCopy:()=>(0,d.addToast)({intent:"success",message:c.Locale.getSection("components.buttons").lmsg("copied")}),children:(0,i.jsx)(r.Translate,{content:"copyButton"})})})]}),!!this.state.recoveryEmail&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Paragraph,{children:(0,i.jsx)(r.Translate,{content:"text",params:{email:(0,i.jsx)(r.Text,{bold:!0,children:this.state.recoveryEmail})}})}),(0,i.jsx)(r.Button,{size:"lg",intent:"primary",onClick:this.handleSend,state:this.state.isSendingInProgress?"loading":void 0,children:(0,i.jsx)(r.Translate,{content:"sendButton"})},"sendButton")]})]})]})}}p.propTypes={messages:a().object.isRequired,userType:a().number.isRequired,userId:a().number.isRequired,renderAction:a().func},p.defaultProps={renderAction:null};const h=p},3209(e,s,t){t.r(s),t.d(s,{default:()=>a});var n=t(397),r=t(396),i=t(95),o=t(1920);const a=({renderTo:e,...s})=>{const t=i.Locale.getSection("components.login.recovery-password").messages;(0,r.render)((0,r.jsx)(n.LocaleProvider,{messages:t,children:(0,r.jsx)(o.default,{messages:t,...s})}),document.getElementById(e))};t.dn(a)},1569(e,s,t){t.r(s),t.d(s,{default:()=>a});var n=t(397),r=t(95),i=t(396);const o=r.Locale.getSection("components.buttons"),a=({id:e,content:s,icon:t="copy",className:r,tooltip:a=o.lmsg("copyToClipboard"),onCopy:c=()=>{},children:l})=>(0,i.jsx)(n.Button,{className:r,ghost:!0,icon:t,tooltip:a,tooltipAsLabel:!0,onClick:()=>{(0,n.copyToClipboard)(s),c()}
1,"data-action":"copy-to-clipboard"+(e?`-${e}`:""),children:l})}}]);
2//# sourceMappingURL=recovery-password.js.map?a027bd206b78773e298f

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.