1; /* /bitrix/js/main/core/core_autosave.min.js?17689780127141*/ 2; /* /bitrix/js/main/core/core_dd.min.js?17689780122190*/ 3; /* /bitrix/js/main/core/core_timer.min.js?17689780124311*/ 4; /* /bitrix/js/main/session.min.js?16610945512394*/ 5; /* /bitrix/js/main/core/core_tooltip.min.js?176897801211837*/ 6; /* /bitrix/js/main/core/core.min.js?1788847119181629*/ 7; /* /bitrix/js/main/utils.min.js?166109418618721*/ 8; /* /bitrix/js/main/dd.min.js?168814679211114*/ 9; /* /bitrix/js/main/core/core_window.min.js?176897801276324*/ 10; /* /bitrix/js/main/date/main.date.min.js?174348705821981*/ 11; /* /bitrix/js/main/core/core_date.min.js?178227949926793*/ 12 13; /* Start:"a:4:{s:4:"full";s:53:"/bitrix/js/main/date/main.date.min.js?174348705821981";s:6:"source";s:33:"/bitrix/js/main/date/main.date.js";s:3:"min";s:37:"/bitrix/js/main/date/main.date.min.js";s:3:"map";s:37:"/bitrix/js/main/date/main.date.map.js";}"*/ 14this.BX=this.BX||{};(function(e,t){"use strict";function r(e){if(!t.Type.isStringFilled(e)){return""}return e.replace("YYYY","Y").replace("MMMM","F").replace("MM","m").replace("M","M").replace("DD","d").replace("G","g").replace(/GG/i,"G").replace("H","h").replace(/HH/i,"H").replace("MI","i").replace("SS","s").replace("TT","A").replace("T","a")}const s=new t.Cache.MemoryCache;function n(e){return s.remember(`main.date.format.${e}`,(()=>{let s=t.Extension.getSettings("main.date").get(`formats.${e}`);if(t.Type.isStringFilled(s)&&(e==="FORMAT_DATE"||e==="FORMAT_DATETIME")){s=r(s)}return s}))}let _=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"isAmPmMode",value:function e(t){if(t===true){return this._getMessage("AMPM_MODE")}return this._getMessage("AMPM_MODE")!==false}},{key:"convertToUTC",value:function e(r){if(!t.Type.isDate(r)){return null}return new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()))}},{key:"getNewDate",value:function e(t){return new Date(this.getBrowserTimestamp(t))}},{key:"getBrowserTimestamp",value:function e(t){t=parseInt(t,10);const r=new Date(t*1e3).getTimezoneOffset()*60;return(parseInt(t,10)+parseInt(this._getMessage("SERVER_TZ_OFFSET"))+r)*1e3}},{key:"getServerTimestamp",value:function e(t){t=parseInt(t,10);const r=new Date(t).getTimezoneOffset()*60;return Math.round(t/1e3-(parseInt(this._getMessage("SERVER_TZ_OFFSET"),10)+parseInt(r,10)))}},{key:"formatLastActivityDate",value:function e(t,r,s){const n=this.isAmPmMode(true);const _=n===this.AM_PM_MODE.LOWER?"g:i a":n===this.AM_PM_MODE.UPPER?"g:i A":"H:i";const i=[["tomorrow","#01#"+_],["now","#02#"],["todayFuture","#03#"+_],["yesterday","#04#"+_],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")],["s60","sago"],["i60","iago"],["H5","Hago"],["H24","#03#"+_],["d31","dago"],["m12>1","mago"],["m12>0","dago"],["","#05#"]];let a=this.format(i,t,r,s);let o=null;if((o=/^#(\d+)#(.*)/.exec(a))!=null){switch(o[1]){case"01":a=this._getMessage("FD_LAST_SEEN_TOMORROW").replace("#TIME#",o[2]);break;case"02":a=this._getMessage("FD_LAST_SEEN_NOW");break;case"03":a=this._getMessage("FD_LAST_SEEN_TODAY").replace("#TIME#",o[2]);break;case"04":a=this._getMessage("FD_LAST_SEEN_YESTERDAY").replace("#TIME#",o[2]);break;case"05":a=this._getMessage("FD_LAST_SEEN_MORE_YEAR");break;default:a=o[2];break}}return a}},{key:"_getMessage",value:function e(r){return t.Loc.getMessage(r)}},{key:"parse",value:function e(r,s,n,_){if(t.Type.isStringFilled(r)){if(!n){n=this._getMessage("FORMAT_DATE")}if(!_){_=this._getMessage("FORMAT_DATETIME")}let e="";for(let t=1;t<=12;t++){e=e+"|"+this._getMessage("MON_"+t)}const t=new RegExp("([0-9]+|[a-z]+"+e+")","ig");const i=r.match(t);let a=n.match(/(DD|MI|MMMM|MM|M|YYYY)/gi);const o=[];const D=[];const u={};if(!i){return null}if(i.length>a.length){a=_.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/gi)}for(let e=0,t=i.length;e<t;e++){if(i[e].trim()!==""){o[o.length]=i[e]}}for(let e=0,t=a.length;e<t;e++){if(a[e].trim()!==""){D[D.length]=a[e]}}let l=D.findIndex((e=>e==="MMMM"));if(l>0){o[l]=this.getMonthIndex(o[l]);D[l]="MM"}else{l=D.findIndex((e=>e==="M"));if(l>0){o[l]=this.getMonthIndex(o[l]);D[l]="MM"}}for(let e=0,t=D.length;e<t;e++){const t=D[e].toUpperCase();u[t]=t==="T"||t==="TT"?o[e]:parseInt(o[e],10)}if(u["DD"]>0&&u["MM"]>0&&u["YYYY"]>0){const e=new Date;if(s){e.setUTCDate(1);e.setUTCFullYear(u["YYYY"]);e.setUTCMonth(u["MM"]-1);e.setUTCDate(u["DD"]);e.setUTCHours(0,0,0,0)}else{e.setDate(1);e.setFullYear(u["YYYY"]);e.setMonth(u["MM"]-1);e.setDate(u["DD"]);e.setHours(0,0,0,0)}if((!isNaN(u["HH"])||!isNaN(u["GG"])||!isNaN(u["H"])||!isNaN(u["G"]))&&!isNaN(u["MI"])){if(!isNaN(u["H"])||!isNaN(u["G"])){const e=(u["T"]||u["TT"]||"am").toUpperCase()==="PM",t=parseInt(u["H"]||u["G"]||0,10);if(e){u["HH"]=t+(t===12?0:12)}else{u["HH"]=t<12?t:0}}else{u["HH"]=parseInt(u["HH"]||u["GG"]||0,10)}if(isNaN(u["SS"])){u["SS"]=0}if(s){e.setUTCHours(u["HH"],u["MI"],u["SS"])}else{e.setHours(u["HH"],u["MI"],u["SS"])}}return e}}return null}},{key:"getMonthIndex",value:function e(t){const r=t.toUpperCase();const s=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];const n=["january","february","march","april","may","june","july","august","september","october","november","december"];for(let e=1;e<=12;e++){if(r===this._getMessage("MON_"+e).toUpperCase()||r===this._getMessage("MONTH_"+e).toUpperCase()||r===this._getMessage("MONTH_"+e+"_S").toUpperCase()||r===s[e-1].toUpperCase()||r===n[e-1].toUpperCase()){return e}}return t}},{key:"format",value:function e(r,s,n,_){const i=t.Type.isDate(s)?new Date(s.getTime()):t.Type.isNumber(s)?new Date(s*1e3):new Date;const a=t.Type.isDate(n)?new Date(n.getTime()):t.Type.isNumber(n)?new Date(n*1e3):new Date;const o=!!_;const D=this;if(t.Type.isArray(r)){return f(r,i,a,o)}else{if(!t.Type.isStringFilled(r)){return""}}const u=(r.match(/{{([^{}]*)}}/g)||[]).map((e=>(e.match(/[^{}]+/)||[""])[0]));if(u.length>0){u.forEach(((e,t)=>{r=r.replace("{{"+e+"}}","{{"+t+"}}")}))}const l=/\\?(sago|iago|isago|Hago|dago|mago|Yago|sdiff|idiff|Hdiff|ddiff|mdiff|Ydiff|sshort|ishort|Hshort|dshort|mshort|Yshort|yesterday|today|tommorow|tomorrow|.)/gi;const c={d:()=>T(i).toString().padStart(2,"0"),D:()=>this._getMessage("DOW_"+S(i)),j:()=>T(i),l:()=>this._getMessage("DAY_OF_WEEK_"+S(i)),N:()=>S(i)||7,S:()=>
14{if(T(i)%10==1&&T(i)!=11){return"st"}else if(T(i)%10==2&&T(i)!=12){return"nd"}else if(T(i)%10==3&&T(i)!=13){return"rd"}else{return"th"}},w:()=>S(i),z:()=>{const e=new Date(g(i),0,1);const t=new Date(g(i),F(i),T(i));return Math.ceil((t-e)/(24*3600*1e3))},W:()=>{const e=new Date(i.getTime());const t=(S(i)+6)%7;d(e,T(e)-t+3);const r=e.getTime();A(e,0,1);if(S(e)!=4){A(e,0,1+(4-S(e)+7)%7)}const s=1+Math.ceil((r-e)/(7*24*3600*1e3));return s.toString().padStart(2,"0")},F:()=>this._getMessage("MONTH_"+(F(i)+1)+"_S"),f:()=>this._getMessage("MONTH_"+(F(i)+1)),m:()=>(F(i)+1).toString().padStart(2,"0"),M:()=>this._getMessage("MON_"+(F(i)+1)),n:()=>F(i)+1,t:()=>{const e=o?new Date(Date.UTC(g(i),F(i)+1,0)):new Date(g(i),F(i)+1,0);return T(e)},L:()=>{const e=g(i);return e%4==0&&e%100!=0||e%400==0?1:0},o:()=>{const e=new Date(i.getTime());d(e,T(e)-(S(i)+6)%7+3);return g(e)},Y:()=>g(i),y:()=>g(i).toString().slice(2),a:()=>h(i)>11?"pm":"am",A:()=>h(i)>11?"PM":"AM",B:()=>{const e=(i.getUTCHours()+1)%24+i.getUTCMinutes()/60+i.getUTCSeconds()/3600;return Math.floor(e*1e3/24).toString().padStart(3,"0")},g:()=>h(i)%12||12,G:()=>h(i),h:()=>(h(i)%12||12).toString().padStart(2,"0"),H:()=>h(i).toString().padStart(2,"0"),i:()=>E(i).toString().padStart(2,"0"),s:()=>m(i).toString().padStart(2,"0"),u:()=>(R(i)*1e3).toString().padStart(6,"0"),e:()=>{if(o){return"UTC"}return""},I:()=>{if(o){return 0}const e=new Date(g(i),0,1);const t=Date.UTC(g(i),0,1);const r=new Date(g(i),6,0);const s=Date.UTC(g(i),6,0);return 0+(e-t!==r-s)},O:()=>{if(o){return"+0000"}const e=i.getTimezoneOffset();const t=Math.abs(e);return(e>0?"-":"+")+(Math.floor(t/60)*100+t%60).toString().padStart(4,"0")},P:function(){if(o){return"+00:00"}const e=this.O();return e.substr(0,3)+":"+e.substr(3)},Z:()=>{if(o){return 0}return-i.getTimezoneOffset()*60},c:()=>"Y-m-d\\TH:i:sP".replace(l,p),r:()=>"D, d M Y H:i:s O".replace(l,p),U:()=>Math.floor(i.getTime()/1e3),sago:()=>H(U((a-i)/1e3),{0:"FD_SECOND_AGO_0",1:"FD_SECOND_AGO_1","10_20":"FD_SECOND_AGO_10_20",MOD_1:"FD_SECOND_AGO_MOD_1",MOD_2_4:"FD_SECOND_AGO_MOD_2_4",MOD_OTHER:"FD_SECOND_AGO_MOD_OTHER"}),sdiff:()=>H(U((a-i)/1e3),{0:"FD_SECOND_DIFF_0",1:"FD_SECOND_DIFF_1","10_20":"FD_SECOND_DIFF_10_20",MOD_1:"FD_SECOND_DIFF_MOD_1",MOD_2_4:"FD_SECOND_DIFF_MOD_2_4",MOD_OTHER:"FD_SECOND_DIFF_MOD_OTHER"}),sshort:()=>this._getMessage("FD_SECOND_SHORT").replace(/#VALUE#/g,U((a-i)/1e3)),iago:()=>H(U((a-i)/60/1e3),{0:"FD_MINUTE_AGO_0",1:"FD_MINUTE_AGO_1","10_20":"FD_MINUTE_AGO_10_20",MOD_1:"FD_MINUTE_AGO_MOD_1",MOD_2_4:"FD_MINUTE_AGO_MOD_2_4",MOD_OTHER:"FD_MINUTE_AGO_MOD_OTHER"}),idiff:()=>H(U((a-i)/60/1e3),{0:"FD_MINUTE_DIFF_0",1:"FD_MINUTE_DIFF_1","10_20":"FD_MINUTE_DIFF_10_20",MOD_1:"FD_MINUTE_DIFF_MOD_1",MOD_2_4:"FD_MINUTE_DIFF_MOD_2_4",MOD_OTHER:"FD_MINUTE_DIFF_MOD_OTHER"}),isago:()=>{const e=U((a-i)/60/1e3);let t=H(e,{0:"FD_MINUTE_0",1:"FD_MINUTE_1","10_20":"FD_MINUTE_10_20",MOD_1:"FD_MINUTE_MOD_1",MOD_2_4:"FD_MINUTE_MOD_2_4",MOD_OTHER:"FD_MINUTE_MOD_OTHER"});t+=" ";const r=U((a-i)/1e3)-e*60;t+=H(r,{0:"FD_SECOND_AGO_0",1:"FD_SECOND_AGO_1","10_20":"FD_SECOND_AGO_10_20",MOD_1:"FD_SECOND_AGO_MOD_1",MOD_2_4:"FD_SECOND_AGO_MOD_2_4",MOD_OTHER:"FD_SECOND_AGO_MOD_OTHER"});return t},ishort:()=>this._getMessage("FD_MINUTE_SHORT").replace(/#VALUE#/g,U((a-i)/60/1e3)),Hago:()=>H(U((a-i)/60/60/1e3),{0:"FD_HOUR_AGO_0",1:"FD_HOUR_AGO_1","10_20":"FD_HOUR_AGO_10_20",MOD_1:"FD_HOUR_AGO_MOD_1",MOD_2_4:"FD_HOUR_AGO_MOD_2_4",MOD_OTHER:"FD_HOUR_AGO_MOD_OTHER"}),Hdiff:()=>H(U((a-i)/60/60/1e3),{0:"FD_HOUR_DIFF_0",1:"FD_HOUR_DIFF_1","10_20":"FD_HOUR_DIFF_10_20",MOD_1:"FD_HOUR_DIFF_MOD_1",MOD_2_4:"FD_HOUR_DIFF_MOD_2_4",MOD_OTHER:"FD_HOUR_DIFF_MOD_OTHER"}),Hshort:()=>this._getMessage("FD_HOUR_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/1e3)),yesterday:()=>this._getMessage("FD_YESTERDAY"),today:()=>this._getMessage("FD_TODAY"),tommorow:()=>this._getMessage("FD_TOMORROW"),tomorrow:()=>this._getMessage("FD_TOMORROW"),dago:()=>H(U((a-i)/60/60/24/1e3),{0:"FD_DAY_AGO_0",1:"FD_DAY_AGO_1","10_20":"FD_DAY_AGO_10_20",MOD_1:"FD_DAY_AGO_MOD_1",MOD_2_4:"FD_DAY_AGO_MOD_2_4",MOD_OTHER:"FD_DAY_AGO_MOD_OTHER"}),ddiff:()=>H(U((a-i)/60/60/24/1e3),{0:"FD_DAY_DIFF_0",1:"FD_DAY_DIFF_1","10_20":"FD_DAY_DIFF_10_20",MOD_1:"FD_DAY_DIFF_MOD_1",MOD_2_4:"FD_DAY_DIFF_MOD_2_4",MOD_OTHER:"FD_DAY_DIFF_MOD_OTHER"}),dshort:()=>this._getMessage("FD_DAY_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/24/1e3)),mago:()=>H(U((a-i)/60/60/24/31/1e3),{0:"FD_MONTH_AGO_0",1:"FD_MONTH_AGO_1","10_20":"FD_MONTH_AGO_10_20",MOD_1:"FD_MONTH_AGO_MOD_1",MOD_2_4:"FD_MONTH_AGO_MOD_2_4",MOD_OTHER:"FD_MONTH_AGO_MOD_OTHER"}),mdiff:()=>H(U((a-i)/60/60/24/31/1e3),{0:"FD_MONTH_DIFF_0",1:"FD_MONTH_DIFF_1","10_20":"FD_MONTH_DIFF_10_20",MOD_1:"FD_MONTH_DIFF_MOD_1",MOD_2_4:"FD_MONTH_DIFF_MOD_2_4",MOD_OTHER:"FD_MONTH_DIFF_MOD_OTHER"}),mshort:()=>this._getMessage("FD_MONTH_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/24/31/1e3)),Yago:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_AGO_0",1:"FD_YEARS_AGO_1","10_20":"FD_YEARS_AGO_10_20",MOD_1:"FD_YEARS_AGO_MOD_1",MOD_2_4:"FD_YEARS_AGO_MOD_2_4",MOD_OTHER:"FD_YEARS_AGO_MOD_OTHER"}),Ydiff:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_DIFF_0",1:"FD_YEARS_DIFF_1","10_20":"FD_YEARS_DIFF_10_20",MOD_1:"FD_YEARS_DIFF_MOD_1",MOD_2_4:"FD_YEARS_DIFF_MOD_2_4",MOD_OTHER:"FD_YEARS_DIFF_MOD_OTHER"}),Yshort:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_SHORT_0",1:"FD_YEARS_SHORT_1","10_20":"FD_YEARS_SHORT_10_20",MOD_1:"FD_YEARS_SHORT_MOD_1",MOD_2_4:"FD_YEARS_SHORT_MOD_2_4",MOD_OTHER:"FD_YEARS_SHORT_MOD_OTHER"}),x:()=>{const e=this.isAmPmMode(true);const t=e===this.AM_PM_MODE.LOWER?"g:i a":e===this.AM_PM_MODE.UPPER?"g:i A":"H:i";return this.format([["tomorrow","tomorrow, "+t],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")],["s","sago"],["i","iago"],["today","today, "+t],["yesterday","yesterday, "+t],["",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")]],i,a,o)},X:()=>{const e=this.isAmPmMode(true);const t=e===this.AM_PM_MODE.LOWER?"g:i a":e===this.AM_PM_MODE.UPPER?"g:i A":"H:i";const r=this.format([["tomorrow","tomorrow"],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATE"))],["today","today"],["yesterday","yesterday"],["",this.convertBitrixFormat(this._getMessage("FORMAT_DATE"))]],i,a,o);const s=this.format([["tomorrow",t],["today",t],["yesterday",t],["",""]],i,a,o);if(s.length>0){return this._getMessage("FD_DAY_AT_TIME").replace(/#DAY#/g,r).replace(/#TIME#/g,s)}else{return r}},Q:()=>{const e=U((a-i)/60/60/24/1e3);if(e==0){return this._getMessage("FD_DAY_DIFF_1").replace(/#VALUE#/g,1)}else{return this.format([["d","ddiff"],["m","mdiff"],["","Ydiff"]],i,a)}}};let M=false;if(r[0]&&r[0]=="^"){M=true;r=r.substr(1)}let O=r.replace(l,p);
14if(M){O=O.replace(/\s*00:00:00\s*/g,"").replace(/(\d\d:\d\d)(:00)/g,"$1").replace(/(\s*00:00\s*)(?!:)/g,"")}if(u.length>0){u.forEach((function(e,t){O=O.replace("{{"+t+"}}",e)}))}return O;function f(e,t,r,s){const n=U((r-t)/1e3);for(let _=0;_<e.length;_++){const i=e[_][0];const a=e[_][1];let o=null;if(i=="s"){if(n<60){return D.format(a,t,r,s)}}else if((o=/^s(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]&&n>o[2]){return D.format(a,t,r,s)}}else if(n<o[1]){return D.format(a,t,r,s)}}else if(i=="i"){if(n<60*60){return D.format(a,t,r,s)}}else if((o=/^i(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*60&&n>o[2]*60){return D.format(a,t,r,s)}}else if(n<o[1]*60){return D.format(a,t,r,s)}}else if(i=="H"){if(n<24*60*60){return D.format(a,t,r,s)}}else if((o=/^H(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*60*60&&n>o[2]*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*60*60){return D.format(a,t,r,s)}}else if(i=="d"){if(n<31*24*60*60){return D.format(a,t,r,s)}}else if((o=/^d(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*24*60*60&&n>o[2]*24*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*24*60*60){return D.format(a,t,r,s)}}else if(i=="m"){if(n<365*24*60*60){return D.format(a,t,r,s)}}else if((o=/^m(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*31*24*60*60&&n>o[2]*31*24*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*31*24*60*60){return D.format(a,t,r,s)}}else if(i=="now"){if(t.getTime()==r.getTime()){return D.format(a,t,r,s)}}else if(i=="today"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_,0,0,0,0)):new Date(e,n,_,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="todayFuture"){const e=g(r);const n=F(r);const _=T(r);const i=r.getTime();const o=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="yesterday"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_-1,0,0,0,0)):new Date(e,n,_-1,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_,0,0,0,0)):new Date(e,n,_,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="tommorow"||i=="tomorrow"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_+2,0,0,0,0)):new Date(e,n,_+2,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="-"){if(n<0){return D.format(a,t,r,s)}}}return e.length>0?D.format(e[e.length-1][1],t,r,s):""}function g(e){return o?e.getUTCFullYear():e.getFullYear()}function T(e){return o?e.getUTCDate():e.getDate()}function F(e){return o?e.getUTCMonth():e.getMonth()}function h(e){return o?e.getUTCHours():e.getHours()}function E(e){return o?e.getUTCMinutes():e.getMinutes()}function m(e){return o?e.getUTCSeconds():e.getSeconds()}function R(e){return o?e.getUTCMilliseconds():e.getMilliseconds()}function S(e){return o?e.getUTCDay():e.getDay()}function d(e,t){return o?e.setUTCDate(t):e.setDate(t)}function A(e,t,r){return o?e.setUTCMonth(t,r):e.setMonth(t,r)}function H(e,t){const r=e<100?Math.abs(e):Math.abs(e%100);const s=r%10;let n="";if(r==0){n=D._getMessage(t["0"])}else if(r==1){n=D._getMessage(t["1"])}else if(r>=10&&r<=20){n=D._getMessage(t["10_20"])}else if(s==1){n=D._getMessage(t["MOD_1"])}else if(2<=s&&s<=4){n=D._getMessage(t["MOD_2_4"])}else{n=D._getMessage(t["MOD_OTHER"])}return n.replace(/#VALUE#/g,e)}function p(e,t){if(c[e]){return c[e]()}else{return t}}function U(e){return e>=0?Math.floor(e):Math.ceil(e)}}}]);return e}();babelHelpers.defineProperty(_,"AM_PM_MODE",{UPPER:1,LOWER:2,NONE:false});babelHelpers.defineProperty(_,"convertBitrixFormat",r);babelHelpers.defineProperty(_,"getFormat",n);function i(e,t){a(e,t);t.add(e)}function a(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function o(e,t,r){if(!t.has(e)){throw new TypeError("attempted to get private field on non-instance")}return r}const D={format:"Y m d H i s",style:"long"};var u=new WeakSet;var l=new WeakSet;var c=new WeakSet;var M=new WeakSet;var O=new WeakSet;var f=new WeakSet;let g=function(){function e(t){babelHelpers.classCallCheck(this,e);i(this,f);i(this,O);i(this,M);i(this,c);i(this,l);i(this,u);this.milliseconds=Math.abs(t)}babelHelpers.createClass(e,[{key:"format",value:function e(r=D){const s={...D,...r};const n=t.Loc.getMessage("FD_UNIT_ORDER").split(" ");const _=o(this,u,T).call(this,s.style);const i=new Set(s.format.split(" "));const a=o(this,l,F).call(this,s.format);return n.filter((e=>i.has(e))).map((e=>o(this,c,h).call(this,e,e!==a,s.style))).filter((e=>e!=="")).join(_)}},{key:"formatClosest",value:function e(t=D){const r={...D,...t};const s=o(this,l,F).call(this,r.format);return o(this,c,h).call(this,s,false,r.style)}
14},{key:"seconds",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().s)}},{key:"minutes",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().i)}},{key:"hours",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().H)}},{key:"days",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().d)}},{key:"months",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().m)}},{key:"years",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().Y)}}],[{key:"createFromSeconds",value:function t(r){return new e(r*e.getUnitDurations().s)}},{key:"createFromMinutes",value:function t(r){return new e(r*e.getUnitDurations().i)}},{key:"getUnitDurations",value:function e(){return{s:1e3,i:6e4,H:36e5,d:864e5,m:26784e5,Y:31536e6}}}]);return e}();function T(e){if(e==="short"){return t.Loc.getMessage("FD_SEPARATOR_SHORT").replaceAll(" "," ")}return t.Loc.getMessage("FD_SEPARATOR").replaceAll(" "," ")}function F(e){const t=new Set(e.split(" "));const r=Object.entries(g.getUnitDurations()).filter((([e])=>t.has(e)));return r.reduce(((e,t)=>{const r=Math.floor(this.milliseconds/t[1])>=1;const s=t[1]>e[1];return r&&s?t:e}),r[0])[0]}function h(e,t,r){const s=t?o(this,M,E).call(this,e):o(this,O,m).call(this,e);if(t&&s===0){return""}const n=Date.now()/1e3;const i=s*o(this,f,R).call(this,e)/1e3;const a=r==="short"?`${e}short`:`${e}diff`;return _.format(a,n-i,n)}function E(e){const t={s:this.seconds%60,i:this.minutes%60,H:this.hours%24,d:this.days%31,m:this.months%12,Y:this.years};return t[e]}function m(e){const t={s:this.seconds,i:this.minutes,H:this.hours,d:this.days,m:this.months,Y:this.years};return t[e]}function R(e){return g.getUnitDurations()[e]}const S=new t.Cache.MemoryCache;const d={get SERVER_TO_UTC(){return S.remember("SERVER_TO_UTC",(()=>t.Text.toInteger(t.Loc.getMessage("SERVER_TZ_OFFSET"))))},get USER_TO_SERVER(){return S.remember("USER_TO_SERVER",(()=>t.Text.toInteger(t.Loc.getMessage("USER_TZ_OFFSET"))))},get BROWSER_TO_UTC(){return S.remember("BROWSER_TO_UTC",(()=>{const e=t.Text.toInteger((new Date).getTimezoneOffset()*60);return-e}))}};Object.freeze(d);function A(e){if(t.Type.isDate(e)){return p(e)}return t.Text.toInteger(e)}function H(e){return new Date(e*1e3)}function p(e){return Math.floor(e.getTime()/1e3)}let U=d;let y=null;function C(){return U}function I(){var e;return(e=y)!==null&&e!==void 0?e:p(new Date)}let N=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function e(r=null){const s=t.Type.isNumber(r)?r:this.getTimestamp();return H(s)}},{key:"toUserDate",value:function e(t){return H(this.toUser(t))}},{key:"toServerDate",value:function e(t){return H(this.toServer(t))}},{key:"toUser",value:function e(t){return this.toServer(t)+C().USER_TO_SERVER}},{key:"toServer",value:function e(t){return A(t)-C().BROWSER_TO_UTC+C().SERVER_TO_UTC}},{key:"getTimestamp",value:function e(){return I()}}]);return e}();let Y=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function e(r=null){if(t.Type.isNumber(r)){const e=C().SERVER_TO_UTC-C().BROWSER_TO_UTC;return H(r+e)}return N.toServerDate(N.getDate())}},{key:"toUserDate",value:function e(t){return H(this.toUser(t))}},{key:"toBrowserDate",value:function e(t){return H(this.toBrowser(t))}},{key:"toUser",value:function e(t){return A(t)+C().USER_TO_SERVER}},{key:"toBrowser",value:function e(t){return A(t)+C().BROWSER_TO_UTC-C().SERVER_TO_UTC}},{key:"getTimestamp",value:function e(){return N.toServer(N.getTimestamp())}}]);return e}();function w(e,t,r){b(e,t);v(r,"get");return k(e,r)}function v(e,t){if(e===undefined){throw new TypeError("attempted to "+t+" private static field before its declaration")}}function b(e,t){if(e!==t){throw new TypeError("Private static access of wrong provenance")}}function k(e,t){if(t.get){return t.get.call(e)}return t.value}let G=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function r(s=null){if(t.Type.isNumber(s)){return H(s+w(this,e,B))}return H(this.getTimestamp())}},{key:"toBrowserDate",value:function e(t){return H(this.toBrowser(t))}},{key:"toServerDate",value:function e(t){return H(this.toServer(t))}},{key:"toUTCTimestamp",value:function t(r){return A(r)-w(this,e,B)}},{key:"toBrowser",value:function e(t){return A(t)+C().BROWSER_TO_UTC-C().SERVER_TO_UTC-C().USER_TO_SERVER}},{key:"toServer",value:function e(t){return A(t)-C().USER_TO_SERVER}},{key:"getTimestamp",value:function e(){return N.toUser(N.getTimestamp())}}]);return e}();function P(){const e=C().SERVER_TO_UTC+C().USER_TO_SERVER;return e-C().BROWSER_TO_UTC}var B={get:P,set:void 0};const x=Object.freeze({BrowserTime:N,Offset:d,ServerTime:Y,UserTime:G});e.Timezone=x;e.Date=_;e.DateTimeFormat=_;e.DurationFormat=g})(this.BX.Main=this.BX.Main||{},BX); 15/* End */ 16; 17; /* Start:"a:4:{s:4:"full";s:53:"/bitrix/js/main/core/core_date.min.js?178227949926793";s:6:"source";s:33:"/bitrix/js/main/core/core_date.js";s:3:"min";
17s:37:"/bitrix/js/main/core/core_date.min.js";s:3:"map";s:37:"/bitrix/js/main/core/core_date.map.js";}"*/ 18(function(){if(BX.date)return;BX.date=BX.Main.Date;var e=null;BX.calendar=function(e){return BX.calendar.get().Show(e)};BX.calendar.get=function(){if(!e)e=new BX.JCCalendar;return e};BX.calendar.InsertDaysBack=function(e,t){if(t!=""){var a=new Date;if(t>0){a.setTime(a.valueOf()-t*864e5)}e.value=BX.date.format(BX.date.convertBitrixFormat(BX.message("FORMAT_DATE")),a,null)}else{e.value=""}};BX.calendar.ValueToString=function(e,t,a){return BX.date.format(BX.date.convertBitrixFormat(BX.message(t?"FORMAT_DATETIME":"FORMAT_DATE")),e,null,!!a)};BX.calendar.ValueToStringFormat=function(e,t,a){return BX.date.format(BX.date.convertBitrixFormat(t),e,null,!!a)};BX.CalendarPeriod={Init:function(e,t,a){if((e.value!=""||t.value!="")&&a.value=="")a.value="interval";a.onchange()},ChangeDirectOpts:function(e,t){var a=BX.findChild(t,{className:"adm-select adm-calendar-direction"},true);if(e=="week"){a.options[0].text=BX.message("JSADM_CALEND_PREV_WEEK");a.options[1].text=BX.message("JSADM_CALEND_CURR_WEEK");a.options[2].text=BX.message("JSADM_CALEND_NEXT_WEEK")}else{a.options[0].text=BX.message("JSADM_CALEND_PREV");a.options[1].text=BX.message("JSADM_CALEND_CURR");a.options[2].text=BX.message("JSADM_CALEND_NEXT")}},SaveAndClearInput:function(e){if(!window.SavedPeriodValues)window.SavedPeriodValues={};window.SavedPeriodValues[e.id]=e.value;e.value=""},RestoreInput:function(e){if(!window.SavedPeriodValues||!window.SavedPeriodValues[e.id])return;e.value=window.SavedPeriodValues[e.id];delete window.SavedPeriodValues[e.id]},OnChangeP:function(e){var t=e.parentNode.parentNode;var a,i,s,n;a=i=s=n=false;var r=BX.findChild(t,{className:"adm-input-wrap adm-calendar-inp adm-calendar-first"});var o=BX.findChild(t,{className:"adm-input-wrap adm-calendar-second"});var l=BX.findChild(t,{className:"adm-select-wrap adm-calendar-direction"});var p=BX.findChild(t,{className:"adm-calendar-separate"});var h=BX.findChild(t,{className:"adm-input adm-calendar-from"},true);var c=BX.findChild(t,{className:"adm-input adm-calendar-to"},true);switch(e.value){case"day":case"week":case"month":case"quarter":case"year":s=true;BX.CalendarPeriod.OnChangeD(l.children[0]);break;case"before":i=true;break;case"after":a=true;break;case"exact":a=true;break;case"interval":a=i=n=true;BX.CalendarPeriod.RestoreInput(h);BX.CalendarPeriod.RestoreInput(c);break;case"":BX.CalendarPeriod.SaveAndClearInput(h);BX.CalendarPeriod.SaveAndClearInput(c);break;default:break}BX.CalendarPeriod.ChangeDirectOpts(e.value,t);r.style.display=a?"inline-block":"none";o.style.display=i?"inline-block":"none";l.style.display=s?"inline-block":"none";p.style.display=n?"inline-block":"none"},OnChangeD:function(e){var t=e.parentNode.parentNode;var a=BX.findChild(t,{className:"adm-input adm-calendar-from"},true);var i=BX.findChild(t,{className:"adm-input adm-calendar-to"},true);var s=BX.findChild(t,{className:"adm-select adm-calendar-period"},true);var n=0;switch(e.value){case"previous":n=-1;break;case"next":n=1;break;case"current":default:break}var r=false;var o=false;var l=new Date;var p=l.getFullYear();var h=l.getMonth();var c=l.getDate();var u=l.getDay();if(u==0)u=7;switch(s.value){case"day":r=new Date(p,h,c+n,0,0,0);o=new Date(p,h,c+n,23,59,59);break;case"week":r=new Date(p,h,c-u+1+n*7,0,0,0);o=new Date(p,h,c+(7-u)+n*7,23,59,59);break;case"month":r=new Date(p,h+n,1,0,0,0);o=new Date(p,h+1+n,0,23,59,59);break;case"quarter":var d=Math.floor(h/3)+n;r=new Date(p,3*d,1,0,0,0);o=new Date(p,3*(d+1),0,23,59,59);break;case"year":r=new Date(p+n,0,1,0,0,0);o=new Date(p+1+n,0,0,23,59,59);break;default:break}var m=window[a.name+"_bTime"]?BX.message("FORMAT_DATETIME"):BX.message("FORMAT_DATE");if(r){a.value=BX.formatDate(r,m);BX.addClass(a,"adm-calendar-inp-setted")}if(o){i.value=BX.formatDate(o,m);BX.addClass(i,"adm-calendar-inp-setted")}}};BX.JCCalendar=function(){this.params={};this.bAmPm=BX.isAmPmMode();this.popup=null;this.popup_month=null;this.popup_year=null;this.month_popup_classname="";this.year_popup_classname="";this.value=null;this._layers={};this._current_layer=null;this.DIV=null;this.PARTS={};this.weekStart=0;this.numRows=6;this._create=function(e){const t={closeByEsc:true,autoHide:false,content:this._get_content(),bindOptions:{forceBindPosition:true},focusTrap:false};if(Boolean(e.fixed)&&e.fixed){t.fixed=e.fixed}this.popup=new BX.PopupWindow("calendar_popup_"+Math.random(),e.node,t);BX.bind(this.popup.popupContainer,"click",(function(e){e.stopPropagation()}))};this._auto_hide_disable=function(){BX.unbind(document,"click",BX.proxy(this._auto_hide,this))};this._auto_hide_enable=function(){BX.bind(document,"click",BX.proxy(this._auto_hide,this))};this._auto_hide=function(e){this._auto_hide_disable();this.popup.close()};this._get_content=function(){var e=BX.delegate((function(e){e=e||window.event;this.SetDate(new Date(parseInt(BX.proxy_context.getAttribute("data-date"))),e.type==="dblclick"||this.params.bCompatibility&&!this.params.bTimeVisibility)}),this);this.DIV=BX.create("DIV",{props:{className:"bx-calendar"},children:[BX.create("DIV",{props:{className:"bx-calendar-header"},children:[BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:"bx-calendar-left-arrow"},events:{click:BX.proxy(this._prev,this)}}),BX.create("SPAN",{props:{className:"bx-calendar-header-content"},children:[this.PARTS.MONTH=BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:"bx-calendar-top-month"},events:{click:BX.proxy(this._menu_month,this)}}),this.PARTS.YEAR=BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:"bx-calendar-top-year"},events:{click:BX.proxy(this._menu_year,this)}})]}),BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:"bx-calendar-right-arrow"},events:{click:BX.proxy(this._next,this)}})]}),this.PARTS.WEEK=BX.create("DIV",{props:{className:"bx-calendar-name-day-wrap"}}),this.PARTS.LAYERS=BX.create("DIV",{props:{className:"bx-calendar-cell-block"},events:{click:BX.delegateEvent({className:"bx-calendar-cell"},e),dblclick:BX.delegateEvent({className:"bx-calendar-cell"},e)}}),this.PARTS.TIME=BX.create("DIV",{props:{className:"bx-calendar-set-time-wrap"},events:{click:BX.delegateEvent({attr:"data-action"},BX.delegate(this._time_actions,this))},html:'<a href="javascript:void(0)" data-action="time_show" class="bx-calendar-set-time"><i></i>'+BX.message("CAL_TIME_SET")+'</a><div class="bx-calendar-form-block"><span class="bx-calendar-form-text">'+BX.message("CAL_TIME")+'</span><span class="bx-calendar-form"><input type="text" class="bx-calendar-form-input" maxwidth="2" onkeyup="BX.calendar.get()._check_time()" /><span class="bx-calendar-form-separator"></span><input type="text" class="bx-calendar-form-input" maxwidth="2" onkeyup="BX.calendar.get()._check_time()" />'+(this.bAmPm?'<span class="bx-calendar-AM-PM-block"><span class="bx-calendar-AM-PM-text" data-action="time_ampm"></span><span class="bx-calendar-form-arrow-r"><a href="javascript:void(0)" class="bx-calendar-form-arrow-top" data-action="time_ampm_up"><i></i></a><a href="javascript:void(0)" class="bx-calendar-form-arrow-bottom" data-action="time_ampm_down"><i></i></a></span></span>':"")+'</span><a href="javascript:void(0)" data-action="time_hide" class="bx-calendar-form-close"><i></i></a></div>'}),this.PARTS.BUTTONS=BX.create("DIV",{props:{className:"bx-calendar-button-block"},events:{click:BX.delegateEvent({attr:"data-action"},BX.delegate(this._button_actions,this))},html:'<a href="javascript:void(0)" class="bx-calendar-button bx-calendar-button-select" data-action="submit"><span class="bx-calendar-button-left"></span><span class="bx-calendar-button-text">'+BX.message("CAL_BUTTON")+'</span><span class="bx-calendar-button-right"></span></a><a href="javascript:void(0)" class="bx-calendar-button bx-calendar-button-cancel" data-action="cancel"><span class="bx-calendar-button-left"></span><span class="bx-calendar-button-text">'+BX.message("JS_CORE_WINDOW_CLOSE")+'</span><span class="bx-calendar-button-right"></span></a>'})]});this.PARTS.TIME_INPUT_H=BX.findChild(this.PARTS.TIME,{tag:"INPUT"},true);this.PARTS.TIME_INPUT_M=this.PARTS.TIME_INPUT_H.nextSibling.nextSibling;if(this.bAmPm)this.PARTS.TIME_AMPM=this.PARTS.TIME_INPUT_M.nextSibling.firstChild;var t=new BX.JCSpinner({input:this.PARTS.TIME_INPUT_H,callback_change:BX.proxy(this._check_time,this),bSaveValue:false}).Show();t.className="bx-calendar-form-arrow-l";this.PARTS.TIME_INPUT_H.parentNode.insertBefore(t,this.PARTS.TIME_INPUT_H);t=new BX.JCSpinner({input:this.PARTS.TIME_INPUT_M,callback_change:BX.proxy(this._check_time,this),bSaveValue:true}).Show();t.className="bx-calendar-form-arrow-r";if(!this.PARTS.TIME_INPUT_M.nextSibling)this.PARTS.TIME_INPUT_M.parentNode.appendChild(t);else this.PARTS.TIME_INPUT_M.parentNode.insertBefore(t,this.PARTS.TIME_INPUT_M.nextSibling);for(var a=0;a<7;a++){this.PARTS.WEEK.appendChild(BX.create("SPAN",{props:{className:"bx-calendar-name-day"},text:BX.message("DOW_"+(a+this.weekStart)%7)}))}return this.DIV};this._time_actions=function(){switch(BX.proxy_context.getAttribute("data-action")){case"time_show":BX.addClass(this.PARTS.TIME,"bx-calendar-set-time-opened");if(this.params.bCompatibility){BX.removeClass(this.PARTS.BUTTONS,"bx-calendar-buttons-disabled")}this.popup.adjustPosition();break;case"time_hide":BX.removeClass(this.PARTS.TIME,"bx-calendar-set-time-opened");if(this.params.bCompatibility){this._saveChoice("hide");BX.addClass(this.PARTS.BUTTONS,"bx-calendar-buttons-disabled")}this.popup.adjustPosition();break;case"time_ampm":this.PARTS.TIME_AMPM.innerHTML=this.PARTS.TIME_AMPM.innerHTML=="AM"?"PM":"AM";break;case"time_ampm_up":this._check_time({bSaveValue:false},null,12);return;break;case"time_ampm_down":this._check_time({bSaveValue:false},null,-12);return;break}this._check_time()};this._button_actions=function(){switch(BX.proxy_context.getAttribute("data-action")){case"submit":if(this.params.bCompatibility){this._saveChoice("show")}this.SaveValue();break;case"cancel":this.Close();break}};this._saveChoice=function(e){if(this.params.bCategoryTimeVisibilityOption){BX.userOptions.save(this.params.bCategoryTimeVisibilityOption,this.params.bNameTimeVisibilityOption,"visibility",e==="show"?"Y":"N")}this._bTimeVisibility=e==="show";this.params.bTimeVisibility=this._bTimeVisibility};this._check_time=function(e,t,a){var i=parseInt(this.PARTS.TIME_INPUT_H.value.substring(0,5),10)||0,s=parseInt(this.PARTS.TIME_INPUT_M.value.substring(0,5),10)||0,n=false;if(!!e&&!e.bSaveValue){this.value.setUTCHours(this.value.getUTCHours()+a)}else if(!isNaN(i)){if(this.bAmPm){if(i!=12&&this.PARTS.TIME_AMPM.innerHTML=="PM"){i+=12}}n=true;this.value.setUTCHours(i%24)}if(!isNaN(s)){n=true;this.value.setUTCMinutes(s%60)}if(n){this.SetValue(this.value)}};this._set_layer=function(){var e=parseInt(this.value.getUTCFullYear()+""+BX.util.str_pad_left(this.value.getUTCMonth()+"",2,"0"));if(!this._layers[e]){this._layers[e]=this._create_layer();this._layers[e].BXLAYERID=e}if(this._current_layer){var t=new Date(this.value.valueOf());t.setUTCHours(0);t.setUTCMinutes(0);var a=BX.findChild(this._layers[e],{tag:"A",className:"bx-calendar-active"},true),i=BX.findChild(this._layers[e],{tag:"A",attr:{"data-date":t.valueOf()+""}},true);if(a){BX.removeClass(a,"bx-calendar-active")}if(i){BX.addClass(i,"bx-calendar-active")}this._replace_layer(this._current_layer,this._layers[e])}else{this.PARTS.LAYERS.appendChild(this._layers[e])}this._current_layer=this._layers[e]};this._replace_layer=function(e,t){if(e!=t){if(!BX.browser.IsIE()||BX.browser.IsDoctype()){var a=e.BXLAYERID>t.BXLAYERID?1:-1;var i=0;var s=-a*e.offsetHeight;e.style.position="relative";e.style.top="0px";e.style.zIndex=5;t.style.position="absolute";t.style.top=s+"px";t.style.zIndex=6;this.PARTS.LAYERS.appendChild(t);var n=15;var r;(r=function(){s+=a*n;i+=a*n;if(a*s<0){e.style.top=i+"px";t.style.top=s+"px";setTimeout(r,10)}else{e.parentNode.removeChild(e);t.style.top="0px";t.style.position="static";t.style.zIndex=0}})()}else{this.PARTS.LAYERS.replaceChild(t,e)}}};this._create_layer=function(){var e=BX.create("DIV",{props:{className:"bx-calendar-layer"}});var t=new Date(this.value);t.setUTCHours(0);t.setUTCMinutes(0);t.setUTCDate(1);if(t.getUTCDay()!=this.weekStart){var a=t.getUTCDay()-this.weekStart;a+=a<0?7:0;t.setUTCDate(t.getUTCDate()-a)}var i=this.value.getUTCMonth(),s=this.value.getUTCDate(),n="";for(var r=0;r<this.numRows;r++){n+='<div class="bx-calendar-range'+(r==this.numRows-1?" bx-calendar-range-noline":"")+'">';
18for(var o=0;o<7;o++){a=t.getUTCDate();var l=t.getUTCDay();var p="bx-calendar-cell";if(i!=t.getUTCMonth())p+=" bx-calendar-date-hidden";else if(s==a)p+=" bx-calendar-active";if(l==0||l==6)p+=" bx-calendar-weekend";n+='<a href="javascript:void(0)" class="'+p+'" data-date="'+t.valueOf()+'">'+a+"</a>";t.setUTCDate(t.getUTCDate()+1)}n+="</div>"}e.innerHTML=n;return e};this._prev=function(){this.SetMonth(this.value.getUTCMonth()-1)};this._next=function(){this.SetMonth(this.value.getUTCMonth()+1)};this._menu_month_content=function(){var e="",t=this.value.getMonth(),a;for(a=0;a<12;a++){e+='<span class="bx-calendar-month'+(a==t?" bx-calendar-month-active":"")+'" data-bx-month="'+a+'">'+BX.message("MONTH_"+(a+1))+"</span>"}return'<div class="bx-calendar-month-popup"><div class="bx-calendar-month-title" data-bx-month="'+this.value.getUTCMonth()+'">'+BX.message("MONTH_"+(this.value.getUTCMonth()+1))+'</div><div class="bx-calendar-month-content">'+e+"</div></div>"};this._menu_month=function(){if(!this.popup_month){this.popup_month=new BX.PopupWindow("calendar_popup_month_"+Math.random(),this.PARTS.MONTH,{content:this._menu_month_content(),closeByEsc:true,autoHide:true,offsetTop:-29,offsetLeft:-1,className:this.month_popup_classname,focusTrap:false,events:{onPopupShow:BX.delegate((function(){if(this.popup_year){this.popup_year.close()}}),this)}});BX.bind(this.popup_month.popupContainer,"click",BX.proxy(this.month_popup_click,this));this.popup_month.BXMONTH=this.value.getUTCMonth()}else if(this.popup_month.BXMONTH!=this.value.getUTCMonth()){this.popup_month.setContent(this._menu_month_content());this.popup_month.BXMONTH=this.value.getUTCMonth()}this.popup_month.show()};this.month_popup_click=function(e){var t=e.target||e.srcElement;if(t&&t.getAttribute&&t.getAttribute("data-bx-month")){this.SetMonth(parseInt(t.getAttribute("data-bx-month")));this.popup_month.close()}};this._menu_year_content=function(){var e='<div class="bx-calendar-year-popup"><div class="bx-calendar-year-title" data-bx-year="'+this.value.getUTCFullYear()+'">'+this.value.getUTCFullYear()+'</div><div class="bx-calendar-year-content" id="bx-calendar-year-content">';for(var t=-3;t<=3;t++){e+='<span class="bx-calendar-year-number'+(t==0?" bx-calendar-year-active":"")+'" data-bx-year="'+(this.value.getUTCFullYear()-t)+'">'+(this.value.getUTCFullYear()-t)+"</span>"}e+='</div><input data-bx-year-input="Y" type="text" class="bx-calendar-year-input" maxlength="4" /></div>';return e};this._menu_year=function(){if(!this.popup_year){this.popup_year=new BX.PopupWindow("calendar_popup_year_"+Math.random(),this.PARTS.YEAR,{content:this._menu_year_content(),closeByEsc:true,autoHide:true,offsetTop:-29,offsetLeft:-1,className:this.year_popup_classname,focusTrap:false,events:{onPopupShow:BX.delegate((function(){if(this.popup_month){this.popup_month.close()}}),this)}});BX.bind(this.popup_year.popupContainer,"click",BX.proxy(this.year_popup_click,this));BX.bind(this.popup_year.popupContainer,"keyup",BX.proxy(this.year_popup_keyup,this));this.popup_year.BXYEAR=this.value.getUTCFullYear()}else if(this.popup_year.BXYEAR!=this.value.getUTCFullYear()){this.popup_year.setContent(this._menu_year_content());this.popup_year.BXYEAR=this.value.getUTCFullYear()}this.popup_year.show()};this.year_popup_click=function(e){var t=e.target||e.srcElement;if(t&&t.getAttribute&&t.getAttribute("data-bx-year")){this.SetYear(parseInt(t.getAttribute("data-bx-year")));this.popup_year.close()}};this.year_popup_keyup=function(e){var t=e.target||e.srcElement;if(t&&t.getAttribute&&t.getAttribute("data-bx-year-input")=="Y"){var a=parseInt(t.value);if(a>=1900&&a<=2100){this.SetYear(a);this.popup_year.close()}}};this._check_date=function(e){var t=e;if(BX.type.isString(e)){t=BX.parseDate(e,true)}if(!BX.type.isDate(t)||isNaN(t.valueOf())){t=BX.date.convertToUTC(new Date);if(this.params.bHideTime){t.setUTCHours(0);t.setUTCMinutes(0)}}t.setUTCMilliseconds(0);t.setUTCSeconds(0);t.BXCHECKED=true;return t}};BX.JCCalendar.prototype.Show=function(e){if(!BX.isReady){BX.ready(BX.delegate((function(){this.Show(e)}),this));return}e.node=e.node||document.body;if(BX.type.isNotEmptyString(e.node)){var t=BX(e.node);
18if(!t){t=document.getElementsByName(e.node);if(t&&t.length>0){t=t[0]}}e.node=t}if(!e.node)return;if(!!e.field){if(BX.type.isString(e.field)){t=BX(e.field);if(!!t){e.field=t}else{if(e.form){if(BX.type.isString(e.form)){e.form=document.forms[e.form]}}if(BX.type.isDomNode(e.form)&&!!e.form[e.field]){e.field=e.form[e.field]}else{t=document.getElementsByName(e.field);if(t&&t.length>0){t=t[0];e.field=t}}}if(BX.type.isString(e.field)){e.field=BX(e.field)}}}var a=!this.popup||!this.popup.isShown()||this.params.node!=e.node;this.params=e;this.params.bCompatibility=typeof this.params.bCompatibility=="undefined"?false:this.params.bCompatibility;this.params.bTimeVisibility=typeof this.params.bTimeVisibility=="undefined"?!this.params.bCompatibility:this.params.bTimeVisibility;if(this.params.bCompatibility){this.params.bCategoryTimeVisibilityOption=this.params.bCategoryTimeVisibilityOption?this.params.bCategoryTimeVisibilityOption:"";this.params.bNameTimeVisibilityOption=this.params.bNameTimeVisibilityOption?this.params.bNameTimeVisibilityOption:"time_visibility";if(typeof this._bTimeVisibility!=="undefined"){this.params.bTimeVisibility=this._bTimeVisibility}}this.params.bTime=typeof this.params.bTime=="undefined"?true:!!this.params.bTime;this.params.bHideTime=typeof this.params.bHideTime=="undefined"?true:!!this.params.bHideTime;this.params.bUseSecond=typeof this.params.bUseSecond=="undefined"?true:!!this.params.bUseSecond;this.weekStart=parseInt(this.params.weekStart||this.params.weekStart||BX.message("WEEK_START"));if(isNaN(this.weekStart))this.weekStart=1;if(!this.popup){this._create(this.params)}else{this.popup.setBindElement(this.params.node)}var i=!!this.params.bHideTime;if(this.params.value){this.SetValue(this.params.value);i=this.value.getUTCHours()<=0&&this.value.getUTCMinutes()<=0}else if(this.params.field){this.SetValue(this.params.field.value);i=this.value.getUTCHours()<=0&&this.value.getUTCMinutes()<=0}else if(!!this.params.currentTime){this.SetValue(this.params.currentTime)}else{this.SetValue()}if(!!this.params.bTime){this.activateTimeStyle(i)}else{this.activateDateStyle(i)}if(a){this._auto_hide_disable();this.popup.show();setTimeout(BX.proxy(this._auto_hide_enable,this),0)}this.params.bSetFocus=typeof this.params.bSetFocus=="undefined"?true:!!this.params.bSetFocus;if(this.params.bSetFocus){e.node.blur()}else{BX.bind(e.node,"keyup",BX.defer((function(){this.SetValue(e.node.value);if(!!this.params.bTime){if(this.value.getUTCHours()<=0&&this.value.getUTCMinutes()<=0)BX.removeClass(this.PARTS.TIME,"bx-calendar-set-time-opened");else BX.addClass(this.PARTS.TIME,"bx-calendar-set-time-opened")}}),this))}return this};BX.JCCalendar.prototype.activateDateStyle=function(e){BX.addClass(this.DIV,"bx-calendar-time-disabled");if(!!e)BX.removeClass(this.PARTS.TIME,"bx-calendar-set-time-opened");else BX.addClass(this.PARTS.TIME,"bx-calendar-set-time-opened")};BX.JCCalendar.prototype.activateTimeStyle=function(e){if(this.params.bCompatibility&&!this.params.bTimeVisibility){BX.addClass(this.PARTS.BUTTONS,"bx-calendar-buttons-disabled");BX.addClass(this.PARTS.TIME,"bx-calendar-set-time-wrap-simple");BX.removeClass(this.PARTS.TIME,"bx-calendar-set-time-opened")}else{BX.removeClass(this.DIV,"bx-calendar-time-disabled");if(!!e)BX.removeClass(this.PARTS.TIME,"bx-calendar-set-time-opened");else BX.addClass(this.PARTS.TIME,"bx-calendar-set-time-opened")}};BX.JCCalendar.prototype.SetDay=function(e){this.value.setUTCDate(e);return this.SetValue(this.value)};BX.JCCalendar.prototype.SetMonth=function(e){if(this.popup_month)this.popup_month.close();this.value.setUTCMonth(e);if(e<0)e+=12;else if(e>=12)e-=12;while(this.value.getUTCMonth()>e){this.value.setUTCDate(this.value.getUTCDate()-1)}return this.SetValue(this.value)};BX.JCCalendar.prototype.SetYear=function(e){if(this.popup_year)this.popup_year.close();this.value.setUTCFullYear(e);return this.SetValue(this.value)};BX.JCCalendar.prototype.SetDate=function(e,t){e=this._check_date(e);e.setUTCHours(this.value.getUTCHours());e.setUTCMinutes(this.value.getUTCMinutes());e.setUTCSeconds(this.value.getUTCSeconds());if(this.params.bTime&&!t){return this.SetValue(e)}else{this.SetValue(e);this.SaveValue()}};BX.JCCalendar.prototype.SetValue=function(e){this.value=e&&e.BXCHECKED?e:this._check_date(e);this.PARTS.MONTH.innerHTML=BX.message("MONTH_"+(this.value.getUTCMonth()+1));this.PARTS.YEAR.innerHTML=this.value.getUTCFullYear();if(!!this.params.bTime){var t=this.value.getUTCHours();if(this.bAmPm){if(t>=12){this.PARTS.TIME_AMPM.innerHTML="PM";if(t!=12)t-=12}else{this.PARTS.TIME_AMPM.innerHTML="AM";if(t==0)t=12}}this.PARTS.TIME_INPUT_H.value=BX.util.str_pad_left(t.toString(),2,"0");this.PARTS.TIME_INPUT_M.value=BX.util.str_pad_left(this.value.getUTCMinutes().toString(),2,"0")}this._set_layer();return this};BX.JCCalendar.prototype.SaveValue=function(){if(this.popup_month)this.popup_month.close();if(this.popup_year)this.popup_year.close();var e=true;if(!!this.params.callback){var t=this.params.callback.apply(this,[new Date(this.value.valueOf()+this.value.getTimezoneOffset()*6e4)]);if(t===false)e=false}if(e){var a=!!this.params.bTime&&BX.hasClass(this.PARTS.TIME,"bx-calendar-set-time-opened");if(this.params.field){var i=BX.message(a?"FORMAT_DATETIME":"FORMAT_DATE");if(a&&!this.params.bUseSecond){i=i.replace(":SS","")}this.params.field.value=BX.calendar.ValueToStringFormat(this.value,i,true);BX.fireEvent(this.params.field,"change")}this.popup.close();if(!!this.params.callback_after){this.params.callback_after.apply(this,[new Date(this.value.valueOf()+this.value.getTimezoneOffset()*6e4),a])}}return this};BX.JCCalendar.prototype.Close=function(){if(!!this.popup)this.popup.close();return this};BX.JCSpinner=function(e){e=e||{};this.params={input:e.input||null,delta:e.delta||1,timeout_start:e.timeout_start||1e3,timeout_cont:e.timeout_cont||150,callback_start:e.callback_start||null,callback_change:e.callback_change||null,callback_finish:e.callback_finish||null,bSaveValue:typeof e.bSaveValue=="undefined"?!!e.input:!!e.bSaveValue};this.mousedown=false;this.direction=1};BX.JCSpinner.prototype.Show=function(){this.node=BX.create("span",{events:{mousedown:BX.delegateEvent({attr:"data-dir"},BX.delegate(this.Start,this))},html:'<a href="javascript:void(0)" class="bx-calendar-form-arrow bx-calendar-form-arrow-top" data-dir="1"><i></i></a><a href="javascript:void(0)" class="bx-calendar-form-arrow bx-calendar-form-arrow-bottom" data-dir="-1"><i></i></a>'});return this.node};BX.JCSpinner.prototype.Start=function(){this.mousedown=true;this.direction=BX.proxy_context.getAttribute("data-dir")>0?1:-1;BX.bind(document,"mouseup",BX.proxy(this.MouseUp,this));this.ChangeValue(true)};BX.JCSpinner.prototype.ChangeValue=function(e){if(!this.mousedown)return;if(this.params.input){var t=parseInt(this.params.input.value,10)+this.params.delta*this.direction;
18if(this.params.bSaveValue)this.params.input.value=t;if(!!e&&this.params.callback_start)this.params.callback_start(this.params,t,this.direction);if(this.params.callback_change)this.params.callback_change(this.params,t,this.direction);setTimeout(BX.proxy(this.ChangeValue,this),!!e?this.params.timeout_start:this.params.timeout_cont)}};BX.JCSpinner.prototype.MouseUp=function(){this.mousedown=false;BX.unbind(document,"mouseup",BX.proxy(this.MouseUp,this));if(this.params.callback_finish)this.params.callback_finish(this.params,this.params.input.value)};window.jsCalendar={Show:function(e,t,a,i,s,n,r,o){return BX.calendar({node:e,field:t,form:r,bTime:!!s,currentTime:n,bHideTimebar:!!o})},ValueToString:BX.calendar.ValueToString};BX.CClockSelector=function(e){this.params=e;this.params.popup_buttons=this.params.popup_buttons||[new BX.PopupWindowButton({text:BX.message("CAL_BUTTON"),className:"popup-window-button-create",events:{click:BX.proxy(this.setValue,this)}})];this.isReady=false;this.WND=new BX.PopupWindow(this.params.popup_id||"clock_selector_popup",this.params.node,this.params.popup_config||{titleBar:BX.message("CAL_TIME"),offsetLeft:-45,offsetTop:-135,autoHide:true,closeIcon:true,closeByEsc:true,focusTrap:false});this.SHOW=false;BX.addCustomEvent(this.WND,"onPopupClose",BX.delegate(this.onPopupClose,this));this.obClocks={};this.CLOCK_ID=this.params.clock_id||"clock_selector"};BX.CClockSelector.prototype.Show=function(){if(!this.isReady){BX.addCustomEvent("onClockRegister",BX.proxy(this.onClockRegister,this));return BX.ajax.get("/bitrix/tools/clock_selector.php",{start_time:this.params.start_time,clock_id:this.CLOCK_ID,sessid:BX.bitrix_sessid()},BX.delegate(this.Ready,this))}this.WND.setButtons(this.params.popup_buttons);this.WND.show();this.SHOW=true;if(window["bxClock_"+this.obClocks[this.CLOCK_ID]]){setTimeout("window['bxClock_"+this.obClocks[this.CLOCK_ID]+"'].CalculateCoordinates()",40)}return true};BX.CClockSelector.prototype.onClockRegister=function(e){if(e[this.CLOCK_ID]){this.obClocks[this.CLOCK_ID]=e[this.CLOCK_ID];BX.removeCustomEvent("onClockRegister",BX.proxy(this.onClockRegister,this))}};BX.CClockSelector.prototype.Ready=function(e){this.content=this.CreateContent(e);this.WND.setContent(this.content);this.isReady=true;setTimeout(BX.proxy(this.Show,this),30)};BX.CClockSelector.prototype.CreateContent=function(e){return BX.create("DIV",{events:{click:BX.PreventDefault},html:'<div class="bx-tm-popup-clock">'+e+"</div>"})};BX.CClockSelector.prototype.setValue=function(e){if(this.params.callback){var t=BX.findChild(this.content,{tagName:"INPUT"},true);this.params.callback.apply(this.params.node,[t.value])}return BX.PreventDefault(e)};BX.CClockSelector.prototype.closeWnd=function(e){this.WND.close();return e||window.event?BX.PreventDefault(e):true};BX.CClockSelector.prototype.setNode=function(e){this.WND.setBindElement(e)};BX.CClockSelector.prototype.setTime=function(e){this.params.start_time=e;if(window["bxClock_"+this.obClocks[this.CLOCK_ID]]){window["bxClock_"+this.obClocks[this.CLOCK_ID]].SetTime(parseInt(e/3600),parseInt(e%3600/60))}};BX.CClockSelector.prototype.setCallback=function(e){this.params.callback=e};BX.CClockSelector.prototype.onPopupClose=function(){this.SHOW=false}})(); 19/* End */ 20; 21; /* Start:"a:4:{s:4:"full";s:55:"/bitrix/js/main/core/core_window.min.js?176897801276324";s:6:"source";s:35:"/bitrix/js/main/core/core_window.js";s:3:"min";s:39:"/bitrix/js/main/core/core_window.min.js";s:3:"map";s:39:"/bitrix/js/main/core/core_window.map.js";}"*/ 22(function(window){if(BX.WindowManager)return;BX.WindowManager={_stack:[],_runtime_resize:{},_delta:2,_delta_start:1e3,currently_loaded:null,settings_category:"BX.WindowManager.9.5",register:function(t){this.currently_loaded=null;t.WM_REG_INDEX=this._stack.length;this._stack.push(t);if(this._stack.length<2){BX.bind(document,"keyup",BX.proxy(this.__checkKeyPress,this))}},unregister:function(t){if(null==t.WM_REG_INDEX)return null;var e;if(this._stack.length>0){while((e=this.__pop_stack())!=t){if(!e){e=null;break}}if(this._stack.length<=0){this.enableKeyCheck()}return e}else{return null}},__pop_stack:function(t){if(this._stack.length>0){var e=this._stack.pop();e.WM_REG_INDEX=null;BX.onCustomEvent(e,"onWindowUnRegister",[t===true]);return e}else return null},clean:function(){while(this.__pop_stack(true)){}this._stack=[];this.disableKeyCheck()},Get:function(){if(this.currently_loaded)return this.currently_loaded;else if(this._stack.length>0)return this._stack[this._stack.length-1];else return null},setStartZIndex:function(t){this._delta_start=t},restoreStartZIndex:function(){this._delta_start=1e3},GetZIndex:function(){var t;return null!=(t=this._stack[this._stack.length-1])?parseInt(t.Get().style.zIndex)+this._delta:this._delta_start},__get_check_url:function(t){var e=t.indexOf("?");return e==-1?t:t.substring(0,e)},saveWindowSize:function(t,e){var i=this.__get_check_url(t);if(BX.userOptions){BX.userOptions.save(this.settings_category,"size_"+i,"width",e.width);BX.userOptions.save(this.settings_category,"size_"+i,"height",e.height)}this._runtime_resize[i]=e},saveWindowOptions:function(t,e){if(BX.userOptions){for(var i in e){if(e.hasOwnProperty(i)){BX.userOptions.save(this.settings_category,"options_"+t,i,e[i])}}}},getRuntimeWindowSize:function(t){return this._runtime_resize[this.__get_check_url(t)]},disableKeyCheck:function(){BX.unbind(document,"keyup",BX.proxy(this.__checkKeyPress,this))},enableKeyCheck:function(){BX.bind(document,"keyup",BX.proxy(this.__checkKeyPress,this))},__checkKeyPress:function(t){if(null==t)t=window.event;if(t.keyCode==27){var e=BX.WindowManager.Get();if(e&&!e.unclosable)e.Close()}}};BX.garbage(BX.WindowManager.clean,BX.WindowManager);BX.CWindowButton=function(t){if(t.btn){this.btn=t.btn;this.parentWindow=t.parentWindow;
22if(/save|apply/i.test(this.btn.name)){BX.bind(this.btn,"click",BX.delegate(this.disableUntilError,this))}}else{this.title=t.title;this.hint=t.hint;this.id=t.id;this.name=t.name;this.className=t.className;this.action=t.action;this.onclick=t.onclick;if(t.Button&&BX.type.isFunction(t.Button))this.Button=t.Button;this.btn=null}};BX.CWindowButton.prototype.disable=function(){if(this.btn)this.parentWindow.showWait(this.btn)};BX.CWindowButton.prototype.enable=function(){if(this.btn)this.parentWindow.closeWait(this.btn)};BX.CWindowButton.prototype.emulate=function(){if(this.btn&&this.btn.disabled)return;var t=this.action?BX.delegate(this.action,this):this.onclick?this.onclick:this.btn?this.btn.getAttribute("onclick"):"";if(t){setTimeout(t,50);if(this.btn&&/save|apply/i.test(this.btn.name)&&!this.action){this.disableUntilError()}}};BX.CWindowButton.prototype.Button=function(parentWindow){this.parentWindow=parentWindow;var btn={props:{type:"button",name:this.id?this.id:this.name,value:this.title?this.title:this.name,id:this.id}};if(this.hint)btn.props.title=this.hint;if(!!this.className)btn.props.className=this.className;if(this.action){btn.events={click:BX.delegate(this.action,this)}}else if(this.onclick){if(BX.browser.IsIE()){btn.events={click:BX.delegate((function(){eval(this.onclick)}),this)}}else{btn.attrs={onclick:this.onclick}}}this.btn=BX.create("INPUT",btn);return this.btn};BX.CWindowButton.prototype.disableUntilError=function(){this.disable();if(!this.__window_error_handler_set){BX.addCustomEvent(this.parentWindow,"onWindowError",BX.delegate(this.enable,this));this.__window_error_handler_set=true}};BX.CWindow=function(t,e){this.DIV=t||document.createElement("DIV");this.SETTINGS={resizable:false,min_height:0,min_width:0,top:0,left:0,draggable:false,drag_restrict:true,resize_restrict:true};this.ELEMENTS={draggable:[],resizer:[],close:[]};this.type=e=="float"?"float":"dialog";BX.adjust(this.DIV,{props:{className:"bx-core-window"},style:{zIndex:0,position:"absolute",display:"none",top:this.SETTINGS.top+"px",left:this.SETTINGS.left+"px",height:"100px",width:"100px"}});this.isOpen=false;BX.addCustomEvent(this,"onWindowRegister",BX.delegate(this.onRegister,this));BX.addCustomEvent(this,"onWindowUnRegister",BX.delegate(this.onUnRegister,this));this.MOUSEOVER=null;BX.bind(this.DIV,"mouseover",BX.delegate(this.__set_msover,this));BX.bind(this.DIV,"mouseout",BX.delegate(this.__unset_msover,this));BX.ready(BX.delegate((function(){document.body.appendChild(this.DIV);BX.ZIndexManager.register(this.DIV)}),this))};BX.CWindow.prototype.Get=function(){return this.DIV};BX.CWindow.prototype.visible=function(){return this.isOpen};BX.CWindow.prototype.Show=function(t){this.DIV.style.display="block";if(!t){BX.WindowManager.register(this);BX.onCustomEvent(this,"onWindowRegister")}BX.ZIndexManager.bringToFront(this.DIV)};BX.CWindow.prototype.Hide=function(){BX.WindowManager.unregister(this);this.DIV.style.display="none"};BX.CWindow.prototype.onRegister=function(){this.isOpen=true};BX.CWindow.prototype.onUnRegister=function(t){this.isOpen=false;if(t||this.PARAMS&&this.PARAMS.content_url){if(t){BX.onCustomEvent(this,"onWindowClose",[this,true])}if(this.DIV.parentNode)this.DIV.parentNode.removeChild(this.DIV)}else{this.DIV.style.display="none"}};BX.CWindow.prototype.CloseDialog=BX.CWindow.prototype.Close=function(t){BX.onCustomEvent(this,"onBeforeWindowClose",[this]);if(t!==true){if(this.denyClose)return false}BX.onCustomEvent(this,"onWindowClose",[this]);if(this.bExpanded){var e=BX.GetDocElement();BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));e.style.overflow=this.__expand_settings.overflow}BX.WindowManager.unregister(this);return true};BX.CWindow.prototype.SetResize=function(t){t.style.cursor="se-resize";BX.bind(t,"mousedown",BX.proxy(this.__startResize,this));this.ELEMENTS.resizer.push(t);this.SETTINGS.resizable=true};BX.CWindow.prototype.SetExpand=function(t,e){e=e||"click";BX.bind(t,e,BX.proxy(this.__expand,this))};BX.CWindow.prototype.__expand_onresize=function(){var t=BX.GetWindowInnerSize();this.DIV.style.width=t.innerWidth+"px";
22this.DIV.style.height=t.innerHeight+"px";BX.onCustomEvent(this,"onWindowResize")};BX.CWindow.prototype.__expand=function(){var t=BX.GetDocElement();if(!this.bExpanded){var e=BX.GetWindowScrollPos(),i=BX.GetWindowInnerSize();this.__expand_settings={resizable:this.SETTINGS.resizable,draggable:this.SETTINGS.draggable,width:this.DIV.style.width,height:this.DIV.style.height,left:this.DIV.style.left,top:this.DIV.style.top,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,overflow:BX.style(t,"overflow")};this.SETTINGS.resizable=false;this.SETTINGS.draggable=false;window.scrollTo(0,0);t.style.overflow="hidden";this.DIV.style.top="0px";this.DIV.style.left="0px";this.DIV.style.width=i.innerWidth+"px";this.DIV.style.height=i.innerHeight+"px";this.bExpanded=true;BX.onCustomEvent(this,"onWindowExpand");BX.onCustomEvent(this,"onWindowResize");BX.bind(window,"resize",BX.proxy(this.__expand_onresize,this))}else{BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));this.SETTINGS.resizable=this.__expand_settings.resizable;this.SETTINGS.draggable=this.__expand_settings.draggable;t.style.overflow=this.__expand_settings.overflow;this.DIV.style.top=this.__expand_settings.top;this.DIV.style.left=this.__expand_settings.left;this.DIV.style.width=this.__expand_settings.width;this.DIV.style.height=this.__expand_settings.height;window.scrollTo(this.__expand_settings.scrollLeft,this.__expand_settings.scrollTop);this.bExpanded=false;BX.onCustomEvent(this,"onWindowNarrow");BX.onCustomEvent(this,"onWindowResize")}};BX.CWindow.prototype.Resize=function(t,e){var i=Math.max(t-this.pos.left+this.dx,this.SETTINGS.min_width);var s=Math.max(e-this.pos.top+this.dy,this.SETTINGS.min_height);if(this.SETTINGS.resize_restrict){var o=BX.GetWindowScrollSize();if(this.pos.left+i>o.scrollWidth-this.dw)i=o.scrollWidth-this.pos.left-this.dw}this.DIV.style.width=i+"px";this.DIV.style.height=s+"px";BX.onCustomEvent(this,"onWindowResize")};BX.CWindow.prototype.__startResize=function(t){if(!this.SETTINGS.resizable)return false;if(!t)t=window.event;this.wndSize=BX.GetWindowScrollPos();this.wndSize.innerWidth=BX.GetWindowInnerSize().innerWidth;this.pos=BX.pos(this.DIV);this.x=t.clientX+this.wndSize.scrollLeft;this.y=t.clientY+this.wndSize.scrollTop;this.dx=this.pos.left+this.pos.width-this.x;this.dy=this.pos.top+this.pos.height-this.y;this.dw=this.pos.width-parseInt(this.DIV.style.width);BX.bind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.bind(document,"mouseup",BX.proxy(this.__stopResize,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="se-resize";BX.onCustomEvent(this,"onWindowResizeStart");return true};BX.CWindow.prototype.__moveResize=function(t){if(!t)t=window.event;var e=BX.GetWindowScrollPos();var i=t.clientX+e.scrollLeft;var s=t.clientY+e.scrollTop;if(this.x==i&&this.y==s)return;this.Resize(i,s);this.x=i;this.y=s};BX.CWindow.prototype.__stopResize=function(){if(document.body.releaseCapture)document.body.releaseCapture();BX.unbind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.unbind(document,"mouseup",BX.proxy(this.__stopResize,this));document.onmousedown=null;var t=document.body;t.ondrag=t.onselectstart=null;t.style.MozUserSelect=this.DIV.style.MozUserSelect="";t.style.cursor="";BX.onCustomEvent(this,"onWindowResizeFinished")};BX.CWindow.prototype.SetClose=function(t){BX.bind(t,"click",BX.proxy(this.Close,this));this.ELEMENTS.close.push(t)};BX.CWindow.prototype.SetDraggable=function(t){BX.bind(t,"mousedown",BX.proxy(this.__startDrag,this));t.style.cursor="move";this.ELEMENTS.draggable.push(t);this.SETTINGS.draggable=true};BX.CWindow.prototype.Move=function(t,e){var i=1;var s=parseInt(this.DIV.style.left)+t;var o=parseInt(this.DIV.style.top)+e;if(this.SETTINGS.drag_restrict){if(s<0)s=0;var n=BX.GetWindowScrollSize();var r=this.DIV.offsetWidth;var h=this.DIV.offsetHeight;if(s>n.scrollWidth-r-i)s=n.scrollWidth-r-i;var a=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight,n.scrollHeight);if(o>a-h-i)o=a-h-i;if(o<0)o=0}this.DIV.style.left=s+"px";this.DIV.style.top=o+"px"};BX.CWindow.prototype.__startDrag=function(t){if(!this.SETTINGS.draggable)return false;if(!t)t=window.event;this.x=t.clientX+document.body.scrollLeft;this.y=t.clientY+document.body.scrollTop;this.__bWasDragged=false;BX.bind(document,"mousemove",BX.proxy(this.__moveDrag,this));BX.bind(document,"mouseup",BX.proxy(this.__stopDrag,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="move";return BX.PreventDefault(t)};BX.CWindow.prototype.__moveDrag=function(t){if(!t)t=window.event;var e=t.clientX+document.body.scrollLeft;var i=t.clientY+document.body.scrollTop;if(this.x==e&&this.y==i)return;this.Move(e-this.x,i-this.y);this.x=e;this.y=i;if(!this.__bWasDragged){BX.onCustomEvent(this,"onWindowDragStart");this.__bWasDragged=true;BX.bind(BX.proxy_context,"click",BX.PreventDefault)}BX.onCustomEvent(this,"onWindowDrag")};BX.CWindow.prototype.__stopDrag=function(t){if(document.body.releaseCapture)document.body.releaseCapture();BX.unbind(document,"mousemove",BX.proxy(this.__moveDrag,this));BX.unbind(document,"mouseup",BX.proxy(this.__stopDrag,this));document.onmousedown=null;var e=document.body;e.ondrag=e.onselectstart=null;e.style.MozUserSelect=this.DIV.style.MozUserSelect="";e.style.cursor="";if(this.__bWasDragged){BX.onCustomEvent(this,"onWindowDragFinished");var i=BX.proxy_context;setTimeout((function(){BX.unbind(i,"click",BX.PreventDefault)}),100);this.__bWasDragged=false}return BX.PreventDefault(t)};BX.CWindow.prototype.DenyClose=function(){this.denyClose=true};BX.CWindow.prototype.AllowClose=function(){this.denyClose=false};BX.CWindow.prototype.ShowError=function(t){BX.onCustomEvent(this,"onWindowError",[t]);if(this._wait)BX.closeWait(this._wait);window.alert(t)};BX.CWindow.prototype.__set_msover=function(){this.MOUSEOVER=true};BX.CWindow.prototype.__unset_msover=function(){this.MOUSEOVER=false};BX.CWindowDialog=function(){var t=arguments;t[1]="dialog";BX.CWindowDialog.superclass.constructor.apply(this,t);this.DIV.style.top="10px";this.OVERLAY=null};BX.extend(BX.CWindowDialog,BX.CWindow);BX.CWindowDialog.prototype.__resizeOverlay=function(){var t=BX.GetWindowScrollSize();this.OVERLAY.style.width=t.scrollWidth+"px"};BX.CWindowDialog.prototype.CreateOverlay=function(t){if(null==this.OVERLAY){var e=BX.GetWindowScrollSize();var i=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight,e.scrollHeight);
22this.OVERLAY=document.body.appendChild(BX.create("DIV",{style:{position:"absolute",top:"0px",left:"0px",zIndex:t||parseInt(this.DIV.style.zIndex)-2,width:e.scrollWidth+"px",height:i+"px"}}));var s=BX.ZIndexManager.getComponent(this.DIV);if(s){s.setOverlay(this.OVERLAY)}}return this.OVERLAY};BX.CWindowDialog.prototype.Show=function(){BX.CWindowDialog.superclass.Show.apply(this,arguments);this.CreateOverlay();this.OVERLAY.style.display="block";BX.unbind(window,"resize",BX.proxy(this.__resizeOverlay,this));BX.bind(window,"resize",BX.proxy(this.__resizeOverlay,this))};BX.CWindowDialog.prototype.onUnRegister=function(t){BX.CWindowDialog.superclass.onUnRegister.apply(this,arguments);if(this.clean){if(this.OVERLAY.parentNode)this.OVERLAY.parentNode.removeChild(this.OVERLAY)}else{this.OVERLAY.style.display="none"}BX.unbind(window,"resize",BX.proxy(this.__resizeOverlay,this))};BX.CDialog=function(t){BX.CDialog.superclass.constructor.apply(this);this._sender="core_window_cdialog";this.PARAMS=t||{};for(var e in this.defaultParams){if(typeof this.PARAMS[e]=="undefined")this.PARAMS[e]=this.defaultParams[e]}this.PARAMS.width=!isNaN(parseInt(this.PARAMS.width))?this.PARAMS.width:this.defaultParams["width"];this.PARAMS.height=!isNaN(parseInt(this.PARAMS.height))?this.PARAMS.height:this.defaultParams["height"];if(this.PARAMS.resize_id||this.PARAMS.content_url){var i=BX.WindowManager.getRuntimeWindowSize(this.PARAMS.resize_id||this.PARAMS.content_url);if(i){this.PARAMS.width=i.width;this.PARAMS.height=i.height}}BX.addClass(this.DIV,"bx-core-adm-dialog");this.DIV.id="bx-admin-prefix";this.PARTS={};this.DIV.style.height=null;this.DIV.style.width=null;this.PARTS.TITLEBAR=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head"}}));this.PARTS.TITLE_CONTAINER=this.PARTS.TITLEBAR.appendChild(BX.create("SPAN",{props:{className:"bx-core-adm-dialog-head-inner"},text:this.PARAMS.title}));this.PARTS.TITLEBAR_ICONS=this.PARTS.TITLEBAR.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head-icons"},children:this.PARAMS.resizable?[BX.create("SPAN",{props:{className:"bx-core-adm-icon-expand",title:BX.message("JS_CORE_WINDOW_EXPAND")}}),BX.create("SPAN",{props:{className:"bx-core-adm-icon-close",title:BX.message("JS_CORE_WINDOW_CLOSE")}})]:[BX.create("SPAN",{props:{className:"bx-core-adm-icon-close",title:BX.message("JS_CORE_WINDOW_CLOSE")}})]}));this.PARTS.CONTENT=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-content-wrap adm-workarea"}}));this.PARTS.CONTENT_DATA=this.PARTS.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-content"},style:{height:this.PARAMS.height+"px",width:this.PARAMS.width+"px"}}));this.PARTS.HEAD=this.PARTS.CONTENT_DATA.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head-block"+(this.PARAMS.icon?" "+this.PARAMS.icon:"")}}));this.SetHead(this.PARAMS.head);this.SetContent(this.PARAMS.content);this.SetTitle(this.PARAMS.title);this.SetClose(this.PARTS.TITLEBAR_ICONS.lastChild);if(this.PARAMS.resizable){this.SetExpand(this.PARTS.TITLEBAR_ICONS.firstChild);this.SetExpand(this.PARTS.TITLEBAR,"dblclick");BX.addCustomEvent(this,"onWindowExpand",BX.proxy(this.__onexpand,this));BX.addCustomEvent(this,"onWindowNarrow",BX.proxy(this.__onexpand,this))}this.PARTS.FOOT=this.PARTS.BUTTONS_CONTAINER=this.PARTS.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-buttons"},children:this.ShowButtons()}));if(this.PARAMS.draggable)this.SetDraggable(this.PARTS.TITLEBAR);if(this.PARAMS.resizable){this.PARTS.RESIZER=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-resizer"}}));this.SetResize(this.PARTS.RESIZER);this.SETTINGS.min_width=this.PARAMS.min_width;this.SETTINGS.min_height=this.PARAMS.min_height}this.auth_callback=BX.delegate((function(){this.PARAMS.content="";this.hideNotify();this.Show()}),this)};BX.extend(BX.CDialog,BX.CWindowDialog);BX.CDialog.prototype.defaultParams={width:700,height:400,min_width:500,min_height:300,resizable:true,draggable:true,title:"",icon:""};BX.CDialog.prototype.showWait=function(t){if(BX.type.isElementNode(t)&&(t.type=="button"||t.type=="submit")){BX.defer((function(){t.disabled=true}))();var e=BX.hasClass(t,"adm-btn-save")||BX.hasClass(t,"adm-btn-save"),i=BX.pos(t,true);t.bxwaiter=this.PARTS.FOOT.appendChild(BX.create("DIV",{props:{className:"adm-btn-load-img"+(e?"-green":"")}
22,style:{top:parseInt((i.bottom+i.top)/2-10)+"px",left:parseInt((i.right+i.left)/2-10)+"px"}}));BX.addClass(t,"adm-btn-load");this.lastWaitElement=t;return t.bxwaiter}return null};BX.CDialog.prototype.closeWait=function(t){t=t||this.lastWaitElement;if(BX.type.isElementNode(t)){if(t.bxwaiter){if(t.bxwaiter.parentNode){t.bxwaiter.parentNode.removeChild(t.bxwaiter)}t.bxwaiter=null}t.disabled=false;BX.removeClass(t,"adm-btn-load");if(this.lastWaitElement==t)this.lastWaitElement=null}};BX.CDialog.prototype.Authorize=function(t){this.bSkipReplaceContent=true;this.ShowError(BX.message("JSADM_AUTH_REQ"));BX.onCustomEvent(this,"onWindowError",[]);BX.closeWait();new BX.CAuthDialog({content_url:this.PARAMS.content_url,auth_result:t,callback:BX.delegate((function(){if(this.auth_callback)this.auth_callback()}),this)}).Show()};BX.CDialog.prototype.ShowError=function(t){BX.onCustomEvent(this,"onWindowError",[t]);this.closeWait();if(this._wait)BX.closeWait(this._wait);this.Notify(t,true)};BX.CDialog.prototype.__expandGetSize=function(){var t=BX.GetDocElement();t.style.overflow="hidden";var e=BX.GetWindowInnerSize();t.scrollTop=0;this.DIV.style.top="-"+this.dxShadow+"px";this.DIV.style.left="-"+this.dxShadow+"px";return{width:e.innerWidth-parseInt(BX.style(this.PARTS.CONTENT,"padding-right"))-parseInt(BX.style(this.PARTS.CONTENT,"padding-left"))+this.dxShadow,height:e.innerHeight-this.PARTS.TITLEBAR.offsetHeight-this.PARTS.FOOT.offsetHeight-parseInt(BX.style(this.PARTS.CONTENT,"padding-top"))-parseInt(BX.style(this.PARTS.CONTENT,"padding-bottom"))+this.dxShadow}};BX.CDialog.prototype.__expand=function(){var t=BX.GetDocElement();this.dxShadow=2;if(!this.bExpanded){var e=BX.GetWindowScrollPos();this.__expand_settings={resizable:this.SETTINGS.resizable,draggable:this.SETTINGS.draggable,width:this.PARTS.CONTENT_DATA.style.width,height:this.PARTS.CONTENT_DATA.style.height,left:this.DIV.style.left,top:this.DIV.style.top,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,overflow:BX.style(t,"overflow")};this.SETTINGS.resizable=false;this.SETTINGS.draggable=false;var i=this.__expandGetSize();this.PARTS.CONTENT_DATA.style.width=i.width+"px";this.PARTS.CONTENT_DATA.style.height=i.height+"px";window.scrollTo(0,0);t.style.overflow="hidden";this.bExpanded=true;BX.onCustomEvent(this,"onWindowExpand");BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{width:i.width,height:i.height}]);BX.bind(window,"resize",BX.proxy(this.__expand_onresize,this))}else{BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));this.SETTINGS.resizable=this.__expand_settings.resizable;this.SETTINGS.draggable=this.__expand_settings.draggable;t.style.overflow=this.__expand_settings.overflow;this.DIV.style.top=this.__expand_settings.top;this.DIV.style.left=this.__expand_settings.left;this.PARTS.CONTENT_DATA.style.width=this.__expand_settings.width;this.PARTS.CONTENT_DATA.style.height=this.__expand_settings.height;window.scrollTo(this.__expand_settings.scrollLeft,this.__expand_settings.scrollTop);this.bExpanded=false;BX.onCustomEvent(this,"onWindowNarrow");BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{width:parseInt(this.__expand_settings.width),height:parseInt(this.__expand_settings.height)}])}};BX.CDialog.prototype.__expand_onresize=function(){var t=this.__expandGetSize();this.PARTS.CONTENT_DATA.style.width=t.width+"px";this.PARTS.CONTENT_DATA.style.height=t.height+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[t])};BX.CDialog.prototype.__onexpand=function(){var t=this.PARTS.TITLEBAR_ICONS.firstChild;t.className=BX.toggle(t.className,["bx-core-adm-icon-expand","bx-core-adm-icon-narrow"]);t.title=BX.toggle(t.title,[BX.message("JS_CORE_WINDOW_EXPAND"),BX.message("JS_CORE_WINDOW_NARROW")]);if(this.PARTS.RESIZER){this.PARTS.RESIZER.style.display=this.bExpanded?"none":"block"}};BX.CDialog.prototype.__startResize=function(t){if(!this.SETTINGS.resizable)return false;if(!t)t=window.event;this.wndSize=BX.GetWindowScrollPos();this.wndSize.innerWidth=BX.GetWindowInnerSize().innerWidth;this.pos=BX.pos(this.PARTS.CONTENT_DATA);this.x=t.clientX+this.wndSize.scrollLeft;this.y=t.clientY+this.wndSize.scrollTop;this.dx=this.pos.left+this.pos.width-this.x;this.dy=this.pos.top+this.pos.height-this.y;this.dw=this.pos.width-parseInt(this.PARTS.CONTENT_DATA.style.width)+parseInt(BX.style(this.PARTS.CONTENT,"padding-right"));BX.bind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.bind(document,"mouseup",BX.proxy(this.__stopResize,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="se-resize";BX.onCustomEvent(this,"onWindowResizeStart");return true};BX.CDialog.prototype.Resize=function(t,e){var i=Math.max(t-this.pos.left+this.dx,this.SETTINGS.min_width);var s=Math.max(e-this.pos.top+this.dy,this.SETTINGS.min_height);if(this.SETTINGS.resize_restrict){var o=BX.GetWindowScrollSize();if(this.pos.left+i>o.scrollWidth-this.dw)i=o.scrollWidth-this.pos.left-this.dw}this.PARTS.CONTENT_DATA.style.width=i+"px";this.PARTS.CONTENT_DATA.style.height=s+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{height:s,width:i}])};BX.CDialog.prototype.SetSize=function(t){this.PARTS.CONTENT_DATA.style.width=t.width+"px";this.PARTS.CONTENT_DATA.style.height=t.height+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[t])};BX.CDialog.prototype.GetParameters=function(t){var e=this.GetForm();if(!e)return"";var i,s="";var o=e.elements.length;var n="";for(i=0;i<o;i++){if(s!="")n="&";var r=e.elements[i];if(r.disabled)continue;switch(r.type.toLowerCase()){case"text":case"textarea":case"password":case"hidden":if(null==t&&r.name.substr(r.name.length-4)=="_alt"&&e.elements[r.name.substr(0,r.name.length-4)])break;s+=n+r.name+"="+BX.util.urlencode(r.value);break;case"radio":if(r.checked)s+=n+r.name+"="+BX.util.urlencode(r.value);break;case"checkbox":s+=n+r.name+"="+BX.util.urlencode(r.checked?"Y":"N");break;case"select-one":var h="";if(null==t&&e.elements[r.name+"_alt"]&&r.selectedIndex==0)h=e.elements[r.name+"_alt"].value;else h=r.value;s+=n+r.name+"="+BX.util.urlencode(h);break;case"select-multiple":var a,l=false;var d=r.options.length;for(a=0;a<d;a++){if(r.options[a].selected){s+=n+r.name+"="+BX.util.urlencode(r.o
22ptions[a].value);l=true}}if(!l)s+=n+r.name+"=";break;default:break}}return s};BX.CDialog.prototype.PostParameters=function(t){var e=this.PARAMS.content_url;if(null==t)t="";t+=(t==""?"":"&")+"bxsender="+this._sender;var i=e.indexOf("?");if(i==-1)e+="?"+t;else e=e.substring(0,i)+"?"+t+"&"+e.substring(i+1);BX.showWait();this.auth_callback=BX.delegate((function(){this.hideNotify();this.PostParameters(t)}),this);BX.ajax.Setup({skipAuthCheck:true},true);BX.ajax.post(e,this.GetParameters(),BX.delegate((function(t){BX.closeWait();if(!this.bSkipReplaceContent){this.ClearButtons();this.SetContent(t);this.Show(true)}this.bSkipReplaceContent=false}),this))};BX.CDialog.prototype.Submit=function(t,e){var i=this.GetForm();if(i){i.onsubmit=null;i.method="POST";if(!i.action||e){e=e||this.PARAMS.content_url;if(null!=t){var s=e.indexOf("?");if(s==-1)e+="?"+t;else e=e.substring(0,s)+"?"+t+"&"+e.substring(s+1)}i.action=e}if(!i._bxsender){i._bxsender=i.appendChild(BX.create("INPUT",{attrs:{type:"hidden",name:"bxsender",value:this._sender}}))}this._wait=BX.showWait();this.auth_callback=BX.delegate((function(){this.hideNotify();this.Submit(t)}),this);BX.ajax.submit(i,BX.delegate((function(){this.closeWait()}),this))}else{window.alert("no form registered!")}};BX.CDialog.prototype.GetForm=function(){if(null==this.__form){var t=this.PARTS.CONTENT_DATA.getElementsByTagName("FORM");this.__form=t[0]?t[0]:null}return this.__form};BX.CDialog.prototype.GetRealForm=function(){if(null==this.__rform){var t=this.PARTS.CONTENT_DATA.getElementsByTagName("FORM");this.__rform=t[1]?t[1]:t[0]?t[0]:null}return this.__rform};BX.CDialog.prototype._checkButton=function(t){var e=["btnSave","btnCancel","btnClose"];for(var i=0;i<e.length;i++){if(this[e[i]]&&t==this[e[i]])return e[i]}return false};BX.CDialog.prototype.ShowButtons=function(){var t=[];if(this.PARAMS.buttons){if(this.PARAMS.buttons.title)this.PARAMS.buttons=[this.PARAMS.buttons];for(var e=0,i=this.PARAMS.buttons.length;e<i;e++){if(BX.type.isNotEmptyString(this.PARAMS.buttons[e])){t.push(this.PARAMS.buttons[e])}else if(BX.type.isElementNode(this.PARAMS.buttons[e])){t.push(this.PARAMS.buttons[e])}else if(this.PARAMS.buttons[e]){if(!BX.is_subclass_of(this.PARAMS.buttons[e],BX.CWindowButton)){var s=this._checkButton(this.PARAMS.buttons[e]);this.PARAMS.buttons[e]=new BX.CWindowButton(this.PARAMS.buttons[e]);if(s)this[s]=this.PARAMS.buttons[e]}t.push(this.PARAMS.buttons[e].Button(this))}}}return t};BX.CDialog.prototype.setAutosave=function(){if(!this.bSetAutosaveDelay){this.bSetAutosaveDelay=true;setTimeout(BX.proxy(this.setAutosave,this),10)}};BX.CDialog.prototype.SetTitle=function(t){this.PARAMS.title=t;BX.cleanNode(this.PARTS.TITLE_CONTAINER).appendChild(document.createTextNode(this.PARAMS.title))};BX.CDialog.prototype.SetHead=function(t){this.PARAMS.head=BX.util.trim(t);this.PARTS.HEAD.innerHTML=this.PARAMS.head||" ";this.PARTS.HEAD.style.display=this.PARAMS.head?"block":"none";this.adjustSize()};BX.CDialog.prototype.Notify=function(t,e,i){if(!this.PARTS.NOTIFY){this.PARTS.NOTIFY=this.DIV.insertBefore(BX.create("DIV",{props:{className:"adm-warning-block"},children:[BX.create("SPAN",{props:{className:"adm-warning-text"}}),BX.create("SPAN",{props:{className:"adm-warning-icon"}}),BX.create("SPAN",{props:{className:"adm-warning-close"},events:{click:BX.proxy(this.hideNotify,this)}})]}),this.DIV.firstChild)}if(e)BX.addClass(this.PARTS.NOTIFY,"adm-warning-block-red");else BX.removeClass(this.PARTS.NOTIFY,"adm-warning-block-red");if(i!==true){t=BX.util.htmlspecialchars(t)}this.PARTS.NOTIFY.firstChild.innerHTML=t||" ";this.PARTS.NOTIFY.firstChild.style.width=this.PARAMS.width-50+"px";BX.removeClass(this.PARTS.NOTIFY,"adm-warning-animate")};BX.CDialog.prototype.hideNotify=function(){BX.addClass(this.PARTS.NOTIFY,"adm-warning-animate")};BX.CDialog.prototype.__adjustHeadToIcon=function(){if(!this.PARTS.HEAD.offsetHeight){setTimeout(BX.delegate(this.__adjustHeadToIcon,this),50)}else{if(this.icon_image&&this.icon_image.height&&this.icon_image.height>this.PARTS.HEAD.offsetHeight-5){this.PARTS.HEAD.style.height=this.icon_image.height+5+"px";this.adjustSize()}this.icon_image.onload=null;this.icon_image=null}};BX.CDialog.prototype.SetIcon=function(t){if(this.PARAMS.icon!=t){if(this.PARAMS.icon)BX.removeClass(this.PARTS.HEAD,this.PARAMS.icon);this.PARAMS.icon=t;if(this.PARAMS.icon){BX.addClass(this.PARTS.HEAD,this.PARAMS.icon);var e=BX.style(this.PARTS.HEAD,"background-image")||BX.style(this.PARTS.HEAD,"backgroundImage");if(BX.type.isNotEmptyString(e)&&e!="none"){var i=e.match(new RegExp("url\\s*\\(\\s*('|\"|)(.+?)(\\1)\\s*\\)"));if(i){e=i[2];if(BX.type.isNotEmptyString(e)){this.icon_image=new Image;this.icon_image.onload=BX.delegate(this.__adjustHeadToIcon,this);this.icon_image.src=e}}}}}this.adjustSize()};BX.CDialog.prototype.SetIconFile=function(t){this.icon_image=new Image;this.icon_image.onload=BX.delegate(this.__adjustHeadToIcon,this);this.icon_image.src=t;BX.adjust(this.PARTS.HEAD,{style:{backgroundImage:"url("+t+")",backgroundPosition:"right 9px"}});this.adjustSize()};BX.CDialog.prototype.SetButtons=function(t){if(BX.type.isString(t)){if(t.length>0){this.PARTS.BUTTONS_CONTAINER.innerHTML+=t;var e=this.PARTS.BUTTONS_CONTAINER.getElementsByTagName("INPUT");if(e.length>0){this.PARAMS.buttons=[];for(var i=0;i<e.length;i++){this.PARAMS.buttons.push(new BX.CWindowButton({btn:e[i],parentWindow:this}))}}}}else{this.PARAMS.buttons=t;BX.adjust(this.PARTS.BUTTONS_CONTAINER,{children:this.ShowButtons()})}this.adjustSize()};BX.CDialog.prototype.ClearButtons=function(){BX.cleanNode(this.PARTS.BUTTONS_CONTAINER);this.adjustSize()};BX.CDialog.prototype.SetContent=function(t){this.__form=null;if(BX.type.isElementNode(t)){if(t.parentNode)t.parentNode.removeChild(t)}else if(BX.type.isString(t)){t=BX.create("DIV",{html:t})}this.PARAMS.content=t;BX.cleanNode(this.PARTS.CONTENT_DATA);BX.adjust(this.PARTS.CONTENT_DATA,{children:[this.PARTS.HEAD,BX.create("DIV",{props:{className:"bx-core-adm-dialog-content-wrap-inner"},children:[this.PARAMS.content]}
22)]});if(this.PARAMS.content_url&&this.GetForm()){this.__form.submitbtn=this.__form.appendChild(BX.create("INPUT",{props:{type:"submit"},style:{display:"none"}}));this.__form.onsubmit=BX.delegate(this.__submit,this)}};BX.CDialog.prototype.__submit=function(t){for(var e=0,i=this.PARAMS.buttons.length;e<i;e++){if(this.PARAMS.buttons[e]&&(this.PARAMS.buttons[e].name&&/save|apply/i.test(this.PARAMS.buttons[e].name)||this.PARAMS.buttons[e].btn&&this.PARAMS.buttons[e].btn.name&&/save|apply/i.test(this.PARAMS.buttons[e].btn.name))){this.PARAMS.buttons[e].emulate();break}}return BX.PreventDefault(t)};BX.CDialog.prototype.SwapContent=function(t){t=BX(t);BX.cleanNode(this.PARTS.CONTENT_DATA);t.parentNode.removeChild(t);this.PARTS.CONTENT_DATA.appendChild(t);t.style.display="block";this.SetContent(t.innerHTML)};BX.CDialog.prototype.adjustSize=function(){};BX.CDialog.prototype.__adjustSize=function(){};BX.CDialog.prototype.adjustSizeEx=function(){BX.defer(this.__adjustSizeEx,this)()};BX.CDialog.prototype.__adjustSizeEx=function(){var t=this.PARTS.CONTENT_DATA.firstChild,e=0,i,s;while(t){if(BX.type.isElementNode(t)){i=parseInt(BX.style(t,"margin-top"),10);if(isNaN(i))i=0;s=parseInt(BX.style(t,"margin-bottom"),10);if(isNaN(s))s=0;e+=t.offsetHeight+i+s}t=BX.nextSibling(t)}if(e)this.PARTS.CONTENT_DATA.style.height=e+"px"};BX.CDialog.prototype.__onResizeFinished=function(){BX.WindowManager.saveWindowSize(this.PARAMS.resize_id||this.PARAMS.content_url,{height:parseInt(this.PARTS.CONTENT_DATA.style.height),width:parseInt(this.PARTS.CONTENT_DATA.style.width)})};BX.CDialog.prototype.Show=function(t){if(!this.PARAMS.content&&this.PARAMS.content_url&&BX.ajax&&!t){var e=BX.showWait();BX.WindowManager.currently_loaded=this;this.CreateOverlay();this.OVERLAY.style.display="block";this.OVERLAY.className="bx-core-dialog-overlay";var i="",s="GET";if(this.PARAMS.content_post){i=this.PARAMS.content_post;s="POST"}var o=this.PARAMS.content_url+(this.PARAMS.content_url.indexOf("?")<0?"?":"&")+"bxsender="+this._sender;this.auth_callback=BX.delegate((function(){this.PARAMS.content="";this.hideNotify();this.Show()}),this);BX.ajax({method:s,dataType:"html",url:o,data:i,skipAuthCheck:true,onsuccess:BX.delegate((function(t){BX.closeWait(null,e);this.SetContent(t||" ");this.Show()}),this)})}else{BX.WindowManager.currently_loaded=null;BX.CDialog.superclass.Show.apply(this,arguments);this.adjustPos();this.OVERLAY.className="bx-core-dialog-overlay";this.__adjustSize();BX.removeCustomEvent(this,"onWindowResize",BX.proxy(this.__adjustSize,this));BX.addCustomEvent(this,"onWindowResize",BX.proxy(this.__adjustSize,this));if(this.PARAMS.resizable&&(this.PARAMS.content_url||this.PARAMS.resize_id)){BX.removeCustomEvent(this,"onWindowResizeFinished",BX.proxy(this.__onResizeFinished,this));BX.addCustomEvent(this,"onWindowResizeFinished",BX.proxy(this.__onResizeFinished,this))}}};BX.CDialog.prototype.GetInnerPos=function(){return{width:parseInt(this.PARTS.CONTENT_DATA.style.width),height:parseInt(this.PARTS.CONTENT_DATA.style.height)}};BX.CDialog.prototype.adjustPos=function(){if(!this.bExpanded){var t=window;var e=BX.PageObject.getRootWindow();if(e.BX.SidePanel&&e.BX.SidePanel.Instance&&e.BX.SidePanel.Instance.getTopSlider()){t=e.BX.SidePanel.Instance.getTopSlider().getWindow()}var i=t.BX.GetWindowInnerSize();var s=t.BX.GetWindowScrollPos();var o={left:parseInt(s.scrollLeft+i.innerWidth/2-parseInt(this.DIV.offsetWidth)/2)+"px",top:Math.max(parseInt(s.scrollTop+i.innerHeight/2-parseInt(this.DIV.offsetHeight)/2),0)+"px"};BX.adjust(this.DIV,{style:o})}};BX.CDialog.prototype.GetContent=function(){return this.PARTS.CONTENT_DATA};BX.CDialog.prototype.btnSave=BX.CDialog.btnSave={title:BX.message("JS_CORE_WINDOW_SAVE"),id:"savebtn",name:"savebtn",className:BX.browser.IsIE()&&BX.browser.IsDoctype()&&!BX.browser.IsIE10()?"":"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.PostParameters()}};BX.CDialog.prototype.btnCancel=BX.CDialog.btnCancel={title:BX.message("JS_CORE_WINDOW_CANCEL"),id:"cancel",name:"cancel",action:function(){this.parentWindow.Close()}};BX.CDialog.prototype.btnClose=BX.CDialog.btnClose={title:BX.message("JS_CORE_WINDOW_CLOSE"),id:"close",n
22ame:"close",action:function(){this.parentWindow.Close()}};BX.CAdminDialog=function(t){BX.CAdminDialog.superclass.constructor.apply(this,arguments);this._sender="core_window_cadmindialog";BX.addClass(this.DIV,"bx-core-adm-admin-dialog");this.PARTS.CONTENT.insertBefore(this.PARTS.HEAD,this.PARTS.CONTENT.firstChild);this.PARTS.HEAD.className="bx-core-adm-dialog-tabs"};BX.extend(BX.CAdminDialog,BX.CDialog);BX.CAdminDialog.prototype.SetHead=function(){BX.CAdminDialog.superclass.SetHead.apply(this,arguments);if(this.PARTS.HEAD.firstChild&&BX.type.isElementNode(this.PARTS.HEAD.firstChild)){var t=this.PARTS.HEAD.firstChild,e=0,i=0,s=0;while(t){if(BX.type.isElementNode(t)){i=parseInt(BX.style(t,"margin-left"),10);if(isNaN(i))i=0;s=parseInt(BX.style(t,"margin-right"),10);if(isNaN(s))s=0;e+=t.offsetWidth+i+s}t=BX.nextSibling(t)}this.SETTINGS.min_width=Math.max(e,this.SETTINGS.min_width)-2;if(this.PARAMS.width<this.SETTINGS.min_width){BX.adjust(this.PARTS.CONTENT_DATA,{style:{width:this.SETTINGS.min_width+"px"}})}}};BX.CAdminDialog.prototype.SetContent=function(t){this.__form=null;if(BX.type.isElementNode(t)){if(t.parentNode)t.parentNode.removeChild(t)}this.PARAMS.content=t;BX.cleanNode(this.PARTS.CONTENT_DATA);BX.adjust(this.PARTS.CONTENT_DATA,{children:[this.PARAMS.content||" "]});if(this.PARAMS.content_url&&this.GetForm()){this.__form.appendChild(BX.create("INPUT",{props:{type:"submit"},style:{display:"none"}}));this.__form.onsubmit=BX.delegate(this.__submit,this)}};BX.CAdminDialog.prototype.__expandGetSize=function(){var t=BX.CAdminDialog.superclass.__expandGetSize.apply(this,arguments);t.width-=parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-right"))+parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-left"));t.height-=parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-top"))+parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-bottom"));t.height-=this.PARTS.HEAD.offsetHeight;return t};BX.CAdminDialog.prototype.Submit=function(){var t=this.GetForm();if(t&&!t["bxpublic"]&&!/bxpublic=/.test(t.action)){t.appendChild(BX.create("INPUT",{props:{type:"hidden",name:"bxpublic",value:"Y"}}))}return BX.CAdminDialog.superclass.Submit.apply(this,arguments)};BX.CAdminDialog.prototype.btnSave=BX.CAdminDialog.btnSave={title:BX.message("JS_CORE_WINDOW_SAVE"),id:"savebtn",name:"savebtn",className:"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.Submit()}};BX.CAdminDialog.btnCancel=BX.CAdminDialog.superclass.btnCancel;BX.CAdminDialog.btnClose=BX.CAdminDialog.superclass.btnClose;BX.CDebugDialog=function(t){BX.CDebugDialog.superclass.constructor.apply(this,arguments)};BX.extend(BX.CDebugDialog,BX.CDialog);BX.CDebugDialog.prototype.ShowDetails=function(t){var e=BX(t);if(e){if(this.div_detail_current)this.div_detail_current.style.display="none";e.style.display="block";this.div_detail_current=e}};BX.CDebugDialog.prototype.SetContent=function(t){if(!t)return;var e=t.split("#DIVIDER#");if(e.length>1){this.PARAMS.content=e[1];this.PARTS.CONTENT_DATA.style.overflow="hidden";BX.CDebugDialog.superclass.SetContent.apply(this,[e[1]]);this.PARTS.CONTENT_INNER=this.PARTS.CONTENT_DATA.firstChild.nextSibling;this.PARTS.CONTENT_TOP=this.PARTS.CONTENT_DATA.insertBefore(BX.create("DIV",{props:{className:"bx-debug-content-top"},html:e[0]}),this.PARTS.CONTENT_INNER);this.PARTS.CONTENT_INNER.style.overflow="auto"}else{BX.CDebugDialog.superclass.SetContent.apply(this,arguments)}};BX.CDebugDialog.prototype.__adjustSize=function(){BX.CDebugDialog.superclass.__adjustSize.apply(this,arguments);if(this.PARTS.CONTENT_TOP){var t=this.PARTS.CONTENT_DATA.offsetHeight-this.PARTS.HEAD.offsetHeight-this.PARTS.CONTENT_TOP.offsetHeight-38;if(t>0){this.PARTS.CONTENT_INNER.style.height=t+"px"}}};BX.CEditorDialog=function(t){BX.CEditorDialog.superclass.constructor.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT,"bx-core-adm-dialog-content-wrap");BX.removeClass(this.PARTS.CONTENT_DATA,"bx-core-adm-dialog-content");BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner");BX.removeClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-adm-dialog-buttons");BX.addClass(this.PARTS.CONTENT,"bx-core-editor-dialog-content-wrap");BX.addClass(this.PARTS.CONTENT_DATA,"bx-core-editor-dialog-content");BX.addClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-editor-dialog-buttons")};BX.extend(BX.CEditorDialog,BX.CDialog);BX.CEditorDialog.prototype.SetContent=function(){BX.CEditorDialog.superclass.SetContent.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner")};BX.CWizardDialog=function(t){BX.CWizardDialog.superclass.constructor.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT,"bx-core-adm-dialog-content-wrap");BX.removeClass(this.PARTS.CONTENT_DATA,"bx-core-adm-dialog-content");BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner");BX.removeClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-adm-dialog-buttons");BX.addClass(this.PARTS.CONTENT,"bx-core-wizard-dialog-content-wrap")};BX.extend(BX.CWizardDialog,BX.CDialog);BX.CAuthDialog=function(t){t.resizable=false;t.width=350;
22t.height=200;t.buttons=[this.btnSave];BX.CAuthDialog.superclass.constructor.apply(this,arguments);this._sender="core_window_cauthdialog";BX.addClass(this.DIV,"bx-core-auth-dialog");BX.AUTHAGENT=this};BX.extend(BX.CAuthDialog,BX.CDialog);BX.CAuthDialog.prototype.btnSave=BX.CAuthDialog.btnSave={title:BX.message("JS_CORE_WINDOW_AUTH"),id:"savebtn",name:"savebtn",className:"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.Submit("",this.parentWindow.PARAMS.content_url)}};BX.CAuthDialog.prototype.SetError=function(t){BX.closeWait();if(!!t)this.ShowError(t.MESSAGE||t)};BX.CAuthDialog.prototype.setAuthResult=function(t){BX.closeWait();if(t===false){this.Close();if(this.PARAMS.callback)this.PARAMS.callback()}else{this.SetError(t)}};BX.CWindowFloat=function(t){BX.CWindowFloat.superclass.constructor.apply(this,[t,"float"]);this.SETTINGS.resizable=false};BX.extend(BX.CWindowFloat,BX.CWindow);BX.CWindowFloat.prototype.adjustPos=function(){if(this.PARAMS.parent)this.adjustToNode();else if(this.PARAMS.x&&this.PARAMS.y)this.adjustToPos([this.PARAMS.x,this.PARAMS.y])};BX.CWindowFloat.prototype.adjustToPos=function(t){this.DIV.style.left=parseInt(t[0])+"px";this.DIV.style.top=parseInt(t[1])+"px"};BX.CWindowFloat.prototype.adjustToNodeGetPos=function(){return BX.pos(this.PARAMS.parent)};BX.CWindowFloat.prototype.adjustToNode=function(t){t=t||this.PARAMS.parent;this.PARAMS.parent=BX(t);if(this.PARAMS.parent){var e=this.adjustToNodeGetPos();this.DIV.style.top=e.top+"px";this.DIV.style.left=e.left+"px";this.PARAMS.parent.OPENER=this}};BX.CWindowFloat.prototype.Show=function(){this.adjustToPos([-1e3,-1e3]);BX.CWindowFloat.superclass.Show.apply(this,arguments);this.adjustPos()};BX.COpener=function(t){this.PARAMS=t||{};this.MENU=t.MENU||[];this.DIV=t.DIV;this.ATTACH=t.ATTACH||t.DIV;this.ATTACH_MODE=t.ATTACH_MODE||"bottom";this.ACTIVE_CLASS=t.ACTIVE_CLASS||"";this.PUBLIC_FRAME=t.PUBLIC_FRAME||0;this.LEVEL=t.LEVEL||0;this.CLOSE_ON_CLICK=typeof t.CLOSE_ON_CLICK!="undefined"?!!t.CLOSE_ON_CLICK:true;this.ADJUST_ON_CLICK=typeof t.ADJUST_ON_CLICK!="undefined"?!!t.ADJUST_ON_CLICK:true;this.TYPE=this.PARAMS.TYPE=="hover"?"hover":"click";this._openTimeout=null;if(this.PARAMS.TYPE=="hover"&&t.TIMEOUT!==0)this.TIMEOUT=t.TIMEOUT||1e3;else this.TIMEOUT=0;this.bMenuInit=false;if(!!this.PARAMS.MENU_URL){this.bMenuLoaded=false;this.bMenuLoading=false;this.MENU=[{TEXT:BX.message("JS_CORE_LOADING"),CLOSE_ON_CLICK:false}];if(this.PARAMS.MENU_PRELOAD){BX.defer(this.Load,this)()}}BX.ready(BX.defer(this.Init,this))};BX.COpener.prototype.Init=function(){this.DIV=BX(this.DIV);switch(this.TYPE){case"hover":BX.bind(this.DIV,"mouseover",BX.proxy(this.Open,this));BX.bind(this.DIV,"click",BX.proxy(this.Toggle,this));break;case"click":BX.bind(this.DIV,"click",BX.proxy(this.Toggle,this));break}};BX.COpener.prototype.Load=function(){if(this.PARAMS.MENU_URL&&!this.bMenuLoaded){if(!this.bMenuLoading){var t=this.PARAMS.MENU_URL;if(t.indexOf("sessid=")<=0)t+=(t.indexOf("?")>0?"&":"?")+"sessid="+BX.bitrix_sessid();this.bMenuLoading=true;BX.ajax.loadJSON(t,BX.proxy(this.SetMenu,this),BX.proxy(this.LoadFailed,this))}}};BX.COpener.prototype.SetMenu=function(t){this.bMenuLoaded=true;this.bMenuLoading=false;if(this.bMenuInit){this.MENU.setItems(t)}else{this.MENU=t}};BX.COpener.prototype.LoadFailed=function(t,e){this.bMenuLoading=false;this.SetMenu([{TEXT:BX.message("JS_CORE_NO_DATA"),CLOSE_ON_CLICK:true}]);BX.debug(arguments)};BX.COpener.prototype.checkAdminMenu=function(){if(document.documentElement.id=="bx-admin-prefix")return true;return!!BX.findParent(this.DIV,{property:{id:"bx-admin-prefix"}})};BX.COpener.prototype.Toggle=function(t){this.__clear_timeout();if(!this.bMenuInit||!this.MENU.visible()){var e=this.TIMEOUT;this.TIMEOUT=0;this.Open(t);this.TIMEOUT=e}else{this.MENU.Close()}return!!(t||window.event)&&BX.PreventDefault(t)};BX.COpener.prototype.GetMenu=function(){if(!this.bMenuInit){if(BX.type.isArray(this.MENU)){this.MENU=new BX.CMenu({ITEMS:this.MENU,ATTACH_MODE:this.ATTACH_MODE,SET_ID:this.checkAdminMenu()?"bx-admin-prefix":"",CLOSE_ON_CLICK:!!this.CLOSE_ON_CLICK,ADJUST_ON_CLICK:!!this.ADJUST_ON_CLICK,PUBLIC_FRAME:!!this.PUBLIC_FRAME,LEVEL:this.LEVEL,parent:BX(this.DIV),parent_attach:BX(this.ATTA
22CH)});if(this.LEVEL>0){BX.bind(this.MENU.DIV,"mouseover",BX.proxy(this._on_menu_hover,this));BX.bind(this.MENU.DIV,"mouseout",BX.proxy(this._on_menu_hout,this))}}BX.addCustomEvent(this.MENU,"onMenuOpen",BX.proxy(this.handler_onopen,this));BX.addCustomEvent(this.MENU,"onMenuClose",BX.proxy(this.handler_onclose,this));BX.addCustomEvent("onMenuItemHover",BX.proxy(this.handler_onover,this));this.bMenuInit=true}return this.MENU};BX.COpener.prototype.Open=function(){this.GetMenu();this.bOpen=true;this.__clear_timeout();if(this.TIMEOUT>0){BX.bind(this.DIV,"mouseout",BX.proxy(this.__clear_timeout,this));this._openTimeout=setTimeout(BX.proxy(this.__open,this),this.TIMEOUT)}else{this.__open()}if(!!this.PARAMS.MENU_URL&&!this.bMenuLoaded){this._loadTimeout=setTimeout(BX.proxy(this.Load,this),parseInt(this.TIMEOUT/2))}return true};BX.COpener.prototype.__clear_timeout=function(){if(!!this._openTimeout)clearTimeout(this._openTimeout);if(!!this._loadTimeout)clearTimeout(this._loadTimeout);BX.unbind(this.DIV,"mouseout",BX.proxy(this.__clear_timeout,this))};BX.COpener.prototype._on_menu_hover=function(){this.bMenuHover=true;this.__clear_timeout();if(this.ACTIVE_CLASS)BX.addClass(this.DIV,this.ACTIVE_CLASS)};BX.COpener.prototype._on_menu_hout=function(){this.bMenuHover=false};BX.COpener.prototype.handler_onover=function(t,e){if(this.bMenuHover)return;if(e!=this&&t==this.LEVEL-1&&this.ACTIVE_CLASS){BX.removeClass(this.DIV,this.ACTIVE_CLASS)}if(this.bMenuInit&&t<=this.LEVEL-1&&this.MENU.visible()){if(e!=this){this.__clear_timeout();this._openTimeout=setTimeout(BX.proxy(this.Close,this),this.TIMEOUT)}}};BX.COpener.prototype.handler_onopen=function(){this.bOpen=true;if(this.ACTIVE_CLASS)BX.addClass(this.DIV,this.ACTIVE_CLASS);BX.defer((function(){BX.onCustomEvent(this,"onOpenerMenuOpen")}),this)()};BX.COpener.prototype.handler_onclose=function(){this.bOpen=false;BX.onCustomEvent(this,"onOpenerMenuClose");if(this.ACTIVE_CLASS)BX.removeClass(this.DIV,this.ACTIVE_CLASS)};BX.COpener.prototype.Close=function(){if(!this.bMenuInit)return;if(!!this._openTimeout)clearTimeout(this._openTimeout);this.bOpen=false;this.__close()};BX.COpener.prototype.__open=function(){this.__clear_timeout();if(this.bMenuInit&&this.bOpen&&!this.MENU.visible())this.MENU.Show()};BX.COpener.prototype.__close=function(){if(this.bMenuInit&&!this.bOpen&&this.MENU.visible())this.MENU.Hide()};BX.COpener.prototype.__close_immediately=function(){this.bOpen=false;this.__close()};BX.COpener.prototype.isMenuVisible=function(){return null!=this.MENU.visible&&this.MENU.visible()};BX.CMenu=function(t){BX.CMenu.superclass.constructor.apply(this);this.DIV.style.width="auto";this.DIV.style.height="auto";this.PARAMS=t||{};this.PARTS={};this.PARAMS.ATTACH_MODE=this.PARAMS.ATTACH_MODE||"bottom";this.PARAMS.CLOSE_ON_CLICK=typeof this.PARAMS.CLOSE_ON_CLICK=="undefined"?true:this.PARAMS.CLOSE_ON_CLICK;this.PARAMS.ADJUST_ON_CLICK=typeof this.PARAMS.ADJUST_ON_CLICK=="undefined"?true:this.PARAMS.ADJUST_ON_CLICK;this.PARAMS.PUBLIC_FRAME=typeof this.PARAMS.PUBLIC_FRAME=="undefined"?false:this.PARAMS.PUBLIC_FRAME;this.PARAMS.LEVEL=this.PARAMS.LEVEL||0;this.DIV.className="bx-core-popup-menu bx-core-popup-menu-"+this.PARAMS.ATTACH_MODE+" bx-core-popup-menu-level"+this.PARAMS.LEVEL+(typeof this.PARAMS.ADDITIONAL_CLASS!="undefined"?" "+this.PARAMS.ADDITIONAL_CLASS:"");if(!!this.PARAMS.SET_ID)this.DIV.id=this.PARAMS.SET_ID;if(this.PARAMS.LEVEL==0){this.ARROW=this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-core-popup-menu-angle"},style:{left:"15px"}}))}if(!!this.PARAMS.CLASS_NAME)this.DIV.className+=" "+this.PARAMS.CLASS_NAME;BX.bind(this.DIV,"click",BX.eventCancelBubble);this.ITEMS=[];this.setItems(this.PARAMS.ITEMS);BX.addCustomEvent("onMenuOpen",BX.proxy(this._onMenuOpen,this));BX.addCustomEvent("onMenuItemSelected",BX.proxy(this.Hide,this))};BX.extend(BX.CMenu,BX.CWindowFloat);BX.CMenu.broadcastCloseEvent=function(){BX.onCustomEvent("onMenuItemSelected")};BX.CMenu._toggleChecked=function(){BX.toggleClass(this,"bx-core-popup-menu-item-checked")};BX.CMenu._itemDblClick=function(){window.location.href=this.href};BX.CMenu.prototype.toggleArrow=function(t){if(!!this.ARROW){if(typeof t=="undefined"){t=this.ARROW.style.visibility=="hidden"}this.ARROW.style.visibility=!!t?"visible":"hidden"}};BX.CMenu.prototype.visible=function(){return this.DIV.style.display!=="none"};BX.CMenu.prototype._onMenuOpen=function(t,e){if(this.visible()){if(e==this.PARAMS.LEVEL&&t!=this){this.Hide()}}};
22BX.CMenu.prototype.onUnRegister=function(){if(!this.visible())return;this.Hide()};BX.CMenu.prototype.setItems=function(t){this.PARAMS.ITEMS=t;BX.cleanNode(this.DIV);if(!!this.ARROW)this.DIV.appendChild(this.ARROW);if(this.PARAMS.ITEMS){this.PARAMS.ITEMS=BX.util.array_values(this.PARAMS.ITEMS);var e=false;var i=0;for(var s=0,o=this.PARAMS.ITEMS.length;s<o;s++){if((s==0||s==o-1)&&this.PARAMS.ITEMS[s].SEPARATOR)continue;i++;if(!e)e=!!this.PARAMS.ITEMS[s].GLOBAL_ICON;this.addItem(this.PARAMS.ITEMS[s],s)}if(i===1)BX.addClass(this.DIV,"bx-core-popup-menu-single-item");else BX.removeClass(this.DIV,"bx-core-popup-menu-single-item");if(!e)BX.addClass(this.DIV,"bx-core-popup-menu-no-icons");else BX.removeClass(this.DIV,"bx-core-popup-menu-no-icons")}};BX.CMenu.prototype.addItem=function(t){this.ITEMS.push(t);if(t.SEPARATOR){t.NODE=BX.create("DIV",{props:{className:"bx-core-popup-menu-separator"}})}else{var e=!!t.MENU&&(BX.type.isArray(t.MENU)&&t.MENU.length>0||t.MENU instanceof BX.CMenu)||!!t.MENU_URL;if(t.DISABLED){t.CLOSE_ON_CLICK=false;t.LINK=null;t.ONCLICK=null;t.ACTION=null}var i={};if(!!t.LINK||BX.browser.IsIE()&&!BX.browser.IsDoctype()){i.href=t.LINK||"javascript:void(0)"}if(this.PARAMS.PUBLIC_FRAME){i.target="_top"}t.NODE=BX.create(!!t.LINK||BX.browser.IsIE()&&!BX.browser.IsDoctype()?"A":"SPAN",{props:{className:"bx-core-popup-menu-item"+(e?" bx-core-popup-menu-item-opener":"")+(!!t.DEFAULT?" bx-core-popup-menu-item-default":"")+(!!t.DISABLED?" bx-core-popup-menu-item-disabled":"")+(!!t.CHECKED?" bx-core-popup-menu-item-checked":""),title:!!BX.message["MENU_ENABLE_TOOLTIP"]||!!t.SHOW_TITLE?t.TITLE||"":"",BXMENULEVEL:this.PARAMS.LEVEL},attrs:i,events:{mouseover:function(){BX.onCustomEvent("onMenuItemHover",[this.BXMENULEVEL,this.OPENER])}},html:'<span class="bx-core-popup-menu-item-icon'+(t.GLOBAL_ICON?" "+t.GLOBAL_ICON:"")+'"></span><span class="bx-core-popup-menu-item-text">'+(t.HTML||(t.TEXT?BX.util.htmlspecialchars(t.TEXT):""))+"</span>"});if(e&&!t.DISABLED){t.NODE.OPENER=new BX.COpener({DIV:t.NODE,ACTIVE_CLASS:"bx-core-popup-menu-item-opened",TYPE:"hover",MENU:t.MENU,MENU_URL:t.MENU_URL,MENU_PRELOAD:!!t.MENU_PRELOAD,LEVEL:this.PARAMS.LEVEL+1,ATTACH_MODE:"right",TIMEOUT:500})}else if(this.PARAMS.CLOSE_ON_CLICK&&(typeof t.CLOSE_ON_CLICK=="undefined"||!!t.CLOSE_ON_CLICK)){BX.bind(t.NODE,"click",BX.CMenu.broadcastCloseEvent)}else if(this.PARAMS.ADJUST_ON_CLICK&&(typeof t.ADJUST_ON_CLICK=="undefined"||!!t.ADJUST_ON_CLICK)){BX.bind(t.NODE,"click",BX.defer(this.adjustPos,this))}if(e&&!!t.LINK){BX.bind(t.NODE,"dblclick",BX.CMenu._itemDblClick)}if(typeof t.CHECKED!="undefined"){BX.bind(t.NODE,"click",BX.CMenu._toggleChecked)}t.ONCLICK=t.ACTION||t.ONCLICK;if(!!t.ONCLICK){if(BX.type.isString(t.ONCLICK)){t.ONCLICK=new Function("event",t.ONCLICK)}BX.bind(t.NODE,"click",t.ONCLICK)}}this.DIV.appendChild(t.NODE)};BX.CMenu.prototype._documentClickBind=function(){this._documentClickUnBind();BX.bind(document,"click",BX.proxy(this._documentClick,this))};BX.CMenu.prototype._documentClickUnBind=function(){BX.unbind(document,"click",BX.proxy(this._documentClick,this))};BX.CMenu.prototype._documentClick=function(t){t=t||window.event;if(!!t&&!(BX.getEventButton(t)&BX.MSLEFT))return;this.Close()};BX.CMenu.prototype.Show=function(){BX.onCustomEvent(this,"onMenuOpen",[this,this.PARAMS.LEVEL]);BX.CMenu.superclass.Show.apply(this,[]);this.bCloseEventFired=false;BX.addCustomEvent(this.PARAMS.parent_attach,"onChangeNodePosition",BX.proxy(this.adjustToNode,this));BX.defer(this._documentClickBind,this)()};BX.CMenu.prototype.Close=BX.CMenu.prototype.Hide=function(){if(!this.visible())return;BX.removeCustomEvent(this.PARAMS.parent_attach,"onChangeNodePosition",BX.proxy(this.adjustToNode,this));this._documentClickUnBind();if(!this.bCloseEventFired){BX.onCustomEvent(this,"onMenuClose",[this,this.PARAMS.LEVEL]);this.bCloseEventFired=true}BX.CMenu.superclass.Hide.apply(this,arguments)};BX.CMenu.prototype.__adjustMenuToNode=function(){var t=BX.pos(this.PARAMS.parent_attach),e=!!BX.findParent(this.PARAMS.parent_attach,BX.is_fixed);if(e)this.DIV.style.position="fixed";else this.DIV.style.position="absolute";if(!t.top){this.DIV.style.top="-1000px";this.DIV.style.left="-1000px"}if(this.bTimeoutSet)return;var i=this.DIV.offsetWidth,s=this.DIV.offsetHeight;if(!i){setTimeout(BX.delegate((function(){this.bTimeoutSet=false;this.__adjustMenuToNode()}),this),100);this.bTimeoutSet=true;return}var o={},n=BX.GetWindowSize();switch(this.PARAMS.ATTACH_MODE){case"bottom":o.top=t.bottom+9;
22o.left=t.left;var r=0;if(!!this.ARROW){if(t.width>i)r=parseInt(i/2-7);else r=parseInt(Math.min(i,t.width)/2-7);if(r<7){o.left-=15;r+=15}}if(o.left>n.scrollWidth-i-10){var h=o.left;o.left=n.scrollWidth-i-10;if(!!this.ARROW)r+=h-o.left}if(e){o.left-=n.scrollLeft}if(!!this.ARROW)this.ARROW.style.left=r+"px";break;case"right":o.top=t.top-1;o.left=t.right;if(o.left>n.scrollWidth-i-10){o.left=t.left-i-1}break}if(e){o.top-=n.scrollTop}if(!!this.ARROW)this.ARROW.className="bx-core-popup-menu-angle";if(o.top+s>n.scrollTop+n.innerHeight||o.top+s>n.scrollHeight){var a=this.PARAMS.ATTACH_MODE=="bottom"?t.top-s-9:t.bottom-s+1;if(a>n.scrollTop||o.top+s>n.scrollHeight){if(o.top+s>n.scrollHeight){o.top=Math.max(0,n.scrollHeight-s);this.toggleArrow(false)}else{o.top=a;if(!!this.ARROW)this.ARROW.className="bx-core-popup-menu-angle-bottom"}}}if(o.top+o.left==0){this.Hide()}else{this.DIV.style.top=o.top+"px";this.DIV.style.left=o.left+"px"}};BX.CMenu.prototype.adjustToNode=function(t){this.PARAMS.parent_attach=BX(t)||this.PARAMS.parent_attach||this.PARAMS.parent;this.__adjustMenuToNode()};BX.CMenuOpener=function(t){BX.CMenuOpener.superclass.constructor.apply(this);this.PARAMS=t||{};this.setParent(this.PARAMS.parent);this.PARTS={};this.SETTINGS.drag_restrict=true;this.defaultAction=null;this.timeout=500;this.DIV.className="bx-component-opener";this.DIV.ondblclick=BX.PreventDefault;if(this.PARAMS.component_id){this.PARAMS.transform=!!this.PARAMS.transform}this.OPENERS=[];this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar"+(this.PARAMS.transform?" bx-context-toolbar-vertical-mode":"")}}));this.PARTS.INNER=this.DIV.firstChild.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-inner"},html:'<span class="bx-context-toolbar-drag-icon"></span><span class="bx-context-toolbar-vertical-line"></span><br>'}));this.EXTRA_BUTTONS={};var e=0;for(var i=0,s=this.PARAMS.menu.length;i<s;i++){var o=this.addItem(this.PARAMS.menu[i]);if(null!=o){e++;this.PARTS.INNER.appendChild(o);this.PARTS.INNER.appendChild(BX.create("BR"))}}var n=e>0;this.PARTS.ICONS=this.PARTS.INNER.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-icons"}}));if(this.PARAMS.component_id){this.PARAMS.pin=!!this.PARAMS.pin;if(n)this.PARTS.ICONS.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-separator"}}));this.PARTS.ICON_PIN=this.PARTS.ICONS.appendChild(BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:this.PARAMS.pin?"bx-context-toolbar-pin-fixed":"bx-context-toolbar-pin"},events:{click:BX.delegate(this.__pin_btn_clicked,this)}}))}if(this.EXTRA_BUTTONS["components2_props"]){var r=this.EXTRA_BUTTONS["components2_props"]||{URL:"javascript:void(0)"};if(null==this.defaultAction){this.defaultAction=r.ONCLICK;this.defaultActionTitle=r.TITLE||r.TEXT}r.URL="javascript:"+BX.util.urlencode(r.ONCLICK);this.ATTACH=this.PARTS.ICONS.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button bx-context-toolbar-button-settings"},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-inner"},children:[BX.create("A",{attrs:{href:r.URL},events:{mouseover:BX.proxy(this.__msover_text,this),mouseout:BX.proxy(this.__msout_text,this),mousedown:BX.proxy(this.__msdown_text,this)},html:'<span class="bx-context-toolbar-button-icon bx-context-toolbar-settings-icon"></span>'}),BX.create("A",{attrs:{href:"javascript: void(0)"},props:{className:"bx-context-toolbar-button-arrow"},events:{mouseover:BX.proxy(this.__msover_arrow,this),mouseout:BX.proxy(this.__msout_arrow,this),mousedown:BX.proxy(this.__msdown_arrow,this)},html:'<span class="bx-context-toolbar-button-arrow"></span>'})]})]}));this.OPENER=this.ATTACH.firstChild.lastChild;var h=this.attachMenu(this.EXTRA_BUTTONS["components2_submenu"]["MENU"]);BX.addCustomEvent(h,"onOpenerMenuOpen",BX.proxy(this.__menu_open,this));BX.addCustomEvent(h,"onOpenerMenuClose",BX.proxy(this.__menu_close,this))}if(e>1){this.PARTS.ICONS.appendChild(BX.create("span",{props:{className:"bx-context-toolbar-separator bx-context-toolbar-separator-switcher"}}));this.ICON_TRANSFORM=this.PARTS.ICONS.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},props:{className:"bx-context-toolbar-switcher"},events:{click:BX.delegate(this.__trf_btn_clicked,this)}}))}if(this.PARAMS.HINT){this.DIV.BXHINT=this.HINT=new BX.CHint({parent:this.DIV,hint:this.PARAMS.HINT.TEXT||"",title:this.PARAMS.HINT.TIT
22LE||"",hide_timeout:this.timeout/2,preventHide:false})}BX.addCustomEvent(this,"onWindowDragFinished",BX.delegate(this.__onMoveFinished,this));BX.addCustomEvent("onDynamicModeChange",BX.delegate(this.__onDynamicModeChange,this));BX.addCustomEvent("onTopPanelCollapse",BX.delegate(this.__onPanelCollapse,this));BX.addCustomEvent("onMenuOpenerMoved",BX.delegate(this.checkPosition,this));BX.addCustomEvent("onMenuOpenerUnhide",BX.delegate(this.checkPosition,this));BX.Event.EventEmitter.incrementMaxListeners("onDynamicModeChange");BX.Event.EventEmitter.incrementMaxListeners("onTopPanelCollapse");BX.Event.EventEmitter.incrementMaxListeners("onMenuOpenerMoved");BX.Event.EventEmitter.incrementMaxListeners("onMenuOpenerUnhide");if(this.OPENERS){for(i=0,s=this.OPENERS.length;i<s;i++){BX.addCustomEvent(this.OPENERS[i],"onOpenerMenuOpen",BX.proxy(this.__hide_hint,this))}}};BX.extend(BX.CMenuOpener,BX.CWindowFloat);BX.CMenuOpener.prototype.setParent=function(t){t=BX(t);if(!t){return}if(t.OPENER&&t.OPENER!=this){t.OPENER.Close();t.OPENER.clearHoverHoutEvents()}if(this.PARAMS.parent&&this.PARAMS.parent!=t){this.clearHoverHoutEvents();this.PARAMS.parent.OPENER=null}this.PARAMS.parent=t;this.PARAMS.parent.OPENER=this};BX.CMenuOpener.prototype.setHoverHoutEvents=function(t,e){if(!this.__opener_events_set){BX.bind(this.Get(),"mouseover",t);BX.bind(this.Get(),"mouseout",e);this.__opener_events_set=true}};BX.CMenuOpener.prototype.clearHoverHoutEvents=function(){if(this.Get()){BX.unbindAll(this.Get());this.__opener_events_set=false}};BX.CMenuOpener.prototype.unclosable=true;BX.CMenuOpener.prototype.__check_intersection=function(t,e){return!(e.right<=t.left||e.left>=t.right||e.bottom<=t.top||e.top>=t.bottom)};BX.CMenuOpener.prototype.__msover_text=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-text-hover")};BX.CMenuOpener.prototype.__msout_text=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.ATTACH,"bx-context-toolbar-button-text-hover bx-context-toolbar-button-text-active")};BX.CMenuOpener.prototype.__msover_arrow=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-arrow-hover")};BX.CMenuOpener.prototype.__msout_arrow=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.ATTACH,"bx-context-toolbar-button-arrow-hover bx-context-toolbar-button-arrow-active")};BX.CMenuOpener.prototype.__msdown_text=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-text-active")};BX.CMenuOpener.prototype.__msdown_arrow=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-arrow-active")};BX.CMenuOpener.prototype.__menu_close=function(){this._menu_open=false;this.bx_active=false;BX.removeClass(this.ATTACH,"bx-context-toolbar-button-active bx-context-toolbar-button-text-active bx-context-toolbar-button-arrow-active");if(!this.bx_hover){BX.removeClass(this.ATTACH,"bx-context-toolbar-button-hover bx-context-toolbar-button-text-hover bx-context-toolbar-button-arrow-hover");this.bx_hover=false}};BX.CMenuOpener.prototype.__menu_open=function(){this._menu_open=true};BX.CMenuOpener.prototype.checkPosition=function(){if(this.isMenuVisible()||this.DIV.style.display=="none"||this==BX.proxy_context||BX.proxy_context.zIndex>this.zIndex)return;this.correctPosition(BX.proxy_context)};BX.CMenuOpener.prototype.correctPosition=function(t){var e=BX.pos(this.DIV),i=BX.pos(t.Get());if(this.__check_intersection(e,i)){var s=i.top-e.height;if(s<0)s=i.bottom;this.DIV.style.top=s+"px";BX.addCustomEvent(t,"onMenuOpenerHide",BX.proxy(this.restorePosition,this));BX.onCustomEvent(this,"onMenuOpenerMoved")}};BX.CMenuOpener.prototype.restorePosition=function(){if(!this.MOUSEOVER&&!this.isMenuVisible()){if(this.originalPos)this.DIV.style.top=this.originalPos.top+"px";BX.removeCustomEvent(BX.proxy_context,"onMenuOpenerHide",BX.proxy(this.restorePosition,this));if(this.restore_pos_timeout)clearTimeout(this.restore_pos_timeout)}else{this.restore_pos_timeout=setTimeout(BX.proxy(this.restorePosition,this),this.timeout)}};BX.CMenuOpener.prototype.Show=function(){BX.CMenuOpener.superclass.Show.apply(this,arguments);this.SetDraggable(this.PARTS.INNER.firstChild);this.DIV.style.width="auto";this.DIV.style.height="auto";if(!this.PARAMS.pin){this.DIV.style.left="-1000px";this.DIV.style.top="-1000px";this.Hide()}else{this.bPosAdjusted=true;this.bMoved=true;if(this.PARAMS.top)this.DIV.style.top=this.PARAMS.top+"px";if(this.PARAMS.left)this.DIV.style.left=this.PARAMS.left+"px";this.DIV.style.display=!BX.admin.dynamic_mode||BX.admin.dynamic_mode_show_borders?"block":"none";if(this.DIV.style.display=="block"){setTimeout(BX.delegate((function(){BX.onCustomEvent(this,"onMenuOpenerUnhide")}),this),50)}}};BX.CMenuOpener.prototype.executeDefaultAction=function(){if(this.defaultAction){if(BX.type.isFunction(this.defaultAction))this.defaultAction();else if(BX.type.isString(this.defaultAction))BX.evalGlobal(this.defaultAction)}};BX.CMenuOpener.prototype.__onDynamicModeChange=function(t){this.DIV.style.display=t?"block":"none"};BX.CMenuOpener.prototype.__onPanelCollapse=function(t,e){this.DIV.style.top=parseInt(this.DIV.style.top)+e+"px";if(this.PARAMS.pin){this.__savePosition()}};BX.CMenuOpener.prototype.__onMoveFinished=function(){BX.onCustomEvent(this,"onMenuOpenerMoved");this.bMoved=true;if(this.PARAMS.pin)this.__savePosition()};BX.CMenuOpener.prototype.__savePosition=function(){var t={};t.pin=this.PARAMS.pin;if(!this.PARAMS.pin){t.top=false;t.left=false;t.transform=false}else{t.transform=this.PARAMS.transform;if(this.bMoved){t.left=parseInt(this.DIV.style.left);t.top=parseInt(this.DIV.style.top)}}BX.WindowManager.saveWindowOptions(this.PARAMS.component_id,t)};BX.CMenuOpener.prototype.__pin_btn_clicked=function(){this.Pin()};BX.CMenuOpener.prototype.Pin=function(t){if(null==t)this.PARAMS.pin=!this.PARAMS.pin;else this.PARAMS.pin=!!t;this.PARTS.ICON_PIN.className=this.PARAMS.pin?"bx-context-toolbar-pin-fixed":"bx-context-toolbar-pin";this.__savePosition()};BX.CMenuOpener.prototype.__trf_btn_clicked=function(){this.Transform()};BX.CMenuOpener.prototype.Transform=function(t){var e={};if(null==t)this.PARAMS.transform=!this.PARAMS.transform;else this.PARAMS.transform=!!t;if(this.bMoved){e=BX.pos(this.DIV)}if(this.PARAMS.transform)BX.addClass(this.DIV.firstChild,"bx-context-toolbar-vertical-mode");else BX.removeClass(this.DIV.firstChild,"bx-context-toolbar-vertical-mode");if(!this.bMoved){this.adjustPos()}else{this.DIV.style.left=e.right-this.DIV.offsetWidth-(BX.browser.IsIE()&&!BX.browser.IsDoctype()?2:0)+"px"}this.__savePosition()};BX.CMenuOpener.prototype.adjustToNodeGetPos=function(){var t=BX.pos(this.PARAMS.parent);var e=BX.GetWindowScrollSize();var i=this.DIV.offsetWidth;t.left-=BX.admin.__border_dx;t.top-=BX.admin.__border_dx;if(true||!this.PARAMS.transform){t.top-=45}if(t.left>e.scrollWidth-i){t.left=e.scrollWidth-i}return t};BX.CMenuOpener.prototype.addItem=function(t){if(t.TYPE){this.EXTRA_BUTTONS[t.TYPE]=t;return null}else{var e=new BX.CMenuOpenerItem(t);if(null==this.defaultAction){if(e.item.ONCLICK){this.defaultAction=t.ONCLICK}else if(e.item.MENU){this.defaultAction=BX.delegate((function(){this.Open()}),e.item.OPENER)}this.defaultActionTitle=t.TITLE||t.TEXT;BX.addClass(e.Get(),"bx-content-toolbar-default")}
22if(e.item.OPENER)this.OPENERS[this.OPENERS.length]=e.item.OPENER;return e.Get()}};BX.CMenuOpener.prototype.attachMenu=function(t){var e=new BX.COpener({DIV:this.OPENER,ATTACH:this.ATTACH,MENU:t,TYPE:"click"});this.OPENERS[this.OPENERS.length]=e;return e};BX.CMenuOpener.prototype.__hide_hint=function(){if(this.HINT)this.HINT.__hide_immediately()};BX.CMenuOpener.prototype.isMenuVisible=function(){for(var t=0,e=this.OPENERS.length;t<e;t++){if(this.OPENERS[t].isMenuVisible())return true}return false};BX.CMenuOpener.prototype.Hide=function(){if(!this.PARAMS.pin){this.DIV.style.display="none";BX.onCustomEvent(this,"onMenuOpenerHide")}};BX.CMenuOpener.prototype.UnHide=function(){this.DIV.style.display="block";if(!this.bPosAdjusted&&!this.PARAMS.pin){this.adjustPos();this.bPosAdjusted=true}if(null==this.originalPos&&!this.bMoved){this.originalPos=BX.pos(this.DIV)}BX.onCustomEvent(this,"onMenuOpenerUnhide")};BX.CMenuOpenerItem=function(t){this.item=t;if(this.item.ACTION&&!this.item.ONCLICK){this.item.ONCLICK=this.item.ACTION}this.DIV=BX.create("SPAN");this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button-underlay"}}));this.WRAPPER=this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button-wrapper"},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button",title:t.TITLE},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-inner"}})]})]}));var e=BX.create("SPAN",{props:{className:"bx-context-toolbar-button-icon"+(this.item.ICON||this.item.ICONCLASS?" "+(this.item.ICON||this.item.ICONCLASS):"")},attrs:!(this.item.ICON||this.item.ICONCLASS)&&(this.item.SRC||this.item.IMAGE)?{style:"background: scroll transparent url("+(this.item.SRC||this.item.IMAGE)+") no-repeat center center !important;"}:{}}),i=BX.create("SPAN",{props:{className:"bx-context-toolbar-button-text"},text:this.item.TEXT});if(this.item.ACTION&&!this.item.ONCLICK){this.item.ONCLICK=this.item.ACTION}this.bHasMenu=!!this.item.MENU;this.bHasAction=!!this.item.ONCLICK;if(this.bHasAction){this.LINK=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},events:{mouseover:this.bHasMenu?BX.proxy(this.__msover_text,this):BX.proxy(this.__msover,this),mouseout:this.bHasMenu?BX.proxy(this.__msout_text,this):BX.proxy(this.__msout,this),mousedown:this.bHasMenu?BX.proxy(this.__msdown_text,this):BX.proxy(this.__msdown,this)},children:[e,i]}));if(this.bHasMenu){this.LINK_MENU=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{props:{className:"bx-context-toolbar-button-arrow"},attrs:{href:"javascript: void(0)"},events:{mouseover:BX.proxy(this.__msover_arrow,this),mouseout:BX.proxy(this.__msout_arrow,this),mousedown:BX.proxy(this.__msdown_arrow,this)},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-arrow"}})]}))}}else if(this.bHasMenu){this.item.ONCLICK=null;this.LINK=this.LINK_MENU=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},events:{mouseover:BX.proxy(this.__msover,this),mouseout:BX.proxy(this.__msout,this),mousedown:BX.proxy(this.__msdown,this)},children:[e,i]}));this.LINK.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-single-button-arrow"}}))}if(this.bHasMenu){this.item.SUBMENU=new BX.CMenu({ATTACH_MODE:"bottom",ITEMS:this.item["MENU"],parent:this.LINK_MENU,parent_attach:this.WRAPPER.firstChild});this.item.OPENER=new BX.COpener({DIV:this.LINK_MENU,TYPE:"click",MENU:this.item.SUBMENU});BX.addCustomEvent(this.item.OPENER,"onOpenerMenuOpen",BX.proxy(this.__menu_open,this));BX.addCustomEvent(this.item.OPENER,"onOpenerMenuClose",BX.proxy(this.__menu_close,this))}if(this.bHasAction){BX.bind(this.LINK,"click",BX.delegate(this.__click,this))}};BX.CMenuOpenerItem.prototype.Get=function(){return this.DIV};BX.CMenuOpenerItem.prototype.__msover=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover")};BX.CMenuOpenerItem.prototype.__msout=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover bx-context-toolbar-button-active")};BX.CMenuOpenerItem.prototype.__msover_text=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-hover")};BX.CMenuOpenerItem.prototype.__msout_text=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-hover bx-context-toolbar-button-text-active")};BX.CMenuOpenerItem.prototype.__msover_arrow=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-hover")};BX.CMenuOpenerItem.prototype.__msout_arrow=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-hover bx-context-toolbar-button-arrow-active")};BX.CMenuOpenerItem.prototype.__msdown=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-active")};BX.CMenuOpenerItem.prototype.__msdown_text=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-active")};BX.CMenuOpenerItem.prototype.__msdown_arrow=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-active")};BX.CMenuOpenerItem.prototype.__menu_close=function(){this._menu_open=false;this.bx_active=false;BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-active bx-context-toolbar-button-text-active bx-context-toolbar-button-arrow-active");if(!this.bx_hover){BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover bx-context-toolbar-button-text-hover bx-context-toolbar-button-arrow-hover");this.bx_hover=false}};BX.CMenuOpenerItem.prototype.__menu_open=function(){this._menu_open=true};BX.CMenuOpenerItem.prototype.__click=function(){BX.evalGlobal(this.item.ONCLICK)};BX.CPageOpener=function(t){BX.CPageOpener.superclass.constructor.apply(this,arguments);this.timeout=505;window.PAGE_EDIT_CONTROL=this};BX.extend(BX.CPageOpener,BX.CMenuOpener);BX.CPageOpener.prototype.checkPosition=function(){if(this==BX.proxy_context)return;this.correctPosition(BX.proxy_context)};BX.CPageOpener.prototype.correctPosition=function(t){if(this.bPosCorrected)return;var e;if(this.DIV.style.display=="none"){e=this.adjustToNodeGetPos();e.bottom=e.top+30;e.right=e.left+300}else{e=BX.pos(this.DIV)}var i=BX.pos(t.Get());if(this.__check_intersection(e,i)){this.DIV.style.display="none";var s=BX.proxy(this.restorePosition,this);BX.removeCustomEvent(t,"onMenuOpenerHide",s);BX.addCustomEvent(t,"onMenuOpenerHide",s);this.bPosCorrected=true}};BX.CPageOpener.prototype.restorePosition=function(){if(BX.proxy_context&&BX.proxy_context.Get().style.display=="none"){this.bPosCorrected=false;if(this.PARAMS.parent.bx_over||this.PARAMS.pin)this.UnHide();BX.removeCustomEvent("onMenuOpenerHide",BX.proxy(this.restorePosition,this))}};BX.CPageOpener.prototype.UnHide=function(){if(!this.bPosCorrected)BX.CPageOpener.superclass.UnHide.apply(this,arguments)};BX.CPageOpener.prototype.Remove=function(){BX.admin.removeComponentBorder(this.PARAMS.parent);BX.userOptions.save("global","settings","page_edit_control_enable","N");this.DIV.style.display="none"};BX.CHintSimple=function(){BX.CHintSimple.superclass.constructor.apply(this,arguments)};BX.extend(BX.CHintSimple,BX.CHint);BX.CHintSimple.prototype.Init=function(){this.DIV=document.body.appendChild(BX.create("DIV",{props:{className:"bx-tooltip-simple"},style:{display:"none"},children:[this.CONTENT=BX.create("DIV")]}));BX.ZIndexManager.register(this.DIV);if(this.HINT_TITLE)this.CONTENT.appendChild(BX.create("B",{text:this.HINT_TITLE}));if(this.HINT)this.CONTENT_TEXT=this.CONTENT.appendChild(BX.create("DIV")).appendChild(BX.create("SPAN",{html:this.HINT}));if(this.PARAMS.preventHide){BX.bind(this.DIV,"mouseout",BX.proxy(this.Hide,this));BX.bind(this.DIV,"mouseover",BX.proxy(this.Show,this))}this.bInited=true};BX.adminInformer={itemsShow:3,Init:function(t){if(t)BX.adminInformer.itemsShow=t;var e=BX("admin-informer");if(e){document.body.appendChild(e);BX.ZIndexManager.register(e)}BX.addCustomEvent("onTopPanelCollapse",BX.proxy(BX.adminInformer.Close,BX.adminInformer))},Toggle:function(t){var e=BX("admin-informer");if(!e)return false;var i=BX.pos(t);e.style.top=parseInt(i.top)+parseInt(i.height)+7+"px";e.style.left=i.left+"px";if(!BX.hasClass(e,"adm-informer-active"))BX.adminInformer.Show(e);else BX.adminInformer.Hide(e);return false},Close:function(){BX.adminInformer.Hide(BX("admin-informer"))},OnInnerClick:function(t){var e=t.target||t.srcElement;if(e.nodeName.toLowerCase()!="a"||BX.hasClass(e,"adm-informer-footer")){return BX.PreventDefault(t)}return true},ToggleExtra:function(){var t=BX("adm-informer-footer");if(BX.hasClass(t,"adm-informer-footer-collapsed"))this.ShowAll();else this.HideExtra();return false},ShowAll:function(){var t=BX("admin-informer");for(var e=0;e<t.children.length;e++)if(BX.hasClass(t.children[e],"adm-informer-item")&&t.children[e].style.display=="none"){t.children[e].style.display="block"}var i=BX("adm-informer-footer");if(i.textContent!==undefined)i.textContent=BX.message("JSADM_AI_HIDE_EXTRA");else i.innerText=BX.message("JSADM_AI_HIDE_EXTRA");BX.removeClass(i,"adm-informer-footer-collapsed");return false},HideExtra:function(){var t=BX("admin-informer");var e=0;for(var i=BX.adminInformer.itemsShow+1;i<t.children.length;i++){if(BX.hasClass(t.children[i],"adm-informer-item")&&t.children[i].style.display=="block"){t.children[i].style.display="none";e++}}var s=BX("adm-informer-footer");var o=BX.message("JSADM_AI_ALL_NOTIF")+" ("+(BX.adminInformer.itemsShow+parseInt(e))+")";if(s.textContent!==undefined)s.textContent=o;else s.innerText=o;BX.addClass(s,"adm-informer-footer-collapsed");return false},Show:function(t){var e=BX("adm-header-notif-block");if(e)BX.addClass(e,"adm-header-notif-block-active");BX.onCustomEvent(t,"onBeforeAdminInformerShow");setTimeout(BX.proxy((function(){BX.bind(document,"click",BX.proxy(BX.adminInformer.Close,BX.adminInformer))}),BX.adminInformer),0);BX.addClass(t,"adm-informer-active");BX.ZIndexManager.bringToFront(t);setTimeout((function(){BX.addClass(t,"adm-informer-animate")}),0)},Hide:function(t){var e=BX("adm-header-notif-block");if(e)BX.removeClass(e,"adm-header-notif-block-active");BX.unbind(document,"click",BX.proxy(BX.adminInformer.Close,BX.adminInformer));BX.removeClass(t,"adm-informer-animate");if(this.IsAnimationSupported())setTimeout((function(){BX.removeClass(t,"adm-informer-active")}),300);else BX.removeClass(t,"adm-informer-active");BX.onCustomEvent(t,"onAdminInformerHide")},IsAnimationSupported:function(){var t=document.body||document.documentElement;
22if(typeof t.style.transition=="string")return true;else if(typeof t.style.MozTransition=="string")return true;else if(typeof t.style.OTransition=="string")return true;else if(typeof t.style.WebkitTransition=="string")return true;else if(typeof t.style.msTransition=="string")return true;return false},SetItemHtml:function(t,e){var i=BX("adm-informer-item-html-"+t);if(!i)return false;i.innerHTML=e;return true},SetItemFooter:function(t,e){var i=BX("adm-informer-item-footer-"+t);if(!i)return false;i.innerHTML=e;if(e)i.style.display="block";else i.style.display="none";return true}}})(window); 23/* End */ 24; 25; /* Start:"a:4:{s:4:"full";s:49:"/bitrix/js/main/core/core.min.js?1788847119181629";s:6:"source";s:28:"/bitrix/js/main/core/core.js";s:3:"min";s:32:"/bitrix/js/main/core/core.min.js";s:3:"map";s:32:"/bitrix/js/main/core/core.map.js";}"*/ 26(function(){if(typeof window.BX==="function"){return} 27/** 28 * Babel external helpers 29 * (c) 2018 Babel 30 * @license MIT 31 */(function(e){var t=e.babelHelpers={};function n(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){t.typeof=n=function(e){return typeof e}}else{t.typeof=n=function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return n(e)}t.typeof=n;var r;function i(e,t,n,i){if(!r){r=typeof Symbol==="function"&&Symbol.for&&Symbol.for("react.element")||60103}var s=e&&e.defaultProps;var o=arguments.length-3;if(!t&&o!==0){t={children:void 0}}if(t&&s){for(var a in s){if(t[a]===void 0){t[a]=s[a]}}}else if(!t){t=s||{}}if(o===1){t.children=i}else if(o>1){var l=new Array(o);for(var u=0;u<o;u++){l[u]=arguments[u+3]}t.children=l}return{$$typeof:r,type:e,key:n===undefined?null:""+n,ref:null,props:t,_owner:null}}t.jsx=i;function s(e){var t;if(typeof Symbol==="function"){if(Symbol.asyncIterator){t=e[Symbol.asyncIterator];if(t!=null)return t.call(e)}if(Symbol.iterator){t=e[Symbol.iterator];if(t!=null)return t.call(e)}}throw new TypeError("Object is not async iterable")}t.asyncIterator=s;function o(e){this.wrapped=e}t.AwaitValue=o;function a(e){var n,r;function i(e,t){return new Promise((function(i,o){var a={key:e,arg:t,resolve:i,reject:o,next:null};if(r){r=r.next=a}else{n=r=a;s(e,t)}}))}function s(n,r){try{var i=e[n](r);var a=i.value;var l=a instanceof t.AwaitValue;Promise.resolve(l?a.wrapped:a).then((function(e){if(l){s("next",e);return}o(i.done?"return":"normal",e)}),(function(e){s("throw",e)}))}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":n.resolve({value:t,done:true});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:false});break}n=n.next;if(n){s(n.key,n.arg)}else{r=null}}this._invoke=i;if(typeof e.return!=="function"){this.return=undefined}}if(typeof Symbol==="function"&&Symbol.asyncIterator){a.prototype[Symbol.asyncIterator]=function(){return this}}a.prototype.next=function(e){return this._invoke("next",e)};a.prototype.throw=function(e){return this._invoke("throw",e)};a.prototype.return=function(e){return this._invoke("return",e)};t.AsyncGenerator=a;function l(e){return function(){return new t.AsyncGenerator(e.apply(this,arguments))}}t.wrapAsyncGenerator=l;function u(e){return new t.AwaitValue(e)}t.awaitAsyncGenerator=u;function c(e,t){var n={},r=false;function i(n,i){r=true;i=new Promise((function(t){t(e[n](i))}));return{done:false,value:t(i)}}if(typeof Symbol==="function"&&Symbol.iterator){n[Symbol.iterator]=function(){return this}}n.next=function(e){if(r){r=false;return e}return i("next",e)};if(typeof e.throw==="function"){n.throw=function(e){if(r){r=false;throw e}return i("throw",e)}}if(typeof e.return==="function"){n.return=function(e){return i("return",e)}}return n}t.asyncGeneratorDelegate=c;function f(e,t,n,r,i,s,o){try{var a=e[s](o);var l=a.value}catch(e){n(e);return}if(a.done){t(l)}else{Promise.resolve(l).then(r,i)}}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function o(e){f(s,r,i,o,a,"next",e)}function a(e){f(s,r,i,o,a,"throw",e)}o(undefined)}))}}t.asyncToGenerator=d;function h(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}t.classCallCheck=h;function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}function m(e,t,n){if(t)p(e.prototype,t);
31if(n)p(e,n);return e}t.createClass=m;function g(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=true;if("value"in r)r.writable=true;Object.defineProperty(e,n,r)}if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(var s=0;s<i.length;s++){var o=i[s];var r=t[o];r.configurable=r.enumerable=true;if("value"in r)r.writable=true;Object.defineProperty(e,o,r)}}return e}t.defineEnumerableProperties=g;function y(e,t){var n=Object.getOwnPropertyNames(t);for(var r=0;r<n.length;r++){var i=n[r];var s=Object.getOwnPropertyDescriptor(t,i);if(s&&s.configurable&&e[i]===undefined){Object.defineProperty(e,i,s)}}return e}t.defaults=y;function b(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}t.defineProperty=b;function v(){t.extends=v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};return v.apply(this,arguments)}t.extends=v;function w(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};var i=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){i=i.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))}i.forEach((function(n){t.defineProperty(e,n,r[n])}))}return e}t.objectSpread=w;function x(e,n){if(typeof n!=="function"&&n!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:true,configurable:true}});if(n)t.setPrototypeOf(e,n)}t.inherits=x;function S(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}t.inheritsLoose=S;
31function B(e){t.getPrototypeOf=B=Object.setPrototypeOf?Object.getPrototypeOf:function e(t){return t.__proto__||Object.getPrototypeOf(t)};return B(e)}t.getPrototypeOf=B;function E(e,n){t.setPrototypeOf=E=Object.setPrototypeOf||function e(t,n){t.__proto__=n;return t};return E(e,n)}t.setPrototypeOf=E;function j(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function T(e,n,r){if(j()){t.construct=T=Reflect.construct}else{t.construct=T=function e(n,r,i){var s=[null];s.push.apply(s,r);var o=Function.bind.apply(n,s);var a=new o;if(i)t.setPrototypeOf(a,i.prototype);return a}}return T.apply(null,arguments)}t.construct=T;function X(e){return Function.toString.call(e).indexOf("[native code]")!==-1}t.isNativeFunction=X;function O(e){var n=typeof Map==="function"?new Map:undefined;t.wrapNativeSuper=O=function e(r){if(r===null||!t.isNativeFunction(r))return r;if(typeof r!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof n!=="undefined"){if(n.has(r))return n.get(r);n.set(r,i)}function i(){return t.construct(r,arguments,t.getPrototypeOf(this).constructor)}i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:false,writable:true,configurable:true}});return t.setPrototypeOf(i,r)};return O(e)}t.wrapNativeSuper=O;function N(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return t[Symbol.hasInstance](e)}else{return e instanceof t}}t.instanceof=N;function A(e){return e&&e.__esModule?e:{default:e}}t.interopRequireDefault=A;function _(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};if(r.get||r.set){Object.defineProperty(t,n,r)}else{t[n]=e[n]}}}}t.default=e;return t}}t.interopRequireWildcard=_;function P(e,t){if(e!==t){throw new TypeError("Cannot instantiate an arrow function")}}t.newArrowCheck=P;function L(e){if(e==null)throw new TypeError("Cannot destructure undefined")}t.objectDestructuringEmpty=L;function C(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var i,s;for(s=0;s<r.length;s++){i=r[s];if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}t.objectWithoutPropertiesLoose=C;function M(e,n){if(e==null)return{};var r=t.objectWithoutPropertiesLoose(e,n);var i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++){i=o[s];if(n.indexOf(i)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,i))continue;r[i]=e[i]}}return r}t.objectWithoutProperties=M;function I(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}t.assertThisInitialized=I;function k(e,n){if(n&&(typeof n==="object"||typeof n==="function")){return n}return t.assertThisInitialized(e)}t.possibleConstructorReturn=k;function D(e,n){while(!Object.prototype.hasOwnProperty.call(e,n)){e=t.getPrototypeOf(e);if(e===null)break}return e}t.superPropBase=D;function F(e,n,r){if(typeof Reflect!=="undefined"&&Reflect.get){t.get=F=Reflect.get}else{t.get=F=function e(n,r,i){var s=t.superPropBase(n,r);if(!s)return;var o=Object.getOwnPropertyDescriptor(s,r);if(o.get){return o.get.call(i)}return o.value}}return F(e,n,r||e)}t.get=F;function R(e,n,r,i){if(typeof Reflect!=="undefined"&&Reflect.set){R=Reflect.set}else{R=function e(n,r,i,s){var o=t.superPropBase(n,r);var a;if(o){a=Object.getOwnPropertyDescriptor(o,r);if(a.set){a.set.call(s,i);return true}else if(!a.writable){return false}}a=Object.getOwnPropertyDescriptor(s,r);if(a){if(!a.writable){return false}a.value=i;Object.defineProperty(s,r,a)}else{t.defineProperty(s,r,i)}return true}}return R(e,n,r,i)}function H(e,t,n,r,i){var s=R(e,t,n,r||e);if(!s&&i){throw new Error("failed to set property")}return n}t.set=H;function W(e,t){if(!t){t=e.slice(0)}return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}t.taggedTemplateLiteral=W;function z(e,t){if(!t){t=e.slice(0)}e.raw=t;return e}t.taggedTemplateLiteralLoose=z;function G(e,n){if(e===t.temporalUndefined){throw new ReferenceError(n+" is not defined - temporal dead zone")}else{return e}}t.temporalRef=G;function $(e){throw new Error('"'+e+'" is read-only')}t.readOnlyError=$;function U(e){throw new Error('Class "'+e+'" cannot be referenced in computed property keys.')}t.classNameTDZError=U;t.temporalUndefined={};
31function V(e,n){return t.arrayWithHoles(e)||t.iterableToArrayLimit(e,n)||t.nonIterableRest()}t.slicedToArray=V;function Y(e,n){return t.arrayWithHoles(e)||t.iterableToArrayLimitLoose(e,n)||t.nonIterableRest()}t.slicedToArrayLoose=Y;function q(e){return t.arrayWithHoles(e)||t.iterableToArray(e)||t.nonIterableRest()}t.toArray=q;function J(e){return t.arrayWithoutHoles(e)||t.iterableToArray(e)||t.nonIterableSpread()}t.toConsumableArray=J;function Z(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}t.arrayWithoutHoles=Z;function K(e){if(Array.isArray(e))return e}t.arrayWithHoles=K;function Q(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}t.iterableToArray=Q;function ee(e,t){var n=[];var r=true;var i=false;var s=undefined;try{for(var o=e[Symbol.iterator](),a;!(r=(a=o.next()).done);r=true){n.push(a.value);if(t&&n.length===t)break}}catch(e){i=true;s=e}finally{try{if(!r&&o["return"]!=null)o["return"]()}finally{if(i)throw s}}return n}t.iterableToArrayLimit=ee;function te(e,t){var n=[];for(var r=e[Symbol.iterator](),i;!(i=r.next()).done;){n.push(i.value);if(t&&n.length===t)break}return n}t.iterableToArrayLimitLoose=te;function ne(){throw new TypeError("Invalid attempt to spread non-iterable instance")}t.nonIterableSpread=ne;function re(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}t.nonIterableRest=re;function ie(e){return function(){var t=e.apply(this,arguments);t.next();return t}}t.skipFirstGeneratorNext=ie;function se(e){if(typeof e==="symbol"){return e}else{return String(e)}}t.toPropertyKey=se;function oe(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and set to use loose mode. "+"To use proposal-class-properties in spec mode with decorators, wait for "+"the next major version of decorators in stage 2.")}t.initializerWarningHelper=oe;function ae(e,t,n,r){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}t.initializerDefineProperty=ae;function le(e,t,n,r,i){var s={};Object["ke"+"ys"](r).forEach((function(e){s[e]=r[e]}));s.enumerable=!!s.enumerable;s.configurable=!!s.configurable;if("value"in s||s.initializer){s.writable=true}s=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),s);if(i&&s.initializer!==void 0){s.value=s.initializer?s.initializer.call(i):void 0;s.initializer=undefined}if(s.initializer===void 0){Object["define"+"Property"](e,t,s);s=null}return s}t.applyDecoratedDescriptor=le;var ue=0;function ce(e){return"__private_"+ue+++"_"+e}t.classPrivateFieldLooseKey=ce;function fe(e,t){if(!Object.prototype.hasOwnProperty.call(e,t)){throw new TypeError("attempted to use private field on non-instance")}return e}t.classPrivateFieldLooseBase=fe;function de(e,t){if(!t.has(e)){throw new TypeError("attempted to get private field on non-instance")}return t.get(e).value}t.classPrivateFieldGet=de;function he(e,t,n){if(!t.has(e)){throw new TypeError("attempted to set private field on non-instance")}var r=t.get(e);if(!r.writable){throw new TypeError("attempted to set read only private field")}r.value=n;return n}t.classPrivateFieldSet=he})(typeof global==="undefined"?window:global);!function(e){"use strict";var t=Object.prototype;var n=t.hasOwnProperty;var r;var i=typeof Symbol==="function"?Symbol:{};var s=i.iterator||"@@iterator";var o=i.asyncIterator||"@@asyncIterator";var a=i.toStringTag||"@@toStringTag";var l=e.regeneratorRuntime={};function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g;var s=Object.create(i.prototype);var o=new N(r||[]);s._invoke=j(e,n,o);return s}l.wrap=u;function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}var f="suspendedStart";var d="suspendedYield";var h="executing";var p="completed";var m={};function g(){}function y(){}function b(){}var v={};v[s]=function(){return this};var w=Object.getPrototypeOf;var x=w&&w(w(A([])));if(x&&x!==t&&n.call(x,s)){v=x}var S=b.prototype=g.prototype=Object.create(v);y.prototype=S.constructor=b;b.constructor=y;b[a]=y.displayName="GeneratorFunction";function B(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}l.isGeneratorFunction=function(e){var t=typeof e==="function"&&e.constructor;return t?t===y||(t.displayName||t.name)==="GeneratorFunction":false};l.mark=function(e){if(Object.setPrototypeOf){Object.setPrototypeOf(e,b)}else{e.__proto__=b;if(!(a in e)){e[a]="GeneratorFunction"}}e.prototype=Object.create(S);return e};l.awrap=function(e){return{__await:e}};function E(e){function t(r,i,s,o){var a=c(e[r],e,i);if(a.type==="throw"){o(a.arg)}else{var l=a.arg;var u=l.value;if(u&&typeof u==="object"&&n.call(u,"__await")){return Promise.resolve(u.__await).then((function(e){t("next",e,s,o)}),(function(e){t("throw",e,s,o)}))}return Promise.resolve(u).then((function(e){l.value=e;s(l)}),o)}}var r;function i(e,n){function i(){return new Promise((function(r,i){t(e,n,r,i)}))}return r=r?r.then(i,i):i()}this._invoke=i}B(E.prototype);E.prototype[o]=function(){return this};l.AsyncIterator=E;l.async=function(e,t,n,r){var i=new E(u(e,t,n,r));return l.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))};function j(e,t,n){var r=f;return function i(s,o){if(r===h){throw new Error("Generator is already running")}if(r===p){if(s==="throw"){throw o}return _()}n.method=s;n.arg=o;while(true){var a=n.delegate;if(a){var l=T(a,n);if(l){if(l===m)continue;return l}}if(n.method==="next"){n.sent=n._sent=n.arg}else if(n.method==="throw"){if(r===f){r=p;throw n.arg}n.dispatchException(n.arg)}else if(n.method==="return"){n.abrupt("return",n.arg)}r=h;var u=c(e,t,n);if(u.type==="normal"){r=n.done?p:d;if(u.arg===m){continue}return{value:u.arg,done:n.done}}else if(u.type==="throw"){r=p;n.method="throw";n.arg=u.arg}}}}function T(e,t){var n=e.iterator[t.method];if(n===r){t.delegate=null;if(t.method==="throw"){if(e.iterator.return){t.method="return";t.arg=r;T(e,t);if(t.method==="throw"){return m}}t.method="throw";t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(n,e.iterator,t.arg);
31if(i.type==="throw"){t.method="throw";t.arg=i.arg;t.delegate=null;return m}var s=i.arg;if(!s){t.method="throw";t.arg=new TypeError("iterator result is not an object");t.delegate=null;return m}if(s.done){t[e.resultName]=s.value;t.next=e.nextLoc;if(t.method!=="return"){t.method="next";t.arg=r}}else{return s}t.delegate=null;return m}B(S);S[a]="Generator";S[s]=function(){return this};S.toString=function(){return"[object Generator]"};function X(e){var t={tryLoc:e[0]};if(1 in e){t.catchLoc=e[1]}if(2 in e){t.finallyLoc=e[2];t.afterLoc=e[3]}this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal";delete t.arg;e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}];e.forEach(X,this);this.reset(true)}l.keys=function(e){var t=[];for(var n in e){t.push(n)}t.reverse();return function n(){while(t.length){var r=t.pop();if(r in e){n.value=r;n.done=false;return n}}n.done=true;return n}};function A(e){if(e){var t=e[s];if(t){return t.call(e)}if(typeof e.next==="function"){return e}if(!isNaN(e.length)){var i=-1,o=function t(){while(++i<e.length){if(n.call(e,i)){t.value=e[i];t.done=false;return t}}t.value=r;t.done=true;return t};return o.next=o}}return{next:_}}l.values=A;function _(){return{value:r,done:true}}N.prototype={constructor:N,reset:function(e){this.prev=0;this.next=0;this.sent=this._sent=r;this.done=false;this.delegate=null;this.method="next";this.arg=r;this.tryEntries.forEach(O);if(!e){for(var t in this){if(t.charAt(0)==="t"&&n.call(this,t)&&!isNaN(+t.slice(1))){this[t]=r}}}},stop:function(){this.done=true;var e=this.tryEntries[0];var t=e.completion;if(t.type==="throw"){throw t.arg}return this.rval},dispatchException:function(e){if(this.done){throw e}var t=this;function i(n,i){a.type="throw";a.arg=e;t.next=n;if(i){t.method="next";t.arg=r}return!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s];var a=o.completion;if(o.tryLoc==="root"){return i("end")}if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc");var u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc){return i(o.catchLoc,true)}else if(this.prev<o.finallyLoc){return i(o.finallyLoc)}}else if(l){if(this.prev<o.catchLoc){return i(o.catchLoc,true)}}else if(u){if(this.prev<o.finallyLoc){return i(o.finallyLoc)}}else{throw new Error("try statement without catch or finally")}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}if(s&&(e==="break"||e==="continue")&&s.tryLoc<=t&&t<=s.finallyLoc){s=null}var o=s?s.completion:{};o.type=e;o.arg=t;if(s){this.method="next";this.next=s.finallyLoc;return m}return this.complete(o)},complete:function(e,t){if(e.type==="throw"){throw e.arg}if(e.type==="break"||e.type==="continue"){this.next=e.arg}else if(e.type==="return"){this.rval=this.arg=e.arg;this.method="return";this.next="end"}else if(e.type==="normal"&&t){this.next=t}return m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e){this.complete(n.completion,n.afterLoc);O(n);return m}}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type==="throw"){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){this.delegate={iterator:A(e),resultName:t,nextLoc:n};if(this.method==="next"){this.arg=r}return m}}}(function(){return this}()||Function("return this")());if(window._main_polyfill_core){console.warn("main.polyfill.core is loaded more than once on this page")}window._main_polyfill_core=true;(function(e){"use strict";const t=window.BX;window.BX=function(e){if(window.BX.type.isNotEmptyString(e)){return document.getElementById(e)}if(window.BX.type.isDomNode(e)){return e}if(window.BX.type.isFunction(e)){return window.BX.ready(e)}return null};if(t){Object.keys(t).forEach((e=>{window.BX[e]=t[e]}))}e=window.BX;function n(e){return Object.prototype.toString.call(e)}const r=Function.prototype.toString.call(Object);class i{static isString(e){return typeof e==="string"}static isStringFilled(e){return i.isString(e)&&e!==""}static isFunction(e){return typeof e==="function"}static isObject(e){return Boolean(e)&&(typeof e==="object"||typeof e==="function")}static isObjectLike(e){return Boolean(e)&&typeof e==="object"}static isPlainObject(e){if(!i.isObjectLike(e)||n(e)!=="[object Object]"){return false}const t=Object.getPrototypeOf(e);if(t===null){return true}const s=t.hasOwnProperty("constructor")&&t.constructor;return typeof s==="function"&&Function.prototype.toString.call(s)===r}static isBoolean(e){return e===true||e===false}static isNumber(e){return!Number.isNaN(e)&&typeof e==="number"}static isInteger(e){return i.isNumber(e)&&e%1===0}static isFloat(e){return i.isNumber(e)&&!i.isInteger(e)}static isNil(e){return e===null||e===undefined}static isArray(e){return!i.isNil(e)&&Array.isArray(e)}static isArrayFilled(e){return i.isArray(e)&&e.length>0}static isArrayLike(e){if(i.isNil(e)||i.isFunction(e)||!("length"in e)){return false}const{length:t}=e;return i.isNumber(t)&&t>-1&&t<=Number.MAX_SAFE_INTEGER}static isDate(e){return i.isObjectLike(e)&&n(e)==="[object Date]"}static isDomNode(e){return i.isObjectLike(e)&&!i.isPlainObject(e)&&"nodeType"in e}static isElementNode(e){return i.isDomNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isEventTargetLike(e){return i.isObjectLike(e)&&i.isFunction(e.addEventListener)&&i.isFunction(e.removeEventListener)&&i.isFunction(e.dispatchEvent)}static isTextNode(e){return i.isDomNode(e)&&e.nodeType===Node.TEXT_NODE}static isMap(e){return i.isObjectLike(e)&&n(e)==="[object Map]"}static isSet(e){return i.isObjectLike(e)&&n(e)==="[object Set]"}static isWeakMap(e){return i.isObjectLike(e)&&n(e)==="[object WeakMap]"}static isWeakSet(e){return i.isObjectLike(e)&&n(e)==="[object WeakSet]"}static isPrototype(e){if(!i.isObjectLike(e)){return false}const t=e.constructor;const n=i.isFunction(t)?t.prototype:Object.prototype;return n===e}static isRegExp(e){return i.isObjectLike(e)&&n(e)==="[object RegExp]"}static isNull(e){return e===null}static isUndefined(e){return typeof e==="undefined"}static isArrayBuffer(e){return i.isObjectLike(e)&&n(e)==="[object ArrayBuffer]"}static isTypedArray(e){const t=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)]$/;return i.isObjectLike(e)&&t.test(n(e))}static isBlob(e){return i.isObjectLike(e)&&i.isNumber(e.size)&&i.isString(e.type)&&i.isFunction(e.slice)}static isFile(e){if(!i.isBlob(e)||!("name"in e)||!i.isString(e.name)){return false}if("lastModified"in e&&i.isNumber(e.lastModified)){return true}return"lastModifiedDate"in e&&i.isObjectLike(e.lastModifiedDate)}static isFormData(e){return e instanceof FormData}static isJsonValue(e){return i.isPlainObject(e)||i.isString(e)||i.isNumber(e)||i.isBoolean(e)||i.isNull(e)||i.isArray(e)}}class s{static getClass(e){if(i.isString(e)&&Boolean(e)){let t=null;let n=window;const r=e.split(".");for(const e of r){if(!n[e]){return null}n=n[e];t=n}return t}if(i.isFunction(e)){return e}return null}static namespace(e){let t=e.split(".");let n=window.BX;if(t[0]==="BX"){t=t.slice(1)}for(const e of t){if(i.isUndefined(n[e])){n[e]={}}n=n[e]}return n}}const o=/["&'<>]/g;const a=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;const l={"&":"&","<":"<",">":">","'":"'",'"':"""};const u={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};class c{static encode(e){if(i.isString(e)){return e.replaceAll(o,(e=>l[e]))}return e}static decode(e){if(i.isString(e)){return e.replaceAll(a,(e=>u[e]))}return e}static getRandom(e=8){return Array.from({length:e},(()=>Math.trunc(Math.random()*36).toString(36))).join("")}static toNumber(e){const t=Number.parseFloat(String(e));if(i.isNumber(t)){return t}return 0}static toInteger(e){return c.toNumber(Number.parseInt(String(e),10))}static toBoolean(e,t=[]){const n=i.isString(e)?e.toLowerCase():e;const r=["true","y","1",1,true,...t];return r.includes(n)}static toCamelCase(e){if(!i.isStringFilled(e)){return e}const t=/[\s_-]+(.)?/g;if(!t.test(e)){return/^[A-Z]+$/.test(e)?e.toLowerCase():e[0].toLowerCase()+e.slice(1)}const n=e.toLowerCase().replaceAll(t,((e,t)=>
31t?t.toUpperCase():""));return n[0].toLowerCase()+n.slice(1)}static toPascalCase(e){if(!i.isStringFilled(e)){return e}return this.capitalize(this.toCamelCase(e))}static toKebabCase(e){if(!i.isStringFilled(e)){return e}const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+\d*|\b)|[A-Z]?[a-z]+\d*|[A-Z]|\d+/g);if(!t){return e}return t.map((e=>e.toLowerCase())).join("-")}static capitalize(e){if(!i.isStringFilled(e)){return e}return e[0].toUpperCase()+e.slice(1)}}const f={mousewheel:["DOMMouseScroll"],bxchange:["change","cut","paste","drop","keyup"],animationend:["animationend","oAnimationEnd","webkitAnimationEnd","MSAnimationEnd"],transitionend:["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"],fullscreenchange:["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],fullscreenerror:["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"]};class d{registry=new WeakMap;set(e,t,n){if(!i.isEventTargetLike(e)){return}const r=this.get(e);if(!i.isSet(r[t])){r[t]=new Set}r[t].add(n);this.registry.set(e,r)}get(e){return this.registry.get(e)||{}}has(e,t,n){if(t&&n){const r=this.registry.get(e);return this.registry.has(e)&&Boolean(r&&r[t]?.has(n))}return this.registry.has(e)}delete(e,t,n){if(!i.isEventTargetLike(e)){return}if(i.isString(t)&&i.isFunction(n)){const r=this.registry.get(e);if(i.isPlainObject(r)&&i.isSet(r[t])){r[t].delete(n)}return}if(i.isString(t)){const n=this.registry.get(e);if(i.isPlainObject(n)&&i.isSet(n[t])){n[t]=new Set}return}this.registry.delete(e)}}var h=new d;function p(e){let t=false;try{const n=Object.defineProperty({},e,{get(){t=true}});window.addEventListener("test",null,n)}catch{}return t}function m(e){if(!i.isPlainObject(e)){return e}return Object.keys(e).reduce(((t,n)=>{if(p(n)){t[n]=e[n]}return t}),{})}function g(e,t,n,r){if(!i.isEventTargetLike(e)||n===null){return}const s=m(r);if(t in f){f[t].forEach((r=>{e.addEventListener(r,n,s);h.set(e,t,n)}));return}e.addEventListener(t,n,s);h.set(e,t,n)}function y(e,t,n,r){if(!i.isEventTargetLike(e)||n===null){return}const s=m(r);if(t in f){f[t].forEach((t=>{e.removeEventListener(t,n,s);h.delete(e,t,n)}));return}e.removeEventListener(t,n,s);h.delete(e,t,n)}function b(e,t){const n=h.get(e);Object.keys(n).forEach((r=>{n[r].forEach((n=>{if(!i.isString(t)||t===r){y(e,r,n)}}))}))}function v(e,t,n,r){if(n===null){return}const s=function s(o){y(e,t,s,r);if(i.isFunction(n)){n(o)}else if(i.isObject(n)&&i.isFunction(n.handleEvent)){n.handleEvent(o)}};g(e,t,s,r)}let w=true;function x(){w=true}function S(){w=false}function B(){return w}function E(...e){if(!B()||!i.isObject(window.console)){return}let t=5;if(typeof e[e.length-1]==="number"){t=e.pop()}if(i.isFunction(window.console.log)){window.console.log("BX.debug:",...e);if(e[0]instanceof Error&&e[0].stack){const n=e[0].stack.split("\n").slice(0,t).join("\n");window.console.log(`BX.debug error stack trace:\n${n}`)}}const n=new Error("debug").stack;if(n&&i.isFunction(window.console.log)){const e=n.split("\n").slice(1,t+1).join("\n");window.console.log(`BX.debug trace:\n${e}`)}}var j=Object.freeze({__proto__:null,get debugState(){return w},default:E,disableDebug:S,enableDebug:x,isDebugEnabled:B});const T=new Map;const X="main.bitrix.main.controller.loadext.getextensions";function O(e){return new Promise(((t,n)=>{const r={e:(e?.extension||[]).join(",")};BX.ajax.runAction(X,{data:e,getParameters:r}).then((e=>{t(e?.data)})).catch((e=>{n(e)}))}))}function N(e,t){if(t.isInternal){e.push(t.JS)}return e}function A(e,t){if(!t.isInternal){e.push(t.JS)}return e}function _(e,t){if(i.isString(t)&&t!==""){e.push(t)}return e}function P(e){if(i.isStringFilled(e)){const t=e.match(/<script type="extension\/settings" \b[^>]*>([\S\s]*?)<\/script>/g);if(i.isArrayFilled(t)){return t.map((e=>{const[,t]=e.match(/data-extension="(.[\d._a-z-]+)"/);return{extension:t,script:e}}))}}return[]}function L(e){const t=i.isArray(e)?e:[e];if(t.length===0){return Promise.resolve()}return new Promise(((e,n)=>{BX.load(t,e,document,n)}))}function C(e){const t=window.BX.processHTML(e);const n=[];const r=[];t.SCRIPT.reduce(((e,t)=>
31N(e,t)),[]).forEach((e=>{if(e.startsWith("BX.Runtime.registerExtension")){r.push(e)}else{n.push(e)}}));return{inlinePreScripts:n,inlineAfterScripts:r,externalScripts:t.SCRIPT.reduce(((e,t)=>A(e,t)),[]),externalStyles:t.STYLE.reduce(((e,t)=>_(e,t)),[]),settingsScripts:P(t.HTML)}}function M(){return new Promise((e=>{de.bindOnce(window,"online",(()=>e()))}))}const I=[1e3,3e3,5e3];async function k(e,t){for(let n=0;n<=I.length;n++){try{return await t()}catch{if(navigator.onLine===false){console.warn(`Wait online for load ${e.join(", ")}`);await M();n--;continue}if(n===I.length){throw new Error(`${e.join(", ")} loading failed...`)}const t=I[n];const r=n+1;console.warn(`Retry load #${r}: ${e.join(", ")}`);await new Promise((e=>{setTimeout(e,t)}))}}throw new Error("Unexpected end of retry loop")}async function D(e){const t=[...e.keys()];const n=await k(t,(()=>O({extension:t})))??[];n.forEach((n=>{const r=n.html??"";const i=C(r);i.settingsScripts.forEach((({script:e})=>{document.body.insertAdjacentHTML("beforeend",e)}));i.inlinePreScripts.forEach((e=>{window.BX.evalGlobal(e)}));const s=e.get(n.extension);void Promise.all([k(t,(()=>L(i.externalScripts))),k(t,(()=>L(i.externalStyles)))]).then((()=>{i.inlineAfterScripts.forEach((e=>{window.BX.evalGlobal(e)}));const e=n?.config?.namespace??"window";s.resolve(e)})).catch((e=>{s.reject(e)}))}))}const F=new Map;let R=null;async function H(...e){if(i.isNumber(R)){clearTimeout(R)}const t=e.flat();const n=t.filter((e=>!T.has(e)));n.forEach((e=>{let t=null;let n=null;const r={promise:new Promise(((e,r)=>{t=e;n=r})),resolve:t,reject:n};T.set(e,r.promise);F.set(e,r)}));R=setTimeout((()=>{if(F.size>0){void D(new Map(F.entries()));F.clear()}}));const r=await Promise.all(t.map((e=>T.get(e))));return r.reduce(((e,t)=>({...e,...s.getClass(t)})),{})}const W=new Set(["[object Object]","[object Array]","[object RegExp]","[object Arguments]","[object Date]","[object Error]","[object Map]","[object Set]","[object ArrayBuffer]","[object DataView]","[object Float32Array]","[object Float64Array]","[object Int8Array]","[object Int16Array]","[object Int32Array]","[object Uint8Array]","[object Uint16Array]","[object Uint32Array]","[object Uint8ClampedArray]"]);function z(e){const t=i.isObjectLike(e)&&W.has(n(e));return t||i.isDomNode(e)}function G(e,t){if(t.has(e)){return t.get(e)}if(z(e)){if(i.isArray(e)){const n=[...e];t.set(e,n);e.forEach(((e,r)=>{n[r]=G(e,t)}));return t.get(e)}if(i.isDomNode(e)){return e.cloneNode(true)}if(i.isMap(e)){const n=new Map;t.set(e,n);e.forEach(((e,r)=>{n.set(G(r,t),G(e,t))}));return n}if(i.isSet(e)){const n=new Set;t.set(e,n);e.forEach((e=>{n.add(G(e,t))}));return n}if(i.isDate(e)){return new Date(e)}if(i.isRegExp(e)){const t=/\w*$/;const n=t.exec(e);let r=new RegExp(e.source);if(n&&i.isArray(n)){r=new RegExp(e.source,n[0])}r.lastIndex=e.lastIndex;return r}const n=Object.getPrototypeOf(e);const r=Object.assign(Object.create(n),e);t.set(e,r);Object.keys(e).forEach((n=>{r[n]=G(e[n],t)}));return r}return e}function $(e){return G(e,new WeakMap)}function U(e,t){return Object.entries(t).reduce(((e,[t,n])=>{if(!i.isDomNode(e[t])&&i.isObjectLike(e[t])&&i.isObjectLike(n)){e[t]=U(e[t],n);return e}e[t]=n;return e}),e)}function V(e,t=[]){return(n,r)=>{const s=e[0];const o=t[0]||"asc";if(i.isUndefined(s)){return 0}let a=n[s];let l=r[s];if(i.isString(a)&&i.isString(l)){a=a.toLowerCase();l=l.toLowerCase()}if(a<l){return o==="asc"?-1:1}if(a>l){return o==="asc"?1:-1}return V(e.slice(1),t.slice(1))(n,r)}}function Y(e){if(!T.has(e.name)){const t=e?.namespace??"window";T.set(e.name,Promise.resolve(t))}}class q{static debug=E;static loadExtension=H;static registerExtension=Y;static clone=$;static debounce(e,t=0,n=null){let r=null;return function s(...o){if(i.isNumber(r)){clearTimeout(r)}r=setTimeout((()=>{e.apply(n||this,o)}),t)}}static throttle(e,t=0,n=null){let r=null;let i=false;return function s(...o){i=true;if(!r){const s=function s(){if(i){e.apply(n||this,o);i=false;r=setTimeout(s,t)}else{r=null}};s()}}}static html(e,t,n={}){if(i.isNil(t)&&i.isDomNode(e)){return e.innerHTML}const r=BX.processHTML(t);const s=r.STYLE.reduce(((e,t)=>_(e,t)),[]);const o=r.SCRIPT.reduce(((e,t)=>A(e,t)),[]);const a=r.SCRIPT.reduce(((e,t)=>N(e,t)),[]);if(i.isDomNode(e)&&(n.htmlFirst||o.length===0&&s.length===0)){if(n.useAdjacentHTML){e.insertAdjacentHTML("beforeend",r.HTML)}else{e.innerHTML=r.HTML}}return Promise.all([L(o),L(s)]).then((()=>
31{if(i.isDomNode(e)&&(o.length>0||s.length>0)){if(n.useAdjacentHTML){e.insertAdjacentHTML("beforeend",r.HTML)}else{e.innerHTML=r.HTML}}a.forEach((e=>BX.evalGlobal(e)));if(i.isFunction(n.callback)){n.callback()}}))}static merge(...e){if(i.isArray(e[0])){e.unshift([])}else if(i.isObject(e[0])){e.unshift({})}return e.reduce(((e,t)=>U(e,t)),e[0])}static orderBy(e,t=[],n=[]){const r=V(t,n);return Object.values(e).sort(r)}static destroy(e,t="Object is destroyed"){if(i.isObject(e)){const n=()=>{throw new Error(t)};const r=Object.keys(e);const s=(()=>{const t=Object.getPrototypeOf(e);if(i.isObject(t)){return Object.getOwnPropertyNames(t)}return[]})();const o=[...new Set([...r,...s])];o.filter((t=>{const n=Object.getOwnPropertyDescriptor(e,t);return!/__(.+)__/.test(t)&&(!i.isObject(n)||n.configurable===true)})).forEach((t=>{Object.defineProperty(e,t,{get:n,set:n,configurable:false})}));Object.setPrototypeOf(e,null)}}}const J=Symbol.for("BX.BaseError.isError");class Z{[J];message;code;customData;constructor(e,t,n){this[J]=true;this.message="";this.code=null;this.customData=null;this.setMessage(e);this.setCode(t);this.setCustomData(n)}getMessage(){return this.message}setMessage(e){if(i.isString(e)){this.message=e}return this}getCode(){return this.code}setCode(e){if(i.isStringFilled(e)||e===null){this.code=e}return this}getCustomData(){return this.customData}setCustomData(e){if(!i.isUndefined(e)){this.customData=e}return this}toString(){const e=this.getCode();const t=this.getMessage();if(!i.isStringFilled(e)&&!i.isStringFilled(t)){return""}if(!i.isStringFilled(e)){return`Error: ${t}`}if(!i.isStringFilled(t)){return e}return`${e}: ${t}`}static isError(e){return i.isObject(e)&&e[J]===true}}let K=function(){function e(t={data:{}}){babelHelpers.classCallCheck(this,e);babelHelpers.defineProperty(this,"type","");babelHelpers.defineProperty(this,"data",null);babelHelpers.defineProperty(this,"target",null);babelHelpers.defineProperty(this,"compatData",null);babelHelpers.defineProperty(this,"defaultPrevented",false);babelHelpers.defineProperty(this,"immediatePropagationStopped",false);babelHelpers.defineProperty(this,"errors",[]);this.setData(t.data);this.setCompatData(t.compatData)}return babelHelpers.createClass(e,[{key:"getType",value:function e(){return this.type}},{key:"setType",value:function e(t){if(i.isStringFilled(t)){this.type=t}return this}},{key:"getData",value:function e(){return this.data}},{key:"setData",value:function e(t){if(!i.isUndefined(t)){this.data=t}return this}},{key:"getCompatData",value:function e(){return this.compatData}},{key:"setCompatData",value:function e(t){if(i.isArrayLike(t)){this.compatData=t}return this}},{key:"setTarget",value:function e(t){this.target=t;return this}},{key:"getTarget",value:function e(){return this.target}},{key:"getErrors",value:function e(){return this.errors}},{key:"setError",value:function e(t){if(Z.isError(t)){this.errors.push(t)}}},{key:"preventDefault",value:function e(){this.defaultPrevented=true}},{key:"isDefaultPrevented",value:function e(){return this.defaultPrevented}},{key:"stopImmediatePropagation",value:function e(){this.immediatePropagationStopped=true}},{key:"isImmediatePropagationStopped",value:function e(){return this.immediatePropagationStopped}}],[{key:"create",value:function e(t){return new this(t)}}])}();class Q{defaultMaxListeners;eventStore=new WeakMap;constructor(e={}){this.defaultMaxListeners=i.isNumber(e.defaultMaxListeners)?e.defaultMaxListeners:10}add(e,t={}){const n=this.getRecordScheme();if(i.isNumber(t.maxListeners)){n.maxListeners=t.maxListeners}this.eventStore.set(e,n);return n}get(e){return this.eventStore.get(e)}getOrAdd(e,t={}){return this.get(e)||this.add(e,t)}delete(e){this.eventStore.delete(e)}getRecordScheme(){return{eventsMap:new Map,onceMap:new Map,maxListeners:this.getDefaultMaxListeners(),eventsMaxListeners:new Map}}getDefaultMaxListeners(){return this.defaultMaxListeners}}class ee{warnings=new Map;printDelayed;constructor(){this.printDelayed=q.debounce(this.print.bind(this),500)}add(e,t,n){let r=this.warnings.get(e);if(!r){r=Object.create(null);this.warnings.set(e,r)}if(!r[t]){r[t]={}}r[t].size=n.size;if(!i.isArray(r[t].errors)){r[t].errors=[]}r[t].errors.push(new Error("EventEmitter warning"))}
31print(){this.warnings.forEach((e=>{for(const t of Object.keys(e)){console.groupCollapsed("Possible BX.Event.EventEmitter memory leak detected. "+`${e[t].size} "${t}" listeners added. `+"Use emitter.setMaxListeners() to increase limit.");console.dir(e[t].errors);console.groupEnd()}}));this.clear()}clear(){this.warnings.clear()}}const te=new Q({defaultMaxListeners:10});const ne=new ee;const re=new Map;const ie={GLOBAL_TARGET:"GLOBAL_TARGET"};te.add(ie,{maxListeners:25});const se=Symbol.for("BX.Event.EventEmitter.isEmitter");const oe=Symbol("namespaceProperty");const ae=Symbol("targetProperty");let le=function(){function e(...t){babelHelpers.classCallCheck(this,e);this[ae]=null;this[oe]=null;this[se]=true;let n=this;if(Object.getPrototypeOf(this)===e.prototype&&t.length>0){if(!i.isObject(t[0])){throw new TypeError('The "target" argument must be an object.')}n=t[0];this.setEventNamespace(t[1])}this[ae]=n}return babelHelpers.createClass(e,[{key:"setEventNamespace",value:function e(t){if(i.isStringFilled(t)){this[oe]=t}}},{key:"getEventNamespace",value:function e(){return this[oe]}},{key:"subscribe",value:function t(n,r){e.subscribe(this,n,r);return this}},{key:"subscribeFromOptions",value:function t(n,r,s){if(i.isArrayFilled(n)){n.forEach((e=>{this.subscribeFromOptions(e)}));return}if(!i.isPlainObject(n)){return}const o=i.isPlainObject(r)?e.normalizeAliases(r):{};const a=n;Object.keys(a).forEach((t=>{const n=e.normalizeListener(a[t]);t=e.normalizeEventName(t);if(o[t]){const{eventName:r}=o[t];e.subscribe(this,r,n,{compatMode:s!==false})}else{e.subscribe(this,t,n,{compatMode:s===true})}}))}},{key:"subscribeOnce",value:function t(n,r){e.subscribeOnce(this,n,r);return this}},{key:"unsubscribe",value:function t(n,r){e.unsubscribe(this,n,r);return this}},{key:"unsubscribeAll",value:function t(n){e.unsubscribeAll(this,n)}},{key:"emit",value:function t(n,r){if(this.getEventNamespace()===null){console.warn("The instance of BX.Event.EventEmitter is supposed to have an event namespace. "+"Use emitter.setEventNamespace() to make events more unique.")}e.emit(this,n,r);return this}},{key:"emitAsync",value:function t(n,r){if(this.getEventNamespace()===null){console.warn("The instance of BX.Event.EventEmitter is supposed to have an event namespace. "+"Use emitter.setEventNamespace() to make events more unique.")}return e.emitAsync(this,n,r)}},{key:"setMaxListeners",value:function t(...n){e.setMaxListeners(this,...n);return this}},{key:"getMaxListeners",value:function t(n){return e.getMaxListeners(this,n)}},{key:"incrementMaxListeners",value:function t(...n){return e.incrementMaxListeners(this,...n)}},{key:"decrementMaxListeners",value:function t(...n){return e.decrementMaxListeners(this,...n)}},{key:"getListeners",value:function t(n){return e.getListeners(this,n)}},{key:"getFullEventName",value:function t(n){if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}return e.makeFullEventName(this.getEventNamespace(),n)}}],[{key:"makeObservable",value:function t(n,r){if(!i.isObject(n)){throw new TypeError('The "target" argument must be an object.')}if(!i.isStringFilled(r)){throw new TypeError('The "namespace" must be an non-empty string.')}if(e.isEventEmitter(n)){throw new TypeError('The "target" is an event emitter already.')}const s=Object.getPrototypeOf(n);const o=new e;o.setEventNamespace(r);Object.setPrototypeOf(o,s);Object.setPrototypeOf(n,o);Object.getOwnPropertyNames(e.prototype).forEach((t=>{if(["constructor"].includes(t)){return}o[t]=function(...r){return e.prototype[t].apply(n,r)}}))}},{key:"subscribe",value:function e(t,n,r,s){if(i.isString(t)){s=r;r=n;n=t;t=this.GLOBAL_TARGET}if(!i.isObject(t)){throw new TypeError('The "target" argument must be an object.')}n=this.normalizeEventName(n);if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}r=this.normalizeListener(r);s=i.isPlainObject(s)?s:{};const o=this.resolveEventName(n,t,s.useGlobalNaming===true);const{eventsMap:a,onceMap:l}=te.getOrAdd(t);const u=l.get(o);let c=a.get(o);if(c&&c.has(r)||u&&u.has(r)){console.error(`You cannot subscribe the same "${o}" event listener twice.`)}else if(c){c.set(r,{listener:r,options:s,sort:this.getNextSequenceValue()})}else{c=new Map([[r,{listener:r,options:s,sort:this.getNextSequenceValue()}]]);a.set(o,c)}const f=this.getMaxListeners(t,n);if(c.size>f){ne.add(t,o,c);ne.printDelayed()}}},{key:"subscribeOnce",value:function e(t,n,r){if(i.isString(t)){r=n;n=t;t=this.GLOBAL_TARGET}if(!i.isObject(t)){throw new TypeError('The "target" argument must be an object.')}n=this.normalizeEventName(n);if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}r=this.normalizeListener(r);const s=this.resolveEventName(n,t);const{eventsMap:o,onceMap:a}=te.getOrAdd(t);const l=o.get(s);let u=a.get(s);if(l&&l.has(r)||u&&u.has(r)){console.error(`You cannot subscribe the same "${s}" event listener twice.`)}else{const e=(...i)=>{this.unsubscribe(t,n,e);u.delete(r);r(...i)};if(u){u.set(r,e)}else{u=new Map([[r,e]]);a.set(s,u)}this.subscribe(t,n,e)}}},{key:"unsubscribe",value:function e(t,n,r,s){if(i.isString(t)){r=n;n=t;t=this.GLOBAL_TARGET}n=this.normalizeEventName(n);if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}r=this.normalizeListener(r);s=i.isPlainObject(s)?s:{};const o=this.resolveEventName(n,t,s.useGlobalNaming===true);const a=te.get(t);const l=a&&a.eventsMap.get(o);const u=a&&a.onceMap.get(o);if(l){l.delete(r)}if(u){const e=u.get(r);if(e){u.delete(r);l.delete(e)}}}},{key:"unsubscribeAll",value:function e(t,n,r){if(i.isString(t)){n=t;t=this.GLOBAL_TARGET}if(i.isStringFilled(n)){const e=te.get(t);if(e){r=i.isPlainObject(r)?r:{};const s=this.resolveEventName(n,t,r.useGlobalNaming===true);e.eventsMap.delete(s);e.onceMap.delete(s)}}else if(i.isNil(n)){if(t===this.GLOBAL_TARGET){console.error("You cannot unsubscribe all global listeners.")}else{te.delete(t)}}}},{key:"emit",value:function e(t,n,r,s){if(i.isString(t)){s=r;r=n;n=t;t=this.GLOBAL_TARGET}if(!i.isObject(t)){throw new TypeError('The "target" argument must be an object.')}n=this.normalizeEventName(n);if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}s=i.isPlainObject(s)?s:{};const o=this.resolveEventName(n,t,s.useGlobalNaming===true);const a=te.get(this.GLOBAL_TARGET);const l=a&&a.eventsMap.get(o)||new Map;let u=new Set;if(t!==this.GLOBAL_TARGET){const e=te.get(t);u=e&&e.eventsMap.get(o)||new Map}const c=[...l.values(),...u.values()];c.sort(((e,t)=>e.sort-t.sort));const f=this.prepareEvent(t,o,r);const d=[];for(const{listener:e,options:n}of c){if(f.isImmediatePropagationStopped()){break}if(l.has(e)||u.has(e)){let r=null;if(n.compatMode){const n=f.getCompatData();const o=n===null?[f]:s.cloneData===true?q.clone(n):n;const a=i.isUndefined(s.thisArg)?t:s.thisArg;r=e.apply(a,o)}else{r=i.isUndefined(s.thisArg)?e(f):e.call(s.thisArg,f)}d.push(r)}}return d}},{key:"emitAsync",value:function e(t,n,r){if(i.isString(t)){r=n;n=t;t=this.GLOBAL_TARGET}
31return Promise.all(this.emit(t,n,r))}},{key:"prepareEvent",value:function e(t,n,r){const i=r instanceof K?r:new K;if(!(r instanceof K)){i.setData(r)}i.setTarget(this.isEventEmitter(t)?t[ae]:t);i.setType(n);return i}},{key:"getNextSequenceValue",value:function e(){return this.sequenceValue++}},{key:"setMaxListeners",value:function e(...t){let n=this.GLOBAL_TARGET;let r=null;let s=null;if(t.length===1){s=t[0]}else if(t.length===2){if(i.isString(t[0])){[r,s]=t}else{[n,s]=t}}else if(t.length>=3){[n,r,s]=t}if(!i.isObject(n)){throw new TypeError('The "target" argument must be an object.')}if(r!==null&&!i.isStringFilled(r)){throw new TypeError('The "eventName" argument must be a string.')}if(!i.isNumber(s)||s<0){throw new TypeError(`The value of "count" is out of range. It must be a non-negative number. Received ${s}.`)}const o=te.getOrAdd(n);if(i.isStringFilled(r)){const e=this.resolveEventName(r,n);o.eventsMaxListeners.set(e,s)}else{o.maxListeners=s}}},{key:"getMaxListeners",value:function e(t,n){if(i.isString(t)){n=t;t=this.GLOBAL_TARGET}else if(i.isNil(t)){t=this.GLOBAL_TARGET}if(!i.isObject(t)){throw new TypeError('The "target" argument must be an object.')}const r=te.get(t);if(r){let e=r.maxListeners;if(i.isStringFilled(n)){const i=this.resolveEventName(n,t);e=r.eventsMaxListeners.get(i)||e}return e}return this.DEFAULT_MAX_LISTENERS}},{key:"addMaxListeners",value:function t(...n){const[r,s,o]=this.destructMaxListenersArgs(...n);const a=Math.max(this.getMaxListeners(r,s)+o,0);if(i.isStringFilled(s)){e.setMaxListeners(r,s,a)}else{e.setMaxListeners(r,a)}return a}},{key:"incrementMaxListeners",value:function e(...t){const[n,r,i]=this.destructMaxListenersArgs(...t);return this.addMaxListeners(n,r,Math.abs(i))}},{key:"decrementMaxListeners",value:function e(...t){const[n,r,i]=this.destructMaxListenersArgs(...t);return this.addMaxListeners(n,r,-Math.abs(i))}},{key:"destructMaxListenersArgs",value:function e(...t){let n=null;let r=1;let s=this.GLOBAL_TARGET;if(t.length===1){if(i.isNumber(t[0])){r=t[0]}else if(i.isString(t[0])){n=t[0]}else{s=t[0]}}else if(t.length===2){if(i.isString(t[0])){[n,r]=t}else if(i.isString(t[1])){[s,n]=t}else{[s,r]=t}}else if(t.length>=3){[s,n,r]=t}if(!i.isObject(s)){throw new TypeError('The "target" argument must be an object.')}if(n!==null&&!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}if(!i.isNumber(r)){throw new TypeError('The value of "increment" must be a number.')}return[s,n,r]}},{key:"getListeners",value:function e(t,n){if(i.isString(t)){n=t;t=this.GLOBAL_TARGET}if(!i.isObject(t)){throw new TypeError('The "target" argument must be an object.')}n=this.normalizeEventName(n);if(!i.isStringFilled(n)){throw new TypeError('The "eventName" argument must be a string.')}const r=te.get(t);if(!r){return new Map}const s=this.resolveEventName(n,t);return r.eventsMap.get(s)||new Map}},{key:"registerAliases",value:function t(n){const r=this.normalizeAliases(n);Object.keys(r).forEach((e=>{re.set(e,{eventName:r[e].eventName,namespace:r[e].namespace})}));e.mergeEventAliases(r)}},{key:"normalizeAliases",value:function e(t){if(!i.isPlainObject(t)){throw new TypeError('The "aliases" argument must be an object.')}const n=t;const r=Object.create(null);for(const e of Object.keys(n)){if(!i.isStringFilled(e)){throw new TypeError("The alias must be an non-empty string.")}const t=n[e];if(!t||!i.isStringFilled(t.eventName)||!i.isStringFilled(t.namespace)){throw new TypeError('The alias options must set the "eventName" and the "namespace".')}const s=this.normalizeEventName(e);r[s]={eventName:t.eventName,namespace:t.namespace}}return r}},{key:"mergeEventAliases",value:function e(t){const n=te.get(this.GLOBAL_TARGET);if(!n){return}Object.keys(t).forEach((e=>{const r=t[e];e=this.normalizeEventName(e);const i=this.makeFullEventName(r.namespace,r.eventName);const s=n.eventsMap.get(e);if(s){const t=n.eventsMap.get(i)||new Map;n.eventsMap.set(i,new Map([...t,...s]));n.eventsMap.delete(e)}const o=n.onceMap.get(e);if(o){const t=n.onceMap.get(i)||new Map;n.onceMap.set(i,new Map([...t,...o]));n.onceMap.delete(e)}const a=n.eventsMaxListeners.get(e);if(a){const t=n.eventsMaxListeners.get(i)||0;n.eventsMaxListeners.set(i,Math.max(t,a));n.eventsMaxListeners.delete(e)}}))}},{key:"isEventEmitter",value:function e(t){return i.isObject(t)&&t[se]===true}},{key:"normalizeEventName",value:function e(t){if(!i.isStringFilled(t)){return""}return t.toLowerCase()}},{key:"normalizeListener",value:function e(t){if(i.isString(t)){t=s.getClass(t)}if(!i.isFunction(t)){throw new TypeError(`The "listener" argument must be of type Function. Received type ${typeof t}.`)}return t}},{key:"resolveEventName",value:function e(t,n,r=false){t=this.normalizeEventName(t);if(!i.isStringFilled(t)){return""}if(this.isEventEmitter(n)&&r!==true){if(n.getEventNamespace()!==null&&t.includes(".")){console.warn(`Possible the wrong event name "${t}".`)}t=n.getFullEventName(t)}else if(re.has(t)){const{namespace:e,eventName:n}=re.get(t);t=this.makeFullEventName(e,n)}return t}},{key:"makeFullEventName",value:function e(t,n){const r=i.isStringFilled(t)?`${t}:${n}`:n;return i.isStringFilled(r)?r.toLowerCase():""}}])}();babelHelpers.defineProperty(le,"GLOBAL_TARGET",ie);babelHelpers.defineProperty(le,"DEFAULT_MAX_LISTENERS",te.getDefaultMaxListeners());babelHelpers.defineProperty(le,"sequenceValue",1);let ue=[];e.isReady=false;function ce(t){if(!i.isFunction(t)){return}if(e.isReady){t()}else{ue.push(t)}}v(document,"DOMContentLoaded",(()=>{e.isReady=true;ue.forEach((e=>{e()}));ue=[]}));function fe(e,t){const n=[];if(i.isEventTargetLike(e)){const r=h.get(e);if(r[t]){r[t].forEach((e=>{n.push({type:t,listener:e})}))}}return n}class de{static bind=g;static bindOnce=v;static unbind=y;static unbindAll=b;static ready=ce;static getEventListeners=fe;static EventEmitter=le;static BaseEvent=K}function he(e){if(i.isPlainObject(e)||i.isArray(e)){return JSON.stringify(e)}return c.encode(c.decode(e))}function pe(e){if(i.isString(e)){const t=c.decode(e);let n=null;try{n=JSON.parse(t)}catch{n=t}if(n===t&&/^[\d.]+[.]?\d+$/.test(n)){return Number(n)}if(n==="true"||n==="false"){return Boolean(n)}return n}return e}function me(){const{documentElement:e,body:t}=document;const n=Math.max(window.pageYOffset||0,e?e.scrollTop:0,t?t.scrollTop:0);const r=Math.max(window.pageXOffset||0,e?e.scrollLeft:0,t?t.scrollLeft:0);return{scrollTop:n,scrollLeft:r}}class ge{static replace(e,t){if(i.isDomNode(e)&&i.isDomNode(t)&&i.isDomNode(e.parentNode)){e.parentNode.replaceChild(t,e)}}static remove(e){if(i.isDomNode(e)&&i.isDomNode(e.parentNode)){e.parentNode.removeChild(e)}}static clean(e){if(i.isDomNode(e)){while(e.firstChild){e.removeChild(e.firstChild)}return}if(i.isString(e)){ge.clean(document.getElementById(e))}}static insertBefore(e,t){if(i.isDomNode(e)&&i.isDomNode(t)&&i.isDomNode(t.parentNode)){t.parentNode.insertBefore(e,t)}}static insertAfter(e,t){if(i.isDomNode(e)&&i.isDomNode(t)&&i.isDomNode(t.parentNode)){const n=t.parentNode;if(i.isDomNode(t.nextSibling)){n.insertBefore(e,t.nextSibling);return}n.appendChild(e)}}static append(e,t){if(i.isDomNode(e)&&i.isDomNode(t)){t.appendChild(e)}}
31static prepend(e,t){if(i.isDomNode(e)&&i.isDomNode(t)){if(i.isDomNode(t.firstChild)){t.insertBefore(e,t.firstChild);return}ge.append(e,t)}}static hasClass(e,t){if(i.isElementNode(e)){if(i.isString(t)){const n=t.trim();if(n.length>0){if(n.includes(" ")){return n.split(" ").every((t=>ge.hasClass(e,t)))}return e.classList.contains(n)}}if(i.isArray(t)&&t.length>0){return t.every((t=>ge.hasClass(e,t)))}}return false}static addClass(e,t){if(i.isElementNode(e)){if(i.isString(t)){const n=t.trim();if(n.length>0){if(n.includes(" ")){ge.addClass(e,n.split(" "));return}e.classList.add(n);return}}if(i.isArray(t)){t.forEach((t=>ge.addClass(e,t)))}}}static removeClass(e,t){if(i.isElementNode(e)){if(i.isString(t)){const n=t.trim();if(n.length>0){if(n.includes(" ")){ge.removeClass(e,n.split(" "));return}e.classList.remove(n);return}}if(i.isArray(t)){t.forEach((t=>ge.removeClass(e,t)))}}}static toggleClass(e,t,n){if(!i.isElementNode(e)||!i.isStringFilled(t)&&!i.isArrayFilled(t)){return}[t].flat().flatMap((e=>e?.trim?.().split(" "))).forEach((t=>{if(i.isStringFilled(t)){e.classList.toggle(t,i.isBoolean(n)?n:undefined)}}))}static style(e,t,n){if(i.isElementNode(e)){if(i.isNull(t)){e.removeAttribute("style");return e}if(i.isPlainObject(t)){Object.entries(t).forEach((([t,n])=>{ge.style(e,t,n)}));return e}if(i.isString(t)){if(i.isUndefined(n)&&e.nodeType!==Node.DOCUMENT_NODE){const n=getComputedStyle(e);if(t in n){return n[t]}return n.getPropertyValue(t)}if(i.isNull(n)||n===""||n==="null"){if(String(t).startsWith("--")){e.style.removeProperty(t);return e}e.style[t]="";return e}if(i.isString(n)||i.isNumber(n)){if(String(t).startsWith("--")){e.style.setProperty(t,String(n));return e}e.style[t]=n;return e}}}return null}static adjust(e,t={}){if(!e.nodeType){return null}let n=e;if(e.nodeType===Node.DOCUMENT_NODE){n=e.body}if(i.isPlainObject(t)){if(i.isPlainObject(t.attrs)){const e=t.attrs;Object.keys(e).forEach((t=>{if(t==="class"||t.toLowerCase()==="classname"){n.className=e[t];return}if(e[t]==""){n.removeAttribute(t);return}n.setAttribute(t,e[t])}))}if(i.isPlainObject(t.style)){ge.style(n,t.style)}if(i.isPlainObject(t.props)){const e=t.props;Object.keys(e).forEach((t=>{n[t]=e[t]}))}if(i.isPlainObject(t.events)){const e=t.events;Object.keys(e).forEach((t=>{de.bind(n,t,e[t])}))}if(i.isPlainObject(t.dataset)){const e=t.dataset;Object.keys(e).forEach((t=>{n.dataset[t]=e[t]}))}const e=i.isString(t.children)?[t.children]:t.children;if(i.isArray(e)&&e.length>0){e.forEach((e=>{if(i.isDomNode(e)){ge.append(e,n)}if(i.isString(e)){n.insertAdjacentHTML("beforeend",e)}}));return n}if("text"in t&&!i.isNil(t.text)){n.textContent=t.text;return n}if("html"in t&&!i.isNil(t.html)){n.innerHTML=t.html}}return n}static create(e,t={},n=document){let r=e;let s=t;if(i.isObjectLike(e)){const t=e;s=t;r=t.tag}return ge.adjust(n.createElement(r),s)}static show(e){if(i.isDomNode(e)){e.hidden=false}}static hide(e){if(i.isDomNode(e)){e.hidden=true}}static isShown(e){return i.isDomNode(e)&&!e.hidden&&e.style.getPropertyValue("display")!=="none"}static isShownRecursive(e){if(!i.isDomNode(e)){return false}if(e===document.body){return ge.isShown(e)}return ge.isShown(e)&&ge.isShownRecursive(e.parentElement)}static toggle(e){if(i.isDomNode(e)){if(ge.isShown(e)){ge.hide(e)}else{ge.show(e)}}}static getPosition(e){if(i.isDomNode(e)){const t=e.getBoundingClientRect();const{scrollLeft:n,scrollTop:r}=me();return new DOMRect(t.left+n,t.top+r,t.width,t.height)}return new DOMRect}static getRelativePosition(e,t){if(i.isDomNode(e)&&i.isDomNode(t)){const n=ge.getPosition(e);const r=ge.getPosition(t);return new DOMRect(n.left-r.left,n.top-r.top,n.width,n.height)}return new DOMRect}static attr(e,t,n){if(i.isElementNode(e)){if(i.isString(t)){if(!i.isNil(n)){if(i.isObjectLike(n)){e.setAttribute(t,he(n))}else{e.setAttribute(t,String(n))}}else if(i.isNull(n)){e.removeAttribute(t)}else{return pe(e.getAttribute(t))}}if(i.isPlainObject(t)){Object.entries(t).forEach((([t,n])=>{ge.attr(e,t,n)}))}}return null}}const ye=navigator.userAgent.toLowerCase();class be{static isOpera(){return ye.includes("opera")}static isIE(){return false}static isIE6(){return false}static isIE7(){return false}static isIE8(){return false}static isIE9(){return false}static isIE10(){return false}static isSafari(){return ye.includes("safari")&&!ye.includes("chrome")}static isFirefox(){return ye.includes("firefox")}static isChrome(){return ye.includes("chrome")}static detectIEVersion(){return-1}static isIE11(){return false}static isMac(){return ye.includes("macintosh")}static isWin(){return ye.includes("windows")}static isLinux(){return ye.includes("linux")&&!be.isAndroid()}static isAndroid(){return ye.includes("android")}static isIPad(){return ye.includes("ipad;")||this.isMac()&&this.isTouchDevice()}static isIPhone(){return ye.includes("iphone;")}static isIOS(){return be.isIPad()||be.isIPhone()}static isMobile(){return be.isIPhone()||be.isIPad()||be.isAndroid()||ye.includes("mobile")||ye.includes("touch")}static isRetina(){return window.devicePixelRatio>=2}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}static isDoctype(e){const t=e||document;if(t.compatMode){return t.compatMode==="CSS1Compat"}return Boolean(t.documentElement&&t.documentElement.clientHeight)}static isLocalStorageSupported(){return true}static addGlobalClass(e){const t=i.isElementNode(e)?e:document.documentElement;let n="bx-core";if(ge.hasClass(t,n)){return}if(be.isIOS()){n+=" bx-ios"}else if(be.isWin()){n+=" bx-win"}else if(be.isMac()){n+=" bx-mac"}else if(be.isLinux()){n+=" bx-linux"}else if(be.isAndroid()){n+=" bx-android"}n+=be.isMobile()?" bx-touch":" bx-no-touch";n+=be.isRetina()?" bx-retina":" bx-no-retina";if(be.isSafari()){n+=" bx-safari"}
31else if(/AppleWebKit/.test(navigator.userAgent)){n+=" bx-chrome"}else if(/Opera/.test(navigator.userAgent)){n+=" bx-opera"}else if(be.isFirefox()){n+=" bx-firefox"}ge.addClass(t,n)}static detectAndroidVersion(){const e=/Android ([\d.]+)/;if(e.exec(navigator.userAgent)!==null){const t=navigator.userAgent.match(e);if(i.isArrayLike(t)&&t.length>0){return parseFloat(t[1])}}return 0}static isPropertySupported(e,t){if(e===""){return false}function n(e){return e.replaceAll(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}function r(e){const t=/(\\-([a-z]))/g;if(t.test(e)){return e.replaceAll(t,((...e)=>e[2].toUpperCase()))}return e}const i=e.includes("-")?r(e):e;const s=Boolean(t);const o=i.charAt(0).toUpperCase()+i.slice(1);const a=["Webkit","Moz","O","ms"].join(`${o} `);const l=`${i} ${a} ${o}`.split(" ");const u=document.body||document.documentElement;for(const e of l){if(u&&"style"in u&&e in u.style){const t=e.slice(0,e.length-i.length).toLowerCase();const r=e===i?"":`-${t}-`;return s?r+n(i):e}}return false}static addGlobalFeatures(e){if(!i.isArray(e)){return}const t=[];for(const n of e){const e=Boolean(be.isPropertySupported(n));t.push(`bx-${e?"":"no-"}${n.toLowerCase()}`)}ge.addClass(document.documentElement,t.join(" "))}}class ve{static getList(){return document.cookie.split(";").map((e=>e.split("="))).map((e=>e.map((e=>e.trim())))).reduce(((e,t)=>{const[n,r]=t;e[decodeURIComponent(n)]=decodeURIComponent(r);return e}),{})}static get(e){const t=ve.getList();if(e in t){return t[e]}return undefined}static set(e,t,n={}){const r={expires:"",...n};if(i.isNumber(r.expires)){const e=Date.now();const t=r.expires;const n=864e5;r.expires=new Date(e+t*n)}if(i.isDate(r.expires)){r.expires=r.expires.toUTCString()}const s=decodeURIComponent(String(e)).replaceAll(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replaceAll(/[()]/g,escape);const o=encodeURIComponent(String(t)).replaceAll(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);const a=Object.keys(r).reduce(((e,t)=>{const n=r[t];if(!n){return e}if(n===true){return`${e}; ${t}`}return`${e}; ${t}=${n.split(";")[0]}`}),"");document.cookie=`${s}=${o}${a}`}static remove(e,t={}){ve.set(e,"",{...t,expires:-1})}}function we(e,t=new FormData,n=null){if(i.isUndefined(e)){return t}if(i.isNull(e)){t.append(n,"")}else if(i.isArray(e)){if(e.length>0){e.forEach(((e,r)=>{const i=`${n}[${r}]`;we(e,t,i)}))}else{const e=`${n}[]`;t.append(e,"")}}else if(i.isDate(e)){t.append(n,e.toISOString())}else if(i.isObject(e)&&!i.isFile(e)&&!i.isBlob(e)){Object.keys(e).forEach((r=>{const s=e[r];let o=r;if(i.isArray(s)){while(o.length>2&&o.lastIndexOf("[]")===o.length-2){o=o.slice(0,-2)}}const a=n?`${n}[${o}]`:o;we(s,t,a)}))}else{t.append(n,e)}return t}class xe{static convertObjectToFormData(e){return we(e)}}class Se{static Cookie=ve;static Data=xe}const Be=function(e){if(i.isString(e)){if(i.isNil(Be[e])){le.emit("onBXMessageNotFound",new K({compatData:[e]}));if(i.isNil(Be[e])){q.debug(`message undefined: ${e}`);Be[e]=""}}return Be[e]}if(i.isPlainObject(e)){Object.keys(e).forEach((t=>{Be[t]=e[t]}))}return undefined};if(!i.isNil(window.BX)&&i.isFunction(window.BX.message)){Object.keys(window.BX.message).forEach((e=>{Be({[e]:window.BX.message[e]})}))}class Ee{static getMessage(e,t=null){let n=Be(e);if(i.isString(n)&&i.isPlainObject(t)){const e=e=>String(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&");Object.keys(t).forEach((r=>{const s=new RegExp(e(r),"gi");n=n.replaceAll(s,(()=>i.isNil(t[r])?"":String(t[r])))}))}return n}static hasMessage(e){return i.isString(e)&&!i.isNil(Be[e])}static setMessage(e,t){if(i.isString(e)&&i.isString(t)){Be({[e]:t})}if(i.isObject(e)){Be(e)}}static getMessagePlural(e,t,n=null){let r="";if(i.isNumber(t)){if(this.hasMessage(`${e}_PLURAL_${this.getPluralForm(t)}`)){r=this.getMessage(`${e}_PLURAL_${this.getPluralForm(t)}`,n)}else{r=this.getMessage(`${e}_PLURAL_1`,n)}}else{r=this.getMessage(e,n)}return r}static getPluralForm(e,t){let n=1;let r=t;if(!i.isStringFilled(r)){r=Be("LANGUAGE_ID")}const s=Math.abs(e);switch(r){case"ar":n=s===1?0:1;break;case"br":case"fr":case"tr":n=s>1?1:0;break;case"de":case"en":case"hi":case"it":case"la":n=s===1?0:1;break;case"ru":case"ua":if(s%10===1&&s%100!==11){n=0}else if(s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)){n=1}else{n=2}break;case"pl":if(s===1){n=0}else if(s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)){n=1}else{n=2}break;case"id":case"ja":case"ms":case"sc":case"tc":case"th":case"vn":n=0;break;default:n=1;break}return n}}const je=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Te(e){return je.has(e)}
31const Xe={tag:/<[\d!/A-Za-z-](?:"[^"]*"|'[^']*'|[^"'>])*>|{{uid\d+}}/g,comment:/<!--(?!<!)[^>[].*?-->/g,tagName:/<\/?(\S+?)[\s/>]/,attributes:/\s([\w.:-]+)\s?\n?=\s?\n?"([^"]+)?"|\s([\w.:-]+)\s?\n?=\s?\n?'([^']+)?'|\s([\w.:-]+)/gs,placeholder:/{{uid\d+}}/g};function Oe(e){const t={type:"tag",name:"",svg:false,attrs:{},children:[],voidElement:false};if(e.startsWith("\x3c!--")){const t=e.indexOf("--\x3e");const n="\x3c!--".length;return{type:"comment",content:t===-1?"":e.slice(n,t)}}const n=e.match(Xe.tagName);if(i.isArrayFilled(n)){const[,r]=n;t.name=r;t.svg=r==="svg";t.voidElement=Te(r)||e.trim().endsWith("/>")}const r=new RegExp(Xe.attributes);for(;;){const n=r.exec(e);if(i.isNil(n)){break}const[,s,o]=n;if(i.isNil(s)){const e=n[3];const r=n[4];if(i.isNil(e)){const e=n[5];t.attrs[e]=""}else{t.attrs[e]=i.isStringFilled(r)?r:""}}else{t.attrs[s]=i.isStringFilled(o)?o:""}}return t}function Ne(e){const t=e.replace(/[\t\n\r]$/,"");const n=t.match(Xe.placeholder);return t.split(Xe.placeholder).reduce(((e,t,r)=>{if(i.isStringFilled(t)){e.push(...t.split(/\n/).reduce(((e,t)=>{const n=t.replaceAll(/[\t\r]/g,"");if(i.isStringFilled(n)){e.push({type:"text",content:n})}return e}),[]))}if(n&&n[r]){e.push({type:"placeholder",uid:parseInt(n[r].replace(/{{uid|}}/,""),10)})}return e}),[])}function Ae(e,t){const n=[];if(e.indexOf("<")!==0&&!e.startsWith("{{")){const t=e.indexOf("<");n.push(...Ne(t===-1?e:e.slice(0,t)))}const r=[];let i=-1;e=e.replace(Xe.comment,(e=>{i+=1;r.push(e.replaceAll(/^<!--|-->$/g,""));return`\x3c!--{{cUid${i}}}--\x3e`}));const s=[];let o=-1;let a=null;e.replace(Xe.tag,((t,i)=>{const l=i+t.length;const u=e.charAt(l);let c=null;if(t.startsWith("\x3c!--")){const e=Oe(t);e.content=r[t.replaceAll(/<!--{{cUid|}}-->/g,"")];if(o<0){n.push(e);return n}c=s[o];c.children.push(e);return n}if(t.startsWith("{{")){const[e]=Ne(t);if(o<0){n.push(e);return n}c=s[o];c.children.push(e);return n}if(!t.startsWith("</")){o++;a=Oe(t);if(!a.voidElement&&u&&u!=="<"){a.children.push(...Ne(e.slice(l,e.indexOf("<",l))))}if(o===0){n.push(a)}c=s[o-1];if(c){if(!a.svg){a.svg=c.svg}c.children.push(a)}s[o]=a}if(t.startsWith("</")||a.voidElement){if(o>-1&&(a.voidElement||a.name===t.slice(2,-1))){o--;a=o===-1?n:s[o]}if(u&&u!=="<"){c=o===-1?n:s[o].children;const t=e.indexOf("<",l);const r=e.slice(l,t===-1?undefined:t);if(t>-1&&o+c.length>=0||r!==" "){c.push(...Ne(r))}}}return n}));return n}const _e=(e,t)=>{if(i.isDomNode(e)&&i.isDomNode(t)){if(t.nodeName==="TEMPLATE"){t.content.append(e)}else{ge.append(e,t)}}};function Pe(e){const{node:t,parentElement:n,substitutions:r,refs:s=[]}=e;if(t.type==="tag"){const e=(()=>{if(t.svg){return document.createElementNS("http://www.w3.org/2000/svg",t.name)}return document.createElement(t.name)})();if(Object.hasOwn(t.attrs,"ref")){s.push([t.attrs.ref,e]);delete t.attrs.ref}Object.entries(t.attrs).forEach((([t,n])=>{if(t.startsWith("on")&&new RegExp(`^${Xe.placeholder.source}$`).test(String(n).trim())){const s=r[parseInt(String(n).trim().replace("{{uid",""),10)-1];if(i.isFunction(s)){const n=t.endsWith("once")?"bindOnce":"bind";de[n](e,t.replaceAll(/^on|once$/g,""),s)}else{e.setAttribute(t,s)}}else if(new RegExp(Xe.placeholder).test(n)){const i=n.split(/{{|}}/).reduce(((e,t)=>{if(t.startsWith("uid")){const n=r[parseInt(t.replace("uid",""),10)-1];return`${e}${c.decode(String(n))}`}return`${e}${c.decode(t)}`}),"");e.setAttribute(t,i)}else{e.setAttribute(t,c.decode(n))}}));t.children.forEach((t=>{const n=Pe({node:t,parentElement:e,substitutions:r,refs:s});if(i.isArray(n)){n.forEach((t=>{_e(t,e)}))}else{_e(n,e)}}));return e}if(t.type==="comment"){return document.createComment(t.content)}if(t.type==="text"){if(n){if(n.nodeName==="TEMPLATE"){n.content.append(t.content)}else{n.insertAdjacentHTML("beforeend",t.content)}return undefined}return document.createTextNode(t.content)}if(t.type==="placeholder"){return r[t.uid-1]}return undefined}const Le=0;const Ce=1;const Me=2;const Ie=3;const ke=/[A-Za-z]/;function De(e,t){if(e.charAt(t)==="<"){const n=e.charAt(t+1);if(n==="!"||n==="/"||ke.test(n)){return Ce}}return Le}function Fe(e){if(e==='"'){return Me}if(e==="'"){return Ie}if(e===">"){return Le}return Ce}function Re(e,t,n){const r=t.charAt(n);switch(e){case Le:return De(t,n);case Ce:return Fe(r);case Me:return r==='"'?Ce:e;case Ie:return r==="'"?Ce:e;default:return e}}function He(e){const t=[];let n=Le;for(const r of e){for(let e=0;e<r.length;e++){n=Re(n,r,e)}t.push(n)}return t}function We(e,...t){const n=He(e);const r=e.reduce(((e,r,s)=>{if(s>0){const o=t[s-1];const a=n[s-1];const l=a===Me||a===Ie;if(!l&&(i.isString(o)||i.isNumber(o))){return`${e}${o}${r}`}return`${e}{{uid${s}}}${r}`}return e}),e[0]).replaceAll(/^\s+/gm,"").replaceAll(/>\n+/g,">").replaceAll(/}\n+/g,"}");const s=Ae(r);if(s.length===1){const e=[];const n=Pe({node:s[0],substitutions:t,refs:e});if(i.isArrayFilled(e)){return Object.fromEntries([["root",n],...e])}return n}if(s.length>1){const e=[];const n=s.map((n=>
31Pe({node:n,substitutions:t,refs:e})));if(i.isArrayFilled(e)){return Object.fromEntries([["root",n],...e])}return n}return false}function ze(...e){const[t,...n]=e;return n.reduce(((e,n,r)=>{const s=r+1;if(!i.isPlainObject(n)&&!i.isArray(n)){return e+n+t[s]}return`${e}__s${r}${t[s]}`}),t[0]).replaceAll(/[\t\r]/gm,"").split(";\n").map((e=>e.replace(/\n/,""))).reduce(((e,t)=>{if(t!==""){const r=t.match(/^[\w-. ]+:/);const i=t.split(/^[\w-. ]+:/);const s=r[0].replace(":","").trim();const o=i[1].trim();const a=/^__s\d+/;if(a.test(o)){e[s]=n[o.replace("__s","")];return e}e[s]=o}return e}),{})}class Ge{static safe(e,...t){return t.reduce(((t,n,r)=>t+c.encode(n)+e[r+1]),e[0])}static unsafe(e,...t){return t.reduce(((t,n,r)=>t+c.decode(n)+e[r+1]),e[0])}static style(e){if(!i.isDomNode(e)){throw new Error("element is not HTMLElement")}return function t(...n){ge.style(e,ze(...n))}}static message(e,...t){return t.reduce(((t,n,r)=>t+Ee.getMessage(n)+e[r+1]),e[0])}static render=We;static attrs(e){if(!i.isDomNode(e)){throw new Error("element is not HTMLElement")}return function t(...n){ge.attr(e,ze(...n))}}static attr=Ge.attrs}function $e(e){switch(e){case"index":return(e,t,n)=>{const r=/\[(\w*)]$/.exec(e);const s=e.replace(/\[\w*]$/,"");if(i.isNil(r)){n[s]=t;return}if(i.isUndefined(n[s])){n[s]={}}n[s][r[1]]=t};case"bracket":return(e,t,n)=>{const r=/(\[])$/.exec(e);const s=e.replace(/\[]$/,"");if(i.isNil(r)){n[s]=t;return}if(i.isUndefined(n[s])){n[s]=i.isNil(t)?[]:[t];return}n[s]=[].concat(n[s],t)};default:return(e,t,n)=>{const r=e.replace(/\[]$/,"");n[r]=t}}}function Ue(e){if(/^\w+\[(\w+)]$/.test(e)){return"index"}if(/^\w+\[]$/.test(e)){return"bracket"}return"default"}function Ve(e){return!String(e).startsWith("__proto__")}function Ye(e){if(!i.isString(e)){return{}}const t=e.trim().replace(/^[#&?]/,"");if(!t){return{}}return{...t.split("&").reduce(((e,t)=>{const[n,r]=t.replaceAll("+"," ").split("=");if(Ve(n)){const t=Ue(n);const i=$e(t);i(n,r,e)}return e}),Object.create(null))}}const qe=/^((\w+):)?(\/\/((\w+)?(:(\w+))?@)?([^/:?]+)(:(\d+))?)?(\/?([^#/?][^#?]*)?)?(\?([^#]+))?(#((?:[\w-?/:@.~!$&'()*+,;=]|%\w{2})*))?/;function Je(e){const t=Object.entries(e);return t.reduce(((e,[t,n])=>{if(i.isNil(n)){e[t]=""}else if(i.isPlainObject(n)){e[t]=Je(n)}else{e[t]=n}return e}),{})}function Ze(e){const t=e.match(qe);if(i.isArray(t)){const n=Ye(t[14]);const r=Je(n);return{useShort:/^\/\//.test(e),href:t[0]||"",schema:t[2]||"",host:t[8]||"",port:t[10]||"",path:t[11]||"",query:t[14]||"",sourceQueryParams:n,queryParams:r,hash:t[16]||"",username:t[5]||"",password:t[7]||"",origin:t[8]||""}}return{}}function Ke(e,t){if(i.isNil(t)){return e}return`${e}=${t}`}function Qe(e={}){const t=Object.keys(e).reduce(((t,n)=>{if(i.isArray(e[n])){if(i.isArrayFilled(e[n])){e[n].forEach((e=>{t.push(Ke(`${n}[]`,e))}))}else{t.push(Ke(`${n}[]`,null))}}if(i.isPlainObject(e[n])){Object.keys(e[n]).forEach((r=>{t.push(Ke(`${n}[${r}]`,e[n][r]))}))}if(!i.isObject(e[n])&&!i.isArray(e[n])){t.push(Ke(n,e[n]))}return t}),[]).join("&");if(t.length>0){return`?${t}`}return t}function et(e){if(i.isArray(e)){return e.map((e=>String(e)))}if(i.isPlainObject(e)){return{...e}}return String(e)}const tt=new WeakMap;class nt{static addParam(e,t={}){return new nt(e).setQueryParams(t).toString()}static removeParam(e,t){const n=i.isArray(t)?t:[t];return new nt(e).removeQueryParam(...n).toString()}constructor(e=""){tt.set(this,Ze(e))}getSchema(){return tt.get(this).schema}setSchema(e){tt.get(this).schema=String(e);return this}getHost(){return tt.get(this).host}setHost(e){tt.get(this).host=String(e);return this}getPort(){return tt.get(this).port}setPort(e){tt.get(this).port=String(e);return this}getPath(){return tt.get(this).path}setPath(e){if(!/^\//.test(e)){tt.get(this).path=`/${String(e)}`;return this}tt.get(this).path=String(e);return this}getQuery(){return Qe(tt.get(this).queryParams)}getQueryParam(e){const t=this.getQueryParams();if(Object.hasOwn(t,e)){return t[e]}return null}setQueryParam(e,t=""){tt.get(this).queryParams[e]=et(t);tt.get(this).sourceQueryParams[e]=et(t);return this}getQueryParams(){return{...tt.get(this).queryParams}}setQueryParams(e={}){if(i.isPlainObject(e)){const{queryParams:t,sourceQueryParams:n}=tt.get(this);Object.entries(e).forEach((([e,r])=>{const i=et(r);t[e]=i;n[e]=i}))}return this}removeQueryParam(...e){const{queryParams:t,sourceQueryParams:n}=tt.get(this);e.forEach((e=>{delete t[e];delete n[e]}));return this}getFragment(){return tt.get(this).hash}setFragment(e){tt.get(this).hash=String(e);return this}serialize(){const e={...tt.get(this)};delete e.sourceQueryParams;e.href=this.toString();return e}toString(){const e={...tt.get(this)};let t=e.schema?`${e.schema}://`:"";if(e.useShort){t="//"}const n=(()=>
31{if(i.isString(e.port)&&!["","80"].includes(e.port)){return`:${e.port}`}return""})();const r=this.getHost();const s=this.getPath();const o=Qe(e.sourceQueryParams);const a=e.hash?`#${e.hash}`:"";return`${r?t:""}${r}${r?n:""}${s}${o}${a}`}}class rt{static MAX_EMAIL_LENGTH=254;static MAX_LOCAL_LENGTH=64;static LOCAL_ALLOWED_CHARS=/^[\w%+.\u0401\u0410-\u044f\u0451-]+$/;static DOMAIN_LABEL_CHARS=/^[\w.\u0401\u0410-\u044f\u0451-]+$/;static isEmail(e){if(!i.isStringFilled(e)){return false}if(e.length>rt.MAX_EMAIL_LENGTH){return false}const t=e.indexOf("@");if(t<=0||t===e.length-1||e.includes("@",t+1)){return false}const n=e.slice(0,t);const r=e.slice(t+1);if(!rt.LOCAL_ALLOWED_CHARS.test(n)){return false}if(n.startsWith(".")||n.endsWith(".")||n.startsWith("-")||n.endsWith("-")||n.includes("..")||n.length>rt.MAX_LOCAL_LENGTH){return false}if(!rt.DOMAIN_LABEL_CHARS.test(r)){return false}if(r.startsWith(".")||r.endsWith(".")||r.includes("..")){return false}const s=r.split(".");if(s.length<2){return false}const o=s[s.length-1];if(o.length<2||o.length>24){return false}for(const e of s){if(e.startsWith("-")||e.endsWith("-")){return false}const t=/^[\dA-Za-z\u0401\u0410-\u044f\u0451]/.test(e);const n=/[\dA-Za-z\u0401\u0410-\u044f\u0451]$/.test(e);if(!t||!n){return false}}return true}}class it{#e=new Map;get(e){return this.#e.get(e)}set(e,t){this.#e.set(e,t)}has(e){return this.#e.has(e)}delete(e){this.#e.delete(e)}get size(){return this.#e.size}keys(){return[...this.#e.keys()]}values(){return[...this.#e.values()]}}class st{storage=new it;get(e,t){if(!this.storage.has(e)){if(i.isFunction(t)){return t()}if(!i.isUndefined(t)){return t}}return this.storage.get(e)}set(e,t){this.storage.set(e,t)}delete(e){this.storage.delete(e)}has(e){return this.storage.has(e)}remember(e,t){if(!this.storage.has(e)){if(i.isFunction(t)){this.storage.set(e,t())}else if(!i.isUndefined(t)){this.storage.set(e,t)}}return this.storage.get(e)}size(){return this.storage.size}keys(){return this.storage.keys()}values(){return this.storage.values()}}class ot extends st{}class at{stackKey="BX.Cache.Storage.LsStorage.stack";stack=null;getStack(){if(i.isPlainObject(this.stack)){return this.stack}const e=localStorage.getItem(this.stackKey);if(i.isString(e)&&e!==""){const t=JSON.parse(e);if(i.isPlainObject(t)){this.stack=t;return this.stack}}this.stack={};return this.stack}saveStack(){if(i.isPlainObject(this.stack)){const e=JSON.stringify(this.stack);localStorage.setItem(this.stackKey,e)}}get(e){const t=this.getStack();return t[e]}set(e,t){const n=this.getStack();n[e]=t;this.saveStack()}delete(e){const t=this.getStack();if(e in t){delete t[e]}}has(e){const t=this.getStack();return e in t}get size(){const e=this.getStack();return Object.keys(e).length}keys(){const e=this.getStack();return Object.keys(e)}values(){const e=this.getStack();return Object.values(e)}}class lt extends st{storage=new at}class ut{static BaseCache=st;static MemoryCache=ot;static LocalStorageCache=lt}function ct(e){if(i.isStringFilled(e)){return e.split(".").reduce(((e,t)=>{t.split(/\[["']?(.+?)["']?]/g).forEach((t=>{if(i.isStringFilled(t)){e.push(t)}}));return e}),[])}return[]}class ft{constructor(e={}){if(i.isPlainObject(e)){Object.assign(this,e)}}get(e,t=null){const n=ct(e);return n.reduce(((e,n)=>{if(!i.isNil(e)&&e!==t){if(!i.isUndefined(e[n])){return e[n]}return t}return e}),this)}}function dt(e){if(i.isObject(e)){Object.values(e).forEach((e=>{dt(e)}));return Object.freeze(e)}return e}const ht=new Map;class pt{static getSettings(e){if(i.isStringFilled(e)){if(ht.has(e)){return ht.get(e)}const t=document.querySelector(`script[data-extension="${e}"]`);if(i.isDomNode(t)){const n=(()=>{try{return new ft(JSON.parse(t.innerHTML))}catch{return new ft}})();const r=dt(n);ht.set(e,r);return r}}return dt(new ft)}}function mt(e,t){gt(e,t),t.add(e)}function gt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var bt=new WeakSet;let vt=function(){function e(t=null){babelHelpers.classCallCheck(this,e);mt(this,bt);babelHelpers.defineProperty(this,"comparator",null);babelHelpers.defineProperty(this,"items",[]);this.comparator=i.isFunction(t)?t:null}return babelHelpers.createClass(e,[{key:"add",value:function e(t){let n=-1;if(this.comparator){n=yt(bt,this,wt).call(this,t);this.items.splice(n,0,t)}else{this.items.push(t)}return n}},{key:"has",value:function e(t){return this.items.includes(t)}},{key:"getIndex",value:function e(t){return this.items.indexOf(t)}},{key:"getByIndex",value:function e(t){if(i.isNumber(t)&&t>=0){const e=this.items[t];return i.isUndefined(e)?null:e}return null}},{key:"getFirst",value:function e(){const t=this.items[0];return i.isUndefined(t)?null:t}},{key:"getLast",value:function e(){const t=this.items[this.count()-1];return i.isUndefined(t)?null:t}},{key:"count",value:function e(){return this.items.length}},{key:"delete",value:function e(t){const n=this.getIndex(t);if(n!==-1){this.items.splice(n,1);return true}return false}},{key:"clear",value:function e(){this.items=[]}},{key:Symbol.iterator,value:function(){return this.items[Symbol.iterator]()}}
31,{key:"forEach",value:function e(t,n){const r=n?t.bind(n):t;this.items.forEach(((e,t,n)=>{r(e,t,n)}))}},{key:"getAll",value:function e(){return this.items}},{key:"getComparator",value:function e(){return this.comparator}},{key:"sort",value:function e(){const t=this.getComparator();if(t===null){return}const n=this.items.length;const r=Array.from({length:n},((e,t)=>t));r.sort(((e,n)=>t(this.items[e],this.items[n])||e-n));for(let e=0;e<n;e++){r[e]=this.items[r[e]]}for(let e=0;e<n;e++){this.items[e]=r[e]}}}])}();function wt(e){let t=0;let n=this.items.length;while(t<n){const r=Math.floor((t+n)/2);if(this.comparator(this.items[r],e)>=0){n=r}else{t=r+1}}return t}class xt extends le{sort=0;alwaysOnTop=false;zIndex=0;element=null;overlay=null;overlayGap=-5;stack=null;constructor(e,t={}){super();this.setEventNamespace("BX.Main.ZIndexManager.Component");if(!i.isElementNode(e)){throw new Error("ZIndexManager.Component: The argument 'element' must be a DOM element.")}this.element=e;const n=i.isPlainObject(t)?t:{};this.setAlwaysOnTop(n.alwaysOnTop);this.setOverlay(n.overlay);this.setOverlayGap(n.overlayGap);this.subscribeFromOptions(n.events)}getSort(){return this.sort}setSort(e){if(i.isNumber(e)){this.sort=e}}setStack(e){this.stack=e}getStack(){return this.stack}getZIndex(){return this.zIndex}setZIndex(e){const t=this.getZIndex()!==e;this.getElement().style.setProperty("z-index",String(e),"important");this.zIndex=e;if(this.getOverlay()!==null){this.getOverlay().style.setProperty("z-index",String(e+this.getOverlayGap()),"important")}if(t){this.emit("onZIndexChange",{component:this})}}getAlwaysOnTop(){return this.alwaysOnTop}setAlwaysOnTop(e){if(i.isNumber(e)||i.isBoolean(e)){this.alwaysOnTop=e}}getElement(){return this.element}setOverlay(e,t){if(i.isElementNode(e)||e===null){this.overlay=e;this.setOverlayGap(t);if(this.getStack()){this.getStack().sort()}}}getOverlay(){return this.overlay}setOverlayGap(e){if(i.isNumber(e)){this.overlayGap=e}}getOverlayGap(){return this.overlayGap}}class St{container;components;elements=new WeakMap;baseIndex=1e3;baseStep=50;sortCount=0;constructor(e){if(!i.isDomNode(e)){throw new Error("ZIndexManager.Stack: The 'container' argument must be a DOM element.")}this.container=e;const t=(e,t)=>{let n=(Number(e.getAlwaysOnTop())||0)-(Number(t.getAlwaysOnTop())||0);if(!n){n=e.getSort()-t.getSort()}return n};this.components=new vt(t)}getBaseIndex(){return this.baseIndex}setBaseIndex(e){if(i.isNumber(e)&&e>=0){this.baseIndex=e;this.sort()}}setBaseStep(e){if(i.isNumber(e)&&e>0){this.baseStep=e;this.sort()}}getBaseStep(){return this.baseStep}register(e,t={}){if(this.getComponent(e)){console.warn("ZIndexManager: You cannot register the element twice.",e);return this.getComponent(e)}const n=new xt(e,t);n.setStack(this);n.setSort(++this.sortCount);this.elements.set(e,n);this.components.add(n);this.sort();return n}unregister(e){const t=this.elements.get(e);this.components.delete(t);this.elements.delete(e);this.sort()}getComponent(e){return this.elements.get(e)||null}getComponents(){return this.components.getAll()}getMaxZIndex(){const e=this.components.getLast();return e?e.getZIndex():this.baseIndex}sort(){this.components.sort();let e=this.baseIndex;this.components.forEach((t=>{t.setZIndex(e);e+=this.baseStep}))}bringToFront(e){const t=this.getComponent(e);if(!t){console.error("ZIndexManager: element was not found in the stack.",e);return null}t.setSort(++this.sortCount);this.sort();return t}}class Bt{static stacks=new WeakMap;static register(e,t={}){const n=this.#t(e);if(!n){return null}const r=this.getOrAddStack(n);return r.register(e,t)}static unregister(e){const t=this.#t(e);const n=this.getStack(t);if(n){n.unregister(e)}}static addStack(e){const t=new St(e);this.stacks.set(e,t);return t}static getStack(e){return this.stacks.get(e)||null}static getOrAddStack(e){return this.getStack(e)||this.addStack(e)}static getComponent(e){const t=this.#t(e,true);if(!t){return null}const n=this.getStack(t);return n?n.getComponent(e):null}static bringToFront(e){const t=this.#t(e);const n=this.getStack(t);if(n){return n.bringToFront(e)}return null}static#t(e,t=false){if(!i.isElementNode(e)){if(!t){console.error("ZIndexManager: The argument 'element' must be a DOM element.",e)}return null}if(!i.isElementNode(e.parentNode)){if(!t){console.error("ZIndexManager: The 'element' doesn't have a parent node.",e)}return null}return e.parentNode}}const Et=typeof WeakRef!=="undefined";class jt{#n=new Map;#r=null;constructor(){if(Et){this.#r=new FinalizationRegistry(this.#i.bind(this))}}clear(){if(!Et){this.#n.clear();return}
31this.#n.forEach((e=>{const t=e.deref();if(!i.isUndefined(t)){this.#r.unregister(t)}}));this.#n.clear()}delete(e){if(!Et){return this.#n.delete(e)}const t=this.get(e);if(!i.isUndefined(t)){this.#r.unregister(t)}return this.#n.delete(e)}get(e){if(!Et){return this.#n.get(e)}return this.#n.get(e)?.deref()}has(e){if(!Et){return this.#n.has(e)}return!i.isUndefined(this.#n.get(e)?.deref())}set(e,t){if(!Et){this.#n.set(e,t);return this}this.#n.set(e,new WeakRef(t));this.#r.register(t,e,t);return this}#i(e){const t=this.#n.get(e);if(t&&!t.deref()){this.#n.delete(e)}}}var Tt={OrderedArray:vt,SettingsCollection:ft,WeakRefMap:jt};class Xt{static linear(e){return e}static quad(e){return e**2}static cubic(e){return e**3}static quart(e){return e**4}static quint(e){return e**5}static circ(e){return 1-Math.sin(Math.acos(e))}static back(e){return e**2*((1.5+1)*e-1.5)}static elasti(e){return 2**(10*(e-1))*Math.cos(20*Math.PI*1.5/3*e)}static bounce(e){for(let t=0,n=1;;t+=n,n/=2){if(e>=(7-4*t)/11){return-(((11-6*t-11*e)/4)**2)+n**2}}}}class Ot{#s=1e3;#o=Xt.linear;#a=null;#l=null;#u=null;#c={};#f={};#d={};#h=null;#p=null;#m=null;constructor(e){this.setOptions(e)}setOptions(e){const t=i.isPlainObject(e)?e:{};this.#s=i.isNumber(t.duration)&&t.duration>0?t.duration:this.#s;this.#a=i.isFunction(t.begin)||t.begin===null?t.begin:this.#a;this.#l=i.isFunction(t.step)||t.step===null?t.step:this.#l;this.#u=i.isFunction(t.complete)||t.complete===null?t.complete:this.#u;this.#h=i.isFunction(t.progress)||t.progress===null?t.progress:this.#h;this.#c=i.isPlainObject(t.start)?{...t.start}:this.#c;this.#f=i.isPlainObject(t.finish)?{...t.finish}:this.#f}setTransition(e){if(i.isFunction(e)){this.#o=e}else if(i.isStringFilled(e)){let t=e;let n=null;if(e.startsWith("ease-out-")){t=t.replace("ease-out-","");n=Ot.makeEaseOut}else if(e.startsWith("ease-in-out-")){t=t.replace("ease-in-out-","");n=Ot.makeEaseInOut}if(i.isFunction(Xt[t])){this.#o=n===null?Xt[t]:n(Xt[t])}}}animateProgress(){this.#g()}animate(){this.#h=e=>{this.#d={};for(const t of Object.keys(this.#c)){this.#d[t]=Math.round(this.#c[t]+(this.#f[t]-this.#c[t])*e)}if(this.#l!==null){this.#l(this.#d)}};this.#g()}#g(){for(const e of Object.keys(this.#c)){if(i.isUndefined(this.#f[e])){delete this.#c[e]}}let e=null;const t=n=>{if(e===null){e=n}let r=(n-e)/this.#s;if(r>1){r=1}const i=this.#o(r);this.#h(i);if(r===1){this.stop(true)}else{this.#p=requestAnimationFrame(t)}};if(this.#a!==null){this.#a(this.#d)}this.#p=requestAnimationFrame(t)}get options(){if(this.#m===null){this.#m=new Proxy(this,{get(e,t,n){switch(t){case"transition":return e.#o;case"start":return e.#c;case"finish":return e.#f;case"duration":return e.#s;default:return null}},set(e,t,n,r){e.setOptions({[t]:n});return true}})}return this.#m}stop(e=false){if(this.#p!==null){cancelAnimationFrame(this.#p);this.#p=null;if(e&&this.#u!==null){this.#u(this.#d)}}}static makeEaseInOut(e){return t=>{if(t<.5){return e(2*t)/2}return(2-e(2*(1-t)))/2}}static makeEaseOut(e){return t=>1-e(1-t)}static get transitions(){return Xt}}class Nt{#y=null;constructor(e={}){const t=i.isPlainObject(e)?e:{};this.#b(t.prefix);de.bind(window,"storage",this.#v.bind(this));setInterval(this.#w.bind(this),5e3)}set(e,t,n=60){if(!i.isStringFilled(e)||i.isNil(t)){return false}try{window.localStorage.setItem(this.getPrefix()+e,`${Math.round(Date.now()/1e3)+n}:${this.#x(t)}`)}catch{console.error("LocalStorage error",e,n);return false}return true}get(e){const t=window.localStorage.getItem(this.getPrefix()+e);if(t){const n=this.#S(t);if(n===null){return null}const[r,i]=n;if(Date.now()<=r){return this.#B(i)}this.remove(e)}return null}remove(e){window.localStorage.removeItem(this.getPrefix()+e)}getPrefix(){if(this.#y===null){const e=Ee.hasMessage("USER_ID")?Ee.getMessage("USER_ID"):"";const t=Ee.hasMessage("SITE_ID")?Ee.getMessage("SITE_ID"):"admin";this.#y=`${this.getBasePrefix()}${e}-${t}-`}return this.#y}getBasePrefix(){return"bx"}#b(e){if(i.isString(e)){this.#y=`${this.getBasePrefix()}-${e}`}}#v(e){if(!i.isStringFilled(e.key)||!e.key.startsWith(this.getPrefix())){return}const t=e.key.slice(this.getPrefix().length);const n=this.#E(e.newValue);const r=this.#E(e.oldValue);const s={key:t,value:n,oldValue:r};if(t==="BXGCE"){if(n){const e=s.value;le.emit(e.e,new K({data:e.p,compatData:e.p}))}}else{if(e.newValue){le.emit("onLocalStorageSet",new K({data:[s],compatData:[s]}))}if(e.oldValue&&!e.newValue){le.emit("onLocalStorageRemove",new K({data:[s],compatData:[s]}))}le.emit("onLocalStorageChange",new K({data:[s],compatData:[s]}))}}#w(){const e=Date.now();for(let t=0;t<window.localStorage.length;t++){const n=window.localStorage.key(t);if(n!==null&&n.startsWith(this.getBasePrefix())){const t=window.localStorage.getItem(n);const r=this.#S(t);if(r===null){continue}const[i]=r;if(e>=i){window.localStorage.removeItem(n)}}}}#x(e){if(i.isJsonValue(e)){return JSON.stringify(e)}return e.toString()}#B(e){let t=null;if(i.isStringFilled(e)){try{t=JSON.parse(e)}catch{t=e}}return t}#E(e){const t=this.#S(e);if(t===null){return null}return this.#B(t[1])}#S(e){if(!this.#j(e)){return null}const[t]=e.split(":",1);const n=e.slice(t.length+1);return[parseInt(t,10)*1e3,n]}#j(e){return i.isStringFilled(e)&&/^\d{10}:/.test(e)}}const At=new Nt;class _t{static getRootWindow(){return this.getTopWindowOfCurrentHost(window)}static isCrossOriginObject(e){try{void e.location.host}catch{return true}return false}static getTopWindowOfCurrentHost(e){if(!this.isCrossOriginObject(e.parent)&&e.parent!==e&&e.parent.location.host===e.location.host){return this.getTopWindowOfCurrentHost(e.parent)}return e}static getParentWindowOfCurrentHost(e){if(this.isCrossOriginObject(e.parent)){return e}return e.parent}static redirect(e,t={}){if(!i.isStringFilled(e)){throw new Error('Redirect: "url" must be a non-empty string.')}const n=this.getRootWindow();let r=null;try{r=new URL(e,n.location.origin)}catch{throw new Error(`Redirect: invalid URL: ${e}`)}const s=i.isPlainObject(t)?t:{};if(!this.#T(r,s.allowedOrigins)){console.error(`Redirect: blocked potentially unsafe URL: ${r}`);return}const o=r.toString();if(s.newTab===true){const e=n.open(o,"_blank","noopener,noreferrer");if(e){e.opener=null}return}if(s.replaceHistory===true){n.location.replace(o)}else{n.location.assign(o)}}static reload(){const e=this.getRootWindow();e.location.reload()}static#T(e,t=[]){if(!(e instanceof URL)){return false}const n=["http:","https:"];if(!n.includes(e.protocol)){return false}const r=this.getRootWindow();if(e.origin===r.location.origin){return true}if(i.isArray(t)&&t.length>0){return t.includes(e.origin)}return false}}function Pt(e){if(i.isString(e)){return document.getElementById(e)}return e}function Lt(e){if(i.isElementNode(e)){return e.ownerDocument.parentWindow||e.ownerDocument.defaultView||window}if(i.isDomNode(e)){return e.parentWindow||e.defaultView||window}return window}
31class Ct{#X=null;constructor(e){const t=i.isPlainObject(e)?e:{};const n=i.isFunction(t.callback)?t.callback:null;const r=i.isFunction(t.callback_start)?t.callback_start:null;const s=i.isFunction(t.callback_complete)?t.callback_complete:null;const o={transition:"linear",duration:i.isNumber(t.time)&&t.time>0?t.time*1e3:1e3,begin:e=>{if(r!==null){r(i.isUndefined(e._param)?e:e._param)}},step:e=>{if(n!==null){n(i.isUndefined(e._param)?e:e._param)}},complete:e=>{if(s!==null){s(i.isUndefined(e._param)?e:e._param)}}};if(i.isPlainObject(t.start)){o.start=t.start;o.finish=t.finish}else{o.start={_param:t.start};o.finish={_param:t.finish}}if(t.type==="accelerated"){o.transition="quint"}else if(t.type==="decelerated"){t.transition="ease-out-quint"}this.#X=new Ot(o)}start(){this.#X.animate();return this}stop(e=false){this.#X.stop(e)}pause(){}static hide(e,t,n){return this.#O("hide",e,t,n)}static show(e,t,n){return this.#O("show",e,t,n)}static#O(e,t,n,r){let s={};let o=null;const a=i.isStringFilled(t)?document.getElementById(t):t;if(i.isPlainObject(n)&&i.isNil(r)){s=n;o=s.type}else if(i.isPlainObject(r)){s=r;o=n}if(!i.isStringFilled(o)){ge.style(a,"display",e==="show"?"block":"none");return undefined}const l=o==="scroll"?this.#N(a,s,e):this.#A(a,s,e);l.callback_complete=()=>{if(s.show!==false&&s.hide!==false){ge.style(a,"display",e==="show"?"block":"none")}if(s.callback_complete){s.callback_complete()}};return new Ct(l).start()}static#N(e,t,n){const r=t.direction==="horizontal"?"width":"height";let i=parseInt(String(ge.style(e,r)),10);if(Number.isNaN(i)){i=ge.getPosition(e)[r]}const s=i;const o=t.min_height?parseInt(t.min_height,10):0;return{start:s,finish:o,time:t.time||1,type:"linear",callback_start:()=>{if(ge.style(e,"position")==="static"){ge.style(e,"position","relative")}ge.style(e,"overflow","hidden");ge.style(e,r,`${s}px`);ge.style(e,"display","block")},callback:t=>{ge.style(e,r,`${t}px`)}}}static#A(e,t,n){return{time:t.time||1,type:n==="show"?"linear":"decelerated",start:n==="show"?0:100,finish:n==="show"?100:0,callback_start:()=>{ge.style(e,"display","block")},callback:t=>{ge.style(e,"opacity",t/100)}}}}const{getClass:Mt,namespace:It}=s;const kt=Be;const Dt=Ot;const Ft=Ct;const Rt=_t;const{replace:Ht,remove:Wt,clean:zt,insertBefore:Gt,insertAfter:$t,append:Ut,prepend:Vt,style:Yt,adjust:qt,create:Jt,isShown:Zt}=ge;const Kt=function e(){ge.addClass(...q.merge([],Array.from(arguments),[Pt(arguments[0])]))};const Qt=function e(){ge.removeClass(...q.merge(Array.from(arguments),[Pt(arguments[0])]))};const en=function e(){return ge.hasClass(...q.merge(Array.from(arguments),[Pt(arguments[0])]))};const tn=function e(){ge.toggleClass(...q.merge(Array.from(arguments),[Pt(arguments[0])]))};const nn=(e,t=false)=>{const n=Pt(e);if(i.isDomNode(n)){ge.clean(n);if(t){ge.remove(n);return n}}return n};const rn=Se.Cookie.get;const sn=(e,t,n={})=>{const r={...n};if(i.isNumber(r.expires)){r.expires/=3600*24}Se.Cookie.set(e,t,r)};const{bind:on,unbind:an,unbindAll:ln,bindOnce:un,ready:cn}=de;const{debugState:fn,isDebugEnabled:dn,default:hn}=j;const pn=e=>{if(e){x()}else{S()}};const{clone:mn,loadExtension:gn,debounce:yn,throttle:bn,html:vn}=q;const wn={...Object.getOwnPropertyNames(i).filter((e=>!["name","length","prototype","caller","arguments"].includes(e))).reduce(((e,t)=>{e[t]=i[t];return e}),{}),isNotEmptyString:e=>i.isString(e)&&e!=="",isNotEmptyObject:e=>i.isObjectLike(e)&&Object.keys(e).length>0,isMapKey:i.isObject,stringToInt:e=>{const t=parseInt(e);return!Number.isNaN(t)?t:0}};const xn={IsOpera:be.isOpera,IsIE:be.isIE,IsIE6:be.isIE6,IsIE7:be.isIE7,IsIE8:be.isIE8,IsIE9:be.isIE9,IsIE10:be.isIE10,IsIE11:be.isIE11,IsSafari:be.isSafari,IsFirefox:be.isFirefox,IsChrome:be.isChrome,DetectIeVersion:be.detectIEVersion,IsMac:be.isMac,IsAndroid:be.isAndroid,isIPad:be.isIPad,isIPhone:be.isIPhone,IsIOS:be.isIOS,IsMobile:be.isMobile,isRetina:be.isRetina,IsDoctype:be.isDoctype,SupportLocalStorage:be.isLocalStorageSupported,addGlobalClass:be.addGlobalClass,DetectAndroidVersion:be.detectAndroidVersion,isPropertySupported:be.isPropertySupported,addGlobalFeatures:be.addGlobalFeatures};const Sn=window.BX?window.BX.ajax:()=>{};function Bn(e=document){return{scrollWidth:e.documentElement.scrollWidth,scrollHeight:e.documentElement.scrollHeight}}function En(e=document){const t=Lt(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function jn(e=document){const t=Lt(e);
31return{innerWidth:t.innerWidth,innerHeight:t.innerHeight}}function Tn(e=document){return{...jn(e),...En(e),...Bn(e)}}function Xn(e){return Lt(e)}function On(e,t=false){if(!e){return(new DOMRect).toJSON()}if(e.ownerDocument===document&&!t){const t=e.getBoundingClientRect();const n=document.documentElement;const{body:r}=document;return{top:Math.round(t.top+(n.scrollTop||r.scrollTop)),left:Math.round(t.left+(n.scrollLeft||r.scrollLeft)),width:Math.round(t.right-t.left),height:Math.round(t.bottom-t.top),right:Math.round(t.right+(n.scrollLeft||r.scrollLeft)),bottom:Math.round(t.bottom+(n.scrollTop||r.scrollTop))}}let n=0;let r=0;const i=e.offsetWidth;const s=e.offsetHeight;let o=true;for(;e!=null;e=e.offsetParent){if(!o&&t&&window.BX.is_relative(e)){break}n+=e.offsetLeft;r+=e.offsetTop;if(o){o=false;continue}n+=c.toNumber(ge.style(e,"border-left-width"));r+=c.toNumber(ge.style(e,"border-top-width"))}return new DOMRect(n,r,i,s).toJSON()}function Nn(e,t,n){if(i.isString(e)){n=t;t=e;e=le.GLOBAL_TARGET}if(e===window){e=le.GLOBAL_TARGET}if(!i.isObject(e)){console.error('The "eventObject" argument must be an object. Received type '+typeof e+".");return}if(!i.isStringFilled(t)){console.error('The "eventName" argument must be a string.');return}if(!i.isFunction(n)){console.error('The "eventHandler" argument must be a function. Received type '+typeof n+".");return}t=t.toLowerCase();le.subscribe(e,t,n,{compatMode:true,useGlobalNaming:true})}function An(e,t,n,r){if(i.isString(e)){r=n;n=t;t=e;e=le.GLOBAL_TARGET}if(!i.isObject(e)||e===window){e=le.GLOBAL_TARGET}if(!n){n=[]}t=t.toLowerCase();const s=new K;s.setData(n);s.setCompatData(n);le.emit(e,t,s,{cloneData:r===true,useGlobalNaming:true})}function _n(e,t,n){if(i.isString(e)){n=t;t=e;e=le.GLOBAL_TARGET}if(!i.isFunction(n)){console.error('The "eventHandler" argument must be a function. Received type '+typeof n+".");return}if(e===window){e=le.GLOBAL_TARGET}t=t.toLowerCase();le.unsubscribe(e,t,n,{useGlobalNaming:true})}function Pn(e,t){if(i.isString(e)){t=e;e=le.GLOBAL_TARGET}if(e===window){e=le.GLOBAL_TARGET}t=t.toLowerCase();le.unsubscribeAll(e,t,{useGlobalNaming:true})}function Ln(e,t,n){At.set("BXGCE",{e:e,p:t},1);if(!n){An(e,t)}}e.BaseError=Z;e.Browser=be;e.Cache=ut;e.Collections=Tt;e.Dom=ge;e.Easing=Ot;e.Event=de;e.Extension=pt;e.GetContext=Xn;e.GetWindowInnerSize=jn;e.GetWindowScrollPos=En;e.GetWindowScrollSize=Bn;e.GetWindowSize=Tn;e.Http=Se;e.Loc=Ee;e.LocalStorage=Nt;e.Page=_t;e.PageObject=Rt;e.Reflection=s;e.Runtime=q;e.Tag=Ge;e.Text=c;e.Type=i;e.Uri=nt;e.Validation=rt;e.ZIndexManager=Bt;e.addClass=Kt;e.addCustomEvent=Nn;e.adjust=qt;e.ajax=Sn;e.append=Ut;e.bind=on;e.bindOnce=un;e.browser=xn;e.clean=zt;e.cleanNode=nn;e.clone=mn;e.create=Jt;e.debounce=yn;e.debug=hn;e.debugEnable=pn;e.debugEnableFlag=fn;e.debugStatus=dn;e.easing=Dt;e.fx=Ft;e.getClass=Mt;e.getCookie=rn;e.hasClass=en;e.html=vn;e.insertAfter=$t;e.insertBefore=Gt;e.isShown=Zt;e.loadExt=gn;e.localStorage=At;e.message=kt;e.namespace=It;e.onCustomEvent=An;e.onGlobalCustomEvent=Ln;e.pos=On;e.prepend=Vt;e.ready=cn;e.remove=Wt;e.removeAllCustomEvents=Pn;e.removeClass=Qt;e.removeCustomEvent=_n;e.replace=Ht;e.setCookie=sn;e.style=Yt;e.throttle=bn;e.toggleClass=tn;e.type=wn;e.unbind=an;e.unbindAll=ln})(this.BX=this.BX||{});(function(BX){var proxyList=new WeakMap;var deferList=new WeakMap;var deniedEvents=[];var customEvents=new WeakMap;var customEventsCnt=0;var garbageCollectors=[];var cssList=[];var cssInit=false;var jsList=[];var jsInit=false;var eventTypes={click:"MouseEvent",dblclick:"MouseEvent",mousedown:"MouseEvent",mousemove:"MouseEvent",mouseout:"MouseEvent",mouseover:"MouseEvent",mouseup:"MouseEvent",focus:"MouseEvent",blur:"MouseEvent"};var lastWait=[];var CHECK_FORM_ELEMENTS={tagName:/^INPUT|SELECT|TEXTAREA|BUTTON$/i};BX.MSLEFT=1;BX.MSMIDDLE=2;BX.MSRIGHT=4;BX.AM_PM_UPPER=1;BX.AM_PM_LOWER=2;BX.AM_PM_NONE=false;BX.ext=function(e){for(var t in e){if(e.hasOwnProperty(t)){this[t]=e[t]}}};var r={script:/<script([^>]*)>/gi,script_end:/<\/script>/gi,script_src:/src=["\']([^"\']+)["\']/i,script_type:/type=["\']([^"\']+)["\']/i,space:/\s+/,ltrim:/^[\s\r\n]+/g,rtrim:/[\s\r\n]+$/g,style:/<link[^>
31]*?(rel="stylesheet"|type="text\/css")[^>]*>/i,style_href:/href=["\']([^"\']+)["\']/i};BX.processHTML=function(e,t){var n,i,s,o,a,l=[],u=[];var c=[];var f=r.script.lastIndex=r.script_end.lastIndex=0;while((n=r.script.exec(e))!==null){r.script_end.lastIndex=r.script.lastIndex;var d=r.script_end.exec(e);if(d===null){break}var h=false;if((a=n[1].match(r.script_type))!==null){if(a[1]=="text/html"||a[1]=="text/template"||a[1]=="extension/settings"){h=true}}if(h){c.push([f,r.script_end.lastIndex-f])}else{c.push([f,n.index-f]);var p=t||n[1].indexOf("bxrunfirst")!="-1";if((s=n[1].match(r.script_src))!==null){l.push({bRunFirst:p,isInternal:false,JS:s[1]})}else{var m=n.index+n[0].length;var g=e.substr(m,d.index-m);l.push({bRunFirst:p,isInternal:true,JS:g})}}f=d.index+9;r.script.lastIndex=f}c.push([f,f===0?e.length:e.length-f]);var y="";for(var b=0,v=c.length;b<v;b++){if(BX.type.isString(e)&&BX.type.isFunction(e.substr)){y+=e.substr(c[b][0],c[b][1])}}while((i=y.match(r.style))!==null){if((o=i[0].match(r.style_href))!==null&&i[0].indexOf('media="')<0){u.push(o[1])}y=y.replace(i[0],"")}return{HTML:y,SCRIPT:l,STYLE:u}};BX.extend=function(e,t){var n=function(){};n.prototype=t.prototype;e.prototype=new n;e.prototype.constructor=e;e.superclass=t.prototype;e.prototype.superclass=t.prototype;if(t.prototype.constructor==Object.prototype.constructor){t.prototype.constructor=t}};BX.is_subclass_of=function(e,t){if(e instanceof t)return true;if(t.superclass)return BX.is_subclass_of(e,t.superclass);return false};BX.clearNodeCache=function(){return false};BX.bitrix_sessid=function(){return BX.message("bitrix_sessid")};BX.createFragment=function(e){var t=document.createDocumentFragment();if(!BX.type.isArray(e)){return t}for(var n=0;n<e.length;n++){t.appendChild(e[n])}return t};BX.setOpacity=function(e,t){var n=parseFloat(t);if(!isNaN(n)&&BX.type.isDomNode(e)){n=n<1?n:n/100;BX.style(e,"opacity",n)}};BX.hoverEvents=function(e){if(e)return BX.adjust(e,{events:BX.hoverEvents()});else return{mouseover:BX.hoverEventsHover,mouseout:BX.hoverEventsHout}};BX.hoverEventsHover=function(){BX.addClass(this,"bx-hover");this.BXHOVER=true};BX.hoverEventsHout=function(){BX.removeClass(this,"bx-hover");this.BXHOVER=false};BX.focusEvents=function(e){if(e)return BX.adjust(e,{events:BX.focusEvents()});else return{mouseover:BX.focusEventsFocus,mouseout:BX.focusEventsBlur}};BX.focusEventsFocus=function(){BX.addClass(this,"bx-focus");this.BXFOCUS=true};BX.focusEventsBlur=function(){BX.removeClass(this,"bx-focus");this.BXFOCUS=false};BX.setUnselectable=function(e){BX.style(e,{userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none"});e.setAttribute("unSelectable","on")};BX.setSelectable=function(e){BX.style(e,{userSelect:null,MozUserSelect:null,WebkitUserSelect:null,KhtmlUserSelect:null});e.removeAttribute("unSelectable")};BX.styleIEPropertyName=function(e){if(e=="float")e=BX.browser.IsIE()?"styleFloat":"cssFloat";else{var t=BX.browser.isPropertySupported(e);if(t){e=t}else{var n=/(\-([a-z]){1})/g;if(n.test(e)){e=e.replace(n,(function(){return arguments[2].toUpperCase()}))}}}return e};BX.focus=function(e){try{e.focus();return true}catch(e){return false}};BX.firstChild=function(e){return BX.type.isDomNode(e)?e.firstElementChild:null};BX.lastChild=function(e){return BX.type.isDomNode(e)?e.lastElementChild:null};BX.previousSibling=function(e){return BX.type.isDomNode(e)?e.previousElementSibling:null};BX.nextSibling=function(e){return BX.type.isDomNode(e)?e.nextElementSibling:null};BX.findChildrenByClassName=function(e,t,n){if(!e||!e.childNodes)return null;var r=[];if(typeof e.getElementsByClassName=="undefined"){n=n!==false;r=BX.findChildren(e,{className:t},n)}else{var s=e.getElementsByClassName(t);for(i=0,l=s.length;i<l;i++){r[i]=s[i]}}return r};BX.findChildByClassName=function(e,t,n){if(!e||!e.childNodes)return null;var r=null;if(typeof e.getElementsByClassName=="undefined"){n=n!==false;r=BX.findChild(e,{className:t},n)}else{var i=e.getElementsByClassName(t);if(i&&typeof i[0]!="undefined"){r=i[0]}else{r=null}}return r};BX.findChildren=function(e,t,n){return BX.findChild(e,t,n,true)};BX.findChild=function(e,t,n,r){if(!e||!e.childNodes)return null;n=!!n;r=!!r;var i=e.childNodes.length,s=[];for(var o=0;o<i;o++){var a=e.childNodes[o];if(_checkNode(a,t)){if(r)s.push(a);else return a}if(n==true){var l=BX.findChild(a,t,n,r);if(l){if(r)s=BX.util.array_merge(s,l);else return l}}}if(r||s.length>0)return s;else return null};BX.findParent=function(e,t,n){if(!e)return null;var r=e;while(r.parentNode){var i=r.parentNode;if(_checkNode(i,t))return i;r=i;if(!!n&&(BX.type.isFunction(n)||typeof n=="object")){if(BX.type.isElementNode(n)){if(r==n)break}else{if(_checkNode(r,n))break}}}return null};BX.findNextSibling=function(e,t){if(!e)return null;var n=e;while(n.nextSibling){var r=n.nextSibling;if(_checkNode(r,t))return r;n=r}return null};BX.findPreviousSibling=function(e,t){if(!e)return null;var n=e;while(n.previousSibling){var r=n.previousSibling;if(_checkNode(r,t))return r;n=r}return null};BX.checkNode=function(e,t){return _checkNode(e,t)};BX.findFormElements=function(e){if(BX.type.isString(e))e=document.forms[e]||BX(e);var t=[];if(BX.type.isElementNode(e)){if(e.tagName.toUpperCase()=="FORM"){t=e.elements}else{t=BX.findChildren(e,CHECK_FORM_ELEMENTS,true)}}return t};BX.isParentForNode=function(e,t){if(BX.type.isDomNode(e)&&BX.type.isDomNode(t)){return e.contains(t)}return false};BX.getCaretPosition=function(e){var t=0;if(e.selectionStart||e.selectionStart==0){t=e.selectionStart}else if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length);t=n.text.length}return t};BX.setCaretPosition=function(e,t){if(!BX.isNodeInDom(e)||BX.isNodeHidden(e)||e.disabled){return}if(e.setSelectionRange){e.focus();e.setSelectionRange(t,t)}else if(e.createTextRange){var n=e.createTextRange();n.collapse(true);n.moveEnd("character",t);n.moveStart("character",t);n.select()}};BX.merge=function(){var e=Array.prototype.slice.call(arguments);if(e.length<2)return{};var t=e.shift();for(var n=0;n<e.length;n++){for(var r in e[n]){if(typeof e[n]=="undefined"||e[n]==null)continue;if(e[n].hasOwnProperty(r)){if(typeof e[n][r]=="undefined"||e[n][r]==null)continue;
31if(typeof e[n][r]=="object"&&!BX.type.isDomNode(e[n][r])&&typeof e[n][r]["isUIWidget"]=="undefined"){var i="length"in e[n][r];if(typeof t[r]!="object")t[r]=i?[]:{};if(i)BX.util.array_merge(t[r],e[n][r]);else BX.merge(t[r],e[n][r])}else t[r]=e[n][r]}}}return t};BX.mergeEx=function(){var e=Array.prototype.slice.call(arguments);if(e.length<2){return{}}var t=e.shift();for(var n=0;n<e.length;n++){for(var r in e[n]){if(typeof e[n]=="undefined"||e[n]==null||!e[n].hasOwnProperty(r)){continue}if(BX.type.isPlainObject(e[n][r])&&BX.type.isPlainObject(t[r])){BX.mergeEx(t[r],e[n][r])}else{t[r]=BX.type.isPlainObject(e[n][r])?BX.clone(e[n][r]):e[n][r]}}}return t};BX.getEventButton=function(e){e=e||window.event;var t=0;if(typeof e.which!="undefined"){switch(e.which){case 1:t=t|BX.MSLEFT;break;case 2:t=t|BX.MSMIDDLE;break;case 3:t=t|BX.MSRIGHT;break}}else if(typeof e.button!="undefined"){t=event.button}return t||BX.MSLEFT};var captured_events=null,_bind=null;BX.CaptureEvents=function(e,t){if(_bind)return;_bind=BX.bind;captured_events=[];BX.bind=function(n,r,i){if(n===e&&r===t)captured_events.push(i);_bind.apply(this,arguments)}};BX.CaptureEventsGet=function(){if(_bind){BX.bind=_bind;var e=captured_events;_bind=null;captured_events=null;return e}return null};BX.fireEvent=function(e,t){var n=false,r=null;if(BX.type.isDomNode(e)){n=true;if(document.createEventObject){if(eventTypes[t]!="MouseEvent"){r=document.createEventObject();r.type=t;n=e.fireEvent("on"+t,r)}if(e[t]){e[t]()}}else{r=null;switch(eventTypes[t]){case"MouseEvent":r=document.createEvent("MouseEvent");try{r.initMouseEvent(t,true,true,top,1,0,0,0,0,0,0,0,0,0,null)}catch(e){r.initMouseEvent(t,true,true,window,1,0,0,0,0,0,0,0,0,0,null)}break;default:r=document.createEvent("Event");r.initEvent(t,true,true)}n=e.dispatchEvent(r)}}return n};BX.getWheelData=function(e){e=e||window.event;e.wheelData=e.detail?e.detail*-1:e.wheelDelta/40;return e.wheelData};BX.proxy_context=null;BX.delegate=function(e,t){if(!e||!t)return e;return function(){var n=BX.proxy_context;BX.proxy_context=this;var r=e.apply(t,arguments);BX.proxy_context=n;return r}};BX.delegateLater=function(e,t,n){return function(){if(t[e]){var r=BX.proxy_context;BX.proxy_context=this;var i=t[e].apply(n||t,arguments);BX.proxy_context=r;return i}return null}};BX.proxy=function(e,t){return getObjectDelegate(e,t,proxyList)};BX.defer=function(e,t){if(!!t)return BX.defer_proxy(e,t);else return function(){var t=arguments;setTimeout((function(){e.apply(this,t)}),10)}};BX.defer_proxy=function(e,t){return getObjectDelegate(e,t,deferList,BX.defer)};function getObjectDelegate(e,t,n,r){if(!BX.type.isFunction(e)||!BX.type.isMapKey(t)){return e}var i=n.get(t);if(!i){i=new WeakMap;n.set(t,i)}var s=i.get(e);if(!s){s=r?r(BX.delegate(e,t)):BX.delegate(e,t);i.set(e,s)}return s}BX.once=function(e,t,n){var r=function(){BX.unbind(e,t,r);n.apply(this,arguments)};return r};BX.bindDelegate=function(e,t,n,r){var i=BX.delegateEvent(n,r);BX.bind(e,t,i);return i};BX.delegateEvent=function(e,t){return function(n){n=n||window.event;var r=n.target||n.srcElement;while(r!=this){if(_checkNode(r,e)){return t.call(r,n)}if(r&&r.parentNode)r=r.parentNode;else break}return null}};BX.False=function(){return false};BX.DoNothing=function(){};BX.denyEvent=function(e,t){deniedEvents.push([e,t,e["on"+t]]);e["on"+t]=BX.DoNothing};BX.allowEvent=function(e,t){for(var n=0,r=deniedEvents.length;n<r;n++){if(deniedEvents[n][0]==e&&deniedEvents[n][1]==t){e["on"+t]=deniedEvents[n][2];BX.util.deleteFromArray(deniedEvents,n);return}}};BX.fixEventPageXY=function(e){BX.fixEventPageX(e);BX.fixEventPageY(e);return e};BX.fixEventPageX=function(e){if(e.pageX==null&&e.clientX!=null){e.pageX=e.clientX+(document.documentElement&&document.documentElement.scrollLeft||document.body&&document.body.scrollLeft||0)-(document.documentElement.clientLeft||0)}return e};BX.fixEventPageY=function(e){if(e.pageY==null&&e.clientY!=null){e.pageY=e.clientY+(document.documentElement&&document.documentElement.scrollTop||document.body&&document.body.scrollTop||0)-(document.documentElement.clientTop||0)}return e};BX.PreventDefault=function(e){if(!e)e=window.event;if(e.stopPropagation){e.preventDefault();e.stopPropagation()}else{e.cancelBubble=true;e.returnValue=false}return false};BX.eventReturnFalse=function(e){e=e||window.event;if(e&&e.preventDefault)e.preventDefault();else e.returnValue=false;return false};BX.eventCancelBubble=function(e){e=e||window.event;if(e&&e.stopPropagation)e.stopPropagation();else e.cancelBubble=true};BX.bindDebouncedChange=function(e,t,n,r,i){i=i||window;r=r||300;var s="bx-dc-previous-value";BX.data(e,s,e.value);var o=function(t,n){var r=BX.data(e,s);if(typeof r=="undefined"||r!=n){if(typeof i!="object")t(n);else t.apply(i,[n])}};var a=BX.debounce((function(){var n=e.value;o(t,n);BX.data(e,s,n)}),r);BX.bind(e,"keyup",a);BX.bind(e,"change",a);BX.bind(e,"input",a);if(BX.type.isFunction(n)){var l=function(){o(n,e.value)};BX.bind(e,"keyup",l);BX.bind(e,"change",l);BX.bind(e,"input",l)}};BX.parseJSON=function(data,context){var result=null;if(BX.type.isNotEmptyString(data)){try{if(data.indexOf("\n")>=0)eval("result = "+data);else result=new Function("return "+data)()}catch(e){BX.onCustomEvent(context,"onParseJSONFailure",[data,context])}}else if(BX.type.isPlainObject(data)){return data}return result};BX.submit=function(e,t,n,r){t=t||"save";if(!e["BXFormSubmit_"+t]){e["BXFormSubmit_"+t]=e.appendChild(BX.create("INPUT",{props:{type:"submit",name:t,value:n||"Y"},style:{display:"none"}}))}
31if(e.sessid)e.sessid.value=BX.bitrix_sessid();setTimeout(BX.delegate((function(){BX.fireEvent(this,"click");if(r)r()}),e["BXFormSubmit_"+t]),10)};BX.show=function(e,t){if(e.BXDISPLAY||!_checkDisplay(e,t)){e.style.display=e.BXDISPLAY}};BX.hide=function(e,t){if(!e.BXDISPLAY)_checkDisplay(e,t);e.style.display="none"};BX.toggle=function(e,t){if(!t&&BX.type.isElementNode(e)){var n=true;if(e.BXDISPLAY)n=!_checkDisplay(e);else n=e.style.display=="none";if(n)BX.show(e);else BX.hide(e)}else if(BX.type.isArray(t)){for(var r=0,i=t.length;r<i;r++){if(e==t[r]){e=t[r==i-1?0:r+1];break}}if(r==i)e=t[0]}return e};function _checkDisplay(e,t){if(typeof t!="undefined")e.BXDISPLAY=t;var n=e.style.display||BX.style(e,"display");if(n!="none"){e.BXDISPLAY=e.BXDISPLAY||n;return true}else{e.BXDISPLAY=e.BXDISPLAY||"block";return false}}BX.util={array_values:function(e){if(!BX.type.isArray(e))return BX.util._array_values_ob(e);var t=[];for(var n=0,r=e.length;n<r;n++)if(e[n]!==null&&typeof e[n]!="undefined")t.push(e[n]);return t},_array_values_ob:function(e){var t=[];for(var n in e)if(e[n]!==null&&typeof e[n]!="undefined")t.push(e[n]);return t},array_keys:function(e){if(!BX.type.isArray(e))return BX.util._array_keys_ob(e);var t=[];for(var n=0,r=e.length;n<r;n++)if(e[n]!==null&&typeof e[n]!="undefined")t.push(n);return t},_array_keys_ob:function(e){var t=[];for(var n in e)if(e[n]!==null&&typeof e[n]!="undefined")t.push(n);return t},object_keys:function(e){var t=[];for(var n in e){if(e.hasOwnProperty(n)){t.push(n)}}return t},array_merge:function(e,t){if(!BX.type.isArray(e))e=[];if(!BX.type.isArray(t))t=[];var n=e.length,r=0;if(typeof t.length==="number"){for(var i=t.length;r<i;r++){e[n++]=t[r]}}else{while(t[r]!==undefined){e[n++]=t[r++]}}e.length=n;return e},array_flip:function(e){var t={};for(var n in e){t[e[n]]=n}return t},array_diff:function(e,t,n){n=BX.type.isFunction(n)?n:null;var r,i,s,o,a={},l=[];for(r=0,i=t.length;r<i;r++){s=t[r];o=n?n(s):s;a[o]=true}for(r=0,i=e.length;r<i;r++){s=e[r];o=n?n(s):s;if(typeof a[o]==="undefined"){l.push(s)}}return l},array_unique:function(e){var t=0,n,r=e.length;if(r<2)return e;for(;t<r-1;t++){for(n=t+1;n<r;n++){if(e[t]==e[n]){e.splice(n--,1);r--}}}return e},in_array:function(e,t){for(var n=0;n<t.length;n++){if(t[n]==e)return true}return false},array_search:function(e,t){for(var n=0;n<t.length;n++){if(t[n]==e)return n}return-1},object_search_key:function(e,t){if(typeof t[e]!="undefined")return t[e];for(var n in t){if(typeof t[n]=="object"){var r=BX.util.object_search_key(e,t[n]);if(r!==false)return r}}return false},trim:function(e){if(BX.type.isString(e)){return e.trim()}return e},urlencode:function(e){return encodeURIComponent(e)},deleteFromArray:function(e,t){return e.slice(0,t).concat(e.slice(t+1))},insertIntoArray:function(e,t,n){return e.slice(0,t).concat([n]).concat(e.slice(t))},htmlspecialchars:function(e){return BX.Text.encode(e)},htmlspecialcharsback:function(e){return BX.Text.decode(e)},preg_quote:function(e,t){if(!e.replace)return e;return e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(t||"")+"-]","g"),"\\$&")},jsencode:function(e){if(!e||!e.replace)return e;var t=[{c:"\\\\",r:"\\\\"},{c:"\\t",r:"\\t"},{c:"\\n",r:"\\n"},{c:"\\r",r:"\\r"},{c:'"',r:'\\"'},{c:"'",r:"\\'"},{c:"<",r:"\\x3C"},{c:">",r:"\\x3E"},{c:"\\u2028",r:"\\u2028"},{c:"\\u2029",r:"\\u2029"}];for(var n=0;n<t.length;n++)e=e.replace(new RegExp(t[n].c,"g"),t[n].r);return e},getCssName:function(e){if(!BX.type.isNotEmptyString(e)){return""}return e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))},getJsName:function(e){var t=/\-([a-z]){1}/g;if(t.test(e)){return e.replace(t,(function(e,t){return t.toUpperCase()}))}return e},nl2br:function(e){if(!e||!e.replace)return e;return e.replace(/([^>])\n/g,"$1<br/>")},str_pad:function(e,t,n,r){n=n||" ";r=r||"right";e=e.toString();if(r==="left"){return BX.util.str_pad_left(e,t,n)}return BX.util.str_pad_right(e,t,n)},str_pad_left:function(e,t,n){return e.toString().padStart(t,n)}
31,str_pad_right:function(e,t,n){return e.toString().padEnd(t,n)},strip_tags:function(e){return e.split(/<[^>]+>/g).join("")},strip_php_tags:function(e){return e.replace(/<\?(.|[\r\n])*?\?>/g,"")},popup:function(e,t,n){var r,i;if(BX.browser.IsOpera()){r=document.body.offsetWidth;i=document.body.offsetHeight}else{r=screen.width;i=screen.height}return window.open(e,"","status=no,scrollbars=yes,resizable=yes,width="+t+",height="+n+",top="+Math.floor((i-n)/2-14)+",left="+Math.floor((r-t)/2-5))},shuffle:function(e){var t,n;var r=e.length;while(0!==r){n=Math.floor(Math.random()*r);r-=1;t=e[r];e[r]=e[n];e[n]=t}return e},objectSort:function(e,t,n){n=n=="asc"?"asc":"desc";var r=[],i;for(i in e){if(e.hasOwnProperty(i)&&e[i][t]){r.push([i,e[i][t]])}}if(n=="asc"){r.sort((function(e,t){var n,r;if(BX.type.isDate(e[1])){n=e[1].getTime()}else if(!isNaN(e[1])){n=parseInt(e[1])}else{n=e[1].toString().toLowerCase()}if(BX.type.isDate(t[1])){r=t[1].getTime()}else if(!isNaN(t[1])){r=parseInt(t[1])}else{r=t[1].toString().toLowerCase()}if(n>r)return 1;else if(n<r)return-1;else return 0}))}else{r.sort((function(e,t){var n,r;if(BX.type.isDate(e[1])){n=e[1].getTime()}else if(!isNaN(e[1])){n=parseInt(e[1])}else{n=e[1].toString().toLowerCase()}if(BX.type.isDate(t[1])){r=t[1].getTime()}else if(!isNaN(t[1])){r=parseInt(t[1])}else{r=t[1].toString().toLowerCase()}if(n<r)return 1;else if(n>r)return-1;else return 0}))}var s=Array();for(i=0;i<r.length;i++){s.push(e[r[i][0]])}return s},objectMerge:function(){return BX.mergeEx.apply(window,arguments)},objectClone:function(e){return BX.clone(e,true)},hex2rgb:function(e){var t=e.replace(/[# ]/g,"").replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3").match(/.{2}/g);for(var n=0;n<3;n++){t[n]=parseInt(t[n],16)}return{r:t[0],g:t[1],b:t[2]}},remove_url_param:function(e,t){return BX.Uri.removeParam(e,t)},add_url_param:function(e,t){var n=Object.entries(t).reduce((function(e,t){e[t[0]]=BX.type.isArray(t[1])?t[1].join():t[1];return e}),{});return BX.Uri.addParam(e,n)},buildQueryString:function(e){var t="";for(var n in e){var r=e[n];if(BX.type.isArray(r)){r.forEach((function(e,r){t+=encodeURIComponent(n+"["+r+"]")+"="+encodeURIComponent(e)+"&"}))}else{t+=encodeURIComponent(n)+"="+encodeURIComponent(r)+"&"}}if(t.length>0){t=t.substr(0,t.length-1)}return t},even:function(e){return parseInt(e)%2==0},hashCode:function(e){if(!BX.type.isNotEmptyString(e)){return 0}var t=0;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r;t=t&t}return t},getRandomString:function(e){return BX.Text.getRandom(e)},number_format:function(e,t,n,r){var i,s,o,a,l,u="";t=Math.abs(t);if(isNaN(t)||t<0){t=2}n=n||",";if(typeof r==="undefined")r=".";e=(+e||0).toFixed(t);if(e<0){u="-";e=-e}i=parseInt(e,10)+"";s=i.length>3?i.length%3:0;l=s?i.substr(0,s)+r:"";o=i.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+r);a=t?n+Math.abs(e-i).toFixed(t).replace(/-/,"0").slice(2):"";return u+l+o+a},getExtension:function(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()},addObjectToForm:function(e,t,n){if(!BX.type.isString(n)){n=""}for(var r in e){if(!e.hasOwnProperty(r)){continue}var i=e[r];var s=n!==""?n+"["+r+"]":r;if(BX.type.isArray(i)){var o={};for(var a=0;a<i.length;a++){o[a]=i[a]}BX.util.addObjectToForm(o,t,s)}else if(BX.type.isPlainObject(i)){BX.util.addObjectToForm(i,t,s)}else{i=BX.type.isFunction(i.toString)?i.toString():"";if(i!==""){t.appendChild(BX.create("INPUT",{attrs:{type:"hidden",name:s,value:i}}))}}}},observe:function(e,t){console.error("BX.util.observe: function is no longer supported by browser.");return false},escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}};BX.validation={checkIfEmail:function(e){var t="[=a-z0-9_+~'!$&*^`|#%/?{}-]";return new RegExp("^\\s*"+t+"+(\\."+t+"+)*@([a-z0-9-]+\\.)+[a-z0-9-]{2,20}\\s*$","i").test(e)},checkIfPhone:function(e){var t=new RegExp(typeof BX.PhoneNumber==="undefined"?BX.PhoneNumber.getValidNumberPattern():"^\\s*\\+?s*[0-9(-)\\s]+\\s*$","i");return t.test(e)}};BX.prop={get:function(e,t,n){return e&&e.hasOwnProperty(t)?e[t]:n},getObject:function(e,t,n){return e&&BX.type.isPlainObject(e[t])?e[t]:n},getElementNode:function(e,t,n){return e&&BX.type.isElementNode(e[t])?e[t]:n},getArray:function(e,t,n){return e&&BX.type.isArray(e[t])?e[t]:n},getFunction:function(e,t,n){return e&&BX.type.isFunction(e[t])?e[t]:n},getNumber:function(e,t,n){if(!(e&&e.hasOwnProperty(t))){return n}var r=e[t];if(BX.type.isNumber(r)){return r}r=parseFloat(r);return!isNaN(r)?r:n},getInteger:function(e,t,n){if(!(e&&e.hasOwnProperty(t))){return n}var r=e[t];if(BX.type.isNumber(r)){return r}r=parseInt(r);return!isNaN(r)?r:n},getBoolean:function(e,t,n){if(!(e&&e.hasOwnProperty(t))){return n}var r=e[t];return BX.type.isBoolean(r)?r:BX.type.isString(r)?r.toLowerCase()==="true":!!r},getString:function(e,t,n){if(!(e&&e.hasOwnProperty(t))){return n}var r=e[t];return BX.type.isString(r)?r:r?r.toString():""}
31,extractDate:function(e){if(!BX.type.isDate(e)){e=new Date}e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);return e}};BX.isNodeInDom=function(e,t){return e===(t||document)?true:e.parentNode?BX.isNodeInDom(e.parentNode):false};BX.isNodeHidden=function(e){if(e===document)return false;else if(BX.style(e,"display")=="none")return true;else return e.parentNode?BX.isNodeHidden(e.parentNode):true};BX.evalPack=function(e){while(e.length>0){var t=e.shift();if(t.TYPE=="SCRIPT_EXT"||t.TYPE=="SCRIPT_SRC"){BX.loadScript(t.DATA,(function(){BX.evalPack(e)}));return}else if(t.TYPE=="SCRIPT"){BX.evalGlobal(t.DATA)}}};BX.evalGlobal=function(e){if(e){var t=document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("script");n.type="text/javascript";if(!BX.browser.IsIE()){n.appendChild(document.createTextNode(e))}else{n.text=e}t.insertBefore(n,t.firstChild);t.removeChild(n)}};BX.garbage=function(e,t){garbageCollectors.push({callback:e,context:t})};BX.GetDocElement=function(e){e=e||document;return BX.browser.IsDoctype(e)?e.documentElement:e.body};BX.scrollTop=function(e,t){if(typeof t!="undefined"){if(e==window){throw new Error("scrollTop() for window is not implemented")}else e.scrollTop=parseInt(t)}else{if(e==window)return BX.GetWindowScrollPos().scrollTop;return e.scrollTop}};BX.scrollLeft=function(e,t){if(typeof t!="undefined"){if(e==window){throw new Error("scrollLeft() for window is not implemented")}else e.scrollLeft=parseInt(t)}else{if(e==window)return BX.GetWindowScrollPos().scrollLeft;return e.scrollLeft}};BX.hide_object=function(e){e=BX(e);e.style.position="absolute";e.style.top="-1000px";e.style.left="-1000px";e.style.height="10px";e.style.width="10px"};BX.is_relative=function(e){var t=BX.style(e,"position");return t=="relative"||t=="absolute"};BX.is_float=function(e){var t=BX.style(e,"float");return t=="right"||t=="left"};BX.is_fixed=function(e){var t=BX.style(e,"position");return t=="fixed"};BX.width=function(e,t){if(typeof t!="undefined")BX.style(e,"width",parseInt(t)+"px");else{if(e==window)return window.innerWidth;return BX.pos(e).width}};BX.height=function(e,t){if(typeof t!="undefined")BX.style(e,"height",parseInt(t)+"px");else{if(e==window)return window.innerHeight;return BX.pos(e).height}};BX.align=function(e,t,n,r){if(r)r=r.toLowerCase();else r="";var i=document;if(BX.type.isElementNode(e)){i=e.ownerDocument;e=BX.pos(e)}var s=e["left"],o=e["bottom"];var a=BX.GetWindowScrollPos(i);var l=BX.GetWindowInnerSize(i);if(l.innerWidth+a.scrollLeft-(e["left"]+t)<0){if(e["right"]-t>=0)s=e["right"]-t;else s=a.scrollLeft}if(l.innerHeight+a.scrollTop-(e["bottom"]+n)<0||~r.indexOf("top")){if(e["top"]-n>=0||~r.indexOf("top"))o=e["top"]-n;else o=a.scrollTop}return{left:s,top:o}};BX.scrollToNode=function(e){var t=BX(e);if(t.scrollIntoView)t.scrollIntoView(true);else{var n=BX.pos(t);window.scrollTo(n.left,n.top)}};BX.showWait=function(e,t){e=BX(e)||document.body||document.documentElement;t=t||BX.message("JS_CORE_LOADING");var n=e.id||Math.random();var r=e.bxmsg=document.body.appendChild(BX.create("DIV",{props:{id:"wait_"+n},style:{background:'url("/bitrix/js/main/core/images/wait.gif") no-repeat scroll 10px center #fcf7d1',border:"1px solid #E1B52D",color:"black",fontFamily:"Verdana,Arial,sans-serif",fontSize:"11px",padding:"10px 30px 10px 37px",position:"absolute",textAlign:"center"},text:t}));BX.ZIndexManager.register(r);BX.ZIndexManager.bringToFront(r);setTimeout(BX.delegate(_adjustWait,e),10);lastWait[lastWait.length]=r;return r};BX.closeWait=function(e,t){if(e&&!t)t=e.bxmsg;if(e&&!t&&BX.hasClass(e,"bx-core-waitwindow"))t=e;if(e&&!t)t=BX("wait_"+e.id);if(!t)t=lastWait.pop();if(t&&t.parentNode){for(var n=0,r=lastWait.length;n<r;n++){if(t==lastWait[n]){lastWait=BX.util.deleteFromArray(lastWait,n);break}}BX.ZIndexManager.unregister(t);t.parentNode.removeChild(t);if(e)e.bxmsg=null;BX.cleanNode(t,true)}};BX.setJSList=function(e){if(BX.type.isArray(e)){e=e.map((function(e){return normalizeUrl(e)}));jsList=jsList.concat(e)}};BX.getJSList=function(){initJsList();return jsList};BX.setCSSList=function(e){if(BX.type.isArray(e)){e=e.map((function(e){return normalizeUrl(e)}));cssList=cssList.concat(e)}};BX.getCSSList=function(){initCssList();return cssList};
31BX.getJSPath=function(e){return e.replace(/^(http[s]*:)*\/\/[^\/]+/i,"")};BX.getCSSPath=function(e){return e.replace(/^(http[s]*:)*\/\/[^\/]+/i,"")};BX.getCDNPath=function(e){return e};BX.loadScript=function(e,t,n){if(BX.type.isString(e)){e=[e]}return BX.load(e,t,n)};BX.loadCSS=function(e,t,n){if(BX.type.isString(e)){e=[e]}if(BX.type.isArray(e)){e=e.map((function(e){return{url:e,ext:"css"}}));BX.load(e,null,t)}};const LOADING=3;const LOADED=4;const assets={};const loadingAssetCallbacks={};BX.load=function(e,t,n,r){if(!BX.isReady){var i=arguments;BX.ready((function(){BX.load.apply(this,i)}));return null}n=n||document;t=BX.Type.isFunction(t)?t:()=>{};return loadAsync(e,t,n,r)};function loadAsync(e,t,n,r){if(!BX.type.isArray(e)){t();return}function i(){const e=o.shift();if(e){load(e,i,n,r)}else if(s()){t()}}function s(){for(const e in a){if(a[e].state!==LOADED){return false}}return true}const o=[];const a={};e.forEach((e=>{const t=getAsset(e);if(t&&t.state!==LOADED){o.push(t);a[t.name]=t}}));if(o.length>0){const e=6;const t=Math.min(o.length,e);const s=o.splice(0,t);s.forEach((e=>{load(e,i,n,r)}))}else{t()}}function load(e,t,n,r){t=t||BX.DoNothing;if(e.state===LOADED){t();return}if(e.state===LOADING){if(!BX.Type.isArray(loadingAssetCallbacks[e.name])){loadingAssetCallbacks[e.name]=[]}loadingAssetCallbacks[e.name].push(t);return}e.state=LOADING;const i=()=>{delete assets[e.name];delete loadingAssetCallbacks[e.name];r()};loadAsset(e,(function(){e.state=LOADED;t();if(BX.Type.isArrayFilled(loadingAssetCallbacks[e.name])){for(const t of loadingAssetCallbacks[e.name]){t()}}delete loadingAssetCallbacks[e.name]}),n,BX.Type.isFunction(r)?i:null)}function loadAsset(e,t,n,r){t=t||BX.DoNothing;function i(n){window.clearTimeout(e.errorTimeout);window.clearTimeout(e.cssTimeout);a.onload=a.onreadystatechange=a.onerror=null;if(BX.Type.isFunction(r)){r()}else{t()}}function s(r){if(l==="css"){cssList.push(normalizeMinUrl(normalizeUrl(e.url)))}else{jsList.push(normalizeMinUrl(normalizeUrl(e.url)))}r=r||window.event;if(r.type==="load"||/loaded|complete/.test(a.readyState)&&(!n.documentMode||n.documentMode<9)){window.clearTimeout(e.errorTimeout);window.clearTimeout(e.cssTimeout);a.onload=a.onreadystatechange=a.onerror=null;t()}}function o(){if(e.state!==LOADED&&e.cssRetries<=20){for(var t=0,r=n.styleSheets.length;t<r;t++){if(n.styleSheets[t].href===a.href){s({type:"load"});return}}e.cssRetries++;e.cssTimeout=window.setTimeout(o,250)}}let a=null;const l=BX.type.isNotEmptyString(e.ext)?e.ext:BX.util.getExtension(e.url);if(l==="css"){a=n.createElement("link");a.type="text/"+(e.type||"css");a.rel="stylesheet";a.href=e.url;e.cssRetries=0;e.cssTimeout=window.setTimeout(o,500)}else{a=n.createElement("script");a.type="text/"+(e.type||"javascript");a.src=e.url}a.onload=a.onreadystatechange=s;a.onerror=i;a.async=e.async===true;a.defer=false;e.errorTimeout=window.setTimeout((function(){i({type:"timeout"})}),7e3);let u=null;const c=n.head||n.getElementsByTagName("head")[0];if(l==="css"&&(u=getTemplateLink(c))!==null){u.parentNode.insertBefore(a,u)}else{c.insertBefore(a,c.lastChild)}}function getAsset(e){var t={};if(typeof e==="object"){t=e;t.name=t.name?t.name:BX.util.hashCode(e.url)}else{t={name:BX.util.hashCode(e),url:e}}var n=BX.type.isNotEmptyString(t.ext)?t.ext:BX.util.getExtension(t.url);if(n==="css"&&isCssLoaded(t.url)||isScriptLoaded(t.url)){t.state=LOADED}var r=assets[t.name];if(r&&r.url===t.url){return r}assets[t.name]=t;return t}function normalizeUrl(e){if(!BX.type.isNotEmptyString(e)){return""}e=BX.getJSPath(e);e=e.replace(/\?[0-9]*$/,"");return e}function normalizeMinUrl(e){if(!BX.type.isNotEmptyString(e)){return""}var t=e.indexOf(".min");return t>=0?e.substr(0,t)+e.substr(t+4):e}function isCssLoaded(e){initCssList();e=normalizeUrl(e);var t=normalizeMinUrl(e);return e!==t&&BX.util.in_array(t,cssList)||BX.util.in_array(e,cssList)}function initCssList(){if(!cssInit){var e=document.getElementsByTagName("link");if(!!e&&e.length>0){for(var t=0;t<e.length;t++){var n=e[t].getAttribute("href");if(BX.type.isNotEmptyString(n)){n=normalizeMinUrl(normalizeUrl(n));cssList.push(n)}}}cssInit=true}}function getTemplateLink(e){var t=function(t){var n=e.getElementsByTagName(t);for(var r=0,i=n.length;r<i;r++){var s=n[r].getAttribute("data-template-style");if(BX.type.isNotEmptyString(s)&&s=="true"){return n[r]}}return null};var n=t("link");if(n===null){n=t("style")}return n}function isScriptLoaded(e){initJsList();e=normalizeUrl(e);var t=normalizeMinUrl(e);return e!==t&&BX.util.in_array(t,jsList)||BX.util.in_array(e,jsList)}function initJsList(){if(!jsInit){var e=document.getElementsByTagName("script");
31if(!!e&&e.length>0){for(var t=0;t<e.length;t++){var n=e[t].getAttribute("src");if(BX.type.isNotEmptyString(n)){n=normalizeMinUrl(normalizeUrl(n));jsList.push(n)}}}jsInit=true}}function reloadInternal(e,t){if(e===true){t=true;e=null}var n=function(){if(BX.PageObject&&BX.PageObject.getRootWindow){return BX.PageObject.getRootWindow()}return window.top}();var r=e||n.location.href;var i=r.indexOf("#"),s="";if(i!=-1){s=r.substr(i);r=r.substr(0,i)}if(t&&r.indexOf("clear_cache=Y")<0)r+=(r.indexOf("?")==-1?"?":"&")+"clear_cache=Y";if(s){if(t&&(s.substr(0,5)=="view/"||s.substr(0,6)=="#view/")&&s.indexOf("clear_cache%3DY")<0)s+=(s.indexOf("%3F")==-1?"%3F":"%26")+"clear_cache%3DY";r=r.replace(/(\?|\&)_r=[\d]*/,"");r+=(r.indexOf("?")==-1?"?":"&")+"_r="+Math.round(Math.random()*1e4)+s}n.location.href=r}BX.reload=function(e,t){reloadInternal(e,t)};BX.clearCache=function(){BX.showWait();BX.reload(true)};BX.template=function(e,t,n){BX.ready((function(){_processTpl(BX(e),t,n)}))};BX.isAmPmMode=function(e){if(e===true){return BX.message.AMPM_MODE}return BX.message.AMPM_MODE!==false};BX.formatDate=function(e,t){e=e||new Date;var n=e.getHours()||e.getMinutes()||e.getSeconds(),r=!!t?t:n?BX.message("FORMAT_DATETIME"):BX.message("FORMAT_DATE");return r.replace(/YYYY/gi,e.getFullYear()).replace(/MMMM/gi,BX.util.str_pad_left((e.getMonth()+1).toString(),2,"0")).replace(/MM/gi,BX.util.str_pad_left((e.getMonth()+1).toString(),2,"0")).replace(/DD/gi,BX.util.str_pad_left(e.getDate().toString(),2,"0")).replace(/HH/gi,BX.util.str_pad_left(e.getHours().toString(),2,"0")).replace(/MI/gi,BX.util.str_pad_left(e.getMinutes().toString(),2,"0")).replace(/SS/gi,BX.util.str_pad_left(e.getSeconds().toString(),2,"0"))};BX.formatName=function(e,t,n){e=e||{};t=t||"";var r={TITLE:e["TITLE"]||"",NAME:e["NAME"]||"",LAST_NAME:e["LAST_NAME"]||"",SECOND_NAME:e["SECOND_NAME"]||"",LOGIN:e["LOGIN"]||"",NAME_SHORT:e["NAME"]?e["NAME"].substr(0,1)+".":"",LAST_NAME_SHORT:e["LAST_NAME"]?e["LAST_NAME"].substr(0,1)+".":"",SECOND_NAME_SHORT:e["SECOND_NAME"]?e["SECOND_NAME"].substr(0,1)+".":"",EMAIL:e["EMAIL"]||"",ID:e["ID"]||"",NOBR:"","/NOBR":""},i=t;for(var s in r){if(r.hasOwnProperty(s)){i=i.replace("#"+s+"#",r[s])}}i=i.replace(/([\s]+)/gi," ").trim();if(i==""){i=n=="Y"?r["LOGIN"]:"";i=i==""?"Noname":i}return i};BX.getNumMonth=function(e){var t=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];var n=["january","february","march","april","may","june","july","august","september","october","november","december"];var r=e.toUpperCase();for(i=1;i<=12;i++){if(r==BX.message("MON_"+i).toUpperCase()||r==BX.message("MONTH_"+i).toUpperCase()||r==t[i-1].toUpperCase()||r==n[i-1].toUpperCase()){return i}}return e};BX.parseDate=function(e,t,n,r){if(BX.type.isNotEmptyString(e)){if(!n)n=BX.message("FORMAT_DATE");if(!r)r=BX.message("FORMAT_DATETIME");var i="";for(l=1;l<=12;l++){i=i+"|"+BX.message("MON_"+l)}var s=new RegExp("([0-9]+|[a-z]+"+i+")","ig");var o=e.match(s),a=n.match(/(DD|MI|MMMM|MM|M|YYYY)/gi),l,u,c=[],f=[],d={};if(!o)return null;if(o.length>a.length){a=r.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/gi)}for(l=0,u=o.length;l<u;l++){if(BX.util.trim(o[l])!=""){c[c.length]=o[l]}}for(l=0,u=a.length;l<u;l++){if(BX.util.trim(a[l])!=""){f[f.length]=a[l]}}var h=BX.util.array_search("MMMM",f);if(h>0){c[h]=BX.getNumMonth(c[h]);f[h]="MM"}else{h=BX.util.array_search("M",f);if(h>0){c[h]=BX.getNumMonth(c[h]);f[h]="MM"}}for(l=0,u=f.length;l<u;l++){var p=f[l].toUpperCase();d[p]=p=="T"||p=="TT"?c[l]:parseInt(c[l],10)}if(d["DD"]>0&&d["MM"]>0&&d["YYYY"]>0){var m=new Date;if(t){m.setUTCDate(1);m.setUTCFullYear(d["YYYY"]);m.setUTCMonth(d["MM"]-1);m.setUTCDate(d["DD"]);m.setUTCHours(0,0,0,0)}else{m.setDate(1);m.setFullYear(d["YYYY"]);m.setMonth(d["MM"]-1);m.setDate(d["DD"]);m.setHours(0,0,0,0)}if((!isNaN(d["HH"])||!isNaN(d["GG"])||!isNaN(d["H"])||!isNaN(d["G"]))&&!isNaN(d["MI"])){if(!isNaN(d["H"])||!isNaN(d["G"])){var g=(d["T"]||d["TT"]||"am").toUpperCase()=="PM";var y=parseInt(d["H"]||d["G"]||0,10);if(g){d["HH"]=y+(y==12?0:12)}else{d["HH"]=y<12?y:0}}else{d["HH"]=parseInt(d["HH"]||d["GG"]||0,10)}if(isNaN(d["SS"]))d["SS"]=0;if(t){m.setUTCHours(d["HH"],d["MI"],d["SS"])}else{m.setHours(d["HH"],d["MI"],d["SS"])}}return m}}return null};BX.selectUtils={addNewOption:function(e,t,n,r,i){e=BX(e);if(e){var s=e.length;if(i!==false){for(var o=0;o<s;o++){if(e[o].value==t){return}}}e.options[s]=new Option(n,t,false,false)}if(r===true){this.sortSelect(e)}},deleteOption:function(e,t){e=BX(e);if(e){for(var n=0;n<e.length;n++){if(e[n].value==t){e.remove(n);break}}}},deleteSelectedOptions:function(e){e=BX(e);if(e){var t=0;while(t<e.length){if(e[t].selected){e[t].selected=false;e.remove(t)}else{t++}}}},deleteAllOptions:function(e){e=BX(e);if(e){for(var t=e.length-1;t>=0;t--){e.remove(t)}}},optionCompare:function(e,t){var n=e.optText.toLowerCase();var r=t.optText.toLowerCase();if(n>r)return 1;if(n<r)return-1;return 0},sortSelect:function(e){e=BX(e);if(e){var t=[];var n=e.options.length;var r;for(r=0;r<n;r++){t[r]={optText:e[r].text,optValue:e[r].value}}t.sort(this.optionCompare);e.length=0;n=t.length;for(r=0;r<n;r++){e[r]=new Option(t[r].optText,t[r].optValue,false,false)}}},selectAllOptions:function(e){e=BX(e);if(e){var t=e.length;for(var n=0;n<t;n++){e[n].selected=true}}},selectOption:function(e,t){e=BX(e);if(e){var n=e.length;for(var r=0;r<n;r++){e[r].selected=e[r].value==t}}},addSelectedOptions:function(e,t,n,r){e=BX(e);if(!e)return;var i=e.length;for(var s=0;s<i;s++)if(e[s].selected)this.addNewOption(t,e[s].value,e[s].text,r,n)},moveOptionsUp:function(e){e=BX(e);if(!e)return;var t=e.length;for(var n=0;n<t;n++){if(e[n].selected&&n>0&&e[n-1].selected==false){var r=new Option(e[n].text,e[n].value);e[n]=new Option(e[n-1].text,e[n-1].value);e[n].selected=false;e[n-1]=r;e[n-1].selected=true}}},moveOptionsDown:function(e){e=BX(e);if(!e)return;var t=e.length;for(var n=t-1;n>=0;n--){if(e[n].selected&&n<t-1&&e[n+1].selected==false){var r=new Option(e[n].text,e[n].value);e[n]=new Option(e[n+1].text,e[n+1].value);e[n].selected=false;e[n+1]=r;e[n+1].selected=true}}}};BX.getEventTarget=function(e){if(e.target){return e.target}else if(e.srcElement){return e.srcElement}return null};BX.convert={toNumber:function(e){if(BX.type.isNumber(e)){return e}e=Number(e);return!isNaN(e)?e:0},nodeListToArray:function(e){try{return Array.prototype.slice.call(e,0)}catch(i){var t=[];for(var n=0,r=e.length;n<r;n++){t.push(e[n])}return t}}};BX.hint=function(e,t,n,r){if(null==n){n=t;t=""}if(null==e.BXHINT){e.BXHINT=new BX.CHint({parent:e,hint:n,title:t,id:r});e.BXHINT.Show()}};BX.hint_replace=function(e,t,n){if(null==n){n=t;t=""}if(!e||!e.parentNode||!n)return null;var r=new BX.CHint({hint:n,title:t});r.CreateParent();e.parentNode.insertBefore(r.PARENT,e);e.parentNode.removeChild(e);r.PARENT.style.marginLeft="5px";return e};BX.CHint=function(e){if(BX.CHint.cssLoaded===false){BX.load(["/bitrix/js/main/core/css/core_hint.css"]);BX.CHint.cssLoaded=true}this.PARENT=BX(e.parent);this.HINT=e.hint;this.HINT_TITLE=e.title;this.PARAMS={};for(var t in this.defaultSettings){if(null==e[t])this.PARAMS[t]=this.defaultSettings[t];else this.PARAMS[t]=e[t]}if(null!=e.id)this.ID=e.id;this.timer=null;this.bInited=false;this.msover=true;if(this.PARAMS.showOnce){this.__show();this.msover=false;this.timer=setTimeout(BX.proxy(this.__hide,this),this.PARAMS.hide_timeout)}else if(this.PARENT){BX.bind(this.PARENT,"mouseover",BX.proxy(this.Show,this));BX.bind(this.PARENT,"mouseout",BX.proxy(this.Hide,this))}};BX.CHint.cssLoaded=false;BX.CHint.openHints=new Set;BX.CHint.globalDisabled=false;BX.CHint.handleMenuOpen=function(){BX.CHint.globalDisabled=true;
31BX.CHint.openHints.forEach((function(e){e.__hide_immediately()}))};BX.CHint.handleMenuClose=function(){BX.CHint.globalDisabled=false};BX.addCustomEvent("onMenuOpen",BX.CHint.handleMenuOpen);BX.addCustomEvent("onMenuClose",BX.CHint.handleMenuClose);BX.CHint.prototype.defaultSettings={show_timeout:1e3,hide_timeout:500,dx:2,showOnce:false,preventHide:true,min_width:250};BX.CHint.prototype.CreateParent=function(e,t){if(this.PARENT){BX.unbind(this.PARENT,"mouseover",BX.proxy(this.Show,this));BX.unbind(this.PARENT,"mouseout",BX.proxy(this.Hide,this))}if(!t)t={};var n="icon";if(t.type&&(t.type=="link"||t.type=="icon"))n=t.type;if(e)n="element";if(n=="icon"){e=BX.create("IMG",{props:{src:t.iconSrc?t.iconSrc:"/bitrix/js/main/core/images/hint.gif"}})}else if(n=="link"){e=BX.create("A",{props:{href:"javascript:void(0)"},html:"[?]"})}this.PARENT=e;BX.bind(this.PARENT,"mouseover",BX.proxy(this.Show,this));BX.bind(this.PARENT,"mouseout",BX.proxy(this.Hide,this));return this.PARENT};BX.CHint.prototype.Show=function(){this.msover=true;if(null!=this.timer)clearTimeout(this.timer);this.timer=setTimeout(BX.proxy(this.__show,this),this.PARAMS.show_timeout)};BX.CHint.prototype.Hide=function(){this.msover=false;if(null!=this.timer)clearTimeout(this.timer);this.timer=setTimeout(BX.proxy(this.__hide,this),this.PARAMS.hide_timeout)};BX.CHint.prototype.__show=function(){if(!this.msover||this.disabled||BX.CHint.globalDisabled)return;if(!this.bInited)this.Init();if(this.prepareAdjustPos()){this.DIV.style.display="block";BX.ZIndexManager.bringToFront(this.DIV);this.adjustPos();BX.CHint.openHints.add(this);BX.bind(window,"scroll",BX.proxy(this.__onscroll,this));if(this.PARAMS.showOnce){this.timer=setTimeout(BX.proxy(this.__hide,this),this.PARAMS.hide_timeout)}}};BX.CHint.prototype.__onscroll=function(){if(!BX.admin||!BX.admin.panel||!BX.admin.panel.isFixed())return;if(this.scrollTimer)clearTimeout(this.scrollTimer);this.DIV.style.display="none";this.scrollTimer=setTimeout(BX.proxy(this.Reopen,this),this.PARAMS.show_timeout)};BX.CHint.prototype.Reopen=function(){if(null!=this.timer)clearTimeout(this.timer);this.timer=setTimeout(BX.proxy(this.__show,this),50)};BX.CHint.prototype.__hide=function(){if(this.msover)return;if(!this.bInited)return;BX.unbind(window,"scroll",BX.proxy(this.Reopen,this));BX.CHint.openHints.delete(this);if(this.PARAMS.showOnce){this.Destroy()}else{this.DIV.style.display="none"}};BX.CHint.prototype.__hide_immediately=function(){this.msover=false;this.__hide()};BX.CHint.prototype.Init=function(){this.DIV=document.body.appendChild(BX.create("DIV",{props:{className:"bx-panel-tooltip"},style:{display:"none",position:"absolute",visibility:"hidden"},children:[this.CONTENT=BX.create("DIV",{props:{className:"bx-panel-tooltip-content"},children:[BX.create("DIV",{props:{className:"bx-panel-tooltip-underlay"},children:[BX.create("DIV",{props:{className:"bx-panel-tooltip-underlay-bg"}})]})]})]}));BX.ZIndexManager.register(this.DIV);if(this.ID){this.CONTENT.insertBefore(BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:"bx-panel-tooltip-close"},events:{click:BX.delegate(this.Close,this)}}),this.CONTENT.firstChild)}if(this.HINT_TITLE){this.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-panel-tooltip-title"},text:this.HINT_TITLE}))}if(this.HINT){this.CONTENT_TEXT=this.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-panel-tooltip-text"}})).appendChild(BX.create("SPAN",{html:this.HINT}))}if(this.PARAMS.preventHide){BX.bind(this.DIV,"mouseout",BX.proxy(this.Hide,this));BX.bind(this.DIV,"mouseover",BX.proxy(this.Show,this))}this.bInited=true};BX.CHint.prototype.setContent=function(e){this.HINT=e;if(this.CONTENT_TEXT)this.CONTENT_TEXT.innerHTML=this.HINT;else this.CONTENT_TEXT=this.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-panel-tooltip-text"}})).appendChild(BX.create("SPAN",{html:this.HINT}))};BX.CHint.prototype.prepareAdjustPos=function(){this._wnd={scrollPos:BX.GetWindowScrollPos(),scrollSize:BX.GetWindowScrollSize()};return BX.style(this.PARENT,"display")!="none"};BX.CHint.prototype.getAdjustPos=function(){var e={},t=BX.pos(this.PARENT),n=0;e.top=t.bottom+this.PARAMS.dx;if(BX.admin&&BX.admin.panel.DIV){n=BX.admin.panel.DIV.offsetHeight+this.PARAMS.dx;if(BX.admin.panel.isFixed()){n+=this._wnd.scrollPos.scrollTop}}if(e.top<n)e.top=n;else{if(e.top+this.DIV.offsetHeight>this._wnd.scrollSize.scrollHeight)e.top=t.top-this.PARAMS.dx-this.DIV.offsetHeight}e.left=t.left;if(t.left<this.PARAMS.dx)t.left=this.PARAMS.dx;else{var r=this.DIV.offsetWidth;var i=this._wnd.scrollSize.scrollWidth-r-this.PARAMS.dx;if(e.left>i)e.left=i}return e};BX.CHint.prototype.adjustWidth=function(){if(this.bWidthAdjusted)return;var e=this.DIV.offsetWidth,t=this.DIV.offsetHeight;if(e>this.PARAMS.min_width)e=Math.round(Math.sqrt(1.618*e*t));if(e<this.PARAMS.min_width)e=this.PARAMS.min_width;this.DIV.style.width=e+"px";if(this._adjustWidthInt)clearInterval(this._adjustWidthInt);this._adjustWidthInt=setInterval(BX.delegate(this._adjustWidthInterval,this),5);this.bWidthAdjusted=true};BX.CHint.prototype._adjustWidthInterval=function(){if(!this.DIV||this.DIV.style.display=="none")clearInterval(this._adjustWidthInt);var e=20,t=1500,n=this.DIV.offsetWidth,r=this.CONTENT_TEXT.offsetWidth;if(n>0&&r>0&&n-r<e&&n<t){this.DIV.style.width=n+e+"px";return}clearInterval(this._adjustWidthInt)};BX.CHint.prototype.adjustPos=function(){this.adjustWidth();var e=this.getAdjustPos();this.DIV.style.top=e.top+"px";this.DIV.style.left=e.left+"px"};BX.CHint.prototype.Close=function(){if(this.ID&&BX.WindowManager)BX.WindowManager.saveWindowOptions(this.ID,{display:"off"});this.__hide_immediately();this.Destroy()};
31BX.CHint.prototype.Destroy=function(){if(this.PARENT){BX.unbind(this.PARENT,"mouseover",BX.proxy(this.Show,this));BX.unbind(this.PARENT,"mouseout",BX.proxy(this.Hide,this))}if(this.DIV){BX.unbind(this.DIV,"mouseover",BX.proxy(this.Show,this));BX.unbind(this.DIV,"mouseout",BX.proxy(this.Hide,this));BX.ZIndexManager.unregister(this.DIV);BX.cleanNode(this.DIV,true)}};BX.CHint.prototype.enable=function(){this.disabled=false};BX.CHint.prototype.disable=function(){this.__hide_immediately();this.disabled=true};function _adjustWait(){if(!this.bxmsg)return;var e=BX.pos(this),t=e.top;if(t<BX.GetDocElement().scrollTop)t=BX.GetDocElement().scrollTop+5;this.bxmsg.style.top=t+5+"px";if(this==BX.GetDocElement()){this.bxmsg.style.right="5px"}else{this.bxmsg.style.left=e.right-this.bxmsg.offsetWidth-5+"px"}}function _processTpl(e,t,n){if(e){if(n)e.parentNode.removeChild(e);var r={},i=BX.findChildren(e,{attribute:"data-role"},true);for(var s=0,o=i.length;s<o;s++){r[i[s].getAttribute("data-role")]=i[s]}t.apply(e,[r])}}function _checkNode(e,t){t=t||{};if(BX.type.isFunction(t))return t.call(window,e);if(!t.allowTextNodes&&!BX.type.isElementNode(e))return false;var n,r,i;for(n in t){if(t.hasOwnProperty(n)){switch(n){case"tag":case"tagName":if(BX.type.isString(t[n])){if(e.tagName.toUpperCase()!=t[n].toUpperCase())return false}else if(t[n]instanceof RegExp){if(!t[n].test(e.tagName))return false}break;case"class":case"className":if(BX.type.isString(t[n])){if(!BX.hasClass(e,t[n]))return false}else if(t[n]instanceof RegExp){if(!BX.type.isString(e.className)||!t[n].test(e.className))return false}break;case"attr":case"attrs":case"attribute":if(BX.type.isString(t[n])){if(!e.getAttribute(t[n]))return false}else if(BX.type.isArray(t[n])){for(r=0,i=t[n].length;r<i;r++){if(t[n]&&!e.getAttribute(t[n]))return false}}else{for(r in t[n]){if(t[n].hasOwnProperty(r)){var s=e.getAttribute(r);if(t[n][r]instanceof RegExp){if(!BX.type.isString(s)||!t[n][r].test(s)){return false}}else{if(s!=""+t[n][r]){return false}}}}}break;case"property":case"props":if(BX.type.isString(t[n])){if(!e[t[n]])return false}else if(BX.type.isArray(t[n])){for(r=0,i=t[n].length;r<i;r++){if(t[n]&&!e[t[n]])return false}}else{for(r in t[n]){if(BX.type.isString(t[n][r])){if(e[r]!=t[n][r])return false}else if(t[n][r]instanceof RegExp){if(!BX.type.isString(e[r])||!t[n][r].test(e[r]))return false}}}break;case"callback":return t[n](e)}}}return true}window.addEventListener("pagehide",(()=>{garbageCollectors.forEach((({callback:e,context:t=window})=>{try{e.apply(t)}catch(e){}}))}));BX(BX.DoNothing);window.BX=BX;BX.browser.addGlobalClass();BX.data=function(e,t,n){if(typeof e=="undefined")return undefined;if(typeof t=="undefined")return undefined;if(typeof n!="undefined"){dataStorage.set(e,t,n)}else{var r;if((r=dataStorage.get(e,t))!=undefined){return r}else{if("getAttribute"in e){r=e.getAttribute("data-"+t.toString());if(r===null){return undefined}return r}}return undefined}};BX.DataStorage=function(){this.keyOffset=1;this.data={};this.uniqueTag="BX-"+Math.random();this.resolve=function(e,t){if(typeof e[this.uniqueTag]=="undefined")if(t){try{Object.defineProperty(e,this.uniqueTag,{value:this.keyOffset++})}catch(t){e[this.uniqueTag]=this.keyOffset++}}else return undefined;return e[this.uniqueTag]};this.get=function(e,t){if(e!=document&&!BX.type.isElementNode(e)||typeof t=="undefined")return undefined;e=this.resolve(e,false);if(typeof e=="undefined"||typeof this.data[e]=="undefined")return undefined;return this.data[e][t]};this.set=function(e,t,n){if(e!=document&&!BX.type.isElementNode(e)||typeof n=="undefined")return;var r=this.resolve(e,true);if(typeof this.data[r]=="undefined")this.data[r]={};this.data[r][t]=n}};var dataStorage=new BX.DataStorage})(window.BX);(function(e){if(!e.BX){e.BX={}}var t=e.BX;t.Promise=function(e,t){this.state=null;this.value=null;this.reason=null;this.next=null;this.ctx=t||this;this.onFulfilled=[];this.onRejected=[]};t.Promise.prototype.fulfill=function(e){this.checkState();this.value=e;this.state=true;this.execute()};t.Promise.prototype.reject=function(e){this.checkState();this.reason=e;this.state=false;this.execute()};t.Promise.prototype.then=function(e,n){if(typeof e=="function"||e instanceof Function){this.onFulfilled.push(e)}if(typeof n=="function"||n instanceof Function){this.onRejected.push(n)}if(this.next===null){this.next=new t.Promise(null,this.ctx)}if(this.state!==null){this.execute()}return this.next};t.Promise.prototype.catch=function(e){if(typeof e=="function"||e instanceof Function){this.onRejected.push(e)}if(this.next===null){this.next=new t.Promise(null,this.ctx)}if(this.state!==null){this.execute()}return this.next};t.Promise.prototype.setAutoResolve=function(e,t){this.timer=setTimeout(function(){if(this.state===null){this[e?"fulfill":"reject"]()}}.bind(this),t||15)};
31t.Promise.prototype.cancelAutoResolve=function(){clearTimeout(this.timer)};t.Promise.prototype.resolve=function(e){var t=this;if(this===e){this.reject(new TypeError("Promise cannot fulfill or reject itself"))}else if(e&&e.toString()==="[object BX.Promise]"){e.then((function(e){t.fulfill(e)}),(function(e){t.reject(e)}))}else{this.fulfill(e)}};t.Promise.prototype.toString=function(){return"[object BX.Promise]"};t.Promise.prototype.execute=function(){if(this.state===null){return}var n=undefined;var r=undefined;var i=undefined;var s;if(this.state===true){if(this.onFulfilled.length){try{for(s=0;s<this.onFulfilled.length;s++){i=this.onFulfilled[s].apply(this.ctx,[this.value]);if(typeof i!="undefined"){n=i}}}catch(n){if("console"in e){console.dir(n)}if(typeof t.debug!=="undefined"){t.debug(n)}r=n}}else{n=this.value}}else if(this.state===false){if(this.onRejected.length){try{for(s=0;s<this.onRejected.length;s++){i=this.onRejected[s].apply(this.ctx,[this.reason]);if(typeof i!="undefined"){n=i}}}catch(n){if("console"in e){console.dir(n)}if(typeof t.debug!=="undefined"){t.debug(n)}r=n}}else{r=this.reason}}if(this.next!==null){if(typeof r!="undefined"){this.next.reject(r)}else if(typeof n!="undefined"){this.next.resolve(n)}}};t.Promise.prototype.checkState=function(){if(this.state!==null){throw new Error("You can not do fulfill() or reject() multiple times")}}})(window);(function(e){if(e.BX.ajax)return;var t=e.BX,n={},r={method:"GET",dataType:"html",timeout:0,async:true,processData:true,scriptsRunFirst:false,emulateOnload:true,skipAuthCheck:false,start:true,cache:true,preparePost:true,headers:false,lsTimeout:30,lsForce:false},i={},s=[],o={url_utf:/[^\034-\254]+/g,script_self:/\/bitrix\/js\/main\/core\/core(_ajax)*.js$/i,script_self_window:/\/bitrix\/js\/main\/core\/core_window.js$/i,script_self_admin:/\/bitrix\/js\/main\/core\/core_admin.js$/i,script_onload:/window.onload/g};t.ajax=function(e){var i,s;if(!e||!e.url||!t.type.isString(e.url)){return false}for(var l in n)if(typeof e[l]=="undefined")e[l]=n[l];n={};for(l in r)if(typeof e[l]=="undefined")e[l]=r[l];e.method=e.method.toUpperCase();if(!t.localStorage)e.lsId=null;if(t.browser.IsIE()){var u=o.url_utf.exec(e.url);if(u){do{e.url=e.url.replace(u,t.util.urlencode(u));u=o.url_utf.exec(e.url)}while(u)}}if(e.dataType=="json")e.emulateOnload=false;if(!e.cache&&e.method=="GET")e.url=t.ajax._uncache(e.url);if(e.method=="POST"){if(e.preparePost){e.data=t.ajax.prepareData(e.data)}else if(a(e.headers)==="application/json"){const n=t.Type.isPlainObject(e.data)||t.Type.isString(e.data)||t.Type.isNumber(e.data)||t.Type.isBoolean(e.data)||t.Type.isArray(e.data);if(n){e.data=JSON.stringify(e.data)}}}var c=true;if(e.lsId&&!e.lsForce){var f=t.localStorage.get("ajax-"+e.lsId);if(f!==null){c=false;var d=function(n){if(n.key=="ajax-"+e.lsId&&n.value!="BXAJAXWAIT"){var r=n.value,i=!!n.oldValue&&r==null;if(!i)t.ajax.__run(e,r);else if(e.onfailure)e.onfailure("timeout");t.removeCustomEvent("onLocalStorageChange",d)}};if(f=="BXAJAXWAIT"){t.addCustomEvent("onLocalStorageChange",d)}else{setTimeout((function(){d({key:"ajax-"+e.lsId,value:f})}),10)}}}if(c){e.xhr=t.ajax.xhr();if(!e.xhr)return;if(e.lsId){t.localStorage.set("ajax-"+e.lsId,"BXAJAXWAIT",e.lsTimeout)}if(t.Type.isFunction(e.onprogress)){t.bind(e.xhr,"progress",e.onprogress)}if(t.Type.isFunction(e.onprogressupload)&&e.xhr.upload){t.bind(e.xhr.upload,"progress",e.onprogressupload)}e.xhr.open(e.method,e.url,e.async);if(!e.skipBxHeader&&!t.ajax.isCrossDomain(e.url)){e.xhr.setRequestHeader("Bx-ajax","true")}if(e.method=="POST"&&e.preparePost){e.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(typeof e.headers=="object"){for(l=0;l<e.headers.length;l++)e.xhr.setRequestHeader(e.headers[l].name,e.headers[l].value)}var h=false;var p=e.xhr.onreadystatechange=function(n){if(h)return;if(n==="timeout"){if(e.onfailure){e.onfailure("timeout","",e)}t.onCustomEvent(e.xhr,"onAjaxFailure",["timeout","",e]);e.xhr.onreadystatechange=t.DoNothing;e.xhr.abort();if(e.async){e.xhr=null}}else{if(e.xhr.readyState==4||n=="run"){i=t.ajax.xhrSuccess(e.xhr)?"success":"error";h=true;e.xhr.onreadystatechange=t.DoNothing;if(i=="success"){var r=!!e.skipAuthCheck||t.ajax.isCrossDomain(e.url)?false:e.xhr.getResponseHeader("X-Bitrix-Ajax-Status");
31if(!!r&&r=="Authorize"){if(e.onfailure){e.onfailure("auth",e.xhr.status,e)}t.onCustomEvent(e.xhr,"onAjaxFailure",["auth",e.xhr.status,e])}else{var s=e.xhr.responseText;if(e.lsId){t.localStorage.set("ajax-"+e.lsId,s,e.lsTimeout)}t.ajax.__run(e,s)}}else{if(e.onfailure){e.onfailure("status",e.xhr.status,e)}t.onCustomEvent(e.xhr,"onAjaxFailure",["status",e.xhr.status,e])}if(e.async){e.xhr=null}}}};if(e.async&&e.timeout>0){setTimeout((function(){if(e.xhr&&!h){p("timeout")}}),e.timeout*1e3)}if(e.start){e.xhr.send(e.data);if(!e.async){p("run")}}return e.xhr}};t.ajax.xhr=function(){if(e.XMLHttpRequest){try{return new XMLHttpRequest}catch(e){}}else if(e.ActiveXObject){try{return new e.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new e.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new e.ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("This browser does not support XMLHttpRequest.")}return null};t.ajax.isCrossDomain=function(n,r){r=r||e.location;if(n.indexOf("//")===0){n=r.protocol+n}if(n.indexOf("http")!==0){return false}var i=e.document.createElement("a");i.href=n;return i.protocol!==r.protocol||i.hostname!==r.hostname||t.ajax.getHostPort(i.protocol,i.host)!==t.ajax.getHostPort(r.protocol,r.host)};t.ajax.getHostPort=function(e,t){var n=/:(\d+)$/.exec(t);if(n){return n[1]}else{if(e==="http:"){return"80"}else if(e==="https:"){return"443"}}return""};t.ajax.__prepareOnload=function(n,r){if(n.length>0){t.ajax["onload_"+r]=null;for(var i=0,s=n.length;i<s;i++){if(n[i].isInternal){n[i].JS=n[i].JS.replace(o.script_onload,"BX.ajax.onload_"+r)}}}t.CaptureEventsGet();t.CaptureEvents(e,"load")};t.ajax.__runOnload=function(n){if(null!=t.ajax["onload_"+n]){t.ajax["onload_"+n].apply(e);t.ajax["onload_"+n]=null}var r=t.CaptureEventsGet();if(r){for(var i=0;i<r.length;i++)r[i].apply(e)}};t.ajax.__run=function(e,n){if(!e.processData){if(e.onsuccess){e.onsuccess(n)}t.onCustomEvent(e.xhr,"onAjaxSuccess",[n,e])}else{n=t.ajax.processRequestData(n,e)}};t.ajax._onParseJSONFailure=function(e){this.jsonFailure=true;this.jsonResponse=e;this.jsonProactive=/^\[WAF\]/.test(e)};t.ajax.processRequestData=function(e,n){var r,i=[],s=[];switch(n.dataType.toUpperCase()){case"JSON":var o=n.xhr||{};t.addCustomEvent(o,"onParseJSONFailure",t.proxy(t.ajax._onParseJSONFailure,n));r=t.parseJSON(e,o);t.removeCustomEvent(o,"onParseJSONFailure",t.proxy(t.ajax._onParseJSONFailure,n));if(!!r&&t.type.isArray(r["bxjs"])){for(var a=0;a<r["bxjs"].length;a++){if(t.type.isNotEmptyString(r["bxjs"][a])){i.push({isInternal:false,JS:r["bxjs"][a],bRunFirst:n.scriptsRunFirst})}else{i.push(r["bxjs"][a])}}}if(!!r&&t.type.isArray(r["bxcss"])){s=r["bxcss"]}break;case"SCRIPT":i.push({isInternal:true,JS:e,bRunFirst:n.scriptsRunFirst});r=e;break;default:var l=t.processHTML(e,n.scriptsRunFirst);r=l.HTML;i=l.SCRIPT;s=l.STYLE;break}if(s.length>0){t.loadCSS(s)}let u=null;if(n.emulateOnload){u=parseInt(Math.random()*1e6);t.ajax.__prepareOnload(i,u)}const c=t.defer((function(){if(n.emulateOnload){t.ajax.__runOnload(u)}t.onCustomEvent(n.xhr,"onAjaxSuccessFinish",[n])}));try{if(!!n.jsonFailure){throw{type:"json_failure",data:n.jsonResponse,bProactive:n.jsonProactive}}n.scripts=i;t.ajax.processScripts(n.scripts,true);if(n.onsuccess){n.onsuccess(r)}t.onCustomEvent(n.xhr,"onAjaxSuccess",[r,n]);t.ajax.processScripts(n.scripts,false,c)}catch(e){if(n.onfailure)n.onfailure("processing",e);t.onCustomEvent(n.xhr,"onAjaxFailure",["processing",e,n])}};t.ajax.processScripts=function(e,n,r){var i=[],s="";r=r||t.DoNothing;for(var o=0,a=e.length;o<a;o++){if(typeof n!="undefined"&&n!=!!e[o].bRunFirst)continue;if(e[o].isInternal)s+=";"+e[o].JS;else i.push(e[o].JS)}i=t.util.array_unique(i);var l=s.length>0?function(){t.evalGlobal(s)}:t.DoNothing;if(i.length>0){t.load(i,(function(){l();r()}))}else{l();r()}};t.ajax.prepareData=function(e,n){var r="";if(t.type.isString(e))r=e;else if(null!=e){for(var i in e){if(e.hasOwnProperty(i)){if(r.length>0)r+="&";var s=t.util.urlencode(i);if(n)s=n+"["+s+"]";if(typeof e[i]=="object")r+=t.ajax.prepareData(e[i],s);else r+=s+"="+t.util.urlencode(e[i])}}}return r};t.ajax.xhrSuccess=function(e){return e.status>=200&&e.status<300||e.status===304||e.status===1223||e.status===0};t.ajax.Setup=function(e,t){t=!!t;for(var i in e){if(t)n[i]=e[i];else r[i]=e[i]}};t.ajax.replaceLocalStorageValue=function(e,n,r){if(!!t.localStorage)t.localStorage.set("ajax-"+e,n,r)};t.ajax._uncache=function(e){return e+((e.indexOf("?")!==-1?"&":"?")+"_="+(new Date).getTime())};t.ajax.get=function(e,n,r){if(t.type.isFunction(n)){r=n;n=""}n=t.ajax.prepareData(n);if(n){e+=(e.indexOf("?")!==-1?"&":"?")+n;n=""}return t.ajax({method:"GET",dataType:"html",url:e,data:"",onsuccess:r})};
31t.ajax.getCaptcha=function(e){return t.ajax.loadJSON("/bitrix/tools/ajax_captcha.php",e)};t.ajax.insertToNode=function(e,r){r=t(r);if(!!r){var i={cancel:false};t.onCustomEvent("onAjaxInsertToNode",[{url:e,node:r,eventArgs:i}]);if(i.cancel===true){return}var s=null;if(!n.denyShowWait){s=t.showWait(r);delete n.denyShowWait}return t.ajax.get(e,(function(e){r.innerHTML=e;t.closeWait(r,s)}))}};t.ajax.post=function(e,n,r){n=t.ajax.prepareData(n);return t.ajax({method:"POST",dataType:"html",url:e,data:n,onsuccess:r})};t.ajax.promise=function(e){var n=new t.Promise;e.onsuccess=function(e){n.fulfill(e)};e.onfailure=function(e,t,r){n.reject({reason:e,data:t,ajaxConfig:r,xhr:r.xhr})};var r=t.ajax(e);if(r){if(typeof e.onrequeststart==="function"){e.onrequeststart(r)}}else{n.reject({reason:"init",data:false})}return n};t.ajax.loadScriptAjax=function(e,n,r){if(t.type.isArray(e)){for(var s=0,a=e.length;s<a;s++){t.ajax.loadScriptAjax(e[s],n,r)}}else{var l=e.replace(/\.js\?.*/,".js");if(o.script_self.test(l))return;if(o.script_self_window.test(l)&&t.CWindow)return;if(o.script_self_admin.test(l)&&t.admin)return;if(typeof i[l]=="undefined"){if(!!r){i[l]="";return t.loadScript(e)}else{return t.ajax({url:e,method:"GET",dataType:"script",processData:true,emulateOnload:false,scriptsRunFirst:true,async:false,start:true,onsuccess:function(e){i[l]=e;if(n)n(e)}})}}else if(n){n(i[l])}}};t.ajax.loadJSON=function(e,n,r,i){if(t.type.isFunction(n)){i=r;r=n;n=""}n=t.ajax.prepareData(n);if(n){e+=(e.indexOf("?")!==-1?"&":"?")+n;n=""}return t.ajax({method:"GET",dataType:"json",url:e,onsuccess:r,onfailure:i})};var a=function(e){if(!t.Type.isArray(e)){return null}var n=e.filter((function(e){return e.name==="Content-Type"})).pop();return n?n.value:null};const l=function(e){if(!t.Type.isPlainObject(e)){console.error("BX.ajax: {analytics} must be an object.");return false}const n=["event","tool","category"];for(const r of n){if(!t.Type.isStringFilled(e[r])){console.error(`BX.ajax: The "${r}" property in the "analytics" object must be a non-empty string.`);return false}}const r=["p1","p2","p3","p4","p5"];for(const n of r){const r=e[n];if(!t.Type.isStringFilled(r)){continue}if(r.split("_").length>2){console.error(`BX.ajax: The "${n}" property (${r}) in the "analytics" object must be a string containing a single underscore.`);return false}}return true};const u=function(e){const n={};if(t.Type.isStringFilled(e.analyticsLabel)||t.Type.isPlainObject(e.analyticsLabel)){n.analyticsLabel=e.analyticsLabel}if(t.Type.isPlainObject(e.analytics)){if(e.analyticsLabel){delete n.analyticsLabel;console.error("BX.ajax: Only {analytics} or {analyticsLabel} should be used. If both are present, {analyticsLabel} will be ignored.")}if(l(e.analytics)){n.st=e.analytics}else{console.error("BX.ajax: {analytics} is invalid and is skipped.")}}return n};const c=function(e){let t=e.getParameters||{};t={...t,...u(e)};if(typeof e.mode!=="undefined"){t.mode=e.mode}if(e.navigation){if(e.navigation.page){t.nav="page-"+e.navigation.page}if(e.navigation.size){if(t.nav){t.nav+="-"}else{t.nav=""}t.nav+="size-"+e.navigation.size}}return t};var f=function(e){e=t.type.isPlainObject(e)?e:{};e.headers=e.headers||[];e.headers.push({name:"X-Bitrix-Csrf-Token",value:t.bitrix_sessid()});if(t.message.SITE_ID){e.headers.push({name:"X-Bitrix-Site-Id",value:t.message.SITE_ID})}if(typeof e.json!=="undefined"){if(!t.type.isPlainObject(e.json)){throw new Error("Wrong `config.json`, plain object expected.")}e.headers.push({name:"Content-Type",value:"application/json"});e.data=e.json;e.preparePost=false}else if(e.data instanceof FormData){e.preparePost=false;if(typeof e.signedParameters!=="undefined"){e.data.append("signedParameters",e.signedParameters)}}else if(t.type.isPlainObject(e.data)||t.Type.isNil(e.data)){e.data=t.type.isPlainObject(e.data)?e.data:{};if(typeof e.signedParameters!=="undefined"){e.data.signedParameters=e.signedParameters}}if(!e.method){e.method="POST"}return e};
31var d=function(e,n){n=n||false;var r=t.clone(e);var i=null;var s=e.onrequeststart;e.onrequeststart=function(e){i=e;if(t.type.isFunction(s)){s(e)}};var o=r.onrequeststart;r.onrequeststart=function(e){i=e;if(t.type.isFunction(o)){o(e)}};var a=t.ajax.promise(e);return a.then((function(e){if(!n&&t.type.isPlainObject(e)&&t.type.isArray(e.errors)){var i=false;e.errors.forEach((function(e){if(e.code==="invalid_csrf"&&e.customData.csrf){t.message({bitrix_sessid:e.customData.csrf});r.headers=r.headers||[];r.headers=r.headers.filter((function(e){return e&&e.name!=="X-Bitrix-Csrf-Token"}));r.headers.push({name:"X-Bitrix-Csrf-Token",value:t.bitrix_sessid()});i=true}}));if(i){return d(r,true)}}if(!t.type.isPlainObject(e)||e.status!=="success"){var s=new t.Promise;s.reject(e);return s}return e})).catch((function(e){var n=new t.Promise;var r;if(t.type.isPlainObject(e)&&e.xhr&&e.xhr.responseText){try{r=JSON.parse(e.xhr.responseText);e=r}catch(e){}}if(t.type.isPlainObject(e)&&e.status&&e.hasOwnProperty("data")){n.reject(e)}else{n.reject({status:"error",data:{ajaxRejectData:e},errors:[{code:"NETWORK_ERROR",message:"Network error"}]})}return n})).then((function(e){var n=new t.Promise;var r=i.getAllResponseHeaders().trim().split(/[\r\n]+/);var s={};r.forEach((function(e){var t=e.split(": ");var n=t.shift().toLowerCase();s[n]=t.join(": ")}));if(!s["x-process-assets"]){n.fulfill(e);return n}var o=t.prop.getObject(t.prop.getObject(e,"data",{}),"assets",{});var a=[];if(t.Type.isArrayFilled(o.string)){o.string.reduce((function(e,t){if(String(t).length>0&&!e.includes(t)){e.push(t)}return e}),[]).forEach((function(e){if(String(e).startsWith('<script type="extension/settings"')){t.html(document.head,e,{useAdjacentHTML:true})}else{a.push(e)}}))}var l=new Promise((function(e,n){var r=t.prop.getArray(o,"css",[]);t.load(r,(function(){t.loadScript(t.prop.getArray(o,"js",[]),e)}))}));l.then((function(){var r=a.join("\n");t.html(document.head,r,{useAdjacentHTML:true}).then((function(){n.fulfill(e)}))}));return n}))};
31t.ajax.runAction=function(e,n){n=f(n);var r=c(n);r.action=e;var i="/bitrix/services/main/ajax.php?"+t.ajax.prepareData(r);return d({method:n.method,dataType:"json",url:i,data:n.data,timeout:n.timeout,preparePost:n.preparePost,headers:n.headers,onrequeststart:n.onrequeststart,onprogress:n.onprogress,onprogressupload:n.onprogressupload})};t.ajax.runComponentAction=function(e,n,r){r=f(r);r.mode=r.mode||"ajax";var i=c(r);i.c=e;i.action=n;var s="/bitrix/services/main/ajax.php?"+t.ajax.prepareData(i);return d({method:r.method,dataType:"json",url:s,data:r.data,timeout:r.timeout,preparePost:r.preparePost,headers:r.headers,onrequeststart:r.onrequeststart?r.onrequeststart:null,onprogress:r.onprogress,onprogressupload:r.onprogressupload})};t.ajax.load=function(e,n){if(!t.type.isArray(e))e=[e];var r=0;if(!t.type.isFunction(n))n=t.DoNothing;var i=function(e){if(t.type.isFunction(this.callback))this.callback(e);if(++r>=o)n()};for(var s=0,o=e.length;s<o;s++){switch(e[s].type.toUpperCase()){case"SCRIPT":t.loadScript([e[s].url],t.proxy(i,e[s]));break;case"CSS":t.loadCSS([e[s].url]);if(++r>=o)n();break;case"JSON":t.ajax.loadJSON(e[s].url,t.proxy(i,e[s]));break;default:t.ajax.get(e[s].url,"",t.proxy(i,e[s]));break}}};t.ajax.submit=function(e,n){if(!e.target){if(null==e.BXFormTarget){var r="formTarget_"+Math.random();e.BXFormTarget=document.body.appendChild(t.create("IFRAME",{props:{name:r,id:r,src:"javascript:void(0)"},style:{display:"none"}}))}e.target=e.BXFormTarget.name}e.BXFormCallback=n;t.bind(e.BXFormTarget,"load",t.proxy(t.ajax._submit_callback,e));t.submit(e);return false};t.ajax.submitComponentForm=function(n,r,i){if(!n.target){if(null==n.BXFormTarget){var s="formTarget_"+Math.random();n.BXFormTarget=document.body.appendChild(t.create("IFRAME",{props:{name:s,id:s,src:"javascript:void(0)"},style:{display:"none"}}))}n.target=n.BXFormTarget.name}if(!!i)var o=t.showWait(r);n.BXFormCallback=function(n){if(!!i)t.closeWait(o);var s=function(){if(!!e.bxcompajaxframeonload){setTimeout((function(){e.bxcompajaxframeonload();e.bxcompajaxframeonload=null}),10)}};t(r).innerHTML=n;t.onCustomEvent("onAjaxSuccess",[null,null,s])};t.bind(n.BXFormTarget,"load",t.proxy(t.ajax._submit_callback,n));return true};t.ajax._submit_callback=function(){try{if(this.BXFormTarget.contentWindow.location.href.indexOf("http")!=0)return}catch(e){return}if(this.BXFormCallback)this.BXFormCallback.apply(this,[this.BXFormTarget.contentWindow.document.body.innerHTML]);t.unbindAll(this.BXFormTarget)};t.ajax.prepareForm=function(e,t){t=!!t?t:{};var n,r,i,s=[],o=e.elements.length,a=0,l=0;if(!!e){for(n=0;n<o;n++){i=e.elements[n];if(i.disabled)continue;if(!i.type)continue;switch(i.type.toLowerCase()){case"text":case"textarea":case"password":case"number":case"hidden":case"select-one":s.push({name:i.name,value:i.value});l+=i.name.length+i.value.length;break;case"file":if(!!i.files){for(r=0;r<i.files.length;r++){a++;s.push({name:i.name,value:i.files[r],file:true});l+=i.files[r].size}}break;case"radio":case"checkbox":if(i.checked){s.push({name:i.name,value:i.value});l+=i.name.length+i.value.length}break;case"select-multiple":for(var u=0;u<i.options.length;u++){if(i.options[u].selected){s.push({name:i.name,value:i.options[u].value});l+=i.name.length+i.options[u].length}}break;default:break}}n=0;l=0;var c=t,f,d,h,p;while(n<s.length){var m=s[n].name.indexOf("[");if(p){c[s[n].name]={};c[s[n].name][p.replace(/\[|\]/gi,"")]=s[n].value;c=t;p=null;n++}else if(m==-1){c[s[n].name]=s[n].value;c=t;n++}else{f=s[n].name.substring(0,m);d=s[n].name.substring(m+1);h=d.indexOf("]");if(h==-1){if(!c[f])c[f]=[];c=t;n++}else if(h==0){if(!c[f])c[f]=[];c=c[f];s[n].name=""+c.length;if(d.substring(h+1).indexOf("[")===0)p=d.substring(0,h)+d.substring(h+1)}else{if(!c[f])c[f]={};c=c[f];s[n].name=d.substring(0,h)+d.substring(h+1)}}}}return{data:t,filesCount:a,roughSize:l}};t.ajax.submitAjax=function(n,r){r=r!==null&&typeof r=="object"?r:{};r.url=r["url"]||n.getAttribute("action");var i=r["data"]||{};r.data=t.ajax.prepareForm(n).data;for(var s in i){if(i.hasOwnProperty(s)){r.data[s]=i[s]}}if(!e["FormData"]){t.ajax(r)}else{var o=function(e){var t=Object.prototype.toString.call(e);return t=="[object File]"||t=="[object Blob]"},a=function(e,t,n){if(!!n&&typeof n=="object"&&!o(n)){for(var r in n){if(n.hasOwnProperty(r)){a(e,t==""?r:t+"["+r+"]",n[r])}}}
31else e.append(t,!!n?n:"")},l=function(e){var n={};if(null!=e){if(typeof e=="object"){for(var r in e){if(e.hasOwnProperty(r)){var i=t.util.urlencode(r);if(typeof e[r]=="object"&&e[r]["file"]!==true)n[i]=l(e[r]);else if(e[r]["file"]===true)n[i]=e[r]["value"];else n[i]=t.util.urlencode(e[r])}}}else n=t.util.urlencode(e)}return n},u=new e.FormData;if(r.method!=="POST"){r.data=t.ajax.prepareData(r.data);if(r.data){r.url+=(r.url.indexOf("?")!==-1?"&":"?")+r.data;r.data=""}}else{if(r.preparePost===true)r.data=l(r.data);a(u,"",r.data);r.data=u}r.preparePost=false;r.start=false;var c=t.ajax(r);if(!!r["onprogress"])c.upload.addEventListener("progress",(function(e){var t=null;if(e.lengthComputable&&(e.total||e["totalSize"])){t=e.loaded*100/(e.total||e["totalSize"])}r["onprogress"](e,t)}));c.send(u)}};t.ajax.UpdatePageData=function(e){if(e.TITLE)t.ajax.UpdatePageTitle(e.TITLE);if(e.WINDOW_TITLE||e.TITLE)t.ajax.UpdateWindowTitle(e.WINDOW_TITLE||e.TITLE);if(e.NAV_CHAIN)t.ajax.UpdatePageNavChain(e.NAV_CHAIN);if(e.CSS&&e.CSS.length>0)t.loadCSS(e.CSS);if(e.SCRIPTS&&e.SCRIPTS.length>0){var n=function(r,i,s){if(!!i&&t.type.isArray(i.scripts)){for(var o=0,a=e.SCRIPTS.length;o<a;o++){i.scripts.push({isInternal:false,JS:e.SCRIPTS[o]})}}else{t.loadScript(e.SCRIPTS,s)}t.removeCustomEvent("onAjaxSuccess",n)};t.addCustomEvent("onAjaxSuccess",n)}else{var r=function(e,n,i){if(t.type.isFunction(i)){i()}t.removeCustomEvent("onAjaxSuccess",r)};t.addCustomEvent("onAjaxSuccess",r)}};t.ajax.UpdatePageTitle=function(e){var n=t("pagetitle");if(n){t.remove(n.firstChild);if(!n.firstChild)n.appendChild(document.createTextNode(e));else n.insertBefore(document.createTextNode(e),n.firstChild)}};t.ajax.UpdateWindowTitle=function(e){document.title=e};t.ajax.UpdatePageNavChain=function(e){var n=t("navigation");if(n){n.innerHTML=e}};t.userOptions={options:null,bSend:false,delay:5e3,path:"/bitrix/admin/user_options.php?"};t.userOptions.setAjaxPath=function(e){console.warn("BX.userOptions.setAjaxPath is deprecated. There is no way to change ajax path.")};t.userOptions.save=function(e,n,r,i,s){if(t.userOptions.options===null){t.userOptions.options={}}s=Boolean(s);t.userOptions.options[`${e}.${n}.${r}`]=[e,n,r,i,s];const o=t.userOptions.__get();if(o){document.cookie=`${t.message("COOKIE_PREFIX")}_LAST_SETTINGS=${encodeURIComponent(o)}&sessid=${t.bitrix_sessid()}; expires=Thu, 31 Dec ${(new Date).getFullYear()+1} 23:59:59 GMT; path=/;`}if(!t.userOptions.bSend){t.userOptions.bSend=true;setTimeout((()=>{t.userOptions.send(null)}),t.userOptions.delay)}};t.userOptions.send=function(e){const n=t.userOptions.__get_values({backwardCompatibility:true});t.userOptions.options=null;t.userOptions.bSend=false;if(n){document.cookie=`${t.message("COOKIE_PREFIX")}_LAST_SETTINGS=; path=/;`;t.ajax.runAction("main.userOption.saveOptions",{json:{newValues:n}}).then((n=>{if(t.type.isFunction(e)){e(n)}}))}};t.userOptions.del=function(e,n,r,i){t.ajax.runAction("main.userOption.deleteOption",{json:{category:e,name:n,common:r}}).then((e=>{if(t.type.isFunction(i)){i(e)}}))};t.userOptions.__get_values=function({backwardCompatibility:e}){if(!t.userOptions||!t.Type.isPlainObject(t.userOptions.options)){return null}const n=0;const r=1;const i=2;const s=3;const o=4;const a={p:[]};let l=-1;let u="";Object.entries(t.userOptions.options).forEach((([t,c])=>{const f=c[n];const d=c[r];const h=`${f}.${d}`;if(u!==h){l++;a.p.push({c:f,n:d,v:{}});if(c[o]===true){a.p[l].d="Y"}u=h}if(c[i]===null){a.p[l].v=c[s]}else{let t=c[s];if(e&&Array.isArray(c[s])){t=c[s].join(",")}a.p[l].v[c[i]]=t}}));return a.p.length>0?a.p:null};t.userOptions.__get=function(){if(!t.userOptions.options)return"";var e="",n=-1,r="",i,s;for(s in t.userOptions.options){if(t.userOptions.options.hasOwnProperty(s)){i=t.userOptions.options[s];if(r!=i[0]+"."+i[1]){n++;e+="&p["+n+"][c]="+t.util.urlencode(i[0]);e+="&p["+n+"][n]="+t.util.urlencode(i[1]);if(i[4]==true)e+="&p["+n+"][d]=Y";r=i[0]+"."+i[1]}var o=i[2];var a=i[3];if(o===null){e+="&p["+n+"][v]="+t.util.urlencode(a)}else{e+="&p["+n+"][v]["+t.util.urlencode(o)+"]="+t.util.urlencode(a)}}}return e.substr(1)};t.ajax.history={expected_hash:"",obParams:null,obFrame:null,obImage:null,obTimer:null,bInited:false,bHashCollision:false,bPushState:!!(history.pushState&&t.type.isFunction(history.pushState)),startState:null,init:function(n){if(t.ajax.history.bInited)return;this.obParams=n;var r=this.obParams.getState();if(t.ajax.history.bPushState){t.ajax.history.expected_hash=e.location.pathname;if(e.location.search)t.ajax.history.expected_hash+=e.location.search;t.ajax.history.put(r,t.ajax.history.expected_hash,"",true);
31setTimeout((function(){t.bind(e,"popstate",t.ajax.history.__hashListener)}),500)}else{t.ajax.history.expected_hash=e.location.hash;if(!t.ajax.history.expected_hash||t.ajax.history.expected_hash=="#")t.ajax.history.expected_hash="__bx_no_hash__";h.put(t.ajax.history.expected_hash,r);t.ajax.history.obTimer=setTimeout(t.ajax.history.__hashListener,500);if(t.browser.IsIE()){t.ajax.history.obFrame=document.createElement("IFRAME");t.hide_object(t.ajax.history.obFrame);document.body.appendChild(t.ajax.history.obFrame);t.ajax.history.obFrame.contentWindow.document.open();t.ajax.history.obFrame.contentWindow.document.write(t.ajax.history.expected_hash);t.ajax.history.obFrame.contentWindow.document.close()}else if(t.browser.IsOpera()){t.ajax.history.obImage=document.createElement("IMG");t.hide_object(t.ajax.history.obImage);document.body.appendChild(t.ajax.history.obImage);t.ajax.history.obImage.setAttribute("src","javascript:location.href = 'javascript:BX.ajax.history.__hashListener();';")}}t.ajax.history.bInited=true},__hashListener:function(n){n=n||e.event||{state:false};if(t.ajax.history.bPushState){t.ajax.history.obParams.setState(n.state||t.ajax.history.startState)}else{if(t.ajax.history.obTimer){e.clearTimeout(t.ajax.history.obTimer);t.ajax.history.obTimer=null}var r;if(null!=t.ajax.history.obFrame)r=t.ajax.history.obFrame.contentWindow.document.body.innerText;else r=e.location.hash;if(!r||r=="#")r="__bx_no_hash__";if(r.indexOf("#")==0)r=r.substring(1);if(r!=t.ajax.history.expected_hash){var i=h.get(r);if(i){t.ajax.history.obParams.setState(i);t.ajax.history.expected_hash=r;if(null!=t.ajax.history.obFrame){var s=r=="__bx_no_hash__"?"":r;if(e.location.hash!=s&&e.location.hash!="#"+s)e.location.hash=s}}}t.ajax.history.obTimer=setTimeout(t.ajax.history.__hashListener,500)}},put:function(n,r,i,s){if(this.bPushState){if(!s){history.pushState(n,"",r)}else{t.ajax.history.startState=n}}else{if(typeof i!="undefined")r=i;else r="view"+r;h.put(r,n);t.ajax.history.expected_hash=r;e.location.hash=t.util.urlencode(r);if(null!=t.ajax.history.obFrame){t.ajax.history.obFrame.contentWindow.document.open();t.ajax.history.obFrame.contentWindow.document.write(r);t.ajax.history.obFrame.contentWindow.document.close()}}},checkRedirectStart:function(n,r){var i=e.location.hash;if(i.substring(0,1)=="#")i=i.substring(1);var s=i.substring(0,5);if(s=="view/"||s=="view%"){t.ajax.history.bHashCollision=true;document.write("<"+'div id="__ajax_hash_collision_'+r+'" style="display: none;">')}},checkRedirectFinish:function(n,r){document.write("</div>");var i=e.location.hash;if(i.substring(0,1)=="#")i=i.substring(1);t.ready((function(){var e=i.substring(0,5);if(e=="view/"||e=="view%"){var s=t("__ajax_hash_collision_"+r);var o=s.firstChild;t.cleanNode(o);s.style.display="block";if(e!="view%")i=t.util.urlencode(i);i+=(i.indexOf("%3F")==-1?"%3F":"%26")+n+"="+r;var a="/bitrix/tools/ajax_redirector.php?hash="+i;t.ajax.insertToNode(a,o)}}))}};t.ajax.component=function(e){this.node=e};t.ajax.component.prototype.getState=function(){var n={node:this.node,title:e.document.title,data:t(this.node).innerHTML};var r=t("navigation");if(null!=r)n.nav_chain=r.innerHTML;t.onCustomEvent(t(n.node),"onComponentAjaxHistoryGetState",[n]);return n};t.ajax.component.prototype.setState=function(e){t(e.node).innerHTML=e.data;t.ajax.UpdatePageTitle(e.title);if(e.nav_chain){t.ajax.UpdatePageNavChain(e.nav_chain)}t.onCustomEvent(t(e.node),"onComponentAjaxHistorySetState",[e])};var h={arHistory:{},put:function(e,t){this.arHistory[e]=t},get:function(e){return this.arHistory[e]}};t.ajax.FormData=function(){this.elements=[];this.files=[];this.features={};this.isSupported();this.log("BX FormData init")};t.ajax.FormData.isSupported=function(){var e=new t.ajax.FormData;var n=e.features.supported;e=null;return n};t.ajax.FormData.prototype.log=function(e){if(false){try{if(t.browser.IsIE())e=JSON.stringify(e);console.log(e)}catch(e){}}};t.ajax.FormData.prototype.isSupported=function(){var t={};t.fileReader=e.FileReader&&e.FileReader.prototype.readAsBinaryString;t.readFormData=t.sendFormData=!!e.FormData;t.supported=!!(t.readFormData&&t.sendFormData);this.features=t;this.log("features:");this.log(t);return t.supported};t.ajax.FormData.prototype.append=function(e,t){if(typeof t==="object"){this.files.push({name:e,value:t})}else{this.elements.push({name:e,value:t})}};t.ajax.FormData.prototype.send=function(e,n,r,i){this.log("FD send");this.xhr=t.ajax({method:"POST",dataType:"html",url:e,onsuccess:n,onfailure:i,start:false,preparePost:false});if(r){this.xhr.upload.addEventListener("progress",(function(e){if(e.lengthComputable)r(e.loaded/(e.total||e.totalSize))}),false)}if(this.features.readFormData&&this.features.sendFormData){var s=new FormData;this.log("use browser formdata");for(var o in this.elements){if(this.elements.hasOwnProperty(o))s.append(this.elements[o].name,this.elements[o].value)}
31for(o in this.files){if(this.files.hasOwnProperty(o))s.append(this.files[o].name,this.files[o].value)}this.xhr.send(s)}return this.xhr};t.addCustomEvent("onAjaxFailure",t.debug)})(window);(function(e,t){"use strict";var n={observer:null,images:{},imageStatus:{hidden:-2,error:-1,undefined:0,inited:1,loaded:2},imageTypes:{image:1,background:2},initObserver:function e(){this.observer=new IntersectionObserver(this.onIntersection.bind(this),{rootMargin:"20% 0% 20% 0%",threshold:.1})},onIntersection:function e(t){t.forEach(function(e){if(e.isIntersecting){this.showImage(e.target)}}.bind(this))},registerImage:function e(n,r,i){if(this.observer===null){this.initObserver()}i=i||{};if(!t.Type.isStringFilled(n)){return}if(t.Type.isObject(this.images[n])){return}var s=document.getElementById(n);if(!t.Type.isDomNode(s)){return}this.observer.observe(s);this.images[n]={id:n,node:null,src:null,dataSrcName:i.dataSrcName||"src",type:null,func:t.Type.isFunction(r)?r:null,status:this.imageStatus.undefined}},registerImages:function e(n,r,i){if(t.Type.isArray(n)){for(var s=0,o=n.length;s<o;s++){this.registerImage(n[s],r,i)}}},showImage:function e(n){var r=n.id;if(!t.Type.isStringFilled(r)){return}var i=this.images[r];if(!t.Type.isPlainObject(i)){return}if(i.status==this.imageStatus.undefined){this.initImage(i)}if(i.status!==this.imageStatus.inited){return}if(!i.node||!i.node.parentNode){i.node=null;i.status=this.imageStatus.error;return}if(i.type==this.imageTypes.image){i.node.src=i.src}else{i.node.style.backgroundImage="url('"+i.src+"')"}i.node.dataset[i.dataSrcName]="";i.status=this.imageStatus.loaded},showImages:function e(n){n=n!==false;for(var r in this.images){if(!this.images.hasOwnProperty(r)){continue}var i=this.images[r];if(i.status==this.imageStatus.undefined){this.initImage(i)}if(i.status!==this.imageStatus.inited){continue}if(!i.node||!i.node.parentNode){i.node=null;i.status=this.imageStatus.error;continue}var s=true;if(n&&t.Type.isFunction(i.func)){s=i.func(i)}if(s===true&&this.isElementVisibleOnScreen(i.node)){if(i.type==this.imageTypes.image){i.node.src=i.src}else{i.node.style.backgroundImage="url('"+i.src+"')"}i.node.dataset[i.dataSrcName]="";i.status=this.imageStatus.loaded}}},initImage:function e(n){n.status=this.imageStatus.error;var r=document.getElementById(n.id);if(!t.Type.isDomNode(r)){return}var i=r.dataset[n.dataSrcName];if(t.Type.isStringFilled(i)){n.node=r;n.src=i;n.status=this.imageStatus.inited;n.type=n.node.tagName.toLowerCase()=="img"?this.imageTypes.image:this.imageTypes.background}},isElementVisibleOnScreen:function e(t){var n=this.getElementCoords(t);var r=window.pageYOffset||document.documentElement.scrollTop;var i=r+document.documentElement.clientHeight;n.bottom=n.top+t.offsetHeight;return n.top>r&&n.top<i||n.bottom<i&&n.bottom>r},isElementVisibleOn2Screens:function e(t){var n=document.documentElement.clientHeight;var r=window.pageYOffset||document.documentElement.scrollTop;var i=r+n;var s=this.getElementCoords(t);s.bottom=s.top+t.offsetHeight;r-=n;i+=n;return s.top>r&&s.top<i||s.bottom<i&&s.bottom>r},getElementCoords:function e(t){var n=t.getBoundingClientRect();return{originTop:n.top,originLeft:n.left,top:n.top+window.pageYOffset,left:n.left+window.pageXOffset}},onScroll:function e(){},clearImages:function e(){this.images=[]}};e.LazyLoad=n})(this.BX=this.BX||{},BX);(function(e){"use strict";var t=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,e);if(!!t&&babelHelpers.typeof(t)==="object"){this.params=new Map(Object.entries(t))}else{this.params=new Map}}babelHelpers.createClass(e,[{key:"getParam",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(this.params.has(t)){return this.params.get(t)}return n}},{key:"setParam",value:function e(t,n){this.params.set(t,n)}},{key:"clear",value:function e(){this.params.clear()}}],[{key:"create",value:function t(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new e(n)}}]);return e}();e.ParamBag=t})(this.BX=this.BX||{});(function(){BX.FixFontSize=function(e){var t,n,r;this.node=null;this.prevWindowSize=0;this.prevWrapperSize=0;this.mainWrapper=null;this.textWrapper=null;this.objList=e.objList;this.minFontSizeList=[];this.minFontSize=0;if(e.onresize){this.prevWindowSize=window.innerWidth||document.documentElement.clientWidth;BX.bind(window,"resize",BX.throttle(this.onResize,350,this))}if(e.onAdaptiveResize){t=this.objList[0].scaleBy||this.objList[0].node;n=getComputedStyle(t);this.prevWrapperSize=parseInt(n["width"])-parseInt(n["paddingLeft"])-parseInt(n["paddingRight"]);BX.bind(window,"resize",BX.throttle(this.onAdaptiveResize,350,this))}this.createTestNodes();this.decrease()};BX.FixFontSize.prototype={createTestNodes:function(){this.textWrapper=BX.create("div",{style:{display:"inline-block",whiteSpace:"nowrap"}});this.mainWrapper=BX.create("div",{style:{height:0,overflow:"hidden"},children:[this.textWrapper]})},insertTestNodes:function(){document.body.appendChild(this.mainWrapper)},removeTestNodes:function(){document.body.removeChild(this.mainWrapper)},decrease:function(){var e,t,n,r;this.insertTestNodes();for(var i=this.objList.length-1;i>=0;i--){n=this.objList[i].scaleBy||this.objList[i].node;r=getComputedStyle(n);e=parseInt(r["width"])-parseInt(r["paddingLeft"])-parseInt(r["paddingRight"]);t=parseInt(getComputedStyle(this.objList[i].node)["font-size"]);this.textWrapperSetStyle(this.objList[i].node);
31if(this.textWrapperInsertText(this.objList[i].node)){while(this.textWrapper.offsetWidth>e&&t>0){this.textWrapper.style.fontSize=--t+"px"}if(this.objList[i].smallestValue){this.minFontSize=this.minFontSize?Math.min(this.minFontSize,t):t;this.minFontSizeList.push(this.objList[i].node)}else{this.objList[i].node.style.fontSize=t+"px"}}}if(this.minFontSizeList.length>0)this.setMinFont();this.removeTestNodes()},increase:function(){this.insertTestNodes();var e,t,n,r;this.insertTestNodes();for(var i=this.objList.length-1;i>=0;i--){n=this.objList[i].scaleBy||this.objList[i].node;r=getComputedStyle(n);e=parseInt(r["width"])-parseInt(r["paddingLeft"])-parseInt(r["paddingRight"]);t=parseInt(getComputedStyle(this.objList[i].node)["font-size"]);this.textWrapperSetStyle(this.objList[i].node);if(this.textWrapperInsertText(this.objList[i].node)){while(this.textWrapper.offsetWidth<e&&t<this.objList[i].maxFontSize){this.textWrapper.style.fontSize=++t+"px"}t--;if(this.objList[i].smallestValue){this.minFontSize=this.minFontSize?Math.min(this.minFontSize,t):t;this.minFontSizeList.push(this.objList[i].node)}else{this.objList[i].node.style.fontSize=t+"px"}}}if(this.minFontSizeList.length>0)this.setMinFont();this.removeTestNodes()},setMinFont:function(){for(var e=this.minFontSizeList.length-1;e>=0;e--){this.minFontSizeList[e].style.fontSize=this.minFontSize+"px"}this.minFontSize=0},onResize:function(){var e=window.innerWidth||document.documentElement.clientWidth;if(this.prevWindowSize>e)this.decrease();else if(this.prevWindowSize<e)this.increase();this.prevWindowSize=e},onAdaptiveResize:function(){var e=this.objList[0].scaleBy||this.objList[0].node,t=getComputedStyle(e),n=parseInt(t["width"])-parseInt(t["paddingLeft"])-parseInt(t["paddingRight"]);if(this.prevWrapperSize>n)this.decrease();else if(this.prevWrapperSize<n)this.increase();this.prevWrapperSize=n},textWrapperInsertText:function(e){if(e.textContent){this.textWrapper.textContent=e.textContent;return true}else if(e.innerText){this.textWrapper.innerText=e.innerText;return true}else{return false}},textWrapperSetStyle:function(e){this.textWrapper.style.fontFamily=getComputedStyle(e)["font-family"];this.textWrapper.style.fontSize=getComputedStyle(e)["font-size"];this.textWrapper.style.fontStyle=getComputedStyle(e)["font-style"];this.textWrapper.style.fontWeight=getComputedStyle(e)["font-weight"];this.textWrapper.style.lineHeight=getComputedStyle(e)["line-height"]}};BX.FixFontSize.init=function(e){return new BX.FixFontSize(e)}})()})(); 32/* End */ 33; 34; /* Start:"a:4:{s:4:"full";s:44:"/bitrix/js/main/utils.min.js?166109418618721";s:6:"source";s:24:"/bitrix/js/main/utils.js";s:3:"min";s:28:"/bitrix/js/main/utils.min.js";s:3:"map";s:28:"/bitrix/js/main/utils.map.js";}"*/ 35var phpVars;if(!phpVars){phpVars={ADMIN_THEME_ID:".default",LANGUAGE_ID:"en",FORMAT_DATE:"DD.MM.YYYY",FORMAT_DATETIME:"DD.MM.YYYY HH:MI:SS",opt_context_ctrl:false,cookiePrefix:"BITRIX_SM",titlePrefix:"",bitrix_sessid:"",messHideMenu:"",messShowMenu:"",messHideButtons:"",messShowButtons:"",messFilterInactive:"",messFilterActive:"",messFilterLess:"",messLoading:"Loading...",messMenuLoading:"",messMenuLoadingTitle:"",messNoData:"",messExpandTabs:"",messCollapseTabs:"",messPanelFixOn:"",messPanelFixOff:"",messPanelCollapse:"",messPanelExpand:""}}var jsUtils={arEvents:Array(),addEvent:function(e,t,n,i){if(e.attachEvent)e.attachEvent("on"+t,n);else if(e.addEventListener)e.addEventListener(t,n,false);else e["on"+t]=n;this.arEvents[this.arEvents.length]={element:e,event:t,fn:n}},removeEvent:function(e,t,n){if(e.detachEvent)e.detachEvent("on"+t,n);else if(e.removeEventListener)e.removeEventListener(t,n,false);else e["on"+t]=null},removeAllEvents:function(e){var t;for(t=0;t<this.arEvents.length;t++){if(this.arEvents[t]&&(e==false||e==this.arEvents[t].element)){jsUtils.removeEvent(this.arEvents[t].element,this.arEvents[t].event,this.arEvents[t].fn);this.arEvents[t]=null}}if(e==false)this.arEvents.length=0},IsDoctype:function(){if(document.compatMode)return document.compatMode=="CSS1Compat";if(document.documentElement&&document.documentElement.clientHeight)return true;return false},GetRealPos:function(e){if(window.BX)return BX.pos(e);if(!e||!e.offsetParent)return false;var t=Array();t["left"]=e.offsetLeft;t["top"]=e.offsetTop;var n=e.offsetParent;while(n&&n.tagName!="BODY"){t["left"]+=n.offsetLeft;t["top"]+=n.offsetTop;n=n.offsetParent}t["right"]=t["left"]+e.offsetWidth;
35t["bottom"]=t["top"]+e.offsetHeight;return t},FindChildObject:function(e,t,n,i){if(!e)return null;var o=t.toUpperCase();var r=n?n.toLowerCase():null;var s=e.childNodes.length;for(var l=0;l<s;l++){var a=e.childNodes[l];if(a.tagName&&a.tagName.toUpperCase()==o)if(!n||a.className.toLowerCase()==r)return a;if(i==true){var f;if(f=jsUtils.FindChildObject(a,t,n,true))return f}}return null},FindParentObject:function(e,t,n){if(!e)return null;var i=e;var o=t.toUpperCase();var r=n?n.toLowerCase():null;while(i.parentNode){var s=i.parentNode;if(s.tagName&&s.tagName.toUpperCase()==o)if(!n||s.className.toLowerCase()==r)return s;i=s}return null},FindNextSibling:function(e,t){if(!e)return null;var n=e;var i=t.toUpperCase();while(n.nextSibling){var o=n.nextSibling;if(o.tagName&&o.tagName.toUpperCase()==i)return o;n=o}return null},FindPreviousSibling:function(e,t){if(!e)return null;var n=e;var i=t.toUpperCase();while(n.previousSibling){var o=n.previousSibling;if(o.tagName&&o.tagName.toUpperCase()==i)return o;n=o}return null},bOpera:navigator.userAgent.toLowerCase().indexOf("opera")!=-1,bIsIE:document.attachEvent&&navigator.userAgent.toLowerCase().indexOf("opera")==-1,IsIE:function(){return this.bIsIE},IsOpera:function(){return this.bOpera},IsSafari:function(){var e=navigator.userAgent.toLowerCase();return/webkit/.test(e)},IsEditor:function(){var e=navigator.userAgent.toLowerCase();var t=(e.match(/.+(msie)[\/: ]([\d.]+)/)||[])[2];var n=/webkit/.test(e);if(this.IsOpera()||document.all&&!document.compatMode&&t<6||n)return false;return true},ToggleDiv:function(e){var t=document.getElementById(e).style;if(t.display!="none")t.display="none";else t.display="block";return t.display!="none"},urlencode:function(e){return escape(e).replace(new RegExp("\\+","g"),"%2B")},OpenWindow:function(e,t,n){var i=screen.width,o=screen.height;if(this.IsOpera()){i=document.body.offsetWidth;o=document.body.offsetHeight}window.open(e,"","status=no,scrollbars=yes,resizable=yes,width="+t+",height="+n+",top="+Math.floor((o-n)/2-14)+",left="+Math.floor((i-t)/2-5))},SetPageTitle:function(e){document.title=phpVars.titlePrefix+e;var t=document.getElementsByTagName("H1");if(t)t[0].innerHTML=e},LoadPageToDiv:function(e,t){var n=document.getElementById(t);if(!n)return;CHttpRequest.Action=function(e){CloseWaitWindow();document.getElementById(t).innerHTML=e};ShowWaitWindow();CHttpRequest.Send(e)},trim:function(e){if(typeof e=="string"||typeof e=="object"&&e.constructor==String){var t,n;n=/^[\s\r\n]+/g;t=e.replace(n,"");n=/[\s\r\n]+$/g;t=t.replace(n,"");return t}else return e},Redirect:function(e,t){var n=null,i=false;if(e&&e.length>0)n=e[0];if(!n)n=window.event;if(n)i=n.shiftKey;if(i)window.open(t);else{window.location.href=t}},False:function(){return false},AlignToPos:function(e,t,n){var i=e["left"],o=e["bottom"];var r=jsUtils.GetWindowScrollPos();var s=jsUtils.GetWindowInnerSize();if(s.innerWidth+r.scrollLeft-(e["left"]+t)<0){if(e["right"]-t>=0)i=e["right"]-t;else i=r.scrollLeft}if(s.innerHeight+r.scrollTop-(e["bottom"]+n)<0){if(e["top"]-n>=0)o=e["top"]-n;else o=r.scrollTop}return{left:i,top:o}},EvalGlobal:function(e){try{if(window.execScript)window.execScript(e,"javascript");else if(jsUtils.IsSafari())window.setTimeout(e,0);else window.eval(e)}catch(e){}},GetStyleValue:function(e,t){var n;if(e.currentStyle)n=e.currentStyle[t];else if(window.getComputedStyle)n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t);if(!n)n="";return n},GetWindowInnerSize:function(e){var t,n;if(!e)e=document;if(self.innerHeight){t=self.innerWidth;n=self.innerHeight}else if(e.documentElement&&(e.documentElement.clientHeight||e.documentElement.clientWidth)){t=e.documentElement.clientWidth;n=e.documentElement.clientHeight}else if(e.body){t=e.body.clientWidth;n=e.body.clientHeight}return{innerWidth:t,innerHeight:n}},GetWindowScrollPos:function(e){var t,n;if(!e)e=document;if(self.pageYOffset){t=self.pageXOffset;n=self.pageYOffset}else if(e.documentElement&&(e.documentElement.scrollTop||e.documentElement.scrollLeft)){t=document.documentElement.scrollLeft;n=document.documentElement.scrollTop}else if(e.body){t=e.body.scrollLeft;n=e.body.scrollTop}return{scrollLeft:t,scrollTop:n}},GetWindowScrollSize:function(e){var t,n;if(!e)e=document;if(e.compatMode&&e.compatMode=="CSS1Compat"){t=e.documentElement.scrollWidth;n=e.documentElement.scrollHeight}else{if(e.body.scrollHeight>e.body.offsetHeight)n=e.body.scrollHeight;else n=e.body.offsetHeight;if(e.body.scrollWidth>e.body.offsetWidth||e.compatMode&&e.compatMode=="BackCompat"||e.documentElement&&!e.documentElement.clientWidth)t=e.body.scrollWidth;else t=e.body.offsetWidth}return{scrollWidth:t,scrollHeight:n}},GetWindowSize:function(){var e=jsUtils.GetWindowInnerSize();var t=jsUtils.GetWindowScrollPos();var n=jsUtils.GetWindowScrollSize();
35return{innerWidth:e.innerWidth,innerHeight:e.innerHeight,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}},arCustomEvents:{},addCustomEvent:function(e,t,n,i){if(!this.arCustomEvents[e])this.arCustomEvents[e]=[];if(!n)n=[];if(!i)i=false;this.arCustomEvents[e].push({handler:t,arParams:n,obj:i})},removeCustomEvent:function(e,t){if(!this.arCustomEvents[e])return;var n=this.arCustomEvents[e].length;if(n==1){delete this.arCustomEvents[e];return}for(var i=0;i<n;i++){if(!this.arCustomEvents[e][i])continue;if(this.arCustomEvents[e][i].handler==t){delete this.arCustomEvents[e][i];return}}},onCustomEvent:function(e,t){if(!this.arCustomEvents[e])return;if(!t)t=[];var n;for(var i=0,o=this.arCustomEvents[e].length;i<o;i++){n=this.arCustomEvents[e][i];if(!n||!n.handler)continue;if(n.obj)n.handler.call(n.obj,n.arParams,t);else n.handler(n.arParams,t)}},loadJSFile:function(e,t,n){if(!n)n=document;if(typeof e=="string")e=[e];var i=function(){if(!t)return;if(typeof t=="function")return t();if(typeof t!="object"||!t.func)return;var e=t.params||{};if(t.obj)t.func.apply(t.obj,e);else t.func(e)};var o=function(t){if(t>=e.length)return i();var r=n.body.appendChild(n.createElement("script"));r.src=e[t];var s=false;r.onload=r.onreadystatechange=function(){if(!s&&(!r.readyState||r.readyState=="loaded"||r.readyState=="complete")){s=true;setTimeout(function(){o(++t)},50)}}};o(0)},loadCSSFile:function(e,t,n){if(typeof e=="string"){var i=true;e=[e]}var o,r=e.length,s=[];if(r==0)return;if(!t)t=document;if(!n)n=window;if(!n.bxhead){var l=t.getElementsByTagName("HEAD");n.bxhead=l[0]}if(!n.bxhead)return;for(o=0;o<r;o++){var a=document.createElement("LINK");a.href=e[o];a.rel="stylesheet";a.type="text/css";n.bxhead.appendChild(a);s.push(a)}if(i)return a;return s},appendBXHint:function(e,t){if(!e||!e.parentNode||!t)return;var n=new BXHint(t);e.parentNode.insertBefore(n.oIcon,e);e.parentNode.removeChild(e);n.oIcon.style.marginLeft="5px"},PreventDefault:function(e){if(!e)e=window.event;if(e.stopPropagation){e.preventDefault();e.stopPropagation()}else{e.cancelBubble=true;e.returnValue=false}return false},CreateElement:function(e,t,n,i){if(!i)i=document;var o=i.createElement(e),r;if(t){for(r in t){if(r=="className"||r=="class"){o.setAttribute("class",t[r]);if(jsUtils.IsIE())o.setAttribute("className",t[r]);continue}if(t[r]!=undefined&&t[r]!=null)o.setAttribute(r,t[r])}}if(n){for(r in n)o.style[r]=n[r]}return o},in_array:function(e,t){for(var n=0;n<t.length;n++){if(t[n]==e)return true}return false},htmlspecialchars:function(e){if(!e.replace)return e;return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}};function JCFloatDiv(){var e=this;this.floatDiv=null;this.x=this.y=0;this.Create=function(e){var t=document.body.appendChild(document.createElement("DIV"));t.id=e.id;t.style.position="absolute";t.style.left="-10000px";t.style.top="-10000px";if(e.className)t.className=e.className;if(e.zIndex)t.style.zIndex=e.zIndex;if(e.width)t.style.width=e.width+"px";if(e.height)t.style.height=e.height+"px";return t};this.Show=function(e,t,n,i,o){var r=BX.ZIndexManager.getComponent(e);if(!r){BX.ZIndexManager.register(e)}BX.ZIndexManager.bringToFront(e);if(t<0)t=0;if(n<0)n=0;e.style.left=parseInt(t)+"px";e.style.top=parseInt(n)+"px";e.restrictDrag=o||false;if(isNaN(i))i=5;e.dxShadow=i};this.Close=function(e){if(!e)return;var t=document.getElementById(e.id+"_shadow");if(t)t.style.visibility="hidden";var n=document.getElementById(e.id+"_frame");if(n)n.style.visibility="hidden"};this.Move=function(e,t,n){if(!e)return;var i=e.dxShadow;var o=parseInt(e.style.left)+t;var r=parseInt(e.style.top)+n;if(e.restrictDrag){if(o<0)o=0;if(document.compatMode&&document.compatMode=="CSS1Compat")windowWidth=document.documentElement.scrollWidth;else{if(document.body.scrollWidth>document.body.offsetWidth||document.compatMode&&document.compatMode=="BackCompat"||document.documentElement&&!document.documentElement.clientWidth)windowWidth=document.body.scrollWidth;else windowWidth=document.body.offsetWidth}var s=e.offsetWidth;if(o>windowWidth-s-i)o=windowWidth-s-i;if(r<0)r=0}e.style.left=o+"px";e.style.top=r+"px";this.AdjustShadow(e)};this.HideShadow=function(e){var t=document.getElementById(e.id+"_shadow");t.style.visibility="hidden"};this.UnhideShadow=function(e){var t=document.getElementById(e.id+"_shadow");t.style.visibility="visible"};this.AdjustShadow=function(e){var t=document.getElementById(e.id+"_shadow");if(t&&t.style.visibility!="hidden"){var n=e.dxShadow;t.style.width=e.offsetWidth+"px";t.style.height=e.offsetHeight+"px";t.style.left=parseInt(e.style.left)+n+"px";t.style.top=parseInt(e.style.top)+n+"px"}var i=document.getElementById(e.id+"_frame");
35if(i){i.style.width=e.offsetWidth+"px";i.style.height=e.offsetHeight+"px";i.style.left=e.style.left;i.style.top=e.style.top}};this.StartDrag=function(t,n){if(!t)t=window.event;this.x=t.clientX+document.body.scrollLeft;this.y=t.clientY+document.body.scrollTop;this.floatDiv=n;jsUtils.addEvent(document,"mousemove",this.MoveDrag);document.onmouseup=this.StopDrag;if(document.body.setCapture)document.body.setCapture();document.onmousedown=jsUtils.False;var i=document.body;i.ondrag=jsUtils.False;i.onselectstart=jsUtils.False;i.style.MozUserSelect=e.floatDiv.style.MozUserSelect="none";i.style.cursor="move"};this.StopDrag=function(t){if(document.body.releaseCapture)document.body.releaseCapture();jsUtils.removeEvent(document,"mousemove",e.MoveDrag);document.onmouseup=null;this.floatDiv=null;document.onmousedown=null;var n=document.body;n.ondrag=null;n.onselectstart=null;n.style.MozUserSelect=e.floatDiv.style.MozUserSelect="";n.style.cursor=""};this.MoveDrag=function(t){var n=t.clientX+document.body.scrollLeft;var i=t.clientY+document.body.scrollTop;if(e.x==n&&e.y==i)return;e.Move(e.floatDiv,n-e.x,i-e.y);e.x=n;e.y=i}}var jsFloatDiv=new JCFloatDiv;var BXHint=function(e,t,n){this.oDivOver=false;this.timeOutID=null;this.oIcon=null;this.freeze=false;this.x=0;this.y=0;this.time=700;if(!e)e="";this.Create(e,t,n)};BXHint.prototype.Create=function(e,t,n){var i=this,o=0,r=0,s=null,l="icon";this.bWidth=true;if(n){if(n.width===false)this.bWidth=false;else if(n.width)o=n.width;if(n.height)r=n.height;if(n.className)s=n.className;if(n.type&&(n.type=="link"||n.type=="icon"))l=n.type;if(n.time>0)this.time=n.time}if(t)l="element";if(l=="icon"){var t=document.createElement("IMG");t.src=n&&n.iconSrc?n.iconSrc:"/bitrix/themes/"+phpVars.ADMIN_THEME_ID+"/public/popup/hint.gif";t.ondrag=jsUtils.False}else if(l=="link"){var t=document.createElement("A");t.href="";t.onclick=function(e){return false};t.innerHTML="[?]"}this.element=t;if(l=="element"){if(n&&n.show_on_click){jsUtils.addEvent(t,"click",function(t){if(!t)t=window.event;i.GetMouseXY(t);i.timeOutID=setTimeout(function(){i.Show(e,o,r,s)},10)})}else{jsUtils.addEvent(t,"mouseover",function(t){if(!t)t=window.event;i.GetMouseXY(t);i.timeOutID=setTimeout(function(){i.Show(e,o,r,s)},750)})}jsUtils.addEvent(t,"mouseout",function(e){if(i.timeOutID)clearTimeout(i.timeOutID);i.SmartHide(i)})}else{this.oIcon=t;t.onmouseover=function(t){if(!t)t=window.event;i.GetMouseXY(t);i.Show(e,o,r,s)};t.onmouseout=function(){i.SmartHide(i)}}};BXHint.prototype.IsFrozen=function(){return this.freeze};BXHint.prototype.Freeze=function(){this.freeze=true;this.Hide()};BXHint.prototype.UnFreeze=function(){this.freeze=false};BXHint.prototype.GetMouseXY=function(e){if(e.pageX||e.pageY){this.x=e.pageX;this.y=e.pageY}else if(e.clientX||e.clientY){this.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;this.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}};BXHint.prototype.Show=function(e,t,n,i){var o=document.getElementById("__BXHint_div");if(o)this.Hide();if(this.freeze)return;var r=this;var s=document.body.appendChild(document.createElement("DIV"));s.onmouseover=function(){r.oDivOver=true};s.onmouseout=function(){r.oDivOver=false;r.SmartHide(r)};s.id="__BXHint_div";s.className=i?i:"bxhint";s.style.position="absolute";if(t&&this.bWidth)s.style.width=t+"px";if(n)s.style.height=n+"px";s.innerHTML=e;var l=s.offsetWidth;var a=s.offsetHeight;if(this.bWidth){if(!t&&l>200)l=Math.round(Math.sqrt(1.618*l*a));s.style.width=l+"px";a=s.offsetHeight}var f={left:this.x+10,right:this.x+l,top:this.y,bottom:this.y+a};f=this.AlignToPos(f,l,a);jsFloatDiv.Show(s,f.left,f.top,3);s=null};BXHint.prototype.AlignToPos=function(e,t,n){var i=document.body;if(i.clientWidth+i.scrollLeft<e.left+t)e.left=e.left-t>=0?e.left-t:i.scrollLeft;if(i.clientHeight+i.scrollTop-e["bottom"]<0)e.top=e.top-n>=0?e.top-n:i.scrollTop;return e};BXHint.prototype.Hide=function(){var e=document.getElementById("__BXHint_div");if(!e)return;BX.ZIndexManager.unregister(e);jsFloatDiv.Close(e);e.parentNode.removeChild(e);e=null};BXHint.prototype.SmartHide=function(e){setTimeout(function(){if(!e.oDivOver)e.Hide()},100)};function WaitOnKeyPress(e){if(!e)e=window.event;if(!e)return;if(e.keyCode==27)CloseWaitWindow()}function ShowWaitWindow(){CloseWaitWindow();var e=jsUtils.GetWindowSize();var t=document.body.appendChild(document.createElement("DIV"));t.id="wait_window_div";t.innerHTML=phpVars.messLoading;t.className="waitwindow";t.style.right=5-e.scrollLeft+"px";t.style.top=e.scrollTop+5+"px";
35if(jsUtils.IsIE()){var n=document.createElement("IFRAME");n.src="javascript:''";n.id="wait_window_frame";n.className="waitwindow";n.style.width=t.offsetWidth+"px";n.style.height=t.offsetHeight+"px";n.style.right=t.style.right;n.style.top=t.style.top;document.body.appendChild(n)}jsUtils.addEvent(document,"keypress",WaitOnKeyPress)}function CloseWaitWindow(){jsUtils.removeEvent(document,"keypress",WaitOnKeyPress);var e=document.getElementById("wait_window_frame");if(e)e.parentNode.removeChild(e);var t=document.getElementById("wait_window_div");if(t)t.parentNode.removeChild(t)}var jsSelectUtils={addNewOption:function(e,t,n,i,o){var r=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(r){var s=r.length;if(o!==false){for(var l=0;l<s;l++)if(r[l].value==t)return}var a=new Option(n,t,false,false);r.options[s]=a}if(i===true)this.sortSelect(e)},deleteOption:function(e,t){var n=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(n){for(var i=0;i<n.length;i++)if(n[i].value==t){n.remove(i);break}}},deleteSelectedOptions:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=0;while(n<t.length)if(t[n].selected){t[n].selected=false;t.remove(n)}else n++}},deleteAllOptions:function(e){if(e){for(var t=e.length-1;t>=0;t--)e.remove(t)}},optionCompare:function(e,t){var n=e.optText.toLowerCase();var i=t.optText.toLowerCase();if(n>i)return 1;if(n<i)return-1;return 0},sortSelect:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=[];var i=t.options.length;for(var o=0;o<i;o++){n[o]={optText:t[o].text,optValue:t[o].value}}n.sort(this.optionCompare);t.length=0;i=n.length;for(var o=0;o<i;o++){var r=new Option(n[o].optText,n[o].optValue,false,false);t[o]=r}}},selectAllOptions:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=t.length;for(var i=0;i<n;i++)t[i].selected=true}},selectOption:function(e,t){var n=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(n){var i=n.length;for(var o=0;o<i;o++)n[o].selected=n[o].value==t}},addSelectedOptions:function(e,t,n,i){if(!e)return;var o=e.length;for(var r=0;r<o;r++)if(e[r].selected)this.addNewOption(t,e[r].value,e[r].text,i,n)},moveOptionsUp:function(e){if(!e)return;var t=e.length;for(var n=0;n<t;n++){if(e[n].selected&&n>0&&e[n-1].selected==false){var i=new Option(e[n].text,e[n].value);var o=new Option(e[n-1].text,e[n-1].value);e[n]=o;e[n].selected=false;e[n-1]=i;e[n-1].selected=true}}},moveOptionsDown:function(e){if(!e)return;var t=e.length;for(var n=t-1;n>=0;n--){if(e[n].selected&&n<t-1&&e[n+1].selected==false){var i=new Option(e[n].text,e[n].value);var o=new Option(e[n+1].text,e[n+1].value);e[n]=o;e[n].selected=false;e[n+1]=i;e[n+1].selected=true}}}}; 36/* End */ 37; 38; /* Start:"a:4:{s:4:"full";s:41:"/bitrix/js/main/dd.min.js?168814679211114";s:6:"source";s:21:"/bitrix/js/main/dd.js";s:3:"min";s:25:"/bitrix/js/main/dd.min.js";s:3:"map";s:25:"/bitrix/js/main/dd.map.js";}"*/ 39(function(){if(window.jsDD)return;jsDD={arObjects:[],arDestinations:[],arDestinationsPriority:[],arContainers:[],arContainersPos:[],current_dest_index:false,current_node:null,wndSize:null,bStarted:false,bDisable:false,bDisableDestRefresh:false,bEscPressed:false,bScrollWindow:false,scrollViewTimer:null,scrollViewConfig:{checkerTimeout:30,scrollZone:25,scrollBy:25,scrollContainer:null,bScrollH:true,bScrollV:true,pos:null},setScrollWindow:function(s){jsDD.bScrollWindow=!!s;if(BX.type.isDomNode(s)){jsDD.scrollViewConfig.scrollContainer=s;jsDD.scrollViewConfig.pos=BX.pos(s);var e=BX.style(s,"overflow")||"visible",D=BX.style(s,"overflow-x")||"visible",r=BX.style(s,"overflow-y")||"visible";jsDD.scrollViewConfig.bScrollH=e!="visible"||D!="visible";jsDD.scrollViewConfig.bScrollV=e!="visible"||r!="visible"}},Reset:function(){jsDD.arObjects=[];jsDD.arDestinations=[];jsDD.arDestinationsPriority=[];jsDD.bStarted=false;jsDD.current_node=null;jsDD.current_dest_index=false;jsDD.bDisableDestRefresh=false;jsDD.bDisable=false;jsDD.x=null;jsDD.y=null;jsDD.start_x=null;jsDD.start_y=null;jsDD.wndSize=null;jsDD.bEscPressed=false;clearInterval(jsDD.scrollViewTimer);jsDD.bScrollWindow=false;jsDD.scrollViewTimer=null;
39jsDD.scrollViewConfig.scrollContainer=null},registerObject:function(s){BX.bind(s,"mousedown",jsDD.startDrag);BX.Event.bind(s,"touchstart",jsDD.startDrag,{passive:true});s.__bxddid=jsDD.arObjects.length;jsDD.arObjects[s.__bxddid]=s},unregisterObject:function(s){if(typeof s["__bxddid"]==="undefined"){return}delete jsDD.arObjects[s.__bxddid];delete s.__bxddid;BX.unbind(s,"mousedown",jsDD.startDrag);BX.unbind(s,"touchstart",jsDD.startDrag)},registerDest:function(s,e){if(!e)e=100;s.__bxddeid=jsDD.arDestinations.length;s.__bxddpriority=e;jsDD.arDestinations[s.__bxddeid]=s;if(!jsDD.arDestinationsPriority[e])jsDD.arDestinationsPriority[e]=[s.__bxddeid];else jsDD.arDestinationsPriority[e].push(s.__bxddeid);jsDD.refreshDestArea(s.__bxddeid)},unregisterDest:function(s){if(typeof s["__bxddeid"]==="undefined"){return}delete jsDD.arDestinations[s.__bxddeid];delete s.__bxddeid;delete s.__bxddpriority;jsDD.refreshDestArea()},disableDest:function(s){if(typeof s.__bxddeid!=="undefined"){s.__bxdddisabled=true}},enableDest:function(s){if(typeof s.__bxddeid!=="undefined"){s.__bxdddisabled=false}},registerContainer:function(s){jsDD.arContainers[jsDD.arContainers.length]=s},getContainersScrollPos:function(s,e){var D={left:0,top:0};for(var r=0,n=jsDD.arContainers.length;r<n;r++){if(jsDD.arContainers[r]&&s>=jsDD.arContainersPos[r]["left"]&&s<=jsDD.arContainersPos[r]["right"]&&e>=jsDD.arContainersPos[r]["top"]&&e<=jsDD.arContainersPos[r]["bottom"]){D.left=jsDD.arContainers[r].scrollLeft;D.top=jsDD.arContainers[r].scrollTop}}return D},setContainersPos:function(){for(var s=0,e=jsDD.arContainers.length;s<e;s++){if(jsDD.arContainers[s])jsDD.arContainersPos[s]=BX.pos(jsDD.arContainers[s])}},refreshDestArea:function(s){if(s&&typeof s=="object"&&typeof s.__bxddeid!="undefined"){s=s.__bxddeid}if(typeof s=="undefined"){for(var e=0,D=jsDD.arDestinations.length;e<D;e++){jsDD.refreshDestArea(e)}}else{if(null==jsDD.arDestinations[s])return;var r=BX.pos(jsDD.arDestinations[s]);jsDD.arDestinations[s].__bxpos=[r.left,r.top,r.right,r.bottom]}},_checkEsc:function(s){s=s||window.event;if(jsDD.bStarted&&s.keyCode==27){jsDD.stopCurrentDrag()}},stopCurrentDrag:function(){if(jsDD.bStarted){jsDD.bEscPressed=true;jsDD.stopDrag()}},_onscroll:function(){jsDD.wndSize=BX.GetWindowSize()},_checkScroll:function(){if(jsDD.bScrollWindow){var s={clientX:jsDD.x-jsDD.wndSize.scrollLeft,clientY:jsDD.y-jsDD.wndSize.scrollTop},e=false,D=jsDD.scrollViewConfig.scrollZone;if(s.clientY<D&&jsDD.wndSize.scrollTop>0){window.scrollBy(0,-jsDD.scrollViewConfig.scrollBy);e=true}if(s.clientY>jsDD.wndSize.innerHeight-D&&jsDD.wndSize.scrollTop<jsDD.wndSize.scrollHeight-jsDD.wndSize.innerHeight){window.scrollBy(0,jsDD.scrollViewConfig.scrollBy);e=true}if(s.clientX<D&&jsDD.wndSize.scrollLeft>0){window.scrollBy(-jsDD.scrollViewConfig.scrollBy,0);e=true}if(s.clientX>jsDD.wndSize.innerWidth-D&&jsDD.wndSize.scrollLeft<jsDD.wndSize.scrollWidth-jsDD.wndSize.innerWidth){window.scrollBy(jsDD.scrollViewConfig.scrollBy,0);e=true}if(jsDD.scrollViewConfig.scrollContainer){var r=jsDD.scrollViewConfig.scrollContainer;if(jsDD.scrollViewConfig.bScrollH){if(s.clientX+jsDD.wndSize.scrollLeft<jsDD.scrollViewConfig.pos.left+D&&r.scrollLeft>0){r.scrollLeft-=jsDD.scrollViewConfig.scrollBy;e=true}if(s.clientX+jsDD.wndSize.scrollLeft>jsDD.scrollViewConfig.pos.right-D&&r.scrollLeft<r.scrollWidth-r.offsetWidth){r.scrollLeft+=jsDD.scrollViewConfig.scrollBy;e=true}}if(jsDD.scrollViewConfig.bScrollV){if(s.clientY+jsDD.wndSize.scrollTop<jsDD.scrollViewConfig.pos.top+D&&r.scrollTop>0){r.scrollTop-=jsDD.scrollViewConfig.scrollBy;e=true}if(s.clientY+jsDD.wndSize.scrollTop>jsDD.scrollViewConfig.pos.bottom-D&&r.scrollTop<r.scrollHeight-r.offsetHeight){r.scrollTop+=jsDD.scrollViewConfig.scrollBy;e=true}}}if(e){jsDD._onscroll();jsDD.drag(s)}}},startDrag:function(s){if(jsDD.bDisable)return true;s=s||window.event;if(!(BX.getEventButton(s)&BX.MSLEFT))return true;jsDD.current_node=null;if(s.currentTarget){jsDD.current_node=s.currentTarget;if(null==jsDD.current_node||null==jsDD.current_node.__bxddid){jsDD.current_node=null;return}}else{jsDD.current_node=s.srcElement;if(null==jsDD.current_node)return;while(null==jsDD.current_node.__bxddid){jsDD.current_node=jsDD.current_node.parentNode;if(jsDD.current_node.tagName=="BODY")return}}
39jsDD.bStarted=false;jsDD.bPreStarted=true;jsDD.wndSize=BX.GetWindowSize();jsDD.start_x=s.clientX+jsDD.wndSize.scrollLeft;jsDD.start_y=s.clientY+jsDD.wndSize.scrollTop;BX.bind(document,"mouseup",jsDD.stopDrag);BX.bind(document,"touchend",jsDD.stopDrag);BX.bind(document,"mousemove",jsDD.drag);BX.bind(document,"touchmove",jsDD.drag);BX.bind(window,"scroll",jsDD._onscroll);if(document.body.setCapture)document.body.setCapture();if(!jsDD.bDisableDestRefresh)jsDD.refreshDestArea();jsDD.setContainersPos();if(s.type!=="touchstart"){jsDD.denySelection();return BX.PreventDefault(s)}else{return true}},start:function(){if(jsDD.bDisable)return true;document.body.style.cursor="move";if(jsDD.current_node.onbxdragstart)jsDD.current_node.onbxdragstart();for(var s=0,e=jsDD.arDestinations.length;s<e;s++){if(jsDD.arDestinations[s]&&jsDD.arDestinations[s].onbxdestdragstart)jsDD.arDestinations[s].onbxdestdragstart(jsDD.current_node)}jsDD.bStarted=true;jsDD.bPreStarted=false;if(jsDD.bScrollWindow){if(jsDD.scrollViewTimer)clearInterval(jsDD.scrollViewTimer);jsDD.scrollViewTimer=setInterval(jsDD._checkScroll,jsDD.scrollViewConfig.checkerTimeout)}BX.bind(document,"keypress",this._checkEsc)},drag:function(s){if(jsDD.bDisable)return true;s=s||window.event;jsDD.x=s.clientX+jsDD.wndSize.scrollLeft;jsDD.y=s.clientY+jsDD.wndSize.scrollTop;if(!jsDD.bStarted){var e=5;if(jsDD.x>=jsDD.start_x-e&&jsDD.x<=jsDD.start_x+e&&jsDD.y>=jsDD.start_y-e&&jsDD.y<=jsDD.start_y+e)return true;jsDD.start()}if(jsDD.current_node.onbxdrag){jsDD.current_node.onbxdrag(jsDD.x,jsDD.y,s)}var D=jsDD.getContainersScrollPos(jsDD.x,jsDD.y);var r=jsDD.searchDest(jsDD.x+D.left,jsDD.y+D.top);if(r!==jsDD.current_dest_index){if(jsDD.current_dest_index!==false){if(jsDD.current_node.onbxdraghout)jsDD.current_node.onbxdraghout(jsDD.arDestinations[jsDD.current_dest_index],jsDD.x,jsDD.y);if(jsDD.arDestinations[jsDD.current_dest_index].onbxdestdraghout)jsDD.arDestinations[jsDD.current_dest_index].onbxdestdraghout(jsDD.current_node,jsDD.x,jsDD.y)}if(r!==false){if(jsDD.current_node.onbxdraghover)jsDD.current_node.onbxdraghover(jsDD.arDestinations[r],jsDD.x,jsDD.y);if(jsDD.arDestinations[r].onbxdestdraghover)jsDD.arDestinations[r].onbxdestdraghover(jsDD.current_node,jsDD.x,jsDD.y)}}jsDD.current_dest_index=r},stopDrag:function(s){BX.unbind(document,"keypress",jsDD._checkEsc);s=s||window.event;jsDD.bPreStarted=false;if(jsDD.bStarted){if(!jsDD.bEscPressed){jsDD.x=s.clientX+jsDD.wndSize.scrollLeft;jsDD.y=s.clientY+jsDD.wndSize.scrollTop}if(null!=jsDD.current_node.onbxdragstop)jsDD.current_node.onbxdragstop(jsDD.x,jsDD.y,s);var e=jsDD.getContainersScrollPos(jsDD.x,jsDD.y);var D=jsDD.searchDest(jsDD.x+e.left,jsDD.y+e.top);if(false!==D){if(jsDD.bEscPressed){if(null!=jsDD.arDestinations[D].onbxdestdraghout){if(!jsDD.arDestinations[D].onbxdestdraghout(jsDD.current_node,jsDD.x,jsDD.y))D=false;else{if(null!=jsDD.current_node.onbxdragfinish)jsDD.current_node.onbxdragfinish(jsDD.arDestinations[D],jsDD.x,jsDD.y)}}}else{if(null!=jsDD.arDestinations[D].onbxdestdragfinish){if(!jsDD.arDestinations[D].onbxdestdragfinish(jsDD.current_node,jsDD.x,jsDD.y,s))D=false;else{if(null!=jsDD.current_node.onbxdragfinish)jsDD.current_node.onbxdragfinish(jsDD.arDestinations[D],jsDD.x,jsDD.y)}}}}if(false===D){if(null!=jsDD.current_node.onbxdragrelease)jsDD.current_node.onbxdragrelease(jsDD.x,jsDD.y)}else{for(var r=0,n=jsDD.arDestinations.length;r<n;r++){if(r!=D&&jsDD.arDestinations[r]&&null!=jsDD.arDestinations[r].onbxdestdragrelease)jsDD.arDestinations[r].onbxdestdragrelease(jsDD.current_node,jsDD.x,jsDD.y)}}for(var r=0,n=jsDD.arDestinations.length;r<n;r++){if(jsDD.arDestinations[r]&&null!=jsDD.arDestinations[r].onbxdestdragstop)jsDD.arDestinations[r].onbxdestdragstop(jsDD.current_node,jsDD.x,jsDD.y)}}if(document.body.releaseCapture)document.body.releaseCapture();BX.unbind(window,"scroll",jsDD._onscroll);BX.unbind(document,"mousemove",jsDD.drag);BX.unbind(document,"touchmove",jsDD.drag);BX.unbind(document,"keypress",jsDD._checkEsc);BX.unbind(document,"mouseup",jsDD.stopDrag);BX.unbind(document,"touchend",jsDD.stopDrag);jsDD.allowSelection();document.body.style.cursor="";jsDD.current_node=null;jsDD.current_dest_index=false;if(jsDD.bScrollWindow){if(jsDD.scrollViewTimer)clearInterval(jsDD.scrollViewTimer)}if(jsDD.bStarted&&!jsDD.bDisableDestRefresh)jsDD.refreshDestArea();jsDD.bStarted=false;jsDD.bEscPressed=false},searchDest:function(s,e){var D,r,n,t,o;for(D=0,r=jsDD.arDestinationsPriority.length;D<r;D++){if(jsDD.arDestinationsPriority[D]&&BX.type.isArray(jsDD.arDestinationsPriority[D])){for(n=0,t=jsDD.arDestinationsPriority[D].length;n<t;n++){o=jsDD.arDestinationsPriority[D][n];if(jsDD.arDestinations[o]&&!jsDD.arDestinations[o].__bxdddisabled){if(jsDD.arDestinations[o].__bxpos[0]<=s&&jsDD.arDestinations[o].__bxpos[2]>=s&&jsDD.arDestinations[o].__bxpos[1]<=e&&jsDD.arDestinations[o].__bxpos[3]>=e){return o}}}}}return false},allowSelection:function(){document.onmousedown=document.ontouchstart=null;var s=document.body;s.ondrag=null;s.onselectstart=null;s.style.MozUserSelect="";if(jsDD.current_node){jsDD.current_node.ondrag=null;jsDD.current_node.onselectstart=null;jsDD.current_node.style.MozUserSelect=""}},denySelection:function(){document.onmousedown=document.ontouchstart=BX.False;var s=document.body;s.ondrag=BX.False;s.onselectstart=BX.False;s.style.MozUserSelect="none";if(jsDD.current_node){jsDD.current_node.ondrag=BX.False;jsDD.current_node.onselectstart=BX.False;jsDD.current_node.style.MozUserSelect="none"}},Disable:function(){jsDD.bDisable=true},Enable:function(){jsDD.bDisable=false}}})(); 40/* End */ 41; 42; /* Start:"a:4:{s:4:"full";
42s:56:"/bitrix/js/main/core/core_tooltip.min.js?176897801211837";s:6:"source";s:36:"/bitrix/js/main/core/core_tooltip.js";s:3:"min";s:40:"/bitrix/js/main/core/core_tooltip.min.js";s:3:"map";s:40:"/bitrix/js/main/core/core_tooltip.map.js";}"*/ 43(function(window){if(BX.tooltip)return;var arTooltipIndex={},bDisable=false;BX.tooltip=function(i,t,s,e,o,a){if(BX.message("TOOLTIP_ENABLED")!="Y"){return}if(BX.browser.IsAndroid()||BX.browser.IsIOS()){return}BX.ready((function(){var r=BX(t);if(null==r){return}var n=i;if(o&&BX.type.isNotEmptyString(s)){var l=0;for(var h=0,d=s.length;h<d;h++){l=31*l+s.charCodeAt(h)<<0}n=l+i}if(null==arTooltipIndex[n]){arTooltipIndex[n]=new BX.CTooltip(i,r,s,e,o,a)}else{arTooltipIndex[n].ANCHOR=r;arTooltipIndex[n].rootClassName=e;arTooltipIndex[n].LOADER=o&&BX.type.isNotEmptyString(s)?s:"/bitrix/tools/tooltip.php";arTooltipIndex[n].params=a;arTooltipIndex[n].Create()}}))};BX.tooltip.disable=function(){bDisable=true};BX.tooltip.enable=function(){bDisable=false};BX.tooltip.hide=function(i){if(BX("user_info_"+i)){BX("user_info_"+i).style.display="none"}};BX.tooltip.openIM=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.openChat(i);BX.tooltip.hide(i)}else if(BX("MULSonetMessageChatTemplate")){window.open(BX("MULSonetMessageChatTemplate").replace("#user_id#",i).replace("#USER_ID#",i).replace("#ID#",i),"","location=yes,status=no,scrollbars=yes,resizable=yes,width=700,height=550,top="+Math.floor((screen.height-550)/2-14)+",left="+Math.floor((screen.width-700)/2-5));BX.tooltip.hide(i)}return false};BX.tooltip.openCallTo=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.startVideoCall(i)}return false};BX.tooltip.checkCallTo=function(i){};BX.tooltip.openVideoCall=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.startVideoCall(i)}else if(BX("MULVideoCallTemplate")){window.open(BX("MULVideoCallTemplate").replace("#user_id#",i).replace("#USER_ID#",i).replace("#ID#",i),"","location=yes,status=no,scrollbars=yes,resizable=yes,width=1000,height=600,top="+Math.floor((screen.height-600)/2-14)+",left="+Math.floor((screen.width-1e3)/2-5));BX.tooltip.hide(i)}return false};BX.CTooltip=function(user_id,anchor,loader,rootClassName,bForceUseLoader,params){this.LOADER=bForceUseLoader&&BX.type.isNotEmptyString(loader)?loader:"/bitrix/tools/tooltip.php";this.USER_ID=user_id;this.ANCHOR=anchor;this.rootClassName="";this.params=typeof params!="undefined"?params:{};if(rootClassName!="undefined"&&rootClassName!=null&&rootClassName.length>0){this.rootClassName=rootClassName}var old=document.getElementById("user_info_"+this.USER_ID);if(null!=old){if(null!=old.parentNode)old.parentNode.removeChild(old);old=null}var _this=this;this.INFO=null;this.width=393;this.height=302;this.RealAnchor=null;this.CoordsLeft=0;this.CoordsTop=0;this.AnchorRight=0;this.AnchorBottom=0;this.DIV=null;this.ROOT_DIV=null;if(BX.browser.IsIE()){this.IFRAME=null}this.v_delta=0;this.classNameAnim=false;this.classNameFixed=false;this.left=0;this.top=0;this.tracking=false;this.active=false;this.showed=false;this.Create=function(){_this.ANCHOR.onmouseover=function(){if(!bDisable){_this.StartTrackMouse(this)}};_this.ANCHOR.onmouseout=function(){_this.StopTrackMouse(this)}};this.Create();this.TrackMouse=function(i){if(!_this.tracking)return;var t;if(i&&i.pageX)t={x:i.pageX,y:i.pageY};else t={x:i.clientX+document.body.scrollLeft,y:i.clientY+document.body.scrollTop};if(t.x<0)t.x=0;if(t.y<0)t.y=0;t.time=_this.tracking;if(!_this.active)_this.active=t;else{if(_this.active.x>=t.x-1&&_this.active.x<=t.x+1&&_this.active.y>=t.y-1&&_this.active.y<=t.y+1){if(_this.active.time+20<=t.time)_this.ShowTooltip()}else _this.active=t}};this.ShowTooltip=function(){var i=document.getElementById("user_info_"+_this.USER_ID);if(bDisable||i&&i.style.display=="block")return;var t=BX.browser.IsIE()&&!BX.browser.IsIE10();if(!BX.type.isPlainObject(this.params)){this.params={}}if(null==_this.DIV&&null==_this.ROOT_DIV){_this.ROOT_DIV=document.body.appendChild(document.createElement("DIV"));_this.ROOT_DIV.style.position="absolute";BX.ZIndexManager.register(_this.ROOT_DIV);_this.DIV=_this.ROOT_DIV.appendChild(document.createElement("DIV"));if(t)_this.DIV.className="bx-user-info-shadow-ie";else _this.DIV.className="bx-user-info-shadow";_this.DIV.style.width=_this.width+"px";_this.DIV.style.height=_this.height+"px"}var s=_this.CoordsLeft;var e=_this.CoordsTop+30;var o=BX.GetWindowScrollPos();var a=document.body;var r=false;var n=false;if(a.clientWidth+o.scrollLeft<s+_this.width){s=_this.AnchorRight-_this.width;r=true}if(e-o.scrollTop<0){e=_this.AnchorBottom-5;n=true;_this.v_delta=40}else _this.v_delta=0;_this.ROOT_DIV.style.left=parseInt(s)+"px";_this.ROOT_DIV.style.top=parseInt(e)+"px";BX.ZIndexManager.bringToFront(_this.ROOT_DIV);BX.bind(BX(_this.ROOT_DIV),"click",BX.eventCancelBubble);if(this.rootClassName!="undefined"&&this.rootClassName!=null&&this.rootClassName.length>0)_this.ROOT_DIV.className=this.rootClassName;if(""==_this.DIV.innerHTML){var l=_this.LOADER+(_this.LOADER.indexOf("?")>=0?"&":"?")+"MUL_MODE=INFO&USER_ID="+_this.USER_ID+"&site="+(BX.message("S
43ITE_ID")||"")+(typeof _this.params!="undefined"&&typeof _this.params.entityType!="undefined"&&_this.params.entityType.length>0?"&entityType="+_this.params.entityType:"")+(typeof _this.params!="undefined"&&typeof _this.params.entityId!="undefined"&&parseInt(_this.params.entityId)>0?"&entityId="+parseInt(_this.params.entityId):"");BX.ajax.get(l,_this.InsertData);_this.DIV.id="user_info_"+_this.USER_ID;_this.DIV.innerHTML='<div class="bx-user-info-wrap">'+'<div class="bx-user-info-leftcolumn">'+'<div class="bx-user-photo" id="user-info-photo-'+_this.USER_ID+'"><div class="bx-user-info-data-loading">'+BX.message("JS_CORE_LOADING")+"</div></div>"+'<div class="bx-user-tb-control bx-user-tb-control-left" id="user-info-toolbar-'+_this.USER_ID+'"></div>'+"</div>"+'<div class="bx-user-info-data">'+'<div id="user-info-data-card-'+_this.USER_ID+'"></div>'+'<div class="bx-user-info-data-tools">'+'<div class="bx-user-tb-control bx-user-tb-control-right" id="user-info-toolbar2-'+_this.USER_ID+'"></div>'+'<div class="bx-user-info-data-clear"></div>'+"</div>"+"</div>"+'</div><div class="bx-user-info-bottomarea"></div>'}if(t){_this.DIV.className="bx-user-info-shadow-ie";_this.classNameAnim="bx-user-info-shadow-anim-ie";_this.classNameFixed="bx-user-info-shadow-ie"}else{_this.DIV.className="bx-user-info-shadow";_this.classNameAnim="bx-user-info-shadow-anim";_this.classNameFixed="bx-user-info-shadow"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-left-top.png', sizingMethod = 'crop' );";if(r&&n){if(BX.browser.IsIE6()){_this.DIV.className="bx-user-info-shadow-hv-ie6";_this.classNameAnim="bx-user-info-shadow-hv-anim-ie6";_this.classNameFixed="bx-user-info-shadow-hv-ie6"}else if(t){_this.DIV.className="bx-user-info-shadow-hv-ie";_this.classNameAnim="bx-user-info-shadow-hv-anim-ie";_this.classNameFixed="bx-user-info-shadow-hv-ie"}else{_this.DIV.className="bx-user-info-shadow-hv";_this.classNameAnim="bx-user-info-shadow-hv-anim";_this.classNameFixed="bx-user-info-shadow-hv"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-right-bottom.png', sizingMethod = 'crop' );"}else{if(r){if(t){_this.DIV.className="bx-user-info-shadow-h-ie";_this.classNameAnim="bx-user-info-shadow-h-anim-ie";_this.classNameFixed="bx-user-info-shadow-h-ie"}else{_this.DIV.className="bx-user-info-shadow-h";_this.classNameAnim="bx-user-info-shadow-h-anim";_this.classNameFixed="bx-user-info-shadow-h"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-right-top.png', sizingMethod = 'crop' );"}if(n){if(BX.browser.IsIE6()){_this.DIV.className="bx-user-info-shadow-v-ie6";_this.classNameAnim="bx-user-info-shadow-v-anim-ie6";_this.classNameFixed="bx-user-info-shadow-v-ie6"}else if(t){_this.DIV.className="bx-user-info-shadow-v-ie";_this.classNameAnim="bx-user-info-shadow-v-anim-ie";_this.classNameFixed="bx-user-info-shadow-v-ie"}else{_this.DIV.className="bx-user-info-shadow-v";_this.classNameAnim="bx-user-info-shadow-v-anim";_this.classNameFixed="bx-user-info-shadow-v"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-left-bottom.png', sizingMethod = 'crop' );"}}if(BX.browser.IsIE()&&null==_this.IFRAME){_this.IFRAME=document.body.appendChild(document.createElement("IFRAME"));_this.IFRAME.id=_this.DIV.id+"_frame";_this.IFRAME.style.position="absolute";_this.IFRAME.style.width=_this.width-60+"px";_this.IFRAME.style.height=_this.height-100+"px";_this.IFRAME.style.borderStyle="solid";_this.IFRAME.style.borderWidth="0px";_this.IFRAME.style.zIndex=550;_this.IFRAME.style.display="none"}if(BX.browser.IsIE()){_this.IFRAME.style.left=parseInt(s)+25+"px";_this.IFRAME.style.top=parseInt(e)+30+_this.v_delta+"px"}_this.DIV.style.display="none";_this.ShowOpacityEffect({func:_this.SetVisible,obj:_this.DIV,arParams:[]},0);document.getElementById("user_info_"+_this.USER_ID).onmouseover=function(){_this.StartTrackMouse(this)};document.getElementById("user_info_"+_this.USER_ID).onmouseout=function(){_this.StopTrackMouse(this)};BX.onCustomEvent("onTooltipShow",[this])};this.InsertData=function(data){if(null!=data&&data.length>0){eval("_this.INFO = "+data);var cardEl=document.getElementById("user-info-data-card-"+_this.USER_ID);cardEl.innerHTML=_this.INFO.RESULT.Card;var photoEl=document.getElementById("user-info-photo-"+_this.USER_ID);photoEl.innerHTML=_this.INFO.RESULT.Photo;var toolbarEl=document.getElementById("user-info-toolbar-"+_this.USER_ID);toolbarEl.innerHTML=_this.INFO.RESULT.Toolbar;var toolbar2El=document.getElementById("user-info-toolbar2-"+_this.USER_ID);toolbar2El.innerHTML=_this.INFO.RESULT.Toolbar2;if(BX.type.isArray(_this.INFO.RESULT.Scripts)){for(var i=0;i<_this.INFO.RESULT.Scripts.length;i++){eval(_this.INFO.RESULT.Scripts[i])}}BX.onCustomEvent("onTooltipInsertData",[_this])}}};BX.CTooltip.prototype.StartTrackMouse=function(i){var t=this;if(!this.tracking){var s=BX.pos(i);this.RealAnchor=i;this.CoordsLeft=s.left+0;this.CoordsTop=s.top-325;this.AnchorRight=s.right;this.AnchorBottom=s.bottom;this.tracking=1;BX.bind(document,"mousemove",t.TrackMouse);setTimeout((function(){t.tickTimer()}),500)}};BX.CTooltip.prototype.StopTrackMouse=function(){var i=this;if(this.tracking){BX.unbind(document,"mousemove",i.TrackMouse);this.active=false;setTimeout((function(){i.HideTooltip()}),500);this.tracking=false}};BX.CTooltip.prototype.tickTimer=function(){var i=this;if(this.tracking){this.tracking++;if(this.active){if(this.active.time+5<=this.tracking)this.ShowTooltip()}setTimeout((function(){i.tickTimer()}),100)}};BX.CTooltip.prototype.HideTooltip=function(){if(!this.tracking)this.ShowOpacityEffect({func:this.SetInVisible,obj:this.DIV,arParams:[]},1)};BX.CTooltip.prototype.ShowOpacityEffect=function(i,t){var s=3;var e=1;var o=1/s;var a=0,r,n=this;if(BX.browser.IsIE()&&n.DIV)n.DIV.className=n.classNameAnim;var l=function(){a++;
43if(a>s){clearInterval(h);if(!i.arParams)i.arParams=[];if(i.func&&i.obj)i.func.apply(i.obj,i.arParams);return}r=t?1-a*o:a*o;if(n.DIV!=null){try{n.DIV.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+r*100+")";n.DIV.style.opacity=r;n.DIV.style.MozOpacity=r;n.DIV.style.KhtmlOpacity=r}catch(i){}finally{if(!t&&a==1)n.DIV.style.display="block";if(t&&a==s&&n.DIV)n.DIV.style.display="none";if(BX.browser.IsIE()&&a==1&&t&&n.IFRAME)n.IFRAME.style.display="none";if(BX.browser.IsIE()&&a==s&&n.DIV){if(!t)n.IFRAME.style.display="block";n.DIV.style.filter=n.filterFixed;n.DIV.className=n.classNameFixed;n.DIV.innerHTML=""+n.DIV.innerHTML}if(t){BX.onCustomEvent("onTooltipHide",[n])}}}};var h=setInterval(l,e)}})(window); 44/* End */ 45; 46; /* Start:"a:4:{s:4:"full";s:45:"/bitrix/js/main/session.min.js?16610945512394";s:6:"source";s:26:"/bitrix/js/main/session.js";s:3:"min";s:30:"/bitrix/js/main/session.min.js";s:3:"map";s:30:"/bitrix/js/main/session.map.js";}"*/ 47function CBXSession(){var e=this;this.dateInput=new Date;this.dateCheck=new Date;this.dateHit=new Date;this.notifier=null;this.checkInterval=60;this.checkImmediately=false;this.Expand=function(t){this.key=t;BX.ready(function(){BX.bind(document,"keypress",e.OnUserInput);BX.bind(document.body,"mousemove",e.OnUserInput);BX.bind(document.body,"click",e.OnUserInput);setInterval(e.CheckSession,e.checkInterval*1e3)})};this.OnUserInput=function(){var t=new Date;e.dateInput.setTime(t.valueOf());if((t-e.dateHit)/1e3>e.checkInterval+5&&e.checkImmediately===false){e.checkImmediately=true;e.CheckSession()}};this.CheckSession=function(){var t=new Date;if((t-e.dateCheck)/1e3<e.checkInterval-1&&e.checkImmediately===false){return}e.dateCheck.setTime(t.valueOf());if(e.dateInput>e.dateHit){var i={method:"GET",headers:[{name:"X-Bitrix-Csrf-Token",value:BX.bitrix_sessid()}],dataType:"html",url:"/bitrix/tools/public_session.php?k="+e.key,data:"",onsuccess:function(t){e.CheckResult(t)},lsId:"sess_expand",lsTimeout:e.checkInterval-5};BX.ajax(i)}};this.CheckResult=function(t){var i=new Date;e.dateHit.setTime(i.valueOf());e.checkImmediately=false;if(t=="SESSION_EXPIRED"){if(BX.message("SessExpired")){if(!e.notifier){e.notifier=document.body.appendChild(BX.create("DIV",{props:{className:"bx-session-message"},style:{top:"0",backgroundColor:"#FFEB41",border:"1px solid #EDDA3C",width:"630px",fontFamily:"Arial,Helvetica,sans-serif",fontSize:"13px",fontWeight:"bold",textAlign:"center",color:"black",position:"absolute",zIndex:"10000",padding:"10px"},html:'<a class="bx-session-message-close" '+'style="display:block; width:12px; height:12px; background:url(/bitrix/js/main/core/images/close.gif) center no-repeat; float:right;" '+'href="javascript:bxSession.Close()"></a>'+BX.message("SessExpired")}));BX.ZIndexManager.register(e.notifier);BX.ZIndexManager.bringToFront(e.notifier);var s=BX.GetWindowScrollPos();var n=BX.GetWindowInnerSize();e.notifier.style.left=parseInt(s.scrollLeft+n.innerWidth/2-parseInt(e.notifier.clientWidth)/2)+"px";if(BX.browser.IsIE()){e.notifier.style.top=s.scrollTop+"px";BX.bind(window,"scroll",function(){var t=BX.GetWindowScrollPos();e.notifier.style.top=t.scrollTop+"px"})}else{e.notifier.style.position="fixed"}}e.notifier.style.display=""}}};this.Close=function(){this.notifier.style.display="none"}}var bxSession=new CBXSession; 48/* End */ 49; 50; /* Start:"a:4:{s:4:"full";s:56:"/bitrix/js/main/core/core_autosave.min.js?17689780127141";s:6:"source";s:37:"/bitrix/js/main/core/core_autosave.js";s:3:"min";s:41:"/bitrix/js/main/core/core_autosave.min.js";s:3:"map";s:41:"/bitrix/js/main/core/core_autosave.map.js";}"*/ 51(function(t){var e=BX.PageObject.getRootWindow();if(BX.CAutoSave&&e.BX.CAutoSave)return;BX.CAutoSave=function(t){this.FORM_NAME=t.form;this.FORM_MARKER=t.form_marker;this.FORM_ID=t.form_id;this.PERIOD=t.period||[4001,20990];this.RESTORE_DATA=null;this.TIMERS=[null,null];this.bInited=false;this.bRestoreInProgress=false;this.DISABLE_STANDARD_NOTIFY=t.DISABLE_STANDARD_NOTIFY;this.NOTIFY_CONTEXT=null;BX.ready(BX.defer(this.Prepare,this));BX.garbage(BX.delegate(this.Clear,this));if(BX.type.isNotEmptyString(this.FORM_MARKER)&&BX(this.FORM_MARKER)){var i=BX(this.FORM_MARKER);if(BX(i.form)&&BX.type.isNotEmptyString(i.form.name)){BX.addCustomEvent(e,"onExtAutoSaveReset_"+i.form.name,BX.proxy(this.Reset,this))}}};BX.CAutoSave.prototype.Prepare=function(){var t;if(this.FORM_NAME&&BX.type.isString(this.FORM_NAME))this.FORM=document.forms[this.FORM_NAME];else if(this.FORM_MARKER&&BX.type.isString(this.FORM_MARKER))this.FORM=(BX(this.FORM_MARKER)||{form:null}).form;if(!BX.type.isDomNode(this.FORM))return;this.FORM.BXAUTOSAVE=this;BX.bind(this.FORM,"submit",BX.proxy(this.ClearTimers,this));for(t=0;t<this.FORM.elements.length;t++){this.RegisterInput(this.FORM.elements[t])}setTimeout(BX.delegate(this._PrepareAfter,this),10)};BX.CAutoSave.prototype.RegisterInput=function(t){if(BX.type.isString(t)){setTimeout(BX.delegate((function(){this.RegisterInput(this.FORM[t]||BX(t))}),this),10)}else if(BX.type.isDomNode(t)){if(t.type!="button"&&t.type!="submit"&&t.type!="reset"&&t.type!="image"&&t.type!="hidden"){BX.bind(t,"change",BX.proxy(this.Init,this));if(t.type=="text"||t.type=="textarea"){BX.bind(t,"keyup",BX.proxy(this.Init,this))}if(t.type=="checkbox"||t.type=="radio"){BX.bind(t,"click",BX.proxy(this.Init,this))}}}};BX.CAutoSave.prototype.UnRegisterInput=function(t){if(BX.type.isString(t))t=this.FORM[t]||BX(t);if(BX.type.isDomNode(t)){BX.unbind(t,"change",BX.proxy(this.Init,this));BX.unbind(t,"keyup",BX.proxy(this.Init,this));BX.unbind(t,"click",BX.proxy(this.Init,this))}};BX.CAutoSave.prototype._PrepareAfter=function(){BX.onCustomEvent(this.FORM,"onAutoSavePrepare",[this,BX.proxy(this.Init,this)]);if(this.RESTORE_DATA){var t=this.FORM.name||Math.random();BX.removeCustomEvent("onExtAutoSaveRestoreClick_"+t,BX.proxy(this.Restore,this));BX.addCustomEvent("onExtAutoSaveRestoreClick_"+t,BX.proxy(this.Restore,this));var e=this._NotifyContext();if(e){e.Notify(BX.message("AUTOSAVE")+' <a href="javascript:void(0)" onclick="BX.CAutoSave.Re
51store(\''+BX.util.urlencode(t)+"', this); return false;\">"+BX.message("AUTOSAVE_R")+"</a>",false,true)}BX.onCustomEvent(this.FORM,"onAutoSaveRestoreFound",[this,this.RESTORE_DATA])}};BX.CAutoSave.prototype.Init=function(){if(this.TIMERS[0]){clearTimeout(this.TIMERS[0]);this.TIMERS[0]=null}this.TIMERS[0]=setTimeout(BX.proxy(this.TimerHandler,this),this.PERIOD[0]);if(!this.TIMERS[1]){this.TIMERS[1]=setInterval(BX.proxy(this.Save,this),this.PERIOD[1])}BX.onCustomEvent(this.FORM,"onAutoSaveInit",[this]);return true};BX.CAutoSave.prototype.TimerHandler=function(){if(this.TIMERS[1]){clearInterval(this.TIMERS[1]);this.TIMERS[1]=null}this.Save()};BX.CAutoSave.prototype.Save=function(){if(this.FORM&&BX.isNodeInDom(this.FORM)){var t,e,s,o={autosave_id:this.FORM_ID,form_data:{}};for(t=0;t<this.FORM.elements.length;t++){s=this.FORM.elements[t];if(s.name&&s.name!="sessid"&&s.name!="lang"&&s.name!="autosave_id"){var n=s.name,a="",r=s.type.toLowerCase();switch(r){case"button":case"submit":case"reset":case"image":case"file":case"password":break;case"radio":case"checkbox":if(s.checked)a=s.value||"on";break;case"select-multiple":n=n.substring(0,n.length-2);a=[];for(e=0;e<s.options.length;e++){if(s.options[e].selected){a.push(s.options[e].value)}}break;default:a=s.value}if(n.indexOf("[]")>0){n=i(n);if(typeof o.form_data[n]=="undefined")o.form_data[n]=[a];else o.form_data[n].push(a)}else o.form_data[i(n)]=a}}BX.onCustomEvent(this.FORM,"onAutoSave",[this,o.form_data]);BX.ajax.post("/bitrix/tools/autosave.php?bxsender=core_autosave&sessid="+BX.bitrix_sessid(),o,BX.proxy(this._Save,this))}else{this.Clear()}};BX.CAutoSave.prototype.Reset=function(){if(this.FORM&&BX.isNodeInDom(this.FORM)){BX.ajax.post("/bitrix/tools/autosave.php?bxsender=core_autosave&action=reset&sessid="+BX.bitrix_sessid(),{autosave_id:this.FORM_ID},null)}};BX.CAutoSave.prototype._Save=function(t){BX.onCustomEvent(this.FORM,"onAutoSaveFinished",[this,t])};BX.CAutoSave.prototype.Restore=function(t,e){if(t){this.RESTORE_DATA=o(t)}else if(this.FORM&&this.RESTORE_DATA){BX.onCustomEvent(this.FORM,"onAutoSaveRestore",[this,this.RESTORE_DATA]);this.bRestoreInProgress=true;for(var i=0;i<this.FORM.elements.length;i++){var s=this.FORM.elements[i];if(s&&BX.type.isDomNode(s)&&s.name){var n=undefined,a=s.name;if(s.type=="select-multiple")a=s.name.substring(0,s.name.length-2);n=this.RESTORE_DATA[a];if(a.indexOf("[]")>0&&BX.type.isArray(n))n=this.RESTORE_DATA[a].shift();if(s.type!="checkbox"&&typeof n=="undefined")continue;var r=false;switch(s.type){case"radio":if(!s.checked&&!!(n==s.value)){r=true;BX.fireEvent(s,"click")}break;case"checkbox":if(s.checked!=!!(n==s.value)){r=true;BX.fireEvent(s,"click")}break;case"select-one":for(var h=0;h<s.options.length;h++){var u=s.options[h].selected;s.options[h].selected=!!(n==s.options[h].value);r|=s.options[h].selected!=u}break;case"select-multiple":n=this.RESTORE_DATA[s.name.substring(0,s.name.length-2)];for(h=0;h<s.options.length;h++){u=s.options[h].selected;s.options[h].selected=!!(BX.type.isArray(n)&&BX.util.in_array(s.options[h].value,n));r|=s.options[h].selected!=u}break;case"file":case"button":case"image":case"submit":case"reset":case"password":break;default:r=n!=s.value;s.value=n}if(r)BX.fireEvent(s,"change")}}var l=this._NotifyContext();if(l)l.hideNotify(e.parentNode.parentNode);this.bRestoreInProgress=false;BX.onCustomEvent(this.FORM,"onAutoSaveRestoreFinished",[this,this.RESTORE_DATA])}};BX.CAutoSave.prototype._NotifyContext=function(){var t=null;if(!this.DISABLE_STANDARD_NOTIFY){if(this.NOTIFY_CONTEXT)t=this.NOTIFY_CONTEXT;else if(BX.WindowManager&&BX.WindowManager.Get())t=BX.WindowManager.Get();else if(BX.adminPanel)t=BX.adminPanel;else if(BX.admin&&BX.admin.panel)t=BX.admin.panel;this.NOTIFY_CONTEXT=t}return t};BX.CAutoSave.prototype.ClearTimers=function(){if(this.TIMERS){clearTimeout(this.TIMERS[0]);clearInterval(this.TIMERS[1])}};BX.CAutoSave.prototype.Clear=function(){if(this.FORM){this.FORM.BXAUTOSAVE=null;for(var t=0;t<this.FORM.elements.length;t++){this.UnRegisterInput(this.FORM.elements[t])}}this.ClearTimers();BX.onCustomEvent(this.FORM,"onAutoSaveClear",[this]);this.FORM=null;this.TIMERS=null};
51BX.CAutoSave.Restore=function(t,e){BX.onCustomEvent("onExtAutoSaveRestoreClick_"+t,[null,e])};function i(t){var e;while(e=/[^a-zA-Z0-9_\-]/.exec(t)){t=t.replace(e[0],"X"+BX.util.str_pad_left(e[0].charCodeAt(0).toString(),6,"0")+"X")}return t}function s(t){var e;while(e=/X[\d]{6}X/.exec(t)){t=t.replace(e[0],String.fromCharCode(parseInt(e[0].replace(/(^X[0]*)|(X$)/g,""))))}return t}function o(t){var e={};for(var i in t){e[s(i)]=t[i]}return e}e.BX.CAutoSave=BX.CAutoSave})(window); 52/* End */ 53; 54; /* Start:"a:4:{s:4:"full";s:50:"/bitrix/js/main/core/core_dd.min.js?17689780122190";s:6:"source";s:31:"/bitrix/js/main/core/core_dd.js";s:3:"min";s:35:"/bitrix/js/main/core/core_dd.min.js";s:3:"map";s:35:"/bitrix/js/main/core/core_dd.map.js";}"*/ 55(function(e){BX.DD=function(e){return new BX.DD.dragdrop(e)};BX.DD.allowSelection=function(){document.onmousedown=null;var e=document.body;e.ondrag=null;e.onselectstart=null;e.style.MozUserSelect=""};BX.DD.denySelection=function(){document.onmousedown=BX.False;var e=document.body;e.ondrag=BX.False;e.onselectstart=BX.False;e.style.MozUserSelect="none"};BX.DD.dragdrop=function(e){};BX.DD.dropFiles=function(e){if(BX.type.isElementNode(e)&&this.supported()){e.setAttribute("dropzone","copy f:*/*");this.DIV=e;this._timer=null;this._initEvents();this._cancelLeave=function(){if(this._timer!=null){clearTimeout(this._timer);this._timer=null}};this._prepareLeave=function(){this._cancelLeave();this._timer=setTimeout(BX.delegate((function(){BX.onCustomEvent(this,"dragLeave")}),this),100)};return this}return false};BX.DD.dropFiles.prototype._initEvents=function(){BX.bind(this.DIV,"dragover",BX.proxy(this._dragOver,this));BX.bind(this.DIV,"dragenter",BX.proxy(this._dragEnter,this));BX.bind(this.DIV,"dragleave",BX.proxy(this._dragLeave,this));BX.bind(this.DIV,"dragexit",BX.proxy(this._dragExit,this));BX.bind(this.DIV,"drop",BX.proxy(this._drop,this))};BX.DD.dropFiles.prototype._dragEnter=function(e){BX.PreventDefault(e);this._cancelLeave();BX.onCustomEvent(this,"dragEnter",[e]);return true};BX.DD.dropFiles.prototype._dragExit=function(e){BX.PreventDefault(e);this._prepareLeave();return false};BX.DD.dropFiles.prototype._dragLeave=function(e){BX.PreventDefault(e);this._prepareLeave();return false};BX.DD.dropFiles.prototype._dragOver=function(e){BX.PreventDefault(e);this._cancelLeave();return true};BX.DD.dropFiles.prototype._drop=function(e){BX.PreventDefault(e);var t=e.dataTransfer;var r=t.files;BX.onCustomEvent(this,"dropFiles",[r,e]);BX.onCustomEvent(this,"dragLeave");return false};BX.DD.dropFiles.prototype.isEventSupported=function(e){var t=BX.create("DIV");var r="on"+e;var n=r in t;if(!n&&t.setAttribute&&t.removeAttribute){t.setAttribute(r,"");n=typeof t[r]==="function"}t=null;return n};BX.DD.dropFiles.prototype.supported=function(){return!!e.FileReader&&this.isEventSupported("dragstart")&&this.isEventSupported("drop")}})(window); 56/* End */ 57; 58; /* Start:"a:4:{s:4:"full";s:53:"/bitrix/js/main/core/core_timer.min.js?17689780124311";s:6:"source";s:34:"/bitrix/js/main/core/core_timer.js";s:3:"min";s:38:"/bitrix/js/main/core/core_timer.min.js";s:3:"map";s:38:"/bitrix/js/main/core/core_timer.map.js";}"*/ 59(function(t){if(t.BX.timer)return;var i=[],e=200,a=null,s=0;BX.timer=function(t,i){i=i||{};if(BX.type.isString(t)||BX.type.isElementNode(t))i.container=t;else if(typeof t=="object")i=t;if(!i.container)return false;var s=new BX.CTimer(i);BX.timer.start(s);if(null==a){a=setInterval(r,e);BX.garbage(BX.timer.clear)}return s};BX.timer.stop=function(t){i[t.TIMER_INDEX]=null};BX.timer.start=function(t){t.TIMER_INDEX=s;i[s++]=t};BX.timer.clock=function(t,i){return BX.timer({container:t,dt:i})};BX.timer.clear=function(){clearInterval(a);i=null};BX.timer.registerFormat=function(t,i){BX.CTimer.prototype.formatValueHandlers[t]=i};BX.timer.getHandler=function(t){return BX.CTimer.prototype.formatValueHandlers[t]};BX.CTimer=function(t,i){this.container=t.container;this.from=t.from?parseInt(t.from.valueOf()):null;this.to=t.to?parseInt(t.to.valueOf()):null;this.index=i;this.dt=parseInt(t.dt);if(isNaN(this.dt))this.dt=0;this.display=t.display||(BX.isAmPmMode()?"clock_am_pm":"clock");this.accuracy=t.accuracy||60;this.callback=this.from?this._callback_from:this.to?this._callback_to:this._callback;this.callback_finish=t.callback_finish;this.formatValue=this.formatValueHandlers.clock;this.bInited=false;BX.ready(BX.delegate(this.Init,this))};BX.CTimer.prototype.Init=function(){if(this.bInited)return;this.container=BX(this.container);this.container_value_fld=this.container.tagName.toUpperCase()=="INPUT"?"value":"innerHTML";if(this.container_value_fld=="value"&&(this.display=="clock"||this.display=="clock_am_pm")){if(this.display=="clock"){this.display="simple"}else if(this.display=="clock_am_pm"){this.display="simple_am_pm"}}this.formatValue=this.formatValueHandlers[this.display]?this.formatValueHandlers[this.display]:this.formatValueHandlers.clock;this.bInited=true};BX.CTimer.prototype.setFrom=function(t){if(!this.from)return;this.from=t};BX.CTimer.prototype.setTo=function(t){if(!this.to)return;this.to=t};BX.CTimer.prototype._callback=function(t){if(this.dt!==0)var t=new Date(t.valueOf()+this.dt);this.setValue(this.formatValue(t.getHours(),t.getMinutes(),t.getSeconds()))};BX.CTimer.prototype._callback_from=function(t){var i=(t.valueOf()-this.from.valueOf()+this.dt)/1e3;this.setValue(this.formatValue(parseInt(i/3600),parseInt(i%3600/60),parseInt(i%60)))};BX.CTimer.prototype._callback_to=function(t){var i=(this.to.valueOf()-t.valueOf())/1e3;if(i>0){this.setValue(this.formatValue(parseInt(i/3600),parseInt(i%3600/60),parseInt(i%60)))}else{this.Finish()}};BX.CTimer.prototype.formatValueHandlers={clock:function(t,i,e){var a='<span class="bx-timer-semicolon">:</span>';return BX.util.str_pad(t,2,"0","left")+a+(this.accuracy>=3600?"00":BX.util.str_pad(i,2,"0","left"))+(this.accuracy>=60?"":a+BX.util.str_pad(e,2,"0","left"))},clock_am_pm:function(t,i,e){var a="am";var s='<span class="bx-timer-semicolon">:</span>';if(t>12){t=t-12;a="pm"}else if(t==0){t=12;a="am"}else if(t==12){a="pm"}return t+s+(this.accuracy>=3600?"00":BX.util.str_pad(i,2,"0","left"))+(this.accuracy>=60?"":s+BX.util.str_pad(e,2,"0","left"))+" "+a},simple:function(t,i,e){return BX.util.str_pad(t,2,"0","left")+":"+(this.accuracy>=3600?"00":BX.util.str_pad(i,2,"0","left"))+(this.accuracy>=60?"":":"+BX.util.str_pad(e,2,"0","left"))},simple_am_pm:function(t,i,e){var a="am";if(t>12){t=t-12;a="pm"}else if(t==0){t=12;a="am"}else if(t==12){a="pm"}return t+":"+(this.accuracy>=3600?"00":BX.util.str_pad(i,2,"0","left"))+(this.accuracy>=60?"":":"+BX.util.str_pad(e,2,"0","left"))+" "+a},worktime:function(t,i,e){return t+BX.message("JS_CORE_H")+" "+(this.accuracy>=3600?"":i+BX.message("JS_CORE_M")+(this.accuracy>=60?"":" "+e+BX.message("JS_CORE_S")))},worktime_short:function(t,i,e){return BX.util.rtrim((t>0?t+BX.message("JS_CORE_H")+" ":"")+(i>0&&this.accuracy<3600?i+BX.message("JS_CORE_M")+" ":"")+(this.accuracy>=60?"":e>0?e+BX.message("JS_CORE_S"):""))}};BX.CTimer.prototype.setValue=function(t){if(this.bInited){if(t!=this._last_value)this.container[this.container_value_fld]=t;this._last_value=t}};BX.CTimer.prototype.Finish=function(){BX.timer.stop(this);if(this.callback_finish)this.callback_finish.apply(this);BX.cleanNode(this.container.parentNode)};function r(){var t=new Date;for(var e=0,a=s;e<a;e++){if(i[e]&&i[e].callback)i[e].callback.apply(i[e],[t])}t=null}})(window); 60/* End */ 61; 62//# sourceMappingURL=kernel_main.map.js
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.