//>>built
require({cache:{"url:mill/jssupport/layout/layoutContent/authorizationForm.html":'\x3cdiv\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-testid\x3d"login-username" data-dojo-props\x3d"name: \'login\', placeHolder: \'Office.Login\', required: true, uppercase: true, icon: \'icon-set-user\'"\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-testid\x3d"login-password" data-dojo-props\x3d"type: \'password\', name: \'password\', placeHolder: \'Office.Password\', required: true, icon: \'icon-set-lock\'"\x3e\x3c/div\x3e\x3cdiv class\x3d"officeFormField"\x3e\x3cdiv class\x3d"officeAuthorizationSpinner" data-dojo-attach-point\x3d"progressNode" style\x3d"display:none"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'}});
define("mill/jssupport/layout/layoutContent/AuthorizationForm","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/dom-style dojo/Deferred dojo/cookie dojo/text!mill/jssupport/layout/layoutContent/authorizationForm.html mill/jssupport/TranslatableNode mill/jssupport/form/_FormContent mill/jssupport/form/TextField mill/jssupport/form/CheckBoxField mill/jssupport/form/ButtonField mill/jssupport/base mill/jssupport/session mill/mill".split(" "),function(t,d,n,k,p,u,v,w,q,x,A,r,
B,e,f,y){return mill.registerAlias("office.AuthorizationForm",t("mill.jssupport.layout.layoutContent.AuthorizationForm",[x],{baseClass:"officeAuthorizationForm",submitButtonType:"submit",submitApplicationLabel:"Office.SignIn",submittingApplicationLabel:"Office.SigningIn",retrySubmitApplicationLabel:"Office.SignIn",content:w,formTitle:"Office.SignIn",_authStatusFacade:null,_statusTextWidget:null,buildRendering:function(){this.inherited(arguments);var c=n.create("div",{className:"officeFormField"},
this.messageNode,"after"),a=n.create("div",{className:"officeAuthorizationStatus"},c),b=n.create("span",{className:"officeAuthorizationStatus-icon"},a),l=(new q({className:"officeAuthorizationStatus-text"})).placeAt(a);this._statusTextWidget=l;var m=!1;this._announcementWidget=this._authStatusFacade=c={domNode:a,set:function(g,h){if("text"===g)l.set("text",h||"");else if("color"===g){var z=h&&k.contains(a,h);k.remove(a,["blue","red","green"]);h&&(z&&a.offsetWidth,k.add(a,h))}else"icon"===g&&(k.remove(b,
"icon-set-blocked icon-set-warning icon-set-bullhorn icon-set-confused icon-set-sad icon-set-smile icon-set-info".split(" ")),h&&k.add(b,"icon-set-"+h))},show:function(){m=!0;p.set(a,"opacity","1")},hide:function(){var g=new u;if(!m)return g.resolve(),g.promise;m=!1;p.set(a,"opacity","0");setTimeout(function(){g.resolve()},350);return g.promise}}},startup:function(){this.inherited(arguments);this._statusTextWidget&&this._statusTextWidget.startup();if(window.hasOwnProperty("application")&&"acForeignStudent"===
window.app.accessCategory){var c=new r({name:"PersonalDataConsent",text:"",doubleColumn:!1,required:!0});this.addChild(c);this.registerWidget(c.controlNode);var a=(new q({text:window.app.combinedTranslationIdent("PersonalDataAgreementShort"),display:"inline",onClick:function(){a.set("text",a.get("text")===window.app.combinedTranslationIdent("PersonalDataAgreementShort")?window.app.combinedTranslationIdent("PersonalDataAgreementShort")+";\x3cbr/\x3e;"+window.app.combinedTranslationIdent("PersonalDataAgreementLong"):
window.app.combinedTranslationIdent("PersonalDataAgreementShort"))}})).placeAt(c.controlNode,"after");this.addChild(new r({name:"PDConfirm",text:window.app.combinedTranslationIdent("PDConfirmShort"),doubleColumn:!1,required:!0}))}},getFormValue:function(){return d.mixin(this.gatherFormValues(),{language:"",jsversion:(dojo.version?dojo.version.toString():"")||"",RoistatCategoryName:e.accessCategory||(window.app?window.app.accessCategory:""),RoistatCounter:v("roistat_visit")})},createSuccessMessage:function(c,
a,b,l,m){if(a=this._authStatusFacade)a.set("color",l||"blue"),a.set("icon",b||"smile"),a.set("text",c||""),a.show()},createErrorMessage:function(c,a,b){b=this._authStatusFacade;if(!b)return b;b.set("color","red");b.set("icon",a||"sad");b.set("text",c||"");b.show();return b},submitForm:function(){if(window.xwz)window.app.signin(this.getFormValue(),this);else return this.inherited(arguments)},postForm:function(){this.inherited(arguments);this._announcementWidget=this._authStatusFacade;if(window.ym&&
window.webAnalyticsConfig.WebAnalyticsYandexID)if("acForeignAbiturient"===e.accessCategory)try{ym(window.webAnalyticsConfig.WebAnalyticsYandexID,"reachGoal","ADM_LOGIN_BA")}catch(c){}else if("acForeignMagAbiturient"===e.accessCategory)try{ym(window.webAnalyticsConfig.WebAnalyticsYandexID,"reachGoal","ADM_LOGIN_MA")}catch(c){}f.logout(!0).then(d.hitch(this,function(){this.postRequest({skipErrorStatus:403,url:y.getRequestUrl(e.mainHandler,"sysinfo.xml"),data:this.getFormValue()}).then(d.hitch(this,
function(c){f.load(null,null,null,!0).then(d.hitch(this,function(a){f.hasRemoteUser()?f.checkRemoteUserAccessCategory(e.accessCategory)?(this.submitButton.destroyRecursive(),this.toggleDisabledState(),this.createSuccessMessage("Office.LoadingData",null,null,"blue",!0),a=d.hitch(this,function(){e._loadData().then(function(){},d.hitch(this,function(b){this._announcementWidget.hide().then(d.hitch(this,function(){this.createErrorMessage(b.message)}));throw Error(b);}))}),f.getRemoteUserLocale()&&e.locale!==
f.getRemoteUserLocale()?e.translate(f.getRemoteUserLocale()).then(d.hitch(this,a)):a()):this.createErrorMessage("Office.IncorrectLoginOrPassword","sad"):this.createErrorMessage("Office.IncorrectLoginOrPassword","sad")}),d.hitch(this,function(a){this.createErrorMessage(a.message)}))}),d.hitch(this,function(c){f.load(null,null,null,!0).then(d.hitch(this,function(){403===c.response.status&&this.createErrorMessage("Office.IncorrectLoginOrPassword","sad")}),d.hitch(this,function(a){this.createErrorMessage(a.message)}))}))}))}}))});