//>>built
define("mill/jssupport/base","dojo/_base/lang dojo/_base/array dojo/io-query dojo/query dojo/dom-attr dojo/topic dojo/cookie dojo/hash dojo/router dojo/Deferred dojo/DeferredList dojo/i18n!mill/nls/resources mill/jssupport/base mill/jssupport/session mill/jssupport/gdpr mill/jssupport/StoreData mill/mill".split(" "),function(h,t,A,B,q,n,H,C,u,p,D,E,I,J,F,K,m){window.base||(window.base={});return window.base=h.mixin(window.base,{locale:dojo.locale.toLowerCase().match(/^ru/)?"RU":"EN",anonymousHandler:null,
mainHandler:null,accessCategory:null,admissionYear:null,checkGDPR:F,deferredActionQuery:!1,maxDocCopySize:null,fileMaxSizeOptionName:null,optionsNameArray:null,optionsValue:null,rtti:null,queryString:null,regDepartment:null,timeLineName:null,registrationPDConfirmText:null,registrationPDAddConfirmText:null,registrationAccuracyConfirmText:null,registrationRequestTimePoint:null,registerHandler:null,registrationRequestClass:null,countryPhoneCodeData:null,_localizationCache:null,_getLocalizationErrorsCache:null,
_internetResourcesCache:null,_preventLoadData:!1,logError:function(a){m.fieldValue(m.fieldValue(window,"console"),"error").call(null,a)},getLocalization:function(a,b){var d=A.queryToObject(document.location.search.substring(1)),c=this._getLocalizationErrorsCache||(this._getLocalizationErrorsCache={}),e=this._localizationCache||(this._localizationCache={}),f=(b||this.locale).toUpperCase(),g=null,k=!1;if(!a)return"";Object.prototype.hasOwnProperty.call(e,f)&&(e=e[f],Object.prototype.hasOwnProperty.call(e,
a)&&(g=e[a]||""));null===g&&a.match(/[A-Za-z]/)&&!c[a]&&/\w+\.\w+/gi.test(a)&&!/\.Example$/.test(a)&&"\x3cspan class\x3d'red'\x3e*\x3c/span\x3e"!==a&&(c[a]=!0,this.logError(E.unableToGetTranslationForIdentifier+" "+a));Object.prototype.hasOwnProperty.call(d,"show_resource_idents")&&(k="true"===d.show_resource_idents||"1"===d.show_resource_idents);return k?null!==g?a+": "+g:"":g},processInternetResources:function(a){function b(f,g){f&&(q.set(g,"href",f),q.get(g,"target")||q.set(g,"target",f.match(/^http/)||
f.match(/^www/)?"_blank":"_self"));q.remove(g,"ir")}for(var d in this._internetResourcesCache)if(Object.prototype.hasOwnProperty.call(this._internetResourcesCache,d)){var c=this._internetResourcesCache[d]||"",e=B("a[ir\x3d'"+d+"']",a||null);t.forEach(e,b.bind(this,c))}},getInternetResource:function(a){return this._internetResourcesCache&&h.isObject(this._internetResourcesCache)&&Object.prototype.hasOwnProperty.call(this._internetResourcesCache,a)?this._internetResourcesCache[a]||"":""},registerMenuItem:function(a){h.mixin(a,
{layoutItem:null,mobileItem:null});a.preventMenuItem||n.publish("office.layout.LayoutMenu.registerItem",a);n.publish("office.layout.MobileMenu.registerItem",a);return a},logout:function(){(this.session||m.session).logout(!0).then(function(){document.location=""})},domainStore:function(a,b,d,c,e,f,g,k,l){b=[{part:0,name:"ID"},{part:1,name:b,special:"4",context:d||null}].concat(k||[]);if(h.isObject(c)&&null!==c)for(d=0;d<c.length;d++)b.push({part:0,name:c[d]});else h.isString(c)?b.push({part:0,name:c}):
b.push({part:0,name:"Description"},{part:0,name:"EngDescription"});if(h.isObject(e)&&null!==e)for(c=0;c<e.length;c++)b.push({part:2,name:e[c]});else h.isString(e)&&b.push({part:2,name:e});if(h.isObject(f)&&null!==f)for(c=0;c<f.length;c++)b.push({part:3,name:f[c]});else h.isString(f)&&b.push({part:3,name:f});return new vuz.storeData({handler:l||this.mainHandler,className:a,request:b,doTranslate:"boolean"===typeof g?g:!1,clientFiltering:!e})},enumerationStore:function(a,b,d){h.isArray(a)&&(a=a.join(";"));
a=[{part:0,name:"ID"},{part:0,name:"Name"},{part:0,name:"Description"},{part:1,name:"Master$N",value:a},{part:2,name:"Position"}];h.isArray(d)&&(a=a.concat(d));return new vuz.storeData({className:"TEnumerationItem",handler:this.mainHandler,clientFiltering:"boolean"===typeof b?b:!1,request:a})},downloadBlob:function(a,b,d,c,e){require(["mill/mill"],h.hitch(this,function(f){f.downloadBlob({handler:this.mainHandler||(window.app?window.app.handler:""),className:a,propName:b,ID:d,fileName:c||null,extension:e||
null})}))},getMaxDocCopySize:function(){var a=new p;require(["dojo/request","mill/mill"],h.hitch(this,function(b,d){this.fileMaxSizeOptionName||(this.maxDocCopySize=10);this.maxDocCopySize?a.resolve(this.maxDocCopySize):b(d.getRequestUrl(this.mainHandler,"execute.xml"),{headers:{"Disable-Basic-Auth":"yes"},method:"POST",handleAs:"xml",sync:!1,preventCache:!0,data:d.buildQueryParams({className:"TModerationRequest",methodName:"GetOptionIntValue",params:{OptionName:this.fileMaxSizeOptionName}})}).then(function(c){d.parseErrorMessage(c)&&
a.reject(c);a.resolve(this.maxDocCopySize=d.fieldValue(c.documentElement.childNodes[0],"Result"))}.bind(this),a.reject)}));return a.promise},getOptionsValue:function(){var a=new p,b=[];if(!h.isArray(this.optionsNameArray)||null!==this.optionsValue)return a.resolve(),a.promise;require(["dojo/request","mill/mill"],function(d,c){var e=h.hitch(this,function(f){var g=new p;d(c.getRequestUrl(this.mainHandler,"execute.xml"),{headers:{"Disable-Basic-Auth":"yes"},method:"POST",handleAs:"xml",sync:!1,preventCache:!0,
data:c.buildQueryParams({className:"TModerationRequest",methodName:"GetOptionStrValue",params:{OptionName:f}})}).then(function(k){c.parseErrorMessage(k)&&g.reject(k);this.optionsValue||(this.optionsValue={});this.optionsValue[f]=c.fieldValue(k.documentElement.childNodes[0],"Result");g.resolve()}.bind(this),g.reject);return g.promise});t.forEach(this.optionsNameArray,function(f){b.push(e(f))},this);(new D(b)).then(a.resolve,a.reject)}.bind(this));return a.promise},getStartupRoute:function(){return""},
_loadData:function(){var a=new p;require("dojo/_base/fx dojo/fx dojo/when dojo/dom-style dojo/cookie dijit/registry mill/mill mill/jssupport/session".split(" "),h.hitch(this,function(b,d,c,e,f,g,k){this.session.hasRemoteUser()&&this.session.checkRemoteUserAccessCategory(this.accessCategory)&&!this._preventLoadData&&(this._preventLoadData=!0,k.batch({handler:this.mainHandler,language:this.locale,queries:this._batchQuery()}).then(h.hitch(this,function(l){try{this._loadTCommonStudent(l.documentElement.childNodes[0],
l.documentElement.childNodes[1]);this._loadTPresonalDataRequest(l.documentElement.childNodes[2]);var G=this.loadData(l);c(G,function(){var r=g.byId("external"),v=g.byId("internal"),w=g.byId("mobileMenu");d.chain([b.fadeOut({node:r.domNode,onEnd:function(){r.destroyRecursive();w&&w.set("state","internal-state");var x=this.getStartupRoute()||C(),y="startup";t.forEach(u._routes,function(z){z.route.test(x)&&1<z.callbackQueue.length&&(y=x)});setTimeout(function(){u.go(y)},500)}.bind(this)}),b.fadeIn({node:v.domNode,
delay:1E3,onBegin:function(){e.set(v.domNode,{display:"block"});n.publish("vuz.onLoad")},onEnd:a.resolve})]).play()}.bind(this))}catch(r){window.base.session.logout(!0),window.base._preventLoadData=!1,a.reject(r)}}),function(l){this.session.logout(!0);this._preventLoadData=!1;a.reject(l)}.bind(this)))}));return a.promise},translate:function(a){var b=new p;if(!a||this._localizationCache[a.toUpperCase()])return this.locale=(a||this.locale).toUpperCase(),this.checkGDPR(),require(["dojo/cookie"],function(){(this.session||
m.session).hasRemoteUser()?(this.session||m.session).setValue("RemoteUserLocale",this.locale,!0).then(function(){m.setPropValue({headers:{"Disable-Basic-Auth":"yes"},handler:this.mainHandler||(window.application?window.app.handler:""),className:"TRemoteUser",propName:"Locale",ID:m.session.getRemoteUserID(),value:this.locale,sync:!1});this.updateDocumentTitle();n.publish("office._TranslationMixin.translate");b.resolve()}.bind(this),b.reject):(n.publish("office._TranslationMixin.translate"),b.resolve())}.bind(this)),
b.promise},escapeSpaces:function(a){return"string"===typeof a?a.replace(/^\s\s*/,"").replace(/\s\s*$/,""):a},secondNameToLowerCase:function(a){var b="";a=a.trim().replace(/(^\s+|\s+$)|\s\s+/g," ");for(var d=null,c=0;c<a.length;c++)b=d?b+(" "!==d&&"-"!==d?a.charAt(c).toLowerCase():a.charAt(c)):b+a.charAt(c).toUpperCase(),d=a.charAt(c);["\u043a\u044b\u0437\u044b","\u043e\u0433\u043b\u044b"].forEach(function(e){b=b.replace(new RegExp("\\s"+e,"gi")," "+e.toLowerCase());b=b.replace(new RegExp("-"+e,"gi"),
"-"+e.toLowerCase())});return b}})});