/* @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 t instanceof Array}function i(t){return t instanceof f.Arr}function n(t){return t instanceof Function}function r(t){return t instanceof ClipboardEvent}function s(t){return t instanceof f.Schedule.Event}function h(t){return t instanceof f.Schedule.MarkZone}function u(t){return t instanceof f.Schedule.SV}function l(){return Math.max.apply(0,arguments)}function a(){return Math.min.apply(null,arguments)}function c(t,e,o){return null==t?~~o:f.s2F(t,e)}var p,f=f||window.exontrol,g=f.UR;if(f.Calendar){var y=f.Shapes.Calendar;y&&(y.hframe2=void 0,y.today.normal.tfi.bold=!1,y.select.normal={frameColor:"dodgerblue",primitive:"Circle",frameSize:2,pad:1},y.select.hover=void 0)}f.Def.Schedule={},f.Shapes.Schedule={},f.Mrg(f,function(){function t(t,e,o){this.oT=t,this.init(e,o)}function r(t,e){this.init(t,e)}return f.Calendar&&Object.addPrototypeOf(t.prototype,f.Calendar.prototype),t.prototype.onLD=function(t){return function(){t&&t.apply(this,arguments),this.oT.onCC(0)}}(t.prototype.onLD),t.prototype.SetClientRect=function(t){return function(){var e,o=!this.lnt,i=o&&this.gLyt().table;t&&t.apply(this,arguments),o&&i&&(e=this.gLyt().table)&&(i.h!=e.h||i.v!=e.v)&&this.oT.onCC(1)}}(t.prototype.SetClientRect),t.prototype.onselchange=function(t){return function(){t&&t.apply(this,arguments),this.oT.onSC2.apply(this.oT,arguments)}}(t.prototype.onselchange),t.prototype.drawO=function(t){return function(e,o,i,n,r){this.gSV().drawSC(t,this,e,o,i,n,r)}}(t.prototype.drawO),t.prototype.eU=function(t){return function(){t.apply(this,arguments),this.oW&&this.oW.onUI()}}(t.prototype.eU),t.prototype.fit=function(){var t=this.gLyt(),e=t.size,o=t.table,i=this.getMinMonth();return{x:16+~~(e.width/o.h*i.x),y:16+~~(e.height/o.v*i.y)}},t.prototype.gSV=function(){return this.oT.oSV},t.eqSY=function(t,e){return t==e||t&&e&&t.y==e.y&&(t.d==e.d||t.d&&e.d&&!t.d.Compare(e.d))},t.prototype.gSY=function(){var t,e,o={};return this.getSel().forEach(function(o){var i=o.GetYear();(null==t||t>i)&&(t=i),(null==e||o>e)&&(e=o)}),o.y=null==t?(this.GetDate()||Date.Today()).GetYear():t,null!=e&&e.GetYear()!=o.y&&(o.d=e),o},r.version="3.0",r.type="Schedule",r.XML=function(){function t(t){return null!=t?t.toLowerCase():t}function e(o){var i,n,r="^"==o.charAt(0);r&&(o=o.substr(1)),~(i=o.indexOf("/"))&&(n=o.substr(i+1),o=o.substr(0,i));for(var s,h=function(e){e=t(e);for(var o,i=[],n=0,r=this.getElementsByTagName("*"),s=r.length;n>=8))+",",i+=(255&(t>>=8))+")"),i||e}}}(),r.allowRurPart=function(t,e,o){return!o||!e||e.indexOf(t)>=0&&(!function(t){return t.split(",").forEachU(function(t){return this.has(t)},this)}.call(o,e)||o.has(t))},r.EventResizableEnum={exNoResizable:0,exResizableStart:1,exResizableEnd:2,exResizableBoth:3},r.OnSelectDateEnum={exFitSelToView:-1,exNoViewChange:0,exEnsureVisibleDate:1},r.ShowViewCompactEnum={exViewCalendar:0,exViewCalendarCompact:-1,exViewSingleRow:1,exViewSingleColumn:2,exViewSingleRowLockHeader:3},r.OnResizeControlEnum={exResizePanelLeft:0,exResizePanelRight:1,exDisableSplitter:128,exHideSplitter:256,exChangePanels:512,exCalendarFit:1024,exCalendarAutoHide:2048},r.SingleSelEnum={exDisableSel:0,exEnableSel:1,exSingleSel:2,exToggleSel:4,exDisableCtrlSel:8,exDisableShiftSel:16,exDisableDrag:32},r.Options={allowUndoRedo:null,undoRedoQueueLength:null,scrollBars:null,tfi:null,locked:null,readOnly:!1,wheelChange:null,smooth:null,shapes:null,cursors:null,singleSel:null,zoom:null,zoomLevels:null,formatText:null,pad:null,imageSize:null,imageAlign:null,allowActions:null,scrollPos:null,toolTipDelay:null,toolTipPopDelay:null,toolTipWidth:null,calendar:null,onResizeControl:null,showViewCompact:null,dayViewWidth:null,dayViewHeight:null,paneWidthLeft:null,paneWidthRight:null,headerDayHeight:null,showHighlightEvent:null,headerDayLongLabel:null,headerDayShortLabel:null,dayStartTime:null,dayEndTime:null,showGroupingEvents:!1,displayGroupingButton:!1,headerGroupHeight:null,applyGroupingColors:null,onSelectDate:null,selectEventStyle:null,allowMoveEventToOtherGroup:null,defaultEventToolTip:null,defaultEventShortLabel:null,defaultEventLongLabel:null,defaultEventExtraLabel:null,shortDateFormat:null,shortTimeFormat:null,longDateFormat:null,longTimeFormat:null,showEventLabels:null,createEventLabel:null,updateEventsLabel:null,showMarkZone:null,showEvents:null,showAllDayHeader:null,headerAllDayEventHeight:null,allowMultiDaysEvent:null,allowAllDayEventScroll:null,markZones:null,groups:null,markZones:null,events:null,selection:null,timeScale:null,misc:null,background:null},g&&(r.blockUR=function(t){return function(){var e=this,o=arguments;(this.oT||this).blockUR(function(){t.apply(e,o)})}}),r.bSCTX=function(t,e,o,i){var n;return e&&(t.drawShape(o,e,i),n=f.TFI.bCTX(t,e.tfi),null!=e.opacity&&((n=n||{}).opacity=t.globalAlpha,t.globalAlpha=e.opacity)),n},r.eSCTX=function(t,e){null!=e.opacity&&(t.globalAlpha=e.opacity),f.TFI.eCTX(t,e)},r.sCTX=function(t,e,o,i,n,s){var h=r.bSCTX(t,e,o,i);n&&n.call(s),h&&r.eSCTX(t,h)},r.prototype.init=function(t,e){this.lnt=this.lnt||0,this.lnt++,this.oZ=new r.MarkZones(this),this.oG=new r.Groups(this),this.oE=new r.Events(this),this.lAI=0,this.oSV=null,this.rgSV=[],this.rgSel=null,this.sSA="smth-"+f.Rand(),this.iLts(),this.oCW=new f.CW(t,{AllowXChg:0,ScrollBars:f.Def.Schedule.scrollBars}),this.oCW.oT=this,this.Shortcuts=this.oCW.oSts,g&&(this.oUR=new g.M({oC:this,cU:p.Update,onUR:this.onundoredo}),this.oUR.oT=this,this.oUR.gUR=function(t){return function(){return!this.oT.isReadOnly()&&t.apply(this,arguments)||null}}(this.oUR.gUR),this.Shortcuts.Add("CTRL + Z",this.Undo,this,"undoes the last action or a sequence of actions"),this.Shortcuts.Add("CTRL + Y",this.Redo,this,"redoes the last action that was undone (reverses the Undo method)")),this.initCW(),this.import(),f.expO(r.Options,this,this.oSV),this.cwbU(),this.SetOptions(e,!0),this.cweU(),f.DPR.Reg(this),this.oCW.onCR(),--this.lnt},r.prototype.defAA=function(){return"fit(Shift+MButton),zoom(Ctrl+MButton,Alt+MButton),group-resize,day-resize(MButton),select(Shift,Ctrl),group-drag,create(Alt),move,scroll"},r.prototype.roAA=function(){return"scroll,zoom,fit,select"},r.prototype.allP=function(){return"view(Schedule.SV),timescale(Schedule.TimeScale)"},r.prototype.Clear=function(){this.bU(),this.oZ.Clear(),this.oG.Clear(),this.oE.Clear(),this.eU()},r.prototype.p2E=function(t){return this.feSVU(function(e){return e.oW&&e.p2E(t)})},r.prototype.onAddEvent=function(t){this.lAI||(this.onLE(),this.onaddevent(t))},r.prototype.onaddevent=function(t){this.oLts.onaddevent.do(t)},r.prototype.onDelEvent=function(t){this.removeSel(t),this.onLE(),this.onremoveevent(t)},r.prototype.onremoveevent=function(t){this.oLts.onremoveevent.do(t)},r.prototype.onMoveEvent=function(){},r.prototype.onAddGroup=function(t){this.onLE()},r.prototype.onDelGroup=function(t){this.onLE()},r.prototype.onAddMarkZone=function(t){this.onLZ()},r.prototype.onDelMarkZone=function(t){this.onLZ()},r.prototype.feSV=function(t,e){f.Schedule.SV.prototype[t]?this.rgSV.forEach(function(e){e[t].call(e)},this):this.rgSV.forEach(t,e)},r.prototype.feSVU=function(t,e){return f.Schedule.SV.prototype[t]?this.rgSV.forEachU(function(e){e[t].call(e)},this):this.rgSV.forEachU(t,e)},r.prototype.feE=function(t,e){e=e||this,this.oE.forEach(function(o){t.call(e,o)})},r.prototype.feEU=function(t,e){return this.oE.forEachU(t,e||this)},r.prototype.setTimeout=function(){return f.setTimeout.apply(this,arguments)},p=f.Def.UR.Schedule={Update:"Smooth",AddEvent:"AddEvent",RemoveEvent:"RemoveEvent",MoveEvent:"MoveEvent",UpdateEvent:"UpdateEvent"},r.prototype.gUR=function(){return this.oUR&&this.oUR.gUR()},r.prototype.onundoredo=function(t){this.oSV.onChange("undo-redo",t)},r.prototype.GetAllowUndoRedo=e,r.prototype.SetAllowUndoRedo=e,r.prototype.GetUndoRedoQueueLength=e,r.prototype.SetUndoRedoQueueLength=e,r.prototype.CanUndo=e,r.prototype.CanRedo=e,r.prototype.StartBlockUndoRedo=e,r.prototype.EndBlockUndoRedo=e,r.prototype.BlockUndoRedo=function(t,e){n(t)&&(this.StartBlockUndoRedo(),t.call(e||this),this.EndBlockUndoRedo())},r.prototype.Undo=e,r.prototype.Redo=e,r.prototype.UndoListAction=function(t,e){},r.prototype.RedoListAction=function(t,e){},r.prototype.UndoRemoveAction=function(t,e){},r.prototype.RedoRemoveAction=function(t,e){},r.prototype.GroupUndoRedoActions=function(t){},r.prototype.BeginUpdate=function(){this.oCW.CWs().forEach(function(t){t.bU()})},r.prototype.bU=r.prototype.cwbU=r.prototype.BeginUpdate,r.prototype.EndUpdate=function(){1==this.oCW.lR&&this.fU(),this.oCW.CWs().forEach(function(t){t.eU()})},r.prototype.eU=r.prototype.cweU=r.prototype.EndUpdate,r.prototype.Update=function(t,e){this.bU(),t&&t.call(e||this),this.eU()},r.prototype.fU=function(){},r.prototype.bR=function(){this.oCW.CWs().forEach(function(t){t.bR()})},r.prototype.eR=function(){this.oCW.CWs().forEach(function(t){t.eR()})},r.prototype.Refresh=function(){this.bU(),this.oG.resVG(),this.onLD(),this.onUI(),this.eU()},r.prototype.onUI=function(){this.oCW.onUI()},r.prototype.uLD=function(){this.oC&&!t.eqSY(this.oC.gSY(),this.gLDV().sy)&&this.onLD()},r.prototype.onLD=function(t){this.onLE(),this.onLZ(),this.oLDV&&(this.oLDV=null,this.feSV("onLD")),t&&this.setTimeout(function(){this.bU(),this.eU()})},r.prototype.onLE=function(){this.oLE&&(this.oLE=null,this.feSV("onLE"))},r.prototype.onLx=function(t,e){t=new Date(t),e=new Date(e),this.oE.gRE().forEach(function(o){var i;o.isVisible()&&(i=o.gRx())&&i.gA(t,e)})},r.prototype.onLZ=function(){this.oLZ&&(this.oLZ=null,this.feSV("onLZ"))},r.prototype.onCC=function(t){t<2&&this.onLD(!t)},r.prototype.onSC2=function(t){this.lnt||(this.bR(),this.uLD(),this.oSV.onSC2(),this.eR()),this.oncalselchange(t)},r.prototype.oncalselchange=function(t){this.oLts.oncalselchange.do(t)},r.prototype.resO=function(){this.oLE&&this.oLE.resEO(),this.oLZ&&this.oLZ.resZO()},r.prototype.issD=function(t){return this.oC&&this.oC.isSelected(t)},r.prototype.sD=function(){return this.oC&&this.oC.getSel()||f.Arr.empty},r.prototype.fD=function(){return this.sD().first()||this.oC&&this.oC.GetDate()||Date.Today()},r.prototype.updSPR=function(){this.feSV("updSPR")},r.prototype.iLts=function(){this.Listeners=this.oLts=new f.Lts,this.oLts.add("onselchange"),this.oLts.add("oncalselchange"),this.oLts.add("onclick"),this.oLts.add("onanchorclick"),this.oLts.add("onscroll"),this.oLts.add("onchange"),this.oLts.add("onaddevent"),this.oLts.add("onremoveevent")},r.prototype.addSV=function(t,e){function o(e){return e.repAll("name",t)}var i=null;if(null!=t&&t.trim().length||(t="schedule"+this.rgSV.length),!this.oCW.W(t)){var n=!this.rgSV.length,r=(this.oCW.W("main")||this.oCW).Add(t,f.Mrg({Dock:n?5:4,Size:256},e));i=new f.Schedule.SV(this),this.rgSV.push(i),this.oSV=this.oSV||i,!(r.GetDock()%2)&&r.SetPosition(this.oCW.W("schedule").GetPosition()+1),r.Add("client",{Dock:5,HoverExtends:o("control,top,bottom,main.footer,vertical,vscroll,grip,name,name.hscroll"),Extends:o("name.hscroll,vertical"),HScroll:o("name.hscroll"),VScroll:"vscroll",Control:i}),r.Add("time",{Dock:3,Size:i.oTS.getWidth(64),VScroll:"vscroll",Resizable:i.oTS.getAllowResize(!0),Control:i.oTS}),r.Add("hscroll",{Dock:2,Resizable:!1,Size:16,VisibleExtends:o("name.client"),Opacity:0,HoverOpacity:1,Control:new f.ScrollBar})}return i},r.prototype.AddScheduleView=function(t,e){this.bU();var o=this.addSV(t,e);return this.eU(),o},r.prototype.delSV=function(t){null!=t&&t.trim().length||(t=this.rgSV[this.rgSV.length-1].oW.opW.GetName());var e=!1,o=this.oCW.W(t);if(o){var i=null,n=this.oCW.W(o.GetName()+".client");if(n&&u(i=n.GetC())&&i!=this.oSV){var r=this.rgSV.indexOf(i);(e=r>=0)&&(this.rgSV.splice(r,1),this.oCW.Remove(o))}}return e},r.prototype.RemoveScheduleView=function(t){this.bU(),this.delSV(t),this.eU()},r.prototype.ScheduleView=function(t){var e=this.oCW.W(t+".client");return e&&e.oC&&~this.rgSV.indexOf(e.oC)&&e.oC||null},r.prototype.initCW=function(){function e(){var t="grip",e="",o=null,i=this.oCW.W(t);this.rgSV.forEach(function(i){i.oW&&i.oW.opW&&(t+=","+(e=i.oW.opW.GetShortName()+".hscroll"),o=o||this.oCW.W(e))},this),o&&o.SetSizeExtends(t),i&&i.SetVisibleExtends(t)}var o,i=this,n=this.oCW;if(this.oCW.canvas.addEventListener("dragover",this.localdragover=function(t){return i.ondragover(t)}),this.oCW.canvas.addEventListener("drop",this.localdrop=function(t){return i.ondrop(t)}),this.oCW.onAdd=function(t){return function(){return e.call(i),t.apply(this,arguments)}}(this.oCW.onAdd),this.oCW.onRemove=function(t){return function(){return e.call(i),t.apply(this,arguments)}}(this.oCW.onRemove),this.oCW.SetClientRect=function(t){return function(){t.apply(this,arguments),this.onCR()}}(this.oCW.SetClientRect),this.oCW.onCR=function(){(function(){this.lIC||(this.lIC=this.setTimeout(function(){~this.oT.oSV.getPaneWidthRight()&&this.SetPaneWidthRight(this.getPaneWidthRight()),this.lSh++,this.uLD(),this.sD().len()?this.onSC2():this.EnsureVisibleDate(this.oT.fD()),--this.lSh}))}).call(this.oT.oSV),this.oT.Update()},this.oCW.canAXChg=(this.oCW.canAXChg,function(){}),n=n.Add("control",{Dock:5}),f.Calendar){var r=n.Add("calendar",{Dock:3,Size:196,Control:this.oC=new t(this)});r.aClient=function(){var t,e,o,i,n=this.client;this.IsMinRec()||!(t=this.oC.gSV())||t.oT.lnt||t.lSh||(t.rcCF()&&(e=this.oC.fit(),n[2]=l(n[2],e.x),n[3]=l(n[3],e.y)),t.rcAH()&&this!=this.oCW.oHovW?(n[2]=0,n[3]=0):(~(o=t.getPaneMinWidthLeft())&&(n[2]=l(n[2],o)),~(i=t.getPaneMinWidthRight())&&(n[2]=a(n[2],this.oCW.GetClientRect()[2]-i))))},r.onmIO=function(t){if(this.isAH()){var e=this.oC.oT,o=e.oSV;clearTimeout(this.hmIO),this.hmIO=setTimeout(function(){!function(t){e.Update(function(){t?(r.SetSize(r._autoS),r._autoS=null):(null==r._autoS&&(r._autoS=r.GetSize()),r.SetSize(0)),o.lSh++,o.onSC2(),--o.lSh})}(!t)},t?512:256)}},r.isAH=function(){return this.oC.gSV().rcAH()},r.onHovI=function(t){return function(){t.apply(this,arguments),this.onmIO(!1)}}(r.onHovI),r.onHovO=function(t){return function(){t.apply(this,arguments),this.onmIO(!0)}}(r.onHovO)}(o=n.Add("main",{Dock:5}).Add("vertical",{Dock:4,Resizable:!1,Size:16,VisibleExtends:"schedule.client,vscroll",Opacity:0,HoverOpacity:1})).Add("grip",{Dock:2,AllowXChg:!1,Size:16,Resizable:!1}),o.Add("vscroll",{Dock:5,AllowXChg:!1,Resizable:!1,Control:new f.ScrollBar}),this.addSV("schedule"),this.oSV.aRC()},r.prototype.w2P=function(t){function e(){function t(t){var e=[];return f.B.split(t).forEach(function(t){t.caption&&t.subText&&e.push({n:t.caption,p:function(t){var e=f;return t.split(".").forEach(function(t){e=e[t]}),e.prototype}(t.subText)})}),e}return this._allP||(this._allP=t.call(this,this.allP()))}var o,i=t&&t.oC&&Object.getPrototypeOf(t.oC);if(i)for(var n,r=e.call(this),s=0,h=r.length;!o&&s1),this.rgSel=null),i&&(this.rgSel=this.rgSel||new f.Arr).push(t)),e|=o!=this.isSelected(t);return e}var s=!1,h=2&(e=e||{}).selType,u=function(t){var e=null;if(null!=t){var n=this.oE,s=n.Item;t instanceof r.Events?t==this.oE&&(e=this.oE.rgE):o(t)||i(t)?(e=new f.Arr,t.forEach(function(t){e.ann(s.call(n,t))})):e=s.call(n,t)}return e}.call(this,t);return i(u)?h?u.forEach(function(t){s|=n.call(this,t)},this):(s=!u.equal(this.rgSel))&&(this.isSingleSel()?n.call(this,u.last()):(this.rgSel=new f.Arr,u.forEach(function(t){t.isSelectable()&&this.rgSel.push(t)},this))):s=n.call(this,u),s&&(i(this.rgSel)&&(this.rgSel.len()||(this.rgSel=null)),(null==e.selChange||e.selChange)&&(this.feSV("invAO"),this.onSel())),s},r.prototype.onSel=function(){this.onselchange(this.GetSelection())},r.prototype.onselchange=function(t){this.oLts.onselchange.do(t)},r.prototype.onZoom=function(){this.lZ=this.lZ||0,this.lZ++||(this.feSV(function(t){var e=t.oTS.oW;e.SetSize(t.unscaled(e._nS=e._nS||e.GetSize()))},this),this.resO()),--this.lZ},r.prototype.gLE=function(){return this.oLE||(this.oLE=this.nLE())},r.prototype.nLE=function(){return new r.LE(this)},r.prototype.gLZ=function(){return this.oLZ||(this.oLZ=this.nLZ())},r.prototype.nLZ=function(){return new r.LZ(this)},r.prototype.gLDV=function(){return this.oLDV||(this.oLDV=this.nLDV())},r.prototype.nLDV=function(){return new r.LDV(this)},f.ComboBox&&(r.prototype.dCBl=function(t,e,o){o.oO.label=this.getSel().join()},r.prototype.cCB=function(t){var e=this.e2V(t);return!e||u(e)},r.prototype.sCB=function(t){return t&&this.SetSelection(null),this.getSelCount()},f.CW.prototype.SetCanvas=function(t,e){return f.ComboBox.implExHost(t,"onselchange,onchange,onscroll")}(f.CW.prototype.SetCanvas)),Object.defineProperty(r.prototype,"Calendar",{get:function(){return this.oC},configurable:!0}),g&&(["SetEvents","Clear"].forEach(function(t){r.prototype[t]=r.blockUR(r.prototype[t])}),r.prototype.nUR=function(t,e,o){this.blockUR(function(i){e.call(o||this,i.New(t))})},r.prototype.blockUR=function(t,e){e=e||this;var o=this.gUR();o?o.Block(function(){t.call(e,o)},this):t.call(e)},r.prototype.onAddEvent=function(t){return function(e){t.apply(this,arguments),this.gUR()&&this.nUR(p.AddEvent,function(t){e.arUR(t)})}}(r.prototype.onAddEvent),r.prototype.onDelEvent=function(t){return function(e){t.apply(this,arguments),this.gUR()&&this.nUR(p.RemoveEvent,function(t){t.del=!0,e.arUR(t)})}}(r.prototype.onDelEvent),r.prototype.onMoveEvent=function(t){return function(e,o){t.apply(this,arguments),this.gUR()&&this.nUR(p.MoveEvent,function(t){e.mvUR(t,o)})}}(r.prototype.onMoveEvent)),f.expO({Events:null,Groups:null,Layout:null,Statistics:null,Selection:null},r.prototype),{Schedule:r}}()),f.Mrg(f.Schedule,function(){function t(t){var e,n=f.Arr.empty;return null!=t&&(e=t,n=new f.Arr,i(t)?e=t.rgE:o(t)||(e=[t]),e.forEach(function(t){n.ann(this.Item(t))},this)),n}function e(t){return t&&t.getTime?t.getTime():t}function u(t){return"b"+f.ToS(t)}function y(t){return u("gh-"+e(t))}function S(t){return u("gc-"+e(t))}function d(t){return u("ash-"+t.s)}function v(t){return u("asc-"+t.s)}function E(t){return t-t%K}function D(t,e){return t&&e?f.Inh(t,e):t||e}function m(t){return t&&!(t.normal||t.hover||t.click||t.disabled)&&(t={normal:t}),t}function T(t){var e,o,i,n,r,s=new f.BiM,h=new Map,u=new Map,l=new Map,a=T.toK;f.B.split(t).forEach(function(t){(o=t.subText)&&(n="get"+f.getP(o),r="Set"+f.getP(o),t.flags&&(n=t.flags.get("get")||n,r=t.flags.get("set")||r),e=~~t.caption,i=a(o),s.set(e,o),h.set(i,o),h.set(e,e),u.set(e,n),u.set(i,n),l.set(e,r),l.set(i,r))}),this.o=s,this.k=h,this.g=u,this.s=l}function C(t,e){this.oT=e,(t=f.ToS(t))&&(~t.toLocaleLowerCase().indexOf("freq")?f.ICalendar&&(this.oEx=f.ICalendar.IRecur.Parse(t),(this.valid=this.oEx.valid())&&(this.eval=function(t){var e=this.oT.gLDV().sy;return this.gA(e.f,e.t).has(E(t.getTime()))})):(this.gA=function(){},this.oEx=f.E.Create(t,"value"),(this.valid=this.oEx.IsValid())&&(this.eval=function(t){return this.oEx.Evaluate(function(){return t})})))}function G(t){this.init(t)}function b(t,e){this.oZ=t,this.oO={},this.setOpts(e)}function w(t){this.init(t)}function R(t,e){this.oE=t,this.oO={},this.setOpts(e)}function A(t){this.init(t)}function O(t,e){this.oG=t,this.oO={},this.setOpts(e)}function U(t){this.init(t)}function L(t,e){this.rgE=e.forEach?e:[e],this.init(t)}function V(t){this.init(t)}function x(t){this.init(t)}function M(){this.init()}function W(){this.init()}function H(t,e){this.oSV=t,this.get(e||0)}function I(t){this.init(t)}function k(t){this.init(t)}function P(t){this.init(t)}var Z,z,F=1234,N=1/24/60/60/2,B=f.G,K=f.msday,X=null,Y=24;T.toK=function(t){return f.IsI(t)?~~t:t&&t.toLowerCase&&t.toLowerCase()||t},T.prototype.toK=function(t){var e=T.toK(t);if(this.k.has(e))return e},T.prototype.toO=function(t){var e=this.k.get(this.toK(t));return f.IsI(e)?this.o.get(e):e},T.prototype.toI=function(t){var e=this.k.get(this.toK(t));return f.IsI(e)?e:this.o.getKey(e)},T.prototype.get=function(t){return this.g.get(this.toK(t))},T.prototype.set=function(t){return this.s.get(this.toK(t))},Z=function(){function t(t){(t=f.ToS(t)).startsWith("=")&&(t=t.substr(1)),this.oEx=f.E.Create(t)}function e(t){this.c=t}var o=new Map,i=new Map,n=new e;return t.prototype.eval=function(t){return this.oEx.Evaluate(function(e,o){return t.toFormat(e,o)})},e.prototype.evalEv=function(e,o){var n=f.H.SetEObj(function(o){var n=i.get(o);return!n&&i.set(o,n=new t(o)),n.eval(e)},this),r=o.call(this);return f.H.SetEObj(n),r},e.prototype.size=function(t,e,o,i){return this.evalEv(t,function(){return e.sizeHTMLText(this.c,o,i)})},e.prototype.draw=function(t,e,o,i,n){return this.evalEv(t,function(){return e.drawHTMLText(this.c,o,i,n)})},e.prototype.text=function(t){return this.evalEv(t,function(){return f.H.TextNoHTML(this.c)})},{Get:function(t){var i;return null!=t&&!(i=o.get(t))&&o.set(t,i=new e(t)),i||null},Set:function(t){return n.c=t,n},XC:(i.clear(),void o.clear())}}();var j={minHeight:1,requireTimeScaleHeight:4,displayTimeScaleHeight:1,requireRulerDistance:1,groupingButtonPrompt:"Enter the id or index of each visible-group (separated by comma):",arrowSizeMultiDatesEvent:[3,6],createEventMargin:6,eventMargin:3,padSelectEvent:3,formatGroupCaption:262149,dragAlpha:.5,dragAlphaNegate:!1,dragDummyAlpha:1,allowEmptyEvents:1,formatEventShortLabel:262176,formatEventLongLabel:16,formatEventExtraLabel:32808,formatCreateEventLabel:272,formatUpdateEventLabel:272,eventDisplayMarginsSep:" - ",formatMarkZoneCaption:262165,arrangeEventsOnDrag:!1,dragStartOnMove:1,ensureVisibleOnDrag:-1},_={majorTimeRulerColor:"#C0C0C0",majorTimeRulerStyle:1,timeScaleMajorTimeRulerColor:"#C0C0C0",timeScaleMajorTimeRulerStyle:1,timeScaleMinorTimeRulerColor:"#C0C0C0",timeScaleMinorTimeRulerStyle:1,groupingButtonCaption:"…",eventContinueDay:"black"};C.prototype.eval=function(t){},C.prototype.gA=function(t,e){var o,i=t.GetYear()-1,n=e.GetYear()+1;return(!this.rgA||ithis.rgA.eY)&&(t=Date.Create(i,1,1),o={count:((e=Date.Create(n,12,31))-t)/K,until:e,filter:E},this.oEx.has("DTSTART")||(o.start=t),this.rgA=this.oEx.all(o),this.rgA.sY=i,this.rgA.eY=n),this.rgA};var q={start:null,end:null,time:null,groupID:null,caption:void 0,visible:null,key:null,shape:null,repetitive:null,eventShape:null,timeScaleShape:null};G.prototype.init=function(t){this.oT=t,this.rgZ=new f.Arr,this.rgZ.onRemove=t.onDelMarkZone.bind(t),this.import()},G.prototype.import=function(){var t=this.oT;["bU","eU"].forEach(function(e){this[e]=t[e].bind(t)},this),["has","len","forEach","forEachU","add","indexOf","getPos","setPos"].forEach(function(t){this[t]=this.rgZ[t].bind(this.rgZ)},this)},G.prototype.onLZ=function(){this.oT.onLZ(),this.resVeS()},G.prototype.resVeS=function(){this.rgVeS=null},G.prototype.resKZ=function(){this.mKZ=null},G.prototype.gVeS=function(){return this.rgVeS||(this.rgVeS=function(){var t=[];return this.forEach(function(e){e.isVisible()&&e.getEventShape()&&t.push(e)}),t}.call(this))},G.prototype.Add=function(t){this.bU(),this.resKZ();var e=arguments,o=this.add(new f.Schedule.MarkZone(this,2==e.length?{start:e[0],end:e[1]}:f.IsO(t)?t:{time:t}));return this.oT.onAddMarkZone(o),this.eU(),o},G.prototype.GetCount=function(){return this.rgZ.len()},G.prototype.Item=function(t){var e=null;return~~t===t?e=this.rgZ.at(t)||null:h(t)?e=this.rgZ.has(t)?t:null:null==(e=function(t){var e=t.mKZ;return null==e&&(t.mKZ=e=new Map,t.forEach(function(t){var o=t.getKey();!e.has(o)&&e.set(o,t)})),e}(this).get(t))&&(e=this.rgZ.at(t)||null),e},G.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},G.prototype.toA=function(e){return t.call(this,e)},G.prototype.RemoveRange=function(t){return this.bU(),this.resKZ(),this.rgZ.removeRange(t=this.toA(t)),this.eU(),t.length},G.prototype.Clear=function(){this.bU(),this.oT.resSel(),this.resKZ(),this.rgZ.clear(),this.eU()},b.prototype.ao=function(t){return this[t]||(this[t]={})},b.prototype.getType=function(){return"mark-zone"},b.prototype.gS=function(){return this.oZ.oT},b.prototype.bU=function(){this.oZ.bU()},b.prototype.eU=function(t){t&&this.oZ.onLZ(),this.oZ.eU()},b.prototype.dSV=function(){return this.gS().oSV},b.prototype.Remove=function(){return this.oZ.Remove(this)},b.prototype.GetOptions=function(){return this.oO},b.prototype.SetOptions=function(t){this.bU(),this.setOpts(t),this.eU()},b.prototype.setOpts=function(t){for(var e in t){var o=this[f.setM(e)];o&&o.call(this,t[e])}},b.prototype.GetIndex=function(){return this.oZ.indexOf(this)},b.prototype.GetKey=function(){return this.oO.key},b.prototype.SetKey=function(t){this.bU(),this.oZ.resKZ(),this.oO.key=t,this.eU()},b.prototype.toString=b.prototype.getKey=function(){return f.ToS(this.GetKey()||this.GetCaption()||this.GetIndex())},b.prototype.GetVisible=function(){return this.oO.visible},b.prototype.SetVisible=function(t){this.bU(),this.oO.visible=t,this.eU(!0)},b.prototype.isVisible=b.prototype.getVisible=function(){return null==this.GetVisible()||this.GetVisible()},b.prototype.GetShape=function(){return this.oO.shape},b.prototype.SetShape=function(t){this.bU(),this.oO.shape=f.S.A2S(t),this.eU()},b.prototype.getShape=function(){var t=this.GetShape();return t&&t.normal||t},b.prototype.GetCaption=function(){return this.oO.caption},b.prototype.SetCaption=function(t){this.bU(),this.oO.caption=t,this.eU()},b.prototype.getCaption=function(){return f.ToS(this.GetCaption())},b.prototype.GetStart=function(){return this.oO.start},b.prototype.SetStart=function(t){this.bU(),this.oO.start=t,this.onSE(),this.eU(!0)},b.prototype.getStart=function(){return new Date(this.se().s)},b.prototype.GetEnd=function(){return this.oO.end},b.prototype.SetEnd=function(t){this.bU(),this.oO.end=t,this.onSE(),this.eU(!0)},b.prototype.getEnd=function(){return new Date(this.se().e)},b.prototype.GetTime=function(){return this.oO.time},b.prototype.SetTime=function(t){this.oO.time=t,this.sse(t,t,!0)},b.prototype.getTime=b.prototype.getStart,b.prototype.onSE=function(){this.oSE=null},b.prototype.se=function(){return this.oSE||(this.oSE=function(){var t=Date.Create(this.GetStart()).getTime(),e=Date.Create(this.GetEnd()).getTime();return{s:a(t,e),e:l(t,e)}}.call(this))},b.prototype.sse=function(t,e,o){this.bU(),this.SetStart(o?t:new Date(t)),this.SetEnd(o?e:new Date(e)),this.eU(!0)},b.prototype.GetGroupID=function(){return this.oO.groupID},b.prototype.SetGroupID=function(t){this.bU(),this.oO.groupID=t,this.eU(!0)},b.prototype.getGroupID=b.prototype.GetGroupID,b.prototype.g2=function(){return this.gS().oG.Item(this.getGroupID())},b.prototype.GetRepetitive=function(){return this.oO.repetitive},b.prototype.SetRepetitive=function(t){this.bU(),this.oO.repetitive=t,this.oRx=void 0,this.eU(!0)},b.prototype.getRepetitive=b.prototype.gRx=function(){return void 0===this.oRx&&((this.oRx=new C(this.GetRepetitive())).valid||(this.oRx=null)),this.oRx},b.prototype.isRepetitive=function(){return!!this.gRx()},b.prototype.getRepetitiveExpression=function(){return f.ToS(this.isRepetitive()&&this.GetRepetitive()||"")},b.prototype.Nse=function(t,e,o){function i(t,e,i){return!(i<=k.Time.ToDTN(t,o.s)||e>=k.Time.ToDTN(t,o.e))&&{s:e,e:i}}var n,r=this.se(),s=this.gRx();if(s){n=[];for(var h=new Date(E(t)),u=E(e),c=r.s-E(r.s),p=r.e-E(r.e),f=a(c,p),g=l(c,p);(v=h.getTime())<=u;h.NextDay())s.eval(h)&&(y=i(v,v+f,v+g))&&n.push(y)}else if(!(r.e<=t||r.s>=e)){t=l(t,r.s),e=a(e,r.e),n=[];for(var y,S,d=E(t),u=E(e),v=d;v<=u;v=S,t=v)(y=i(v,t,a(e,S=v+K)))&&n.push(y)}return n},b.prototype.Nse2=function(t){var e=this.se();return!(e.e<=t.s||e.s>=t.e)},b.prototype.GetEventShape=function(){return this.oO.eventShape},b.prototype.SetEventShape=function(t){this.bU(),this.oO.eventShape=f.S.A2S(t),this.eU(!0)},b.prototype.getEventShape=function(){var t=this.GetEventShape();return t&&t.normal||t},b.prototype.GetTimeScaleShape=function(){return this.oO.timeScaleShape},b.prototype.SetTimeScaleShape=function(t){this.bU(),this.oO.timeScaleShape=f.S.A2S(t),this.eU()},b.prototype.getTimeScaleShape=function(){var t=this.GetTimeScaleShape();return t&&t.normal||t};var Q={start:null,end:null,duration:null,groupID:null,caption:void 0,visible:null,enabled:null,key:null,shape:null,cursor:null,selectable:null,selected:null,repetitive:null,toolTip:null,movable:null,resizable:null,allDay:null,userData:void 0,shortLabel:null,longLabel:null,extraLabel:null};w.prototype.init=function(t){this.oT=t,this.rgE=new f.Arr,this.rgE.onRemove=t.onDelEvent.bind(t),this.import()},w.prototype.import=function(){var t=this.oT;["bU","eU"].forEach(function(e){this[e]=t[e].bind(t)},this),["has","len","forEach","forEachU","add","indexOf","getPos","setPos"].forEach(function(t){this[t]=this.rgE[t].bind(this.rgE)},this)},w.prototype.onLE=function(){this.oT.onLE()},w.prototype.resKE=function(){this.mKE=null},w.prototype.resRE=function(){this.rgRE=null},w.prototype.gRE=function(){return this.rgRE||(this.rgRE=function(){var t=new f.Arr;return this.forEach(function(e){e.isRepetitive()&&t.add(e)}),t}.call(this))},w.prototype.Add=function(t){this.bU(),this.resKE();var e=arguments,o=this.add(new f.Schedule.Event(this,2==e.length?{start:e[0],end:e[1]}:t));return null!=t&&null!=t.selected&&o.SetSelected(t.selected),this.oT.onAddEvent(o),this.eU(),o},w.prototype.GetCount=function(){return this.rgE.len()},w.prototype.Item=function(t){var e=null;return~~t===t?e=this.rgE.at(t)||null:s(t)?e=this.rgE.has(t)?t:null:null==(e=function(t){var e=t.mKE;return null==e&&(t.mKE=e=new Map,t.forEach(function(t){var o=t.getKey();!e.has(o)&&e.set(o,t)})),e}(this).get(t))&&(e=this.rgE.at(t)||null),e},w.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},w.prototype.toA=function(e){return t.call(this,e)},w.prototype.RemoveRange=function(t){return this.bU(),this.resKE(),this.resRE(),this.rgE.removeRange(t=this.toA(t)),this.eU(),t.length},w.prototype.Clear=function(){this.bU(),this.oT.resSel(),this.resKE(),this.resRE(),this.rgE.clear(),this.eU()},w.prototype.nextID=function(t){function e(){for(var t="";this.Item(t=o+ ++this.__nextID););return t}this.__nextID=this.__nextID||0;var o="_e",i=e.call(this);if(null!=t){i=[i],t=l(0,f.ToI(t,1)-1);for(var n=0;n=k.Time.ToDTN(t,o.e))&&{s:e,e:i}}var n,r=this.se(),s=this.gRx();if(s){n=[];for(var h=new Date(E(t)),u=E(e),c=r.s-E(r.s),p=r.e-E(r.e),f=a(c,p),g=l(c,p);(v=h.getTime())<=u;h.NextDay())s.eval(h)&&(y=i(v,v+f,v+g))&&n.push(y)}else if(!(r.e<=t||r.s>=e)){t=l(t,r.s),e=a(e,r.e),n=[];for(var y,S,d=E(t),u=E(e),v=d;v<=u;v=S,t=v)(y=i(v,t,a(e,S=v+K)))&&n.push(y)}return n},R.prototype.GetMovable=function(){return this.oO.movable},R.prototype.SetMovable=function(t){this.bU(),this.oO.movable=t,this.eU()},R.prototype.isMovable=R.prototype.getMovable=function(){return this.isSelectable()&&f.ToB(this.GetMovable(),!0)},R.prototype.GetResizable=function(){return this.oO.resizable},R.prototype.SetResizable=function(t){this.bU(),this.oO.resizable=t,this.eU()},R.prototype.isResizable=R.prototype.getResizable=function(){var t=0;return this.isSelectable()&&(t=null==(t=this.GetResizable())||!0===t?3:t?c(this.GetResizable(),f.Schedule.EventResizableEnum):0),t},R.prototype.GetAllDay=function(){return this.oO.allDay},R.prototype.SetAllDay=function(t){this.bU(),this.oO.allDay=t,this.onSE(),this.eU(!0)},R.prototype.isAllDay=R.prototype.getAllDay=function(){return f.ToB(this.GetAllDay())},R.prototype.isHADE=function(){return this.isAllDay()&&this.dSV().sAD()?1:0},R.prototype.gHADL=function(){var t=this.dSV().gLE().aADE(),e=t&&t.oA2.mEL;return f.ToI(e&&e.get(this),-1)},R.prototype.GetUserData=function(){return this.oO.userData},R.prototype.SetUserData=function(t){this.bU(),this.oO.userData=t,this.xKP(),this.eU()},R.prototype.getUserData=function(){return this.GetUserData()},R.prototype.type=function(){return this.isRepetitive()?2:1},R.prototype.getDisplayMargins=function(t,e){var o,i=this.se(),n=E(i.s),r=E(i.e),s=this.dSV().misc("eventDisplayMarginsSep"),h=f.H.DateNoHTML;return this.isAllDay()?(o=h(t,new Date(n)),r-n>K&&(o+=s+h(t,new Date(r-K)))):(n!=r&&(e=t+" "+e),o=h(e,new Date(i.s))+s+h(e,new Date(i.e))),o},R.prototype.getDisplayShortMargins=function(){var t=this.dSV();return this.getDisplayMargins(t.getShortDateFormat(),t.getShortTimeFormat())},R.prototype.getDisplayLongMargins=function(){var t=this.dSV();return this.getDisplayMargins(t.getLongDateFormat(),t.getLongTimeFormat())},R.prototype.getStartDate=function(){return new Date(E(this.se().s))},R.prototype.getStartTime=function(){var t=this.se().s;return(t-E(t))/K},R.prototype.getEndDate=function(){return new Date(E(this.se().e))},R.prototype.getEndTime=function(){var t=this.se().e;return(t-E(t))/K},R.prototype.getGroupLabel=function(){var t=this.g2();return t&&t.getCaption()||""},R.prototype.getGroupTitle=function(){var t=this.g2();return t&&t.getTitle()||""},R.prototype.GetKnownProperty=function(t){var e,o;return this.mKP=this.mKP||new Map,null==(e=this.mKP.get(t))&&(o=z.get(t))&&this.mKP.set(t,e=this[o].call(this)),e},R.prototype.SetKnownProperty=function(t,e){var o=z.set(t);o in this&&this[o].call(this,e)},z=new T("1(start),2(end),3(allDay),4(groupID),5(caption),6(userData),7(duration),8(repetitiveExpression),12(key),256(displayShortMargins),257(displayLongMargins),258(startDate),259(startTime),260(endDate),261(endTime),262(groupLabel),263(groupTitle),264[get=isRepetitive](repetitve)"),R.prototype.toFormat=function(t){return this.GetKnownProperty(t)},R.prototype.xKP=function(){this.mKP=null},R.prototype.EnsureVisible=function(){var t,e=this.getStart(),o=this.oE.oT,i=o.oC,n=o.oSV;e.GetYear()!=i.gSY().y&&(i.SetDate(e),i.SetSelection([e,this.getEnd()])),(t=f.URts(n.e2Rs(this)))&&n.EnsureVisibleClient(t)},R.prototype.genID=function(){var t=this.GetKey();return null==t&&this.SetKey(t=function(){var t=this.oE,e=this.getKey();return e&&t.Item(e)==this||(e=t.nextID()),e}.call(this)),t},R.prototype.coO=function(){var t,e=f.Cpy(this.oO);return e.start=this.getStart().toFormat(),e.end=this.getEnd().toFormat(),"groupID"in e&&(e.groupID=(t=this.g2())&&t.GetID()||X),e},g&&(R.prototype.scUR=function(t){t.o=this.oE,t.i=this.genID()},R.prototype.arUR=function(t){this.scUR(t),t.d=this.coO(),t.Do=function(t){if(this.del?!t:t)this.o.Remove(this.i);else{var e=this.o.Add(this.d);e&&e.EnsureVisible()}}},R.prototype.mvUR=function(t,e){e&&(this.scUR(t,!0),t.d={from:e,to:this.sea()},t.Do=function(t){var e,o=this.o.Item(this.i);o&&(e=t?this.d.from:this.d.to,o.sse(e.s,e.e),o.SetAllDay(e.a),o.SetGroupID(e.g),o.EnsureVisible())})},R.prototype.uUR=function(t,e,o){this.scUR(t,!0),(t.d=g.diff(e,o))&&(t.Do=function(t){var e=this.o.Item(this.i);e&&(e.SetOptions(t?this.d.from:this.d.to),e.EnsureVisible())})},R.prototype.StartUpdateEvent=function(){return this.oE.oT.gUR()&&this.coO()},R.prototype.EndUpdateEvent=function(t){t&&this.oE.oT.nUR(p.UpdateEvent,function(e){this.uUR(e,t,this.coO())},this)},R.prototype.UpdateEvent=function(t,e){if(n(t)){var o=this.StartUpdateEvent();t.call(e||this),this.EndUpdateEvent(o)}});var J={caption:null,title:null,visible:null,id:null,headerShape:null,eventShape:null,position:null,width:null};A.prototype.init=function(t){this.oT=t,this.rgG=new f.KAr,this.rgG.K=function(t){return t.getID()},this.rgG.onRemove=t.onDelGroup.bind(t),this.rgG.onChange=this.resVG.bind(this),this.import()},A.prototype.import=function(){var t=this.oT;["bU","eU","feSV"].forEach(function(e){this[e]=t[e].bind(t)},this),["has","len","forEach","forEachU","add","indexOf","getPos","setPos"].forEach(function(t){this[t]=this.rgG[t].bind(this.rgG)},this)},A.prototype.onL=function(){this.oT.onLE(),this.oT.onLZ()},A.prototype.resKI=function(){this.mKI=null},A.prototype.Add=function(t){this.bU(),this.resKI();var e=this.add(new f.Schedule.Group(this,f.IsO(t)?t:{id:t}));return this.oT.onAddGroup(e),this.eU(),e},A.prototype.GetCount=function(){return this.rgG.len()},A.prototype.Item=function(t){var e=null;return~~t===t?e=this.rgG.at(t)||null:!function(t){return t instanceof f.Schedule.Group}(t)?null==(e=this.gKI().get(t))&&(e=this.rgG.at(t)||null):e=this.rgG.has(t)?t:null,e},A.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},A.prototype.toA=function(e){return t.call(this,e)},A.prototype.RemoveRange=function(t){return this.bU(),this.resKI(),this.rgG.removeRange(t=this.toA(t)),this.eU(),t.len()},A.prototype.Clear=function(){this.bU(),this.resKI(),this.rgG.clear(),this.eU()},A.prototype.gKI=function(){return this.mKI||(this.mKI=function(){var t,e=new Map;return this.forEach(function(o){!e.has(t=o.getID())&&e.set(t,o)}),e}.call(this))},A.prototype.resVG=function(){this.feSV("resGW"),this.rgVG=null},A.prototype.gVG=function(){return this.rgVG||(this.rgVG=function(){var t=new f.Arr;return this.forEach(function(e){e.isVisible()&&t.push(e)}),t}.call(this))},A.prototype.onlayout=function(t){if(this.len()){var e,o=this.rgG;t.pCtx("G"),t.IsSave()?((e=function(){var t="";return o.rgOE&&o.rgOE.forEach(function(e){t+=(t?",":"")+o.indexOf(e)}),t}())&&t.Add("order",e),(e=function(){var t="";return o&&o.forEachI(function(e,o){t+=(o?",":"")+f.ToS(e.getWidth())}),t}())&&t.Add("width",e),(e=function(){var t="";return o&&o.forEachI(function(e,o){t+=(o?",":"")+f.ToS(e.getVisible()?1:0)}),t}())&&t.Add("visible",e)):((e=t.GetValue("order"))&&function(t){if(t){var e=[];t.split(",").forEach(function(t){e.push(o.at(t))},this),o.setOrd(e)}}(e),(e=t.GetValue("width"))&&function(t){t&&t.split(",").forEach(function(t,e){e>2)%4)&&(c=function(t){return n.len()<4+(F+=F>>2)%16&&o(t)}),this.gE2L().forEach(function(o){c(o)&&function(o){var i,h,a,c=o.Nse(t,e,l),p=X;c&&(u&&!u.has(p=o.g2())||(r&&o.isAllDay()?(c.forEach(function(t){i=E(t.s),!(a=r.get(i))&&r.set(i,a=[]),a.push(o)}),s.set(o,c)):c.forEach(function(t){i=E(t.s),!(h=n.get(i,p))&&n.set(i,p,h=[]),h.push({oE:o,s:t.s,e:t.e})})))}(o)}),n.forEach(function(t){t.forEach(function(t){t.sort(function(t,e){return t.s-e.s||e.e-e.s-(t.e-t.s)}),p+=t.length})}),s&&s.rgO.sort(function(t,e){return t=t.se(),e=e.se(),t.s-e.s||e.e-e.s-(t.e-t.s)}),r&&r.forEach(function(t){p+=t.length}),this.c=p},U.prototype.gE2L=function(){return this.oT.oE},U.prototype.hasE=function(t){return t=E(e(t)),function(t){var e,o;tthis.e&&(e=this.e+K,o=new Date(t).Reset(16).NextMonth().getTime()),(e||o)&&(this.add(e,o),this.s=a(this.s,e),this.e=l(this.e,o),this.oT.onLx(this.s,this.e))}.call(this,t),this.isE(t)},U.prototype.isE=function(t,o){return t=E(e(t)),1&(o=f.ToI(o,-1))&&this.mDGE.has(t)||2&o&&this.oADE&&this.oADE.mDE.has(t)},U.prototype.feEU=function(t,o,i,n){t=E(e(t)),o=f.ToI(o,-1);var r,s,h;if(!r&&1&o&&(s=this.mDGE.get(t))&&s.forEach(function(t){!r&&(r=t.forEachU(function(t){return i.call(n,t.oE)}))}),!r&&2&o&&this.oADE&&(h=this.oADE.mDE.get(t)))for(var u=0,l=h.length;!r&&u=e.e)}var i;if(e)for(var n=0,r=e.length;!i&&n1&&(n=new Map,i=new f.M1,t.forEach(function(t,n){if(i.len()){r=i.len();for(var s=!1,h=0;!s&&h>2)%4)&&(u=function(t){return n.len()<4+(F+=F>>2)%16&&o(t)}),this.gZ2L().forEach(function(o){u(o)&&function(o){var i,r,u=o.Nse(t,e,h),a=s?o.g2():null;u&&(!s||null==o.getGroupID()||s.has(a))&&u.forEach(function(t){i=E(t.s),(r=n.get(i,a)||[]).push({oZ:o,s:t.s,e:t.e}),l++,n.set(i,a,r)})}(o)}),this.c=l},V.prototype.gZ2L=function(){return this.oT.oZ},V.prototype.lVZ=function(t){var e,o,i=new f.M1,n=this.mDGZ,r=this.oT.oSV,s=r.gDSE(),h=s.s,u=s.e-h;return t.forEach(function(t,s){if(e=n.get(s)){function c(t,e){if(t&&!f.EyR(e)){function o(t){return a(1,l(0,(t/K-h)/u))*g}var n,r=e[0],c=e[1],p=e[2],g=e[3],y=new f.M1;t.forEach(function(t){n=o(t.s-s),y.push(t,[r,c+n,p,l(1,o(t.e-s)-n)])}),i.add(y)}}(o=r.gCnt(t)).gs.forEach(function(t){t.t&&c(e.get(t.t.oG),t.t)}),o.T&&c(e.get(null),o.T)}},this),i},V.prototype.VZ=function(t){return this.lVZ(t.gVD())},V.prototype.allZO=function(){return this.aZO||(this.aZO=function(){var t=this.oT.gLDV(),e=t.range(),o=[0,0,e[0],e[1]],i=t.scroll(o),n=this.lVZ(i),r=new Map;return n.forEach(function(t,e){var o=r.get(e.oZ);!o&&r.set(e.oZ,o=[]),o.push(e)}),{z2O:r,o2C:n}}.call(this))},V.prototype.resZO=function(){this.aZO=null},V.prototype.e2R=function(t){var e=this.allZO(),o=e.z2O.get(t);return o&&1==o.length&&e.o2C.get(o[0])||null},x.prototype.init=function(t){this.doL(t)},x.prototype.doL=function(t){function e(t,e,o){a=(c=t.copy()).getTime(),v.set(e,o,a),E.set(a,[e,o]),D=l(D,e),m=l(m,o)}function o(){++w==R&&(w=0,A++)}function i(){++A==O&&(w++,A=0)}function n(t,e){t.GetMonth()!=e.GetMonth()?(V=l(A,V),(U+=R)==G&&(U=0,L+=V,~S&&L++,V=0),w=e.WeekOff(),A=0):o()}function r(){w++}function s(){A++}function h(){return 2==S?s:1==S||3==S?r:T?C?function(t,e){t.GetMonth()!=e.GetMonth()?((L+=O)==b&&(U+=R,L=0),w=e.WeekOff(),A=0):o()}:n:C?function(t,e){t.GetMonth()!=e.GetMonth()?((L+=O)==b&&(U+=R,L=0),w=0,A=e.WeekOff()):i()}:function(t,e){t.GetMonth()!=e.GetMonth()?((U+=R)==G&&(U=0,L+=O),w=0,A=e.WeekOff()):i()}}var u,a,c,p,g,y,S=t.oSV.getShowViewCompact(),d=t.oC,v=new f.M2,E=new Map,D=0,m=0,T=1,C=0,G=1,b=12,w=0,R=f.days,A=0,O=6,U=0,L=0,V=0;for(this.oT=t,this.sy={y:Date.Today().GetYear()},d&&(this.sy=d.gSY(),T=d.getMode(),C=d.getFlow(),G=d.gLyt().table.h,b=d.gLyt().table.v,d.pushLoc()),T&&S<0&&(G=b=1),this.sy.f=(u=Date.Create(this.sy.y)).copy(),this.sy.t=(p=this.sy.d?this.sy.d:Date.Create(this.sy.y,12,31)).copy(),d&&S<=0&&(w=u.WeekOff(),T||(y=w,w=A,A=y,y=R,R=O,O=y,S<0&&R--)),G*=R,b*=O,g=h(),this.s=u.copy();u.Compare(p)<=0;)e(u,U+w,L+A),g(c,u.NextDay());this.e=u.copy(),this.mXYD=v,this.mDXY=E,this.h=D+1,this.v=m+1,d&&d.popLoc()},x.prototype.rdayS=function(){return this.oT.oSV.rdayS()},x.prototype.range=function(){var t=this.rdayS();return[this.h*t[0],this.v*t[1]]},x.prototype.scroll=function(t){function e(t){return~~t}function o(t,o){return t-o*e(t/o)}for(var i=[],n=new f.M1,r=this.rdayS(),s=r[0],h=t[0],u=e(h/s),l=e((h+t[2])/s),a=-o(h,s),c=r[1],p=t[1],g=e(p/c),y=e((p+t[3])/c),S=-o(p,c),d=g;d<=y;d++,S+=c){i.push([S,c]);for(var v,E=a,D=u;D<=l;D++,E+=s)(v=this.mXYD.get(D,d))&&n.push(v,[E,S,s,c])}return n.tsc=i,n},x.prototype.d2R=function(t){var o,i,n,r=this.rdayS(),s=r[0],h=r[1];return t&&(t.forEach?t:[t]).forEach(function(t){(n=this.mDXY.get(E(e(t))))&&(o=[n[0]*s,n[1]*h,s,h],i=i?f.URt(i,o):o)},this),i},x.prototype.d2HV=function(t){var o,i,n;return t&&(t.forEach?t:[t]).forEach(function(t){(n=this.mDXY.get(E(e(t))))&&(o?(o[0]=a(o[0],n[0]),o[1]=a(o[1],n[1])):o=n.slice(),i?(i[0]=l(i[0],n[0]),i[1]=l(i[1],n[1])):i=n.slice())},this),o&&i&&[i[0]-o[0]+1,i[1]-o[1]+1]},x.prototype.d2I=function(t){var o=this.mDXY.get(E(e(t)));return o?o[0]+this.h*o[1]:-1},M.prototype.init=function(){this.mC=new Map},M.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.oLD=new M},W.prototype.Fit=function(t,e,o,i){var n,r,s,h="",u=function(t){var e=this.mC.get(t=f.ToS(t));return!e&&this.mC.set(t,e=function(t){var e={rgLU:[],rgL:[]},o=t.split(this.s),n=o.length;return n>0&&o[0].split(this.aS).forEach(function(t){e.rgL.push({l:t,w:i&&i.sizeHTMLDate(t,this.oLD.Get(i)).width||0})},this),e.rgLU=e.rgL.slice(),e.rgL.sort(function(t,e){return t.w-e.w}),n>1&&o[1].length&&((e.e=f.E.Create(o[1],"value")).IsValid()?e.e.Evaluate=function(t){return function(e){return t.call(this,e)}}(e.e.Evaluate):e.e=null),e}.call(this,t)),e}.call(this,t);if(u&&(s=u.rgL.length,u.e&&(n=(r=u.e.Evaluate(o))>=0&&r1)))for(var l=!0,a=1;l&&a=this.i+this.C&&(e=2)),e},H.prototype.reqS=function(){var t=0;return this.C&&(this.isV(0)||(t|=1)),this.isV(this.i+this.M-1)||(t|=2),t},H.prototype.scroll=function(t){var e=this.oSV,o=this.i,i=l(0,a(o+t||0,this.M-this.C)),n=!1;return(n=o!=i)&&e.Smooth(function(){this.i=i,e.onLE()},this),n},H.prototype.ensure=function(t){var e=this.isS(t);return~t&&this.scroll(t-(1==e?this.i:2==e?this.i+this.C-1:t))},Object.addPrototypeOf(I.prototype,f.M1.prototype),I.prototype.init=function(t){return function(e){function o(){var t,o,i,n,r,s,h;e.sAD()&&(t=e.gADL()).reqS()&&(i=(o=e.gLE()).aADE())&&((h=e.GetPageSize()).unshift(0,0),n=i.oA2.mEL,r=e.toH(1),function(t,o){function i(e,i){n&&(!t||t.call(o,n))&&r.push(n),e&&i&&(n={r:e,d:[i]})}var n,r=[];return e.gVD().vforEach(function(t,e){n&&Math.abs(f.ROf(n.r)-f.LOf(t))<1?(n.r=f.URt(n.r,t),n.d.push(e)):i(t,e)}),i(),r}.call(this,function(e){for(var i=0,r=0,s=e.d.length;3!=i&&r=0;c++);}function h(){var e,o=0;s();for(var r;co?0:(e[3]-l)/2),~~(u+1),l]||null})}.call(this),onpaint:function(t,e){this.ctxTfi(function(t){i(n,t,e,r)},this,t)},thisArg:this}},{thisArg:this,ttO:n.o,ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay()})}},k.prototype.xA=function(){f.A.Cancel("ss*"),f.A.Cancel(this.sEvcA)},k.prototype.ondown=function(t){return this.isSelectable()&&(this.xA(),this.gAA().Do(this,t),!f.RUR.Rng()&&this.doRUR(t,function(t){switch(t.drag.status){case 4:case 5:this.rurActionClick(null,t)}},this)),!0},k.toClick=function(t){return{dblClick:t.drag&&(t.drag.long||1!=t.drag.click)||!1,button:f.e2B(t),modifiers:f.ModK(t)}},k.prototype.toClick=function(t,e){e.event=this.e2E(t),e.date=this.e2D(t),e.time=this.e2T(t),e.group=this.e2G(t),e.markZone=this.e2Z(t)},k.prototype.onClick=function(t){var e=k.toClick(t),o=this.e2V(t),i=this.gPtr(t);o&&(e.view=o,o.toClick&&o.toClick(t,e)),this.sDG(e.date?{d:e.time||e.date,g:e.group}:null),this.onA(this.p2A(i),e),this.onclick(e)},k.prototype.onclick=function(t){this.oLts.onclick.do(t)},k.prototype.onA=function(t,e){t&&(f.H.VisitA(this,t),this.inv(),this.onanchorclick(t))},k.prototype.onanchorclick=function(t){this.oLts.onanchorclick.do(t)},k.prototype.onDblClickGR=function(t){if(t)return this.Smooth(function(){this.gVG().forEach(function(t){t.SetWidth()})}),!0},k.prototype.onClickADS=function(t){return t&&(this.slADS(t),this.gADL().scroll(1==t.s?-1:1)),null!=this.olADS},k.prototype.slADS=function(t){this.olADS&&clearTimeout(this.olADS.h),(this.olADS=t&&{o:t}||null)&&(this.olADS.h=this.setTimeout(function(){clearTimeout(this.olADS.h),this.olADS=null},2048))},k.prototype.sDG=function(t){this.oDG=t},k.prototype.onClickGB=function(t){function e(){i.cwbU(),n.gVG().forEach(function(t){t.SetVisible(!1)}),i.cweU()}var o=this,i=o.oT,n=i.oG,r=n.gVG();return t&&t.HGB&&n.len()&&(f.Menu&&function(){var i=o.GetViewRect(),s=i[0],h=i[1],u=o.GetClientRect(),l=f.ORt(u,s,h),a=f.NRt(l,f.ORt(o.rt2C(t.HGB),s,h));return o.runCM({items:function(){var t="All[id=-1],[sep]";return n.forEach(function(e){t+=","+e.getTitle(),t+="[chk"+(r.has(e)?"=1":"")+"]",t+="[id="+e.getID()+"]"}),t}(),x:a?f.ROf(a):i[0]+u[0]+o.unscaled(f.ROf(t.HGB)),y:a?f.BOf(a):i[1]+u[1]+o.unscaled(f.BOf(t.HGB)),cbkS:function(t){o.Smooth(function(){-1==t.id?e():n.Item(t.id).SetVisible(t.flags.get("chk")),o.onChange("groups")})}})}()||function(){var t,s=prompt(o.misc("groupingButtonPrompt"),r.join(","));null!=s&&(i.cwbU(),e(),(s=s.trim())&&s&&s.split(",").forEach(function(e){(t=n.Item(e))&&t.SetVisible(!0)}),i.cweU())}()),!0},k.prototype.onDblClk=function(t){},k.prototype.e2RUR=function(t){var e=this.gPtr(t),o=this.e2W(t)||this.oW,i=o.GetClientRect();return{w:o,c:o.oC,x:B.X(e)-i[0],y:B.Y(e)-i[1],r:o.GetClientRect()}},k.prototype.doRUR=function(t,e,o,i){var n,r,s=this.gAA();return f.RUR.Do(t,function(t){switch(t.drag.status){case 1:this.lkTL++,r=this.oT.oRUR=this.e2RUR(t),this.lRURLong&&t.drag.setCursor(f.GP.Get("long",this.getCursors())),g&&(n=this.oT.gUR())&&n.sB();break;case 5:this.norurAction(t,2);break;case 3:s.CanDo(t,1)&&(f.RUR.Cancel(),this.norurAction(t,1)||(this.lRURLong=(this.lRURLong||0)+1,s.Do(this,t,1),--this.lRURLong))}switch(!(r&&r.c&&r.c.bRUR&&r.c.bRUR(t))&&e.call(o,t),r&&r.c&&r.c.eRUR&&r.c.eRUR(t),t.drag.status){case 7:n&&(t.drag.cancel&&n.cB(),n.eB()),r=this.oT.oRUR=null,this.lkTL--}},this,i)},k.prototype.bRUR=function(t){return this.gAA().Has("zoom")&&this.exZ(t),t.drag.extra},k.prototype.exZ=function(t){var e;t.drag.extra&&(e=t.drag.extra[0])&&this.zBy(e.offset,this.oT.oRUR.oZI=this.oT.oRUR.oZI||this.p2ZI(e.start))},k.prototype.rurScroll=function(t,e){if(t){var o={oH:this.GetSI(!0),oV:this.GetSI(!1)};this.doRUR(t,function(t){var i=this.oT.oRUR;switch(t.drag.status){case 1:i.ao=e&&e.rurOnlyAO,this.rAO(),function(t){e&&e.rurScrollS&&e.rurScrollS(t)}(t);break;case 7:i.ao=null,t.drag.cancel?(i.cancel=!0,this.Smooth(function(){this.rurScrollD(0,0,o)})):!t.drag.swipe&&this.rAO(),function(t){e&&e.rurScrollE&&e.rurScrollE(t)}(t);break;case 2:this.oTD=null,!i.dRSD&&this.rurScrollD(-t.drag.offset.dx,-t.drag.offset.dy,o);break;case 6:var n=i.w,r=t.drag.swipe;if(r.dx&&r.dy){var s=Math.abs(r.dx),h=Math.abs(r.dy);l(s,h)-a(s,h)>32&&(s>h?r.dy=0:r.dx=0)}n.SSw.call(n,r);break;case 4:case 5:e&&e.rurStatus&&e.rurStatus.call(e.thisArg||this,t)}},this)}},k.prototype.onRurScrollD=function(t){var e=this.oT.oRUR;e&&e.c!=this&&e.c.onRurScrollD&&e.c.onRurScrollD.call(e.c,t)},k.prototype.rurScrollD=function(t,e,o){var i,n=null!=o;(o=o||{oH:this.GetSI(!0),oV:this.GetSI(!1)}).oH=o.oH||{pos:0,page:0},o.oV=o.oV||{pos:0,page:0},i={dx:t,dy:e},this.onRurScrollD(i),(n||i.dx||i.dy)&&this.SetScroll({x:o.oH.pos+this.scaled(i.dx),y:o.oV.pos+this.scaled(i.dy)})},k.prototype.rurDrag=function(t,e){function o(t){return!e||null==e.rurAllow||t==(e.rurAllow&t)}function i(){h.frame=B.Rect(h.from,h.to),e&&e.rurDrag&&e.rurDrag.call(y,h),h.frame=function(t,e){return n().rtCA(t,e)}(h.frame,!1),c.onRurDragD&&c.onRurDragD.call(c,e,h),e&&e.rurDragD&&e.rurDragD(h),u&&u.SetClient(h.frame)}function n(){return s||(s=function(){var t=a;return u&&u.oO.relative!=a.GetCanvas()&&(t=c),t}())}function r(t,e){return n().ptCA(t,e)}if(t){var s,h,u,a=this,c=this.e2V(t)||a,p=c.getRurDragScrollOut?c.getRurDragScrollOut():c.GetClientRect(),g=[{oSV:this,oH:this.GetSI(!0),oV:this.GetSI(!1)}],y=this,S=0,d=0;this.feSV(function(t){t!=this&&g.push({oSV:t,oH:t.GetSI(!0),oV:t.GetSI(!1)})},this),this.doRUR(t,function(t){switch((h=h||function(t){s=null;var e=r(a.gPtr(t));return{from:e,to:e,event:t,frame:B.Rect(e,e)}}(t)).event=t,t.drag.status){case 1:if(function(){c.onRurDragS&&(e=c.onRurDragS.call(c,e,h)),e&&e.rurDragS&&e.rurDragS(h)}.call(this),y=e&&e.thisArg||y,e&&(this.onRURDragStart(e.rurName,t),e.rurDragStart&&e.rurDragStart.call(y,h)),this.oT.oRUR.ao=e&&e.rurOnlyAO,this.rAO(),e&&e.rurEFPaint){i();var n={name:"frame",client:h.frame,relative:a.GetCanvas(),clip:a.GetCanvas(),inflateClient:8,onpaint:function(t,o){e.rurEFPaint.call(y,h,t,o,this)}};e.rurEFOpts&&e.rurEFOpts.call(y,h,n),u=f.EF.Create(n)}break;case 7:var v=t.drag.cancel?this.oT:this,E=this.oT.oRUR;E&&(E.ao=null),v.bU(),t.drag.cancel?(E&&(E.cancel=!0),this.Smooth(function(){g.forEach(function(t){t.oSV.rurScrollD(0,0,t)}),e&&e.rurCancel&&e.rurCancel.call(y,h)})):!t.drag.click&&e&&e.rurDrop&&e.rurDrop.call(y,h),!this.sRng()&&v.onLE(),this.rAO(),v.eU(),f.EF.Destroy(u),e&&(e.rurDragEnd&&e.rurDragEnd.call(y,h),t.drag.click&&e.rurStatus&&e.rurStatus.call(y,t),this.onRURDragEnd(e.rurName,t)),function(){c.onRurDragE&&c.onRurDragE.call(c,e,h),e&&e.rurDragE&&e.rurDragE(h)}.call(this);break;case 2:var D=!1,m=S!=t.drag.offset.dx||d!=t.drag.offset.dy;if(m&&(S=t.drag.offset.dx,d=t.drag.offset.dy),!f.EyR(p)&&function(t){return!0}.call(this,t)){var T=t.drag.current.x,C=t.drag.current.y,G=o(1)&&T-f.LOf(p)||0;G>0&&(G=l(0,T-f.ROf(p)));var b=o(2)&&C-f.TOf(p)||0;b>0&&(b=l(0,C-f.BOf(p))),(D=G||b)&&this.rurScrollD(G,b)}(D||m)&&(h.to=r(t.drag.current),h.dx=h.to.x-h.from.x,h.dy=h.to.y-h.from.y,i())}},this,{contiguously:!0,client:p})}},k.prototype.onRURDragStart=function(t,e){},k.prototype.onRURDragEnd=function(t,e){},k.prototype.rtSelAbs=function(t){var e=B.Rect(t.from,t.to);if(!f.EyR(e)){var o=this.gLE(),i=this.ar2E(e);i&&i.length&&i.forEach(function(t){e=f.URt(e,o.e2R(t))})}return e},k.prototype.rurAO=function(t){return this.rurE(t)||{}},k.prototype.rurE=function(t){return this.e2E(t)},k.prototype.allowRur=function(t,e){var o=null!=t;if(o)switch(e.rurName){case"scroll":o=function(t){return f.Schedule.allowRurPart(this.oT.w2P(e.rurOnlyW),t||"view,timescale",e.rurFlags)}.call(this);break;case"fit":case"select":o=this.e2W(t)==this.oW}return o},k.prototype.rurAction=function(t,e,o){var i={rurName:t,rurFlags:e,rurOnlyW:this.e2W(o),rurOnlyAO:this.rurAO(o),rurStatus:function(e){this.rurActionClick(t,e)}};if(this.allowRur(o,i)){var n="rur"+f.getP(function(t){for(var e,o="",i=0,n=t.length;i1&&(o=this.htD(t))&&e.has(o.oG)&&(i=o.g)&&(u=(h=this.p2C(t))[0],l=h[1],n=i[2]<2*(s=f.Def.HT.inflate[0]),f.PInR(u,l,[i[0],i[1],n?i[2]/2:0,i[3]],s)?r=e.prev(o.oG):f.PInR(u,l,[f.ROf(i)-(n?i[2]/2:0),i[1],n?i[2]/2:0,i[3]],s)&&e.next(o.oG)&&(r=o.oG)),r},k.prototype.p2T=function(t){var e=this.htD(t);return e&&(e.T&&{oG:e.oG,tN:e.tN,aD:!1}||e.A&&{oG:e.oG,tN:e.dN,aD:!0})},k.prototype.t2Y=function(t){t=e(t);var o,i,n,r,s,h=this.gLDV().d2R(t);if(h&&(s=this.gCnt(h))&&(h=s.T))return o=this.gDSE(),i=o.s,n=o.e-i,r=h[3],h[1]+=function(t){return a(1,l(0,(t/K-i)/n))*r}(this.toDSE(t)%K),h[3]=0,this.rtCA(h,!1)},k.prototype.p2CE=function(t){if(this.aCE()){var e=this.htD(t);return e&&(e.tCE||e.aCE)&&this.p2T(t)}},k.prototype.p2HT=function(t){if(this.isSelectable()&&!this.isReadOnly()){var e=this.p2C(t);return this.gVE().p2HT(B.X(e),B.Y(e),null,null,f.Def.HT.inflate[0],f.Def.HT.inflate[1])}},k.prototype.p2ER=function(t){if(this.aME()){var e,o,i,n=this.p2HT(t);return n&&n.o&&(e=n.o.oE)&&(o=e.isResizable())&&(1&o&&n.ht&(e.isHADE()?1:16)?i={oE:e,ht:n.ht,r:1}:2&o&&n.ht&(e.isHADE()?4:64)&&(i={oE:e,ht:n.ht,r:2})),i}},k.prototype.p2DH=function(t){var e=this.htD(t);return e&&e.H&&e.dN},k.prototype.p2GB=function(t){var e=this.htD(t);return e&&e.HGB&&e.dN},k.prototype.p2DT=function(t){var e=this.htD(t);return e&&e.T&&e.tN},k.prototype.rurOnlyAO=function(){var t=this.oT.oRUR;return t&&t.w==this.oW&&t.ao||null},k.prototype.onSetAO=function(t){function e(e){var o;e.isSelectable()&&(o=l.toShapes(e))&&(!f.EyO(o.hover)&&t.set({owner:l,id:e.idAOH||(e.idAOH={}),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2E([t,o])},duration:c}),!f.EyO(o.click)&&t.set({owner:l,id:e.idAOC||(e.idAOC={}),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2E([t,o])},actOn:a==e?1:4,duration:c}))}var o,i,n,r,h,t=this.gAO();if(this.isSelectable()&&!t.hasOf(this)){var l=this,a=this.rurOnlyAO(),c=l.getSmooth();s(a)?e(a):(this.sAD()&&(i=l.toShapes("date-all-day-scroll-button"))&&(h=this.gVADS())&&h.forEach(function(e,o){!function(e){!f.EyO(i.hover)&&t.set({owner:l,id:d(e),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2ADS([t,o])},duration:c}),!f.EyO(i.click)&&t.set({owner:l,id:v(e),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2ADS([t,o])},actOn:4,duration:c})}(o)}),this.dGB()&&(o=l.toShapes("grouping-button"))&&(r=this.gVD())&&r.forEach(function(e,i){!function(e){!f.EyO(o.hover)&&t.set({owner:l,id:y(e),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2GB([t,o])},duration:c}),!f.EyO(o.click)&&t.set({owner:l,id:S(e),inv:l.inv,hitTest:function(t,o){return l.isAP(t,o)&&e==l.p2GB([t,o])},actOn:4,duration:c})}(i)}),(n=this.gVE())&&n.forEach(function(t,o){e(o.oE)}),t.rur(this,u("*")))}},k.prototype.hasE=function(t){return this.gLE().hasE(t)},k.prototype.onLE=function(){this.onLZ(),this.feSV(function(t){t.onDV(),t.resVE()})},k.prototype.resVE=function(){this.rgVE=null,this.resVADS(),this.resAO()},k.prototype.resVD=function(){this.rgVD=null,this.resVADS()},k.prototype.resVZ=function(){this.rgVZ=null},k.prototype.resA=function(){this.resVD(),this.resVE(),this.resVZ()},k.prototype.onLD=function(){this.oALE.XC(),this.resA()},k.prototype.onLZ=function(){this.feSV(function(t){t.resVZ()})},k.prototype.bU=function(){this.lI++},k.prototype.eU=function(){--this.lI||this.invAO()},k.prototype.wAO=function(){return this._wAO||(this._wAO=[this.oTS])},k.prototype.rAO=function(){this.bU(),this.eU()},k.prototype.onimg=function(){return this.cwbU(),this.cweU(),!0},k.prototype.islow=function(){return this.getScale()<.5},k.prototype.Smooth=function(t,e,o){function i(t){o.cbkI&&o.cbkI.call(e,t)}function r(t){o.cbkT&&o.cbkT.call(e,t)}function h(t){o.cbkR&&o.cbkR.call(e,t)}function u(t){function e(t,e,o){function i(t,e){var i=t[o],r=(n[e].get(i)||0)+1;return n[e].set(i,r),f.ToS(i.GetIndex())+"-"+r}var n=[new Map,new Map],r=new f.M1,h=new f.M1;return e.forEach(function(t,e){h.set(i(e,0),e)}),t.forEach(function(t,e){r.set(e=h.get(i(e,1))||e,t)}),t=r,{from:t,to:e,stkFT:t.smooth(e,function(t,e){return e&&s(e.oE)&&e.oE.isHADE()&&e.oE.oE.Item(e.oE)&&(t=[t[0],t[1]+t[3]/2,t[2],0]),t})}}t.mV2FT=new Map,c.forEach(function(o){var i=p.get(o);i&&t.mV2FT.set(o,{events:e(i.rgVE,o.gVE(),"oE"),zones:e(i.rgVZ,o.gVZ(),"oZ"),scrl:function(t,e){var o=t.GetScroll();return(e.x!=o.x||e.y!=o.y)&&{f:e,t:o}||null}(o,i.oScr),dayS:function(t,e){var o=t.rdayS();return(e[0]!=o[0]||e[1]!=o[1])&&{f:e,t:o,e:t.odayS()}||null}(o,i.dayS),grps:function(t,e){var o;return t==y&&t.sGE()&&(o=t.mGW())&&!function(t,e){var o=e.size==t.size;return o&&e.forEach(function(e,i){o&&(o=function(t,e){var o;if(o=t&&e&&t.length==e.length)for(var i=0,n=t.length;o&&i=e[o])for(;t>=e[o+1]&&oMath.abs(n)?i:n)),o=this.ptCA(e.ptA,!1),this.rurScrollD(o.x-B.X(e.pt)-i,o.y-B.Y(e.pt)-n),this.onRurScrollD({dx:-i,dy:-n}),this.onUI(),this.cweU()},k.prototype.rurDayResize=function(t,e){if(t){var o,i,n=this,r=n.dSV(),s=e.rurOnlyW&&e.rurOnlyW.oC,h=n.GetClientRect(),u=n.GetScroll(),a=r.odayS(),c=r.rdayS(),p=c;n.doRUR(t,function(t){switch(t.drag.status){case 1:break;case 7:t.drag.cancel&&this.Smooth(function(){r.sdayS(a),n.updSPR(),n.SetScroll(u)});break;case 2:n.Smoothless(function(){function a(t){return n.scaled(t-h[0])}function f(t){return n.scaled(t-h[1])}p=n.adayS([l(0,c[0]+t.drag.offset.dx),l(0,c[1]+t.drag.offset.dy)]),o={dx:p[0]-c[0],dy:p[1]-c[1]},i={dx:(u.x+a(t.drag.start.x))*p[0]/c[0]-a(t.drag.current.x)-u.x,dy:(u.y+f(t.drag.start.y))*p[1]/c[1]-f(t.drag.current.y)-u.y},s&&s.onRurDayResizeD&&s.onRurDayResizeD.call(s,o,i,e),r.sdayS([c[0]+o.dx,c[1]+o.dy]),n.updSPR(),n.SetScroll({x:u.x+i.dx,y:u.y+i.dy})});break;case 4:case 5:e&&e.rurStatus&&e.rurStatus.call(e.thisArg||n,t)}},n)}},k.prototype.onRurDayResizeD=function(t,e,o){},k.prototype.rurDayResize=function(t,e){if(t){var o,i,n=this,r=n.dSV(),s=e.rurOnlyW&&e.rurOnlyW.oC,h=n.GetClientRect(),u=n.GetScroll(),a=r.odayS(),c=r.rdayS(),p=c;n.doRUR(t,function(t){switch(t.drag.status){case 1:break;case 7:t.drag.cancel&&this.Smooth(function(){r.sdayS(a),n.updSPR(),n.SetScroll(u)});break;case 2:n.Smoothless(function(){function a(t){return n.scaled(t-h[0])}function f(t){return n.scaled(t-h[1])}p=n.adayS([l(0,c[0]+t.drag.offset.dx),l(0,c[1]+t.drag.offset.dy)]),o={dx:p[0]-c[0],dy:p[1]-c[1]},i={dx:(u.x+a(t.drag.start.x))*p[0]/c[0]-a(t.drag.current.x)-u.x,dy:(u.y+f(t.drag.start.y))*p[1]/c[1]-f(t.drag.current.y)-u.y},s&&s.onRurDayResizeD&&s.onRurDayResizeD.call(s,o,i,e),r.sdayS([c[0]+o.dx,c[1]+o.dy]),n.updSPR(),n.SetScroll({x:u.x+i.dx,y:u.y+i.dy})});break;case 4:case 5:e&&e.rurStatus&&e.rurStatus.call(e.thisArg||n,t)}},n)}},k.prototype.rurGroupResize=function(t,e){function o(t){t=t||"oW",r.forEach(function(e,o){o.SetWidth(e[t])})}if(t){var i,n,r,s,h=this,u=h.p2GR(h.gPtr(t));u&&(r=function(){var t,e,o=new f.M1,i=0;return h.gGW().forEach(function(t){o.set(e=t[2],{o:t[0],w:t[1],oW:e.GetWidth()}),i+=t[1]}),(t=o.get(u))&&(t.Mdx=i-(t.o+t.w)),o}()).has(u)&&(n=r.rgO.next(u))&&(i=r.get(u))&&(e.rurDragEnd=function(t){t.event.drag.cancel?h.Smooth(function(){o("oW")}):(u.SetWidth(void 0),h.onChange("group",u))},e.rurDrag=function(t){s=h.scaled(t.event.drag.offset.dx),(s=s<0?-a(-s,i.w):a(s,i.Mdx))&&h.Smoothless(function(){o("w"),u.SetWidth(l(0,i.w+s));for(var t=n;s&&t;)t.SetWidth(l(0,r.get(t).w-s)),t.GetWidth()?s=0:(s-=r.get(t).w,t=r.rgO.next(t))})},h.rurDrag(t,e))}},k.prototype.rurGroupDrag=function(t,e){function o(t,e,o){(!s||!s.GetVisible()||!(e.oG==p&&o.getTime()==g))&&r.apply(this,arguments)}function i(t){var e,o,i=l.htD(l.gPtr(t));return i&&i.dN==g&&i.g&&(o=p.GetPosition()-(e=i.oG.GetPosition()))&&{p:e,g:l.rtDropOf(f.NRt(c,l.rt2C(i.g)),o>0)}||null}if(t){var n,r,s,h,u,l=this,a=l.htD(l.gPtr(t)),c=l.GetClientRect(),p=a&&a.g&&a.oG,g=a&&a.dN;p&&(e.rurDragStart=function(){r=l.drawDG,l.drawDG=o,n=l.rt2C(a.g),s=f.EF.Create({name:"group",visible:!1,client:n,relative:l.GetCanvas(),onpaint:function(t,e){l.ctxScale(t,e,function(e){e.oG=p,r.call(l,t,e,g)},l)},thisArg:l}),h=f.EF.Create({name:"drop",visible:!1,limitClient:!1,relative:l.GetCanvas(),onpaint:function(t,e){l.ctxScale(t,e,function(e){l.dGP(t,e)},l)},thisArg:l})},e.rurDragEnd=function(t){f.EF.Destroy(h),f.EF.Destroy(s),l.drawDG=r,l.invAO(),!t.event.drag.cancel&&(u=i(t.event))&&l.Smooth(function(){p.SetPosition(u.p),l.onChange("group",p)})},e.rurDrag=function(t){u=i(t.event),h.SetVisible(u),h.GetVisible()&&h.SetClient(u.g),s.SetClient(f.ORt(n.slice(),t.event.drag.offset.dx,t.event.drag.offset.dy)),s.GetVisible()||(s.SetVisible(!0),l.invAO())},l.rurDrag(t,e))}},k.prototype.cbkEFPaint=function(t){var e=this.toShapes(t);return e&&function(t,o,i,n){o.drawShape(i,e.normal||e)}},k.prototype.fitEFPaint=function(){return this.cbkEFPaint("frameFit")},k.prototype.selEFPaint=function(){return this.cbkEFPaint("frameSel")},k.prototype.rurFit=function(t,e){e.rurOnlyAO={},e.rurEFPaint=this.fitEFPaint(),e.rurDrop=function(t){this.FitToClient(this.rtSelAbs(t))},this.rurDrag(t,e)},k.prototype.rurSelect=function(t,e){if(this.allowSelect()&&this.allowSelectByDrag()){var o=this.e2V(t)||this;if(o.ap2E&&o.ar2E){var i=!1,n=this.getSel();e.rurEFPaint=this.selEFPaint(),e.rurEFOpts=function(t,e){e.clipClient=o.GetClientRect()},e.rurDrag=function(t){!i&&(i=2==t.event.drag.status)&&(this.oT.oRUR.ao={},this.invAO()),i&&this.select(this.isSingleSel()?o.ap2E(t.to):o.ar2E(B.Rect(t.from,t.to)),{selChange:!1})&&((this.isToggleSel()||this.isToggleCtrlSel()&&2&f.ModK(t.event))&&(this.oT.rgSel=new f.Arr(n).toggle(this.oT.rgSel)).isEmpty()&&(this.oT.rgSel=null),this.feSV("invAO"),this.oT.onSel())},e.rurCancel=function(t){this.oT.SetSelection(n)},this.rurDrag(t,e)}}},k.prototype.getDragEv=function(t,e,o){var i,n,r;return t&&(n=t[o?"isResizable":"isMovable"])&&(r=n.call(t))&&(i=new Map,(e&&this.isSelected(t)&&this.getSel()||[t]).forEach(function(t){r==n.call(t)&&i.set(t,t.sea())})),i},k.prototype.rurCreate=k.prototype.rurMove=function(t,o){function i(t,o,i){var n=o.s,r=l(o.s,o.e-(i||0)*K);U&&e(t.GetStart())==n&&e(t.GetEnd())==r||t.sse(n,r),U=!0}function n(t,e){function o(o,n){i(o,function(t,e,o){var i={s:e.s,e:e.e};return 1==o?(i.s+=t.dtN,i.s=a(i.s,e.e-nt)):2==o&&(i.e+=t.dtN,i.e=l(i.e,e.s+nt)),i}(t,n,I.r),o.isHADE()),e&&this.onRURChange("resize",o,Z.get(o))}t&&(e?Z.forEach(function(t,e){o.call(this,e,e.se())},this):F&&o.call(this,F.oE,F))}function r(t){var e=this.p2T(this.gPtr(t));return e&&(st||!x&&!M||(e.tN=E(j.tN)+e.tN%K),m={dtN:function(t,e){return(z&&z.isAllDay()?E(t)-E(e):t-e)||0}(e.tN,j.tN),oG:e.oG,aD:e.aD}),m}function s(t,e,o){var i,n=this.gVE,r=p.call(this),s=this.isSelectable()&&t.gAO()||null;P&&this.gVE().forEach(function(t,e){e.oE==P&&(i=i||new f.M1).set(e,t)}),this.gVE=function(){return r},w.apply(this,arguments),i&&this.ctxScale(t,e,function(e){i.forEach(function(e,o){this.drawE(t,e,o,s)},this)}),this.gVE=n}function h(t,e,o,i){function n(e){r=t.globalAlpha,t.globalAlpha=e}var r,s=o.oE==z,h=o.oE==P;(null!=q&&Q?h||s:!h)?null!=J&&s&&n(J):n(q),b.apply(this,arguments),null!=r&&(t.globalAlpha=r),tt&&o.oE==z&&f.Schedule.sCTX(t,tt,e,o)}function u(t){return C.call(this,t==z?P:t)}function c(){var t=arguments;v.call(this,function(){G.apply(this,t)})}function p(t){var e,o,i=new f.Arr,n=this.sAD();if(t||(n&&(e=this.gLE().aADE().mDE)&&this.gVD().forEach(function(t,o){i.pushnn(e.get(o))}),this.gVE().forEach(function(t,e){i.add(e.oE)}),i.remove(P)),i.add(z),o=new L(this.oT,i),n&&z.isAllDay()){var r,s=this.gADL(),h=o.aADE(),u=h&&h.oA2.mEL;u&&(u.set(z,r=a(u.get(z),s.i+s.C-.001)),s.ensure(r))}return o.VE(this)}function g(){}function y(t){var e=A.apply(this,arguments);return t==z&&(e=$),e}function S(t){var e=O.apply(this,arguments);return t==z&&(e=$),e}function d(t){return this.gCW().lR+=t?1:-1}function v(t,e){var o=this.gCW(),i=o.lR;i&&(o.lR=0),t.call(e||this),i&&(o.lR=i)}var D,m,T,C,G,b,w,A,O,U,V,x,M,W,H,I,P,Z,z,F,N,B,X=o.rurName,Y=this.gPtr(t),j=this.p2T(Y),_=function(t,e){if(t&&z)if(e){var o=z.GetOptions(),n=this.oE.Add({start:o.start,end:o.end,groupID:o.groupID,allDay:o.allDay});it&W&&this.EnsureVisibleClient(n),this.onRURChange("create",n)}else i(z,{s:j.tN+a(0,t.dtN),e:j.tN+l(nt,t.dtN)})},q=this.misc("dragAlpha",!0),Q=this.misc("dragAlphaNegate"),J=this.misc("dragDummyAlpha",!0),$=this.misc("formatCreateEventLabel"),tt=this.toShape("event-drag"),et=this.misc("arrangeEventsOnDrag")&&this.gVE().len()<256,ot=this.misc("dragStartOnMove"),it=this.misc("ensureVisibleOnDrag"),nt=function(){var t=this.misc("allowEmptyEvents");return t=f.IsS(t)?K*k.Time.ToN(t):t<0?-~~t:f.ToN(t)*K*this.gDSE().m}.call(this),rt=this.sGE()&&this.getAllowMoveEventToOtherGroup(),st=this.getAllowMultiDaysEvent();j&&(x=this.p2CE(Y)||"create"==X,P=(M=(I=this.p2ER(Y))&&I.oE)||!x&&(H=this.p2HT(Y))&&H.o.oE||null,W=x?1:M?2:4,x||(Z=this.getDragEv(P,!0,M),$=this.misc("formatUpdateEventLabel")),(x&&this.aCE()||Z&&Z.size&&this.aME())&&(x||(_=M?n:function(t,e){function o(o,n){i(o,function(t,e){return{s:e.s+t.dtN,e:e.e+t.dtN}}(t,n),o.isHADE()),rt&&(!t.oG||e&&j.oG==t.oG||o.SetGroupID(t.oG.getID())),o.isAllDay()!=t.aD&&(o.SetAllDay(t.aD),e&&i(o,o.se(),o.isAllDay()?2:-1)),e&&this.onRURChange("move",o,Z.get(o))}t&&(e?Z.forEach(function(t,e){o.call(this,e,e.se())},this):F&&o.call(this,F.oE,F))}),o.rurDragEnd=function(t){!et&&d.call(this,!1),T&&(this.oT.onLE=T),G&&(this.rurScrollD=G),C&&(this.isSelected=C),w&&(this.draw=w),b&&(this.drawE=b),A&&(this.fEsl=A),O&&(this.fEll=O),!t.event.drag.cancel&&(x||D)&&z&&this[x?"Smoothless":"Smooth"](function(){_.call(this,r.call(this,t.event),!0),P&&it&W&&this.EnsureVisibleClient(P)})},et||(o.rurEFPaint=function(t,e,o,i){B&&this.ctxScale(e,o,function(t){B.forEach(function(t,o){this.drawE(e,t,o)},this)})}),this.gAA().Has("scroll")||(o.rurAllow=0),o.rurDrag=function(t){var e=2==t.event.drag.status;D=D||e,ot&W&&!e||(!z&&function(t){if(!z){z=new R(this.oT.oE,P&&P.GetOptions()||{start:new Date(j.tN),end:new Date(j.tN+nt),groupID:j.oG?j.oG.getID():this.oT.oG.cID(),allDay:j.aD});var e=x?this.getCreateEventLabel():this.getUpdateEventsLabel();null!=e&&(z.SetShortLabel(e),z.SetLongLabel(e)),(F=z.se()).oE=z,x||(C=this.isSelected,this.isSelected=u),b=this.drawE,this.drawE=h,A=this.fEsl,this.fEsl=y,O=this.fEll,this.fEll=S,et?(T=this.oT.onLE,this.oT.onLE=g,w=this.draw,this.draw=s):(G=this.rurScrollD,this.rurScrollD=c),x&&(N=f.GP.Get("create",this.getCursors()))&&t.event.drag.setCursor(N),this.oT.oRUR.ao=z,!et&&d.call(this,!0)}}.call(this,t),_.call(this,r.call(this,t.event)),e&&(V||(V=!0,v.call(this,function(){this.rAO()})),et||(t.frame=function(){B=p.call(this,!0);var t=f.C2R(B.union()),e=t[0],o=t[1],i=this.rtCA(this.rt2C(t),!0);return B.forEach(function(t){f.ORt(t,-e,-o)}),i}.call(this))))},this.rurDrag(t,o)))},k.prototype.onRURChange=function(t,e,o){o&&this.oT.onMoveEvent(e,o),this.onChange(t,e)},k.prototype.rurDragDrop=function(t,e){var o,i=[],n=this.ap2E(this.ptCA(this.gPtr(t)),i);this.isSable(n)&&f.RUR.D3(t,{object:n,shape:(o=this.e2S({oE:n}))&&(o.normal||o),client:this.rtCA(i,!1),source:this,onpaint:function(t,e){this.source.drawE(t,e,{oE:this.object})},onclick:function(t){e.rurStatus&&(this.oT.oRUR=this.e2RUR(t),e.rurStatus&&e.rurStatus.call(this,t),this.oT.oRUR=null)},onmove:function(t){t.drag.setCursor(f.GP.Get(e.rurName,this.getCursors()))}})},k.prototype.getChange=function(t,e){return{object:e,action:t}},k.prototype.onChange=function(t,e){this.onchange(this.getChange(t,e))},k.prototype.onchange=function(t){this.oLts.onchange.do(t)},k.prototype.Soom=function(t,e){function o(){var t=this.GetClientRect();r=this.ptCA(e,!1),s={x:t[0],y:t[1]}}var i=null!=t,n=null!=e;if(i||n){var r,s,h=100*this.getScale();o.call(this),((i&=h!=t)||(n&=r.x!=s.x||r.y!=s.y))&&(f.A.Cancel("soom"),f.A.Progress(function(e){this.cwbU(),i&&this.SetZoom(h+(t-h)*e),n&&(o.call(this),this.rurScrollD((r.x-s.x)*e,(r.y-s.y)*e)),this.cweU()},{name:"soom",thisArg:this,duration:this.getSmooth(),onXDoL:!1,transition:"swipe"}))}},k.prototype.Home=function(){var t=this.gLDV(),e=t.sy.f;this.oT.oC&&this.oT.oC.SetDate(e),this.Soom(100,t.d2R(e)||[0,0])},k.prototype.FitToClient=function(t){if(t=t||this.gLE().rtAll(),!f.EyR(t)){var e=this.GetClientRect(),o=a(e[2]/t[2],e[3]/t[3]);this.sdayS(this.rdayS()),this.Soom(100*o,{x:t[0],y:t[1]})}},k.prototype.ToggleDate=function(t){t=e(t);var o=this;o[o.lSh||t&&!o.oTD&&!o.sTS()?"Smoothless":"Smooth"].call(this,o.oTD?function(){o.SetScroll(o.oTD.oScr),o.sdayS(o.oTD.dayS),o.oTD=null}:t&&function(){o.oTD={oScr:o.GetScroll(),dayS:o.odayS()},o.sdayS([-1,-1]),o.EnsureVisibleDate(t)})},k.prototype.name=function(){return(this.oW||{}).name||""},k.prototype.EnsureVisibleClient=function(t,e){if(t){var o=!1,i=t;if(f.IsA(t)||(s(t)&&this.gADL().ensure(t.gHADL()),i=this.o2rt(t)),i){this.updSPR();var n,r=(e=e||{}).allowScale,h=f.ToI(e.allowScroll,3),u=e.nearestFit,l=this.GetScroll(),c=this.getScale(),p=c,g=f.ToI(e.duration,this.getSmooth()),y=function(){var t=this.GetClientRect();return this.gClp(t)||t}.call(this);if(r){var S=this.GetClientRect(),d=this.rtCA(i,!1);p=a(c*S[2]/d[2],c*S[3]/d[3]),r=pY&&(i=this.back("eventContinueDay",!0))&&(h=function(){var t,e,o,i,n=0;return(t=this.misc("arrowSizeMultiDatesEvent"))&&(o=Y,e=this.rdayS(),t.forEach||(t=[t,t]),n=(i=t[0]||0)+a((t[1]||0)-i,(a(e[0],e[1])-o)/(3*o))),n}.call(this))&&(s=this.eCD(o))&&(n=k.dArr,r=t.fillStyle,t.fillStyle=i,1&s&&(n(t,B.R2C(e,18),1,h),e[1]+=h,e[3]-=h),2&s&&(n(t,B.R2C(e,66),2,h),e[3]-=h),4&s&&(n(t,B.R2C(e,36),4,h),e[2]-=h),8&s&&(n(t,B.R2C(e,33),8,h),e[0]+=h,e[2]-=h),t.fillStyle=r),f.PRt(e,this.getPad(),-1)},k.prototype.eCD=function(t){var e=0,o=t.oE,i=o.isHADE(),n=this.gDSE(),r=!o.isAllDay();return(r?t.so.se().s)&&(e|=i?8:1),(r?t.e>k.Time.ToDTN(E(t.s),n.e):t.e3?(u-=a*n,t.drawArr([u+(2*c+a),l],[u+c,l])):(l-=a*n,t.drawArr([u,l+(2*c+a)],[u,l+c])),r.w=h,r.t=s},k.prototype.drawVE=function(t,e,o){this.ctxScale(t,e,function(e){var i=this.isSelectable()&&t.gAO()||null,n=this.gClp(e);n&&t.selClip(n),o.vforEach(function(e,o){this.drawE(t,e,o,i)},this),n&&t.resClip(n)})},k.prototype.gVADS=function(){return void 0===this.rgVADS&&(this.rgVADS=this.sAD()?new I(this):null),this.rgVADS},k.prototype.resVADS=function(){this.rgVADS=void 0},k.prototype.drawVADS=function(t,e){var o=this.gVADS();o&&this.ctxScale(t,e,function(e){o.vforEach(function(e,o){this.drawADS(t,e,o)},this)},this)},k.prototype.drawADS=function(t,e,o){var i,n,r=this.toShapes("date-all-day-scroll-button"),s=r&&r.normal||r;r&&(this.isEnabled()&&this.oT.oG.len()?(i=t.gAO())&&(f.EyO(r.hover)||(n=i.get(this,d(o)))&&(s=f.R.Shape(n.state,n.range,{from:s,to:r.hover})),f.EyO(r.click)||(n=i.get(this,v(o)))&&(s=f.R.Shape(n.state,n.range,{from:s,to:r.click}))):f.EyO(r.disabled)||(s=f.Inh(r.disabled,s))),s&&f.Schedule.sCTX(t,s,e,o,function(){!s.draw&&k.dArr(t,B.R2C(e),o.s,8,5)},this)},k.prototype.drawVZ=function(t,e,o){this.ctxScale(t,e,function(e){var i=this.isSelectable()&&t.gAO()||null,n=this.gClp(e);n&&t.selClip(n),o.vforEach(function(e,o){this.drawZ(t,e,o,i)},this),n&&t.resClip(n)})},k.prototype.drawVD=function(t,e,o){this.ctxScale(t,e,function(e){var i;o.vforEach(function(e,o){this.issD(o)?(i=i||[]).push({d:o,r:e}):this.drawD(t,e,o)},this),i&&i.forEach(function(e){this.drawD(t,e.r,e.d)},this)})},k.prototype.drawD=function(t,e,o){var i,n,r=new Date(o),s=this.gCnt(e),h=this.gClp(e);(n=this.toShape("dateAlt"))&&this.altD(r)&&(i=n),f.Schedule.sCTX(t,i,e,r,function(){s.H&&this.drawDH(t,s,r),s.gs.forEach(function(e){e.g&&this.drawDG(t,e.g,r),e.a&&this.drawAD(t,e.a,r),!h&&e.t&&this.drawDT(t,e.t,r)},this),h&&(t.selClip(h),s.gs.forEach(function(e){e.t&&this.drawDT(t,e.t,r)},this),t.resClip()),s.F&&this.drawDF(t,s.F,r)},this)},k.prototype.drawDF=function(t,e,o){var i,n=this.toShape("date-frame");this.issD(o)&&(i=this.toShape("date-frame-select"))&&(n=i),t.drawShape(e,n)},k.prototype.drawAD=function(t,e,o){var i=this.toShape("date-all-day-header");t.drawShape(e,i)},k.prototype.drawDH=function(t,e,o){var i,n=e.H,r=(this.getPad()[0],this.toShape(e.T?"date-header":this.getShowHighlightEvent()&&this.hasE(o)&&(n=e.F)?"uiHighlight":""));e.T&&(i=this.toShape("dateAlt-header"))&&this.altD(o)&&(r=i),f.Schedule.sCTX(t,r,n,o,function(){var i,n=e.HC.slice(),r=this.GetPageSize();r.splice(0,0,0,0),(i=f.NRt(n,r))&&(n[0]=i[0],n[2]=i[2]),t.drawHTMLDate(this.oALE.Fit(this.gHDL(),f.WOf(n),o,t),o,n,5)},this),e.HGB&&this.drawGB(t,e.HGB,o)},k.prototype.drawGB=function(t,e,o){var i,n,r=this.toShapes("grouping-button"),s=r&&r.normal||r;r&&(this.isEnabled()&&this.oT.oG.len()?(i=t.gAO())&&(f.EyO(r.hover)||(n=i.get(this,y(o)))&&(s=f.R.Shape(n.state,n.range,{from:s,to:r.hover})),f.EyO(r.click)||(n=i.get(this,S(o)))&&(s=f.R.Shape(n.state,n.range,{from:s,to:r.click}))):f.EyO(r.disabled)||(s=f.Inh(r.disabled,s))),f.Schedule.sCTX(t,s,e,o,function(){t.drawHTMLText(this.back("groupingButtonCaption"),e,5)},this)},k.prototype.drawDG=function(t,e,o){var i=e.oG;f.Schedule.sCTX(t,this.toShape("date-grouping-header"),e,o,function(){i&&f.Schedule.sCTX(t,this.toShape(i.GetHeaderShape()),e,o,function(){t.drawHTMLText(i.getCaption(),e,this.misc("formatGroupCaption"))},this)},this)},k.prototype.drawDT=function(t,e,o){f.Schedule.sCTX(t,this.toShape("date-timeScale"),e,o,function(){this.sTS()&&this.drawmM(t,e)},this)},k.prototype.drawmM=function(t,e){var o=this.oTS.gmM();P.drawR(t,e,o.m,this.back("minorTimeRulerColor"),this.back("minorTimeRulerStyle")),P.drawR(t,e,o.M,this.back("majorTimeRulerColor"),this.back("majorTimeRulerStyle"))},k.prototype.altD=function(t){return this.gLDV().d2I(t)%2},k.prototype.dGP=function(t,e){var o=B.cArrSize.t,i=t.lineWidth,n=e[2],r=e[0]+e[2]/2;B.cArrSize.t=1.5,t.lineWidth=n/4,t.drawArr([r,e[1]],[r,e[1]+n/2]),t.drawArr([r,f.BOf(e)],[r,f.BOf(e)-n/2]),t.lineWidth=i,B.cArrSize.t=o},k.prototype.rtDropOf=function(t,e){var o=this.getPad()[1];return t&&[(e?f.LOf(t):f.ROf(t))-8,t[1]-8-o/2,16,t[3]+16+o]||null},k.prototype.resmM=function(){this.oTS.resmM()},k.prototype.drawSC=function(t,e,o,i,n,r,s){var h=this.getShowHighlightEvent()&&("D"==s.type||"DNM"==s.type)&&this.hasE(s.date)&&(this.toShape("calendar-uiHighlight")||this.toShape("uiHighlight"))||null;f.Schedule.sCTX(o,h,i,r,function(){t&&t.call(e,o,i,n,r,s)},this)},k.prototype.onDV=function(){this.feSV(function(t){t.oDV=null,t.resHADx(),t.oTS.resmM()})},k.prototype.gDV=function(){var t=this.dSV();return t.oDV||(t.oDV=function(){function t(t){var e=l(0,a(r,n.toH(t)));return r-=e,e}function e(t,e){e&&(f[t]=[s,e],s+=e)}var o,i,n=this,r=n.rdayS()[1],s=0,h=0,u=0,c=0,p=0,f={};return h=t(this.getHeaderDayHeight()),r>0&&(this.sGE()&&(u=t(this.getHeaderGroupHeight())),this.sAD()&&(c=t(-this.gHADH())),(o=this.rTS())&&(p=l(0,r),u&&p+ut?(n.forEach(function(t){s.set(t,0)}),i.forEach(function(e){s.set(e,o&&e.getWidth()*t/o||0)})):(r=(t-o)/n.length,n.forEach(function(t){s.set(t,r)}),i.forEach(function(t){s.set(t,t.getWidth())})),u.forEach(function(t){h.push([e,r=s.get(t),t]),e+=r}),e||(h[0][1]=t)),h}.call(t,t.rdayS()[0]))},k.prototype.mGW=function(){var t=new Map;return this.gGW().forEach(function(e){t.set(e[2],[e[0],e[1]])}),t},k.prototype.gCnt=function(t,e){var o,i,n,r={F:t},s=this.gDV(),h=this.gGW(),u=this.isLH(),l=t[0],c=t[1],p=this.gCEM();return s.h&&(n=t.slice(),u&&(n[1]=0),n[1]+=s.h[0],n[3]=s.h[1],r.H=n,r.HC=n,this.dGB()&&(o=a(f.HOf(n),this.toH(1)))&&o+2*(i=this.getPad()[0]), <%mmmm%> <%d%>, <%yyyy%><|><%dddd%>,<%mmmm%> <%d%>,<%yyyy%><|><%dddd%>, <%mmmm%> <%d%>,`<%yy%><|><%dddd%>, <%mmmm%> <%d%><|><%dddd%>, <%m3%> <%d%><|><%dddd%>, <%d%><|><%d3%>, <%d%><|><%d2%>, <%d%><|><%d1%>, <%d%><|><%d3%><|><%d2%><|><%d%>")},k.prototype.GetHeaderDayShortLabel=function(){return this.oO.headerDayShortLabel},k.prototype.SetHeaderDayShortLabel=function(t){this.cwbU(),this.oO.headerDayShortLabel=t,this.cweU()},k.prototype.getHeaderDayShortLabel=function(){return this.opt("headerDayShortLabel","<%mmmm%> <%d%><|><%m3%> <%d%><|><%d%><=>((( day(value) = 1) or ( month(value+1) != month(value))) ? -1 : 2)")},k.prototype.gHDL=function(){return this.sTS()?this.getHeaderDayLongLabel():this.getHeaderDayShortLabel()},k.prototype.GetDayStartTime=function(){return this.oO.dayStartTime},k.prototype.SetDayStartTime=function(t){this.cwbU(),this.oO.dayStartTime=t,this.resDSE(),this.onLE(),this.cweU()},k.prototype.getDayStartTime=function(){return this.gDSE().s},k.prototype.GetDayEndTime=function(){return this.oO.dayEndTime},k.prototype.SetDayEndTime=function(t){this.cwbU(),this.oO.dayEndTime=t,this.resDSE(),this.onLE(),this.cweU()},k.prototype.getDayEndTime=function(){return this.gDSE().e},k.prototype.gDSE=function(){return this.oDSE||(this.oDSE=function(){var t=k.Time.ToN(this.opt("dayStartTime","08:00")),e=k.Time.ToN(this.opt("dayEndTime","16:00")),o=this.oTS.getTimeZone();return o&&(t+=o,e+=o),{s:a(t,e),e:l(t,e),m:k.Time.ToN(this.oTS.opt("minorTimeRuler","00:15")),M:k.Time.ToN(this.oTS.opt("majorTimeRuler","01:00"))}}.call(this))},k.prototype.resDSE=function(){this.oDSE=null},k.prototype.toDSE=function(t){var o=e(t),i=this.gDSE();return o=k.Time.ToDTN(E(o),l(i.s,a(i.e,(o-E(o))/K))),t&&t.setTime&&t.setTime(o),t},k.prototype.GetTimeScale=function(){return this.oTS.GetOptions()},k.prototype.SetTimeScale=function(t){this.oTS.SetOptions(t)},k.prototype.sTS=function(){var t,e,o=this.oTS.getVisible();return o&&(e=this.oTS.oW)&&(this.lsTS++||this.oW.oCW.w2R(this.oW)&&(o=e._ovC?e._ovC.v:e.IsMinRec()||(t=this.gDV()).t&&t.t[1]>=this.rTS()),--this.lsTS),o},k.prototype.rTS=function(){return this.toH(this.misc("requireTimeScaleHeight"))},k.prototype.dTS=function(){return this.toH(this.misc("displayTimeScaleHeight"))},k.prototype.rRD=function(){return this.toH(this.misc("requireRulerDistance"))},k.prototype.SetGroups=function(t){this.oT.SetGroups(t)},k.prototype.SetEvents=function(t){this.oT.SetEvents(t)},k.prototype.GetShowGroupingEvents=function(){return this.oO.showGroupingEvents},k.prototype.SetShowGroupingEvents=function(t){this.cwbU(),this.oO.showGroupingEvents=t,this.oT.oG.resVG(),this.oT.onLE(),this.oT.onLZ(),this.cweU()},k.prototype.getShowGroupingEvents=function(){return this.opt("showGroupingEvents",!1)},k.prototype.sGE=function(){var t;return this.getShowGroupingEvents()&&(t=this.gVG())&&t.len()&&t||null},k.prototype.GetDisplayGroupingButton=function(){return this.oO.displayGroupingButton},k.prototype.SetDisplayGroupingButton=function(t){this.cwbU(),this.oO.displayGroupingButton=t,this.cweU()},k.prototype.getDisplayGroupingButton=function(){return this.opt("displayGroupingButton",!1)},k.prototype.dGB=function(){return this.sTS()&&this.getShowGroupingEvents()&&this.oT.oG.len()&&this.getDisplayGroupingButton()},k.prototype.GetHeaderGroupHeight=function(){return this.oO.headerGroupHeight},k.prototype.SetHeaderGroupHeight=function(t){this.cwbU(),this.oO.headerGroupHeight=t,this.onLE(),this.cweU()},k.prototype.getHeaderGroupHeight=function(){return this.opt("headerGroupHeight",1)},k.prototype.GetApplyGroupingColors=function(){return this.oO.applyGroupingColors},k.prototype.SetApplyGroupingColors=function(t){this.cwbU(),this.oO.applyGroupingColors=t,this.cweU()},k.prototype.getApplyGroupingColors=function(){return this.opt("applyGroupingColors",!0)},k.prototype.GetOnSelectDate=function(){return this.oO.onSelectDate},k.prototype.SetOnSelectDate=function(t){this.bU(),this.oO.onSelectDate=t,this.eU()},k.prototype.getOnSelectDate=function(){return c(this.opt("onSelectDate"),f.Schedule.OnSelectDateEnum,-1)},k.prototype.GetSelectEventStyle=function(){return this.oO.selectEventStyle},k.prototype.SetSelectEventStyle=function(t){this.bU(),this.oO.selectEventStyle=t,this.eU()},k.prototype.getSelectEventStyle=function(){return~~this.opt("selectEventStyle",0)},k.prototype.onSC2=function(){var t,e,o,i=this.getOnSelectDate(),n=this.sD(),r=this.gLDV().d2HV(n),s=this.getShowViewCompact(),h=s>0&&(2==s?0:1)||null,u=this.oT.oG;if(this.sDG(n.len()?{d:n.first(),g:u.gVG().first()||u.cID()}:null),i){if(this.bU(),i<0){if(e=this.GetPageSize(),t=[-1,-1],r)for(var l=0;l<2;l++)1!=r[l]&&(t[l]=e[l]/r[l]);null!=h&&(t[h]=this.odayS()[h],o=h?1:2),this.sdayS(t)}this.EnsureVisibleDate(n,o),this.eU()}},k.prototype.GetAllowMoveEventToOtherGroup=function(){return this.oO.allowMoveEventToOtherGroup},k.prototype.SetAllowMoveEventToOtherGroup=function(t){this.bU(),this.oO.allowMoveEventToOtherGroup=t,this.eU()},k.prototype.getAllowMoveEventToOtherGroup=function(){return this.opt("allowMoveEventToOtherGroup",!0)},k.prototype.aDDE=function(){return this.isSelectable()&&!this.isReadOnly()},k.prototype.aCE=function(){return this.gAA().Has("create")&&this.aDDE()&&this.getShowEvents()},k.prototype.aME=function(){return this.gAA().Has("move")&&this.aDDE()},k.prototype.gCEM=function(){return this.aCE()&&l(0,f.ToN(this.misc("createEventMargin")))||0},k.prototype.gEM=function(){var t=this.misc("eventMargin"),e=f.ToN(t[0],t)||0;return[e,f.ToN(t[1],e)]},k.prototype.GetDefaultEventToolTip=function(){return this.oO.defaultEventToolTip},k.prototype.SetDefaultEventToolTip=function(t){this.cwbU(),this.oO.defaultEventToolTip=t,this.oExT=void 0,this.cweU()},k.prototype.getDefaultEventToolTip=function(){if(void 0===this.oExT){var t=f.ToS(this.opt("defaultEventToolTip","Start: <%=%1%>
End: <%=%2%>
Duration: <%=((1:=int(0:= %7)) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>"));this.oExT=t&&Z.Get(t)||null}return this.oExT},k.prototype.GetDefaultEventShortLabel=function(){return this.oO.defaultEventShortLabel},k.prototype.SetDefaultEventShortLabel=function(t){this.cwbU(),this.oO.defaultEventShortLabel=t,this.oExsL=void 0,this.cweU()},k.prototype.getDefaultEventShortLabel=function(){if(void 0===this.oExsL){var t=f.ToS(this.opt("defaultEventShortLabel",""));this.oExsL=t&&Z.Get(t)||null}return this.oExsL},k.prototype.GetDefaultEventLongLabel=function(){return this.oO.defaultEventLongLabel},k.prototype.SetDefaultEventLongLabel=function(t){this.cwbU(),this.oO.defaultEventLongLabel=t,this.oExlL=void 0,this.cweU()},k.prototype.getDefaultEventLongLabel=function(){if(void 0===this.oExlL){var t=f.ToS(this.opt("defaultEventLongLabel","<%=%256%>"));this.oExlL=t&&Z.Get(t)||null}return this.oExlL},k.prototype.GetDefaultEventExtraLabel=function(){return this.oO.defaultEventExtraLabel},k.prototype.SetDefaultEventExtraLabel=function(t){this.cwbU(),this.oO.defaultEventExtraLabel=t,this.oExeL=void 0,this.cweU()},k.prototype.getDefaultEventExtraLabel=function(){if(void 0===this.oExeL){var t=f.ToS(this.opt("defaultEventExtraLabel","<%=%256%>"));this.oExeL=t&&Z.Get(t)||null}return this.oExeL},k.prototype.GetShortDateFormat=function(){return this.oO.shortDateFormat},k.prototype.SetShortDateFormat=function(t){this.cwbU(),this.oO.shortDateFormat=t,this.cweU()},k.prototype.getShortDateFormat=function(){return f.ToS(this.GetShortDateFormat(),"<%loc_sdate%>")},k.prototype.GetShortTimeFormat=function(){return this.oO.shortTimeFormat},k.prototype.SetShortTimeFormat=function(t){this.cwbU(),this.oO.shortTimeFormat=t,this.cweU()},k.prototype.getShortTimeFormat=function(){return f.ToS(this.GetShortTimeFormat(),"<%h%>:<%nn%> <%AM/PM%>")},k.prototype.GetLongDateFormat=function(){return this.oO.longDateFormat},k.prototype.SetLongDateFormat=function(t){this.cwbU(),this.oO.longDateFormat=t,this.cweU()},k.prototype.getLongDateFormat=function(){return f.ToS(this.GetLongDateFormat(),"<%loc_ldate%>")},k.prototype.GetLongTimeFormat=function(){return this.oO.longTimeFormat},k.prototype.SetLongTimeFormat=function(t){this.cwbU(),this.oO.longTimeFormat=t,this.cweU()},k.prototype.getLongTimeFormat=function(){return f.ToS(this.GetLongTimeFormat(),"<%hh%>:<%nn%>:<%ss%> <%AM/PM%>")},k.prototype.GetShowEventLabels=function(){return this.oO.showEventLabels},k.prototype.SetShowEventLabels=function(t){this.cwbU(),this.oO.showEventLabels=t,this.cweU()},k.prototype.getShowEventLabels=function(){return f.ToB(this.GetShowEventLabels(),!0)},k.prototype.GetCreateEventLabel=function(){return this.oO.createEventLabel},k.prototype.SetCreateEventLabel=function(t){this.cwbU(),this.oO.createEventLabel=t,this.cweU()},k.prototype.getCreateEventLabel=function(){return this.opt("createEventLabel")},k.prototype.GetUpdateEventsLabel=function(){return this.oO.updateEventsLabel},k.prototype.SetUpdateEventsLabel=function(t){this.cwbU(),this.oO.updateEventsLabel=t,this.cweU()},k.prototype.getUpdateEventsLabel=function(){return this.opt("updateEventsLabel")},k.prototype.GetShowMarkZone=function(){return this.oO.showMarkZone},k.prototype.SetShowMarkZone=function(t){this.cwbU(),this.oO.showMarkZone=t,this.cweU()},k.prototype.getShowMarkZone=function(){return f.ToI(this.GetShowMarkZone(),2)},k.prototype.GetShowEvents=function(){return this.oO.showEvents},k.prototype.SetShowEvents=function(t){this.cwbU(),this.oO.showEvents=t,this.oT.onLE(),this.cweU()},k.prototype.getShowEvents=function(){return f.ToI(this.GetShowEvents(),-1)},k.prototype.GetShowAllDayHeader=function(){return this.oO.showAllDayHeader},k.prototype.SetShowAllDayHeader=function(t){this.cwbU(),this.oO.showAllDayHeader=t,this.oADL=null,this.oT.onLE(),this.onUI(),this.cweU()},k.prototype.getShowAllDayHeader=function(){return f.ToB(this.GetShowAllDayHeader(),!1)},k.prototype.GetHeaderAllDayEventHeight=function(){return this.oO.headerAllDayEventHeight},k.prototype.SetHeaderAllDayEventHeight=function(t){this.cwbU(),this.oO.headerAllDayEventHeight=t,this.onLE(),this.cweU()},k.prototype.getHeaderAllDayEventHeight=function(){return this.opt("headerAllDayEventHeight",1)},k.prototype.sAD=function(){return this.getShowAllDayHeader()&&this.getHeaderAllDayEventHeight()&&this.rdayS()[1]>function(){var t=this.toH(this.getHeaderDayHeight())+this.gHADH(1);return this.sGE()&&(t+=this.toH(-this.getHeaderGroupHeight())),t}.call(this)},k.prototype.gADL=function(){var t=this.gLE().gADRL();return(this.oADL=this.oADL||(this.oADL=new H(this,t))).get(t)},k.prototype.gHADE=function(){return this.toH(this.getHeaderAllDayEventHeight())+2*this.getPad()[1]},k.prototype.gHADH=function(t){t=t||this.gADL().C;var e=this.gEM()[1];return e+t*(this.gHADE()+e)+this.gCEM()},k.prototype.gHADx=function(){return this.nHADx||(this.nHADx=function(){var t=this.rdayS()[1],e=this.gEM()[1],o=this.gHADE()+e;return t-=this.toH(this.getHeaderDayHeight()),this.sGE()&&(t-=this.toH(this.getHeaderGroupHeight())),l(1,Math.round((t-2*e)/o))}.call(this))},k.prototype.resHADx=function(){this.nHADx=null},k.prototype.GetAllowMultiDaysEvent=function(){return this.oO.allowMultiDaysEvent},k.prototype.SetAllowMultiDaysEvent=function(t){this.cwbU(),this.oO.allowMultiDaysEvent=t,this.onLE(),this.cweU()},k.prototype.getAllowMultiDaysEvent=function(){return this.opt("allowMultiDaysEvent",!0)},k.prototype.GetAllowAllDayEventScroll=function(){return this.oO.allowAllDayEventScroll},k.prototype.SetAllowAllDayEventScroll=function(t){this.cwbU(),this.oO.allowAllDayEventScroll=t,this.onDV(),this.cweU()},k.prototype.getAllowAllDayEventScroll=function(){return this.opt("allowAllDayEventScroll",null)},k.prototype.e2Rs=function(t,e){var o=[];return this.gLE().feR(t,function(t,i,n){return o.push(i),n+1==e}),o},k.prototype.onCopy=function(){var t=[];return this.getSel().forEach(function(e){e.genID(),t.push(e.coO())}),this.sDG(),{e:t}},k.prototype.onPaste=function(t){var e,i,n,r,s,h=t.e;o(h)&&(e=this.oE.nextID(h.length),i=new Map,h.forEach(function(t,o){i.set(t.key,t.key=e[o])},this),this.oDG&&this.oDG.d&&(h.forEach(function(t){s=E(Date.Create(t.start).getTime()),r=null==r?s:a(r,s)},this),r=E(this.oDG.d)-r,n=this.oDG.g?this.oDG.g.getID():this.oT.oG.cID(),h.forEach(function(t){r&&(s=Date.Create(t.start),t.start=r+E(s)+s%K,t.end=new Date(t.start+(Date.Create(t.end).getTime()-s)).toFormat(),t.start=new Date(t.start).toFormat()),t.groupID=n},this)),h.forEach(function(t){this.oE.Add(t)},this))},k.prototype.aCCP=function(){return f.EVis(this.GetCanvas())},k.prototype.Cut=function(){this.aCCP()&&(this.Copy(),this.oT.RemoveSelection())},k.prototype.Copy=function(){if(this.aCCP()){var t=f.win.event,e=JSON.stringify(this.onCopy());r(t)?(f.SEP(t),t.clipboardData.setData("text/plain",e)):f.nav.clipboard.writeText(e)}},k.prototype.Paste=function(){function t(t){this.Smooth(function(){var e,o=this.oE.GetCount();try{this.onPaste(JSON.parse(t))}catch(t){}if(o!=this.oE.GetCount()){for(var i=o,n=this.oE.GetCount();i:<%nn%> <%AM/PM%>")},P.prototype.GetMajorTimeRuler=function(){return this.oO.majorTimeRuler},P.prototype.SetMajorTimeRuler=function(t){this.cwbU(),this.oO.majorTimeRuler=t,this.oSV.resDSE(),this.resmM(),this.cweU()},P.prototype.getMajorTimeRuler=function(){return this.oSV.gDSE().M},P.prototype.GetMinorTimeLabel=function(){return this.oO.minorTimeLabel},P.prototype.SetMinorTimeLabel=function(t){this.cwbU(),this.oO.minorTimeLabel=t,this.resmM(),this.cweU()},P.prototype.getMinorTimeLabel=function(){return this.opt("minorTimeLabel",":<%nn%>")},P.prototype.GetMinorTimeRuler=function(){return this.oO.minorTimeRuler},P.prototype.SetMinorTimeRuler=function(t){this.cwbU(),this.oO.minorTimeRuler=t,this.oSV.resDSE(),this.resmM(),this.cweU()},P.prototype.getMinorTimeRuler=function(){return this.oSV.gDSE().m},P.prototype.GetTimeZone=function(){return this.oO.timeZone},P.prototype.SetTimeZone=function(t){this.cwbU(),this.oO.timeZone=t,this.oSV.resDSE(),this.resmM(),this.onLE(),this.cweU()},P.prototype.getTimeZone=function(){return k.Time.ToN(this.opt("timeZone","00:00"),!0)},P.prototype.resmM=function(){this.feSV(function(t){t.oTS.omM=null})},P.prototype.gmM=function(){function t(t,e){return Math.abs(t-e)o&&!t(e,o)}function n(t,e,o,i){var n=0;return e&&(n=t*o/e,i&&(n=l(0,a(n,o)))),n}return this.omM||(this.omM=function(){var t,r,s,h,u,a=this.gDV(),c=[],p=[],f={m:p,M:c},g=this.getMajorTimeRuler(),y=0;return a.t&&(t=a.t[1])&&(s=this.getDayStartTime()+y,h=this.getDayEndTime()+y,(u=h-s)>N&&(r=this.rRD(),1==function(i,a,c){var p,f,g,S,d,v,E=0;if(i>N){for(g=y;o(g+i,s);)g+=i;if(S=g-s,!c)for(f=0,d=n(S,u,t);f=-.001&&!(p%E)&&a.push({t:g,o:v}),g+=i,p++}return E}.call(this,g,c)&&function(e,s,h){function u(t,e,s){if(s.splice(0),c.length>1)for(var h,u,l=c[0],a=c[1],p=a.o-l.o,f=g,y=l.t,S=a.t,d=r,v=y;o(v,S);)h=n(v-y,f,p),u=!1,e?u=i(v,y):h>=d&&(u=hN&&(p=u.call(this,e,!1,a=[]))&&(l=(f=g/(p+1))/e,l/=5,(f=(l*=5)*e)>N&&i(f,e)&&u.call(this,f,!0,a=[]),a.length&&c.forEach(function(e){a.forEach(function(o){e.o+o.o<=t&&s.push({t:e.t+o.t,o:e.o+o.o})})}))}.call(this,this.getMinorTimeRuler(),p))),f}.call(this))},P.drawR=function(t,e,o,i,n,r,s){var h,u,l,a=e[0],c=e[1],p=a+e[2];o.length&&(null!=i&&(t.save(),t.beginPath(),t.strokeStyle=i,null!=n&&t.setLineDash(f.IsA(n)?n:[n]),t.strokeStyle=i,o.forEach(function(e){t.moveTo(a,c+e.o),t.lineTo(p,c+e.o)}),t.stroke(),t.restore()),r&&(l=Date.Today(),h=s?a:p,u=256|(s?0:2),o.forEach(function(e){t.drawHTMLDate(r,k.Time.ToDT(l,e.t),[h,c+e.o,0,0],u)})))},P.prototype.drawmM=function(t,e,o){var i=e&&o&&B.X(B.R2C(e))