/var/www/myprog.com.ua/site/app/webix
Edit: /var/www/myprog.com.ua/site/app/webix/webix.js (559646B)
/*
@license
webix UI v.4.4.0
This software is allowed to use under GPL or you need to obtain Commercial License
to use it in non-GPL project. Please contact sales@webix.com for details
*/
window.webix||(webix={}),webix.version="4.4.0",webix.codebase="./",webix.name="core",webix.cdn="//cdn.webix.com",webix.clone=function(t){var e=webix.clone.a;return e.prototype=t,new e},webix.clone.a=function(){},webix.extend=function(t,e,i){if(t.$protoWait)return webix.PowerArray.insertAt.call(t.$protoWait,e,1),
t;for(var s in e)s in t&&!i||(t[s]=e[s]);return e.defaults&&webix.extend(t.defaults,e.defaults),e.$init&&e.$init.call(t),t},webix.copy=function(t){var e;arguments.length>1?(e=arguments[0],t=arguments[1]):e=webix.isArray(t)?[]:{};for(var i in t){var s=t[i];!s||"object"!=typeof s||s instanceof RegExp?e[i]=s:webix.isDate(s)?e[i]=new Date(s):(e[i]=webix.isArray(s)?[]:{},
webix.copy(e[i],s))}return e},webix.single=function(t){var e=null,i=function(i){return e||(e=new t({})),e.c&&e.c.apply(e,arguments),e};return i},webix.protoUI=function(){var t=arguments,e=t[0].name,i=function(t){if(!i)return webix.ui[e].prototype;var s=i.$protoWait;if(s){for(var n=[s[0]],r=1;r
0;n--){if("function"==typeof t[n]&&(t[n]=t[n].prototype),t[n].$init&&s.push(t[n].$init),t[n].defaults){var r=t[n].defaults;e.defaults||(e.defaults={});for(var a in r)webix.isUndefined(e.defaults[a])&&(e.defaults[a]=r[a]);
}if(t[n].type&&e.type)for(var a in t[n].type)e.type[a]||(e.type[a]=t[n].type[a]);for(var o in t[n])e[o]||e[o]===!1||(e[o]=t[n][o])}i&&s.push(e.$init),e.$init=function(){for(var t=0;t");
-1!==s?this[e.substr(0,s)].attachEvent(e.substr(s+2),webix.bind(i,this)):this.attachEvent(e,i)}},callEvent:function(t,e){if(this.i.l)return!0;t=t.toLowerCase();var i=this.i[t.toLowerCase()],s=!0;if(i)for(var n=0;n=0&&this.splice(t,e||1)},remove:function(t){this.removeAt(this.find(t))},insertAt:function(t,e){if(e||0===e){var i=this.splice(e,this.length-e);this[e]=t,this.push.apply(this,i)}else this.push(t)},find:function(t){for(var e=0;e-1){
webix.env.cssPrefix=n[i];var h=webix.env.jsPrefix=s[i];webix.env.transform=h?h+"Transform":"transform",webix.env.transition=h?h+"Transition":"transition",webix.env.transitionDuration=h?h+"TransitionDuration":"transitionDuration",r.style[webix.env.transform]="translate3d(0,0,0)",webix.env.translate=r.style[webix.env.transform]?"translate3d":"translate",
webix.env.transitionEnd="-Moz-"==webix.env.cssPrefix?"transitionend":h?h+"TransitionEnd":"transitionend"}webix.env.pointerevents=!webix.env.isIE||null!==new RegExp("Trident/.*rv:11").exec(t)}(),webix.env.svg=function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");
}(),webix.env.svganimation=function(){return document.implementation.hasFeature("https://www.w3.org/TR/SVG11/feature#SVG-animation","1.1")}(),webix.html={m:0,ky:{},denySelect:function(){webix.m||(webix.m=document.onselectstart),document.onselectstart=webix.html.stopEvent},allowSelect:function(){0!==webix.m&&(document.onselectstart=webix.m||null),
webix.m=0},index:function(t){for(var e=0;t=t.previousSibling;)e++;return e},n:{},createCss:function(t,e){var i="";e=e||"";for(var s in t)i+=s+":"+t[s]+";";var n=this.n[i+e];return n||(n="s"+webix.uid(),this.addStyle("."+n+(e||"")+"{"+i+"}"),this.n[i+e]=n),n},addStyle:function(t,e){var i=e?this.ky[e]:this.ky["default"];
i||(i=document.createElement("style"),i.setAttribute("type","text/css"),i.setAttribute("media","screen,print"),document.getElementsByTagName("head")[0].appendChild(i),e?this.ky[e]=i:this.ky["default"]=i),i.styleSheet?i.styleSheet.cssText+=t:i.appendChild(document.createTextNode(t))},removeStyle:function(t){
var e=this.ky[t||"default"];e&&(e.innerHTML="")},create:function(t,e,i){e=e||{};var s=document.createElement(t);for(var n in e)s.setAttribute(n,e[n]);return e.style&&(s.style.cssText=e.style),e["class"]&&(s.className=e["class"]),i&&(s.innerHTML=i),s},getValue:function(t){return t=webix.toNode(t),t?webix.isUndefined(t.value)?t.innerHTML:t.value:"";
},remove:function(t){if(t instanceof Array)for(var e=0;eo;o++){var l,c=i[o];try{l=c&&c.then}catch(u){n.reject(u);break}!function(e){t.thennable(l,function(t){i[e]=t,s()},function(t){n.reject(t);
},function(){s()},c)}(o)}return n})};var s={all:function(t){var i=new e(null,null);return i.resolve(t),i.all()},defer:function(){return new e(null,null)},reject:function(t){var e=this.defer();return e.state="rejected",e.val=t,e},resolve:function(t){var e=this.defer();return e.state="resolved",e.val=t,
e},fcall:function(){var t=new e,i=Array.apply([],arguments),s=i.shift();try{var n=s.apply(null,i);t.resolve(n)}catch(r){t.reject(r)}return t},nfcall:function(){var t=new e,i=Array.apply([],arguments),s=i.shift();try{i.push(function(e,i){return e?t.reject(e):t.resolve(i)}),s.apply(null,i)}catch(n){t.reject(n);
}return t}};t.promise=s}(webix),function(){function t(t,e){this.kD={},this.lD=[],this.mD=t,this.U="",e?this.nD(e):this.o=webix.ajax(t).then(function(t){return t.text()}).then(webix.bind(function(t){return t=t.split("/*api*/")[1],this.nD(JSON.parse(t)),this.kD},this))}function e(e,i){var s=new t(e,i);return s.oD();
}var i="__webix_remote_error";t.prototype={nD:function(t){if(t.$key&&(this.U=t.$key),t.$vars)for(var e in t.$vars)this.kD[e]=t.$vars[e];this.df(t,this.kD,"")},df:function(t,e,i){for(var s in t)if("$key"!==s&&"$vars"!==s){var n=t[s];if("object"==typeof n){var r=e[s]={};this.df(n,r,i+s+".")}else e[s]=this.pD(this,i+s);
}},qD:function(t,e){var i=this.rD(this,t,e);return this.lD.push(i),this.sD(),i},sD:function(){this.tD||(this.tD=setTimeout(webix.bind(this.uD,this),1))},uD:function(){for(var t=[],e=this.lD,s=0;s":">",'"':""","'":"'","`":"`"},a=/[&<>"'`]/g,o=function(t){return r[t]||"&"};webix.template=function(r){if("function"==typeof r)return r;if(t[r])return t[r];
if(r=(r||"").toString(),-1!=r.indexOf("->")){var a=r.split("->");switch(a[0]){case"html":r=webix.html.getValue(a[1]);break;case"http":r=(new webix.ajax).sync().get(a[1],{uid:webix.uid()}).responseText}}if(r=(r||"").toString(),webix.env.strict){if(!e[r]){e[r]=[];var o=[];if(r.replace(/\{obj\.([^}?]+)\?([^:]*):([^}]*)\}/g,function(t,e,i,s,n){
o.push({pos:n,str:t,fn:function(t,n){return t[e]?i:s}})}),r.replace(/\{common\.([^}\(]*)\}/g,function(t,e,i){o.push({pos:i,str:t,fn:function(t,i){return i[e]||""}})}),r.replace(/\{common\.([^\}\(]*)\(\)\}/g,function(t,e,i){o.push({pos:i,str:t,fn:function(t,i){return i[e]?i[e].apply(this,arguments):"";
}})}),r.replace(/\{obj\.([^:}]*)\}/g,function(t,e,i){o.push({pos:i,str:t,fn:function(t,i){return t[e]}})}),r.replace("{obj}",function(t,e,i){o.push({pos:i,str:t,fn:function(t,e){return t}})}),r.replace(/#([^#'";, ]+)#/gi,function(t,e,i){"!"==e.charAt(0)?(e=e.substr(1),o.push({pos:i,str:t,fn:function(t,i){
return-1!=e.indexOf(".")&&(t=webix.CodeParser.collapseNames(t)),webix.template.escape(t[e])}})):o.push({pos:i,str:t,fn:function(t,i){return-1!=e.indexOf(".")&&(t=webix.CodeParser.collapseNames(t)),t[e]}})}),o.sort(function(t,e){return t.pos>e.pos?1:-1}),o.length){for(var h=0,l=function(t,i,s){e[t].push(function(){
return t.slice(i,s)})},c=0;c")){var e=t.split("->");return webix.proxy(e[0],e[1])}return t},webix.proxy.post={$proxy:!0,
load:function(t,e,i){i=webix.extend(i||{},this.params||{},!0),webix.ajax().bind(t).post(this.source,i,e)}},webix.proxy.sync={$proxy:!0,load:function(t,e){webix.ajax().sync().bind(t).get(this.source,null,e)}},webix.proxy.connector={$proxy:!0,connectorName:"!nativeeditor_status",load:function(t,e){webix.ajax(this.source,e,t);
},saveAll:function(t,e,i,s){for(var n=this.source,r={},a=[],o=0;o=400||0===a.status;"blob"==a.responseType||"arraybuffer"==a.responseType?(t="",
e=a.response):(t=a.responseText||"",e=x.J(a)),webix.ajax.$callback(s,i,t,e,a,r)}x&&(x.master=null),i=x=n=null}},this.qh&&(a.timeout=this.qh),this.H?a.send(e||null):setTimeout(function(){a.aborted||(-1!=webix.ly.find(a)?webix.ly.remove(a):a.send(e||null))},1),this.master&&this.master.Ve&&this.master.Ve.push(a),
this.H?a:r}},J:function(t){return{xml:function(){try{return webix.DataDriver.xml.tagToObject(webix.DataDriver.xml.toObject(t.responseText,this))}catch(e){}},rawxml:function(){return window.XPathResult?t.responseXML:webix.DataDriver.xml.fromString(t.responseText)},text:function(){return t.responseText;
},json:function(){return webix.DataDriver.json.toObject(t.responseText,!1)}}},get:function(t,e,i){return this.G(t,e,i,"GET")},post:function(t,e,i){return this.G(t,e,i,"POST")},put:function(t,e,i){return this.G(t,e,i,"PUT")},del:function(t,e,i){return this.G(t,e,i,"DELETE")},patch:function(t,e,i){return this.G(t,e,i,"PATCH");
},sync:function(){return this.H=!0,this},timeout:function(t){return this.qh=t,this},response:function(t){return this.Tw=t,this},header:function(t){return this.I=t,this},headers:function(t){return this.I=webix.extend(this.I||{},t),this},bind:function(t){return this.master=t,this}},webix.ajax.$callback=function(t,e,i,s,n,r){
if(!t.$destructed){if(-1===n&&s&&"function"==typeof s.json&&(s=s.json()),r&&webix.callEvent("onAjaxError",[n]),webix.isArray(e)||(e=[e]),!r)for(var a=0;as&&(e.value=e.value||this.nodeValue(t))}return e},nodeValue:function(t){return t.firstChild?t.firstChild.wholeText||t.firstChild.data:""},fromString:function(t){try{if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");
if(window.ActiveXObject){var e=new ActiveXObject("Microsoft.xmlDOM");return e.loadXML(t),e}}catch(i){return null}}},webix.BaseBind={bind:function(t,e,i){this.attachEvent||webix.extend(this,webix.EventSystem),"string"==typeof t&&(t=webix.$$(t)),t.W&&t.W(),this.W&&this.W(),t.getBindData||webix.extend(t,webix.BindSource),
this.X(),t.addBind(this.s.id,e,i),this.Os=t.s.id;var s=this.s.id;this.Ps=this.attachEvent(this.touchable?"onAfterRender":"onBindRequest",function(){return t.getBindData(s)}),this.refresh&&this.isVisible(this.s.id)&&this.refresh()},unbind:function(){if(this.Os){var t=webix.$$(this.Os);t&&t.removeBind(this.s.id),
this.detachEvent(this.Ps),this.Os=null}},X:function(){var t=this.s;if(this.filter){var e=t.id;this.data.Y=webix.bind(function(){webix.$$(this.Os).Z[e]=!1},this)}var i=this.render;this.render=function(){if(!this.$){this.$=!0;var t=this.callEvent("onBindRequest");return this.$=!1,i.apply(this,t===!1?arguments:[]);
}},(this.getValue||this.getValues)&&(this.save=function(t){var e=webix.$$(this.Os);if(t)e.setBindData(t);else{if(this.validate&&!this.validate())return!1;var i=this.getValue?this.getValue:this.getValues();e.setBindData(i,this.s.id),this.setDirty&&this.setDirty(!1)}}),this.X=function(){}}},webix.BindSource={
$init:function(){this.bb={},this.Z={},this.cb={},this.db(this)},saveBatch:function(t){this.eb=!0,t.call(this),this.eb=!1,this.fb()},setBindData:function(t,e){if(e&&(this.cb[e]=!0),this.setValue)this.setValue(t);else if(this.setValues)this.setValues(t);else{var i=this.getCursor();i?this.updateItem(i,t):this.add(t);
}this.callEvent("onBindUpdate",[t,e]),this.save&&this.save(),e&&(this.cb[e]=!1)},getBindData:function(t,e){if(this.Z[t])return!1;var i=webix.$$(t);i.isVisible(i.s.id)&&(this.Z[t]=!0,this.gb(i,this.bb[t][0],this.bb[t][1]),e&&i.filter&&i.refresh())},addBind:function(t,e,i){this.bb[t]=[e,i]},removeBind:function(t){
delete this.bb[t],delete this.Z[t],delete this.cb[t]},db:function(t){t.filter?webix.extend(this,webix.CollectionBind):t.setValue?webix.extend(this,webix.ValueBind):webix.extend(this,webix.RecordBind)},fb:function(){if(!this.eb)for(var t in this.bb)this.cb[t]||(this.Z[t]=!1,this.getBindData(t,!0))},hb:function(t,e,i){
t.setValue?t.setValue(i&&e?i[e]:i):t.filter?t.data.silent(function(){this.filter(e,i)}):!i&&t.clear?t.clear():t.O(i)&&t.setValues(webix.clone(i)),t.callEvent("onBindApply",[i,e,this])}},webix.DataValue=webix.proto({name:"DataValue",isVisible:function(){return!0},$init:function(t){(!t||webix.isUndefined(t.value))&&(this.data=t||"");
var e=t&&t.id?t.id:webix.uid();this.s={id:e},webix.ui.views[e]=this},setValue:function(t){this.data=t,this.callEvent("onChange",[t])},getValue:function(){return this.data},refresh:function(){this.callEvent("onBindRequest")}},webix.EventSystem,webix.BaseBind),webix.DataRecord=webix.proto({name:"DataRecord",
isVisible:function(){return!0},$init:function(t){this.data=t||{};var e=t&&t.id?t.id:webix.uid();this.s={id:e},webix.ui.views[e]=this},getValues:function(){return this.data},setValues:function(t,e){this.data=e?webix.extend(this.data,t,!0):t,this.callEvent("onChange",[t])},refresh:function(){this.callEvent("onBindRequest");
}},webix.EventSystem,webix.BaseBind,webix.AtomDataLoader,webix.Settings),webix.ValueBind={$init:function(){this.attachEvent("onChange",this.fb)},gb:function(t,e,i){e=e||"value";var s=this.getValue()||"";if(i&&(s=i(s)),t.setValue)t.setValue(s);else if(t.filter)t.data.silent(function(){this.filter(e,s);
});else{var n={};n[e]=s,t.O(s)&&t.setValues(n)}t.callEvent("onBindApply",[s,e,this])}},webix.RecordBind={$init:function(){this.attachEvent("onChange",this.fb)},gb:function(t,e,i){var s=this.getValues()||null;i&&(s=i(s)),this.hb(t,e,s)}},webix.CollectionBind={$init:function(){this.ib=null,this.attachEvent("onSelectChange",function(t){
var e=this.getSelectedId();this.setCursor(e?e.id||e:null)}),this.attachEvent("onAfterCursorChange",this.fb),this.attachEvent("onAfterDelete",function(t){t==this.getCursor()&&this.setCursor(null)}),this.data.attachEvent("onStoreUpdated",webix.bind(function(t,e,i){t&&t==this.getCursor()&&"paint"!=i&&"delete"!=i&&this.fb();
},this)),this.data.attachEvent("onClearAll",webix.bind(function(){this.ib=null},this)),this.data.attachEvent("onIdChange",webix.bind(function(t,e){this.ib==t&&(this.ib=e,this.fb())},this))},refreshCursor:function(){this.ib&&this.callEvent("onAfterCursorChange",[this.ib])},setCursor:function(t){t==this.ib||null!==t&&!this.getItem(t)||(this.callEvent("onBeforeCursorChange",[this.ib]),
this.ib=t,this.callEvent("onAfterCursorChange",[t]))},getCursor:function(){return this.ib},gb:function(t,e,i){if("$level"==e&&this.data.getBranch)return(t.data||t).importData(this.data.getBranch(this.getCursor()));var s=this.getItem(this.getCursor())||this.s.defaultData||null;"$data"==e?("function"==typeof i?i.call(t,s,this):t.data.importData(s?s[i]:[]),
t.callEvent("onBindApply",[s,e,this])):(i&&(s=i(s)),this.hb(t,e,s))}},webix.AtomRender={jb:function(t){return t.$empty?"":this.s.template(t,this)},render:function(){var t=this.s;return this.isVisible(t.id)?((!this.callEvent||this.callEvent("onBeforeRender",[this.data]))&&(this.data&&!t.content&&(this.y.innerHTML="",
this.y.innerHTML=this.jb(this.data)),this.callEvent&&this.callEvent("onAfterRender",[])),!0):!1},sync:function(t){this.kb=!1,"DataStore"!=t.name&&(t.data&&"DataStore"==t.name?t=t.data:this.kb=!0),this.kb?t.bind("change",webix.bind(function(t){t.id==this.data.id&&(this.data=t.attributes,this.refresh());
},this)):t.attachEvent("onStoreUpdated",webix.bind(function(e){e&&e!=this.data.id||(this.data=t.pull[e],this.refresh())},this))},template_setter:webix.template},webix.SingleRender=webix.proto({template_setter:function(t){this.type.template=webix.template(t)},jb:function(t){var e=this.type;return(e.templateStart?e.templateStart(t,e):"")+e.template(t,e)+(e.templateEnd?e.templateEnd(t,e):"");
},customize:function(t){webix.type(this,t)}},webix.AtomRender),webix.UIManager={A:null,lb:{},mb:0,nb:{enter:13,tab:9,esc:27,escape:27,up:38,down:40,left:37,right:39,pgdown:34,pagedown:34,pgup:33,pageup:33,end:35,home:36,insert:45,"delete":46,backspace:8,space:32,meta:91,win:91,mac:91,multiply:106,add:107,
subtract:109,decimal:110,divide:111,scrollock:145,pausebreak:19,numlock:144,"5numlocked":12,shift:16,capslock:20},wD:{input:1,button:1,textarea:1,select:1},ob:function(){webix.event(document.body,"click",webix.bind(this.pb,this)),webix.event(document,"keydown",webix.bind(this.qb,this)),document.body.addEventListener&&webix.event(document.body,"focus",this.rb,{
capture:!0,bind:this}),webix.destructors.push({obj:this})},destructor:function(){webix.UIManager.A=null},getFocus:function(){return this.A},sb:function(t){this.tb=this.tb||t.s.id},setFocus:function(t,e){return t=webix.$$(t),t&&!t.$view&&(t=null),this.mb=webix.mb=new Date,this.A===t?!0:(this.A&&this.A.callEvent&&this.A.callEvent("onBlur",[this.A]),
t&&t.callEvent&&t.callEvent("onFocus",[t,this.A]),webix.callEvent("onFocusChange",[t,this.A]),this.A&&this.A.blur&&!e&&this.A.blur(),this.A=t,t&&t.focus&&!e&&t.focus(),!0)},applyChanges:function(t){var e=this.getFocus();e&&e!=t&&e.Xy&&e.Xy(t)},hasFocus:function(t){return t===this.A?!0:!1},ub:function(t,e){
var i=webix.html.locate(t,"view_id")||this.tb;return i=webix.$$(i),this.tb=null,webix.mb=new Date,i!=this.A?(e||(this.tb=null),i?(i=webix.$$(i),this.canFocus(i)&&(i.getNode&&i.getNode(t),this.setFocus(i))):e||this.setFocus(null),!0):void 0},pb:function(t){return new Date-this.mb<100?(this.tb=null,!1):this.ub(t);
},rb:function(t){return this.wD[t.target.nodeName.toLowerCase()]?this.ub(t,!0):!1},canFocus:function(t){return t.isVisible()&&t.isEnabled()},vb:function(t){var e=this.getFocus();return t&&!this.wb(t,e)?!1:void(this.xb("getPrev",t)||(this.A=null))},Xz:{},wb:function(t,e){if(!t)return!1;if(!e)return!1;for(;e;){
if(e===t)return!0;e=e.getParentView()}return!1},yb:function(){this&&this.callEvent&&this.callEvent("onTimedKeyPress",[])},BA:function(t){return 112>t&&t>105},qb:function(t){var e=t.which||t.keyCode;e>95&&106>e&&(e-=48),e=this.Xz[e]||e;var i=t.ctrlKey,s=t.shiftKey,n=t.altKey,r=t.metaKey,a=this.zb(e,i,s,n,r),o=this.getFocus();
o&&o.callEvent&&(o.callEvent("onKeyPress",[e,t])===!1&&webix.html.preventEvent(t),o.hasEvent("onTimedKeyPress")&&(clearTimeout(o.Ab),o.Ab=webix.delay(this.yb,o,[],o.s.keyPressTimeout||250))),this.BA(e)||(a=this.zb(String.fromCharCode(e),i,s,n,r));var h=!i&&!n&&!r&&9!=e&&27!=e&&13!=e;return this.Bb(a,h,t)===!1?(webix.html.preventEvent(t),
!1):void 0},xb:function(t){if(!this.getFocus())return null;t=t||"getNext";for(var e=this.getFocus(),i=e,s=webix.uid();;){if(e=this[t](e),e&&this.canFocus(e))return this.setFocus(e);if(e===i||e.$fmarker==s)return null;e.$fmarker=s}},WE:function(t,e){var i=!e.shiftKey;if(webix.UIManager.XE=new Date,t&&t.Gb&&!t.Gb(i,e))return!1;
if(t&&t.Eb){if(t.editNext)return t.editNext(i);if(t.editStop)return t.editStop(),!0}else webix.delay(function(){webix.UIManager.setFocus(webix.$$(document.activeElement),!0)},1)},getTop:function(t){for(var e,i=webix.$$(t);i&&(e=i.getParentView());)i=e;return i},getNext:function(t,e){var i=t.getChildViews();
if(i.length&&!e)return i[0];var s=t.getParentView();if(!s)return t;var n=s.getChildViews();if(n.length)for(var r=webix.PowerArray.find.call(n,t)+1;r=0;){if(this.canFocus(n[r]))return this.getPrev(n[r],!0);r--}return s},addHotKey:function(t,e,i){var s=this.Cb(t);i||(i=null),s.handler=e,s.view=i;var n=this.zb(s.letter,s.ctrl,s.shift,s.alt,s.meta);
return this.lb[n]||(this.lb[n]=[]),this.lb[n].push(s),t},removeHotKey:function(t,e,i){var s=this.Cb(t),n=this.zb(s.letter,s.ctrl,s.shift,s.alt,s.meta);if(e||i){var r=this.lb[n];if(r){for(var a=r.length-1;a>=0;a--)i&&r[a].view!==i||e&&r[a].handler!==e||r.splice(a,1);r.length||delete this.lb[n]}}else delete this.lb[n];
},zb:function(t,e,i,s,n){return t+"_"+["",e?"1":"0",i?"1":"0",s?"1":"0",n?"1":"0"].join("")},Bb:function(t,e,i){var s=this.getFocus();return this.lb[t]?this.Db(this.lb[t],s,i):e&&this.lb.ANY_0000?this.Db(this.lb.ANY_0000,s,i):!0},Db:function(t,e,i){for(var s=0;s=0;e--)delete webix.ui.views[t[e].config.id],t[e].config.id="x"+webix.uid(),webix.ui.views[t[e].config.id]=t[e],
n(t[e].getChildViews())}}webix.ui.animate=function(t,e,i){var s=webix.$$(e);if(s){var n=i||{type:"slide",direction:"left"},r=s.x.cloneNode(!0),a=webix.ui(t,e);a.x.parentNode.appendChild(r);var o=webix.animate.formLine(a.x,r,n);return n.callback=function(){webix.animate.breakLine(o)},webix.animate(o,n),
a}},webix.ui.animateView=function(t,e,i){if(t=webix.$$(t)){i=i||{type:"slide",direction:"left"};for(var s=function(t){var e=t.x,i=e.className,s=e.innerHTML;return""+s+"
"},n=[],r=0;r=0;e--)t[e].obj&&t[e].obj.adjust()},webix.ui.each=function(t,e,i,s){if(t)for(var n=s?[t]:t.getChildViews(),r=0;rt&&(t=i[0]),i[2]>e&&(e=i[2]),(!s||this.s.width)&&t>i[1]&&(t=i[1]),(!s||this.s.height)&&e>i[3]&&(e=i[3]),
this.$setSize(t,e),webix.ED&&(webix.ED=!1,this.adjust())},resize:function(t){if(!(webix.gc||webix.ui.$freeze||webix.ot)){var e=this.getParentView();e?e.resizeChildren?e.resizeChildren():e.resize():(this.adjust(),webix.callEvent("onResize",[]))}}},webix.Settings,webix.Destruction,webix.BaseBind,webix.UIExtension),
webix.protoUI({name:"view",$init:function(t){this.hc(t)},hc:function(t){var e=webix.isUndefined(t.borderless);e&&!this.setPosition&&t.$topView&&(t.borderless=!0,e=!1),e&&this.defaults.borderless||t.borderless?t.Ob={top:!0,left:!0,bottom:!0,right:!0}:(t.Ob||(t.Ob={}),this.w.style.borderWidth="1px")},$getSize:function(t,e){
var i=this.s.Ob;i&&(t+=(i.left?0:1)+(i.right?0:1),e+=(i.top?0:1)+(i.bottom?0:1));var s=webix.ui.baseview.prototype.$getSize.call(this,t,e);return s},$setSize:function(t,e){var i=this.s.Ob;return i&&(t-=(i.left?0:1)+(i.right?0:1),e-=(i.top?0:1)+(i.bottom?0:1)),webix.ui.baseview.prototype.$setSize.call(this,t,e);
}},webix.ui.baseview)}(),webix.ui.view.call(webix),webix.protoUI({name:"spacer",defaults:{borderless:!0},$init:function(){this.x.className+=" webix_spacer"}},webix.ui.view),webix.protoUI({name:"baselayout",$init:function(t){this.$ready.push(this.kc),this.y=this.w,this.lc=[],this.ht=[],t.$topView&&(t.borderless=!0,
t.Ob={top:!0,left:!0,bottom:!0,right:!0}),t.isolate&&webix.extend(this,webix.IdSpace)},rows_setter:function(t){this.mc=1,this.nc=t},cols_setter:function(t){this.mc=0,this.$view.style.whiteSpace="nowrap",this.nc=t},Rb:function(t){webix.PowerArray.removeAt.call(this.q,webix.PowerArray.find.call(this.q,t)),
this.resizeChildren(!0)},Qb:function(t,e){if(webix.isUndefined(e)){for(var i=0;ie||e>this.q.length)&&(e=this.q.length);var n=(this.q[e]||{}).x;webix.PowerArray.insertAt.call(this.q,t,e),t.s.hidden||webix.html.insertBefore(t.x,n,this.y);
}else{s=webix.$$(e),e=webix.PowerArray.find.call(this.q,s);var r=s.x.parentNode;r&&!t.s.hidden&&r.insertBefore(t.x,s.x),s.destructor(),this.q[e]=t}this.mc||this.oc(t),this.q[e].Xb=this}this.resizeChildren(!0);var a=this.elements?this:this.getFormView();a&&a.Qs(),webix.callEvent("onReconstruct",[this]);
},oc:function(t){t.x.style.display="inline-block",t.x.style.verticalAlign="top"},addView:function(t,e){webix.isUndefined(e)&&(e=this.q.length);var i=this.$$?this:this.getTopParentView();return i=i&&i.ui?i:webix,i.ui(t,this,e).s.id},removeView:function(t){var e;e="object"!=typeof t?webix.$$(t)||(this.$$?this.$$(t):null):t;
var i=webix.PowerArray.find.call(this.q,e);if(i>=0){this.Vx&&this.Vx(i,e);var s=this.elements?this:this.getFormView();this.q.splice(i,1),s&&webix.ui.each(e,function(t){t.name&&delete s.getCleanValues()[t.config.name]},s,!0),e.destructor(),this.resizeChildren(!0),s&&s.Qs()}webix.callEvent("onReconstruct",[this]);
},reconstruct:function(){this.qc=0,this.Qb(this.nc)},Fb:function(t,e,i){t.s.hidden||(t.s.hidden=!0,webix.html.remove(t.x),this.qc++,i||webix.Nb||this.resizeChildren(!0))},Lw:function(t){t.callEvent&&t.callEvent("onViewShow",[])},resizeChildren:function(){if(!webix.ui.$freeze&&this.lc){var t=this.getParentView();
if(t)return t.resizeChildren?t.resizeChildren():t.resize();var e,i,s,n,r=this.$getSize(0,0);s=e=this.lc[0]||0,n=i=this.lc[1]||0,(r[1]>=1e5||r[3]>=1e5)&&this.x.parentNode&&(s=e=Math.max(r[0],this.s.width||this.x.parentNode.offsetWidth||e||0),n=i=Math.max(r[2],this.s.height||this.x.parentNode.offsetHeight||i||0)),
t?this.rc(e,i):(r[0]>e&&(s=r[0]),r[2]>i&&(n=r[2]),e>r[1]&&(s=r[1]),i>r[3]&&(n=r[3]),this.$setSize(s,n)),webix.ED&&(webix.ED=!1,this.resizeChildren()),webix.callEvent("onResize",[])}},getChildViews:function(){return this.q},index:function(t){t.s&&(t=t.s.id);for(var e=0;ei&&(i=c[0]),c[1]r&&(r=c[2]),c[3]n&&(n=r),i>s&&(s=i),this.vc=[a,this.q.length-o,h],this.ng=[i+t,r+e];var u=webix.ui.baseview.prototype.$getSize.call(this,0,0);return u[1]>=1e5&&(u[1]=0),u[3]>=1e5&&(u[3]=0),u[0]=(u[0]||i)+t,u[1]=Math.max(u[0],(u[1]||s)+t),u[2]=(u[2]||r)+e,u[3]=Math.max(u[2],(u[3]||n)+e),
!this.mc&&this.s.responsive&&(u[0]=0),u},$setSize:function(t,e){this.lc=[t,e],webix.ui.baseview.prototype.$setSize.call(this,t,e),this.rc(t,e)},wc:function(t,e,i){e=t[e],i=t[i];var s=e;if(e!=i){var n=this.xc*t[4]/this.yc;if(e>n)s=e,this.yc-=t[4],this.xc-=s;else{if(!(n>i))return-1;s=i,this.yc-=t[4],this.xc-=s;
}}return s},it:function(t,e){var i=webix.$$(e);"hide"!==i&&i?(i||(i=webix.ui({view:"popup",body:[{}]})),t.jt=t.s.width,t.kt=t.s.height,t.lt=i.s.id,t.s.width=0,t.s.height||(t.s.autoheight=!0),webix.ui(t,i,this.ht.length)):(t.hide(),t.lt="hide"),this.ht.push(t)},mt:function(t){var e=t.lt;if(t.lt=0,"hide"!==e&&e){
t.s.width=t.jt,t.s.height=t.kt,delete t.s.autoheight;for(var i=0;this.q[i]&&this.q[i].s.responsiveCell===!1;)i++;webix.ui(t,this,i)}else t.show();this.ht.pop()},nt:function(t,e){if(webix.ot=!0,t+2*this.Dc+this.Cc*(this.q.length-1)s;s++){var n=this.q[s];if(!n.lt){
if(n.s.responsiveCell!==!1){this.it(n,this.s.responsive),webix.callEvent("onResponsiveHide",[n.s.id]),webix.ED=!0;break}i=this.q.length}}else if(this.ht.length){var n=this.ht[this.ht.length-1],r="hide"==n.lt?0:n.jt,a=n.$getSize(r,0);a[0]+this.ng[0]+this.Cc+20<=t&&(this.mt(n),webix.callEvent("onResponsiveShow",[n.s.id]),
webix.ED=!0)}webix.ot=!1},rc:function(t,e){webix.gc=(webix.gc||0)+1,!this.mc&&this.s.responsive&&this.nt(t,e),this.xc=(this.mc?e:t)-this.vc[0],this.yc=this.vc[2];for(var i=t,s=e,n=[],r=0;rs){
n.push(r);continue}}else{var i=this.wc(a,0,1);if(0>i){n.push(r);continue}}this.q[r].$setSize(i,s)}for(var r=0;r0&&!this.Xx},Hc:function(t){if(!this.Wx()||this.s.borderless&&"space"!=this.s.type){for(var e=0;ee;e++)t[e].Ob.top=t[e].Ob.bottom=i;if(s>1){for("head"!=this.s.type&&(t[0].Ob.bottom=i);t[s-1].hidden&&s>1;)s--;s>0&&(t[s-1].Ob.top=i)}}else{for(var e=1;s-1>e;e++)t[e].Ob.left=t[e].Ob.right=i;if(s>1){for("head"!=this.s.type&&(t[0].Ob.right=i),t[s-1].Ob.left=i;s>1&&t[s-1].hidden;)s--;
s>0&&(t[s-1].Ob.left=i)}}}else for(var e=0;e