﻿
__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["79db0670a264bced7ad148f952b9ec531d6d70a1"]){__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["bfe63dbf5c57e046488208353e7c40f503dfdfc3"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){__require("3c0b8451351497edf482a52b5942368cd9067e8d",function(){Ext.onReady(function(){var panel=new Chain.panel.LoginPanel({renderTo:'panel-wrapper',width:g_config.brandingServiceEnabled?350:400,message:g_config.message});RenderLanguagePicker(Ext.apply({},g_config,{renderTo:panel.body}));if(g_config.showSsoOptionLogin){var urlParams=new URLSearchParams(window.location.search);var pageParam=urlParams.get("page")||"";new Ext.FormPanel({renderTo:'sso-logon-wrapper',labelAlign:'top',items:[{xtype:'box',style:'padding-bottom: 10px;',autoEl:{html:'<h1>'+__tr('652e2d3ca1907e3b71bccba1264a4a47ac2709ca')+'</h1>'}},{xtype:'box',style:'display: block; padding-top: 5px; padding-bottom: 5px; border: 2px solid; text-align: center;',autoEl:{html:'<a href="/csr/public/sso/InitiateSingleSignOn.aspx?page='+encodeURIComponent(pageParam)+'" style="text-decoration: none;">'+__tr('8a2ef24ccfd1ad915eda1334829a8ab9c96d6074')+'</a>'}}],border:false,bodyStyle:'background: transparent; text-align: left;'});}});__loaded("bfe63dbf5c57e046488208353e7c40f503dfdfc3");});}else{__trS('652e2d3ca1907e3b71bccba1264a4a47ac2709ca','Login via SSO','Login via SSO',{});__trS('8a2ef24ccfd1ad915eda1334829a8ab9c96d6074','SSO login','SSO login',{});}}}
__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["06833a19909e9ed4aac2f395a9a8ebd6c5e66586"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){UserServicesHandler=function()
{var nextId=0;var url="/csr/site/chain/components/userservices.ashx";var proxy={"canRemoveUser":function(companySid,callback,scope){Call("canRemoveUser",[companySid],callback,scope,Array.prototype.slice.call(arguments,3));},"changePassword":function(oldPassword,newPassword,callback,scope){Call("changePassword",[oldPassword,newPassword],callback,scope,Array.prototype.slice.call(arguments,4));},"changePasswordAtLogon":function(username,oldPassword,newPassword,callback,scope){Call("changePasswordAtLogon",[username,oldPassword,newPassword],callback,scope,Array.prototype.slice.call(arguments,5));},"checkUserExists":function(userName,callback,scope){Call("checkUserExists",[userName],callback,scope,Array.prototype.slice.call(arguments,3));},"createPendingUsers":function(companySid,users,callback,scope){Call("createPendingUsers",[companySid,users],callback,scope,Array.prototype.slice.call(arguments,4));},"getCompanyUsers":function(companySid,searchTerm,callback,scope){Call("getCompanyUsers",[companySid,searchTerm],callback,scope,Array.prototype.slice.call(arguments,4));},"getPasswordPolicies":function(callback,scope){Call("getPasswordPolicies",[],callback,scope,Array.prototype.slice.call(arguments,2));},"getRegionTranslations":function(regionSid,description,callback,scope){Call("getRegionTranslations",[regionSid,description],callback,scope,Array.prototype.slice.call(arguments,4));},"logon":function(userId,password,loginType,justification,reference,callback,scope){Call("logon",[userId,password,loginType,justification,reference],callback,scope,Array.prototype.slice.call(arguments,7));},"logonForInvitation":function(userId,password,callback,scope){Call("logonForInvitation",[userId,password],callback,scope,Array.prototype.slice.call(arguments,4));},"removeUserFromCompany":function(userSid,companySid,removeLastAdmin,callback,scope){Call("removeUserFromCompany",[userSid,companySid,removeLastAdmin],callback,scope,Array.prototype.slice.call(arguments,5));},"resetPassword":function(captcha,password,callback,scope){Call("resetPassword",[captcha,password],callback,scope,Array.prototype.slice.call(arguments,4));},"selfRegister":function(companyName,countryCode,fullName,address,city,email,phone,captcha,callback,scope){Call("selfRegister",[companyName,countryCode,fullName,address,city,email,phone,captcha],callback,scope,Array.prototype.slice.call(arguments,10));},"sendResetTo":function(userId,callback,scope){Call("sendResetTo",[userId],callback,scope,Array.prototype.slice.call(arguments,3));},"sendResetWithInvitationTo":function(userId,callback,scope){Call("sendResetWithInvitationTo",[userId],callback,scope,Array.prototype.slice.call(arguments,3));},"sendStubRegistration":function(fullName,email,captcha,callback,scope){Call("sendStubRegistration",[fullName,email,captcha],callback,scope,Array.prototype.slice.call(arguments,5));},"SetCompanyUserPassword":function(companySid,userSid,newPassword,callback,scope){Call("SetCompanyUserPassword",[companySid,userSid,newPassword],callback,scope,Array.prototype.slice.call(arguments,5));},"setLanguageInSession":function(lang,callback,scope){Call("setLanguageInSession",[lang],callback,scope,Array.prototype.slice.call(arguments,3));},"system.about":function(callback,scope){Call("system.about",[],callback,scope,Array.prototype.slice.call(arguments,2));},"system.listMethods":function(callback,scope){Call("system.listMethods",[],callback,scope,Array.prototype.slice.call(arguments,2));},"system.version":function(callback,scope){Call("system.version",[],callback,scope,Array.prototype.slice.call(arguments,2));}};function Call(method,params,callback,scope,callbackParams)
{var request={id:++nextId,method:method,params:params};Jayrock.Rpc.asyncRequest(url,request,callback,scope,callbackParams);}
return proxy;}();__loaded("06833a19909e9ed4aac2f395a9a8ebd6c5e66586");}else{}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["70e32b1e827fb2817ddbbcc9343500a0d7761662"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Chain.panel');Chain.panel.LoginPanel=function(config){config=config||{};this.addEvents('logonreturned');Ext.apply(this,new Ext.ux.UniqueIdHelper(this.baseId));this.items=[{xtype:'textfield',allowBlank:false,width:g_config.brandingServiceEnabled?'93%':160,msgTarget:'under',id:'username',name:'uid',fieldLabel:__tr('69296c49e40c40138ab3548c1618f6cdaae174c8'),validationEvent:'blur',value:config.username||'',enableKeyEvents:true,listeners:{specialKey:this.onSpecialKey,keyup:this.onKeyUp,blur:this.onUsernameBlur,scope:this}},{xtype:'textfield',inputType:'password',allowBlank:false,width:g_config.brandingServiceEnabled?'93%':160,msgTarget:'under',name:'pwd',validationEvent:'blur',id:'password',fieldLabel:__tr('8be3c943b1609fffbfc51aad666d0a04adf83c9d'),enableKeyEvents:true,listeners:{specialKey:this.onSpecialKey,keyup:this.onKeyUp,scope:this}},{xtype:'textfield',inputType:'hidden',id:'loginRedirectTo'}];var loginTypeField=new Ext.ux.ComboBox({fieldLabel:__tr('2d7550c0f85f4ab4fdd062dea285aac3e3241151'),forceSelection:false,editable:false,allowBlank:false,validateOnBlur:true,msgTarget:'under',mode:'local',typeAhead:false,disableKeyFilter:true,calculateWidth:function(){},value:null,disabled:true,readOnly:false,inputType:"select",id:this.makeId('login_type'),name:'login_type',width:g_config.brandingServiceEnabled?328:154,store:new Ext.data.SimpleObjectStore({fields:['loginJustificationTypeId','label'],data:g_config.loginTypes||[]}),valueField:'loginJustificationTypeId',displayField:'label',emptyText:g_config.brandingServiceEnabled?__tr('bb4f425f3db6cc9689d62cb2061db6064b5b65ef'):''});var justificationField=new Ext.form.TextField({fieldLabel:__tr('7d2a7bff0abb0d0de4946434ea191a1498465dec'),allowBlank:false,validateOnBlur:true,msgTarget:'under',disabled:true,id:'justification_field',name:'justification_field',listeners:{specialKey:this.onSpecialKey,scope:this}});var referenceField=new Ext.form.TextField({fieldLabel:__tr('db1c784524e1b54011a95823026161f7c8517fe0'),allowBlank:true,validateOnBlur:true,msgTarget:'under',disabled:true,id:'reference_field',name:'reference_field',listeners:{specialKey:this.onSpecialKey,scope:this}});this.justificationPanel=new Ext.Panel({layout:'form',bodyBorder:false,border:false,autoHeight:true,hidden:true,id:'justification-section',items:[loginTypeField,justificationField,referenceField],style:'background-color: transparent;'});this.items.push(this.justificationPanel);if(config.showButton!==false){if(g_config.brandingServiceEnabled){this.items.push({xtype:'component',id:'login-button',autoEl:{tag:'button',html:'Login'},listeners:{render:function(c){c.getEl().on({click:function(){this.doLogin();},scope:this});},scope:this}});}
else{this.items.push({xtype:'button',text:__tr('4e5a2893bdcc7d239c1db72e4c4ffbe4bea73174'),id:'login-button',scope:this,handler:this.doLogin});}}
if(config.showNewUserLink!==false){this.items.push({xtype:'box',style:'margin-top:10px;',autoEl:{cn:[{tag:'a',cls:'button',href:'javascript://click',html:g_config.allowNewUserRequest?__tr('4633268f2e9f05ecf8f72e81d193b5b74c746dc2'):__tr('8425bcda589f075204f8296b9b13bb41b1b3f9c7')}]},listeners:{render:function(cmp){cmp.el.child('a').on('click',g_config.allowNewUserRequest?this.onNewUserClick:this.onForgottenPasswordClick,this);},scope:this,delay:1}});}
this.items.push({xtype:'box',style:'margin:10px 0px 10px 0px;',autoEl:{cn:[{tag:'a',cls:'button',href:'javascript://click',html:__tr('b2c9f6d2722138d4e59cbc99769929d53eb80a6c')}]},listeners:{render:function(cmp){cmp.el.child('a').on('click',this.onForgottenPasswordClick,this);},scope:this,delay:1}});if(config.message){this.items.push({xtype:'box',style:'margin:10px 0px 10px 0px;',autoEl:{html:config.message}});}
if(config.focusOnRender!==false){this.on({render:function(){if(Credit360.CookieBanner.isBannerVisible()){return;}
this.getCmp('username').focus();},scope:this,single:true,delay:100});}
Chain.panel.LoginPanel.superclass.constructor.call(this,config);var el=Ext.get('logoff-message');if(el){Ext.getDoc().on({mousedown:function(){el.fadeOut({endOpacity:0,easing:'easeOut',duration:.5,remove:true,useDisplay:false});},scope:this,single:true});}
this.getCmp('username').clearInvalid();if(g_config.brandingServiceEnabled){this.getCmp('username').el.dom.setAttribute('placeholder',__tr('69296c49e40c40138ab3548c1618f6cdaae174c8'));this.getCmp('password').el.dom.setAttribute('placeholder',__tr('8be3c943b1609fffbfc51aad666d0a04adf83c9d'));this.getCmp('reference_field').el.dom.setAttribute('placeholder',__tr('db1c784524e1b54011a95823026161f7c8517fe0'));this.getCmp('justification_field').el.dom.setAttribute('placeholder',__tr('7d2a7bff0abb0d0de4946434ea191a1498465dec'));}};Ext.extend(Chain.panel.LoginPanel,Ext.FormPanel,{border:false,layout:'form',labelAlign:'top',cls:'highlight-fields',standardSubmit:true,name:'login-form',bodyStyle:'background: transparent;',loginHandler:UserServicesHandler.logon,sendResetHandler:UserServicesHandler.sendResetTo,htmlEncode:function(stringToEncode){return stringToEncode.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},doLogin:function(){var data=this.getData();this.usernameBlurred(data.username);if(!this.isValid()){Credit360.Page.showMessage(__tr('754b6418c665cd54ed709f20fd7f5e3e8713a05f'));return;}
this.getCmp('password').setValue(this.htmlEncode(this.getCmp('password').getValue()))
this.sendLoginDetails(data.username,data.password,data.loginType,data.justification,data.reference);},sendLoginDetails:function(username,password,loginType,justification,reference){if(this.loggingIn){return;}
this.loggingIn=true;this.showMask(__tr('2b01abd3fe5d07b59d90202573da2fb788d000e3'));var callback={success:function(data){if(data.success){this.onLoginSuccess(data);}else{this.onLoginError(data);}},andFinally:this.onLoginFinally,scope:this};if(this.loginHandler.name==='logonForInvitation'){this.loginHandler(username,password,callback);}else{this.loginHandler(username,password,typeof(loginType)==='undefined'?-1:loginType,justification||"",reference||"",callback);}},disableLoginButton:function(){this.getCmp('login-button').setDisabled(true);},onLoginSuccess:function(data){this.disableLoginButton();Ext.getCmp('loginRedirectTo').setValue(data.actions.redirectTo);this.getForm().standardSubmit=true;this.getForm().submit({url:'/csr/site/chain/public/login.acds'});},onLoginError:function(data){this.hideMask();if(data.errors.message){this.getCmp('username').markInvalid(data.errors.message);}else if(data.errors.fatal){if(data.errors.fatal==__tr('0b23705477a6c02c7912537221e9456c3a90bf8b')){var loginData=this.getData();var resetPassword=new Chain.dialog.ResetPassword({hasPasswordExpired:true,username:loginData.username,oldPassword:loginData.password,showOldPassword:true});resetPassword.on({hide:function(){if(resetPassword.passChangeSuccess){resetPassword.getCmp('password').setValue(this.htmlEncode(resetPassword.getCmp('password').getValue()))
this.sendLoginDetails(loginData.username,resetPassword.getCmp('password').getValue());}},scope:this,single:true});resetPassword.show();}else
{Ext.Msg.show({title:__tr('986b710832dcd073b1d44ff2b4eab420b86f150c'),msg:__tr('3fd33f852cd120ab4c95713c739b0793f6f58f30','<br/><br/>',data.errors.fatal,String.format('<a href="mailto://{0}">{0}</a>','support@credit360.com')),buttons:{ok:__tr('9ce3bd4224c8c1780db56b4125ecf3f24bf748b7')},icon:Ext.MessageBox.WARNING});}}},onLoginFinally:function(){this.loggingIn=false;this.fireEvent('logonreturned',this);},isValid:function(preventMark){var valid=this.getCmp('username').isValid(preventMark);valid=this.getCmp('password').isValid(preventMark)&&valid;valid=this.getCmp('login_type').isValid(preventMark)&&valid;valid=this.getCmp('justification_field').isValid(preventMark)&&valid;return valid;},getData:function(){return{username:this.getCmp('username').getValue(),password:this.getCmp('password').getValue(),loginType:this.getCmp('login_type').getValue()!=null?this.getCmp('login_type').getValue():-1,justification:this.getCmp('justification_field').getValue(),reference:this.getCmp('reference_field').getValue()};},onSpecialKey:function(cmp,e){if(e.getKey()===e.ENTER){this.doLogin();}},onUsernameBlur:function(cmp,e){this.usernameBlurred(cmp.getValue());},usernameBlurred:function(username){if(g_config.requireSuperAdminLoginJustification&&username.indexOf("//")==0){this.justificationPanel.el.dom.firstChild.className="";this.justificationPanel.show();this.getCmp('login_type').enable();this.getCmp('justification_field').enable();this.getCmp('reference_field').enable();}else{this.justificationPanel.hide();this.getCmp('login_type').disable();this.getCmp('justification_field').disable();this.getCmp('reference_field').disable();}},onKeyUp:function(cmp,e){if(cmp.isValid(true)){cmp.clearInvalid();}},showMask:function(msg){this.mask=this.mask||new Ext.LoadMask(Ext.getBody(),{removeMask:false});this.mask.msg=msg;this.mask.show();},hideMask:function(){if(this.mask){this.mask.hide();}},onNewUserClick:function(event,target,obj){this.onForgottenPasswordClick(event,target,obj,__tr('a4ce18abb4d468a2a8b2ac05ca0368233e75b09b'));},onForgottenPasswordClick:function(event,target,obj,title){this.resetDlg=this.resetDlg||new Ext.Window({title:title||__tr('0d526f0df43644a621a27c696f691cb293331d3d'),constrain:true,closeAction:'hide',baseCls:'ux-plain-window',modal:true,width:450,border:false,items:[{xtype:'box',cls:'big-info-icon',style:'padding-left: 40px; padding-right:10px; padding-bottom: 15px; font-size:12px; margin-top: 10px; margin-left: 5px',autoEl:{html:__tr('f7cbbc8f4246db20e3c79ad95d37761c1b7236c7')}},{layout:'form',border:false,cls:'reset-pw',bodyStyle:'padding-left:40px;padding-right:15px;background:transparent',items:[{xtype:'textfield',id:this.makeId('send-to'),allowBlank:false,msgTarget:'under',hideLabel:true,anchor:'100%',listeners:{render:function(cmp){var el=this.resetDlg.el;cmp.on({valid:el.enableShadow.createDelegate(el,[true],false),invalid:el.enableShadow.createDelegate(el,[true],false)});},scope:this,delay:1}}]}],buttonAlign:'center',buttons:[{text:__tr('c55ee3b9a795c8e41942a2602c5a92680145ed41'),iconCls:'mail-icon',handler:function(){var sendTo=this.getCmp('send-to');if(!sendTo.isValid()){return;}
this.sendResetTo(sendTo.getValue());this.resetDlg.hide();},scope:this}],listeners:{show:function(){var sendTo=this.getCmp('send-to');sendTo.setValue(this.getCmp('username').getValue());sendTo.clearInvalid();sendTo.focus(true);},scope:this,delay:100}});this.resetDlg.setTitle(title||__tr('0d526f0df43644a621a27c696f691cb293331d3d'));this.resetDlg.show();},sendResetTo:function(username){this.showMask(__tr('b4b7b3403f9d98183f8089dbc76b25ed62c95b30'));this.sendResetHandler(username,{success:function(data){Ext.Msg.show({title:__tr('1c1fd2fffe6ec00bf11407866a4ab957b6f5b4c1'),msg:__tr('662e82c13478b1dae859305ea384d26b44b27351','<br/><br/>',String.format('<a href="mailto://{0}">{0}</a>',Ext.util.Format.htmlEncode(data.supportEmail))),icon:Ext.Msg.INFO,buttons:{ok:__tr('9ce3bd4224c8c1780db56b4125ecf3f24bf748b7')},maxWidth:350,minWidth:250});},andFinally:function(){this.hideMask();},scope:this});}});__loaded("70e32b1e827fb2817ddbbcc9343500a0d7761662");}else{__trS('69296c49e40c40138ab3548c1618f6cdaae174c8','E-mail address / User ID','E-mail address / User ID',{});__trS('8be3c943b1609fffbfc51aad666d0a04adf83c9d','Password','Password',{});__trS('2d7550c0f85f4ab4fdd062dea285aac3e3241151','Login type','Login type',{});__trS('bb4f425f3db6cc9689d62cb2061db6064b5b65ef','--- Select login type ---','--- Select login type ---',{});__trS('7d2a7bff0abb0d0de4946434ea191a1498465dec','Justification','Justification',{});__trS('db1c784524e1b54011a95823026161f7c8517fe0','Reference','Reference',{});__trS('4e5a2893bdcc7d239c1db72e4c4ffbe4bea73174','Login','Login',{});__trS('4633268f2e9f05ecf8f72e81d193b5b74c746dc2','Are you a new user?','Are you a new user?',{});__trS('8425bcda589f075204f8296b9b13bb41b1b3f9c7','First login? Set a password on a new account','First login? Set a password on a new account',{});__trS('b2c9f6d2722138d4e59cbc99769929d53eb80a6c','Have you forgotten your password?','Have you forgotten your password?',{});__trS('754b6418c665cd54ed709f20fd7f5e3e8713a05f','Please fix the errors','Please fix the errors',{});__trS('2b01abd3fe5d07b59d90202573da2fb788d000e3','Logging in...','Logging in...',{});__trS('0b23705477a6c02c7912537221e9456c3a90bf8b','Your password is expired.','Your password is expired.',{});__trS('986b710832dcd073b1d44ff2b4eab420b86f150c','Cannot login','Cannot login',{});__trS('3fd33f852cd120ab4c95713c739b0793f6f58f30','You are unable to login as: {0}{1}{0}Please contact {2} for further assistance.','You are unable to login as: {0}{1}{0}Please contact {2} for further assistance.',{});__trS('9ce3bd4224c8c1780db56b4125ecf3f24bf748b7','OK','OK',{});__trS('a4ce18abb4d468a2a8b2ac05ca0368233e75b09b','New user','New user',{});__trS('0d526f0df43644a621a27c696f691cb293331d3d','Reset my password','Reset my password',{});__trS('f7cbbc8f4246db20e3c79ad95d37761c1b7236c7','Please enter your E-mail address or User ID below and we\'ll send you an e-mail with a link to set a new password.','Please enter your E-mail address or User ID below and we\'ll send you an e-mail with a link to set a new password.',{});__trS('c55ee3b9a795c8e41942a2602c5a92680145ed41','Send e-mail','Send e-mail',{});__trS('b4b7b3403f9d98183f8089dbc76b25ed62c95b30','Sending password reset e-mail...','Sending password reset e-mail...',{});__trS('1c1fd2fffe6ec00bf11407866a4ab957b6f5b4c1','Reset e-mail sent','Reset e-mail sent',{});__trS('662e82c13478b1dae859305ea384d26b44b27351','If you entered your E-mail address or User ID correctly then you have been sent an e-mail containing instructions to set a new password.{0}If you do not receive an e-mail then please contact {1}.','If you entered your E-mail address or User ID correctly then you have been sent an e-mail containing instructions to set a new password.{0}If you do not receive an e-mail then please contact {1}.',{});}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["a2ddd8c498058e3ba9a87a1addad11969149d315"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Chain.dialog');Chain.dialog.ResetPassword=function(config){Ext.apply(this,new Ext.ux.UniqueIdHelper(this.baseId));Ext.apply(this,config||{});this.passChangeSuccess=false;this.buttons=[{text:__tr('94408e41c12e924b82da7ea6e79e5cb69ac9e042'),iconCls:'tick-icon',handler:this.changePassword,scope:this}];var formItems=[];if(this.hasPasswordExpired||(this.showOldPassword&&(this.userSid===g_config.userSid))){formItems.push({xtype:'textfield',inputType:'password',fieldLabel:__tr('19dff4dad0a7214ece14624f8c4c9fb206a1cfdd'),anchor:'99%',id:this.makeId('old-password'),listeners:{valid:this.onValid,invalid:this.onInvalid,specialkey:this.onSpecialKey,focus:function(cmp){cmp.getEl().dom.readOnly=false;},blur:function(cmp){cmp.getEl().dom.readOnly=true;},scope:this}});}
formItems.push({xtype:'textfield',inputType:'password',fieldLabel:__tr('d850ee188c7c55b64bc3624534de5c5051a57dc6'),anchor:'99%',id:this.makeId('password'),listeners:{valid:this.onValid,invalid:this.onInvalid,specialkey:this.onSpecialKey,scope:this}});formItems.push({xtype:'textfield',inputType:'password',fieldLabel:__tr('f85039fd8e49f782229c7c4e0f1b3b2a0f95e9e4'),anchor:'99%',id:this.makeId('confirm-password'),listeners:{valid:this.onValid,invalid:this.onInvalid,specialkey:this.onSpecialKey,scope:this}});this.items=[{layout:'form',border:false,labelAlign:'left',labelWidth:150,cls:'reset-pw',bodyStyle:'padding: 5px; background-color: transparent',items:formItems},{xtype:'box',autoEl:{id:this.makeId('invalid-msg'),style:'width: auto',cls:'x-form-invalid-msg x-hidden'}}];Chain.dialog.ResetPassword.superclass.constructor.call(this,config);this.on({show:function(){if(this.getCmp('old-password')){this.getCmp('old-password').focus();}else{this.getCmp('password').focus();}},scope:this,delay:20});this.title=this.hasPasswordExpired?__tr('c3d8d331783ddb1c49bfc2ae44c57eacad2a8796'):__tr('5c4bc97ee5d0ac344829dbcef02d7302feb098a8');if(this.hasPasswordExpired&&this.oldPassword){var op=this.getCmp('old-password');op.setValue(this.oldPassword);op.readOnly=true;this.getCmp('password').focus();}}
Ext.extend(Chain.dialog.ResetPassword,Ext.Window,{border:false,closeAction:'hide',baseCls:'ux-plain-window',constrain:true,modal:true,resizeable:false,width:320,hide:function(){if(this.ignoreEverything){return;}
Chain.dialog.ResetPassword.superclass.hide.call(this);},show:function(el){Ext.each(['password','confirm-password'],function(id){this.getCmp(id).setValue('');this.getCmp(id).clearInvalid();},this);Chain.dialog.ResetPassword.superclass.show.call(this,el);},onValid:function(cmp){if(this.ignoreValid){return;}
this.ignoreValid=true;this.get('invalid-msg').addClass('x-hidden');this.getCmp(cmp.id===this.makeId('password')?'confirm-password':'password').clearInvalid();this.fixSize();this.ignoreValid=false;},onInvalid:function(){var el=this.get('invalid-msg');el.update(this.invalidMsg);el.removeClass('x-hidden');this.fixSize();this.ignoreValid=true;(function(){this.ignoreValid=false;}).defer(1000,this);},fixSize:function(){this.el.enableShadow(true);},onSpecialKey:function(field,e){if(e.getKey()===e.ENTER){this.changePassword();}},onChangeSuccess:function(result){if(result.success){Credit360.Page.showMessage(this.hasPasswordExpired?__tr('44b7d825cb472d2d2524ecb87d096737ff6a13c0'):__tr('1037fb83229cfa61f048d44b0031925a30b9125c'));this.passChangeSuccess=true;this.hide.defer(1,this);}else if(result.errors.passwordNotComplex||result.errors.passwordReused){if(result.errors.passwordNotComplex){this.invalidMsg=__tr('3aa96960b9a39adb7abf8c3ffa2d19499f0f4beb')+result.errors.policiesViolated;}else if(result.errors.passwordReused){this.invalidMsg=__tr('974eb7467f56b9fdcd4364af9c200e122e4e0eda');}
this.getCmp('password').markInvalid();this.getCmp('confirm-password').markInvalid();}else if(result.errors.oldPasswordIncorrect){this.invalidMsg=__tr('fad767edbc79ffba09204f5e0e0220c3b80286ba');if(this.getCmp('old-password')){this.getCmp('old-password').markInvalid();}}else{alert('Unknown error');}},changePassword:function(){if(this.ignoreEverything){return;}
var pwd=this.getCmp('password').getValue();var cpwd=this.getCmp('confirm-password').getValue();if(pwd!==cpwd){this.invalidMsg=__tr('d24f78a66a258fd75cc8d69bf8d8534bf03de913');this.getCmp('password').markInvalid();this.getCmp('confirm-password').markInvalid();return;}
if(!pwd.trim()){this.invalidMsg=__tr('0b6b0d2bc199a3efd6198755b5c81a80f89d53c5');this.getCmp('password').markInvalid();this.getCmp('confirm-password').markInvalid();return;}
if(this.hasPasswordExpired){if(this.getCmp('old-password').getValue()==pwd){this.invalidMsg=__tr('e0f1fbc4a065985f12262c5b7e91d40873717179');this.getCmp('password').markInvalid();this.getCmp('confirm-password').markInvalid();return;}}
this.ignoreEverything=true;this.remoteMask=this.remoteMask||new Ext.LoadMask(this.el,{msg:__tr('bd1d0ab83311809e940ba41e55a2ae225b7bdff9')});this.remoteMask.show();if(this.hasPasswordExpired){UserServicesHandler.changePasswordAtLogon(this.username,this.getCmp('old-password').getValue(),pwd,{success:this.onChangeSuccess,andFinally:function(){this.ignoreEverything=false;this.remoteMask.hide();},scope:this});}else if((this.userSid==g_config.userSid)&&this.getCmp('old-password')){UserServicesHandler.changePassword(this.getCmp('old-password').getValue(),pwd,{success:this.onChangeSuccess,andFinally:function(){this.ignoreEverything=false;this.remoteMask.hide();},scope:this});}else{UserServicesHandler.SetCompanyUserPassword(this.companySid,this.userSid,pwd,{success:this.onChangeSuccess,andFinally:function(){this.ignoreEverything=false;this.remoteMask.hide();},scope:this});}}},this);__loaded("a2ddd8c498058e3ba9a87a1addad11969149d315");}else{__trS('94408e41c12e924b82da7ea6e79e5cb69ac9e042','Set password','Set password',{});__trS('19dff4dad0a7214ece14624f8c4c9fb206a1cfdd','Current password','Current password',{});__trS('d850ee188c7c55b64bc3624534de5c5051a57dc6','New password','New password',{});__trS('f85039fd8e49f782229c7c4e0f1b3b2a0f95e9e4','Confirm new password','Confirm new password',{});__trS('c3d8d331783ddb1c49bfc2ae44c57eacad2a8796','Your password has expired','Your password has expired',{});__trS('5c4bc97ee5d0ac344829dbcef02d7302feb098a8','Reset password','Reset password',{});__trS('44b7d825cb472d2d2524ecb87d096737ff6a13c0','Password successfully set','Password successfully set',{});__trS('1037fb83229cfa61f048d44b0031925a30b9125c','Password successfully reset','Password successfully reset',{});__trS('3aa96960b9a39adb7abf8c3ffa2d19499f0f4beb','The password must ','The password must ',{});__trS('974eb7467f56b9fdcd4364af9c200e122e4e0eda','This password is the same as one of your previous ones.  Please enter a new password.','This password is the same as one of your previous ones.  Please enter a new password.',{});__trS('fad767edbc79ffba09204f5e0e0220c3b80286ba','Your old password was incorrect.','Your old password was incorrect.',{});__trS('d24f78a66a258fd75cc8d69bf8d8534bf03de913','The passwords do not match','The passwords do not match',{});__trS('0b6b0d2bc199a3efd6198755b5c81a80f89d53c5','The passwords cannot be blank','The passwords cannot be blank',{});__trS('e0f1fbc4a065985f12262c5b7e91d40873717179','This password is the same as your previous one.  Please enter a different password.','This password is the same as your previous one.  Please enter a different password.',{});__trS('bd1d0ab83311809e940ba41e55a2ae225b7bdff9','Setting new password...','Setting new password...',{});}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["611cf69f90dad1ca9741719650e0529a8f1dc738"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Ext.ux');Ext.ux.IconCombo=Ext.extend(Ext.ux.ComboBox,{onRender:function(ct,pos){this.tpl=this.tpl||'<tpl for="."><div class="x-combo-list-item x-icon-combo-item {'+this.iconClsField+'}">{'+this.displayField+'}</div></tpl>';Ext.ux.IconCombo.superclass.onRender.call(this,ct,pos);var wrap=this.el.up('div.x-form-field-wrap');this.wrap.applyStyles({position:'relative'});this.el.addClass('x-icon-combo-input');this.flag=Ext.DomHelper.append(wrap,{tag:'div',style:'position:absolute'});},getOptimalWidth:function(){return Ext.ux.IconCombo.superclass.getOptimalWidth.call(this)+28;},setIconCls:function(){var rec;var value=this.getValue();this.store.each(function(r){if(r.get(this.valueField)===value){rec=r;}
return!rec;},this);if(this.flag){this.flag.className='x-icon-combo-icon '+(rec?rec.get(this.iconClsField):'');if(rec&&rec.get(this.iconClsField)){this.el.addClass('x-icon-combo-input');this.el.removeClass('x-icon-combo-input-noicon');}else{this.el.removeClass('x-icon-combo-input');this.el.addClass('x-icon-combo-input-noicon');}}},setValue:function(value){Ext.ux.IconCombo.superclass.setValue.call(this,value);this.setIconCls();},clearValue:function(){Ext.ux.IconCombo.superclass.setValue.call(this);this.setIconCls();}});Ext.reg('iconcombo',Ext.ux.IconCombo);__loaded("611cf69f90dad1ca9741719650e0529a8f1dc738");}else{}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["62e20b770e1bb5c78f53cf97e7738f5640168138"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Ext.ux');Ext.ux.LanguageCombo=function(config){Ext.ux.LanguageCombo.superclass.constructor.call(this,Ext.apply({store:new Ext.data.SimpleObjectStore({fields:['value','description','countryFlagCls'],data:config.languages}),displayField:"description",iconClsField:'countryFlagCls',valueField:"value",typeAhead:false,mode:"local",triggerAction:"all",readOnly:true},config));}
Ext.extend(Ext.ux.LanguageCombo,Ext.ux.IconCombo,{});Ext.reg('languagecombo',Ext.ux.LanguageCombo);__loaded("62e20b770e1bb5c78f53cf97e7738f5640168138");}else{}}}
__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["8cadb03c9636729be650a2c12b19ac53a3e50c25"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){UserSettingsHandler=function()
{var nextId=0;var url="/csr/shared/usersettings.ashx";var proxy={"getPortletSettings":function(portletName,tabPortletId,callback,scope){Call("getPortletSettings",[portletName,tabPortletId],callback,scope,Array.prototype.slice.call(arguments,4));},"getRegionTranslations":function(regionSid,description,callback,scope){Call("getRegionTranslations",[regionSid,description],callback,scope,Array.prototype.slice.call(arguments,4));},"getSettings":function(category,callback,scope){Call("getSettings",[category],callback,scope,Array.prototype.slice.call(arguments,3));},"setLanguageInSession":function(lang,callback,scope){Call("setLanguageInSession",[lang],callback,scope,Array.prototype.slice.call(arguments,3));},"setPortletSettings":function(portletName,tabPortletId,jo,callback,scope){Call("setPortletSettings",[portletName,tabPortletId,jo],callback,scope,Array.prototype.slice.call(arguments,5));},"setSettings":function(category,jo,callback,scope){Call("setSettings",[category,jo],callback,scope,Array.prototype.slice.call(arguments,4));},"system.about":function(callback,scope){Call("system.about",[],callback,scope,Array.prototype.slice.call(arguments,2));},"system.listMethods":function(callback,scope){Call("system.listMethods",[],callback,scope,Array.prototype.slice.call(arguments,2));},"system.version":function(callback,scope){Call("system.version",[],callback,scope,Array.prototype.slice.call(arguments,2));}};function Call(method,params,callback,scope,callbackParams)
{var request={id:++nextId,method:method,params:params};Jayrock.Rpc.asyncRequest(url,request,callback,scope,callbackParams);}
return proxy;}();__loaded("8cadb03c9636729be650a2c12b19ac53a3e50c25");}else{}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["11c80be9b730281be3336f3a64a3d244a35c83ef"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Ext.ux');function RenderLanguagePicker(config,_confirmChangeCallback,_onConfirmChange){if(config.siteLanguages.length>1){var langCombo=new Ext.ux.LanguageCombo({cls:'languagePicker',languages:config.siteLanguages,renderTo:config.renderTo||"languagePicker",width:g_config.brandingServiceEnabled?'99%':'auto',value:config.language||"en-gb",forceSelection:true,confirmChangeCallback:_confirmChangeCallback||function(){return false;},onConfirmChange:_onConfirmChange||function(){},allowBlank:false,listeners:{select:function(combo,rec,idx){UserSettingsHandler.setLanguageInSession(rec.get("value"),function(){location.reload();});},beforeSelect:function(combo,rec,idx){if(combo.confirmChangeCallback()&&confirm(__tr('609a08c6608bcc005a8c485a1d176f1bd2848ce8'))||!combo.confirmChangeCallback()){combo.onConfirmChange();return true;}
return false;}}});}}
__loaded("11c80be9b730281be3336f3a64a3d244a35c83ef");}else{__trS('609a08c6608bcc005a8c485a1d176f1bd2848ce8','Changing language will cause unsaved data to be lost. Are you sure you wish to continue ?','Changing language will cause unsaved data to be lost. Are you sure you wish to continue ?',{});}}}__scripts=typeof(__scripts)==="undefined"?{}:__scripts;if(!__scripts["bf083f71e123c35080e3fb30af881752a6c1b1b9"]){for(var __trPass=0;__trPass<2;++__trPass){if(__trPass==1){Ext.namespace('Ext.ux');Ext.ux.UniqueIdHelper=function(baseId)
{this.baseId=baseId||Ext.id();var makeSuffix=function(args){var suffix='';for(var i=0;i<args.length;i++){suffix+='-'+args[i];}
return suffix;};this.getCmp=function()
{return Ext.getCmp(this.baseId+makeSuffix(arguments))||Ext.getCmp(arguments[0]);};this.get=function()
{return Ext.get(this.baseId+makeSuffix(arguments))||Ext.get(arguments[0]);};this.makeId=function()
{return this.baseId+(makeSuffix(arguments)||Ext.id());};this.extractId=function(id)
{return(!id||id.indexOf(this.baseId+'-')!==0)?id:id.substr(this.baseId.length+1);};};__loaded("bf083f71e123c35080e3fb30af881752a6c1b1b9");}else{}}}__require("bfe63dbf5c57e046488208353e7c40f503dfdfc3",function(){__require("06833a19909e9ed4aac2f395a9a8ebd6c5e66586",function(){__require("70e32b1e827fb2817ddbbcc9343500a0d7761662",function(){__require("a2ddd8c498058e3ba9a87a1addad11969149d315",function(){__require("611cf69f90dad1ca9741719650e0529a8f1dc738",function(){__require("62e20b770e1bb5c78f53cf97e7738f5640168138",function(){__require("8cadb03c9636729be650a2c12b19ac53a3e50c25",function(){__require("11c80be9b730281be3336f3a64a3d244a35c83ef",function(){__require("bf083f71e123c35080e3fb30af881752a6c1b1b9",function(){__loaded("79db0670a264bced7ad148f952b9ec531d6d70a1");});});});});});});});});});}