/* @license Copyright (C) Exontrol. All rights reserved. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,e(t.exontrol||{}))}(this,function(t){"use strict";function e(){}function o(t){return null!=t}function i(t){return null==t}function n(t){return t instanceof Array}function r(t){return t instanceof d.Arr}function s(t){return t instanceof d.Gantt}function h(t){return t instanceof d.Gantt.GV}function a(t){return t instanceof d.Gantt.ItemBar}function u(t){return t instanceof d.Tree.Item}function c(t){return n(t)?t:function(t){return"string"==typeof t}(t)?t.split(","):[t]}function l(t,e,o){return i(t)?~~o:d.s2F(t,e)}function p(t,e){return new Date(t.s.getTime()+(t.e.getTime()-t.s.getTime())*(e-f(t).x)/f(t).w)}function f(t){return t.o||t}function g(t,e){var o;return t&&(e<0&&(e=t.len()+e),o=t.at(e)),o||null}var y,v,d=d||window.exontrol,S=d.G,m="SF,FS,FF,SS".split(","),C=":",L="W",T=",",w=d.ToN,G=d.ToI,O=d.IsI,b=d.ToS,U=d.IsO,B=d.EyR,V=Math.round,E=Math.max,I=Math.min,x={type:0,color:"black",startPos:"MR",endPos:"TL,ML,BL"};y=function(){function t(t){t.startsWith("=")?this.oEx=d.E.Create(t.substr(1),"value,start,end,wcount"):this.cbkD=Date.prototype.toQ(t)}function e(t){this.c=t}var i=new Map,n=new Map;return t.prototype.eval=function(t){return this.oEx?this.oEx.Evaluate(function(e,o){switch(e){case-1:return t.d;case-2:return t.r.s;case-3:return t.r.e}}):this.cbkD&&this.cbkD.call(t.d)},e.prototype.eval=function(e,o){var i=d.H.SetEObj(function(o){var i=n.get(o);return!i&&n.set(o,i=new t(o)),i.eval(e)},this),r=o.call(this);return d.H.SetEObj(i),r},e.prototype.size=function(t,e,o,i){return this.eval(t,function(){return e.sizeHTMLText(this.c,o,i)})},e.prototype.draw=function(t,e,o,i,n){return this.eval(t,function(){return e.drawHTMLText(this.c,o,i,n)})},e.prototype.text=function(t){return this.eval(t,function(){return d.H.TextNoHTML(this.c)})},e.prototype.html=function(t){return this.eval(t,function(){return this.c})},{Get:function(t){var n;return o(t)&&!(n=i.get(t))&&i.set(t,n=new e(t)),n||null},XC:function(){n.clear(),i.clear()}}}(),v=function(){function t(t){(t=b(t)).startsWith("=")&&(t=t.substr(1)),this.oEx=d.E.Create(t,void 0,void 0,"C")}function e(t){this.c=t}var i=new Map,n=new Map,r=new e;return t.prototype.eval=function(t){return this.oEx.Evaluate(function(e,o){return t.toFormat(e,o)})},e.prototype.evalBar=function(e,o){var i=d.H.SetEObj(function(o){var i=n.get(o);return!i&&n.set(o,i=new t(o)),i.eval(e)},this),r=o.call(this);return d.H.SetEObj(i),r},e.prototype.size=function(t,e,o,i){return this.evalBar(t,function(){return e.sizeHTMLText(this.c,o,i)})},e.prototype.draw=function(t,e,o,i,n){return this.evalBar(t,function(){return e.drawHTMLText(this.c,o,i,n)})},e.prototype.text=function(t){return this.evalBar(t,function(){return d.H.TextNoHTML(this.c)})},e.prototype.html=function(t){return this.evalBar(t,function(){return this.c})},{Get:function(t){var n;return o(t)&&!(n=i.get(t))&&i.set(t,n=new e(t)),n||null},Set:function(t){return r.c=t,r},XC:function(){n.clear(),i.clear()}}}(),d.Mrg(d.Tree.ColumnOptions,{valueToItemBarProperty:null,valueToItemBarKey:null}),d.Mrg(d.Tree.Column.prototype,{GetValueToItemBarProperty:function(){return this.oO.valueToItemBarProperty},SetValueToItemBarProperty:function(t){this.bU(),this.oV2B=void 0,this.oO.valueToItemBarProperty=t,this.eU()},GetValueToItemBarKey:function(){return this.oO.valueToItemBarKey},SetValueToItemBarKey:function(t){this.bU(),this.oV2B=void 0,this.oO.valueToItemBarKey=t,this.eU()},v2B:function(){return void 0===this.oV2B&&(this.oV2B=d.Gantt.v2B(this.GetValueToItemBarProperty(),this.GetValueToItemBarKey())),this.oV2B}}),d.expO({valueToItemBarProperty:null,valueToItemBarKey:null},d.Tree.Column.prototype),d.Tree.Columns.prototype.onX=function(t){return function(){return this.oT.oGIB&&this.oT.oGIB.onX(),t.apply(this,arguments)}}(d.Tree.Columns.prototype.onX),d.Mrg(d.Tree.Cell.prototype,{ValueToItemBar:function(t,e){this.bU(),this.oV2B=d.Gantt.v2B(t,e),this.eU()},v2B:function(){return this.oV2B||this.oC.v2B()}}),d.Tree.Cell.prototype.GetValue=function(t){return function(){var e=this.v2B(),o=e&&e.g&&this.oI.ItemBar(e.k);return o?o[e.g].call(o):t.call(this)}}(d.Tree.Cell.prototype.GetValue),d.Tree.Cell.prototype.SetValue=function(t){return function(e){var o=this.v2B(),i=o&&o.s&&this.oI.ItemBar(o.k);i?i[o.s].call(i,e):t.call(this,e)}}(d.Tree.Cell.prototype.SetValue),d.expO({value:null},d.Tree.Cell.prototype,null,!0),d.Mrg(d.Tree.Item.prototype,function(){function t(){return this.oIB||(this.oIB=new d.Gantt.ItemBars(this))}return{AddBar:function(){var e=t.call(this);return e.Add.apply(e,arguments)},RemoveBar:function(t){var e=this.ItemBar(t);e&&e.Remove()},ClearBars:function(){this.oIB&&this.oIB.len()&&this.oIB.Clear()},ItemBar:function(t){return this.oIB&&this.oIB.Item(t)},GetBars:function(){return t.call(this)},SetBars:function(t){t!=this.oIB&&(this.bU(),this.ClearBars(),t instanceof d.Gantt.ItemBars&&t.len()&&t.forEach(function(t){this.AddBar(t.GetOptions())},this),this.eU())},GetNonworkingUnits:function(){return this.oO.nonworkingUnits},SetNonworkingUnits:function(t){this.bU(),this.oO.nonworkingUnits=t,this.eU(!0)},getNonworkingUnits:function(){return b(this.GetNonworkingUnits())}}}()),d.expO({Bars:null,nonworkingUnits:null},d.Tree.Item.prototype),d.Tree.Item.prototype.SetLock=function(t){return function(){var e=this.t().oGC;return e&&e.rgSel&&this.oIB&&this.oIB.forEach(function(t){e.removeSel(t)}),t.apply(this,arguments)}}(d.Tree.Item.prototype.SetLock),d.expO({lock:null},d.Tree.Item.prototype,null,!0),d.Mrg(d.Tree.Items.prototype,{GetDefSchedulePDM:function(){return this.oT.oGC.oGL.dSP},SetDefSchedulePDM:function(t){if(U(t))for(var e in t)this.oT.oGC.oGL.dSP[e]=t[e]},SchedulePDM:function(t,e){var o,n;return i(e)&&(e=0),i(t)?o=this.forEachU(function(t){return t.ItemBar(e)}):a(t)?o=t:(t=this.Item(t))&&(o=t.ItemBar(e)),this.bU(),this.oT.resTLB(),n=d.Gantt.S.Do(o),this.eU(),n},GroupBars:function(t,e,o,i,n,r){this.oT.oGIB.Group.apply(this.oT.oGIB,arguments)},UngroupBars:function(t,e){this.oT.oGIB.Ungroup.apply(this.oT.oGIB,arguments)}}),d.Tree.Items.prototype.rurIH=function(t){return function(){return this.lIH||(this.lIH=function(){var e=t.apply(this,arguments)||[null,null];return e[0]=E(w(e[0]),this.oT.getDefaultItemHeight()),e}.apply(this,arguments))}}(d.Tree.Items.prototype.rurIH),d.expO({DefSchedulePDM:null},d.Tree.Items.prototype),d.Mrg(d.Tree.TV.prototype,{GetDebug:function(){return this.oO.debug},SetDebug:function(t){this.cwbU(),this.oO.debug=t,this.cweU()},getDebug:function(){return this.opt("debug",!1)},SetChart:function(t){var e,o,i,n,r,s=this.oT.oGC,h=0!=this.oT.lnt;s.bU(),s.oLvs.onRL(function(){h&&(t&&(e=t.labels,o=t.toolTips,i=t.bars,n=t.paneWidthLeft,r=t.paneWidthRight),t=d.Mrg(d.Mrg(d.Cpy(this.defOpt().chart),d.Tree.Options.chart),t),s.SetLabels(e||t.labels),t.labels=void 0,s.SetToolTips(o||t.toolTips),t.toolTips=void 0,s.SetBars(i||t.bars),t.bars=void 0,t.paneWidthLeft=n,t.paneWidthRight=r),s.SetOptions(t,h)},this),s.eU()}}),d.Tree.TV.prototype.init=function(t){return function(){t.apply(this,arguments)}}(d.Tree.TV.prototype.init),d.Tree.TV.prototype.apyOpt=function(t){return function(e,o){if(t.call(this,e,o),e.length>1){var i=e.indexOf("chart");~i&&(e.splice(i,1),e.splice(0,0,"chart"))}var n,r;o&&~e.indexOf("data")&&~e.indexOf("defaultItemHeight")&&(n=this.oT,r=n.onLoad,n.onLoad=function(){r.call(this),this.SetDefaultItemHeight(o.defaultItemHeight),this.onLoad=r})}}(d.Tree.TV.prototype.apyOpt),d.Tree.TV.prototype.defShp=function(t){return function(){return t.apply(this,arguments)+',No(nw),FrameSel(select-chart,select-bar,select-date,select-overview),{"normal":{"client":"[x-4,y-4,width+8,height+8]"}}(select-bar),{"normal":{"client":"[,y-4,,height+8]"}}(select-date),{"normal":{"primitive":"Rect"}}(select-overview),black(date-ticker)'}}(d.Tree.TV.prototype.defShp),d.Tree.TV.prototype.defCrs=function(t){return function(){return t.apply(this,arguments)+",copy(create-bar,create-link),pointer(itemBar),col-resize(itemBar-percent-resize)"}}(d.Tree.TV.prototype.defCrs),d.Tree.TV.prototype.rAO=function(t){return function(){t.apply(this,arguments),s(this.oT)&&this.oT.feGV(function(e){t.call(e)})}}(d.Tree.TV.prototype.rAO),d.Tree.TV.prototype.rurAO=function(t){return function(e){return t.apply(this,arguments)}}(d.Tree.TV.prototype.rurAO),d.Tree.TV.prototype.rurI=function(t){return function(e){return s(this.oT)&&this.oT.feGVU(function(t){return t.e2I(e)})||t.apply(this,arguments)}}(d.Tree.TV.prototype.rurI),d.Tree.TV.prototype.rurItemDragS=function(t){return function(e){t.apply(this,arguments),s(this.oT)&&!e.rgGVEF&&(e.rgGVEF=[],this.oT.feGV(function(t){var o=d.EF.Create({relative:t.GetCanvas(),onpaint:function(t,o){if(this.oGV){e.oTV.drawDI(t,o,e.oDI,this.oGV.drawI,this.oGV,void 0)}}});o.oGV=t,e.rgGVEF.push(o)},this),e.SetClient=function(t){return function(o){t.apply(this,arguments);var i=this.oTV.GetClientRect();e.rgGVEF&&e.rgGVEF.forEach(function(t){var e=o.slice(),n=t.oGV.GetClientRect();d.ORt(e,-i[0]+n[0],-i[1]+n[1]),e[2]=n[2],t.SetClient(e)},this)}}(e.SetClient))}}(d.Tree.TV.prototype.rurItemDragS),d.Tree.TV.prototype.rurItemDragE=function(t){return function(e){e&&e.rgGVEF&&(e.rgGVEF.forEach(function(t){d.EF.Destroy(t)}),e.rgGVEF=null),t.apply(this,arguments)}}(d.Tree.TV.prototype.rurItemDragE),d.Tree.TV.prototype.rurItemDragD=function(t){return function(e){t.apply(this,arguments),s(this.oT)&&this.oT.feGV("resVI")}}(d.Tree.TV.prototype.rurItemDragD),d.Tree.TV.prototype.rurDragDrop=function(t){return function(e,o){var i=this,n=this.e2V(e),r=!o.rurFlags;h(n)&&(r||o.rurFlags.has("bar"))&&function(){var t=this.p2IB(this.gPtr(e));t&&this.oT.oGC.isSable(t)&&d.RUR.D3(e,{inflateClient:0,object:t,shape:t.getShape(),client:this.ib2R(t,4),source:this,onpaint:function(t,e){i.ctxScale(t,e,function(e){t.drawShape(e,this.shape)},this)},onclick:function(t){o.rurStatus&&(i.oT.oRUR=i.e2RUR(t),o.rurStatus&&o.rurStatus.call(i,t),i.oT.oRUR=null)},onmove:function(t){t.drag.setCursor(d.GP.Get(o.rurName,this.getCursors()))}})}.call(n),(r||o.rurFlags.has("item"))&&t.apply(this,arguments)}}(d.Tree.TV.prototype.rurDragDrop),d.Tree.TV.prototype.Smooth=function(t){return function(e,o,i){function n(){var t=new Map;return h.feGV(function(e){t.set(e,function(t){var e=t.getCur();return e.iuS=function(t){return d.bin(u.length,function(e){return t>=u[e].u})}(e.uS),e.rgVI=t.getVI(),e.rgVB=t.getVB(),e}(e))}),t}if(this.getSmooth()&&e&&s(this.oT)){o=o||this,i=i||{};var r,h=this.oT,u=h.oGC.visLb(),c=e,l=i.cbkR,p=i.cbkI,f=i.cbkT,g=n();e=function(){c.call(o),r=n()},i.cbkI=function(t){p&&p.call(o,t),g.forEach(function(e,o){var i=e.rgVI.anyOf(o.getVI());t.mV2FT.set(o,{items:{from:e.rgVI,to:o.getVI(),stkFT:e.rgVI.smooth(o.getVI(),i?t.cbkHI:null)},bars:{from:e.rgVB,to:o.getVB(),stkFT:!void(e.rgVI.sup=e.rgVI.sdn=null)&&e.rgVB.smooth(o.getVB(),i?function(o,i,n){if(a(i)){var r=i.i(),s=(this.mSI=this.mSI||new Map).get(r);s?o=s.slice():this.mSI.set(r,o=t.cbkHI.call(e.rgVI,o,r,n));var h=this.get(i)||this.rgTo.get(i);h&&(o[0]=h[0],o[2]=h[2])}return o}:null)}})})},i.cbkT=function(t){f&&f.call(o,t),h.feGV("resVI"),h.oGC.getOverlaidOnMoving()&&h.onRL()},i.cbkR=function(t){function e(e,o){return e+(o-e)*t.progress}l&&l.call(o,t),h.feGV(function(t){t.resVL();var o=g.get(t),i=r&&r.get(t);o&&i&&t.setCur({ofV:{d:new Date(e(o.ofV.d.getTime(),i.ofV.d.getTime())),o:e(o.ofV.o,i.ofV.o)},uS:u[~~e(o.iuS,i.iuS)].u,uW:e(o.uW,i.uW)})})}}return t.call(this,e,o,i)}}(d.Tree.TV.prototype.Smooth),d.Tree.TV.prototype.allowRur=function(t){return function(e,o){function i(t){return d.Tree.allowRurPart(this.oT.w2P(o.rurOnlyW),t||"chart,level",o.rurFlags)}var n=t.apply(this,arguments);switch(o.rurName){case"scroll":n=n||i.call(this,"chart,level,view,header");break;case"select":case"item-drag":n=i.call(this,"view,chart");break;case"chart-resize":n=i.call(this);break;case"chart-zoom":case"chart-fit":n=i.call(this,"chart,level,overview")}return n}}(d.Tree.TV.prototype.allowRur),d.Tree.TV.prototype.SetTfi=function(t){return function(){this.cwbU(),t.apply(this,arguments),s(this.oT)&&this.oT.oGC.onRL(1),this.cweU()}}(d.Tree.TV.prototype.SetTfi),d.Tree.TV.prototype.ctxScale=function(t){return function(){var e=arguments;s(this.oT)?this.oT.oGC.locale(function(){t.apply(this,e)},this):t.apply(this,e)}}(d.Tree.TV.prototype.ctxScale),d.Mrg(d,function(){function t(t,e){d.host.call(this,arguments)}Object.addPrototypeOf(t.prototype,d.Tree.prototype),t.version="5.5",t.type="Gantt",t.GroupBarsOptionsEnum={exGroupBarsNone:-1,exGroupBarsOptionNone:0,exPreserveBarLength:3,exPreserveBarLengthA:1,exPreserveBarLengthB:2,exIgnoreOriginalInterval:4,exLimitInterval:24,exLimitIntervalMin:8,exLimitIntervalMax:16,exFlexibleInterval:32},t.PutResEnum={exPutResLoad:1,exPutResSave:2},t.ItemBarPropertyEnum={exBarName:0,exBarStart:1,exBarEnd:2,exBarCaption:3,exBarHAlignCaption:4,exBarVAlignCaption:5,exBarToolTip:6,exBarKey:9,exBarCanResize:10,exBarCanMove:11,exBarPercent:12,exBarPercentCaptionFormat:13,exBarShowPercentCaption:14,exBarAlignPercentCaption:15,exBarCanResizePercent:16,exBarOffset:18,exBarEffort:21,exBarCanMoveToAnother:28,exBarSelectable:29,exBarColor:33,exBarOverviewColor:41,exBarExtraCaption:44,exBarExtraCaptionHAlign:45,exBarExtraCaptionVAlign:46,exBarResources:49,exBarResourceFormat:50,exBarOverlaidKey:52,exBarShowCaption:56,exBarShowExtraCaption:57,exBarHistLegend:60,exBarResourcesFormat:266,exBarCriticalPath:269,exBarPredecessor:270,exBarSuccessor:271,exBarParent:512,exBarDuration:513},t.OverviewVisibleEnum={exOverviewHidden:0,exOverviewShowOnlyVisible:1,exOverviewShowAllVisible:2,exOverviewAllowVerticalScroll:256,exOverviewHideBars:512,exOverviewShowDateTimeScale:4096,exOverviewShowDateTimeScaleSplit:5120,exOverviewShowDateTimeScaleBottom:6144,exOverviewShowMargins:8192,exOverviewShowSelMargins:16384,exOverviewSplitter:65536},t.LevelLineEnum={exLevelNoLine:0,exLevelDefaultLine:-1,exLevelDotLine:1,exLevelSolidLine:2,exLevelLowerHalf:16,exLevelUpperHalf:32,exLevelMiddleLine:64,exLevelQuarterHeight:256},t.HistogramTypeEnum={exHistOverload:0,exHistOverAllocation:1,exHistCumulative:256,exHistOverAllocationFixed:512,exHistOverAllocationMultiply:1024},t.HistogramViewEnum={exHistogramVisibleItems:1,exHistogramSelectedItems:2,exHistogramCheckedItems:4,exHistogramSelectedBars:8,exHistogramUnlockedItems:16,exHistogramLockedTopItems:32,exHistogramLockedBottomItems:64,exHistogramAllItems:112,exHistogramFilteredItems:128,exHistogramLeafItems:256,exHistogramRecLeafItems:512,exHistogramNoGrouping:1024,exHistogramBackground:2048,exHistogramNoGroupCaption:4096,exHistogramGroupCumulative:8192},t.HistogramCumulativeOriginalColorBarsEnum={exShowCumulativeColor:-1,exChangeColor:0,exKeepOriginalColor:1},t.OverlaidBarsTypeEnum={exOverlaidBarsNone:0,exOverlaidBarsOffset:1,exOverlaidBarsIntersect:2,exOverlaidBarsStack:3,exOverlaidBarsCascade:4,exOverlaidBarsTransparent:256,exOverlaidBarsStackAutoArrange:512,exOverlaidBarsIncludeCaption:4096,exOverlaidBarsStrict:8192};return t.BackgroundOptions=d.Inh({psLinkEditSel:null,psBarShapeEditSel:null},d.Tree.BackgroundOptions),t.prototype.init=function(e){return function(o,i){this.lnt=this.lnt||0,this.lnt++,this.rgGV=[],this.oGC=new t.Chart(this),this.oOV=new t.OV(this),this.oGIB=new t.GB(this),this.dFD={oF:new d.PF("M/d/yh:m:st","year(y),month(M),day(d),hour(h),minute(m),second(s),ampm(t)"),am:"AM",pm:"PM"},this.oFD=this.dFD,e.call(this,o,d.Mrg({chart:null},i)),--this.lnt}}(t.prototype.init),t.prototype.p2I=function(t){return function(e){return t.apply(this,arguments)||this.feGVU(function(t){return t.oW&&t.p2I(e)})}}(t.prototype.p2I),t.prototype.iLts=function(t){return function(){t.apply(this,arguments),this.oLts.Add("ondatechange"),this.oLts.Add("onchartselchange"),this.oLts.Add("ondateselchange"),this.oLts.Add("oncreatebar"),this.oLts.Add("onbarresizing"),this.oLts.Add("onbarresize"),this.oLts.Add("onbarparentchange"),this.oLts.Add("onallowlink"),this.oLts.Add("oncreatelink")}}(t.prototype.iLts),t.prototype.initCW=function(t){return function(){var e=t.apply(this,arguments);return this.oCW.SetClientRect=function(t){function e(){return(this.oTV.oO||{}).chart}return function(){var n=this.oT,r=n.opnt&&n.opnt.b&&function(){var t=e.call(this);if(t&&o(t.paneWidthLeft)&&i(t.paneWidthRight))return this.oGC.GetPaneWidthLeft()}.call(n);t.apply(this,arguments),o(r)&&n.oGC.SetPaneWidthLeft(r),n.opnt&&n.opnt.b||((n.opnt=n.opnt||{}).b=!0,function(){var t=e.call(this);t&&(o(t.paneWidthLeft)||o(t.paneWidthRight))&&this.oGC.SetOptions({paneWidthLeft:t.paneWidthLeft,paneWidthRight:t.paneWidthRight})}.call(n))}}(this.oCW.SetClientRect),this.addGV("gantt"),this.initOV(),e}}(t.prototype.initCW),t.prototype.defAA=function(t){return function(){return"overview-selection-resize,chart-link(Alt)[toggle],chart-move,chart-create(Alt)[name=Task][auto][empty],chart-fit(Shift+MButton,Ctrl+MButton,Alt+MButton),chart-zoom(MButton),chart-select(Shift,Ctrl)[click-item],"+t.apply(this,arguments)}}(t.prototype.defAA),t.prototype.roAA=function(t){return function(){return"overview-selection-resize,chart-fit,chart-zoom,chart-select,"+t.apply(this,arguments)}}(t.prototype.roAA),t.prototype.allP=function(t){return function(){return t.apply(this,arguments)+",chart(Gantt.GV),level(Gantt.GV.Header),overview(Gantt.OV)"}}(t.prototype.allP),t.prototype.onHLC=function(t){return function(){t.apply(this,arguments),this.nHLC=E(this.nHLC,this.oGC.GetLevelCount())}}(t.prototype.onHLC),t.prototype.onRL=function(t){return function(){t.apply(this,arguments),this.feGV("onRL")}}(t.prototype.onRL),t.prototype.onSel=function(t){return function(){this.feGV("invAO"),this.invHG(2),t.apply(this,arguments)}}(t.prototype.onSel),t.prototype.onChk=function(t){return function(e){this.invHG(4),t.apply(this,arguments)}}(t.prototype.onChk),t.prototype.onZoom=function(t){return function(){t.apply(this,arguments),this.feGV("onZoom")}}(t.prototype.onZoom),t.prototype.onDelItem=function(t){return function(e){this.oGC.oGL.resPS(),e.ClearBars(),t.apply(this,arguments)}}(t.prototype.onDelItem),t.prototype.resSel=function(t){return function(){this.oGC.oGL.Clear(),this.oGC.rgSel=null,t.apply(this,arguments)}}(t.prototype.resSel),t.prototype.onlayout=function(t){return function(e){var i,n=e.IsSave();n||(this.oLts.lock(),this.lES++,this.bU()),t.apply(this,arguments),n?(e.pCtx("gnt"),e.Add("oh",this.oGC.getOverviewHeight()),e.Add("hh",this.oGC.getHistogramHeight()),e.Add("sd",function(){var t="";return this.GetSelectDates().forEach(function(e){t+=(t?",":"")+e.start.toFormat()+"-"+e.end.toFormat()}),t}.call(this.oGC)),e.Add("sb",function(){var t,e="";return this.getSel().forEach(function(o){t=o.getKey(),e+=(e?",":"")+o.i().GetIndex()+(t?"("+t+")":"")}),e}.call(this.oGC)),this.feGV(function(t,o){e.pCtx("gV"+o),i=t.getCur(),e.Add("fvd",i.ofV.d.toFormat()),e.Add("fvo",i.ofV.o),e.Add("us",i.uS),e.Add("uw",i.uW),e.rCtx()}),e.rCtx()):(e.pCtx("gnt"),this.oGC.SetOverviewHeight(e.GetValue("oh")),this.oGC.SetHistogramHeight(e.GetValue("hh")),function(t){var e,i=[];o(t)&&t.split(",").forEach(function(t){t&&(e=t.indexOf("-"),i.push({start:Date.Create(t.substr(0,e)),end:Date.Create(t.substr(e+1))}))}),this.SetSelectDates(i)}.call(this.oGC,e.GetValue("sd")),function(t){var e,i=[],n=this.oT;o(t)&&d.B.split(t).forEach(function(t){(e=n.ItemBar(~~t.caption,t.subText))&&i.push(e)},this),this.SetSelection(i)}.call(this.oGC,e.GetValue("sb")),this.feGV(function(t,o){e.pCtx("gV"+o),t.setCur({ofV:{d:Date.Create(e.GetValue("fvd")),o:e.GetValue("fvo")},uS:e.GetValue("us"),uW:e.GetValue("uw")}),e.rCtx()}),e.rCtx()),n||(this.eU(),--this.lES,this.oLts.unlock())}}(t.prototype.onlayout),t.prototype.GetStatistics=function(t){return function(){function e(t,e){return d.Format(t,e||0)}var o=t.apply(this,arguments),i=this.oGV,n=this.oGC,r=i.oLvs,s=r.isSR(),h=r.getBL().UL(),a=function(){var t=0;return this.feI(function(e){e.oIB&&(t+=e.oIB.len())}),t}.call(this),u=i.getVB().len()+i.getVBT().len()+i.getVBB().len(),c=n.oGL.GetCount(),l=i.getVL().len();return o+="\nChart.Unit: "+e(h.length)+(s?"/"+e(s.u.rgU.length):""),o+="\nChart.Item-Bar: "+e(u)+"/"+e(a),o+="\nChart.Link: "+e(l)+"/"+e(c),o+="\nChart.Sel: "+e(n.getSelCount())}}(t.prototype.GetStatistics),d.expO({statistics:null},t.prototype,null,!0),t.prototype.xmlL=function(t){return function(e){if(e){var o=d.Tree.XML,i=o.tag,n=o.vOf,r=i.call(e,"DateFormat"),s=i.call(e,"TimeFormat"),h=i.call(e,"Chart");this.FD(((r&&n.call(r,"Short")||"M/d/yyyy")+(s&&n.call(s,"Format")||"h:mm:ss tt")).replace(/ /g,""),s&&n.call(s,"AM")||"AM",s&&n.call(s,"PM")||"PM",function(){h&&this.oGC.SetOptions({firstVisibleDate:this.f2D(n.call(h,"FirstVisibleDate"))}),t.call(this,e),h&&(this.xmlLB(i.call(h,"Bars")),this.xmlLS(i.call(h,"SummaryBars")),this.xmlLL(i.call(h,"Links")));var o=this.oGC.oGB.getOB();o&&(o.h||o.o)&&this.feIB(function(t){t.Offset&&(o.h&&o.h.has(t.GetBar())||o.o&&o.o.has(t.GetBar()))&&(t.Offset=0)})})}}}(t.prototype.xmlL),t.prototype.xmlLC=(t.prototype.xmlLC,function(t,e){var o=d.Tree.XML.vOf;t.SetOptions({valueToItemBarProperty:o.call(e,"CellValueToItemBarProperty"),valueToItemBarKey:o.call(e,"CellValueToItemBarKey")})}),t.prototype.xmlLI=(t.prototype.xmlLI,function(t,e){var o=d.Tree.XML,i=o.tag,n=o.feU,r=o.vOf,s=o.v2N,h=i.call(e,"^Bars");h&&n.call(h,function(e){t.AddBar({key:r.call(e,"Key"),name:r.call(e,"Name"),start:this.f2D(r.call(e,"Start")),end:this.f2D(r.call(e,"End")),caption:r.call(e,"Caption"),hAlignCaption:s(r.call(e,"HAlignCaption")),vAlignCaption:s(r.call(e,"VAlignCaption")),captionHOffset:s(r.call(e,"BarCaptionHOffset")),captionVOffset:s(r.call(e,"BarCaptionVOffset")),showCaption:s(r.call(e,"BarShowCaption")),toolTip:r.call(e,"ToolTip"),canResize:s(r.call(e,"CanResize")),canMove:s(r.call(e,"CanMove")),canMoveToAnother:s(r.call(e,"CanMoveToAnother")),selectable:s(r.call(e,"Selectable")),canStartLink:s(r.call(e,"CanStartLink")),canEndLink:s(r.call(e,"CanEndLink")),canBeLinked:s(r.call(e,"CanBeLinked")),extraCaption:r.call(e,"Extra"),extraCaptionHAlign:s(r.call(e,"ExtraHAlign")),extraCaptionVAlign:s(r.call(e,"ExtraVAlign")),extraCaptionHOffset:s(r.call(e,"ExtraHOffset")),extraCaptionVOffset:s(r.call(e,"ExtraVOffset")),showExtraCaption:s(r.call(e,"BarShowExtraCaption")),effort:r.call(e,"Effort"),overlaidKey:r.call(e,"OverlaidKey"),offset:s(r.call(e,"Offset")),percent:s(r.call(e,"Percent"),null),percentCaptionFormat:r.call(e,"PercentFormat"),showPercentCaption:s(r.call(e,"ShowPercent"),null),alignPercentCaption:s(r.call(e,"PercentAlign"),null)})},this,"Bar")}),t.prototype.xmlLB=function(t){function e(t){return r.call(this,"Def."+t)}var i=d.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N,h=i.v2C,a=this.oGC.oGB;t&&n.call(t,function(t){function i(t,e){o(e)&&(f[t]=e)}function n(t,e){o(e)&&(p[t]=e)}var u,c=r.call(t,"Name"),l=a.Item(c),p={},f={};o(c)&&(i("caption",e.call(t,"Caption")),i("hAlignCaption",s(e.call(t,"HAlignCaption"))),i("vAlignCaption",s(e.call(t,"VAlignCaption"))),i("captionHOffset",s(e.call(t,"BarCaptionHOffset"))),i("captionVOffset",s(e.call(t,"BarCaptionVOffset"))),i("showCaption",s(e.call(t,"BarShowCaption"))),i("toolTip",e.call(t,"ToolTip")),i("canResize",s(e.call(t,"CanResize"))),i("canMove",s(e.call(t,"CanMove"))),i("canMoveToAnother",s(e.call(t,"CanMoveToAnother"))),i("selectable",s(e.call(t,"Selectable"))),i("canStartLink",s(e.call(t,"CanStartLink"))),i("canEndLink",s(e.call(t,"CanEndLink"))),i("canBeLinked",s(e.call(t,"CanBeLinked"))),i("extraCaption",e.call(t,"Extra")),i("extraCaptionHAlign",s(e.call(t,"ExtraHAlign"))),i("extraCaptionVAlign",s(e.call(t,"ExtraVAlign"))),i("extraCaptionHOffset",s(e.call(t,"ExtraHOffset"))),i("extraCaptionVOffset",s(e.call(t,"ExtraVOffset"))),i("showExtraCaption",s(e.call(t,"BarShowExtraCaption"))),n("def",f),n("overlaidType",r.call(t,"OverlaidType")),n("overlaidGroup",r.call(t,"OverlaidGroup")),l?l.SetOptions(p):a.Add(d.Mrg({name:c,shape:o(u=s(r.call(t,"Pattern")))&&{pattern:15&s(u,1),patternColor:h(r.call(t,"Color"),"gray"),frameColor:h(r.call(t,"Color"),"black")}||null},p)))},this,"Bar")},t.prototype.xmlLS=function(t){var e,o,i=d.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N;t&&n.call(t,function(t){(e=this.ItemBar(s(r.call(t,"Item"),-1),r.call(t,"Key")))&&n.call(t,function(t){(o=this.ItemBar(s(r.call(t,"Item"),-1),r.call(t,"Key")))&&e.DefineSummaryBars(o)},this,"Bar")},this,"SummaryBar")},t.prototype.xmlLL=function(t){function e(t){var e=u.get(t);return!e&&u.set(t,e=S.cRut.c2A(t).reduce(function(t,e){return t|e})||0),e}function o(t){var e=new Map;return d.B.split(b(t)).forEach(function(t){e.set(t.caption,t.subText)}),e}var i=d.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N,h=this.oGC,a=h.oGL,u=new Map,c=h.getLink(),l=o("00(ML),02(ML),20(MR),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),p=o("00(ML),02(TR,MR,BR),20(TL,ML,BL),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),f=e(c.startPos),g=e(c.endPos);t&&n.call(t,function(t){a.Add({key:r.call(t,"Key"),from:this.ItemBar(s(r.call(t,"StartItem"),-1),r.call(t,"StartBar")),to:this.ItemBar(s(r.call(t,"EndItem"),-1),r.call(t,"EndBar")),visible:s(r.call(t,"Visible")),caption:r.call(t,"Text"),lag:r.call(t,"PDMDelay"),workingLag:r.call(t,"PDMWorkingDelay"),link:function(t){var o=(r.call(t,"StartPos")||"").trim(),i=(r.call(t,"EndPos")||"").trim(),n=l.get(o+i)||l.get(o),s=p.get(o+i)||p.get(i);return!((e(n)&f)==f&&(e(s)&g)==g)&&{startPos:n,endPos:s}||null}(t)})},this,"Link")},t.prototype.objL=function(t){return function(e){var i=t.apply(this,arguments);return U(e)&&function(t){var e=this.oGC.oGL;o(t)&&c(t).forEach(function(t){e.Add(t)},this)}.call(this,e.links),i}}(t.prototype.objL),t.prototype.objLI=(t.prototype.objLI,function(t,e){e&&o(e.bars)&&c(e.bars).forEach(function(e){t.AddBar(e)},this)}),t.prototype.addTV=function(e){return function(){var o,i=e.apply(this,arguments);return i&&this instanceof t&&((o=(i.oW.opW||this.oCW).Add("histogram",{Dock:2,SizeExtends:"tree.histogram",Extends:"vertical",Control:i.oHL=new d.Gantt.GV.HL(i)})).GetVisible=i.oHL.showH.bind(i.oHL),this.aSizeW(o),o.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sHH(e),t.apply(this,arguments)}}(o.setClient)),i}}(t.prototype.addTV),t.prototype.onbE=function(t){return function(e,o){if(t.apply(this,arguments),o){var i=o.tagName.toUpperCase(),n=this;if("INPUT"==i||"TEXTAREA"==i){o.__oniE=function(){setTimeout(function(){var t=o.value.substr(o.selectionStart,o.selectionEnd-o.selectionStart);t!=o.__oldS&&n.onesC(o.__oldS=t,e,o)})},o.addEventListener("pointerup",o.__oniE),o.addEventListener("keyup",o.__oniE),o.addEventListener("select",o.__oniE),o.__oniE()}}}}(t.prototype.onbE),t.prototype.oneE=function(t){return function(e,o){o.__oniE&&(o.removeEventListener("pointerup",o.__oniE),o.removeEventListener("keyup",o.__oniE),o.removeEventListener("select",o.__oniE),o.__oniE=o.__oldS=void 0,this.onesC(null,e,o)),t.apply(this,arguments)}}(t.prototype.oneE),t.prototype.onesC=function(t,e,n){var r,s,h=this.oTV.back("psLinkEditSel"),a=this.oTV.back("psBarShapeEditSel");(h||a)&&(!(r=e.v2B())||270!=r.i&&271!=r.i||(s=r.g&&e.oI.ItemBar(r.k))&&function(){var e,n,r,u=this.oIOL;u&&(e=this.oGC.oT.oI,this.bU(),o(t)&&(void 0===this.__mTLA&&(this.__mTLA=this.mTLA||null),void 0===e.__mTBS&&(e.__mTBS=e.mTBS||null)),s&&t&&t.split(T).forEach(function(t){var o,i=this.split(t);i&&(o=1==i.t?u.mIO.get(s).out.get(i.b):u.mIO.get(i.b).out.get(s))&&(h&&(n=n||d.CpM(this.__mTLA)||new Map).set(o,h),a&&(r=r||d.CpM(e.__mTBS)||new Map).set(i.b,a))},this),i(t)?(this.mTLA=this.__mTLA,e.mTBS=e.__mTBS,e.__mTBS=this.__mTLA=void 0):(this.mTLA=n||this.__mTLA,e.mTBS=r||e.__mTBS),this.eU())}.call(this.oGC.oGL))},d.ComboBox&&(t.DefCBCap="<%=shortdate(%1)%> - <%=shortdate(%2)%>",t.prototype.dCBl=function(e){return function(o,i){var n=this.oGC.GetPaneWidth(!1),r=[i[0],i[1],n,i[3]],s=[d.ROf(r),i[1],i[2]-n,i[3]],h=d.Tree.TV.prototype.drawCS,a=d.Gantt.GV.prototype.drawB;d.Tree.TV.prototype.drawCS=function(){},e.call(this,o,r),d.Tree.TV.prototype.drawCS=h,t.DefCBCap&&(d.Gantt.GV.prototype.drawB=function(e,o,i){a.apply(this,arguments),!i.getCaption()&&this.drawC(e,o,i,v.Get(t.DefCBCap),33,1)},this.oTV.drawI2.call(this.oGV,o,s,this.getSel().first()),d.Gantt.GV.prototype.drawB=a),h.call(this.oTV,o,i,this.getSelCount(),36)}}(t.prototype.dCBl),t.prototype.cCB=function(e){return function(o){return e.apply(this,arguments)||this.e2V(o)instanceof t.GV}}(t.prototype.cCB),t.prototype.sCB=function(t){return function(){return t.apply(this,arguments)}}(t.prototype.sCB),d.CW.prototype.SetCanvas=function(t,e){return d.ComboBox.implExHost(t,"onselchange,onchange,onscroll,ondatechange")}(d.CW.prototype.SetCanvas)),t.prototype.addGV=function(t,e){function o(e){return e.repAll("name",t)}var n=null;if(!i(t)&&t.trim().length||(t="gantt"+this.rgGV.length),!this.oCW.W(t)){var r,s,a,u=(this.oCW.W("main")||this.oCW).Add(t,d.Mrg({Dock:4,Size:this.oGC.opt("paneWidthRight",320)},e)),c=this.oCW.W("filter");n=new d.Gantt.GV(this),this.rgGV.push(n),this.oGV=this.oGV||n,!(u.GetDock()%2)&&u.SetPosition(this.oCW.W("tree").GetPosition()+1),u.Add("client",{Dock:5,HoverExtends:o("control,top,bottom,main.header,main.footer,vertical,vscroll,grip,name,name.header,name.hscroll"),Extends:o("name.hscroll,vertical"),HScroll:o("name.hscroll"),VScroll:"vscroll",Control:n}),(r=u.Add("header",{Dock:1,Resizable:!1,HScroll:o("name.hscroll"),Extends:"vertical",Control:n.oHB,VisibleExtends:n==this.oGV?null:"gantt.header"})).GetVisible=n.getHeaderVisible.bind(n),this.aSizeW(r),(s=u.Add("hscroll",{Dock:2,Resizable:!1,Size:16,VisibleExtends:o("name.client"),Opacity:0,HoverOpacity:1,Control:new d.ScrollBar(null,null)})).GetVisible=n.showSB.bind(n),s.oC.Scroll=n.hsScroll.bind(n),s.oC.smthBy=n.hsSmthBy.bind(n),c&&c.SetExtends(c.GetExtends()+","+u.GetShortName()),this.oGV==n&&(this.oTV.oFB.onZ=function(t){return function(e){t.call(this,e);var o,i,n,r,s=e.get(this.oW),a=this.oTV.oHL.oW,u=this.oTV.oW;s&&e.forEach(function(t,c){c&&h(o=c.oC)&&!B(d.NRt(e.get(c.opW),s))&&c.GetDock()==u.GetDock()&&a.GetDock()==o.oHG.oW.GetDock()&&((i=e.get(u))&&(t[1]=i[1],t[3]=i[3]),(n=e.get(a))&&(r=e.get(o.oHG.oW))&&(r[1]=n[1],r[3]=n[3]))},this)}}(this.oTV.oFB.onZ)),(a=u.Add("histogram",{Dock:2,SizeExtends:"tree.histogram",Extends:"vertical",HScroll:o("name.hscroll"),Control:n.oHG})).GetVisible=n.oHG.showH.bind(n.oHG),this.aSizeW(a),a.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sHH(e),t.apply(this,arguments)}}(a.setClient),this.oGV!=n&&setTimeout(function(){n.oLvs.setSR(n.oLvs.getSR()),n.onDC()})}return n},t.prototype.AddGanttView=function(t,e){this.bU();var o=this.addGV(t,e);return this.eU(),o},t.prototype.delGV=function(t){!i(t)&&t.trim().length||(t=this.rgGV[this.rgGV.length-1].oW.opW.GetName());var e=!1,o=this.oCW.W(t);if(o){var n,r,s=null,a=this.oCW.W(o.GetName()+".client");a&&h(s=a.GetC())&&s!=this.oGV&&(e=(n=this.rgGV.indexOf(s))>=0)&&((r=this.oCW.W("filter"))&&r.SetExtends(r.GetExtends().replace(","+o.GetShortName(),"")),this.rgGV.splice(n,1),this.oCW.Remove(o))}return e},t.prototype.RemoveGanttView=function(t){this.bU(),this.delGV(t),this.eU()},t.prototype.GanttView=function(t){var e=this.oCW.W(t+".client");return e&&e.oC&&~this.rgGV.indexOf(e.oC)&&e.oC||null},t.prototype.feGV=function(t,e){d.Gantt.GV.prototype[t]?this.rgGV.forEach(function(e){e[t].call(e)},this):this.rgGV.forEach(t,e)},t.prototype.feGVU=function(t,e){return d.Gantt.GV.prototype[t]?this.rgGV.forEachU(function(e){e[t].call(e)},this):this.rgGV.forEachU(t,e)},t.prototype.feIB=function(t,e){e=e||this,this.feI(function(o){o.oIB&&o.oIB.forEach(function(o){t.call(e,o)})})},t.prototype.feIBU=function(t,e){return e=e||this,this.feIU(function(o){return o.oIB&&o.oIB.forEachU(function(o){return t.call(e,o)})})},t.prototype.feL=function(t,e){e=e||this,this.oGC.oGL.rgL.forEach(function(o){t.call(e,o)})},t.prototype.feLU=function(t,e){e=e||this,this.oGC.oGL.rgL.forEachU(function(o){return t.call(e,o)})},t.prototype.ondatechange=function(t){this.oLts.ondatechange.do(t)},t.prototype.onchartselchange=function(t){this.oLts.onchartselchange.do(t)},t.prototype.ondateselchange=function(t){this.oLts.ondateselchange.do(t)},t.prototype.oncreatebar=function(t){this.oLts.oncreatebar.do(t)},t.prototype.onbarresizing=function(t){this.oLts.onbarresizing.do(t)},t.prototype.onbarresize=function(t){this.oLts.onbarresize.do(t)},t.prototype.onbarparentchange=function(t){this.oLts.onbarparentchange.do(t)},t.prototype.onallowlink=function(t){this.oLts.onallowlink.do(t)},t.prototype.oncreatelink=function(t){this.oLts.oncreatelink.do(t)},t.prototype.onDC=function(t){this.ondatechange(t)},t.prototype.onBC=function(t,e){this.oOV.oSE=null,e&&this.resOI(e.i())},t.prototype.resOI=function(t){if(t){var e=this.oGC.oGB.getOB();e&&e.h&&(this.oI.mOI&&this.oI.mOI.delete(t),this.onRL())}},t.prototype.lResOI=function(t,o,i){return t?(this.resOI=t,this.Smooth(function(){this.oGIB.all(o).forEach(function(t){this.resOI(t.i())},this),i&&this.resOI(i)},this)):(t=this.resOI,this.resOI=e),t},t.prototype.GetChart=function(){return this.oGC},t.prototype.initOV=function(){var t=this.oCW,e=this.oOV,o=(t.W("control")||t).Add("overview",{Dock:1,Size:this.oGC.getOverviewHeight(),Control:e});o.SetPosition(0),o.GetResizable=e.GetResizable.bind(e),o.GetVisible=e.GetVisible.bind(e),this.aSizeW(o),o.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sOH(e),t.apply(this,arguments)}}(o.setClient)},t.prototype.invOV=function(t){!this.oCW.lR&&!this.oCW.lPR&&this.oOV.pinvAO(t)},t.prototype.FD=function(t,e,o,i,n){var r=this.oFD;this.oFD={oF:new d.PF(t,"year(y,yy,yyyy,yyyyy),month(M,MM),day(d,dd),hour(h,hh,H,HH),minute(m,mm),second(s,ss),ampm(t,tt)"),pm:o,am:e},i.call(n||this),this.oFD=r},t.prototype.f2D=function(t){var e=this.oFD,o=e.oF.split(t),i=o.map(function(t){return~~t});return o[6]==e.pm&&(i[3]+=12),Date.Create.apply(null,i)},t.prototype.ItemBar=function(t,e){var o=this.oI.Item(t);return o&&o.ItemBar(e)},t.prototype.hasIB=function(t){return a(t)&&t.t()==this&&t||null},t.prototype.Bar=function(t,e){return this.oGC.Bar(t,e)},t.prototype.PutRes=function(e,o){o=l(o,d.Gantt.PutResEnum,1),e instanceof t&&(1==o||2==o)&&t.CR[1==o?"load":"save"].call(e,this)},t.prototype.invHG=function(t,e){this.resHD(t)&&!this.oCW.lR&&!this.oCW.lPR&&this.feGV(function(o){o.invHG(t,e)})},t.prototype.invHL=function(t,e){!this.oCW.lR&&!this.oCW.lPR&&this.feTV(function(o){o.oHL.pinv(t,e)})},t.prototype.resHD=function(t){return this.oGC.isHV(t)&&(this.feGV(function(t){t.oHG.resHD()})||!0)},t.prototype.Link=function(t){return this.oGC.oGL.Item(t)},t.prototype.resTLB=function(){this.bU(),this.oI.mTBS=this.oGC.oGL.mTLA=this.oGC.oGL.oCPI=null,this.eU()},t.prototype.EnsureVisibleClient=function(t,e){this.oGV.EnsureVisibleClient(t,e),this.oTV.EnsureVisibleClient(t,e)},t.prototype.EnsureVisibleSelection=function(t){this.oGV.EnsureVisibleSelection(t),this.oTV.EnsureVisibleSelection(t)},d.expO({Canvas:null,Chart:null},t.prototype),{Gantt:t}}()),d.Mrg(d.Gantt,{DefSchedulePDM:{scheduleType:null,scheduleDate:null,errorShape:null,cycleShape:null,callHasCycle:null,criticalPathBarShape:null,criticalPathOffBarShape:null,criticalPathLinkApp:null,criticalPathOffLinkApp:null,criticalPathLenMethod:null},ChartOptions:{paneWidthLeft:null,paneWidthRight:null,levelCount:2,labels:null,toolTips:null,unitScale:4096,locale:null,drawLevelSeparator:null,unitWidth:18,unitWidthNonworking:null,minUnitWidth:12,maxUnitWidth:36,firstVisibleDate:null,firstVisibleOffset:null,nonworkingDays:null,showNonworkingDays:null,nonworkingHours:null,showNonworkingHours:null,showNonworkingUnits:null,adjustLevelsToBase:null,scrollRange:null,scrollBar:null,drawGridLines:null,bars:null,singleSel:null,allowSelectDate:null,selectDates:null,resizeUnitScale:null,resizeUnitCount:null,dateTickerLabel:null,dateTickerLabelVAlign:null,dateTickerLabelHMargin:null,drawDateTicker:null,showLinks:null,link:null,linkStartFrom:null,linkEndTo:null,linkUnselected:null,overviewVisible:null,overviewHeight:null,overviewShowSelectDates:null,overviewToolTip:null,overviewZoomCaption:null,allowOverviewZoom:null,overviewZoomUnit:null,histogramVisible:null,histogramHeight:null,histogramView:null,histogramUnitScale:null,histogramUnitCount:null,histogramZOrder:null,overlaidOnMoving:null,overviewMarginsFormat:null},LevelOptions:{label:null,unit:null,count:null,align:null,shape:null,drawGridLines:null,drawTickLines:null,drawTickLinesFrom:null,formatLabel:null,toolTip:null},BarOptions:{name:null,shortcut:null,shape:null,height:null,def:null,histogramShape:null,histogramType:null,histogramCriticalColor:null,histogramCriticalValue:null,showHistogramValues:null,formatHistogramValues:null,histogramGridLinesColor:null,histogramRulerLinesColor:null,histogramItems:null,histogramCumulativeColors:null,histogramCumulativeOriginalColorBars:null,histogramCumulativeShowLegend:null,overlaidType:null,overlaidGroup:null,overlaid:null,overviewColor:null},ItemBarOptions:{name:null,key:null,start:null,end:null,shape:null,height:null,selected:null,selectable:null,caption:null,hAlignCaption:null,vAlignCaption:null,showCaption:null,extraCaption:null,extraCaptionHAlign:null,extraCaptionVAlign:null,showExtraCaption:null,toolTip:null,canResize:null,canMove:null,canMoveToAnother:null,summaryBarShape:null,captionHOffset:null,captionVOffset:null,extraCaptionHOffset:null,extraCaptionVOffset:null,canStartLink:null,canEndLink:null,canBeLinked:null,effort:null,overlaidKey:null,offset:null,percent:null,showPercentCaption:null,alignPercentCaption:null,canResizePercent:null,percentCaptionFormat:null,overviewColor:null,histLegend:null,predecessor:null,successor:null,resources:null,resourceFormat:null,resizePercentStep:null},LinkOptions:{visible:!0,key:null,caption:null,from:null,to:null,lag:null,workingLag:null,link:null,type:null},DisplayLinkType:{type:void 0,dir:void 0,width:void 0,color:void 0,arrow:void 0,arrowSize:void 0,arrowShape:void 0,style:void 0,startPos:void 0,endPos:void 0},ChartLabelType:{year:void 0,halfYear:void 0,quarterYear:void 0,month:void 0,thirdMonth:void 0,week:void 0,day:void 0,hour:void 0,minute:void 0,second:void 0},ScrollRangeType:{start:void 0,end:void 0}}),d.Tree.Options.debug=null,d.Tree.Options.chart=d.Gantt.ChartOptions,d.Tree.ConditionalFormatOptions.applyToBars=null,d.Tree.ConditionalFormatOptions.barShape=null,d.Tree.ConditionalFormats.prototype.resCF=function(t){return function(){return this.resBF(),t.apply(this,arguments)}}(d.Tree.ConditionalFormats.prototype.resCF),d.Tree.ConditionalFormats.prototype.resBF=function(){this.mBF=null},d.Tree.ConditionalFormats.prototype.b2S=function(t,e){var o,i,n=this.mBF||(this.mBF=function(){var t=new Map;return this.forEach(function(e){if(e.isEnabled()&&e.isValid()&&e.getBarShape()){var o=e.getApplyToBars();o&&o.forEach(function(o){var i=t.get(o);!i&&t.set(o,i=[]),i.push(e)})}}),t}.call(this));return n.size&&(o=n.get(t))&&o.forEach(function(t){t.getExC().Evaluate(e.rgC[0])&&(i=d.Inh(t.getBarShape(),i||{}))}),i},d.Mrg(d.Tree.ConditionalFormat.prototype,{GetApplyToBars:function(){return this.oO.applyToBars},SetApplyToBars:function(t){this.bU(),this.resCF(),this.oO.applyToBars=t,this.eU()},getApplyToBars:function(){var t=this.oCF.oT.oGC.oGB.Items(this.GetApplyToBars());return t.len()?t:null},GetBarShape:function(){return this.oO.barShape},SetBarShape:function(t){this.bU(),this.resCF(),this.oO.barShape=d.S.A2S(t),this.eU()},getBarShape:function(){return this.dTV().toShape(this.GetBarShape())}}),d.expO({ApplyToBars:null,BarShape:null},d.Tree.ConditionalFormat.prototype),d.Mrg(d.Gantt,function(){function t(t){this.init(t)}function e(t){this.init(t)}var s=d.Gantt.ChartOptions;return t.prototype.init=function(t){this.oT=t,this.oO=d.Cpy(s),this.mLb=new Map,this.mTt=new Map,this.lSyl=0,this.lSyv=0,this.rgSel=null,this.oNW=new d.Gantt.NW(this),this.oLvs=new d.Gantt.Levels(this),this.oAL=new d.Gantt.AL(this.oLvs),this.oGB=new d.Gantt.Bars(this),this.oGL=new d.Gantt.Links(this),this.oSD=new d.Gantt.SD(this),this.import()},t.prototype.import=function(t){t=t||this.oT,["bU","eU","feGV","getLIV","resHD"].forEach(function(e){this[e]=t[e].bind(t)},this)},t.prototype.onDelBar=function(t){t.rgS&&t.rgS.forEach(function(e){e.rgpS&&e.rgpS.remove(t)&&!e.rgpS.len()&&(e.rgpS=null)}),t.rgpS&&t.rgpS.forEach(function(e){e.rgS&&e.rgS.remove(t)&&!e.rgS.len()&&(e.rgS=null),e.xSE()}),this.removeSel(t),this.oT.oGIB.onDelBar(t),this.oGL.onDelBar(t),this.oT.onBC(2,t)},t.prototype.onAddLink=function(t){this.resVL()},t.prototype.onDelLink=function(t){this.resVL()},t.prototype.onAllowLink=function(t,e){var o={start:t,end:e,cancel:!1};return this.oT.onallowlink(o),!o.cancel},t.prototype.onCreateLink=function(t){this.oT.oncreatelink(t)},t.prototype.resVB=function(){this.feGV("resVB")},t.prototype.resSD=function(){this.feGV(function(t){t.oLvs.oSDL=null,t.resSDO()})},t.prototype.resVL=function(){this.feGV("resVL")},t.prototype.unkS=function(){return this.oUnkS||(this.oUnkS={frameColor:"rgb(196,196,196)",patternColor:"rgb(224,224,224)",pattern:6})},t.prototype.unkH=function(){return 16},t.prototype.onsize=function(t){this.nPWL=this.oT.oTV.scaled(this.GetPaneWidthLeft()),this.getOverlaidOnMoving()&&this.oT.onRL()},t.prototype.onZoom=function(){this.SetPaneWidthLeft(this.oT.oTV.unscaled(this.nPWL))},t.prototype.EnsureVisibleSelection=function(t){this.oT.oGV.EnsureVisibleSelection(t)},t.prototype.GetOptions=function(){return this.oO},t.prototype.SetOptions=function(t,e){var i=!1;if(o(t)){var n=[],r=this.GetOptions();if(o(r)){for(var s in r){var h=t[s];void 0!==h&&(n.push(s),r[s]!==h&&(r[s]=d.CpV(h)))}if(e)for(var s in t)s in r||(r[s]=d.CpV(t[s]));(i=0!=n.length)&&(this.bU(),n.forEach(function(t){var e=d.setM(t);e in this&&this[e].call(this,r[t])},this),this.eU())}}return i},t.prototype.opt=function(t,e){var o=this.oO[t];return i(o)&&i(o=s[t])&&(o=e),o},t.prototype.pane=function(t){return this.oT[t?"oGV":"oTV"]},t.prototype.GetPaneWidth=function(t){return d.C2R(this.pane(t).oW.opW.GetClientRect())[2]},t.prototype.SetPaneWidth=function(t,e){if(o(e)){var i=this.pane(t).oW;i&&i.opW&&(this.bU(),i.opW.IsDockable()||(e=this.GetPaneWidth(!1)+this.GetPaneWidth(!0)-e,i=this.pane(!t).oW),i.opW.SetSize(e),this.eU())}},t.prototype.GetPaneWidthLeft=function(){return this.GetPaneWidth(!1)},t.prototype.SetPaneWidthLeft=function(t){this.SetPaneWidth(!1,t)},t.prototype.GetPaneWidthRight=function(){return this.GetPaneWidth(!0)},t.prototype.SetPaneWidthRight=function(t){this.SetPaneWidth(!0,t)},t.prototype.GetLevelCount=function(){return this.oLvs.len()},t.prototype.SetLevelCount=function(t){(t=E(1,~~t))!=this.GetLevelCount()&&(this.bU(),this.feGV(function(e){e.oLvs.setLC(t)}),this.eU())},t.prototype.Level=function(t){return this.oLvs.at(this.oLvs.len()-(t+1))},t.prototype.GetLabels=function(){var t={};return this.mLb.forEach(function(e,o){t[d.F.l1st(d.f2S(o,d.UnitEnum).replace(/^ex/,""))]=e},this),t},t.prototype.SetLabels=function(t){var e,i;t=t||{year:"<%yy%><|>'<%yy%><|><%yyyy%>",month:"<|><%m1%><|><%m2%><|><%m3%><|><%mmmm%><|><%m3%> '<%yy%><|><%mmmm%> <%yyyy%>",week:"<|><%ww%><|><%m3%> <%d%>, '<%yy%><%ww%><|><%mmmm%> <%d%>, <%yyyy%><%ww%><||><||>256",day:"<|><%d%><|><%d1%> <%d%><|><%d2%> <%d%><|><%d3%> <%d%><|><%dddd%> <%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096",hour:"<|><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536",minute:"<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>",second:"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"},this.bU(),this.mLb.clear();for(var n in t)o(t[n])&&(i=b(t[n]))&&o(e=d.UnitEnum["ex"+d.getP(n)])&&this.mLb.set(e,i);this.onLb(),this.eU()},t.prototype.GetLabel=function(t){return this.mLb.get(t)},t.prototype.SetLabel=function(t,e){this.bU(),this.mLb.delete(t),o(e)&&this.mLb.set(t,b(e)),this.onLb(),this.eU()},t.prototype.onLb=function(){this.oT.lnt||(this.bU(),this.feGV(function(t){t.oLvs.onLb()}),this.eU())},t.prototype.visLb=function(t){t=G(t,16777216);var e=[];return this.mLb.forEach(function(o,i){i<=t&&e.push({u:i,l:o})}),e.sort(function(t,e){return t.u-e.u}),e},t.prototype.GetToolTips=function(){var t={};return this.mTt.forEach(function(e,o){t[d.F.l1st(d.f2S(o,d.UnitEnum).replace(/^ex/,""))]=e},this),t},t.prototype.SetToolTips=function(t){var e,i;t=t||{year:"<%yyyy%>",month:"<%mmmm%> <%yyyy%>",week:"<%mmmm%> <%d%>, <%yyyy%>/<%ww%>",day:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%>",hour:"%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>",minute:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>",second:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"},this.bU(),this.mTt.clear();for(var n in t)o(t[n])&&(i=b(t[n]))&&null!=(e=d.UnitEnum["ex"+d.getP(n)])&&this.mTt.set(e,i);this.onTt(),this.eU()},t.prototype.GetToolTip=function(t){return this.mTt.get(t)},t.prototype.SetToolTip=function(t,e){this.bU(),this.mTt.delete(t),o(e)&&this.mTt.set(t,b(e)),this.onTt(),this.eU()},t.prototype.onTt=function(){},t.prototype.GetUnitScale=function(){return this.oLvs.getUS()},t.prototype.SetUnitScale=function(t){this.bU(),this.oLvs.setUS(l(t,d.UnitEnum,4096)),this.eU()},t.prototype.GetLocale=function(){return this.oO.locale},t.prototype.SetLocale=function(t){this.bU(),this.oO.locale=t||null,this.onRL(3),this.eU()},t.prototype.getLocale=function(){return this.GetLocale()},t.prototype.locale=function(t,e){var o;return d.Loc.Push(this.getLocale()),t&&(o=t.call(e||this)),d.Loc.Pop(),o},t.prototype.onRL=function(t){1&t&&this.oAL.XC(),2&t&&this.oNW.XC(),this.feGV(function(t){t.oLvs.onRL()})},t.prototype.GetDrawLevelSeparator=function(){return this.oO.drawLevelSeparator},t.prototype.SetDrawLevelSeparator=function(t){this.bU(),this.oO.drawLevelSeparator=t,this.eU()},t.prototype.getDrawLevelSeparator=function(){return l(this.GetDrawLevelSeparator(),d.Gantt.LevelLineEnum,-1)},t.prototype.GetUnitWidth=function(){return this.oLvs.getUW()},t.prototype.SetUnitWidth=function(t){this.bU(),this.oLvs.setUW(t),this.eU()},t.prototype.getUnitWidth=function(){return this.GetUnitWidth()},t.prototype.GetUnitWidthNonworking=function(){return this.oLvs.getUNW()},t.prototype.SetUnitWidthNonworking=function(t){this.bU(),this.oLvs.setUNW(t),this.eU()},t.prototype.getUnitWidthNonworking=function(){return this.GetUnitWidthNonworking()},t.prototype.GetMinUnitWidth=function(){return this.oLvs.getmUW()},t.prototype.SetMinUnitWidth=function(t){this.bU(),this.oLvs.setmUW(t),this.eU()},t.prototype.getMinUnitWidth=function(){return this.GetMinUnitWidth()},t.prototype.GetMaxUnitWidth=function(){return this.oLvs.getMUW()},t.prototype.SetMaxUnitWidth=function(t){this.bU(),this.oLvs.setMUW(t),this.eU()},t.prototype.getMaxUnitWidth=function(){return this.GetMaxUnitWidth()},t.prototype.GetFirstVisibleDate=function(){return this.oLvs.getFVD()},t.prototype.SetFirstVisibleDate=function(t){this.bU(),this.oLvs.setFVD(t),this.eU()},t.prototype.getFirstVisibleDate=function(){return this.GetFirstVisibleDate()},t.prototype.GetFirstVisibleOffset=function(){return this.oLvs.getFVO()},t.prototype.SetFirstVisibleOffset=function(t){this.bU(),this.oLvs.setFVO(t),this.eU()},t.prototype.getFirstVisibleOffset=function(){return this.GetFirstVisibleOffset()},t.prototype.GetLastVisibleDate=function(){return this.oT.oGV.GetLastVisibleDate()},t.prototype.GetNonworkingDays=function(){return this.oNW.getNWD()},t.prototype.SetNonworkingDays=function(t){this.bU(),this.oNW.setNWD(t),this.onRL(),this.eU()},t.prototype.getNonworkingDays=function(){return this.GetNonworkingDays()},t.prototype.GetShowNonworkingDays=function(){return this.oNW.getShowNWD()},t.prototype.SetShowNonworkingDays=function(t){this.bU(),this.oNW.setShowNWD(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingDays=function(){return this.GetShowNonworkingDays()},t.prototype.GetNonworkingHours=function(){return this.oNW.getNWH()},t.prototype.SetNonworkingHours=function(t){this.bU(),this.oNW.setNWH(t),this.onRL(),this.eU()},t.prototype.getNonworkingHours=function(){return this.GetNonworkingHours()},t.prototype.GetShowNonworkingHours=function(){return this.oNW.getShowNWH()},t.prototype.SetShowNonworkingHours=function(t){this.bU(),this.oNW.setShowNWH(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingHours=function(){return this.GetShowNonworkingHours()},t.prototype.GetShowNonworkingUnits=function(){return this.oNW.getShowNWU()},t.prototype.SetShowNonworkingUnits=function(t){this.bU(),this.oNW.setShowNWU(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingUnits=function(){return this.GetShowNonworkingUnits()},t.prototype.GetAdjustLevelsToBase=function(){return this.oO.adjustLevelsToBase},t.prototype.SetAdjustLevelsToBase=function(t){this.bU(),this.oO.adjustLevelsToBase=t,this.onRL(),this.eU()},t.prototype.getAdjustLevelsToBase=function(){return this.opt("adjustLevelsToBase",!1)},t.prototype.GetScrollRange=function(){return this.oLvs.getSR()},t.prototype.SetScrollRange=function(t){this.bU(),this.oLvs.setSR(t),this.eU()},t.prototype.getScrollRange=function(){return this.GetScrollRange()},t.prototype.GetScrollBar=function(){return this.oO.scrollBar},t.prototype.SetScrollBar=function(t){this.bU(),this.oO.scrollBar=t,this.eU()},t.prototype.getScrollBar=function(){return this.opt("scrollBar",!0)},t.prototype.ScrollTo=function(t,e){this.bU(),this.oLvs.scrollTo(t,l(e,d.AlignEnum,1)),this.eU()},t.prototype.Zoom=function(t,e,o){this.oLvs.zoom(t,e,{cUW:o})},t.prototype.GetDrawGridLines=function(){return this.oO.drawGridLines},t.prototype.SetDrawGridLines=function(t){this.bU(),this.oO.drawGridLines=t,this.eU()},t.prototype.getDrawGridLines=function(){var t=this.oT.oTV,e=t.islow()?0:this.opt("drawGridLines");return i(e)&&(e=t.getDrawGridLines()),e},t.prototype.GetBars=function(){return this.oGB},t.prototype.SetBars=function(t){this.oGB.load(t)},t.prototype.Bar=function(t,e){return this.oGB.Item(t,e)},t.prototype.GetAllowSelectDate=function(){return this.oO.allowSelectDate},t.prototype.SetAllowSelectDate=function(t){this.bU(),this.oO.allowSelectDate=t,this.eU()},t.prototype.getAllowSelectDate=function(){return G(this.GetAllowSelectDate(),1)},t.prototype.GetSelectDates=function(){return this.oSD.GetSelectDates()},t.prototype.SetSelectDates=function(t){return this.oSD.SetSelectDates(t)},t.prototype.GetResizeUnitScale=function(){return this.oLvs.getrUS()},t.prototype.SetResizeUnitScale=function(t){this.bU(),this.oLvs.setrUS(l(t,d.UnitEnum,4096)),this.eU()},t.prototype.GetResizeUnitCount=function(){return this.oLvs.getrUC()},t.prototype.SetResizeUnitCount=function(t){this.bU(),this.oLvs.setrUC(t),this.eU()},t.prototype.GetDateTickerLabel=function(){return this.oO.dateTickerLabel},t.prototype.SetDateTickerLabel=function(t){this.bU(),this.oO.dateTickerLabel=t,this.eU()},t.prototype.getDateTickerLabel=function(){return b(this.opt("dateTickerLabel"))},t.prototype.GetDateTickerLabelVAlign=function(){return this.oO.dateTickerLabelVAlign},t.prototype.SetDateTickerLabelVAlign=function(t){this.bU(),this.oO.dateTickerLabelVAlign=t,this.eU()},t.prototype.getDateTickerLabelVAlign=function(){return w(this.opt("dateTickerLabelVAlign",0))},t.prototype.GetDateTickerLabelHMargin=function(){return this.oO.dateTickerLabelHMargin},t.prototype.SetDateTickerLabelHMargin=function(t){this.bU(),this.oO.dateTickerLabelHMargin=t,this.eU()},t.prototype.getDateTickerLabelHMargin=function(){return E(0,w(this.opt("dateTickerLabelHMargin",4)))},t.prototype.GetDrawDateTicker=function(){return this.oO.drawDateTicker},t.prototype.SetDrawDateTicker=function(t){this.bU(),this.oO.drawDateTicker=t,this.eU()},t.prototype.getDrawDateTicker=function(){return d.ToB(this.GetDrawDateTicker())},t.prototype.GetLinks=function(){return this.oGL},t.prototype.GetShowLinks=function(){return this.oO.showLinks},t.prototype.SetShowLinks=function(t){this.bU(),this.oO.showLinks=t,this.eU()},t.prototype.getShowLinks=function(){return l(this.GetShowLinks(),d.ShowLinksEnum,33)},t.prototype.GetLink=function(){return this.oO.link},t.prototype.SetLink=function(t){this.bU(),this.oL=null,this.oO.link=t,this.eU()},t.prototype.getLink=function(){return this.oL||(this.oL=d.L.aPP(this.GetLink())||x),this.oL},t.prototype.GetLinkStartFrom=function(){return this.oO.linkStartFrom},t.prototype.SetLinkStartFrom=function(t){this.bU(),this.oLS=void 0,this.oO.linkStartFrom=t,this.eU()},t.prototype.getLinkStartFrom=function(){var t=this.oLS;return void 0===t&&(t=d.L.aPP(this.GetLinkStartFrom())||null,this.oLS=t),t},t.prototype.GetLinkEndTo=function(){return this.oO.linkEndTo},t.prototype.SetLinkEndTo=function(t){this.bU(),this.oLE=void 0,this.oO.linkEndTo=t,this.eU()},t.prototype.getLinkEndTo=function(){var t=this.oLE;return void 0===t&&(t=d.L.aPP(this.GetLinkEndTo())||null,this.oLE=t),t},t.prototype.GetLinkUnselected=function(){return this.oO.linkUnselected},t.prototype.SetLinkUnselected=function(t){this.bU(),this.oLU=void 0,this.oO.linkUnselected=t,this.eU()},t.prototype.getLinkUnselected=function(){var t=this.oLU;return void 0===t&&(t=d.L.aPP(this.GetLinkUnselected())||null,this.oLU=t),t},t.prototype.GetOverviewVisible=function(){return this.oO.overviewVisible},t.prototype.SetOverviewVisible=function(t){this.bU(),this.oO.overviewVisible=t,this.eU()},t.prototype.getOverviewVisible=function(){return l(this.GetOverviewVisible(),d.Gantt.OverviewVisibleEnum)},t.prototype.GetOverviewHeight=function(){return this.oO.overviewHeight},t.prototype.SetOverviewHeight=function(t){this.bU(),this.oO.overviewHeight=t,this.eU()},t.prototype.getOverviewHeight=function(){return w(this.GetOverviewHeight(),36)},t.prototype.GetOverviewShowSelectDates=function(){return this.oO.overviewShowSelectDates},t.prototype.SetOverviewShowSelectDates=function(t){this.bU(),this.oO.overviewShowSelectDates=t,this.eU()},t.prototype.getOverviewShowSelectDates=function(){return!!this.GetOverviewShowSelectDates()},t.prototype.getOverviewFlags=function(){return(this.getOverviewShowSelectDates()?1:0)|(this.getAllowOverviewZoom()?4:0)},t.prototype.GetOverviewToolTip=function(){return this.oO.overviewToolTip},t.prototype.SetOverviewToolTip=function(t){this.oO.overviewToolTip=t},t.prototype.getOverviewToolTip=function(){return b(this.GetOverviewToolTip())},t.prototype.GetOverviewZoomCaption=function(){return this.oO.overviewZoomCaption},t.prototype.SetOverviewZoomCaption=function(t){this.bU(),this.oO.overviewZoomCaption=t,this.eU()},t.prototype.getOverviewZoomCaption=function(){return b(this.GetOverviewZoomCaption())},t.prototype.GetAllowOverviewZoom=function(){return this.oO.allowOverviewZoom},t.prototype.SetAllowOverviewZoom=function(t){this.bU(),this.oO.allowOverviewZoom=t,this.eU()},t.prototype.getAllowOverviewZoom=function(){return this.GetAllowOverviewZoom()},t.prototype.GetOverviewZoomUnit=function(){return this.oO.overviewZoomUnit},t.prototype.SetOverviewZoomUnit=function(t){this.bU(),this.oO.overviewZoomUnit=t,this.eU()},t.prototype.getOverviewZoomUnit=function(){return E(0,w(this.GetOverviewZoomUnit()))},t.prototype.GetHistogramVisible=function(){return this.oO.histogramVisible},t.prototype.SetHistogramVisible=function(t){this.bU(),this.oO.histogramVisible=t,this.eU()},t.prototype.getHistogramVisible=function(){return!!this.GetHistogramVisible()},t.prototype.isHV=function(t){return this.getHistogramVisible()&&this.getHistogramHeight()&&(i(t)||this.hV(t))},t.prototype.GetHistogramHeight=function(){return this.oO.histogramHeight},t.prototype.SetHistogramHeight=function(t){this.bU(),this.oO.histogramHeight=t,this.eU()},t.prototype.getHistogramHeight=function(){return w(this.GetHistogramHeight(),36)},t.prototype.GetHistogramView=function(){return this.oO.histogramView},t.prototype.SetHistogramView=function(t){this.bU(),this.resHD(),this.oO.histogramView=t,this.eU()},t.prototype.getHistogramView=function(){return l(this.GetHistogramView(),d.Gantt.HistogramViewEnum,1)},t.prototype.hV=function(t){return i(t)?this.getHistogramView():(t&this.getHistogramView())==t||112&t&&4==(65535&this.getHistogramView())},t.prototype.GetHistogramUnitScale=function(){return this.oO.histogramUnitScale},t.prototype.SetHistogramUnitScale=function(t){this.bU(),this.oO.histogramUnitScale=t,this.eU()},t.prototype.GetHistogramUnitCount=function(){return this.oO.histogramUnitCount},t.prototype.SetHistogramUnitCount=function(t){this.bU(),this.oO.histogramUnitCount=t,this.eU()},t.prototype.gethU=function(){var t=this.oLvs.getrU();return{s:G(this.GetHistogramUnitScale(),t.s),c:E(1,G(this.GetHistogramUnitCount(),t.c))}},t.prototype.GetHistogramZOrder=function(){return this.oO.histogramZOrder},t.prototype.SetHistogramZOrder=function(t){this.bU(),this.resHD(),this.oO.histogramZOrder=t,this.eU()},t.prototype.getHistogramZOrder=function(){return b(this.GetHistogramZOrder())},t.prototype.HistogramValue=function(t){return this.oT.oGV.oHG.V(t)},t.prototype.GetOverlaidOnMoving=function(){return this.oO.overlaidOnMoving},t.prototype.SetOverlaidOnMoving=function(t){this.bU(),this.oO.overlaidOnMoving=t,this.eU()},t.prototype.getOverlaidOnMoving=function(){return d.ToB(this.GetOverlaidOnMoving())},t.prototype.GetOverviewMarginsFormat=function(){return this.oO.overviewMarginsFormat},t.prototype.SetOverviewMarginsFormat=function(t){this.bU(),this.oExD=void 0,this.oO.overviewMarginsFormat=t,this.eU()},t.prototype.getOverviewMarginsFormat=function(){return void 0===this.oExD&&((this.oExD=d.E.Create(d.ToS(this.GetOverviewMarginsFormat()),"value,margin")).IsValid()?this.oExD.Evaluate=function(t,e){return d.Expr.prototype.Evaluate.call(this,function(o){return-2==o?e:t})}:this.oExD=null),this.oExD},t.prototype.se=function(){var t,e,o;return this.oT.feIB(function(i){o=i.se(),(!t||o.s.Compare(t)<0)&&(t=o.s),(!e||o.e.Compare(e)>0)&&(e=o.e)}),{s:t,e:e}},t.prototype.GetStartPrintDate=function(){return this.se().s},t.prototype.GetEndPrintDate=function(){return this.se().e},t.prototype.GetSingleSel=function(){return this.oO.singleSel},t.prototype.SetSingleSel=function(t){this.bU(),this.n1S=null,this.oO.singleSel=t,this.eU()},t.prototype.getSingleSel=function(){var t=this.n1S;return i(t)&&(i(t=this.GetSingleSel())&&(t=s.singleSel),t=G(t,d.Tree.SingleSelEnum.exEnableSel),this.n1S=t),t},t.prototype.GetSelection=function(){return r(this.rgSel)?this.rgSel.byO().slice():this.rgSel},t.prototype.SetSelection=function(t){this.select(t)},t.prototype.RemoveSelection=function(){var t,e=0;return this.rgSel&&this.oT.Smooth(function(){(e=(t=this.getSel()).len())&&(this.rgSel=null,t.forEach(function(t){t.Remove()}))},this),e},t.prototype.getSel=function(){var t=d.Arr.empty;return this.rgSel&&(t=r(this.rgSel)?this.rgSel:new d.Arr(this.rgSel)),t},t.prototype.isSelected=function(t){return r(this.rgSel)?this.rgSel.has(t):this.rgSel==t},t.prototype.isSable=function(t){return a(t)&&t.isSelectable()},t.prototype.getSelCount=function(){var t=0;return this.rgSel&&(t++,r(this.rgSel)&&(t=this.rgSel.len())),t},t.prototype.removeSel=function(t){this.rgSel&&this.isSelected(t)&&(r(this.rgSel)?(this.rgSel.remove(t),this.rgSel.len()||(this.rgSel=null)):this.rgSel=null)},t.prototype.allowSelect=function(){return this.getSingleSel()!=d.Tree.SingleSelEnum.exDisableSel},t.prototype.isSingleSel=function(){return this.getSingleSel()&d.Tree.SingleSelEnum.exSingleSel},t.prototype.isToggleSel=function(){return this.getSingleSel()&d.Tree.SingleSelEnum.exToggleSel},t.prototype.isToggleCtrlSel=function(){return 0==(this.getSingleSel()&d.Tree.SingleSelEnum.exDisableCtrlSel)},t.prototype.isShiftSel=function(){return 0==(this.getSingleSel()&d.Tree.SingleSelEnum.exDisableShiftSel)},t.prototype.allowSelectByDrag=function(){return 0==(this.getSingleSel()&d.Tree.SingleSelEnum.exDisableDrag)},t.prototype.select=function(t,e){function s(t){var e=!1,n=this.isSelected(t),r=this.isSable(t);if(i(t))e=o(this.rgSel),this.rgSel=null;else if(this.isSingleSel()){var s=this.rgSel;this.rgSel=!r||l&&n?null:t,e=s!=this.rgSel}else if(c&&this.rgSel&&this.rgSel.len()){var h=this.getLIV(),a=h.rgVI.indexOf(this.rgSel.last()),u=h.rgVI.indexOf(t);if(a>=0&&u>=0)for(var p=I(u,a),f=E(u,a);p<=f;p++){var g=h.rgVI.at(p);!this.rgSel.has(g)&&g.isSelectable()&&(e=!0,this.rgSel.push(g))}}else l&&n?(e=n,this.removeSel(t)):(l||(e=o(this.rgSel)&&(!n||this.rgSel.len()>1),this.rgSel=null),r&&(this.rgSel=this.rgSel||new d.Arr).push(t)),e|=n!=this.isSelected(t);return e}var h=!1,c=1==(e=e||{}).selType,l=2&e.selType,p=function(t){function e(t){return(u(t)?s.has(t)&&t.oIB:a(t)&&s.has(t.i())&&t)||null}var i=null;if(o(t)){i=new d.Arr;var s=this.oT.oI;t==s&&(t=s.rgI),n(t)||r(t)?t.forEach(function(t){i.pushnn(e.call(this,t))},this):i.pushnn(e.call(this,t)),i.len()?1==i.len()&&(i=i.at(0)):i=null}return i}.call(this,t);return r(p)?c?h|=s.call(this,p.last()):l?p.forEach(function(t){h|=s.call(this,t)},this):(h=!p.equal(this.rgSel))&&(this.isSingleSel()?s.call(this,p.last()):(this.rgSel=new d.Arr,p.forEach(function(t){t.isSelectable()&&this.rgSel.push(t)},this))):h=s.call(this,p),h&&(r(this.rgSel)&&(this.rgSel.len()||(this.rgSel=null)),(i(e.selChange)||e.selChange)&&(this.feGV("invAO"),this.onSel())),h},t.prototype.onSel=function(){this.oT.invHG(8),this.oT.onchartselchange(this.GetSelection())},t.prototype.eyB=function(){return 0},e.prototype.init=function(t){this.oT=t,this.oLts=t.oLts,this.lI=0,this.lsX=0,this.oLvs=t.oGV?new d.Gantt.Levels(t.oGC).copy(t.oGC.oLvs):t.oGC.oLvs,this.oHB=new e.Header(this),this.oHG=new e.HG(this),this.import(),this.oLvs.setGV(this)},d.SB.addProto(e.prototype),e.prototype.SetClientRect=function(t){},e.prototype.import=function(){var t=this.dTV(),e=this.gC();t.export(this),["cwbU","cweU","toShapes","toShape","iaShape","getCursors","gAA","getScale","SetZoom","GetZoom","getTfi","ctxTfi","getLocked","isReadOnly","getSmooth","getGridLines","pGL","getHeaderHeight","getPad","e2V","Smooth","Smoothless","getShowLockedItems","getLIV","getLIVT","getLIVB","getDebug","getToolTipDelay","getToolTipPopDelay","getToolTipWidth","getDefaultItemHeight","allowTT"].forEach(function(e){this[e]=t[e].bind(t)},this),["ptCA","rtCA","p2TB","p2I","p2Il","p2A","p2V","onA","onanchorclick","ar2I","ap2I","HTl","sHTl","e2I","e2Il","e2W","rurOnlyAO","clip2VC","onClick","onclick"].forEach(function(e){this[e]=t[e].bind(this)},this),["getSel","getDrawGridLines","getDateTickerLabel","getDateTickerLabelVAlign","getDateTickerLabelHMargin","getDrawDateTicker","getShowLinks","getLink","getLinkStartFrom","getLinkEndTo","getLinkUnselected","getHistogramVisible"].forEach(function(t){this[t]=e[t].bind(e)},this)},e.prototype.setTimeout=function(){return d.setTimeout.apply(this,arguments)},e.prototype.dTV=function(){return this.oT.oTV},e.prototype.getHeaderVisible=function(){return this.dTV().getHeaderVisible()},e.prototype.gC=function(){return this.oT.oGC},e.prototype.showSB=function(){return this.gC().getScrollBar()},e.prototype.GetPageSize=function(){var t=this.oW.GetClientRect();return t&&[this.scaled(t[2]),this.scaled(t[3])]||[0,0]},e.prototype.origin=function(t){return t=t||this.dTV().GetScroll(),[0,-t.y]},e.prototype.GetScrollRect=function(){var t=this.origin(),e=this.GetPageSize();return[-t[0],-t[1],e[0],e[1]]},e.prototype.GetCanvasRect=function(){var t=this.GetClientRect(),e=this.GetCanvas();return e&&(t=[0,0,e.width,e.height]),t},e.prototype.GetVisibleRect=function(){return d.NRt(this.GetClientRect(),this.GetCanvasRect())},e.prototype.GetViewRect=function(t){var e=d.EArtC((t||this.gCW()).GetCanvas());return d.ORt(this.GetClientRect(),e[0],e[1])},e.prototype.c2V=function(t,e){return d.CW.prototype.c2V.apply(this,arguments)},e.prototype.v2C=function(t,e){return d.CW.prototype.v2C.apply(this,arguments)},e.prototype.c2Vrt=function(t){var e=this.c2V(t);return[e.x,e.y,t[2],t[3]]},e.prototype.v2Crt=function(t){var e=this.v2C(t);return[e.x,e.y,t[2],t[3]]},e.prototype.bU=function(){this.lI++},e.prototype.eU=function(){--this.lI||this.invAO()},e.prototype.wAO=function(){return this._wAO},e.prototype.isClkAble=function(){return this.isSelectable()&&!this.isReadOnly()},e.prototype.htAO=d.Tree.TV.prototype.htAO,e.prototype.onSetAO=d.Tree.TV.prototype.onSetAO,e.prototype.onExtAO=function(t,e){},e.prototype.locale=function(t,e){return this.gC().locale(t,e||this)},e.prototype.ctxLoc=function(t,e,o){var i;return this.locale(function(){i=this.ctxTfi(t,e||this,o)},this),i},e.prototype.onpaint=function(t){!this.lI&&this.locale(function(){d.SB.prototype.onpaint.call(this,t)},this)},e.prototype.pLL=function(t,e){var i,n=this.getGridLines();n&&(o(n.width)&&(t.lineWidth=n.width),o(n.color)&&(t.strokeStyle=n.color),-1==e?i=d.IsA(n.style)?n.style:[n.style]:e&d.Gantt.LevelLineEnum.exLevelDotLine&&(i=[1]),i&&t.setLineDash(i))},e.prototype.onsize=function(t){this.resVI(),this.oLvs.onsize(t),this.updSPR(),d.RUR.Rng()&&!this.cR2&&d.RUR.Listeners.Add("erur",this.cR2=function(){d.RUR.Listeners.Remove("erur",this.cR2),this.onChartResize(),this.cR2=null}.bind(this))},e.prototype.onChartResize=function(){this.dTV().onChange("resize-chart",this)},e.prototype.onZoom=function(){this.resVI(),this.oLvs.onZoom(),this.updSPR()},e.prototype.onDC=function(){this.resNWI(),this.oLvs.isSR()&&(this.lsX++,this.setHSI({pos:this.oLvs.fv2p()}),--this.lsX),this.oT.oOV.gV()==this&&this.oT.invOV(),this.oT.onDC(this)},e.prototype.onSR=function(){this.updSPR()},e.prototype.getHSI=function(){return this.oW.GetSI(!0)},e.prototype.setHSI=function(t){this.oW.SetSI(t)},e.prototype.HS=function(){return this.oW.GetHS()},e.prototype.updSPR=function(){var t;if(this.oW&&(t=this.getHSI())){var e=this.oLvs,o=e.isSR(),i=e.cltW(),n=o&&o.u.w;o||(n=i,i=this.oLvs.getUW()),this.HS().SetDisableNoScroll(o?1:2),i==t.page&&n==t.range||(this.lsX++,this.setHSI({page:i,range:n}),--this.lsX,!this.lI&&this.invAO())}},e.prototype.hsChange=function(t,e){var o,i=this.HS();return(i.lC=i.lC||{l:0,n:0,c:i.onchange}).l++||(this.bU(),i.lC.n=0,i.onchange=function(){i.lC.n++}),o=t&&t.call(e||this,i),--i.lC.l||(i.onchange=i.lC.c,i.lC.n&&i.onchange(),this.eU()),o},e.prototype.scroll=function(t){!this.lsX++&&this.hsChange(function(e){var i,n=this.oLvs,r=n.isSR();if(this.bU(),"x"in t&&r)n.setFV(n.p2fv(t.x));else if("dx"in t){var s=d.Cpy(t.ofV||n.getFV()),h=o(t.nSP);h&&r&&(t.dx=I(t.dx,this.HS().GetMaxRange()-t.nSP)),s.o-=t.dx,n.setFV(n.adjFV(s)),h&&(i=t.nSP+t.dx)}else if("step"in t){var a=~~t.step;if(a){for(var u=0,c=a<0?-1:1,l=Math.abs(a),p=0;p0&&(u-=n.wOf(n.getFVD())),n.setFVD(n.next(n.getFVD(),c)),c<0&&(u+=n.wOf(n.getFVD()));o(t.nSP)&&(i=t.nSP+u)}}else"date"in t&&n.scrollTo(t.date,t.align);o(i)&&(this.setHSI({pos:i}),!r&&i!=this.getHSI().pos&&e.onchange()),this.eU()}),--this.lsX},e.prototype.hsScroll=function(t,e){var o=this,i=o.oLvs,n=i.isSR(),r=o.getHSI().pos;return o.hsChange(function(s){switch(t){case 0:o.scroll({step:n?1:-1,nSP:r});break;case 1:o.scroll({step:n?-1:1,nSP:r});break;case 4:o.osdV=null;break;case 5:!n&&function(t,e){e&&o.scroll({dx:t-e.v,ofV:e.ofV})}(e,o.osdV=o.osdV||function(t){return{ofV:i.getFV(),v:t||0}}(e))}return d.SB.prototype.Scroll.call(s,t,e)})},e.prototype.hsSmthBy=function(t,e,o,i){var n=this,r=o;return n.oLvs.isSR()||(n.osdV=null,!e&&(t*=4),!o&&(o=function(t,e){t.SetPos(e)}),o=function(t,e){r&&r.call(i,t,e),n.hsScroll(5,e)}),d.SB.prototype.smthBy.call(n.HS(),t,e,o,i)},e.prototype.onhscroll=function(t){this.oLvs.isSR()&&this.scroll({x:t}),this.oT.invHL(),this.oT.oOV.gV()==this&&this.oT.invOV()},e.prototype.onvscroll=function(t){var e=this.oHG.isVisible()&&!this.oHG.hV(1)&&this.oHG.oHD;this.resVI(),e&&(this.oHG.oHD=e),this.invHG(1),this.oT.invOV()},e.prototype.getCur=function(){return this.oLvs.getCur()},e.prototype.setCur=function(t){this.oLvs.isDiff(t)&&(this.cwbU(),this.oLvs.setCur(t),this.cweU())},e.prototype.onLL=function(){this.resVB(),this.resNWO(),this.resSDO(),this.oHB.resHVO()},e.prototype.wLL=function(){return this._wLL||(this._wLL=[this,this.oHB,this.oHG])},e.prototype.cltW=function(){var t=0;return this.wLL().forEach(function(e){t=E(t,e.oW&&e.GetPageSize()[0]||0)}),t},e.prototype.resNWO=function(){this.rgNWO=null},e.prototype.getNWO=function(){return this.rgNWO=this.rgNWO||this.oLvs.NWL().VO(0,this.GetPageSize()[1])},e.prototype.resNWI=function(){this.oNWI=null},e.prototype.getNWI=function(){return this.oNWI=this.oNWI||new d.Gantt.NWI(this)},e.prototype.resSDO=function(){this.rgSDO=null},e.prototype.getSDO=function(){return this.rgSDO=this.rgSDO||this.oLvs.SDL().VO(0,this.GetPageSize()[1])},e.prototype.draw=function(t,e,o){var i=this.GetWindowRect();this.cSR(t,i,function(){(function(){this.ctxScale(t,i,function(e){this.drawNW(t,e),this.drawSD(t,e)},this)}).call(this),function(){var o,i=this.getShowLockedItems();i&&(this.drawVI(t,this.getItemsRect(-1),this.getVIT(),this.getVBT(),o=this.toShape("lock-items")),this.drawVI(t,this.getItemsRect(1),this.getVIB(),this.getVBB(),this.toShape("lock-items-bottom")||o),t.selClip(e)),this.drawVI(t,e,this.getVI(),this.getVB()),i&&t.resClip()}.call(this),function(){this.ctxScale(t,i,function(t){},this),this.getDebug()&&this.drawDbg(t,e)}.call(this)},this)},e.prototype.cSR=function(t,e,o,i){var n,r,s=this.oLvs.isSR();s&&(n=this.unscaled(s.u.w))=e[0]&&(i=d.ROf(e))>=t[0])return[n=E(t[0],e[0]),t[1],I(o,i)-n,t[3]]}(e,this.rtVI)),n&=31,32&r&&(e=function(t,e){var o,i,n;if(t&&e&&(o=d.BOf(t))>=e[1]&&(i=d.BOf(e))>=t[1])return[t[0],n=E(t[1],e[1]),t[2],I(o,i)-n]}(e,this.rtVI)),r&=31),e){var s=this.oLvs.getmUW(),h=function(t){var o,i=e.slice(),h=t.width,a=t.height,u=240&n&&1!=(15&n),c=240&r&&1!=(15&r),l=!1;switch(n&=15,r&=15,n-12){case 0:case 2:i[2]0&&(y=I(m,v))}(e.force=y)&&(e.cbkR=function(t){return function(e){t&&t.apply(this,arguments),h.scroll({dx:y*e,ofV:p,nSP:f})}}(e.cbkR)),(e.allowScroll||e.force)&&n.EnsureVisibleClient.call(this,d.C2R(i),e)}}},e.prototype.toEVC=function(t,e){var o,i,n,r=new d.Arr;return t&&t.forEach(function(t){a(t)&&(i=t.se(),o?(o.s=o.s.Min(i.s),o.e=o.e.Max(i.e)):o=i,r.add(t.i()))}),(n=this.dTV().toEVC.call(this,r,e))&&(o.y=n[1],o.h=n[3]),o},e.prototype.EnsureVisibleSelection=function(t){t=t||{},this.EnsureVisibleClient(this.toEVC(t.selection||this.getSel().byO(),t.expandParents),{duration:t.duration})},e.prototype.ondown=function(t){return this.dTV().ondown(t)},e.prototype.dowheel=function(t){var e=this.isSelectable();return e&&this.scroll({step:-d.WhelInc(t),nSP:this.getHSI().pos}),e},e.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&d.PInR(S.X(e),S.Y(e),this.GetClientRect())&&(d.ModK(t)||this.oW&&this.oW.vSBs()[0]==this.oW.oHS)&&this.dowheel(t)},e.prototype.p2X=function(t){var e=this.GetClientRect(),o=S.X(t)-e[0];return this.scaled(o)},e.prototype.x2P=function(t){var e=this.GetClientRect();return t=this.unscaled(t),t+=e[0]},e.prototype.y2P=function(t,e){return this.getItemsRect(e)[1]+this.unscaled(t)},e.prototype.p2UL=function(t,e){var o=this.p2X(t),i=this.oLvs.x2UL(o);return i&&(2&e&&(i.c=p(i,o)),8&e&&(i.r=this.oLvs.d2R(p(i,o),i.s))),i},e.prototype.e2D=function(t){return this.e2W(t)==this.oW&&this.p2D(this.gPtr(t))||null},e.prototype.p2D=function(t){return this.p2UL(t,8).r},e.prototype.d2UL=function(t){return this.oLvs.d2UL(t)},e.prototype.d2X=function(t){return this.oLvs.d2X(t)},e.prototype.fSR=function(){var t,e,o,i=this.oLvs;(t=i.isSR())&&t.u.rgU.length&&t.u.w<(e=this.cltW())&&(this.cwbU(),o=i.nUWo,i.setUW(E(i.getUW(),e/t.u.rgU.length)),i.nUWo=o,this.cweU())},e.prototype.rurCZR=function(t,e,o){var i=this.oLvs.oGC,n=this.e2V(t),r=this.p2CZR(this.gPtr(t),n&&n.p2X&&n);o=o||this,this.dTV().doRUR(t,function(t){switch(t.drag.status){case 0:case 2:case 4:case 5:r.e=t,function(t){t=this.scaled(t||0),this.cwbU(),i.lSyl++,e.call(o,t,r),this.fSR(),i.lSyl--,this.cweU()}.call(this,t.drag.cancel?0:t.drag.offset.dx)}},this)},e.prototype.p2CZR=function(t,e){var o=this.oLvs;return e=e||this,{uS:o.getUS(),uW:o.getUW(),mUW:o.getmUW(),MUW:o.getMUW(),ofV:o.getFV(),x:e.p2X(t),cuL:e.p2UL(t,2)||this.p2UL(t,2)}},e.prototype.dc2vSD=function(t){var e,o;return t&&(o=t.getTime(),this.getSDO().forEach(function(t,i){(!e||Math.abs(o-i.s.getTime())S?1:0}function h(t,e){return!s(t-e)}function a(){return g.d2X(t)+n-g.d2X(i)-e}function u(t,e){f.setUS(e);var o,i=m.reset(t);return function(t,e){return e.showNWM()&(2==e.hsNW()&&e.oNW.isNWU(t))}(i,m)&&(i=m.oNW.nextNWU(m.showNWM(),i)),o=m.next(i),f.Count(i,o)}r=r||{};var c,l,p,f,g,y,v,S=.5,m=this.oLvs,C=!0,L=!!r.cUS,T=!!r.aMP,w=T;if(p=t>i){var G=t;t=i,i=G,G=e,e=n,n=G}if(g=new d.Gantt.SLevels(this),s(c=a()))for(l=c>0,L&&(f=new d.Gantt.SLevels(this),y=new d.Arr(m.visZTo())),v=new d.Arr;C;){C=!1,d.bfn(g.getUW(),E(g.getmUW(),g.getUW()+c),function(t){return g.setUW(t),s(a())},null,S/10);var O,b,U=!L;if(L&&((C=l?!(U=!o(O=this.nZT(y,g.getUS())))&&g.getUW()>=u(i,O)*g.getmUW()&&(b=g.getmUW()):o(O=this.nZT(y,g.getUS(),!0))&&h(g.getUW(),g.getmUW())&&(b=g.getMUW()))?(g.setUS(O),g.setUW(b),c=a(),v.clear()):C=!l&&!h(g.getUW(),g.getmUW())&&s(c=a())),U&&g.setUW(I(g.getUW(),g.getMUW())),C){var B=~~(100*g.getUW())/100;(C=!v.has(B))&&v.add(B)}}if(T||m.getUS()!=g.getUS()||!h(m.getUW(),g.getUW())){this.cwbU(),m.oGC.lSyl++,m.setUS(g.getUS()),m.setUW(g.getUW());var V=(T&=h(g.getUW(),p?l?g.getmUW():g.getMUW():l?g.getMUW():g.getmUW()))?i:t,x=m.reset(V),R=(V-x)/(m.next(x)-x)*m.getUW();w||T||l||!p||(R-=c),m.setFV({d:V,o:(T?n:e)-R}),m.oGC.lSyl--,this.cweU()}},e.prototype.nZT=function(t,e,n){var r=n?t.prev:t.next;if(e=r.call(t,e),n&&o(e)){for(var s=e,h=1,a=this.oLvs.len();o(s)&&h0){for(;a&=o(s=this.nZT(l,r.getUS()));){if(i(h)){c.setUS(s);n(y=r.reset(u),r)&&(y=r.oNW.nextNWU(r.showNWM(),y)),v=r.next(y),h=c.Count(y,v)}(a=r.getUW()>=h*e.mUW)&&(r.setUS(s),r.setUW(r.getUW()/h),h=null)}i(s)&&r.setUW(E(e.mUW,I(e.MUW,r.getUW())))}else{for(var p=e.uW,f=t,g=0;a&=o(s=this.nZT(l,r.getUS(),!0));)if(r.setUW(E(e.mUW,r.getUW()+g)),a=r.getUW()<=e.mUW){if(i(h)){c.setUS(s);var y=c.reset(u),v=c.next(y);c.setUS(r.getUS()),h=c.Count(y,v)}r.setUS(s),r.setUW(e.mUW*h),g=f=p+f-e.mUW,p=r.getUW(),h=null}i(s)&&r.setUW(E(e.mUW,r.getUW()+g))}!function(t,e){var o=e.cuL,i=r.reset(o.c),n=r.next(i),s=(o.c-i)/(n-i)*r.getUW();r.setFV({d:i,o:e.x+t-s})}(t,e)}r.oGC.lSyl--,this.cweU()},e.mRurFrm=d.BiM.Split("select,chart-select,chart-fit,chart-create,chart-link"),e.prototype.onRurDragS=function(t,o){var i=this;return t=t||{},e.mRurFrm.has(t.rurName)&&(t.rurEFOpts=function(t){return function(e,o){o.relative=o.clip=i.GetCanvas(),o.clipClient=i.GetClientRect(),t&&t.apply(this,arguments)}}(t.rurEFOpts)),o.from.oUL=this.p2UL(this.gPtr(o.event),14),t},e.prototype.onRurDragD=function(t,o){if(o.from.oUL){var n=this.getRUR();if(o.to.oUL=this.p2UL(this.gPtr(o.event),14),e.mRurFrm.has(t.rurName)){var r=this.x2P(this.d2X(o.from.oUL.c)),s=this.x2P(this.d2X(o.to.oUL.c));o.frame[0]=I(r,s),o.frame[2]=Math.abs(s-r)}n&&i(n.rSDx)&&(n.rSDx=0)}},e.prototype.rurChartFit=function(t,e){function o(t){t&&i.Smooth(function(){i.Zoom(t.s,t.e)})}var i=this,n=i.dTV(),r=d.Gantt.Levels,s=i.getCur();e.rurOnlyAO={},e.rurEFPaint=n.fitEFPaint(),e.rurDrop=function(t){t.from.oUL&&t.to.oUL&&o({s:r.toDR(t.from.oUL.s,t.to.oUL.s).s,e:r.toDR(t.from.oUL.e,t.to.oUL.e).e})},e.rurStatus=function(t){o(i.oHB.p2UL(i.oHB.gPtr(t)))},e.rurCancel=function(t){i.setCur(s)},n.rurDrag(t,e)},e.prototype.rurChartSelect=function(t,e){var o=this,i=this.oT,n=i.oGC,r=this.dTV(),s=this.e2V(t)||o,h=e.rurFlags&&e.rurFlags.has("item")&&i.allowSelect()&&i.allowSelectByDrag()&&s.ap2I&&s.ar2I,a=n.allowSelect()&&n.allowSelectByDrag()&&s.dy2IB&&s.dyr2IB;if(a||h){var u=!1,c=i.getSel(),l=n.getSel();e.rurEFPaint=r.selEFPaint(),e.rurDrag=function(t){!u&&(u=2==t.event.drag.status)&&(i.oRUR.ao={},o.invAO()),u&&(o.onRurDragD(e,t),h&&function(t){i.select(i.isSingleSel()?s.ap2I(t.to):s.ar2I(S.Rect(t.from,t.to)),{selChange:!1})&&((i.isToggleSel()||i.isToggleCtrlSel()&&2&d.ModK(t.event))&&(i.rgSel=new d.Arr(c).toggle(i.rgSel)).isEmpty()&&(i.rgSel=null),i.feTV("invAO"),i.onSel())}(t),a&&function(t){function e(t){return{d:t.oUL.c,y:t.y}}n.select(n.isSingleSel()?s.dy2IB(e(t.to)):s.dyr2IB(e(t.from),e(t.to)),{selChange:!1})&&((n.isToggleSel()||n.isToggleCtrlSel()&&2&d.ModK(t.event))&&(n.rgSel=new d.Arr(l).toggle(n.rgSel)).isEmpty()&&(n.rgSel=null),i.feGV("invAO"),n.onSel())}(t))},e.rurCancel=function(t){h&&i.SetSelection(c),a&&n.SetSelection(l)},r.rurDrag(t,e)}},e.prototype.ib2R=function(t,e){var o=this.getVBT().get(t)||this.getVBB().get(t)||this.getVB().get(t),i=4&e;return!o&&1&e&&function(){if(t){var n=t.i(),r=n.isLocked(),s=(r?r<0?this.getLIVT():this.getLIVB():this.getLIV()).i2R(n,(i||8&e)&&!r&&this.origin());s&&(o=this.rtI2IB(t,s))}}.call(this),o&&(2&e&&function(){var e=t&&t.getShape();e&&e.client&&(o=d.E.EvalCE(o,e.client))}.call(this),i&&function(){var e=t.i().isLocked(),i=this.x2P(o[0]),n=this.y2P(o[1],e);o=[i,n,this.x2P(d.ROf(o))-i,this.y2P(d.BOf(o),e)-n]}.call(this)),o},e.prototype.i2R=function(t,e){var o=this.getVIT().get(t)||this.getVIB().get(t)||this.getVI().get(t),i=4&e;return 1&e&&(!o||!i)&&function(){if(t){var e=t.isLocked(),n=e?e<0?this.getLIVT():this.getLIVB():this.getLIV();(o=n.i2R(t,i&&!e&&this.origin()))[2]=this.oLvs.cltW()}}.call(this),o&&i&&function(){var e=t.isLocked(),i=this.x2P(o[0]),n=this.y2P(o[1],e);o=[i,n,this.x2P(d.ROf(o))-i,this.y2P(d.BOf(o),e)-n]}.call(this),o},e.prototype.dNearD=function(t,e,o){return Math.abs(this.d2X(t)-this.d2X(e))<(o||d.Def.HT.inflate[0])},e.prototype.dInIB=function(t,e){var o=e.se(),i=t.Compare(o.s)>=0&&t.Compare(o.e)<0;return i||o.s.Compare(o.e)||(i=this.dNearD(t,o.s)),i},e.prototype.dy2IB=function(t){var e,o=this.ap2I(t);return o&&o.oIB&&(e=o.oIB.rforEachU(function(e){return this.dInIB(t.d,e)&&function(t,e){var o=this.ib2R(e,3);return t>=d.TOf(o)&&t0)&&!(d.BOf(e=i.ib2R(t,3))c)&&o.push(t)})}),o},e.prototype.p2Abs=function(t,e){e=e||this.getItemsRect();return{x:this.scaled(S.X(t)-(e[0]+0)),y:this.scaled(S.Y(t)-e[1])}},e.prototype.e2IB=function(t){return this.e2W(t)==this.oW&&this.p2IB(this.gPtr(t))||null},e.prototype.p2IB=function(t){return this.p2IBl(t,{lz:0})},e.prototype.e2IBl=function(t){return this.e2W(t)==this.oW&&this.p2IBl(this.gPtr(t))||null},e.prototype.p2IBl=function(t,e){e=e||{};var o=this.p2TB(t);if(G(e.lz,o)==o){var i,n=this.getVBl(o),r=this.p2Abs(t,this.getItemsRect(o)),s=e.cbk||function(t){return t},h=e.thisArg||this,a=e.inf||[0,0];return n.rforEachU(function(t,e){return(i=e.getShape())&&i.client&&(t=d.E.EvalCE(t,i.client)),d.PInR(r.x,r.y,t,a[0],a[1])&&s.call(h,e,t,r)})}},e.prototype.p2IBR=function(t){return this.p2IBRl(t,{lz:0})},e.prototype.p2IBRl=function(t,e){function o(o){var i;return this.p2IBl(t,{lz:e&&e.lz,inf:o,cbk:function(t,e,n){var r=t.getCanResize(),s=d.HitTest.Rect(n.x,n.y,e,o);return(1&s&&1&r||4&s&&2&r)&&(i={ib:t,ht:5&s}),d.PInR(n.x,n.y,e)}}),i}var i,n=d.Def.HT.inflate,r=this.isClkAble()&&this.gAA().Has("chart-move")&&o.call(this,n);return r&&r.ib.canMove()&&(i=this.ib2R(r.ib))&&i[2]<12&&(r=o.call(this,[n[0],n[1],0,0])),r||null},e.prototype.p2IBP=function(t){return this.p2IBPl(t,{lz:0})},e.prototype.p2IBPl=function(t,e){return this.isClkAble()&&(this.gAA().Has("chart-move")||this.gAA().Has("chart-percent"))&&this.p2IBl(t,{lz:e&&e.lz,cbk:function(t,e,o){var i,n,r,s=t.grP();return e=t.rt4P(e),s&&s.p2x&&(n=s.p2x(t.getPercent(),e[2])+e[0])>=(r=S.X(o))-(i=d.Def.HT.inflate[0])&&n0||n.e.Compare(u)<0||!(i=this.rtI2IB(o,t))||(d.ORt(i,0,o.getOffset()),(i=d.NRt(i,r))&&(h.set(o,i),p&&e.push(o)))},this),p&&l.O(e).forEach(function(t,e){d.ORt(h.get(e),0,t)}),s&&(o=s.get(i))&&o.forEach(function(t,e){var o=h.get(e);o&&d.ORt(o,0,t)}))},this),h},e.prototype.getVB=function(){return this.rgVB||(this.rgVB=this.vbOf(this.getVI()))},e.prototype.getVBT=function(){return this.rgVBT||(this.rgVBT=this.vbOf(this.getVIT()))},e.prototype.getVBB=function(){return this.rgVBB||(this.rgVBB=this.vbOf(this.getVIB()))},e.prototype.getVBl=function(t){return t?t<0?this.getVBT():this.getVBB():this.getVB()},e.prototype.getVL=function(){return this.rgVL||(this.rgVL=function(){function t(t){var e=h.get(t);return!h.has(t)&&h.set(t,e=this.ib2R(t,i)),e}var e,o,i=11,n=new d.M1,r=this.GetPageSize(),s=[0,0,r[0],r[1]],h=new Map;return this.getShowLinks()&&this.gC().oGL.forEach(function(i){i.getVisible()&&!i.oF.GetParent().isLocked()&&!i.oT.GetParent().isLocked()&&(e=t.call(this,i.oF))&&(o=t.call(this,i.oT))&&d.NRt(s,d.URt(e,o))&&n.set(i,{s:e,e:o})},this),n}.call(this))},e.prototype.toClick=function(t,e){var o=this.gPtr(t),i=this.p2UL(o,8);e.bar=this.p2IBl(o),e.link=this.p2L(o),e.item=this.p2Il(o),i&&(e.start=i.s,e.end=i.e,e.date=i.r)},e.prototype.hideTT=function(){d.TT.Hide()},e.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2IBl(o,{inf:d.Def.HT.inflate}),n=16;d.TT.Show(function(){return i&&(e=i.tt(this))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=d.NRt(e.rtT,this.GetWindowRect())||e.rtT,r=[0,0,this.getToolTipWidth(),t.fontHeight()],s=e.oExT.draw(i,t,r,1024|n);return[o[0],o[1],~~(s.width+1),~~(s.height+1)]},this)}.call(this),alwaysPaint:!0,onpaint:function(t,o){this.ctxLoc(function(t){e.oExT.draw(i,t,o,n)},this,t)},thisArg:this}},{ttO:i,ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay(),thisArg:this})},e.prototype.onio=function(t){this.allowTT()&&this.hideTT(),this.getDrawDateTicker()&&this.hideDTH(event)},e.prototype.getCursor=function(t){var e,o,i=this.getCursors();return(e=this.p2A(t))?o=d.GP.Get("anchor",i):(e=this.p2IBPl(t))?o=d.GP.Get(e.getType("percent-resize"),i):(e=this.p2IBRl(t))?o=d.HitTest.Cursor.Rect(e.ht):(e=this.p2IBMl(t))&&(o=d.GP.Get(e.getType(),i)),o||null},e.prototype.onmousemove=function(t){var e,o=this.gPtr(t),i=this.getCursor(o);return i&&(e=this.GetCanvas())&&(e.style.cursor=i),this.allowTT()&&this.showTT(t),this.getDrawDateTicker()&&this.showDTH(t),i},e.prototype.bRUR=function(t){return(this.gAA().Has("chart-zoom")||this.gAA().Has("chart-resize"))&&this.exZ(t),t.drag.extra},e.prototype.eRUR=function(t){this.getDrawDateTicker()&&this.showDTH(t)},e.prototype.exZ=function(t){var e,o,i,n,r=this.getRUR();t.drag.extra&&(e=t.drag.extra[0])?(n=r.oZ2=r.oZ2||{p:o=this.p2UL(t.drag.current,2).c,xP:this.d2X(o),cP:t.drag.current,s:i=this.p2UL(e.current,2).c,xS:this.d2X(i),cS:e.current},this.z2(n.p,n.xP+t.drag.current.x-n.cP.x,n.s,n.xS+e.current.x-n.cS.x,{cUS:this.gAA().Has("chart-zoom")}),r.dRSD=!0):r.oZ2=null},e.prototype.showDTL=function(t,e){function o(t){return s.ctxLoc(function(e){return t.l.size(t,e,l)})}function i(t){return d.EF.Create({name:t,class:d.Def.CN.ttEF+" exdatelabel",fit:d.pgrt(),relative:p.GetCanvas(),limitClient:!1,alwaysPaint:!0,visible:!1,onpaint:function(t,e){s.ctxLoc(function(t){this.oDRL&&this.oDRL.l.draw(this.oDRL,t,e,l)},this,t)}})}function n(e,o){e.oDRL={d:o,r:t,l:y.Get(a)}}function r(t,i,n){var r,h,u,l,f,g,y=o(t.oDRL),v=t==s.oDTL.s,m=a&&y.width&&y.height,L=c;m&&(h=d.IBox([0,0,0,0],t.oHE,1,1),u=d.IBox([0,0,0,0],t.oHE,1,2),r=d.IBox([0,0,0,0],t.oHE,1,4),t.GetRelative()!=p.GetCanvas()&&t.SetRelative(p.GetCanvas()),l=s.GetClientRect(),d.IRt(l,2*h[0]+u[0]+r[0]+u[0]-L,0),v?l[2]-=o(s.oDTL.e.oDRL).width+L:(g=o(s.oDTL.s.oDRL).width+L,l[0]+=g,l[2]-=g),f=d.IRt(e.slice(),L,0),f=S.C2R(S.R2C(f,i),~~(y.width+1),y.height,n),d.FRt(f,l),d.NRt(C,d.IRt(f.slice(),-L-1,0))&&(L-=u[1]+r[1],d.ORt(f,0,S.R2C(C)[1]S.R2C(this.oGV.GetClientRect())[1]},t.prototype.resHVO=function(){this.rgHVO=null},t.prototype.getHVO=function(){return this.rgHVO=this.rgHVO||function(){var t=new d.M1,e=this.oGV.oLvs,o=this.getLH();if(o&&e.getUW()){var i,n=o*(this.oGV.oT.nHLC-this.gC().GetLevelCount());e.vForEach(function(e){(i=e.UL().VO(n,o)).client=i.union(),t.set(e,i),n+=o})}return t}.call(this)},t.prototype.onsize=function(t){this.oGV.oLvs.onsize(t)},t.prototype.onZoom=function(){this.oGV.oLvs.onZoom()},t.prototype.onRurScrollD=function(t){this.oGV.onRurScrollD(t),t.dy=0},t.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&d.PInR(S.X(e),S.Y(e),this.GetClientRect())&&this.dowheel(t)},t.prototype.ondown=function(t){return this.oGV.ondown(t)},t.prototype.toClick=function(t,e){var o=this.p2UL(this.gPtr(t),8);o&&(e.level=o.l,e.start=o.s,e.end=o.e,e.date=o.r)},t.prototype.onclick=function(t){this.gC().getAllowSelectDate()&&function(){var e=t.uiEvent,o=this.sD(),i=this.gPtr(e),n=this.p2UL(i),r=d.ModK(e);this.oGV.cwbU(),o.select(n,{selType:(o.isShiftSel()&&1&r?1:0)|(o.isToggleSel()||o.isToggleCtrlSel()&&2&r?2:0)}),this.oGV.cweU()}.call(this)},t.prototype.onio=function(t){this.allowTT()&&this.hideTT()},t.prototype.onmousemove=function(t){this.allowTT()&&this.showTT(t)},t.prototype.tt=function(t){var e,o;return t&&t.l&&(e=t.l.getToolTip())&&{t:e,d:t.s,rtT:d.ORt(o=[this.x2P(t.x),this.y2P(t.y),this.unscaled(t.w),this.unscaled(t.h)],0,o[3]+2)}},t.prototype.hideTT=function(){d.TT.Hide()},t.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2UL(o),n=16;d.TT.Show(function(){return i&&(e=this.tt(i))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=d.NRt(e.rtT,this.GetWindowRect())||e.rtT,i=[0,0,this.getToolTipWidth(),t.fontHeight()],r=t.drawHTMLDate(e.t,e.d,i,1024|n);return[o[0],o[1],~~(r.width+1),r.height]},this)}.call(this),onpaint:function(t,o){this.ctxLoc(function(t){t.drawHTMLDate(e.t,e.d,o,n)},this,t)},thisArg:this}},{thisArg:this,ttO:i&&i.s&&i.l.index()+" "+i.s.toString(),ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay()})},{Header:t}}()),d.Mrg(d.Gantt,function(){function t(){this.init()}function e(t){this.init(t)}function n(t){this.init(t)}function r(t){this.init(t.oT.oGC,t)}function s(t,e){this.init(t,e)}return t.prototype.init=function(){this.mC=new Map},t.prototype.Get=function(t,e){function o(e){var o,i=t?function(e){return t.sizeHTMLText(e).width}:function(t){return t.length};return e.forEach(function(t,e){var n=i(t);(!o||o.s",this.aS="<|>",this.mC=new Map,this.wM=null,this.oLD=new t},e.prototype.Split=function(t,e){var o=this.mC.get(t=b(t));return!o&&this.mC.set(t,o=function(t){var o,n,r={rgL:[]},s=t.split(this.s),h=s.length;return h>0&&s[0].split(this.aS).forEach(function(t){r.rgL.push(o={l:t,u:d.HF.Date.Unit(d.H.GetEF(t)),w:e&&e.sizeHTMLDate(t,this.oLD.Get(e)).width||0}),o.u&&(n=i(n)?o.u:I(n,o.u))},this),r.uL=~~n,r.rgL.sort(function(t,e){return t.w-e.w}),h>1&&(s[1].length&&(r.c=E(1,~~s[1])),h>2&&d.IsN(s[2])&&d.f2S(~~s[2],d.UnitEnum)&&(r.u=~~s[2])),r}.call(this,t)),o},e.prototype.Fit=function(t,e){var o,i="",n=this.mC.get(t);if(n&&(i=n.rgL[0].l,(o=n.rgL.length)>1))for(var r=!0,s=1;r&&s=0&&(o=d.setM(t))in e&&(i=d.getM(t))in e&&(n=e[i](),this.oGC.oT.feGV(function(t){t.oLvs!=s&&(r=t.oLvs.at(h))&&r[o](n)}))}--this.oGC.lSyl},n.prototype.synv=function(t,e){if(!this.oGC.lSyv++){var o=this;this.oGC.oT.feGV(function(i){i.oLvs!=o&&i.oLvs[t](e)})}--this.oGC.lSyv},n.prototype.getLC=function(){return this.len()},n.prototype.setLC=function(t){(t=E(1,~~t))!=this.getLC()&&this.onRL(function(){this.removeAt(t,this.getLC()-t);for(var e,o,i=this.visLb(this.getUS()),n=this.getLC();n=0&&e.SetLabel(i[o])})},n.prototype.getUS=function(){var t=this.u;return i(t)&&(void 0===t?t=this.oGC.opt("unitScale",d.UnitEnum.exDay):(t=0,this.forEach(function(e){t=E(t,e.GetUnit())})),this.u=~~t),t},n.prototype.setUS=function(t){this.onRL(function(){var e,o=this.visLb(t);this.rgLvl.forEach(function(t,i){e=o.length-1-i,t.SetLabel(e>=0?o[e]:null)}),this.u=null})},n.prototype.onLb=function(){this.onRL(function(){this.forEach(function(t){t.SetLabel(t.getUnit())})})},n.prototype.onRL=function(t,e){this.lC++,t&&t.call(e||this),!--this.lC&&function(){this.ofV=null,this.olfV.l||(this.u=null,this.orU=null,this.obL=null,this.osR=void 0),this.resLL()}.call(this)},n.prototype.vForEach=function(t,e){e=e||this;for(var o,i=this.isReverse(),n=this.len(),r=0,s=i?0:n-1,h=i?1:-1;!o&&r=e.exDay&&(t|=e.exDay,o>e.exDay&&(t|=e.exHour)),t},n.prototype.hideNWM=function(){return this.oNW.getR().hideNWU&&this.NWM()||0},n.prototype.showNWM=function(){return!this.oNW.getR().hideNWU&&this.NWM()||0},n.prototype.hsNW=function(){return this.hideNWM()?1:this.showNWM()&&this.getUNW()?2:0},n.prototype.reset=function(t){t=this.getBL().reset(t);var e=this.hideNWM();if(e)for(var o;o=this.oNW.isNWU(t)&e;)t.Reset(o),t.Next(o);return t},n.prototype.next=function(t,e){function o(t){return u.call(t,a)}var i=t.copy();if(e=G(e,1))for(var n=Math.sign(e),r=this.getBL(),s=this.oNW,h=r.getUnit(),a=n*r.getCount(),u=i.CbkN(h),c=this.hideNWM(),l=this.getUNW()<0&&this.showNWM()||0,p=n>0?function(t,e){s.nextNWU(t,e)}:function(t,e){for(var o,i,n=d.UnitEnum.exDay,r=d.UnitEnum.exHour;t&(i=s.isNWU(e));)i&n?(o=n,e.Reset(n),u.call(e,a)):i&r&&(o=r,e.Reset(r),e.PrevHour());o&&(e.Next(o),u.call(e,a))},f=n*e,g=0;ge&&(r-=Math.sign(r)*e,s=s.copy().Next(this.getUS(),-r),t.o-=r*i)),t.o>0){for(;t.o>(o=this.wOf(s=this.prev(s)));)t.o-=o;t.o-=o}else for(;t.o<=-(o=this.wOf(s));)s=this.next(s),t.o+=o;t.d=s}return this.ioSR(t.d,!0)&&(t.d=this.limSR(t.d),t.o=0),t},n.prototype.onFV=function(t,e){this.olfV.l++||(this.olfV.d=Date.Create(this.fvd)),t instanceof Function?t.call(e||this):("d"in t&&(this.fvd=t.d),"o"in t&&(this.fvo=this.ioSR(Date.Create(this.fvd),!0)?E(t.o,0):t.o)),!--this.olfV.l&&this.olfV.d.Compare(Date.Create(this.fvd))&&this.oGV.onDC()},n.prototype.getFV=function(){return this.ofV||(this.ofV=function(){var t=this.limSR(Date.Create(this.fvd)),e={d:this.reset(t),o:w(this.fvo)},o=0!=e.o;return this.adjFV(e),o&&this.onFV(e),e}.call(this))},n.prototype.setFV=function(t){this.onFV(function(){this.onRL(function(){this.oGV.resNWI(),this.ofV=null,this.onFV({d:Date.Create(t.d),o:t.o})})})},n.prototype.getFVD=function(){return this.getFV().d},n.prototype.setFVD=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({d:t,o:0})})})},n.prototype.getFVO=function(){return this.getFV().o},n.prototype.setFVO=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({o:t})})})},n.prototype.getCur=function(){return{ofV:this.getFV(),uS:this.getUS(),uW:this.getUW(),uNW:this.getUNW()}},n.prototype.setCur=function(t){this.isDiff(t)&&this.onRL(function(){this.oGC.lSyl++,t.ofV&&this.setFV(t.ofV),o(t.uS)&&this.setUS(t.uS),o(t.uW)&&this.setUW(t.uW),o(t.uNW)&&this.setUNW(t.uNW),--this.oGC.lSyl})},n.prototype.isDiff=function(t){return t&&t.ofV&&(t.ofV.d.Compare(this.getFV().d)||t.ofV.o!=this.getFV().o)||o(t.uS)&&t.uS!=this.getUS()||o(t.uW)&&t.uW!=this.getUW()||o(t.uNW)&&t.uNW!=this.getUNW()},n.prototype.getBL=function(){return this.obL||(this.obL=function(){var t,e=this.getUS();return this.forEach(function(o){e==o.getUnit()&&(!t||o.getCount()=0}),r=l/(1+n);if(2==u.hsNW()){for(var s=0,h=0,a=0;a<=n;a++)c.isNWU(i[a].s)?++h:++s;s&&(r=(l-h*Math.abs(f))/s)}return{uS:u.getUS(),uW:r}}}var i;if(l){for(n=y.length-1;!i&&n>=0;n--)i=o(y[n]);if(i&&i.uW>=l){var n;(n=d.bin(y.length,function(t){return i.uS>=y[t]}))+10&&(t=e.l)),t},n.prototype.ioSR=function(t,e){var o=this.isSR();return e?o&&(t.Compare(o.f)<0||t.Compare(o.l)>=0):!(o&&(t.Compare(o.f)<0||t.Compare(o.e)>0))},n.prototype.resSR=function(){this.osR&&(this.ofV=null,this.osR.l=null)},n.prototype.getrUS=function(){return this.getrU().s},n.prototype.setrUS=function(t){this.onRL(function(){this.orU=null,this.rus=t,this.synv("setrUS",t)})},n.prototype.getrUC=function(){return this.getrU().c},n.prototype.setrUC=function(t){this.onRL(function(){this.orU=null,this.ruc=t,this.synv("setrUC",t)})},n.prototype.getrU=function(){if(!this.orU){this.orU={s:this.getUS(),c:this.getBL().getCount()},o(this.rus)&&this.rus>this.orU.s&&(this.orU.s=this.rus),o(this.ruc)&&this.orU.s>this.getUS()&&(this.orU.c=E(1,~~this.ruc));var t=Date.Date(0);this.orU.m=t.copy().Next(this.orU.s,this.orU.c)-t}return this.orU},n.prototype.d2R=function(t,e){var o,i=this.getrU();return(t=t.copy()).Reset(i.s),e&&i.c>1&&(o=t.copy().Next(i.s,i.c)-t,t=e.copy().add(~~((t-e)/o)*o)),t},n.prototype.fv2p=function(t){var e=0,o=this.isSR();if(o){var i=(t=t||this.getFV()).d.getTime(),n=o.u.rgU;e=n[d.bin(n.length,function(t){return i>=n[t].t})].x-t.o}return e},n.prototype.p2fv=function(t){var e=d.Cpy(this.getFV()),o=this.isSR();if(o){t=t||0;var i=o.u.rgU,n=i[d.bin(i.length,function(e){return t>=i[e].x})];e.d=new Date(n.t),e.o=n.x-t}return e},n.prototype.LL=function(){return this.oLL||(this.oLL=new d.Gantt.LL(this))},n.prototype.NWL=function(){return this.oNWL||(this.oNWL=new d.Gantt.NWL(this))},n.prototype.SDL=function(){return this.oSDL||(this.oSDL=new d.Gantt.SDL(this))},n.prototype.fitLL=function(t,e,o){return e.x+e.w1){var i=d.UnitEnum,n=t.GetUnit(e);switch(e){case i.exWeek:case i.exMonth:n--;break;case i.exDay:n=t.GetWeekDay()-1}t.Prev(e,n%o)}return t},s.prototype.next=function(t,e){return t=t.copy(),(e=G(e,1))&&t.Next(this.getUnit(),e*this.getCount()),t},s.prototype.index=function(){return this.oLvs.indexOf(this)},s.prototype.GetOptions=function(){return this.oO},s.prototype.SetOptions=function(t){function e(e){if(void 0!==t[e]){var o=d.setM(e);o in this&&this[o].call(this,t[e])}}if(t){this.bU(),e.call(this,"label");for(var o in t)"label"!=o&&e.call(this,o);this.eU()}},s.prototype.GetLabel=function(){return this.oO.label},s.prototype.SetLabel=function(t){var e,n=null,r=null,s=this.oLvs.oGV,h=this.oLvs.oGC.oAL,a=this.oO;this.bU(),this.onRL(function(){o(t)&&(d.IsS(t)?t=b(t):d.IsN(t)?(r=t,i(t=this.oLvs.oGC.mLb.get(t))&&(t=null,r=null)):(o(t.c)&&(n=t.c),o(t.u)&&(r=t.u),o(t.l)&&(t=t.l))),o(t)&&s.ctxTfi(function(i){s.locale(function(){o((e=h.Split(t,i)).uL)&&(r=e.uL),o(e.u)&&(r=e.u),o(e.c)&&(n=e.c)})}),(i(t)||o(r))&&(a.unit=r),(i(t)||o(n))&&(a.count=n),a.label=t,this.synl("label")},this),this.eU()},s.prototype.getLabel=function(){return b(this.GetLabel())},s.prototype.GetUnit=function(){return this.oO.unit},s.prototype.SetUnit=function(t){this.bU(),this.onRL(function(){this.oO.unit=t,this.synl("unit")}),this.eU()},s.prototype.getUnit=function(){return~~this.GetUnit()},s.prototype.getUnitEq=function(){var t=this.getCount(),e=this.getUnit(),o=d.UnitEnum;switch(e){case o.exHour:24==t&&(e=o.exDay);break;case o.exMinute:60==t?e=o.exHour:1440==t&&(e=o.exDay);break;case o.exSecond:60==t?e=o.exMinute:3600==t?e=o.exHour:86400==t&&(e=o.exDay)}return e},s.prototype.GetCount=function(){return this.oO.count},s.prototype.SetCount=function(t){this.bU(),this.onRL(function(){this.oO.count=t,this.synl("count")}),this.eU()},s.prototype.getCount=function(){return E(1,~~this.GetCount())},s.prototype.GetAlign=function(){return this.oO.align},s.prototype.SetAlign=function(t){this.bU(),this.onRL(function(){this.oO.align=t,this.synl("align")}),this.eU()},s.prototype.getAlign=function(){return G(this.GetAlign(),16|(this.oLvs.isZ(this)?5:4))},s.prototype.GetShape=function(){return this.oO.shape},s.prototype.SetShape=function(t){this.bU(),this.oO.shape=d.S.A2S(t),this.synl("shape"),this.eU()},s.prototype.getShape=function(){return this.oLvs.oGV.toShape(this)||null},s.prototype.shape=function(t,e,o,i){var n=d.Tree.bSCTX(t,this.getShape(),e);o.call(i||this),n&&d.Tree.eSCTX(t,n)},s.prototype.GetDrawGridLines=function(){return this.oO.drawGridLines},s.prototype.SetDrawGridLines=function(t){this.bU(),this.oO.drawGridLines=t,this.synl("drawGridLines"),this.eU()},s.prototype.getDrawGridLines=function(){var t=this.GetDrawGridLines();if(i(t)){var e=1;(this.oLvs.len()<2||this.oLvs.at(e).isEmpty())&&(e=0),t=e==this.index()}return t},s.prototype.vGL=function(t,e,o){function i(e,o,i){t.moveTo(e,o),t.lineTo(e,i)}var n,r=this.UL(),s=r.x,h=e,a=e+o;r.length&&(r.forEach(function(t){i(s+t.x,h,a)}),i(s+((n=r[r.length-1]).x+n.w),h,a))},s.prototype.GetDrawTickLines=function(){return this.oO.drawTickLines},s.prototype.SetDrawTickLines=function(t){this.bU(),this.oO.drawTickLines=t,this.synl("drawTickLines"),this.eU()},s.prototype.getDrawTickLines=function(){return G(this.GetDrawTickLines(),-1)},s.prototype.GetDrawTickLinesFrom=function(){return this.oO.drawTickLinesFrom},s.prototype.SetDrawTickLinesFrom=function(t){this.bU(),this.oO.drawTickLinesFrom=t,this.synl("drawTickLinesFrom"),this.eU()},s.prototype.getDrawTickLinesFrom=function(){var t,e=this.GetDrawTickLinesFrom();if(e&&(e=b(e).trim())){var o,i,n=e.split(",");n.length>1&&(o=this.oLvs.at(this.oLvs.len()-(1+~~n[0])))&&(i=~~n[1])&&(t={l:o,t:i})}return t},s.prototype.drawTL=function(t,e,o){function i(t,e,o,i){function n(e,o,n){if(-1!=i)for(var r=d.Gantt.LevelLineEnum,s=1+((3840&i)>>8),a=0;a=this[e].x},this)]);return e&&(e.x+=this.x,e.o&&(e.o.x+=this.x)),e},t.prototype.d2UL=function(t){var e=d.Cpy(this[d.bin(this.length,function(e){return t.Compare(this[e].s)>=0},this)]);return e&&(e.oX=this.x),e},t.prototype.d2X=function(t){var e=this.x,o=this[d.bin(this.length,function(e){return t.Compare(this[e].s)>=0},this)];return o&&(e+=f(o).x+(t-o.s)/(o.e-o.s)*f(o).w),e},t.prototype.VO=function(t,e){var o=new d.M1,i=this.x;return this.forEach(function(n){o.push(n.s,[i+n.x,t,n.w,e])}),o},e.prototype.init=function(e){function o(){function t(t){if(t.length&&240&t.oLv.getAlign()){var e=t[0],o=t[t.length-1],i=t.x+e.x;e.o={x:e.x,w:e.w},o.o={x:o.x,w:o.w},e.w+=i,e.x-=i,o.w-=E(0,t.x+o.x+o.w-a)}}var e,o=this.oLvs,i=o.oGC.oNW,n=o.oGC,r=o.getBL(),s=o.getUW(),h=o.getUNW(),a=o.cltW(),u=o.showNWM(),c=n.oAL.max(),l=this.get(r),p=o.isSR();s&&r&&(!function(t){function e(t){return t.copy().Next(c,l)}function n(i){return t.push(s,i,e(i)),o.next(i)}var c=r.getUnit(),l=r.getCount(),p=o.getFVD().copy(),f=u&&h?function(r){if(u&i.isNWU(r)){var s=t.mW;return h<0?t.push(-h,r.copy(),r=o.next(r)):(t.push(h,r,e(r)),r=o.next(r)),t.mW=s,r}return n(r)}:n;for(t.x=o.getFVO();o.fitLL(p,t,a);)p=f(p);t.onC()}(l),l.length&&(p&&o.next(l.e()).Compare(p.e)>=0&&(e=l.l()),o.len()>1&&o.forEach(function(i){if(!i.isEmpty()){var r=this.get(i);r!=l&&(!function(t,i){if(t!=i){var r=t.oLv,h=i.s(),a=r.reset(h),u=r.next(a);o.hsNW()||n.getAdjustLevelsToBase()?function(){function n(t,e,i){var n=t.Compare(e)<0,r=n?e:t,h=n?t:e,a=0;for(i&&(h=o.next(h));h.Compare(r)<0&&a0?l+=e.w:(l&&t.push(l,a,u),l=e.w,a=u,u=r.next(u))}),(l+=n(i.e(),e?e.Min(u):u,!0))&&t.push(l,a,u)}():function(){function o(t){return s*(t-h)}var n,s=i.r(),l=i.l();for(n=t.x=E(-c,o(a));a.Compare(l)<0;)t.push(o(e?e.Min(u):u)-n,a,u),n=t.x+t.w,a=u,u=r.next(u)}(),t.x+=i.x,t.onC()}}(r,l),t(r))}},this),t(l)))}this.oLvs=e,this.mUL=function(){var o=new Map;return e.forEach(function(e){o.set(e,new t(e))}),o}.call(this),o.call(this)},e.prototype.get=function(t){return this.mUL.get(t)},s.prototype.init=function(t){function e(e){return t.opt(e,null)}this.oGC=t,this.d=e("nonworkingDays"),this.bD=e("showNonworkingDays"),this.h=e("nonworkingHours"),this.bH=e("showNonworkingHours"),this.bU=e("showNonworkingUnits")},s.prototype.XC=function(){this.oR=null},s.prototype.getR=function(){var t=function(){var t=this.d;return i(t)&&this.oGC.locale(function(){t=0;var e=d.Loc.Get().weekend;if(e)for(var o=0;o=0;i--)o=t.call(e,this[i]);return o},h.prototype.copy=function(t){var e;e={};for(var o in t)e[o]=t[o];return e},h.prototype.x2ZL=function(t){return t-=this.x,this.rForEachU(function(e){if(t>=e.x&&t=0&&t.Compare(e.e)<0)return(e=d.Cpy(e)).x+=this.x,e})},h.prototype.x2rgZL=function(t){var e=[];return t-=this.x,this.rForEachU(function(o){t>=o.x&&t=0&&t.Compare(o.e)<0&&((o=this.copy(o)).x+=this.x,e.push(o))}),e},Object.addPrototypeOf(a.prototype,h.prototype),a.prototype.init=function(t){return function(e){t.apply(this,arguments);var o=e.showNWM();if(o){var i,n=this,r=e.oNW,s=r.getR(),h=e.getBL().UL(),a=(s.bD?4096:0)|(s.bH?65536:0);a&&e.feD(4096==o?4096:65536,function(t){if((i=r.isNWU(t))&o&&i&a)return function(t,e){var o=h.d2X(t);n.push(o,h.d2X(e)-o,t,e.copy())}(t.copy(),r.nextNWU(o,t)),!0})}}}(a.prototype.init),Object.addPrototypeOf(u.prototype,d.M1.prototype),u.prototype.init=function(t){return function(e){function o(t,e){var o;(t.zl=t.zl||new h).push(o=i.d2X(e.s),i.d2X(e.e)-o,e.s,e.e)}var i=e.oLvs,n=i.showNWM(),r=[],s=new Map;t.call(this),[e.getVIT(),e.getVI(),e.getVIB()].forEach(function(t){t.forEach(function(t,e){if(e.getNonworkingUnits()){var o=function(t,e){var o=d.E.Create(t.getNonworkingUnits(),"value");return{i:t,c:e,e:o.IsValid()&&o||null}}(e,t);e.getNonworkingUnits()&&this.push(e,o),o.e&&r.push(o)}},this)},this),n&&r.length&&i.feD(4096==n?4096:65536,function(t){r.forEach(function(e){var i=s.get(e);e.e.Evaluate(function(){return t})?(!i&&s.set(e,i={}),i.s=i.s||t.copy(),i.e=t):i&&(i.e=t,o(e,i),s.delete(e))})}),s.forEach(function(t,e){o(e,t)}),r.forEach(function(t){t.zl&&(t.vo=t.zl.VO(t.c[1],t.c[3]))})}}(u.prototype.init),u.prototype.draw=function(t,e,o){this.forEach(function(e){e.vo&&e.vo.forEach(function(e){t.drawShape(e,o)})})},u.prototype.clip=function(t,e){t.selClip(e),this.forEach(function(e){t.rect.apply(t,e.c)}),t.clip("evenodd")},Object.addPrototypeOf(c.prototype,h.prototype),c.prototype.init=function(t){return function(e){t.apply(this,arguments);var o=e.getBL().UL(),i=this,n=o.f(),r=o.l();e.oGC.oSD.zO().forEachU(function(t){var e=t.s.Compare(r)<0;return e&&t.e.Compare(n)>=0&&function(t){var e=t.s,n=t.e,r=o.d2X(e);i.push(r,o.d2X(n)-r,e,n.copy()).o=t}(t),!e})}}(c.prototype.init),c.prototype.x2SD=function(t){var e=this.x2ZL(t);return e&&e.o},c.prototype.x2rgSD=function(t){var e=[];return this.x2rgZL(t).forEach(function(t){e.push(t.o)}),e},Object.addPrototypeOf(l.prototype,d.KAr.prototype),l.prototype.init=function(t){return function(e){t.call(this),this.oGC=e}}(l.prototype.init),l.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.bzO=!1,this.oGC.resSD()}}(l.prototype.onChange),l.prototype.K=function(t,e){return t.s.getTime()+"."+t.e.getTime()},l.prototype.toE=function(t){return this.k2E(this.getK(t))||t},l.prototype.indexOf=function(t){return function(e){return t.call(this,this.toE(e))}}(l.prototype.indexOf),l.prototype.remove=function(t){return function(e){return t.call(this,this.toE(e))}}(l.prototype.remove),l.prototype.zO=function(){return this.bzO||(this.bzO=!!this.sort(function(t,e){var o=t.s.Compare(e.s);return o||(o=e.e-e.s-(t.e-t.s)),o})),this},l.prototype.getSingleSel=function(){return this.oGC.getAllowSelectDate()},l.prototype.allowSelect=function(){return this.getSingleSel()},l.prototype.isSingleSel=function(){return 2&this.getSingleSel()},l.prototype.isToggleSel=function(){return 4&this.getSingleSel()},l.prototype.isToggleCtrlSel=function(){return 0==(8&this.getSingleSel())},l.prototype.isShiftSel=function(){return 0==(16&this.getSingleSel())},l.prototype.isSelected=function(t){return this.has(t)},l.prototype.isSelectable=function(t){return!!t},l.prototype.select=function(t,e){function s(t){var e=!1,o=this.isSelected(t),n=this.isSelectable(t);if(i(t))e=this.len(),this.clear();else if(a&&this.len()){var r=this.at(this.len()-1),s={s:r.s.Min(t.s),e:r.e.Max(t.e)};(e=!this.isSelected(s))&&(this.remove(r),this.add(s))}else if(this.isSingleSel()){s=!n||u&&o?null:t;(e=!this.isSelected(s))&&(this.clear(),this.ann(s))}else u&&o?(e=o,this.remove(t)):(u||(e=!o||this.len()>1,this.clear()),n&&this.add(t)),e|=o!=this.isSelected(t);return e}var h=!1,a=1==(e=e||{}).selType,u=2&e.selType,c=function(t){function e(t){var e,i,n;return o(t)&&!(n=t.s instanceof Date&&t.e instanceof Date&&t.s.Compare(t.e)<=0&&t)&&((e=t.s||t.start)&&(e=Date.Create(e)),(i=t.e||t.end)&&(i=Date.Create(i)),e||i?(e||(e=i.copy().PrevSecond()),i||(i=e.copy().NextSecond())):i=(e=Date.Create(t)).copy().NextSecond(),n={s:e.Min(i),e:e.Max(i)}),n||null}var i=null;return o(t)&&(n(t)||r(t)?(i=new d.Arr,t.forEach(function(t){i.ann(e(t))}),i.len()||(i=null)):i=e(t)),i}.call(this,t);return r(c)?a?h|=s.call(this,c.last()):u?c.forEach(function(t){h|=s.call(this,t)},this):(h=!function(t){var e=this.len()==t.len();if(e)for(var o=t.len(),i=0;e&&i0&&e.e.Compare(t.s)>0&&{s:t.s.Max(e.s),e:t.e.Min(e.e)}||null}function s(t,e){this.init(t,e)}function h(t,e,o,i){this.init(t,e,o,i)}function c(t){this.init(t)}function p(t){this.init(t)}function f(t,e){this.init(t,e)}function y(t){this.init(t)}function R(t){var e,o,i,n,r,s=new d.BiM,h=new Map,a=new Map,u=new Map,c=R.toK;d.B.split(t).forEach(function(t){(o=t.subText)&&(n="get"+d.getP(o),r="Set"+d.getP(o),t.flags&&(n=t.flags.get("get")||n,r=t.flags.get("set")||r),e=~~t.caption,i=c(o),s.set(e,o),h.set(i,o),h.set(e,e),a.set(e,n),a.set(i,n),u.set(e,r),u.set(i,r))}),this.o=s,this.k=h,this.g=a,this.s=u}function D(t,e){this.init(t,e)}function H(t){this.init(t)}function W(t){this.init(t)}function k(t,e){this.init(t,e)}function P(t){function e(t,e){var o,i,n=!e,r=t.getFrom(),s=t.getTo();n&&(i=r,r=s,s=i),(o=this.get(r)||[]).push({b:s,l:t,t:t.getType(n),g:(n?1:-1)*(t.getWorkingLag()||t.getLag()),w:0!=t.getWorkingLag()}),this.set(r,o)}this.oGL=t,this.p=new Map,this.s=new Map,t.forEach(function(t){e.call(this.p,t,!0),e.call(this.s,t,!1)},this)}function M(){this.mIO=new Map}function A(t){this.init(t)}var F,N=d.BiM.Split("o(offset),i(intersect),s(stack),c(cascade)"),z=d.msday,X=d.Gantt.ItemBarOptions;s.prototype.init=function(t,e){function i(t){return w(t||0)*d.msday}if(this.bpLA=1&t,this.bpLB=2&t,this.bign=4&t,this.bm=8&t,this.bM=16&t,32&t&&(this.bm=!0,this.bM=!1),this.fI=0,this.MI=0,this.mI=0,o(e)){var n=b(e).split(";");this.fI=i(n[0]),this.MI=i(n[1]),this.mI=i(n[2])}},s.prototype.copy=function(t){return t&&(this.bpLA=t.bpLA,this.bpLB=t.bpLB,this.bign=t.bign,this.bm=t.bm,this.bM=t.bM,this.fI=t.fI,this.MI=t.MI,this.mI=t.mI),this},s.prototype.negate=function(){var t=this.bm;this.bm=this.bM,this.bM=t,this.fI=-this.fI;var e=this.mI;this.mI=-this.MI,this.MI=-e},s.negate=function(t){var e;return t&&(e=new s).copy(t).negate(),e},Object.addPrototypeOf(h.prototype,s.prototype),h.prototype.init=function(t){return function(e,o,i,n){t.call(this),this.bA=e,this.bB=o,this.dbDiff=i,n&&(this.copy(n),n.bign&&(this.dbDiff=0))}}(h.prototype.init),c.prototype.init=function(t){this.lrG=0,this.oT=t,this.mIBG=new Map,this.mPLB=new Map},c.prototype.bU=function(){return this.oT.bU()},c.prototype.eU=function(){return this.oT.eU()},c.prototype.all=function(t){var e=new d.Arr;if(t){if(this.mIBG.has(t)){e.add(t);for(var o=0;o=b.s||!b.e||T<=b.e),O&&i(s,L!=c&&L||null,T!=l&&T||null)}if(!u){var U,B=(c==e(s,!0)?0:1)+(l==e(s)?0:2);(u=0!=B)&&(U=B,a.has(s)&&(U=a.get(s),(u=U!=B&&3!=U)&&(U|=B)),a.set(s,U))}}),u)){var c=h;h=s,n(s),h=c}})}if(!this.lrG++){var r=this.mPLB,s=this.mIBG,h=t,a=new Map;s.get(t)&&n(t)}--this.lrG},c.prototype.Group=function(t,e,o,i,r,a){function u(t,e,o,i,n){function r(t,e,o,i){var n,r=t.get(e);!r&&t.set(e,r=new Map),!(n=r.get(o))&&r.set(o,n=[]),n.push(i)}if(t!=o){var a,u=(i?o.getStart():o.getEnd())-(e?t.getStart():t.getEnd());n&&(n.bpLA&&this.mPLB.set(t,t),n.bpLB&&this.mPLB.set(o,o)),r(this.mIBG,t,o,a=new h(e,i,u,n)),r(this.mIBG,o,t,new h(i,e,-u,s.negate(n))),this.onGB(t,o,a)}}if(this.bU(),1==arguments.length){if(n(t)&&t.length>1){var c=t[0];if(this.oT.hasIB(c))for(var p,f=1,g=t.length;fi)}s.a.forEach(function(t){r.set(t,s)})}},this)}var o,i,n,r,s=new Map,h=new d.Arr,a=t.oGC.oT.oTV,u=a.toShape.bind(a);if(t.forEach(function(e){(n=function(t){var e=N.keys()[(255&t.getOverlaidType())-1];return"i"!=e||t.getOverlaid().intersect||(e=""),e}(e))&&(!(r=s.get(n))&&s.set(n,r=new d.Arr),r.add(e)),(i=e.getOverlaidGroup())&&i.split(",").forEach(function(i){var n,r=t.Item(i.trim());r&&r!=e&&(!(n=(o=o||new Map).get(e))&&o.set(e,n=new d.Arr),n.add(r))})}),s.size){if(s.forEach(function(t,o){e.call(this,o,t)},this),this.c||this.s){var c=new Map;[this.c,this.s].forEach(function(t){t&&t.forEach(function(t,e){c.set(e,t)})}),this.h=c}this.mB=new Map,s.forEach(function(t,e){this[e]&&this[e].forEach(function(t,o){this.mB.set(o,e)},this)},this)}},p.prototype.G=function(t,e){var o,i,n,r,s,h,a=e&&e.length||0;if(a>1&&(n=this[t]))for(o=0;o1)for(i=0;i1&&(s=i.o))for(n=[],o.forEach(function(t){n.push({b:t,s:t.getStart(),e:t.getEnd()})}),n.sort(function(t,e){return t.s.Compare(e.s)}),p=(l=0)+1,f=n.length;lr[0].b.GetKey()?-s:s,g.set(u.b,h),r.forEach(function(o,i){g.set(o.b,-h),i?e(c,o)?g.set(o.b,e(u,o)?0:t(u,u,o)||h):t(c,c,o):c=d.Cpy(o)}))}}),g},p.prototype.H=function(i,n){function r(t,e,o){var i=[];t.forEach(function(t,e){i.push(e)}),i.sort().forEach(function(i,n){e.call(o,t.get(i),n)})}var s,h,a,u,c=[],l=0,p=0;return(a=this.G("h",i))&&(a.forEach(function(o,i){("s"==i.t?function(o){function i(){n&&s.push(n),n=null}var n,r,s=[];return o.sort(function(t,e){return t.getStart().Compare(e.getStart())}).forEach(function(o){r&&!e(r,o.se())&&i(),(n=n||[]).push(o),t(r=r||d.Cpy(o.se()),r,o.se())}),i(),s}(o):[o]).forEach(function(o){c.push(function(t,e,o){var i,n=E(0,e),r=[];return o.forEach(function(t){i=0,t.forEach(function(t){i=E(i,e+t.getHeight())}),r.push(i),n+=i}),{t:t,f:n,o:e,l:o,h:r}}(i.t,i.o,function(t,o){function i(t,e){var o=n.get(t);!o&&n.set(t,o=[]),o.push(e)}var n=new Map,r=[];t&&t.forEach(function(t,r){var s=o&&o.get(t),h=(s?s.i+s.l:0)||0,a=h;t.i=h,t.b.forEach(function(t,o){if(o){for(var r=h,s=n.size,u=!0;u&&r1&&(o(n)&&(s=n=0&&this.resOB(),this.oGC.resVB(),this.oGC.oT.oCF.resBF(),this.oGC.oT.feIB(function(t){t.oB=void 0})}}(y.prototype.onChange),y.prototype.K=function(t,e){return void 0!==e&&(t.oO.name=e),t.oO.name},y.prototype.import=function(){this.oGC.import.call(this,this.oGC.oT)},y.prototype.toK=function(t){return b(t)},y.prototype.dTV=function(){return this.oGC.oT.oTV},y.prototype.GetCount=function(){return this.len()},y.prototype.Item=function(t,e){return e&&function(t){if(void 0===this.mS){var e,o=null;this.forEach(function(t){(e=t.GetShortcut())&&(o=o||new Map).set(e,t)}),this.mS=o}return this.mS&&this.mS.get(b(t))}.call(this,t)||function(t){var e=this.k2E(t);return e||(e=O(t)&&g(this,t))||(e=t instanceof f&&this.has(t)?t:null),e}.call(this,t)},y.prototype.Items=function(t){var e=new d.Arr;return d.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},y.prototype.newBar=function(t){return new f(this,t)},y.prototype.Add=function(t){t=U(t)?t:{name:t};var e,o,i,n,r,s,h=this.Item(e=t.name=this.toK(t.name));return h||(this.bU(),~(o=e.indexOf("%"))&&(t.shape=d.Mrg(t.shape,(n=this.Item(e.substr(0,o).trim()))?n.getShape():this.oGC.unkS()),(n=this.Item(i=e.substr(o+1).trim()))?r=n.getShape():i&&(r=this.dTV().toShape(d.S.A2S(i))||{fillColor:"black"}),(s=t.shape)&&(!s.p2x&&(s.p2x=function(t,e){return t*e}),!s.x2p&&(s.x2p=function(t,e){return E(0,I(1,t/e))}),!s.draw&&(s.draw=function(t,e,o,i){if(a(i)){var n=i.getPercent(),s=i.rt4P(o.slice());s&&(s[2]=this.p2x(n,s[2]),t.drawShape(s,r),i.getShowPercentCaption()&&i.t().oGV.drawC(t,s,i,i.p2C(n),i.getAlignPercentCaption(),1))}}))),h=this.newBar(t),this.eU()),h},y.prototype.Remove=function(t){this.RemoveRange(this.Item(t,!0))},y.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},y.prototype.Clear=function(){this.bU(),this.mS=void 0,this.clear(),this.eU()},y.prototype.Copy=function(t,e){var o,i,n;return(i=this.Item(t=this.toK(t),!0))&&!this.Item(e=this.toK(e))&&((n=d.Cpy(i.GetOptions())).name=e,o=this.Add(n)),o},y.prototype.load=function(t){t=t||{Task:{shape:{frameColor:"rgb(0,0,255)",patternColor:"rgb(0,0,255)",pattern:3}},Split:{shape:{frameColor:"rgb(0,0,255)",frameDash:1,primitive:function(t,e){t.moveTo(d.LOf(e),d.BOf(e)),t.lineTo(d.ROf(e),d.BOf(e))}}},Progress:{shape:{fillColor:"rgb(0,0,0)",client:"[,y+(height-height/4)/2,,height/4]"}},Milestone:{shape:{fillColor:"rgb(0,0,0)",client:"[x-height/2,,height,]",primitive:"EllipticPolygon",pArg:{edges:4,startAngle:0}},def:{canResize:!1}},Summary:{shape:{fillColor:"rgb(0,0,0)",client:"[x-height/1.75/2,,width+height/1.75,]",primitive:"Summary"}},"Project Summary":{shape:{fillColor:"rgb(128,128,128)",client:"[x-height/1.75/2,,width+height/1.75,]",primitive:"Summary"}},Deadline:{shape:{frameColor:"rgb(128,128,128)",client:"[x-height/2,,height,]",primitive:"Deadline"},def:{canResize:!1}}},this.bU(),this.change(0,function(){this.Clear();for(var e in t)this.Add(d.Mrg(d.Cpy(t[e]),{name:e}))}),this.eU()},y.prototype.resOB=function(t){this.oOB=void 0;var e=new Map,o=this.oGC.oT,i=o.oI,n=this.getOB(),r=d.Tree.Items.prototype.getHeight,s=d.Tree.Items.prototype.setHeight;i.mOI=null,i.getHeight=r,i.setHeight=s,n&&n.h&&(i.mOI=new Map,i.getHeight=function(t){var o=r.apply(this,arguments),i=this.mOI.get(t);return!i&&this.mOI.set(t,i=t.oIB&&n.H(t.oIB.rgE,t.GetHeight())||e),w(i.h,o)},i.setHeight=function(t){s.apply(this,arguments),this.mOI.delete(t)}),!t&&o.onRL()},y.prototype.getOB=function(){return void 0===this.oOB&&(this.oOB=new p(this),this.oOB.mB||(this.oOB=null)),this.oOB},d.expO({Count:null},y.prototype),d.expO(d.Mrg({Options:null},d.Gantt.BarOptions),f.prototype),R.toK=function(t){return O(t)?~~t:t&&t.toLowerCase&&t.toLowerCase()||t},R.prototype.toK=function(t){var e=R.toK(t);if(this.k.has(e))return e},R.prototype.toO=function(t){var e=this.k.get(this.toK(t));return O(e)?this.o.get(e):e},R.prototype.toI=function(t){var e=this.k.get(this.toK(t));return O(e)?e:this.o.getKey(e)},R.prototype.get=function(t){return this.g.get(this.toK(t))},R.prototype.set=function(t){return this.s.get(this.toK(t))},D.prototype.init=function(t,e){this.oO={key:e.key},(this.oIB=t).add(this),this.t().onBC(1,this),this.setOpts(e)},D.prototype.getType=function(t){return"itemBar"+(t?"-"+t:"")},D.prototype.t=function(){return this.i().t()},D.prototype.gC=function(){return this.oIB.gC()},D.prototype.dTV=function(){return this.oIB.dTV()},D.prototype.bU=function(){this.oIB.bU()},D.prototype.eU=function(t){this.oIB.eU(t)},D.prototype.res=function(){this.oExC=void 0,this.oExCe=void 0,this.oExT=void 0},D.prototype.def=function(t,e){var o,n=this.oO[t];return i(n)&&((o=this.GetBar())&&(n=o.def(t)),i(n)&&i(n=X[t])&&(n=e)),n},D.prototype.isEnabled=function(){return this.i().isEnabled()},D.prototype.Remove=function(){this.oIB.Remove(this)},D.prototype.GetOptions=function(){return this.oO},D.prototype.SetOptions=function(t){this.bU(),this.setOpts(t),this.eU(!0)},D.prototype.setOpts=function(t){if(U(t))for(var e in t){var o=this[d.setM(e)];o&&o.call(this,t[e])}},D.prototype.GetName=function(){return this.oO.name},D.prototype.SetName=function(t){this.bU(),this.oB=void 0,this.oO.name=t,this.eU()},D.prototype.getName=function(){return b(this.GetName())},D.prototype.GetBar=function(){return void 0===this.oB&&(this.oB=this.gC().oGB.Item(this.getName(),!0)||null),this.oB},D.prototype.GetKey=function(){return this.oO.key},D.prototype.SetKey=function(t){this.oIB.setK(this,t)&&(this.bU(),this.eU())},D.prototype.getKey=function(){return this.oIB.toK(this.GetKey())},D.prototype.GetStart=function(){return this.oO.start},D.prototype.SetStart=function(t){this.oO.start!=t&&(this.bU(),this.oO.start=t,this.onSE(),this.eU(!0))},D.prototype.getStart=function(){return this.se().s},D.prototype.GetEnd=function(){return this.oO.end},D.prototype.SetEnd=function(t){this.oO.end!=t&&(this.bU(),this.oO.end=t,this.onSE(),this.eU(!0))},D.prototype.getEnd=function(){return this.se().e},D.prototype.xSE=function(){this.oSE=null,this.rgpS&&this.rgpS.forEach(function(t){t.xSE()}),this.t().onBC(3,this)},D.prototype.onSE=function(){this.xSE(),this.t().oGIB.onSE(this)},D.prototype.se=function(){return this.oSE||(this.oSE=function(){var t,e;return this.rgS?function(){this.rgS.forEach(function(o){var i=o.se();t=t&&t.Min(i.s)||i.s,e=e&&e.Max(i.e)||i.e})}.call(this):(t=Date.Create(this.GetStart()),e=Date.Create(this.GetEnd())),{s:t.Min(e),e:t.Max(e)}}.call(this))},D.prototype.GetShape=function(){return this.oO.shape},D.prototype.SetShape=function(t){this.bU(),this.oO.shape=d.S.A2S(t),this.eU(this.GetBar()&&1==this.GetBar().hCOC())},D.prototype.getShape=function(t){var e,i,n=this.GetShape(),r=this.dTV(),s=this.GetBar();return n=o(n)?r.toShape(n):s&&s.getShape()||this.gC().unkS(),s&&((i=this.t().oCF.b2S(s,this.i()))&&(n=d.Inh(i,n)),!s.hCOC()&&(i=this.t().oGV.oHG.hD().ibS(this))&&(n=d.Inh(i,n))),r.oI.mTBS&&(i=r.oI.mTBS.get(this))&&(n=d.Inh(i,n)),t&&n&&(e=r.toShapes(this.i()))&&e.disabled&&(n=d.Inh(e.disabled,n)),n},D.prototype.GetHeight=function(){return this.oO.height},D.prototype.SetHeight=function(t){this.bU(),this.oO.height=t,this.eU(!0)},D.prototype.getHeight=function(){var t,e=this.GetHeight();return o(e)?e:(t=this.GetBar())?t.getHeight():this.gC().unkH()},D.prototype.GetSelected=function(){return this.gC().isSelected(this)},D.prototype.SetSelected=function(t){!!t!=!!this.isSelected()&&this.gC().select(this,{selType:2})},D.prototype.isSelected=D.prototype.GetSelected,D.prototype.GetSelectable=function(){return this.oO.selectable},D.prototype.SetSelectable=function(t){this.oO.selectable=t},D.prototype.isSelectable=function(){return this.def("selectable",!0)},D.prototype.toFormat=function(t,e){var o,i,n;return e&&(n=this.i().Cell(0))?o=n.toFormat(t,e):(i=F.get(t))&&(o=this[i].call(this)),o},D.prototype.GetCaption=function(){return this.oO.caption},D.prototype.SetCaption=function(t){this.bU(),this.oExC=void 0,this.oO.caption=t,this.eU()},D.prototype.getExC=function(){return void 0===this.oExC&&(this.oExC=v.Get(this.def("caption"))||null),this.oExC},D.prototype.getCaption=function(){this.lExC=this.lExC||0;var t,e=null;return this.lExC++||(t=this.getExC())&&(e=t.text(this)),this.lExC--,e},D.prototype.GetHAlignCaption=function(){return this.oO.hAlignCaption},D.prototype.SetHAlignCaption=function(t){this.bU(),this.oO.hAlignCaption=t,this.eU()},D.prototype.getHAlignCaption=function(){return this.def("hAlignCaption",1)},D.prototype.GetVAlignCaption=function(){return this.oO.vAlignCaption},D.prototype.SetVAlignCaption=function(t){this.bU(),this.oO.vAlignCaption=t,this.eU()},D.prototype.getVAlignCaption=function(){return this.def("vAlignCaption",1)},D.prototype.GetShowCaption=function(){return this.oO.showCaption},D.prototype.SetShowCaption=function(t){this.bU(),this.oO.showCaption=t,this.eU()},D.prototype.getShowCaption=function(){return this.def("showCaption",!0)},D.prototype.GetExtraCaption=function(){return this.oO.extraCaption},D.prototype.SetExtraCaption=function(t){this.bU(),this.oExCe=void 0,this.oO.extraCaption=t,this.eU()},D.prototype.getExEC=function(){return void 0===this.oExCe&&(this.oExCe=v.Get(this.def("extraCaption"))||null),this.oExCe},D.prototype.getExtraCaption=function(){this.lExCe=this.lExCe||0;var t,e=null;return this.lExCe++||(t=this.getExEC())&&(e=t.text(this)),this.lExCe--,e},D.prototype.GetExtraCaptionHAlign=function(){return this.oO.extraCaptionHAlign},D.prototype.SetExtraCaptionHAlign=function(t){this.bU(),this.oO.extraCaptionHAlign=t,this.eU()},D.prototype.getExtraCaptionHAlign=function(){return this.def("extraCaptionHAlign",1)},D.prototype.GetExtraCaptionVAlign=function(){return this.oO.extraCaptionVAlign},D.prototype.SetExtraCaptionVAlign=function(t){this.bU(),this.oO.extraCaptionVAlign=t,this.eU()},D.prototype.getExtraCaptionVAlign=function(){return this.def("extraCaptionVAlign",1)},D.prototype.GetShowExtraCaption=function(){return this.oO.showExtraCaption},D.prototype.SetShowExtraCaption=function(t){this.bU(),this.oO.showExtraCaption=t,this.eU()},D.prototype.getShowExtraCaption=function(){return this.def("showExtraCaption",!0)},D.prototype.GetToolTip=function(){return this.oO.toolTip},D.prototype.SetToolTip=function(t){this.bU(),this.oExT=void 0,this.oO.toolTip=t,this.eU()},D.prototype.getToolTip=function(){this.lExT=this.lExT||0;var t,e=null;return this.lExT++||(t=this.getExT())&&(e=t.text(this)),this.lExT--,e},D.prototype.getExT=function(){return void 0===this.oExT&&(this.oExT=v.Get(this.def("toolTip"))||null),this.oExT},D.prototype.tt=function(t){var e,o=this.getExT();return o&&t&&(e=t.ib2R(this,6))&&{oExT:o,rtT:d.ORt(e,0,e[3]+4)}},D.prototype.GetCanResize=function(){return this.oO.canResize},D.prototype.SetCanResize=function(t){this.bU(),this.oO.canResize=t,this.eU()},D.prototype.getCanResize=D.prototype.canResize=function(){return this.isSelectable()&&!this.rgS&&~~this.def("canResize",-1)||0},D.prototype.GetCanMove=function(){return this.oO.canMove},D.prototype.SetCanMove=function(t){this.bU(),this.oO.canMove=t,this.eU()},D.prototype.getCanMove=function(){return this.isSelectable()&&this.def("canMove",!0)},D.prototype.GetCanMoveToAnother=function(){return this.oO.canMoveToAnother},D.prototype.SetCanMoveToAnother=function(t){this.bU(),this.oO.canMoveToAnother=t,this.eU()},D.prototype.getCanMoveToAnother=function(){return this.isSelectable()&&this.def("canMoveToAnother",!1)},D.prototype.canMove=function(){return(this.getCanMove()?1:0)|(this.getCanMoveToAnother()?2:0)},D.prototype.GetParent=function(){return this.oIB.oI},D.prototype.SetParent=function(t){var e=this.gC().oT;this.canParent(t=e.Item(t))&&(this.bU(),e.oGC.oGL.resPS(),this.t().onBC(4,this),this.lP=(this.lP||0)+1,this.GetParent().oIB.remove(this),(this.oIB=t.oIB=t.oIB||new H(t)).add(this),--this.lP,this.t().onBC(5,this),this.eU(!0))},D.prototype.GetItem=function(){return this.GetParent()},D.prototype.GetItem=D.prototype.GetParent,D.prototype.SetItem=function(t){return this.SetParent(t)},D.prototype.SetItem=D.prototype.SetParent,D.prototype.i=D.prototype.GetParent,D.prototype.canParent=function(t){return t&&t!=this.GetParent()&&(!t.oIB||!t.oIB.k2E(this.getKey()))},D.prototype.GetDuration=function(){var t=this.se();return(t.e-t.s)/z},D.prototype.SetDuration=function(t){var e=(t*=z)<0,o=this.se();this.SetOptions({start:e?o.e.copy().add(t):o.s,end:e?o.e:o.s.copy().add(t)})},D.prototype.SetMove=function(t){t&&this.mvBy(t*z)},D.prototype.rsBy=function(t,e,o){var i=(o=o||this.se()).s,n=o.e;if(3&e){var r=1==e?1:-1,s=n-i-(r*t+this.gC().oLvs.getrU().m);s<0&&(t+=r*s),r>0?i=i.copy().add(t):n=n.copy().add(t)}this.SetOptions({start:i,end:n})},D.prototype.mvBy=function(t,e){e=e||this.se(),this.SetOptions({start:e.s.copy().add(t),end:e.e.copy().add(t)})},D.prototype.GetSummaryBarShape=function(){return this.oO.summaryBarShape},D.prototype.SetSummaryBarShape=function(t){this.bU(),this.oO.summaryBarShape=d.S.A2S(t),this.eU()},D.prototype.getSummaryBarShape=function(){var t=this.def("summaryBarShape");return t&&this.dTV().toShape(d.S.A2S(t))},D.prototype.GetCaptionHOffset=function(){return this.oO.captionHOffset},D.prototype.SetCaptionHOffset=function(t){this.bU(),this.oO.captionHOffset=t,this.eU()},D.prototype.getCaptionHOffset=function(){return this.def("captionHOffset",0)},D.prototype.GetCaptionVOffset=function(){return this.oO.captionVOffset},D.prototype.SetCaptionVOffset=function(t){this.bU(),this.oO.captionVOffset=t,this.eU()},D.prototype.getCaptionVOffset=function(){return this.def("captionVOffset",0)},D.prototype.GetExtraCaptionHOffset=function(){return this.oO.extraCaptionHOffset},D.prototype.SetExtraCaptionHOffset=function(t){this.bU(),this.oO.extraCaptionHOffset=t,this.eU()},D.prototype.getExtraCaptionHOffset=function(){return this.def("extraCaptionHOffset",0)},D.prototype.GetExtraCaptionVOffset=function(){return this.oO.extraCaptionVOffset},D.prototype.SetExtraCaptionVOffset=function(t){this.bU(),this.oO.extraCaptionVOffset=t,this.eU()},D.prototype.getExtraCaptionVOffset=function(){return this.def("extraCaptionVOffset",0)},D.prototype.dI=function(t){function e(i){i&&i.rgI&&i.rgI.forEach(function(i){(-2!=t||!i.rgI||!i.rgI.len())&&o.add(i),-1!=t&&e(i)})}var o,i=this.gC().oT.oI;return 0==t||t==i?o=i.rgI:(o=new d.Arr,-1==t||-2==t||-3==t?e(this.i()):u(t)?o.ann(i.Item(t)):(n(t)||r(t))&&t.forEach(function(t){o.ann(i.Item(t))})),o&&o.len()&&o||null},D.prototype.dIB=function(t,e){var s,h,u,c=!1,l=new d.Arr,p=this.gC().oT.oI;return o(t)&&(i(e)&&((c=a(t))?l.ann(p.Item(t.i())&&t||null):(n(t)||r(t))&&t.forEach(function(t){a(t)&&(c=!0,l.ann(p.Item(t.i())&&t||null))})),c||(o(e)&&(h=b(e),u=function(t){return h==t.getKey()},h.length>2&&h.sWith("<")&&h.eWith(">")&&("*"==(h=h.substr(1,h.length-2))?u=null:(h=d.Like.Mask(h),u=function(t){return h.Match(t.getKey())}))),(s=this.dI(t))&&s.forEach(function(t){t.oIB&&(u?t.oIB.forEach(function(t){u(t)&&l.add(t)}):l.push(t.oIB))}))),l&&l.len()&&l||null},D.prototype.DefineSummaryBars=function(t,e){var o,i=this.dIB(t,e);i&&(this.bU(),o=function(t){var e;if(t.rgpS){e=new d.Arr(t.rgpS);for(var o,i=0;i%p%"))},D.prototype.p2C=function(t){return v.Set((this.getPercentCaptionFormat()||"%p").replace("%p",(100*w(t,this.getPercent())).toFixed()))},D.prototype.DateToPercent=function(t){var e=this.se(),o=e.e-e.s;return o?E(0,I(1,(Date.Create(t)-e.s)/o)):1},D.prototype.GetOverviewColor=function(){return this.oO.overviewColor},D.prototype.SetOverviewColor=function(t){this.bU(),this.oO.overviewColor=t,this.eU()},D.prototype.getOverviewColor=function(){var t,e,o=this.def("overviewColor");return o||(o=(t=this.GetBar())&&t.getOverviewColor())||(o=(e=this.getShape(!this.isEnabled()))&&(e.fillColor||e.patternColor||e.frameColor)),o},D.prototype.GetHistLegend=function(){return this.oO.histLegend},D.prototype.SetHistLegend=function(t){this.bU(),this.oExHL=void 0,this.oO.histLegend=t,this.eU()},D.prototype.getHistLegend=function(){this.lExHL=this.lExHL||0;var t,e=null;return this.lExHL++||(t=this.getExHL())&&(e=t.text(this)),this.lExHL--,e},D.prototype.getExHL=function(){return void 0===this.oExHL&&(this.oExHL=v.Get(this.def("histLegend"))||null),this.oExHL},D.prototype.GetResources=function(){return this.oO.resources},D.prototype.SetResources=function(t){this.bU(),this.oO.resources=Z.setRes(this,t),this.eU()},D.prototype.getResources=function(){return b(this.GetResources(),this.def("resources"))},D.prototype.GetResourceFormat=function(){return this.oO.resourceFormat},D.prototype.SetResourceFormat=function(t){this.bU(),this.oO.resourceFormat=t,this.eU()},D.prototype.getResourceFormat=function(){return b(this.GetResourceFormat(),this.def("resourceFormat"))},D.prototype.getResourcesFormat=function(){return Z.getRes(this,this.getResourceFormat())},D.prototype.GetResizePercentStep=function(){return this.oO.resizePercentStep},D.prototype.SetResizePercentStep=function(t){this.oO.resizePercentStep=t},D.prototype.getResizePercentStep=function(){return E(0,I(1,w(this.def("resizePercentStep"))))},D.prototype.isW=function(){},D.prototype.wC=function(t,e){t=t||this.getStart();var o;return(e=e||this.getEnd())-t<0&&(o=t,t=e,e=o),console.log("TODO - wC"),(e-t)/z},D.prototype.wD=function(t,e){return console.log("TODO-wD"),t.copy().add(e*z)},D.prototype.seR=function(){},d.expO(d.Mrg({Options:null,Bar:null,Parent:null,Item:null,Duration:null,Move:null,CriticalPath:null},X),D.prototype),Object.addPrototypeOf(H.prototype,d.KAr.prototype),H.prototype.init=function(t){return function(e){t.call(this),this.oI=e}}(H.prototype.init),H.prototype.resVB=function(){this.gC().resVB()},H.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.resVB()}}(H.prototype.onChange),H.prototype.onRemove=function(t){return function(e){t.call(this,e),!e.lP&&this.gC().onDelBar(e)}}(H.prototype.onRemove),H.prototype.K=function(t,e){return void 0!==e&&(t.oO.key=e),t.oO.key},H.prototype.bU=function(){this.oI.bU()},H.prototype.eU=function(t){t&&this.resVB(),this.oI.eU()},H.prototype.gC=function(){return this.oGC||(this.oGC=this.oI.t().oGC)},H.prototype.dTV=function(){return this.oTV||(this.oTV=this.oI.t().oTV)},H.prototype.toK=function(t){return o(t)?t:""},H.prototype.Item=function(t){var e=this.k2E(t=this.toK(t));return e||(e=O(t)&&g(this,t))||(e=a(t)&&this.has(t)?t:null),e||null},H.prototype.Items=function(t){var e=new d.Arr;return d.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},H.prototype.nIBar=function(t){return new D(this,t)},H.prototype.Add=function(t,e,i,n,r){var s,h=1==arguments.length&&U(t)?t:{name:t,start:e,end:i,caption:r};return h.key=this.toK(o(n)?n:h.key),(s=this.k2E(h.key))?s.SetOptions(h):s=this.nIBar(h),s},H.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},H.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},H.prototype.Clear=function(){this.bU(),this.clear(),this.eU()},W.prototype.init=function(t){this.oGC=t,this.wse=6,this.dSP=d.Cpy(d.Gantt.DefSchedulePDM),this.rgL=new d.Arr,this.rgL.onRemove=this.onDelLink.bind(this),this.import()},W.prototype.import=function(){this.oGC.import.call(this,this.oGC.oT),["forEach","add","indexOf"].forEach(function(t){this[t]=this.rgL[t].bind(this.rgL)},this)},W.prototype.resVL=function(){this.resPS(),this.oGC.resVL()},W.prototype.resK2I=function(){this.mK2I=null},W.prototype.split=function(t,e){var o,i,n,r,s,h,a,u=-1,c=t.indexOf(C);~c&&(~(i=(o=t.substr(c+C.length)).toUpperCase().indexOf(L))&&(o=o.substr(0,i)+o.substr(i+L.length)),t=t.substr(0,c)),n=d.ToF(o);for(var l=0,p=(r=t).length;u<0&&l>=1,e++;return E(0,I(e,3))}(this.t)],t+=this.b.GetKey(),this.g&&(t+=C+this.g,this.w&&(t+=L)),t}.call(t)}),o},P.prototype.set=function(t,e,o){if(t&&(o=b(o).trim())!=this.get(t,e)){var i=this.oGL,n=e?2:1;i.bU(),i.RemoveRange(function(){var o,i=this.ps(e).get(t);return i&&i.forEach(function(t){(o=o||[]).push(t.l)}),o}.call(this)),o.split(T).forEach(function(o){var r,s,h,a,u,c=i.split(o,n);c&&(r=e?c.g:-c.g,s=c.b,h=t,1==(a=c.t)&&(u=s,s=h,h=u,a=2),i.Add({from:s,to:h,lag:!c.w&&r||0,workingLag:c.w&&r||0,type:a}))},this),i.eU()}},M.prototype.can=function(t,e){return t&&e&&!this.get(t,e)},M.prototype.get=function(t,e){var o,i=this.mIO.get(t);return i&&(o=i.out.get(e)),o||null},M.prototype.add=function(t){function e(t){return{o:t,in:new Map,out:new Map,links:new d.Arr}}var o=t.oF,i=t.oT,n=this.mIO.get(o),r=this.mIO.get(i);!n&&this.mIO.set(o,n=e(o)),n.out.set(i,t),n.links.add(t),o!=i&&(!r&&this.mIO.set(i,r=e(i)),r.in.set(o,t),r.links.add(t))},M.prototype.remove=function(t){var e=t.oF,o=t.oT,i=this.mIO.get(e),n=this.mIO.get(o);i&&(i.out.delete(o),i.links.remove(t),!i.links.len()&&this.mIO.delete(e)),n&&e!=o&&(n.in.delete(e),n.links.remove(t),!n.links.len()&&this.mIO.delete(o))},M.prototype.lOf=function(t){function e(t){var e=s.get(t);return e?e.links:null}var i=d.Arr.empty,s=this.mIO;if(a(t))i=e(t)||i;else{var h=null;t instanceof d.M1?h=t.rgO:(n(t)||r(t))&&(h=t),o(h)&&(i=new d.Arr,h.forEach(function(t){i.pushnn(e(t))}))}return i},d.expO({Count:null},W.prototype),d.expO(d.Mrg({Options:null,Index:null},d.Gantt.LinkOptions),k.prototype),A.prototype.init=function(t){this.oT=t},d.SB.addProto(A.prototype),A.prototype.SetClientRect=function(t){},A.prototype.import=function(){var t=this.oT,e=t.oTV,o=t.oGV;e.export(this),["getTfi","ctxTfi","getToolTipDelay","getToolTipPopDelay","getToolTipWidth","allowTT"].forEach(function(t){this[t]=e[t].bind(e)},this),["locale","ctxLoc","gPtr","gAA"].forEach(function(t){this[t]=o[t].bind(o)},this)},A.prototype.attach=function(){this.import()},A.prototype.gSize=function(){return{height:this.oT.oGC.getOverviewHeight()}},A.prototype.sOH=function(t){t&&this.oT.oGC.SetOverviewHeight(this.scaled(t[3]))},A.prototype.getOverviewVisible=function(){return this.oT.oGC.getOverviewVisible()},A.prototype.getOverviewToolTip=function(){return this.oT.oGC.getOverviewToolTip()},A.prototype.getOverviewZoomCaption=function(){return this.oT.oGC.getOverviewZoomCaption()},A.prototype.getOverviewZoomUnit=function(){return this.oT.oGC.getOverviewZoomUnit()},A.prototype.getOverviewFlags=function(){return this.oT.oGC.getOverviewFlags()},A.prototype.GetVisible=function(){return this.getOverviewVisible()},A.prototype.GetResizable=function(){return 65536&this.getOverviewVisible()},A.prototype.GetViewRect=function(t){var e=d.EArtC((t||this.gCW()).GetCanvas());return d.ORt(this.GetClientRect(),e[0],e[1])},A.prototype.c2V=function(t,e){return d.CW.prototype.c2V.apply(this,arguments)},A.prototype.v2C=function(t,e){return d.CW.prototype.v2C.apply(this,arguments)},A.prototype.pinvAO=function(t){if(this.isVisible()){var e=this;t?e.invAO():(clearTimeout(e.hIAO),e.hIAO=setTimeout(function(){e.invAO()}))}},A.prototype.isSelectable=function(t){return function(){return t.apply(this,arguments)&&this.gV().isSelectable()}}(A.prototype.isSelectable),A.prototype.onSetAO=function(t){},A.prototype.onpaint=function(t){this.locale(function(){d.SB.prototype.onpaint.call(this,t)},this)},A.prototype.draw=function(t,e,o){function i(e,o,i){e&&(t.selClip(e),o.call(i,e),t.resClip())}this.ctxScale(t,e,function(e){var o,n,r=this.getOverviewVisible(),s=this.getOverviewFlags(),h=this.gCnt(e),a=[];(n=this.gV().toShape("selectout-overview"))&&(o=function(t){var e,o=this.getSelRect(),i=t[0],n=t[1],r=t[3],s=[t];return o&&(s=[],(e=d.ROf(o))>i&&s.push([i,n,o[0]-i,r]),e ";var y=e[0]+e[2]/2,v=t.sizeHTMLText(h);f[0]1&&(r=this.getOverviewZoomUnit())&&(t[2]-=r*s.length),i=t.slice(),4096&a&&(h=this.gCtx())&&(n=i.slice(),n[3]=4+h.fontHeight(),u&&(n[1]=d.BOf(t)-n[3]),5120==(5120&a)))if(u)i[3]=d.TOf(n)-d.TOf(i);else{var c=i[1];c-=i[1]=d.BOf(n),i[3]+=c}return o={rtBars:e(i),rtScale:e(n)},r&&s&&(t[0]=d.ROf(t),t[2]=r,o.rgZoom=new d.M1,s.forEach(function(e){o.rgZoom.set(e.u,t.slice()),d.ORt(t,r)})),o},A.prototype.gV=function(){return this.oT.oGV},A.prototype.h=function(){return 3},A.prototype.feVI=function(t,e){var o,i,n=this.gV(),r=n.getLIV().rgVI,s=r.indexOf(n.getVI().first());if(s>=0&&(o=this.GetClientRect())&&(i=this.gCnt([0,0,this.scaled(o[2]),this.scaled(o[3])]).rtBars)){e=e||this;for(var h=r.len(),a=0,u=i[3],c=this.h();s2&&o[3]>2){var r=i[0],s=n(r.s),h=(n(r.e)-s)/(r.x+r.w);return[s+r.x*h,t[1],E(1,this.scaled(o[2])*h),t[3]]}},A.prototype.hasOR=function(t){return this.gAA().Has("overview-selection-resize",t,o(t))},A.prototype.s2OR=function(t){return t&&this.hasOR()&&[S.C2R(S.R2C(t,33),4,.75*t[3],34),S.C2R(S.R2C(t,36),4,.75*t[3],34)]||[]},A.prototype.p2OR=function(t){var e,o,n,r,s;return this.isSelectable()&&this.gAA().Has("overview-selection-resize")&&(e=this.getSelRect(),o=this.GetClientRect(),n=this.scaled(S.X(t)-o[0]),r=this.scaled(S.Y(t)-o[1]),this.s2OR(e).forEach(function(t,e){i(s)&&d.PInR(n,r,t)&&(s=e?1:-1)}),i(s)&&d.PInR(n,r,e)&&(s=0)),s},A.prototype.tt=function(t){var e=this.getOverviewToolTip();return e&&t&&{d:t,t:e}},A.prototype.hideTT=function(){d.TT.Hide()},A.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2DU(o),n=i&&i.d,r=16;d.TT.Show(function(){return n&&(e=this.tt(n))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var i=[0,0,this.getToolTipWidth(),t.fontHeight()],n=t.drawHTMLDate(e.t,e.d,i,1024|r);return[this.d2X(e.d),S.Y(o)+16,~~(n.width+1),n.height]},this)}.call(this),onpaint:function(t,o){this.ctxLoc(function(t){t.drawHTMLDate(e.t,e.d,o,r)},this,t)},thisArg:this}},{thisArg:this,ttO:n&&n.toString(),ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay()})},A.prototype.onio=function(t){this.allowTT()&&this.hideTT()},A.prototype.getCursor=function(t){var e;return this.p2OR(t)&&(e=d.HitTest.Cursor.Rect(1)),e||null},A.prototype.onmousemove=function(t){var e,o=this.gPtr(t),i=this.getCursor(o);return i&&(e=this.GetCanvas())&&(e.style.cursor=i),this.allowTT()&&this.showTT(t),i},A.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&d.PInR(S.X(e),S.Y(e),this.GetClientRect())&&this.gV().dowheel(t)},A.prototype.ondown=function(t){var e,i,n=this.gPtr(t),r=this.gV(),s=r.oLvs;return r.isSelectable()&&(i=n&&this.p2DU(n))&&o(i.u)?(i.e&&this.oT.Smooth(function(){e=s.isSR(),s.setCur({uS:i.u,uW:e?s.nUWo||s.getUW():null}),e&&r.fSR();var t,o=this.se(),n=r.fl();n.s&&n.e&&(o.e.Compare(n.s)<0?t=[o.e,2]:o.s.Compare(n.e)>0?t=[o.s,0]:n.e-n.s>=o.e-o.s&&(t=[new Date((o.s.getTime()+o.e.getTime())/2),1])),t&&s.scrollTo(t[0],t[1])},this),!1):r.ondown(t)},A.prototype.rurScroll=function(t,e){var i=this;e.rurScrollS=function(t){var e,n,r=i.gPtr(t),s=i.gV();(n=r&&i.p2DU(r))&&o(n.d)&&(e=s.fl())&&e.s&&e.e&&(n.d.Compare(e.s)<0||n.d.Compare(e.e)>0)&&s.oLvs.scrollTo(n.d,1)},this.oT.oTV.rurScroll(t,e)},A.prototype.onRurScrollD=function(t){var e,o,i=this.gV(),n=this.se(),r=this.GetClientRect(),s=this.gCnt([0,0,this.scaled(r[2]),this.scaled(r[3])]);(o=s.rtBars||s.rtScale)&&(t.dx=-this.unscaled(i.d2X(n.s.copy().add(this.scaled(t.dx)/o[2]*(n.e-n.s)))-i.d2X(n.s))),this.hasOR("unsmooth")&&((e=i.oLvs).getFVO()&&e.setFVO(0),t.dx/=e.getUW(),t.dx=V(t.dx)*e.getUW()),t.dy=-t.dy,256&this.getOverviewVisible()||(t.dy=0),i.onRurScrollD(t)},A.prototype.rurChartZoom=function(t,e){return this.gV().rurChartZoom(t,e)},A.prototype.rurChartFit=function(t,e){var o=this,i=o.gV(),n=i.oLvs,r=i.dTV();e.rurOnlyAO={},e.rurAllow=0,e.rurEFPaint=r.fitEFPaint(),e.rurDrop=function(t){function e(t){return(t=o.v2C(this.c2V(this.ptCA(t,!1)))).x<=h?r.s:t.x>=a?r.e:o.p2DU([t.x,u]).d}var r=o.se(),s=o.ov2R(),h=d.LOf(s),a=d.ROf(s),u=S.Y(S.R2C(s)),c=S.X(t.from)<=S.X(t.to),l=c?t.from:t.to,p=c?t.to:t.from;i.Smooth(function(){n.zoom(e.call(this,l),e.call(this,p).Next(n.getrUS(),n.getrUC()))})},r.rurDrag(t,e)},A.prototype.rurOverviewSelectionResize=function(t,e){var o,i,n,r,s,h=this.gPtr(t),a=this.p2OR(h);a&&(i=(o=this).gV(),r=i.getCur(),n=i.dTV(),s=i.flE(),e.rurOnlyAO={},e.rurAllow=0,e.rurDrag=function(t){var e=o.p2DU(o.gPtr(t.event)),n=o.se(),r=e&&e.d&&e.e,h=s.s,u=s.e;e&&(r||(r=a<0?n.s:n.e),a<0?h=r:u=r,i.oLvs.zoom(h,u,{ex:!o.hasOR("unsmooth")}))},e.rurCancel=function(t){i.setCur(r)},n.rurDrag(t,e))},F=new R("0(name),1(start),2(end),6(toolTip),9(key),60(histLegend),3(caption),4(hAlignCaption),5(vAlignCaption),56(showCaption),44(extraCaption),45(extraCaptionHAlign),46(extraCaptionVAlign),57(showExtraCaption),10(canResize),11(canMove),28(canMoveToAnother),29(selectable)[get=isSelectable],512(parent)[get=i],513(duration)[get=GetDuration],12(percent),13(percentCaptionFormat),14(showPercentCaption),15(alignPercentCaption),16(canResizePercent),61(resizePercentStep)18(offset),21(effort),33(shape)[get=getShape][set=SetShape],41(overviewColor),52(overlaidKey),269(criticalPath),270(predecessor),271(successor),49(resources),266(resourcesFormat)"),{Bar:f,Bars:y,IBP:F,v2B:function(t,e){var i=null;return o(t)&&(t=l(t,d.Gantt.ItemBarPropertyEnum),i={o:F.toO(t),i:F.toI(t),g:F.get(t),s:F.set(t),k:b(e)}),i},ItemBar:D,ItemBars:H,Link:k,Links:W,OV:A,CR:Z,GB:c}}()),d.Gantt.ExC=v,d.Gantt.S=function(){function t(t,e){return!t.Compare(e)}function e(t,e){return t.Compare(e)>0}function n(t,e){return t.Compare(e)<0}function s(t,e){return t.copy().add(e)}function h(t,e){return e?s(t,e*D):t}function a(t,e){var o=t.se(),i=e.se();return o.s.Compare(i.s)||-o.e.Compare(i.e)}function u(t){return d.f2S(t,W)}function c(t){return k.charAt(Math.log(t)/Math.log(2))}function l(t,e,o,i){return t?t.wL(e,i?h(o||t.getEnd(),i):o):(o-e)/D}function p(t,e,o,i){var n=s(e);return Math.abs(o)>R&&(n=h(n,o),(i=d.ToB(i,t.isW()))&&(n=t.wD(e,o))),n}function f(t){return t.oGC.eyB()||0}function g(){v.call(this)}function y(){return this.s&&this.e}function v(t,e){this.s=t,this.e=e,y.call(this)&&function(t){if((t=this.r||t)&&t.t){var e=this.e-this.s;switch(t.t){case 1:this.s=t.s,this.e=t.e;break;case 2:this.s.Compare(t.s)<0?(this.s=t.s,this.e=t.e.Min(s(this.s,e))):(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=t.s.Max(s(this.e,-e)));break;case 3:t.s?this.s.Compare(t.s)<0&&(this.s=t.s,this.e=s(this.s,e)):t.e&&(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=s(this.e,-e))}this.s&&(this.s=s(this.s)),this.e&&(this.e=s(this.e))}}.call(this)}function S(t,e){return this.oTV.toShape(d.S.A2S(t),e)}function m(t){return t&&(d.C.IsColor(t)?{color:t}:d.L.aPP(t))||null}function C(t){this.init(t)}function L(t,e){this.init(t,e)}function T(){this.init()}function w(){this.init()}function G(t,e,o){this.init(t,e,o)}function O(){this.init.apply(this,arguments)}function b(t){this.init(t)}function U(t,e){this.init(t,e)}function B(t,e){return{b:t||new d.Arr,l:e||new d.Arr}}function V(t){return this.b.push(t.b),this.l.push(t.l),this}function x(t){this.init(t)}Object.addPrototypeOf(C.prototype,d.M1.prototype),C.prototype.init=function(t){return function(e){function o(t,e,o,i){var n,r=this.get(t);!r&&this.set(t,r=new d.M1),!(n=r.get(e))&&r.set(e,n=[]),n.push({l:o,d:i})}t.call(this),e.forEach(function(t){var e=t.getFrom(),i=t.getTo();o.call(this,e,i,t,!0),e!=i&&o.call(this,i,e,t,!1)},this),function(){this.forEach(function(t){t.rgO.sort(a)})}.call(this)}}(C.prototype.init),C.prototype.lAB=function(t,e,o){var i,n=this.get(t);if(n&&(n=n.get(e))&&n.length)if(o)for(var r,s=0,h=n.length;!i&&s0,r=i.l>0,n&&r?i.l=E(i.l,s.l):n||r?r&&!n&&(i.l=s.l):i.l=I(i.l,s.l)),this.set(t,e,o,i)}},Object.addPrototypeOf(w.prototype,d.M1.prototype),w.prototype.add=function(t){return function(e){return e instanceof G&&this.set(e.b,e),t.apply(this,arguments)}}(w.prototype.add),G.prototype.init=G.prototype.clt=function(t,e,o){if(this.b=t,this.i=null,this.o=null,this.s=null,this.f=null,this.e=null,this.r=null,e){var i,n=e.get(t);n&&n.forEach(function(e,n){e.forEach(function(e){i=e.l.getType(e.d),o&&o.set(t,n,i,function(t){var e=t.l.getWorkingLag(),o=e||t.l.getLag();return o&&new L((t.d?1:-1)*o,!!e)||null}(e)),this.cIO(c(i)).add(n)},this)},this)}t.rgS&&this.cIO("r").push(t.rgS),t.rgpS&&this.cIO("r").push(t.rgpS)},G.prototype.rel=function(t){[this.o,this.i,this.s,this.f,this.r].forEach(function(e){e&&t.push(e)})},G.prototype.lnk=function(t){[this.o,this.i,this.s,this.f].forEach(function(e){e&&t.push(e)})},G.prototype.cIO=function(t){return this[t]=this[t]||new d.Arr},G.prototype.isE=function(){return!(this.i&&this.i.len()||this.o&&this.o.len()||this.s&&this.s.len()||this.f&&this.f.len())},G.prototype.cpy=function(){var t=new G(this.b);for(var e in this)r(this[e])&&(t[e]=this[e].copy());return t},Object.addPrototypeOf(O.prototype,d.Arr.prototype),O.prototype.init=function(t){return function(){t.apply(this,arguments)}}(O.prototype.init),b.prototype.init=function(t){this.o3=t,this.nMx=0,this.lDo=0,this.rgB=new d.Arr,this.mP=new Map,this.mI=new Map},b.prototype.res=function(){this.mI.forEach(function(t){g.call(t)}),this.mP.clear(),this.rgB.clear()},b.prototype.bI=function(t,e){var o=e;return!o&&(o=!(e=this.mI.get(t))&&(e={})),o&&this.mI.set(t,e),e},b.prototype.add=function(t){if(!this.rgB.has(t)){var e=this.rgB.len(),o=this.o3.IO(t,"e");return o&&o.forEach(function(t){this.rgB.add(t),this.mP.set(t,e)},this),!0}},b.prototype.SD=function(t,e,o){var i,n,r=this.bI(t);v.call(r,e,o),i=r.l,Math.abs(r.l)R){var g=p(o,s.s,f),v=p(o,g,s.l);return this.SD(o,g,v),this.EB(o)?3:0}return 1}}else if(n(a,u.s))return 1}var d=p(i,a,u.l);return this.SD(i,a,d),e(a,u.s)||!this.EB(i,r)?0:2},b.prototype.DoS=function(){function t(){function t(t,e){return{i:t,m:e}}function r(t,e){var o,i=[],n=e?function(t,e){function o(t,e,o,i){o.forEach(function(o){this.oCBL.lAB(e,o,t)&&i.add(o)},this)}var i=this.get(t);i&&(i.o&&o.call(this,2,t,i.o,e),i.s&&o.call(this,8,t,i.s,e),i.f&&o.call(this,4,t,i.f,e))}:function(t,e){var o=this.get(t);o&&(o.o&&e.push(o.o),o.s&&e.push(o.s),o.f&&e.push(o.f))};return this.I.len()>(t?this.F.len():0)+1&&this.I.forEach(function(e){(!t||!this.F.has(e))&&(o=function(t,e){for(var o=new d.Arr(t),i=o.first();i;i=o.next(i))e.call(this,i,o);return o.len()>1&&o||null}.call(this,e,n))&&i.push(o)},this),i.length&&i||null}function s(e){function o(t,e,o){var i=this.oLgs.get(e,o,2)||P;return i.l>=0?l(t,p(e,this.oSB.bI(e).e,i.l,i.w||!1),this.oSB.bI(o).s):0}var i,n;return e&&e.length&&(i=new Map,e.forEach(function(t,e){t.forEach(function(t){var o=i.get(t);!o&&i.set(t,o=new d.Arr),o.add(e)})},this),e.forEach(function(e){var r=e.first(),s=function(t,e){function i(t,e){var o=e.get(t);return o&&1==o.len()?o.first():-1}var n,r=i(t,e);if(r>=0)for(var s=new d.Arr(t),h=new d.Arr(t);h.len();){for(var a,u=new d.Arr,c=h.first();c;c=h.next(c))if(a=this.get(c)){if(!s.has(c)&&a.e)for(var l=a.e.first();l;l=a.e.next(l)){if(s.add(l),r!=i(l,e))return;h.add(l)}if(a.o)for(var p,f=a.o.first();f;f=a.o.next(f))if(r!=i(f,e)){if(!(p=o.call(this,t,c,f)))return;(!n||p0){this.oT;var y=new Map,S=[],m=new d.Arr,C=new d.Arr;for(h.call(m,g,0,-1);m.len();){var L,T=m.first(),w=new d.Arr(T);for(h.call(w,g,0,T),L=w.len()>1;L;){var G,O,b,U=new d.Arr,B=0,V=0,x=w.at(V);for(V++;V1)}if(w.len()){var R,B=w.first(),D=r[T],H=r[B];if(C.add(B),R=u.call(this.oSB,D,H)){var W=l(D.f,R.A.e,R.A.s),k=l(H.f,R.B.e,R.B.s);W||k?((T==B?W:W&&!k)&&(S.push(t(D.first(),W)),y.set(D.first(),W),m.remove(T)),T!=B&&!W&&k&&(S.push(t(H.first(),k)),y.set(H.first(),k),m.remove(B))):(m.remove(T),m.remove(B))}}m.remove(T)}S.forEach(function(t){var e,o,n=t.i;(e=this.get(n))&&(o=!0,(s||i(s))&&e.e&&e.e.len()>1&&e.e.forEachU(function(e){return e!=n&&(o=y.has(e))&&(t.m=I(t.m,y.get(e))),!o},this),o&&t.m&&(f=f||[]).push(t))},this)}return f}.call(u,a)),h.call(this,s.call(u,a)))}function r(t){return this.mP.get(t)||0}var s,h,a,u,c,f=0,g=!0,y=0,S=this.nMx;for(this.lDo++;y=S&&(f=-1),!f&&1==this.lDo&&t.call(this),--this.lDo,f},Object.addPrototypeOf(U.prototype,w.prototype),U.prototype.init=function(t){return function(e,o){t.call(this),this.oT=e,this.r=0,this.oCBL=o||new C(e.oGC.oGL),this.oLgs=new T,this.I=new d.Arr,this.F=new d.Arr,this.O=new d.Arr,this.oSB=new b(this)}}(U.prototype.init),U.prototype.toB=function(t){var e=this.mTB&&this.mTB.get(t);return!e&&(!this.mTB||!this.mTB.has(t))&&(e=function(t){for(var e,o,i=new d.Arr(t),n=i.first();n;n=i.next(n))n.rgS?(o=!0,i.push(n.rgS)):(e=e||new O).add(n);if(o&=e&&e.len()&&1){e.s=e.e=e.at(0);for(var r=1,s=e.len();r0&&(e.e=n)}return o&&(e||null)}(t))&&(this.mTB=this.mTB||new Map).set(t,e),e},U.prototype.TB=function(t){function e(t,o){var i,n;return(n=this.toB(t))&&n.len()&&(i=(i=n.forEachU(function(t){return this.has(t)&&o.call(this,t)&&t},this))||n.forEachU(function(t){return e.call(this,t,o)},this)),i}var o=t;return this.has(t)||(o=e.call(this,t,function(t){return this.oCBL.has(t)})||e.call(this,t,function(t){var e=this.get(t);return e&&!e.isE()})||e.call(this,t,function(t){return!!t})),o},U.prototype.bB=function(){return this.I.first()},U.prototype.aIO=function(t,e,o){var i,n=this.oLgs,r=t[c(o)];if(r&&r.len){switch(o){case 1:i=e.cIO("i");break;case 2:i=e.cIO("o")}i&&r.forEach(function(r){i.add(r),n.pls(e.b,r,o,n.get(t.b,r,o))})}},U.prototype.rIO=function(t,e){var o,i,n=this.oLgs,r=t[c(e)];r&&(i=new d.Arr,r.forEach(function(r){(o=this.toB(r))?o.forEach(function(o){i.add(o),n.pls(t.b,o,e,n.get(t.b,r,e))}):i.add(r)},this),r.clear(),r.push(i))},U.prototype.xIO=function(t,e){var o=t[c(e)],i=0;return o&&this.mTB&&this.mTB.forEach(function(t,e){i|=o.remove(e)}),!!i},U.prototype.aE=function(t){t&&(this.rgE=this.rgE||new d.Arr).add(t)},U.prototype.cyc=function(t){function e(t){function e(t,e){return e.forEachU(function(e,o){var i;return t==e||(i=this.get(e))&&i.e&&i.e.has(t)?o+1:0},this)-1}var o,i=[],n=new d.Arr(t);i.push(n);for(var r,s,h,a,u,c,l,p=0;p=0)for(var f=s;f1&&(m=new d.Arr,c.forEach(function(t){(C=x.get(t))&&((T=!C.i||!C.i.len())||(O=r.get(t),C.i.forEachU(function(t){return!(T=!c.has(t)||O&&!O.has(t))})),T&&m.add(t))},this),m.len()>1)){m.sort(a),b=m.first();for(var e,o=(U=new d.Arr(b)).first();o;o=U.next(o))(e=x.get(o))&&(e.o&&U.push(e.o),e.s&&U.push(e.s),e.f&&U.push(e.f));(B=x.get(b))&&(E=new d.Arr,m.forEach(function(t){if(b!=t&&!U.has(t)&&(V=x.get(t))){!this.mRB&&(this.mRB=new Map).set(B.b,B.cpy()),this.mRB.set(V.b,V.cpy()),E.add(t),V.cIO("i").add(b),B.cIO("o").add(t),(I=l(b,b.getEnd(),t.getStart()))&&!s.get(b,t,2)&&s.pls(b,t,2,new L(I,b.isW()||t.isW())),U.add(t);for(var e,o=t;o;o=U.next(o))(e=x.get(o))&&(e.o&&U.push(e.o),e.s&&U.push(e.s),e.f&&U.push(e.f))}},this),E.len()&&(this.mLB=this.mLB||new Map).set(b,E))}},this),this.clear(),this.add(x)}if(!(e=this.pIO()))if(this.i=function(t){var e=this.mTB&&this.mTB.get(t);return e&&(t=e.s),t}.call(this,t),this.I.len()){if(this.I.len()>1){var W,k,P=new d.M1;this.I.forEach(function(t){for(var e,o=(W=new d.Arr(t)).first();o;o=W.next(o))(e=this.get(o))&&e.lnk(W);P.set(t,W)},this),(k=this.I.forEachU(function(t){return P.get(t).has(this.i)&&t},this))&&this.I.setPos(k,0),this.I.forEach(function(t){(!k||!P.get(k).has(t))&&this.F.add(t)},this)}}else this.forEachU(function(t){return t.isE()})&&(e=4)}return e},U.prototype.DoS=function(t){var e=t?this.clt(t):0,o=0;if(!e)if(this.I.len()){var i=d.Arr.empty,n=this.bB(),r=d.Cpy(this.oSB.bI(n)),s=f(this.oT);if(this.forEach(function(t){o+=(this.IO(t.b,"o")||i).len()},this),o=2*E(1,o),this.oSB.res(),this.oSB.bI(n,r),t&&this.forEach(function(t){this.oSB.bI(t.b).l=l(t.b,null,null,s)},this),this.oSB.SB(n,n)||(e=I(e,-2)),!e){var h,a=this.oSB.bI(n).e;this.I.forEachU(function(t){return t!=n&&(h=this.F.has(t),this.oSB.SD(t,h?t.getStart():p(t,a,-l(t)),h?t.getEnd():a),this.oSB.SB(t,t)||(e=min(e,-2))),e},this)}e||(this.oSB.nMx=o,e=this.oSB.DoS())}else e=-4;return this.r=e},U.prototype.DoM=function(t){var e,o,i,n,r,s,a,u,c,g,S=this.oT;if(!this.r&&(e=this.bB())&&this.has(t))if(o=this.oSB.bI(e),i=this.oSB.bI(t),y.call(o))if(y.call(i)){if(n=l(e,e.getStart(),o.s),this.forEach(function(t){var e,o=t.b,i=this.oSB.bI(o),n=o.getCanMove()?(e=o.seR())?e.s&&e.e?2:3:0:(e=o.se())&&1;r|=n,n&&e&&(i.r=d.Mrg({t:n},e))},this),(s=S.oI.GetDefSchedulePDM())&&((a=function(t){return t&&1==t.scheduleType&&Date.Create(t.scheduleDate)||null}(s))||(u=function(t){return t&&2==t.scheduleType&&Date.Create(t.scheduleDate)||null}(s)))){var m,C,L;this.forEach(function(t){y.call(L=this.oSB.bI(t.b))&&((!m||L.s.Compare(m)<0)&&(m=L.s),(!C||L.e.Compare(C)>0)&&(C=L.e))}),g=a?p(e,c=p(e,a,l(e,m,o.s)-n),o.l):p(e,c=p(e,u,-(l(e,o.s,C)+n)),o.l)}else r?this.oSB.bI(t).r=d.Mrg({t:1},t.se()):g=p(e,c=p(e,t.getStart(),-(l(e,o.s,i.s)+n)),o.l);c&&g&&v.call(o,c,g),!this.DoS()&&(this.r=function(){var t,e=0,o=f(this.oT);return this.oSB.rgB.forEach(function(i){y.call(t=this.oSB.bI(i))?i.SetOptions({start:t.s,end:h(t.e,-o)}):(this.aE(i),e=-5)},this),e}.call(this))}else this.r=-7;else this.r=-6;return this.r},x.prototype.init=function(t){this.o3=t},x.prototype.E=function(){function o(o,i){var n,r=o.getEnd();i.len()?t(r,n=i.first().getEnd())?i.add(o):e(r,n)&&(i.clear(),i.add(o)):i.add(o)}for(var i=new d.Arr,n=this.o3.oSB.rgB,r=n.first();r;r=n.next(r))o(r,i);return i},x.prototype.F=function(){function t(t){return this.o3.mRB&&this.o3.mRB.get(t)||this.o3.get(t)}function e(t,e){return this.o3.oCBL.lAB(t,e)}function o(t,e,o){e&&e.forEach(function(e){var i=this.o3.oLgs.srch(t,e)||P;Math.abs(l(e,e.getEnd(),p(t,t.getStart(),i.l,i.w)))=0},this);o=0;o++);return o}.call(this,t),f=this.u.length;if(p=0&&i(a,l)<=0&&(a=function(t,e){return t.Max(e)}(a,c),u=n(u,l),s=function(e){var o,i,n,r=e.GetBar(),s=r.hCOC(),h=1==s;if(h?e.GetShape()&&(n=function(t,e){return{b:t,s:e}}(r,e.getShape())):r.hC(0)&&(256&r.getHistogramType()||(o=r.gC().hV(8192)))&&(n=function(t,e){var o,i=(p.mBIT=p.mBIT||new Map).get(t);return!i&&p.mBIT.set(t,i=new Map),!(o=i.get(e))&&i.set(e,o={b:t,s:t.hS({fillColor:t.hC(function(){var o=(p.mBI=p.mBI||new Map).get(t);return!o&&p.mBI.set(t,o=new d.Arr),o.add(e),o.getPos(e)}())})}),o}(r,i=o?e.i().oP:e.i())),!n&&(n=function(t){var e=(p.mBT=p.mBT||new Map).get(t);return!e&&p.mBT.set(t,e={b:t}),e}(r)),i)n.s&&(!(i&&~r.hCSL()&&r.gC().oT.Column(r.hCSL()))||p.mLgd&&p.mLgd.has(i)||(p.mLgd=p.mLgd||new Map).set(i,{c:t(i,r.hCSL())||" ",s:n.s}),!s&&(p.mIBS=p.mIBS||new Map).set(e,function(t){return"Spline"==t.primitive&&((t=d.Cpy(t)).primitive=null),t}(n.s)));else if(h&&~r.hCSL()){var a,u,c,l=e.getHistLegend();l&&(a=n.s||r.getHistogramShape(),c=p.mLgd&&(u=p.mLgd.get(a))||{c:l,s:a},u?c.c.localeCompare(l)<0&&(c.c=l):(p.mLgd=p.mLgd||new Map).set(a,c))}return n}(o),o.eE()?function(t,e,o,i){var n,s,h,a,u=i.eE();if(u&&u.IsValid()){for(n=i.t().oGC.gethU(),s={s:(a=t.copy().Reset(n.s)).copy(),e:u.Evaluate(a,i)};a.Compare(e)<0;)s.e!=(h=u.Evaluate(a,i))&&(s.e&&r.call(this,s.s,a.copy(),o,i.rE(s.e)),s={s:a.copy(),e:h}),a.Next(n.s,n.c);s.e&&r.call(this,s.s,a.copy(),o,i.rE(s.e))}}.call(this,a,u,s,o):r.call(this,a,u,s,o.rE()))},o.prototype.compact=function(){for(var t=this.u,e=t.length,o=0;o.5}function h(i,h){if(1&n&&o.feT(function(n){var c,l,p,f,g,v=n.s||n.b.getHistogramShape(),S="Spline"==v.primitive,m=n.b.getShowHistogramValues(),C=n.b.getFormatHistogramValues(),L={},w=d.Apy(d.Cpy(v),d.Apy(i&&i.call(h||this,L,n)||L)),G=!S&&d.Apy(w,{frameColor:null}),O=S?w:v,b=S?function(o,i){t.drawShape(e,i,{points:o})}:function(e,o){o&&o.frameColor&&(t.save(),t.strokeStyle=o.frameColor,t.lineWidth=o.frameSize,e.push(e[0]),t.drawDir(e,0),t.restore())};(G||S)&&(o.feU(n,function(o,n,h){p=[g=this.d2X(o.s),a(h+n),this.d2X(o.e)-g,n*T],!i&&(this.rgV=this.rgV||[]).push({v:n,c:p}),G&&t.drawShape(p,G),m&&(c=m.Evaluate(u(n)))&&r(n,p,{cbkF:C&&function(t){return C.Evaluate(t)},cbkC:function(t){return t.width/2=o/2&&(!t.length||t[t.length-1].y-e>o)&&t.push({y:e,v:i})}if(e&&e.r&&e.d){i=i&&i/Math.abs(i)||1;var r,s=e.d.m,h=e.d.M,u=e.d.s,l=6*i,p=a(c(s))-a(c(s+u/5))>3?~~(l/2)+i:0,f=t.sizeHTMLText(h).height,g=3*f/4,y=[],v=[],S=260|(i<0?2:0);t.save(),t.strokeStyle=e.r,t.beginPath(),t.moveTo(o,a(c(s))),t.lineTo(o,a(c(h)));for(var m,C=s;C<=h;C+=u)if(t.moveTo(o,m=a(c(C))),t.lineTo(o+l,m),C!=s&&n(y,m,f,C),p&&C=i.v&&(t.stroke(),t.strokeStyle=i.c,t.beginPath(),i=null);t.stroke(),t.restore()}}(G,w),(p=w&&o.M>=w.v)&&((f=e.slice())[3]=a(w.v)-f[1],t.selClip(f),h.call(this,function(t){t.fillColor=w.c}),t.resClip(),(g=e.slice())[3]=d.BOf(e)-(g[1]=d.BOf(f)),t.selClip(g)),h.call(this),p&&t.resClip(),8&n&&(!o.l||o.l==o.i+1)&&w&&function(o){if(o){var i,n=[e[0],a(o.v)],s=e[2];t.save(),t.setLineDash([1]),t.drawHLine(n,s,o.c),r(o.v,null,{cbkF:function(t){return(i=o.t.getFormatHistogramValues())&&(t=i.Evaluate(t))," "+t+" "},cbkC:function(t){return[n[0]+s-t.width-8,n[1]-t.height/2,t.width+8,t.height]},tfi:{bgColor:"white",fgColor:o.c}}),t.restore()}}(w)},s.prototype.hI=function(){function t(){this.p=new d.M1,this.i=new d.Arr,this.g={}}function e(t,o,i){n(256)&&o.rgI&&o.rgI.len()?o.rgI.forEach(function(r){r.rgI&&r.rgI.len()?n(512)&&e(t,r,i):i.add(r,t?o:null)}):i.add(o,t?o.oP:null)}t.prototype.add=function(t,e){if(this.i.add(t)){e=e||null;var o=this.p.get(e);!o&&this.p.set(e,o=new d.Arr),o.add(t)}},t.prototype.ibS=function(t){return this.g.mIBS&&this.g.mIBS.get(t)},t.prototype.lgd=function(){var t;return this.g.mLgd&&!(t=this.g.mLgd.rgL)&&(t=[],this.g.mLgd.forEach(function(e){t.push(e)}),t.sort(function(t,e){return d.Cmp.S(t.c,e.c)}),this.g.mLgd.rgL=t),t};var o=this.gC().oT,i=new t,n=this.hV.bind(this),r=!n(1024),s=-1,h=function(){return!0},a=[];return n()&&(n(8)?this.gC().getSel().forEach(function(t){e(r,t.i(),i)}):n(1)?this.oGV.getVI().forEach(function(t,o){e(r,o,i)}):n(128)?this.oGV.getLIV().rgVI.forEach(function(t,o){e(r,o,i)}):n(2)?o.getSel().forEach(function(t){e(r,t,i)}):(!n(4)||~(s=function(){var t=(4294901760&this.gC().getHistogramView())>>16;return t1){var c=[],l=new Map;h.forEach(function(t,e){c.push(e)}),c.sort(function(t,o){return e.getPos(o)-e.getPos(t)}).forEach(function(t){l.set(t,h.get(t))}),h=l}return h}(t)).forEach(function(t){h=E(h,t.M),a.push(t)})}),a.forEach(function(t){t.M=h}),n}return this.oHD||(this.oHD=t.call(this))},s.prototype.drawHG=function(e,o,i){i=i||15+(this.isN()?0:16);var n=this.drawHD.bind(this),r=this.hD(),s=2&i&&!this.hV(4096);1&i&&(this.rgV=null),r.p.len()&&((o=o.slice())[3]/=r.p.len(),r.p.forEach(function(r,h){!function(t,o){var r=0;e.selClip(t),o.forEach(function(s){s.i=r++,s.l=o.size,n(e,t,s,i)}),e.resClip()}(o,r.mHD),s&&e.drawHTMLText(t(h),d.IRt(o.slice(),-4,0),4),d.ORt(o,0,o[3])}))},s.prototype.isN=function(){var t=this.oW.GetClientRect(),e=this.oW.oCW.W("tree.histogram"),o=e&&e.GetClientRect();return o&&this.oW.GetDock()==e.GetDock()&&t[1]==o[1]&&d.ROf(o)-d.LOf(t)<=d.D.WindowSplitSize},s.prototype.V=function(t){function e(t){var e,i=0;return o.forEach(function(o){(e=t-o.c[0])>=0&&e