@daypilot/daypilot-lite-vue 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daypilot-vue.min.js +10 -6
- package/package.json +1 -1
package/daypilot-vue.min.js
CHANGED
|
@@ -3,10 +3,14 @@ DayPilot Lite
|
|
|
3
3
|
Copyright (c) 2005 - 2023 Annpoint s.r.o.
|
|
4
4
|
https://www.daypilot.org/
|
|
5
5
|
Licensed under Apache Software License 2.0
|
|
6
|
-
Version: 2023.1.
|
|
6
|
+
Version: 2023.1.450-lite
|
|
7
7
|
*/
|
|
8
|
-
if("undefined"==typeof DayPilot)var DayPilot={};!function(){function e(e){var t=DayPilot.Date.Cache.Ticks;if(t[e])return DayPilot.Stats.cacheHitsTicks+=1,t[e];var a,r=new Date(e),o=r.getUTCMilliseconds();a=0===o?"":o<10?".00"+o:o<100?".0"+o:"."+o;var n=r.getUTCSeconds();n<10&&(n="0"+n);var i=r.getUTCMinutes();i<10&&(i="0"+i);var l=r.getUTCHours();l<10&&(l="0"+l);var d=r.getUTCDate();d<10&&(d="0"+d);var s=r.getUTCMonth()+1;s<10&&(s="0"+s);var u=r.getUTCFullYear();if(u<=0)throw"The minimum year supported is 1.";u<10?u="000"+u:u<100?u="00"+u:u<1e3&&(u="0"+u);var c=u+"-"+s+"-"+d+"T"+l+":"+i+":"+n+a;return t[e]=c,c}function t(e,t){return!DayPilot.Util.isNullOrUndefined(e)&&(!DayPilot.Util.isNullOrUndefined(t)&&e.toLocaleLowerCase()===t.toLocaleLowerCase())}function a(e){e=Math.min(e,255),e=Math.max(e,0);var t=e.toString(16);return e<16?"0"+t:t}if("undefined"==typeof DayPilot.$){"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),DayPilot.$=function(e){return document.getElementById(e)},DayPilot.isKhtml=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("KHTML")!==-1,DayPilot.isIE=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,DayPilot.mo2=function(e,t){if(t=t||window.event,"undefined"!=typeof t.offsetX){var a={x:t.offsetX+1,y:t.offsetY+1};if(!e)return a;for(var r=t.srcElement;r&&r!==e;)"SPAN"!==r.tagName&&(a.x+=r.offsetLeft,r.offsetTop>0&&(a.y+=r.offsetTop-r.scrollTop)),r=r.offsetParent;return r?a:null}if("undefined"!=typeof t.layerX){var a={x:t.layerX,y:t.layerY,src:t.target};if(!e)return a;for(var r=t.target;r&&"absolute"!==r.style.position&&"relative"!==r.style.position;)r=r.parentNode,DayPilot.isKhtml&&(a.y+=r.scrollTop);for(;r&&r!==e;)a.x+=r.offsetLeft,a.y+=r.offsetTop-r.scrollTop,r=r.offsetParent;return r?a:null}return null},DayPilot.mo3=function(e,t){var a,r=DayPilot.page(t);if(r)if(e){var o=DayPilot.abs(e);if(!o)throw new Error("no abs");a={x:r.x-o.x,y:r.y-o.y}}else a={x:r.x,y:r.y};else if(a=DayPilot.mo2(e,t),!a)return null;return a.shift=t.shiftKey,a.meta=t.metaKey,a.ctrl=t.ctrlKey,a.alt=t.altKey,a},DayPilot.browser={},DayPilot.browser.ie9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.ielt9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if lt IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.hover=!window.matchMedia("(any-hover: none)").matches,DayPilot.touch={},DayPilot.page=function(e){var t=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0]:e;return"undefined"==typeof t.pageX||DayPilot.browser.ie?"undefined"!=typeof e.clientX&&document.body&&document.documentElement?{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop}:null:{x:t.pageX,y:t.pageY}},DayPilot.abs=function(e,t){if(!e)return null;if(e.getBoundingClientRect){var a=DayPilot.absBoundingClientBased(e);if(t){var r=DayPilot.absOffsetBased(e,!1),t=DayPilot.absOffsetBased(e,!0);a.x+=t.x-r.x,a.y+=t.y-r.y,a.w=t.w,a.h=t.h}return a}return DayPilot.absOffsetBased(e,t)},DayPilot.absBoundingClientBased=function(e){var t=e.getBoundingClientRect();return{x:t.left+window.pageXOffset,y:t.top+window.pageYOffset,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}}},DayPilot.absOffsetBased=function(e,t){for(var a={x:e.offsetLeft,y:e.offsetTop,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}};e.offsetParent;)e=e.offsetParent,a.x-=e.scrollLeft,a.y-=e.scrollTop,t&&(a.x<0&&(a.w+=a.x,a.x=0),a.y<0&&(a.h+=a.y,a.y=0),e.scrollLeft>0&&a.x+a.w>e.clientWidth&&(a.w-=a.x+a.w-e.clientWidth),e.scrollTop&&a.y+a.h>e.clientHeight&&(a.h-=a.y+a.h-e.clientHeight)),a.x+=e.offsetLeft,a.y+=e.offsetTop;var r=DayPilot.pageOffset();return a.x+=r.x,a.y+=r.y,a},DayPilot.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},DayPilot.distance=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},DayPilot.sheet=function(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,a={};return a.rules=[],a.commit=function(){t&&(e.styleSheet.cssText=this.rules.join("\n"))},a.add=function(a,r,o){return t?void this.rules.push(a+"{"+r+"}"):void(e.sheet.insertRule?("undefined"==typeof o&&(o=e.sheet.cssRules.length),e.sheet.insertRule(a+"{"+r+"}",o)):e.sheet.addRule&&e.sheet.addRule(a,r,o))},a},DayPilot.gs=function(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)||""},DayPilot.StyleReader=function(e){this.get=function(t){return e?DayPilot.gs(e,t):null},this.getPx=function(e){var t=this.get(e);return t.indexOf("px")===-1?void 0:parseInt(t,10)}},function(){if(!DayPilot.Global.defaultCss){var e=DayPilot.sheet();e.add(".calendar_default_main","border: 1px solid #c0c0c0; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after","box-sizing: content-box;"),e.add(".calendar_default_rowheader_inner,.calendar_default_cornerright_inner,.calendar_default_corner_inner,.calendar_default_colheader_inner,.calendar_default_alldayheader_inner","color: #333;background: #f3f3f3;"),e.add(".calendar_default_cornerright_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\tborder-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_direction_rtl .calendar_default_cornerright_inner","border-right: 1px solid #c0c0c0;"),e.add(".calendar_default_rowheader_inner","font-size: 16pt;text-align: right; position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; padding: 3px;"),e.add(".calendar_default_direction_rtl .calendar_default_rowheader_inner","border-right: none;"),e.add(".calendar_default_corner_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_direction_rtl .calendar_default_corner_inner","border-right: none;"),e.add(".calendar_default_rowheader_minutes","font-size:10px;vertical-align: super;padding-left: 2px;padding-right: 2px;"),e.add(".calendar_default_colheader_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; display: flex; align-items: center; justify-content: center; font-size: 13px;"),e.add(".calendar_default_cell_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd; background: #f9f9f9;"),e.add(".calendar_default_cell_business .calendar_default_cell_inner","background: #fff"),e.add(".calendar_default_alldayheader_inner","text-align: center;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_message","opacity: 0.9; padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner","color: #333; border: 1px solid #999;"),e.add(".calendar_default_event_bar","top: 0px;bottom: 0px;left: 0px;width: 6px;background-color: #9dc8e8;"),e.add(".calendar_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner",'background: #fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_selected .calendar_default_event_inner","background: #ddd;"),e.add(".calendar_default_alldayevent_inner","position: absolute;top: 2px;bottom: 2px;left: 2px;right: 2px;overflow:hidden;padding: 2px;margin-right: 1px; font-size: 13px;"),e.add(".calendar_default_event_withheader .calendar_default_event_inner","padding-top: 15px;"),e.add(".calendar_default_event","cursor: default;"),e.add(".calendar_default_event_inner","position: absolute;overflow: hidden;top: 0px;bottom: 0px;left: 0px;right: 0px;padding: 2px 2px 2px 8px; font-size: 13px;"),e.add(".calendar_default_shadow_inner","position:absolute;top:0px;left:0px;right:0px;bottom:0px;background-color: #666666; opacity: 0.5;"),e.add(".calendar_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".calendar_default_event_delete:hover","opacity: 1;-ms-filter: none;"),e.add(".calendar_default_scroll_up","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAB3RJTUUH2wESDiYcrhwCiQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAARnQU1BAACxjwv8YQUAAACcSURBVHjaY2AgF9wWsTW6yGMlhi7OhC7AyMDQzMnBXIpFHAFuCtuaMTP+P8nA8P/b1x//FfW/HHuF1UQmxv+NUP1c3OxMVVhNvCVi683E8H8LXOY/w9+fTH81tF8fv4NiIpBRj+YoZtZ/LDUoJmKYhsVUpv0MDiyMDP96sIYV0FS2/8z9ICaLlOhvS4b/jC//MzC8xBG0vJeF7GQBlK0xdiUzCtsAAAAASUVORK5CYII=);"),e.add(".calendar_default_scroll_down","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAACqSURBVChTY7wpam3L9J+xmQEP+PGPKZZxP4MDi4zI78uMDIwa2NT+Z2DYovrmiC+TI8OBP/8ZmEqwGvif4e8vxr+FIDkmEKH25vBWBgbG0+iK/zEwLtF+ffwOXCGI8Y+BoRFFIdC030x/WmBiYBNhpgLdswNJ8RSYaSgmgk39z1gPUfj/29ef/9rwhQTDHRHbrbdEbLvRFcGthkkAra/9/uMvhkK8piNLAgCRpTnNn4AEmAAAAABJRU5ErkJggg==);"),e.add(".calendar_default_now","background-color: red;"),e.add(".calendar_default_now:before","content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent red; border-style: solid; width: 0px; height:0px; position: absolute; -moz-transform: scale(.9999);"),e.add(".calendar_default_shadow_forbidden .calendar_default_shadow_inner","background-color: red;"),e.add(".calendar_default_shadow_top",'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_shadow_bottom",'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_crosshair_vertical, .calendar_default_crosshair_horizontal, .calendar_default_crosshair_left, .calendar_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".calendar_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".calendar_default_scroll","background-color: #f3f3f3;"),e.add(".calendar_default_event_moving_source","opacity: 0.5;"),e.add(".menu_default_main","user-select:none; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size: 13px;border: 1px solid #dddddd;background-color: white;padding: 0px;cursor: default;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAABCAIAAABG0om7AAAAKXRFWHRDcmVhdGlvbiBUaW1lAHBvIDEwIDUgMjAxMCAyMjozMzo1OSArMDEwMGzy7+IAAAAHdElNRQfaBQoUJAesj4VUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAABGdBTUEAALGPC/xhBQAAABVJREFUeNpj/P//PwO1weMnT2RlZAAYuwX/4oA3BgAAAABJRU5ErkJggg==);background-repeat: repeat-y;xborder-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);"),e.add(".menu_default_main, .menu_default_main *, .menu_default_main *:before, .menu_default_main *:after","box-sizing: content-box;"),e.add(".menu_default_title","background-color: #f2f2f2;border-bottom: 1px solid gray;padding: 4px 4px 4px 37px;"),e.add(".menu_default_main a","padding: 2px 2px 2px 35px;color: black;text-decoration: none;cursor: default;"),e.add(".menu_default_main.menu_default_withchildren a","padding: 2px 35px 2px 35px;"),e.add(".menu_default_main a img","margin-left: 6px;margin-top: 2px;"),e.add(".menu_default_item_text","display: block;height: 20px;line-height: 20px; overflow:hidden;padding-left: 2px;padding-right: 20px; white-space: nowrap;"),e.add(".menu_default_main a:hover","background-color: #f3f3f3;"),e.add(".menu_default_main div div","border-top: 1px solid #dddddd;margin-top: 2px;margin-bottom: 2px;margin-left: 28px;"),e.add(".menu_default_main a.menu_default_item_disabled","color: #ccc"),e.add(".menu_default_item_haschildren.menu_default_item_haschildren_active","background-color: #f3f3f3;"),e.add(".menu_default_item_haschildren a:before","content: ''; border-width: 5px; border-color: transparent transparent transparent #666; border-style: solid; width: 0px; height:0px; position: absolute; right: 5px; margin-top: 5px;"),e.add(".menu_default_item_icon","position: absolute; top:0px; left: 0px; padding: 2px 2px 2px 8px;"),e.add(".menu_default_item a i","height: 20px;line-height: 20px;"),e.add(".menu_default_item .menu_default_item_symbol","width: 18px; height: 18px; color: #999; margin-left: 6px;margin-top: 2px;"),e.add(".menubar_default_main","border-bottom: 1px solid #ccc; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px; user-select:none;"),e.add(".menubar_default_item","display: inline-block; padding: 6px 10px; cursor: default;"),e.add(".menubar_default_item:hover","background-color: #f2f2f2;"),e.add(".menubar_default_item_active","background-color: #f2f2f2;"),e.add(".scheduler_default_selected .scheduler_default_event_inner","background: #ddd;"),e.add(".scheduler_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".scheduler_default_timeheader","cursor: default;color: #333;"),e.add(".scheduler_default_message","opacity: 0.9;filter: alpha(opacity=90);padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader,.scheduler_default_corner","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #eee;padding: 2px;"),e.add(".scheduler_default_timeheadergroup, .scheduler_default_timeheadercol","text-align: center;"),e.add(".scheduler_default_timeheadergroup_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".scheduler_default_timeheadercol_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;"),e.add(".scheduler_default_divider","background-color: #c0c0c0;"),e.add(".scheduler_default_divider_horizontal","background-color: #c0c0c0;"),e.add(".scheduler_default_matrix_vertical_line","background-color: #eee;"),e.add(".scheduler_default_matrix_vertical_break","background-color: #000;"),e.add(".scheduler_default_matrix_horizontal_line","background-color: #eee;"),e.add(".scheduler_default_resourcedivider","background-color: #c0c0c0;"),e.add(".scheduler_default_shadow_inner","background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;xborder-radius: 5px;"),e.add(".scheduler_default_event","color:#333; font-size: 13px;"),e.add(".scheduler_default_event_inner","position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:5px 2px 2px 2px;overflow:hidden;border:1px solid #ccc;"),e.add(".scheduler_default_event_bar","top:0px;left:0px;right:0px;height:4px;background-color:#9dc8e8;"),e.add(".scheduler_default_event_bar_inner","position:absolute;height:4px;background-color:#1066a8;"),e.add(".scheduler_default_event_inner",'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".scheduler_default_event_float_inner","padding:6px 2px 2px 8px;"),e.add(".scheduler_default_event_float_inner:after",'content:"";border-color: transparent #666 transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:8px;left:-4px;'),e.add(".scheduler_default_columnheader_inner","font-weight: bold;"),e.add(".scheduler_default_columnheader_splitter","background-color: #666;opacity: 0.5;filter: alpha(opacity=50);"),e.add(".scheduler_default_columnheader_cell_inner","padding: 2px;"),e.add(".scheduler_default_cell","background-color: #f9f9f9;"),e.add(".scheduler_default_cell.scheduler_default_cell_business","background-color: #fff;"),e.add(".navigator_default_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after","box-sizing: content-box;"),e.add(".navigator_default_month","font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 12px;"),e.add(".navigator_default_day","color: black;"),e.add(".navigator_default_weekend","background-color: #f0f0f0;"),e.add(".navigator_default_dayheader","color: black;"),e.add(".navigator_default_line","border-bottom: 1px solid #c0c0c0;"),e.add(".navigator_default_dayother","color: gray;"),e.add(".navigator_default_todaybox","border: 1px solid red;"),e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),e.add(".navigator_default_busy","font-weight: bold;"),e.add(".navigator_default_cell","text-align: center;"),e.add(".navigator_default_select .navigator_default_cell_box","background-color: #FFE794; opacity: 0.5;"),e.add(".navigator_default_title","text-align: center;"),e.add(".navigator_default_titleleft, .navigator_default_titleright","text-align: center;"),e.add(".navigator_default_dayheader","text-align: center;"),e.add(".navigator_default_weeknumber","text-align: center; color: #999;"),e.add(".navigator_default_cell_text","cursor: pointer;"),e.add(".month_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;color: #333;"),e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after","box-sizing: content-box;"),e.add(".month_default_cell_inner","border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;background-color: #f9f9f9;"),e.add(".month_default_cell_business .month_default_cell_inner","background-color: #fff;"),e.add(".month_default_cell_header","text-align: right; padding: 4px; box-sizing: border-box;"),e.add(".month_default_header_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;cursor: default;color: #333;background: #f3f3f3; overflow:hidden; display: flex; align-items: center; justify-content: center;"),e.add(".month_default_message","padding: 10px;opacity: 0.9; color: #ffffff;background: #ffa216;"),e.add(".month_default_event_inner","position: absolute;top: 0px;bottom: 0px;left: 1px;right: 1px;overflow:hidden;padding: 2px;padding-left: 10px;color: #333;background: #fff;background: linear-gradient(to bottom, #ffffff 0%, #eeeeee);border: 1px solid #999;border-radius: 0px;display: flex; align-items: center; font-size: 13px;"),e.add(".month_default_event_continueright .month_default_event_inner","border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-right-style: dotted;"),e.add(".month_default_event_continueleft .month_default_event_inner","border-top-left-radius: 0px;border-bottom-left-radius: 0px;border-left-style: dotted;"),e.add(".month_default_event_bar","top: 0px;bottom: 0px;left: 0px;width: 6px;"),e.add(".month_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".month_default_event_continueleft .month_default_event_bar","display: none;"),e.add(".month_default_selected .month_default_event_inner","background: #ddd;"),e.add(".month_default_shadow_inner","background-color: #666666;opacity: 0.5;height: 100%;"),e.add(".month_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".month_default_event_delete:hover","opacity: 1;-ms-filter: none;"),e.add(".month_default_event_timeleft","color: #ccc; font-size: 8pt"),e.add(".month_default_event_timeright","color: #ccc; font-size: 8pt; text-align: right;"),e.add(".month_default_loading","background-color: orange; color: white; padding: 2px;"),e.commit(),DayPilot.Global.defaultCss=!0}}(),DayPilot.doc=function(){var e=document.documentElement;return e&&e.clientHeight?e:document.body},DayPilot.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},DayPilot.pageOffset=function(){if("undefined"!=typeof pageXOffset)return{x:pageXOffset,y:pageYOffset};var e=DayPilot.doc();return{x:e.scrollLeft,y:e.scrollTop}},DayPilot.indexOf=function(e,t){if(!e||!e.length)return-1;for(var a=0;a<e.length;a++)if(e[a]===t)return a;return-1},DayPilot.ac=function(e,t){if(!t)var t=[];for(var a=0;e.children&&a<e.children.length;a++)t.push(e.children[a]),DayPilot.ac(e.children[a],t);return t},DayPilot.rfa=function(e,t){var a=DayPilot.indexOf(e,t);a!==-1&&e.splice(a,1)},DayPilot.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},DayPilot.Stats={},DayPilot.Stats.eventObjects=0,DayPilot.Stats.dateObjects=0,DayPilot.Stats.cacheHitsCtor=0,DayPilot.Stats.cacheHitsParsing=0,DayPilot.Stats.cacheHitsTicks=0,DayPilot.re=function(e,t,a){a&&t&&e&&e.addEventListener(t,a,!1)},DayPilot.rePassive=function(e,t,a){a&&t&&e&&e.addEventListener(t,a,{"passive":!0})},DayPilot.reNonPassive=function(e,t,a){a&&t&&e&&e.addEventListener(t,a,{"passive":!1})},DayPilot.pu=function(e){var t,a,r,o=e.attributes;if(o)for(a=o.length,t=0;t<a;t+=1)o[t]&&(r=o[t].name,"function"==typeof e[r]&&(e[r]=null));if(o=e.childNodes)for(a=o.length,t=0;t<a;t+=1){DayPilot.pu(e.childNodes[t])}},DayPilot.de=function(e){if(e)if(DayPilot.isArray(e))for(var t=0;t<e.length;t++)DayPilot.de(e[t]);else e.parentNode&&e.parentNode.removeChild(e)},DayPilot.sw=function(e){return e?e.offsetWidth-e.clientWidth:0},DayPilot.am=function(){return"undefined"==typeof angular?null:(DayPilot.am.cached||(DayPilot.am.cached=angular.module("daypilot",[])),DayPilot.am.cached)},DayPilot.Selection=function(e,t,a,r){this.type="selection",this.start=e.isDayPilotDate?e:new DayPilot.Date(e),this.end=t.isDayPilotDate?t:new DayPilot.Date(t),this.resource=a,this.root=r,this.toJSON=function(e){var t={};return t.start=this.start,t.end=this.end,t.resource=this.resource,t}},DayPilot.request=function(e,t,a,r){var o=DayPilot.createXmlHttp();o&&(o.open("POST",e,!0),o.setRequestHeader("Content-type","text/plain"),o.onreadystatechange=function(){if(4===o.readyState)return 200!==o.status&&304!==o.status?void(r?r(o):window.console&&console.log("HTTP error "+o.status)):void t(o)},4!==o.readyState&&("object"==typeof a&&(a=JSON.stringify(a)),o.send(a)))},DayPilot.ajax=function(e){if(!e)throw new DayPilot.Exception("Parameter object required.");if("string"!=typeof e.url)throw new DayPilot.Exception("The parameter object must have 'url' property.");var t=DayPilot.createXmlHttp();if(!t)throw new DayPilot.Exception("Unable to create XMLHttpRequest object");var a="object"==typeof e.data,r=e.data,o=e.method||(e.data?"POST":"GET"),n=e.success||function(){},i=e.error||function(){},l=e.url,d=e.contentType||(a?"application/json":"text/plain"),s=e.headers||{};t.open(o,l,!0),t.setRequestHeader("Content-type",d),DayPilot.Util.ownPropsAsArray(s).forEach(function(e){t.setRequestHeader(e.key,e.val)}),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||201===t.status||204===t.status||304===t.status){var e={};e.request=t,t.responseText&&(e.data=JSON.parse(t.responseText)),n(e)}else if(i){var e={};e.request=t,i(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&(a&&(r=JSON.stringify(r)),t.send(r))},DayPilot.createXmlHttp=function(){return new XMLHttpRequest},DayPilot.Http={},DayPilot.Http.ajax=function(e){DayPilot.ajax(e)},DayPilot.Http.get=function(e,t){return t=t||{},new Promise(function(a,r){var o={};o.url=e,o.method="GET",o.success=function(e){a(e)},o.error=function(e){r(e)},o.contentType=t.contentType,o.headers=t.headers,DayPilot.ajax(o)})},DayPilot.Http.post=function(e,t,a){return a=a||{},new Promise(function(r,o){var n={};n.url=e,n.method="POST",n.data=t,n.success=function(e){r(e)},n.error=function(e){o(e)},n.contentType=a.contentType,n.headers=a.headers,DayPilot.ajax(n)})},DayPilot.Http.put=function(e,t,a){return a=a||{},new Promise(function(r,o){var n={};n.url=e,n.method="PUT",n.data=t,n.success=function(e){r(e)},n.error=function(e){o(e)},n.contentType=a.contentType,n.headers=a.headers,DayPilot.ajax(n)})},DayPilot.Http.delete=function(e,t){return t=t||{},new Promise(function(a,r){var o={};o.url=e,o.method="DELETE",o.success=function(e){a(e)},o.error=function(e){r(e)},o.contentType=t.contentType,o.headers=t.headers,DayPilot.ajax(o)})},DayPilot.Util={},DayPilot.Util.addClass=function(e,t){if(e){if(!e.className)return void(e.className=t);new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)||(e.className=e.className+" "+t)}},DayPilot.Util.removeClass=function(e,t){if(e){var a=new RegExp("(^|\\s)"+t+"($|\\s)");e.className=e.className.replace(a," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}},DayPilot.Util.copyProps=function(e,t,a){if(t||(t={}),!e)return t;if("undefined"==typeof a)for(var r in e)e.hasOwnProperty(r)&&"undefined"!=typeof e[r]&&(t[r]=e[r]);else for(var o=0;o<a.length;o++){var r=a[o];"undefined"!=typeof e[r]&&(t[r]=e[r])}return t},DayPilot.Util.ownPropsAsArray=function(e){var t=[];if(!e)return t;for(var a in e)if(e.hasOwnProperty(a)){var r={};r.key=a,r.val=e[a],t.push(r)}return t},DayPilot.Util.replaceCharAt=function(e,t,a){return e.substr(0,t)+a+e.substr(t+a.length)},DayPilot.Util.isNullOrUndefined=function(e){return null===e||"undefined"==typeof e},DayPilot.Util.escapeHtml=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},DayPilot.Util.escapeTextHtml=function(e,t){return DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":DayPilot.Util.escapeHtml(e):t},DayPilot.Areas={},DayPilot.Areas.attach=function(e,t,a){var a=a||{},o=a.areas,n=a.allowed||function(){return!0},i=a.offsetX||0;o=r(t,o),o&&DayPilot.isArray(o)&&0!==o.length&&(DayPilot.re(e,"mousemove",function(r){e.active||e.areasDisabled||!n()||DayPilot.Areas.showAreas(e,t,r,o,{"offsetX":i,"eventDiv":a.eventDiv})}),DayPilot.re(e,"mouseleave",function(t){DayPilot.Areas.hideAreas(e,t)}),o.forEach(function(r){if(DayPilot.Areas.isVisible(r)){var o=DayPilot.Areas.createArea(e,t,r,{"offsetX":i,"eventDiv":a.eventDiv});e.appendChild(o)}}))},DayPilot.Areas.disable=function(e){e.areasDisabled=!0,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c=e.style.display,e.style.display="none"})},DayPilot.Areas.enable=function(e){e.areasDisabled=!1,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c?e.style.display=e.c:e.style.display=""})},DayPilot.Areas.remove=function(e){var t=Array.from(e.childNodes).filter(function(e){return e.isActiveArea});DayPilot.de(t)},DayPilot.Areas.isVisible=function(e){var t=e.visibility||e.v||"Visible";return"Visible"===t||"TouchVisible"===t&&!DayPilot.browser.hover},DayPilot.Areas.copy=function(e){return DayPilot.isArray(e)?e.map(function(e){return DayPilot.Util.copyProps(e,{})}):[]};var r=function(e,t){return DayPilot.isArray(t)||(t=e.areas,t||(e.cache?t=e.cache.areas:e.data&&(t=e.data.areas))),t};DayPilot.Areas.showAreas=function(e,t,a,r,o){if(!DayPilot.Global.resizing&&!DayPilot.Global.moving&&!DayPilot.Global.selecting&&!e.active&&DayPilot.browser.hover){if(DayPilot.Areas.all&&DayPilot.Areas.all.length>0)for(var n=0;n<DayPilot.Areas.all.length;n++){var i=DayPilot.Areas.all[n];i!==e&&DayPilot.Areas.hideAreas(i,a)}if(e.active={},DayPilot.isArray(r)||(r=t.areas,r||(t.cache?r=t.cache.areas:t.data&&(r=t.data.areas))),r&&0!==r.length&&!(e.areas&&e.areas.length>0)){e.areas=[];for(var n=0;n<r.length;n++){var l=r[n];if(!DayPilot.Areas.isVisible(l)){var d=DayPilot.Areas.createArea(e,t,l,o);e.areas.push(d),e.appendChild(d),DayPilot.Areas.all.push(e)}}e.active.children=DayPilot.ac(e)}}},DayPilot.Areas.createArea=function(e,t,a,r){function o(e){return"string"==typeof e&&isNaN(e)?e:"undefined"!=typeof e?e+"px":void 0}function n(e,t,a){var r={};return r.area=e,r.source=t,r.originalEvent=a,r.preventDefault=function(){r.preventDefault.value=!0},"function"==typeof e.onClick&&e.onClick(r),r}function i(e,t,a){DayPilot.Bubble&&DayPilot.Bubble.touchPosition(a),e.calendar.bubble&&e.calendar.bubble.showEvent(e,!0)}function l(e,t,a,r){DayPilot.Menu&&DayPilot.Menu.touchPosition(r);var o=a.contextMenu||a.menu;if(o instanceof DayPilot.Menu||(t.isEvent&&t.client.contextMenu()?o=t.client.contextMenu():t.isEvent&&t.calendar.contextMenu&&(o=t.calendar.contextMenu)),
|
|
9
|
-
o&&o.show){var n={"type":"area","div":e,"e":t,"area":a,"a":s};o.show(t,{"initiator":n})}}var r=r||{},d=(r.offsetX||0,r.eventDiv||e),s=document.createElement("div");s.isActiveArea=!0,s.area=a,s.setAttribute("unselectable","on");var u=a.w||a.width,c=a.h||a.height,f=a.cssClass||a.css||a.className;if("undefined"!=typeof a.style&&s.setAttribute("style",a.style),s.style.position="absolute",s.style.width=o(u),s.style.height=o(c),s.style.right=o(a.right),s.style.top=o(a.top),s.style.left=o(a.left),s.style.bottom=o(a.bottom),"undefined"!=typeof a.html||"undefined"!=typeof a.text)s.innerHTML=DayPilot.Util.escapeTextHtml(a.text,a.html);else if(a.icon){var y=document.createElement("i");y.className=a.icon,s.appendChild(y)}else if(a.image){var m=document.createElement("img");m.src=a.image,s.appendChild(m)}else if(a.symbol){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"svg");p.setAttribute("width","100%"),p.setAttribute("height","100%");var g=document.createElementNS(h,"use");g.setAttribute("href",a.symbol),p.appendChild(g),s.appendChild(p)}if(f&&(s.className=f),a.toolTip&&s.setAttribute("title",a.toolTip),a.backColor&&(s.style.background=a.backColor),a.background&&(s.style.background=a.background),a.fontColor&&(s.style.color=a.fontColor),a.padding&&(s.style.padding=a.padding+"px",s.style.boxSizing="border-box"),a.verticalAlignment)switch(s.style.display="flex",a.verticalAlignment){case"center":s.style.alignItems="center";break;case"top":s.style.alignItems="flex-start";break;case"bottom":s.style.alignItems="flex-end"}if(a.horizontalAlignment)switch(s.style.display="flex",a.horizontalAlignment){case"right":s.style.justifyContent="flex-end";break;case"left":s.style.justifyContent="flex-start";break;case"center":s.style.justifyContent="center"}if("ResizeEnd"===a.action||"ResizeStart"===a.action||"Move"===a.action){if(t.calendar.isCalendar)switch(a.action){case"ResizeEnd":a.cursor="s-resize",a.dpBorder="bottom";break;case"ResizeStart":a.cursor="n-resize",a.dpBorder="top";break;case"Move":a.cursor="move"}if(t.calendar.isScheduler||t.calendar.isMonth)switch(a.action){case"ResizeEnd":a.cursor="e-resize",a.dpBorder="right";break;case"ResizeStart":a.cursor="w-resize",a.dpBorder="left";break;case"Move":a.cursor="move"}s.onmousemove=function(e,t,a){return function(r){t.calendar.internal&&t.calendar.internal.dragInProgress&&t.calendar.internal.dragInProgress()||(r.cancelBubble=!0,e.style.cursor=a.cursor,a.dpBorder&&(e.dpBorder=a.dpBorder))}}(d,t,a),s.onmouseout=function(e,t,a){return function(t){e.style.cursor=""}}(d,t,a)}if(("ResizeEnd"===a.action||"ResizeStart"===a.action)&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,a){return function(r){r.cancelBubble=!0;var o=t.calendar.internal.touch,n=r.touches?r.touches[0]:r,i={x:n.pageX,y:n.pageY};t.calendar.coords=o.relativeCoords(r),o.preventEventTap=!0,t.calendar.isScheduler?o.startResizing(e,"ResizeEnd"===a.action?"right":"left"):t.calendar.isCalendar&&o.startResizing(e,"ResizeEnd"===a.action?"bottom":"top",i)}}(d,t,a);DayPilot.rePassive(s,DayPilot.touch.start,b)}if("ContextMenu"===a.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,a){return function(r){r.cancelBubble=!0,r.preventDefault(),l(e,t,a,r),t.calendar.internal.touch.preventEventTap=!0}}(d,t,a),D=function(e,t,a){return function(e){e.cancelBubble=!0,e.preventDefault()}}(d,t,a);DayPilot.reNonPassive(s,DayPilot.touch.start,b),DayPilot.reNonPassive(s,DayPilot.touch.end,D)}if("Bubble"===a.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,a){return function(e){e.cancelBubble=!0,e.preventDefault();var r=n(a,t,e);if(!r.preventDefault.value){i(t,a,e);t.calendar.internal.touch.preventEventTap=!0,"function"==typeof a.onClicked&&a.onClicked(r)}}}(d,t,a),D=function(e,t,a){return function(e){e.cancelBubble=!0,e.preventDefault()}}(d,t,a);DayPilot.reNonPassive(s,DayPilot.touch.start,b),DayPilot.reNonPassive(s,DayPilot.touch.end,D)}if("Move"===a.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,a){return function(a){a.cancelBubble=!0;var r=t.calendar.internal.touch,o=a.touches?a.touches[0]:a,n={x:o.pageX,y:o.pageY};t.calendar.coords=r.relativeCoords(a),DayPilot.Global&&DayPilot.Global.touch&&(DayPilot.Global.touch.active=!0),r.preventEventTap=!0,r.startMoving(e,n)}}(d,t,a);DayPilot.rePassive(s,DayPilot.touch.start,b)}if("Bubble"===a.action&&t.isEvent?(s.onmousemove=function(e,t,a){return function(e){a.bubble?a.bubble.showEvent(t,!0):t.calendar.bubble&&t.calendar.bubble.showEvent(t,!0)}}(e,t,a),s.onmouseout=function(e,t,a){return function(e){"undefined"!=typeof DayPilot.Bubble&&(a.bubble?a.bubble.hideOnMouseOut():t.calendar.bubble&&t.calendar.bubble.hideOnMouseOut())}}(e,t,a)):"Bubble"===a.action&&t.isRow?(s.onmousemove=function(e,t,a){return function(e){a.bubble?a.bubble.showResource(t,!0):t.calendar.resourceBubble&&t.calendar.resourceBubble.showResource(t,!0)}}(e,t,a),s.onmouseout=function(e,t,a){return function(e){"undefined"!=typeof DayPilot.Bubble&&(a.bubble?a.bubble.hideOnMouseOut():t.calendar.resourceBubble&&t.calendar.resourceBubble.hideOnMouseOut())}}(e,t,a)):"Bubble"===a.action&&"undefined"!=typeof DayPilot.Bubble&&a.bubble instanceof DayPilot.Bubble&&(s.onmousemove=function(e,t,a){return function(e){a.bubble.showHtml(null,null)}}(e,t,a),s.onmouseout=function(e,t,a){return function(e){"undefined"!=typeof DayPilot.Bubble&&a.bubble&&a.bubble.hideOnMouseOut()}}(e,t,a)),"HoverMenu"===a.action&&(s.onmousemove=function(e,t,a){return function(e){var r=a.menu;r&&r.show&&(r.visible?r.source&&"undefined"!=typeof r.source.id&&r.source.id!==t.id&&r.show(t):r.show(t),r.cancelHideTimeout())}}(e,t,a),s.onmouseout=function(e,t,a){return function(e){var t=a.menu;t&&t.hideOnMouseOver&&t.delayedHide()}}(e,t,a)),"None"===a.action){var b=function(e,t,a){return function(e){var r=n(a,t,e);"function"==typeof a.onClicked&&a.onClicked(r),e.preventDefault(),e.stopPropagation()}}(d,t,a);DayPilot.reNonPassive(s,DayPilot.touch.start,b)}return s.onmousedown=function(e,t,a){return function(r){if("function"==typeof a.onmousedown&&a.onmousedown(r),"function"==typeof a.mousedown){var o={};o.area=a,o.div=e,o.originalEvent=r,o.source=t,a.mousedown(o)}if("Move"===a.action&&t.isRow){var n=t.$.row;(0,t.calendar.internal.rowStartMoving)(n)}"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),"Move"===a.action&&(DayPilot.Global.movingAreaData=a.data),"Move"===a.action&&t.isEvent&&t.calendar.internal&&t.calendar.internal.startMoving&&t.calendar.internal.startMoving(e,r);"Move"!==a.action&&"ResizeEnd"!==a.action&&"ResizeStart"!==a.action&&a.action&&"Default"!==a.action&&(r.preventDefault(),r.cancelBubble=!0)}}(e,t,a),s.onclick=function(e,t,a){return function(r){var o=n(a,t,r);if(!o.preventDefault.value){switch(a.action){case"ContextMenu":l(e,t,a,r),r.cancelBubble=!0;break;case"None":r.cancelBubble=!0}"function"==typeof a.onClicked&&a.onClicked(o)}}}(e,t,a),"function"==typeof a.onMouseEnter&&s.addEventListener("mouseenter",function(e,t,a){return function(e){var r={};r.area=a,r.source=t,r.originalEvent=e,a.onMouseEnter(r)}}(e,t,a)),"function"==typeof a.onMouseLeave&&s.addEventListener("mouseleave",function(e,t,a){return function(e){var r={};r.area=a,r.source=t,r.originalEvent=e,a.onMouseLeave(r)}}(e,t,a)),s},DayPilot.Areas.all=[],DayPilot.Areas.hideAreas=function(e,t){if(e&&e&&e.active){var a=e.active,r=e.areas;if(a&&a.children&&t){var o=t.toElement||t.relatedTarget;if(~DayPilot.indexOf(a.children,o))return}if(!r||0===r.length)return void(e.active=null);DayPilot.de(r),e.active=null,e.areas=[],DayPilot.rfa(DayPilot.Areas.all,e),a.children=null}},DayPilot.Areas.hideAll=function(e){if(DayPilot.Areas.all&&0!==DayPilot.Areas.all.length)for(var t=0;t<DayPilot.Areas.all.length;t++)DayPilot.Areas.hideAreas(DayPilot.Areas.all[t],e)},DayPilot.Exception=function(e){return new Error(e)},DayPilot.Locale=function(e,t){if(this.id=e,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,t)for(var a in t)this[a]=t[a]},DayPilot.Locale.all={},DayPilot.Locale.find=function(e){if(!e)return null;var t=e.toLowerCase();return t.length>2&&(t=DayPilot.Util.replaceCharAt(t,2,"-")),DayPilot.Locale.all[t]},DayPilot.Locale.register=function(e){DayPilot.Locale.all[e.id]=e},DayPilot.Locale.register(new DayPilot.Locale("ca-es",{"dayNames":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"dayNamesShort":["dg","dl","dt","dc","dj","dv","ds"],"monthNames":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],"monthNamesShort":["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("cs-cz",{"dayNames":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"dayNamesShort":["ne","po","út","st","čt","pá","so"],"monthNames":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],"monthNamesShort":["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],"timePattern":"H:mm","datePattern":"d. M. yyyy","dateTimePattern":"d. M. yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("da-dk",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"dd-MM-yyyy","dateTimePattern":"dd-MM-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-at",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-ch",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-de",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-lu",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-au",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-ca",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("en-gb",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-us",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"M/d/yyyy","dateTimePattern":"M/d/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("es-es",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["D","L","M","X","J","V","S"],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("es-mx",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["do.","lu.","ma.","mi.","ju.","vi.","sá."],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"hh:mm tt","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy hh:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("eu-es",{"dayNames":["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],"dayNamesShort":["ig","al","as","az","og","or","lr"],"monthNames":["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],"monthNamesShort":["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fi-fi",{"dayNames":["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"dayNamesShort":["su","ma","ti","ke","to","pe","la"],"monthNames":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],"monthNamesShort":["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-be",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd-MM-yy","dateTimePattern":"dd-MM-yy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-ch",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-fr",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-lu",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("gl-es",{"dayNames":["domingo","luns","martes","mércores","xoves","venres","sábado"],"dayNamesShort":["do","lu","ma","mé","xo","ve","sá"],"monthNames":["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],"monthNamesShort":["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-it",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-ch",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ja-jp",{"dayNames":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dayNamesShort":["日","月","火","水","木","金","土"],"monthNames":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("nb-no",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-nl",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"d-M-yyyy","dateTimePattern":"d-M-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-be",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"H:mm","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nn-no",{"dayNames":["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],"dayNamesShort":["sø","må","ty","on","to","fr","la"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-br",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("pl-pl",{"dayNames":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dayNamesShort":["N","Pn","Wt","Śr","Cz","Pt","So"],"monthNames":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],"monthNamesShort":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-pt",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ro-ro",{"dayNames":["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],"dayNamesShort":["D","L","Ma","Mi","J","V","S"],"monthNames":["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],"monthNamesShort":["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ru-ru",{"dayNames":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"dayNamesShort":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],"monthNamesShort":["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sk-sk",{"dayNames":["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],"dayNamesShort":["ne","po","ut","st","št","pi","so"],"monthNames":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sv-se",{"dayNames":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dayNamesShort":["sö","må","ti","on","to","fr","lö"],"monthNames":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("tr-tr",{"dayNames":["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],"dayNamesShort":["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],"monthNames":["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],"monthNamesShort":["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],"timePattern":"HH:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("uk-ua",{"dayNames":["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],"dayNamesShort":["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень",""],"monthNamesShort":["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-cn",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"timePattern":"H:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.US=DayPilot.Locale.find("en-us"),DayPilot.Duration=function(e){var t=this,a=864e5,r=36e5,o=6e4,n=1e3;if(2===arguments.length){var i=arguments[0],l=arguments[1];if(!(i instanceof DayPilot.Date)&&"string"!=typeof i)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(l instanceof DayPilot.Date)&&"string"!=typeof l)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof i&&(i=new DayPilot.Date(i)),"string"==typeof l&&(l=new DayPilot.Date(l)),e=l.getTime()-i.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var a=t.minutes();a=(a<10?"0":"")+a;var r=e;return r=r.replace("mm",a),r=r.replace("m",t.minutes()),r=r.replace("H",t.hours()),r=r.replace("h",t.hours()),r=r.replace("d",t.days()),r=r.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/r},this.totalDays=function(){return t.ticks/a},this.totalMinutes=function(){return t.ticks/o},this.totalSeconds=function(){return t.ticks/n},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*a;return Math.floor(e/r)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*r;return Math.floor(e/o)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*o;return Math.floor(e/n)},void(this.milliseconds=function(){return t.ticks%n}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(t,a){if(t instanceof DayPilot.Date)return t;var r;DayPilot.Util.isNullOrUndefined(t)&&(r=DayPilot.DateUtil.fromLocal().getTime(),t=r);var o=DayPilot.Date.Cache.Ctor;if(o[t])return DayPilot.Stats.cacheHitsCtor+=1,o[t];var n=!1;if("string"==typeof t)r=DayPilot.DateUtil.fromStringSortable(t,a).getTime(),n=!0;else if("number"==typeof t){if(isNaN(t))throw"Cannot create DayPilot.Date from NaN";r=t}else{if(!(t instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";r=a?DayPilot.DateUtil.fromLocal(t).getTime():t.getTime()}var i=e(r);return o[i]?o[i]:(o[i]=this,o[r]=this,n&&i!==t&&DayPilot.DateUtil.hasTzSpec(t)&&(o[t]=this),Object.defineProperty&&!DayPilot.browser.ielt9?(Object.defineProperty(this,"ticks",{get:function(){return r}}),Object.defineProperty(this,"value",{"value":i,"writable":!1,"enumerable":!0})):(this.ticks=r,this.value=i),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(r)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},
|
|
10
|
-
DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),a=t.getUTCFullYear(),r=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,a++;e>12-r?(a++,r=e-(12-r)):r+=e}else{for(;e<=-12;)e+=12,a--;r+e<=0?(a--,r=12+r+e):r+=e}var o=new Date(t.getTime());o.setUTCDate(1),o.setUTCFullYear(a),o.setUTCMonth(r-1);var n=new DayPilot.Date(o).daysInMonth();return o.setUTCDate(Math.min(n,t.getUTCDate())),new DayPilot.Date(o)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),a=new Date(this.ticks),r=this.getYear()+e,o=this.getMonth();a.setUTCDate(1),a.setUTCFullYear(r),a.setUTCMonth(o);var n=new DayPilot.Date(a).daysInMonth();return a.setUTCDate(Math.min(n,t.getUTCDate())),new DayPilot.Date(a)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,a=e.getUTCFullYear(),r=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?r[t-1]:a%4!==0?r[1]:a%100===0&&a%400!==0?r[1]:r[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var a=DayPilot.Locale.find(e);e=a.weekStarts}else e=e||0;for(var r=t.dayOfWeek();r!==e;)t=t.addDays(-1),r=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),a=this.firstDayOfYear().dayOfWeek(),r=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===a&&(a=7),0===r&&(r=7);var o=8-a;4!==a&&4!==r||(e=!0);var n=Math.ceil((t-o)/7),i=n;return o>=4&&(i+=1),i>52&&!e&&(i=1),0===i&&(i=this.firstDayOfYear().addDays(-1).weekNumberISO()),i},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new o(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return e(this.ticks)},DayPilot.Date.parse=function(e,t,a){return new o(t,a).parse(e)};DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,a){t=t||1,a=a||1;var r=new Date(0);return r.setUTCFullYear(e),r.setUTCMonth(t-1),r.setUTCDate(a),new DayPilot.Date(r)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var a=e.length,r=10===a,o=19===a,n=a>19;if(!r&&!o&&!n)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var i=e.substring(0,4),l=e.substring(5,7),d=e.substring(8,10),s=new Date(0);if(s.setUTCFullYear(i,l-1,d),r)return DayPilot.Date.Cache.Parsing[e]=s,s;var u=e.substring(11,13),c=e.substring(14,16),f=e.substring(17,19);if(s.setUTCHours(u),s.setUTCMinutes(c),s.setUTCSeconds(f),o)return DayPilot.Date.Cache.Parsing[e]=s,s;var y=e[19],m=0;if("."===y){var h=parseInt(e.substring(20,23));s.setUTCMilliseconds(h),m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var p=new DayPilot.Date(s);return t||(p=p.addMinutes(-m)),s=p.toDate(),DayPilot.Date.Cache.Parsing[e]=s,s},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],a=parseInt(e.substring(1,3)),r=parseInt(e.substring(4)),o=60*a+r;if("-"===t)return-o;if("+"===t)return o;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var a=0,r=e.getDatePart(),o=t.getDatePart();r<o;)r=r.addDays(1),a++;return a},DayPilot.DateUtil.daysSpan=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var a=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()==t.getDatePart().getTime()&&a--,a},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var a=e.getUTCMinutes();a<10&&(a="0"+a);var r=e.getUTCHours();if(t){var o=r<12,r=r%12;0===r&&(r=12);return r+":"+a+" "+(o?"AM":"PM")}return r+":"+a},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t};var o=function(e,a){"string"==typeof a&&(a=DayPilot.Locale.find(a));var a=a||DayPilot.Locale.US,r=[{"seq":"yyyy","expr":"[0-9]{4,4}","str":function(e){return e.getYear()}},{"seq":"yy","expr":"[0-9]{2,2}","str":function(e){return e.getYear()%100}},{"seq":"mm","expr":"[0-9]{2,2}","str":function(e){var t=e.getMinutes();return t<10?"0"+t:t}},{"seq":"m","expr":"[0-9]{1,2}","str":function(e){return e.getMinutes()}},{"seq":"HH","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();return t<10?"0"+t:t}},{"seq":"H","expr":"[0-9]{1,2}","str":function(e){return e.getHours()}},{"seq":"hh","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours(),t=t%12;0===t&&(t=12);var a=t;return a<10?"0"+a:a}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours(),t=t%12;return 0===t&&(t=12),t}},{"seq":"ss","expr":"[0-9]{2,2}","str":function(e){var t=e.getSeconds();return t<10?"0"+t:t}},{"seq":"s","expr":"[0-9]{1,2}","str":function(e){return e.getSeconds()}},{"seq":"MMMM","expr":"[^\\s0-9]*","str":function(e){return a.monthNames[e.getMonth()]},"transform":function(e){var r=DayPilot.indexOf(a.monthNames,e,t);return r<0?null:r+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return a.monthNamesShort[e.getMonth()]},"transform":function(e){var r=DayPilot.indexOf(a.monthNamesShort,e,t);return r<0?null:r+1}},{"seq":"MM","expr":"[0-9]{2,2}","str":function(e){var t=e.getMonth()+1;return t<10?"0"+t:t}},{"seq":"M","expr":"[0-9]{1,2}","str":function(e){return e.getMonth()+1}},{"seq":"dddd","expr":"[^\\s0-9]*","str":function(e){return a.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return a.dayNamesShort[e.getDayOfWeek()]}},{"seq":"dd","expr":"[0-9]{2,2}","str":function(e){var t=e.getDay();return t<10?"0"+t:t}},{"seq":"%d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"tt","expr":"(AM|PM|am|pm)","str":function(e){return e.getHours()<12?"AM":"PM"},"transform":function(e){return e.toUpperCase()}}],o=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function a(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(n){for(var i=o(e),l=null,d=0;d<r.length;d++){var s=(r[d].length,t===r[d].seq),u=r[d].expr;s&&(u="("+u+")",l=r[d].transform),i=i.replace(r[d].seq,u)}i="^"+i+"$";try{var c=new RegExp(i),f=c.exec(n);return f?(l=l||a)(f[1]):null}catch(e){throw"unable to create regex from: "+i}}}},this.print=function(t){for(var a=function(e){for(var t=0;t<r.length;t++)if(r[t]&&r[t].seq===e)return r[t];return null},o=e.length<=0,n=0,i=[];!o;){var l=e.substring(n),d=/%?(.)\1*/.exec(l);if(d&&d.length>0){var s=d[0],u=a(s);u?i.push(u):i.push(s),n+=s.length,o=e.length<=n}else o=!0}for(var c=0;c<i.length;c++){var f=i[c];"string"!=typeof f&&(i[c]=f.str(t))}return i.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var a=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(a))return null;if(a>12||a<1)return null;var r=this.day.findValue(e),o=DayPilot.Date.fromYearMonthDay(t,a).daysInMonth();if(r<1||r>o)return null;var n=this.hours?this.hours.findValue(e):0,i=this.minutes?this.minutes.findValue(e):0,l=this.seconds?this.seconds.findValue(e):0,d=this.ampm?this.ampm.findValue(e):null;if(this.ampm&&this.hours12){var s=this.hours12.findValue(e);if(s<1||s>12)return null;n="PM"===d?12===s?12:s+12:12===s?0:s}if(n<0||n>23)return null;if(i<0||i>59)return null;if(l<0||l>59)return null;var u=new Date;return u.setUTCFullYear(t,a-1,r),u.setUTCHours(n),u.setUTCMinutes(i),u.setUTCSeconds(l),u.setUTCMilliseconds(0),new DayPilot.Date(u)},this.init()};DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+a(e.r)+a(e.g)+a(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var a=DayPilot.ColorUtil.hexToRgb(e);t=t||1;var r=17,o=t*r,n=DayPilot.ColorUtil.adjustLuminance(a,-o);return DayPilot.ColorUtil.rgbToHex(n)},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),a=t.r/255,r=t.g/255,o=t.b/255;return Math.sqrt(.299*a*a+.587*r*r+.114*o*o)},DayPilot.ColorUtil.contrasting=function(e,t,a){var r=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",a=a||"#000000",r>.5?a:t},DayPilot.Event=function(e,t,a){var r=this;this.calendar=t,this.data=e?e:{},this.part=a?a:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var o={},n=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(o.dirty)return o;for(var e=0;e<n.length;e++)o[n[e]]=r.data[n[e]];return o.dirty=!0,o},this.copy=function(){for(var e={},t=0;t<n.length;t++)e[n[t]]=r.data[n[t]];return e},this.commit=function(){if(o.dirty){for(var e=0;e<n.length;e++)r.data[n[e]]=o[n[e]];o.dirty=!1}},this.dirty=function(){return o.dirty},this.id=function(e){return"undefined"==typeof e?r.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?r.id():void r.id(e)},this.text=function(e){return"undefined"==typeof e?r.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(r.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(r.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?r.data.resource:void(this.temp().resource=e)},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=r.data.tag;if(!t)return null;if("undefined"==typeof e)return r.data.tag;for(var a=r.calendar.tagFields,o=-1,n=0;n<a.length;n++)e===a[n]&&(o=n);if(o===-1)throw"Field name not found.";return t[o]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=r.cache||r.data,a=r.calendar&&r.calendar.internal&&r.calendar.internal.xssTextHtml;return a?a(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}r.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?r.data.header:void(r.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.cssClass?r.cache.cssClass:r.data.cssClass:void(r.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.toolTip?r.cache.toolTip:"undefined"!=typeof r.data.toolTip?r.data.toolTip:r.data.text:void(r.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.barHidden?!r.cache.barHidden:r.calendar.durationBarVisible&&!r.data.barHidden:void(r.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.backColor?r.cache.backColor:"undefined"!=typeof r.data.backColor?r.data.backColor:r.calendar.eventBackColor:void(r.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.borderColor?r.cache.borderColor:"undefined"!=typeof r.data.borderColor?r.data.borderColor:r.calendar.eventBorderColor:void(r.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(r.oContextMenu)return r.oContextMenu;r.cache?r.cache.contextMenu:r.data.contextMenu}else r.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.moveDisabled?!r.cache.moveDisabled:"Disabled"!==r.calendar.eventMoveHandling&&!r.data.moveDisabled:void(r.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.resizeDisabled?!r.cache.resizeDisabled:"Disabled"!==r.calendar.eventResizeHandling&&!r.data.resizeDisabled:void(r.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.clickDisabled?!r.cache.clickDisabled:"Disabled"!==r.calendar.eventClickHandling&&!r.data.clickDisabled:void(r.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.rightClickDisabled?!r.cache.rightClickDisabled:"Disabled"!==r.calendar.eventRightClickHandling&&!r.data.rightClickDisabled:void(r.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?r.cache&&"undefined"!=typeof r.cache.deleteDisabled?!r.cache.deleteDisabled:"Disabled"!==r.calendar.eventDeleteHandling&&!r.data.deleteDisabled:void(r.data.deleteDisabled=!e)},this.toJSON=function(e){var t={};if(t.value=this.id(),t.id=this.id(),t.text=this.text(),t.start=this.start(),t.end=this.end(),t.tag={},r.calendar&&r.calendar.tagFields)for(var a=r.calendar.tagFields,o=0;o<a.length;o++)t.tag[a[o]]=this.tag(a[o]);return t}}}}(),DayPilot.JSON={},function(){function e(e){return e<10?"0"+e:e}function t(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=l[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function a(e,i){var l,d,s,u,c,f=r,y=i[e];switch(y&&"object"==typeof y&&"function"==typeof y.toJSON2?y=y.toJSON2(e):y&&"object"==typeof y&&"function"==typeof y.toJSON&&!y.ignoreToJSON&&(y=y.toJSON(e)),"function"==typeof n&&(y=n.call(i,e,y)),typeof y){case"string":return t(y);case"number":return isFinite(y)?String(y):"null";case"boolean":case"null":return String(y);case"object":if(!y)return"null";if(r+=o,c=[],"number"==typeof y.length&&!y.propertyIsEnumerable("length")){for(u=y.length,l=0;l<u;l+=1)c[l]=a(l,y)||"null";return s=0===c.length?"[]":r?"[\n"+r+c.join(",\n"+r)+"\n"+f+"]":"["+c.join(",")+"]",r=f,s}if(n&&"object"==typeof n)for(u=n.length,l=0;l<u;l+=1)d=n[l],"string"==typeof d&&(s=a(d,y),s&&c.push(t(d)+(r?": ":":")+s));else for(d in y)Object.hasOwnProperty.call(y,d)&&(s=a(d,y),s&&c.push(t(d)+(r?": ":":")+s));return s=0===c.length?"{}":r?"{\n"+r+c.join(",\n"+r)+"\n"+f+"}":"{"+c.join(",")+"}",r=f,s}}"function"!=typeof Date.prototype.toJSON2&&(Date.prototype.toJSON2=function(t){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var r,o,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};"function"!=typeof DayPilot.JSON.stringify&&(DayPilot.JSON.stringify=function(e,t,i){var l;if(r="",o="","number"==typeof i)for(l=0;l<i;l+=1)o+=" ";else"string"==typeof i&&(o=i);if(n=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return a("",{"":e})})}();if("undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.selecting=!1,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var i=t.registered,n=0;n<i.length;n++)if(i[n]===e)return;i.push(e)},t.unregister=function(e){var i=t.registered;if(i){var n=DayPilot.indexOf(i,e);n!==-1&&i.splice(n,1)}},t.getCellsAbove=function(e){for(var i=[],n=t.getColumn(e),s=e.parentNode,a=null;s&&a!==t.firstSelected;)for(a=s.getElementsByTagName("td")[n],i.push(a),s=s.previousSibling;s&&"TR"!==s.tagName;)s=s.previousSibling;return i},t.getCellsBelow=function(e){for(var i=[],n=t.getColumn(e),s=e.parentNode,a=null;s&&a!==t.firstSelected;)for(a=s.getElementsByTagName("td")[n],i.push(a),s=s.nextSibling;s&&"TR"!==s.tagName;)s=s.nextSibling;return i},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(e){if(t.registered)for(var i=t.registered,n=0;n<i.length;n++){var s=i[n];s.dispose(),t.unregister(s)}},t.gMouseUp=function(i){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var n=t.resizing.event,s=t.resizingShadow.clientHeight+4,a=t.resizingShadow.offsetTop,l=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",n.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,n.calendar.a(n,s,a,l)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var a=t.movingShadow.offsetTop,n=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,n.calendar.b("_event_moving_source"));var o=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,n.calendar.nav.top.style.cursor="auto",n.calendar.c(n,o,a,i)}else if(t.selecting&&null!==t.topSelectedCell){var r=t.selecting.calendar;t.selecting=!1;var h=r.getSelection();r.d(h.start,h.end,h.resource),"Hold"!==r.timeRangeSelectedHandling&&"HoldForever"!==r.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var i=t.movingShadow,n=i.parentNode;n.style.display="none",i.parentNode.removeChild(i),e.firstChild.appendChild(i),i.style.left="0px",n.style.display="",i.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"},t.Calendar=function(e,i){var n=!1;if(this instanceof t.Calendar&&!this.f&&(n=!0,this.f=!0),!n)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var s=this;this.uniqueID=null,this.isCalendar=!0,this.v="2023.1.447-lite",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellHeight=30,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventHeaderHeight=14,this.eventsLoadMethod="GET",this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.loadingLabelBackColor="ff0000",this.loadingLabelFontColor="#ffffff",this.loadingLabelFontFamily="Tahoma, Arial, Helvetica, sans-serif",this.loadingLabelFontSize="10pt",this.locale="en-us",this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeEventRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.g()},this.g=function(){DayPilot.de(s.elements.selection),s.elements.selection=[],s.nav.activeSelection=null},this.h=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,this.cleanSelection=this.clearSelection,this.i=function(e,t,i){var n={};n.action=e,n.parameters=i,n.data=t,n.header=this.j();var a="JSON"+DayPilot.JSON.stringify(n);__doPostBack(s.uniqueID,a)},this.k=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){s.loadingStart()},100);var n={};n.action=e,n.parameters=i,n.data=t,n.header=this.j();var a="JSON"+DayPilot.JSON.stringify(n);this.backendUrl?DayPilot.request(this.backendUrl,this.l,a,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,a,this.m,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=s;e.n(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.o(),e.p(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e)},this.q=function(){this.nav.top.dispose=this.dispose},this.l=function(e){s.m(e.responseText)},this.j=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=s.days,e.startDate=s.startDate,e.heightSpec=s.heightSpec,e.businessBeginsHour=s.businessBeginsHour,e.businessEndsHour=s.businessEndsHour,e.hashes=s.hashes,e.timeFormat=s.timeFormat,e.viewType=s.viewType,e.locale=s.locale,e},this.r=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var n=document.createElement("div");n.setAttribute("unselectable","on"),n.style.position="absolute",n.style.width=e.offsetWidth+"px",n.style.height=e.offsetHeight+"px",n.style.left=e.offsetLeft+"px",n.style.top=e.offsetTop+"px",n.style.boxSizing="border-box",n.style.zIndex=101,n.className=s.b("_shadow");var a=document.createElement("div");return a.className=s.b("_shadow_inner"),n.appendChild(a),i.firstChild.appendChild(n),n},this.s={},this.s.locale=function(){var e=DayPilot.Locale.find(s.locale);return e?e:DayPilot.Locale.US},this.s.timeFormat=function(){return"Auto"!==s.timeFormat?s.timeFormat:this.locale().timeFormat},this.s.t=function(){return"Disabled"!==s.xssProtection};var a=this.s;this.m=function(e,t){if(e&&0===e.indexOf("$$$")){if(!window.console)throw"Error received from the server side: "+e;return void console.log("Error received from the server side: "+e)}var e=JSON.parse(e);if(e.CallBackRedirect)return void(document.location.href=e.CallBackRedirect);if("None"===e.UpdateType)return s.loadingStop(),void s.u();if(s.n(),"Full"===e.UpdateType&&(s.columns=e.Columns,s.days=e.Days,s.startDate=new DayPilot.Date(e.StartDate),s.heightSpec=e.HeightSpec?e.HeightSpec:s.heightSpec,s.businessBeginsHour=e.BusinessBeginsHour?e.BusinessBeginsHour:s.businessBeginsHour,s.businessEndsHour=e.BusinessEndsHour?e.BusinessEndsHour:s.businessEndsHour,s.headerDateFormat=e.HeaderDateFormat?e.HeaderDateFormat:s.headerDateFormat,s.viewType=e.ViewType,s.backColor=e.BackColor?e.BackColor:s.backColor,s.eventHeaderVisible=e.EventHeaderVisible?e.EventHeaderVisible:s.eventHeaderVisible,s.timeFormat=e.TimeFormat?e.TimeFormat:s.timeFormat,s.locale=e.Locale?e.Locale:s.locale,s.w()),e.Hashes)for(var i in e.Hashes)s.hashes[i]=e.Hashes[i];s.events.list=e.Events,s.z(),s.A(),"Full"===e.UpdateType&&(s.B(),s.C(),s.D(),s.E()),s.u(),s.F(),s.clearSelection(),s.afterRender(e.CallBackData,!0),s.loadingStop()},this.G=function(){return this.H()/36e5},this.I=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.J=function(){return this.H()/18e5},this.H=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.I():24,60*e*60*1e3},this.K=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.L=function(){return 2===s.api},this.eventClickCallBack=function(e,t){this.k("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.i("EventClick",t,e)},this.M=function(e){var t=this,i=t.event;if(s.L()){var n={};if(n.e=i,n.originalEvent=e,n.meta=e.metaKey,n.ctrl=e.ctrlKey,n.control=s,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventClick&&(s.N.apply(function(){s.onEventClick(n)}),n.preventDefault.value))return;switch(s.eventClickHandling){case"CallBack":s.eventClickCallBack(i);break;case"PostBack":s.eventClickPostBack(i);break;case"ContextMenu":var a=i.client.contextMenu();a?a.show(i):s.contextMenu&&s.contextMenu.show(i)}"function"==typeof s.onEventClicked&&s.N.apply(function(){s.onEventClicked(n)})}else switch(s.eventClickHandling){case"PostBack":s.eventClickPostBack(i);break;case"CallBack":s.eventClickCallBack(i);break;case"JavaScript":s.onEventClick(i)}},this.O=function(e){var t=this.event;if(e.stopPropagation&&e.stopPropagation(),!t.client.rightClickEnabled())return!1;var i={};if(i.e=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventRightClick&&(s.onEventRightClick(i),i.preventDefault.value))return!1;switch(s.eventRightClickHandling){case"ContextMenu":var n=t.client.contextMenu();n?n.show(t):s.contextMenu&&s.contextMenu.show(this.event)}return"function"==typeof s.onEventRightClicked&&s.onEventRightClicked(i),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.k("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.i("EventDelete",t,e)},this.P=function(e){if(s.L()){var t={};if(t.e=e,t.control=s,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventDelete&&(s.N.apply(function(){s.onEventDelete(t)}),t.preventDefault.value))return;switch(s.eventDeleteHandling){case"CallBack":s.eventDeleteCallBack(e);break;case"PostBack":s.eventDeletePostBack(e);break;case"Update":s.events.remove(e)}"function"==typeof s.onEventDeleted&&s.N.apply(function(){s.onEventDeleted(t)})}else switch(s.eventDeleteHandling){case"PostBack":s.eventDeletePostBack(e);break;case"CallBack":s.eventDeleteCallBack(e);break;case"JavaScript":s.onEventDelete(e)}},this.eventResizeCallBack=function(e,t,i,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var s={};s.e=e,s.newStart=t,s.newEnd=i,this.k("EventResize",n,s)},this.eventResizePostBack=function(e,t,i,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var s={};s.e=e,s.newStart=t,s.newEnd=i,this.i("EventResize",n,s)},this.a=function(e,t,i,n){var a=1,l=new Date,o=new Date,r=e.start(),h=e.end();if("top"===n){var c=r.getDatePart(),d=Math.floor((i-a)/s.cellHeight),u=30*d,v=60*u*1e3,p=60*s.K()*60*1e3;l=c.addTime(v+p),o=e.end()}else if("bottom"===n){var c=h.getDatePart(),d=Math.floor((i+t-a)/s.cellHeight),u=30*d,v=60*u*1e3,p=60*s.K()*60*1e3;l=r,o=c.addTime(v+p)}if(s.L()){var f={};if(f.e=e,f.control=s,f.newStart=l,f.newEnd=o,f.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventResize&&(s.N.apply(function(){s.onEventResize(f)}),f.preventDefault.value))return;switch(s.eventResizeHandling){case"PostBack":s.eventResizePostBack(e,l,o);break;case"CallBack":s.eventResizeCallBack(e,l,o);break;case"Update":e.start(l),e.end(o),s.events.update(e)}"function"==typeof s.onEventResized&&s.N.apply(function(){s.onEventResized(f)})}else switch(s.eventResizeHandling){case"PostBack":s.eventResizePostBack(e,l,o);break;case"CallBack":s.eventResizeCallBack(e,l,o);break;case"JavaScript":s.onEventResize(e,l,o)}},this.eventMovePostBack=function(e,t,i,n,s){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var a={};a.e=e,a.newStart=t,a.newEnd=i,this.i("EventMove",s,a)},this.eventMoveCallBack=function(e,t,i,n,s){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var a={};a.e=e,a.newStart=t,a.newEnd=i,this.k("EventMove",s,a)},this.c=function(e,t,i,n){var a=1,l=Math.floor((i-a)/s.cellHeight),o=30*l*60*1e3,r=e.start(),h=e.end(),c=new Date;r instanceof DayPilot.Date&&(r=r.toDate()),c.setTime(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()));var d=r.getTime()-(c.getTime()+3600*r.getUTCHours()*1e3+30*Math.floor(r.getUTCMinutes()/30)*60*1e3),u=h.getTime()-r.getTime(),v=this.Q[t],p=v.id,f=v.start.getTime(),g=new Date;g.setTime(f+o+d);var m=new DayPilot.Date(g),y=m.addTime(u);if(s.L()){var b={};if(b.e=e,b.newStart=m,b.newEnd=y,b.newResource=p,b.ctrl=n.ctrlKey,b.shift=n.shiftKey,b.control=s,b.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventMove&&(s.N.apply(function(){s.onEventMove(b)}),b.preventDefault.value))return;switch(s.eventMoveHandling){case"PostBack":s.eventMovePostBack(e,m,y,v.id);break;case"CallBack":s.eventMoveCallBack(e,m,y,v.id);break;case"Update":e.start(m),e.end(y),e.resource(p),s.events.update(e)}"function"==typeof s.onEventMoved&&s.N.apply(function(){s.onEventMoved(b)})}else switch(s.eventMoveHandling){case"PostBack":s.eventMovePostBack(e,m,y,v.id);break;case"CallBack":s.eventMoveCallBack(e,m,y,v.id);break;case"JavaScript":s.onEventMove(e,m,y,v.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,i,n){var s={};s.start=e,s.end=t,this.i("TimeRangeSelected",n,s)},this.timeRangeSelectedCallBack=function(e,t,i,n){var s={};s.start=e,s.end=t,this.k("TimeRangeSelected",n,s)},this.d=function(e,t,i){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.L()){var n={};if(n.start=e,n.end=t,n.resource=i,n.control=s,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onTimeRangeSelect&&(s.N.apply(function(){s.onTimeRangeSelect(n)}),n.preventDefault.value))return;switch(s.timeRangeSelectedHandling){case"PostBack":s.timeRangeSelectedPostBack(e,t);break;case"CallBack":s.timeRangeSelectedCallBack(e,t)}"function"==typeof s.onTimeRangeSelected&&s.N.apply(function(){s.onTimeRangeSelected(n)})}else switch(s.timeRangeSelectedHandling){case"PostBack":s.timeRangeSelectedPostBack(e,t);break;case"CallBack":s.timeRangeSelectedCallBack(e,t);break;case"JavaScript":s.onTimeRangeSelected(e,t)}},this.R=function(e){if(!t.selecting&&"Disabled"!==s.timeRangeSelectedHandling){var i=e.which;if(1===i||0===i)return t.firstMousePos=DayPilot.mc(e),t.selecting={},t.selecting.calendar=s,t.selectedCells&&(s.clearSelection(),t.selectedCells=[]),t.column=t.getColumn(this),t.selectedCells.push(this),t.firstSelected=this,t.topSelectedCell=this,t.bottomSelectedCell=this,s.S(),!1}},this.S=function(){this.getSelection();!function(){var e=t.topSelectedCell,i=t.bottomSelectedCell,n=function(){if(e.data)return e.data.x;for(var t=e.parentNode.cells,i=0;i<t.length;i++)if(t[i]===e)return i;return-1}(),a=s.Q[n];if(a){var l=a.start,o=s.getPixels(e.start,l).boxTop,r=s.getPixels(i.end,l).boxBottom,h=r-o,c=function(){if(s.nav.activeSelection)return s.nav.activeSelection;var e=document.createElement("div");e.setAttribute("unselectable","on"),e.style.position="absolute",e.style.left="0px",e.style.width="100%";var t=document.createElement("div");return t.setAttribute("unselectable","on"),t.className=s.b("_shadow_inner"),e.appendChild(t),s.nav.events.rows[0].cells[n].selection.appendChild(e),s.elements.selection.push(e),s.nav.activeSelection=e,e}();c.className=s.b("_shadow"),c.firstChild.innerHTML="",c.style.top=o+"px",c.style.height=h+"px"}}()},this.T=function(e){if("undefined"!=typeof t&&t.selecting){var i=DayPilot.mc(e);t.getColumn(this)===t.column&&(s.clearSelection(),i.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(this),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(this),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),s.S())}},this.getSelection=function(){var e=t.topSelectedCell.start,i=t.bottomSelectedCell.end,n=t.topSelectedCell.resource;return new DayPilot.Selection(e,i,n,s)},this.U=function(e){if(e<0)return null;for(var t=0,i=s.nav.events.rows[0].cells,n=0;n<i.length;n++){if(t+=i[n].offsetWidth,e<t)return n}return null},this.V={},this.V.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!s.coords)return null;e.x=s.U(s.coords.x);var t=0,i=Math.floor((s.coords.y-t)/s.cellHeight);return e.y=i,e.x<0?null:e},this.columns={},this.columns.list=[],this.columns.load=function(e,t,i){if(!e)throw new DayPilot.Exception("columns.load(): 'url' parameter required");var n=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},a=function(e){var i,a=e.request;try{i=JSON.parse(a.responseText)}catch(e){var l={};return l.exception=e,void n(l)}if(DayPilot.isArray(i)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=i,"function"==typeof t&&t(o),o.preventDefault.value)return;s.columns.list=i,s.W&&s.update()}};s.columnsLoadMethod&&"POST"===s.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":a,"error":n}):DayPilot.ajax({"method":"GET","url":e,"success":a,"error":n})},this.w=function(){var e;e="Resources"!==s.viewType?this.X():s.columns.list,this.Q=[];for(var t=0;t<e.length;t++){var i=this.Y(e[t]);this.Q.push(i)}},this.Y=function(e){var t={};return t.name=e.name,t.html=e.html,t.id=e.id,t.toolTip=e.toolTip,t.data=e,e.start?t.start=new DayPilot.Date(e.start):t.start=new DayPilot.Date(s.startDate),t.putIntoBlock=function(e){for(var t=0;t<this.blocks.length;t++){var i=this.blocks[t];if(i.overlapsWith(e.part.top,e.part.height))return i.events.push(e),i.min=Math.min(i.min,e.part.top),i.max=Math.max(i.max,e.part.top+e.part.height),t}var i=[];return i.lines=[],i.events=[],i.overlapsWith=function(e,t){return!(e+t-1<this.min||e>this.max-1)},i.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,n=this.length,s=0;s<n;s++){var a=this[s];if(!(i<a.part.top||e>a.part.top+a.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},i.events.push(e),i.min=e.part.top,i.max=e.part.top+e.part.height,this.blocks.push(i),this.blocks.length-1},t.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,n=this.length,s=0;s<n;s++){var a=this[s];if(!(i<a.part.top||e>a.part.top+a.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},t},this.X=function(){var e=[],t=this.startDate.getDatePart(),i=this.days;switch(this.viewType){case"Day":i=1;break;case"Week":i=7,t=t.firstDayOfWeek(a.locale().weekStarts);break;case"WorkWeek":i=5,t=t.firstDayOfWeek(1)}"BusinessHoursNoScroll"===this.heightSpec&&(t=t.addHours(this.businessBeginsHour));for(var n=0;n<i;n++){var l=s.headerDateFormat?s.headerDateFormat:a.locale().datePattern,o={};o.start=t.addDays(n),o.name=o.start.toString(l,a.locale()),e.push(o)}return e},this.visibleStart=function(){if("Resources"===s.viewType){if(0===s.Q.length)return DayPilot.Date.today();var e=s.Q.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.Q[0].start},this.visibleEnd=function(){if("Resources"===s.viewType){if(0===s.Q.length)return DayPilot.Date.today().addDays(1);var e=s.Q.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var t=this.Q.length-1;return this.Q[t].start.addDays(1)},this.b=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.n=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],i=t.event;if(i&&(i.calendar=null),t.onclick=null,t.onclickSave=null,t.onmouseover=null,t.onmouseout=null,t.onmousemove=null,t.onmousedown=null,t.firstChild&&t.firstChild.firstChild&&t.firstChild.firstChild.tagName&&"IMG"===t.firstChild.firstChild.tagName.toUpperCase()){var n=t.firstChild.firstChild;n.onmousedown=null,n.onmousemove=null,n.onclick=null}t.helper=null,t.data=null,t.event=null,DayPilot.de(t)}this.elements.events=[]},this.Z=function(e){var i=e.cache||e.data,n=this.nav.events,a=document.createElement("div");a.style.position="absolute",a.style.left=e.part.left+"%",a.style.top=e.part.top+"px",a.style.width=e.part.width+"%",a.style.height=Math.max(e.part.height,2)+"px",a.style.overflow="hidden",a.data=e,a.event=e,a.unselectable="on",a.style.MozUserSelect="none",a.style.KhtmlUserSelect="none",a.className=this.b("_event"),i.cssClass&&DayPilot.Util.addClass(a,i.cssClass),a.isFirst=e.part.start.getTime()===e.start().getTime(),a.isLast=e.part.end.getTime()===e.end().getTime(),a.onclick=this.M,DayPilot.re(a,"contextmenu",this.O),a.onmouseout=function(e){a.deleteIcon&&(a.deleteIcon.style.display="none")},a.onmousemove=function(i){var n=5;if("undefined"!=typeof t){var l=DayPilot.mo3(a,i);if(l&&!t.resizing&&!t.moving){a.deleteIcon&&(a.deleteIcon.style.display="");var o=this.isLast;l.y<=n&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-l.y<=n&&e.client.resizeEnabled()?o?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==s.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},a.onmousedown=function(i){var n=i.which||i.button;if("n-resize"!==this.style.cursor&&"s-resize"!==this.style.cursor||1!==n){if(1===n&&e.client.moveEnabled()){t.moving=this,DayPilot.Global.moving=this,t.moving.event=this.event;var a=t.moving.helper={};a.oldColumn=s.Q[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(i),t.originalTop=this.offsetTop;var l=DayPilot.mo3(this,i);l?t.moveOffsetY=l.y:t.moveOffsetY=0,s.nav.top.style.cursor="move"}}else t.resizing=this,DayPilot.Global.resizing=this,t.originalMouse=DayPilot.mc(i),t.originalHeight=this.offsetHeight,t.originalTop=this.offsetTop,s.nav.top.style.cursor=this.style.cursor;return!1};var l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.className=s.b("_event_inner"),l.innerHTML=e.client.html(),"darker"===i.borderColor&&i.backColor?l.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):l.style.borderColor=i.borderColor,i.backColor&&(l.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(l.style.filter="")),i.fontColor&&(l.style.color=i.fontColor),a.appendChild(l),e.client.barVisible()){var o=e.part.height-2,r=100*e.part.barTop/o,h=Math.ceil(100*e.part.barHeight/o),c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=this.b("_event_bar"),c.style.position="absolute",i.barBackColor&&(c.style.backgroundColor=i.barBackColor);var d=document.createElement("div");d.setAttribute("unselectable","on"),d.className=this.b("_event_bar_inner"),d.style.top=r+"%",0<h&&h<=1?d.style.height="1px":d.style.height=h+"%",i.barColor&&(d.style.backgroundColor=i.barColor),c.appendChild(d),a.appendChild(c)}if(e.client.deleteEnabled()){var u=document.createElement("div");u.style.position="absolute",u.style.right="2px",u.style.top="2px",u.style.width="17px",u.style.height="17px",u.className=s.b("_event_delete"),u.onmousedown=function(e){e.stopPropagation()},u.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&s.P(t)},u.style.display="none",a.deleteIcon=u,a.appendChild(u)}var v=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(a,e,{"areas":v}),n.rows[0].cells[e.part.dayIndex]){n.rows[0].cells[e.part.dayIndex].firstChild.appendChild(a),s.$(a)}s.elements.events.push(a)},this.$=function(e){for(var t=e&&e.childNodes?e.childNodes.length:0,i=0;i<t;i++)try{var n=e.childNodes[i];1===n.nodeType&&(n.unselectable="on",this.$(n))}catch(e){}},this.F=function(){for(var e=0;e<this.Q.length;e++){var t=this.Q[e];if(t.blocks)for(var i=0;i<t.blocks.length;i++)for(var n=t.blocks[i],s=0;s<n.lines.length;s++)for(var a=n.lines[s],l=0;l<a.length;l++){var o=a[l];o.part.width=100/n.lines.length,o.part.left=o.part.width*s;var r=s===n.lines.length-1;r||(o.part.width=1.5*o.part.width),this.Z(o)}}},this._=function(){this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.b("_main")),this.nav.top.style.MozUserSelect="none",this.nav.top.style.KhtmlUserSelect="none",this.nav.top.style.position="relative",this.nav.top.style.width=this.width?this.width:"100%",this.hideUntilInit&&(this.nav.top.style.visibility="hidden"),this.visible||(this.nav.top.style.display="none"),this.nav.scroll=document.createElement("div"),this.nav.scroll.style.height=this.aa()+"px","BusinessHours"===this.heightSpec?this.nav.scroll.style.overflow="auto":this.nav.scroll.style.overflow="hidden",this.nav.scroll.style.position="relative";var e=this.ba();this.nav.top.appendChild(e),this.nav.scroll.style.zoom=1;var t=this.ca();this.nav.scrollable=t.firstChild,this.nav.scroll.appendChild(t),this.nav.top.appendChild(this.nav.scroll),this.nav.scrollLayer=document.createElement("div"),this.nav.scrollLayer.style.position="absolute",this.nav.scrollLayer.style.top="0px",this.nav.scrollLayer.style.left="0px",this.nav.top.appendChild(this.nav.scrollLayer),this.nav.loading=document.createElement("div"),this.nav.loading.style.position="absolute",this.nav.loading.style.top="0px",this.nav.loading.style.left=this.hourWidth+5+"px",this.nav.loading.style.backgroundColor=this.loadingLabelBackColor,this.nav.loading.style.fontSize=this.loadingLabelFontSize,this.nav.loading.style.fontFamily=this.loadingLabelFontFamily,this.nav.loading.style.color=this.loadingLabelFontColor,this.nav.loading.style.padding="2px",this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.display="none",this.nav.top.appendChild(this.nav.loading)},this.D=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this.da(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.ca=function(){var e=document.createElement("div");e.style.zoom=1,e.style.position="relative";var t=document.createElement("table");t.cellSpacing="0",t.cellPadding="0",t.border="0",t.style.border="0px none",t.style.width="100%",t.style.position="absolute";var i,n=t.insertRow(-1);i=n.insertCell(-1),i.valign="top",i.style.padding="0px",i.style.border="0px none",this.nav.hourTable=this.da(),i.appendChild(this.nav.hourTable),i=n.insertCell(-1),i.valign="top",i.width="100%",i.style.padding="0px",i.style.border="0px none";var s=document.createElement("div");return s.style.position="relative",i.appendChild(s),s.appendChild(this.ea()),s.appendChild(this.fa()),e.appendChild(t),this.nav.zoom=e,e},this.ea=function(){var e=document.createElement("table");return e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.main=e,this.nav.events=e,e},this.fa=function(){var e=document.createElement("table");e.style.top="0px",e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.position="absolute",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.events=e;for(var t=this.Q,i=t.length,n=e.insertRow(-1),a=0;a<i;a++){var l=n.insertCell(-1);l.style.padding="0px",l.style.border="0px none",l.style.height="0px",l.style.overflow="visible",s.rtl||(l.style.textAlign="left");var o=document.createElement("div");o.style.marginRight=s.columnMarginRight+"px",o.style.position="relative",o.style.height="1px",o.style.marginTop="-1px";var r=document.createElement("div");l.selection=r,l.appendChild(o),l.appendChild(r)}return e},this.da=function(){var e=document.createElement("table");e.cellSpacing="0",e.cellPadding="0",e.border="0",e.style.border="0px none",e.style.width=this.hourWidth+"px",e.oncontextmenu=function(){return!1};for(var t=s.G(),i=0;i<t;i++)this.ga(e,i);return e},this.ga=function(e,t){var i=2*this.cellHeight,n=e.insertRow(-1);n.style.height=i+"px";var l=n.insertCell(-1);l.valign="bottom",l.unselectable="on",l.style.cursor="default",l.style.padding="0px",l.style.border="0px none";var o=document.createElement("div");o.style.position="relative",o.className=this.b("_rowheader"),o.style.width=this.hourWidth+"px",o.style.height=i+"px",o.style.overflow="hidden",o.unselectable="on";var r=document.createElement("div");r.className=this.b("_rowheader_inner"),r.unselectable="on";var h=document.createElement("div");h.unselectable="on";var c=this.startDate.addHours(t).addHours(s.K()),d=c.getHours(),u=d<12,v=a.timeFormat();"Clock12Hours"===v&&(d%=12,0===d&&(d=12)),h.innerHTML=d;var p=document.createElement("span");p.unselectable="on",p.className=this.b("_rowheader_minutes");var f;f="Clock12Hours"===v?u?"AM":"PM":"00",p.innerHTML=f,h.appendChild(p),r.appendChild(h),o.appendChild(r),l.appendChild(o)},this.aa=function(){switch(this.heightSpec){case"Full":return 48*this.cellHeight;case"BusinessHours":var e=this.I();return e*this.cellHeight*2;case"BusinessHoursNoScroll":var e=this.I();return e*this.cellHeight*2;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.ha=function(){var e=s.nav.corner?s.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.ia();e.appendChild(t),s.nav.corner=t}},this.ba=function(){var e=document.createElement("div");e.style.overflow="auto";var t=document.createElement("table");t.cellPadding="0",t.cellSpacing="0",t.border="0",t.style.width="100%",t.style.borderCollapse="separate",t.style.border="0px none";var i=t.insertRow(-1),n=i.insertCell(-1);n.style.padding="0px",n.style.border="0px none";var s=this.ia();n.appendChild(s),this.nav.corner=s,n=i.insertCell(-1),n.style.width="100%",n.valign="top",n.style.position="relative",n.style.padding="0px",n.style.border="0px none",this.nav.header=document.createElement("table"),this.nav.header.cellPadding="0",this.nav.header.cellSpacing="0",this.nav.header.border="0",this.nav.header.width="100%",this.nav.header.style.tableLayout="fixed",this.nav.header.oncontextmenu=function(){return!1};var a="hidden"!==this.nav.scroll.style.overflow;if(n.appendChild(this.nav.header),a){n=i.insertCell(-1),n.unselectable="on";var l=document.createElement("div");l.unselectable="on",l.style.position="relative",l.style.width="16px",l.style.height=this.headerHeight+"px",l.className=this.b("_cornerright");var o=document.createElement("div");o.className=this.b("_cornerright_inner"),l.appendChild(o),n.appendChild(l),this.nav.cornerRight=l}return e.appendChild(t),e},this.ia=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.b("_corner"),e.style.width=this.hourWidth+"px",e.style.height=this.headerHeight+"px",e.oncontextmenu=function(){return!1};var t=document.createElement("div");return t.unselectable="on",t.className=this.b("_corner_inner"),e.appendChild(t),e},this.o=function(){var e=this.nav.main;e.root=null,e.onmouseup=null;for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],n=0;n<i.cells.length;n++){var s=i.cells[n];s.root=null,s.onmousedown=null,s.onmousemove=null,s.onmouseout=null,
|
|
11
|
-
s.onmouseup=null}this.fasterDispose||DayPilot.pu(e)},this.C=function(){var e=this.nav.main,i=18e5,n=this.J(),a=s.Q;for(e&&this.o();e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.tableCreated=!0;for(var l=a.length,o=this.nav.events;o&&o.rows&&o.rows.length>0;)this.fasterDispose||DayPilot.pu(o.rows[0]),o.deleteRow(0);for(var l=a.length,r=o.insertRow(-1),h=0;h<l;h++){var c=r.insertCell(-1);c.style.padding="0px",c.style.border="0px none",c.style.height="0px",c.style.overflow="visible",s.rtl||(c.style.textAlign="left");var d=document.createElement("div");d.style.marginRight=s.columnMarginRight+"px",d.style.position="relative",d.style.height="1px",d.style.marginTop="-1px";var u=document.createElement("div");u.style.position="relative",c.selection=u,c.appendChild(d),c.appendChild(u)}for(var v=0;v<n;v++){var r=e.insertRow(-1);r.style.MozUserSelect="none",r.style.KhtmlUserSelect="none";for(var h=0;h<l;h++){var p=this.Q[h],c=r.insertCell(-1);c.start=p.start.addTime(v*i),c.end=c.start.addTime(i),c.resource=p.id,c.onmousedown=this.R,c.onmouseup=function(){return!1},c.onclick=function(){return!1},c.root=this,c.style.padding="0px",c.style.border="0px none",c.style.verticalAlign="top",c.style.height=s.cellHeight+"px",c.style.overflow="hidden",c.unselectable="on";var d=document.createElement("div");d.unselectable="on",d.style.height=s.cellHeight+"px",d.style.position="relative",d.className=this.b("_cell");this.ja(c.start,c.end)&&DayPilot.Util.addClass(d,s.b("_cell_business"));var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.b("_cell_inner"),d.appendChild(f),c.appendChild(d),c.appendChild(d)}}e.root=this,s.nav.scrollable.onmousemove=function(e){var i=s.nav.scrollable;s.coords=DayPilot.mo3(i,e);var n=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=s.r(t.resizing,!1,s.shadow));var a=s.cellHeight,l=1,o=n.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var r=Math.floor((t.originalHeight+t.originalTop+o+a/2)/a)*a-t.originalTop+l;r<a&&(r=a);var h=s.nav.main.clientHeight;t.originalTop+r>h&&(r=h-t.originalTop),t.resizingShadow.style.height=r+"px"}else if("top"===t.resizing.dpBorder){var c=Math.floor((t.originalTop+o-l+a/2)/a)*a+l;c<l&&(c=l),c>t.originalTop+t.originalHeight-a&&(c=t.originalTop+t.originalHeight-a);var r=t.originalHeight-(c-t.originalTop);r<a?r=a:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=r+"px"}}else if(t.moving){if(t.movingShadow||(t.movingShadow=s.r(t.moving,!s.h,s.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"),!s.coords)return;var a=s.cellHeight,l=1,d=t.moveOffsetY;d||(d=a/2);var c=Math.floor((s.coords.y-d-l+a/2)/a)*a+l;c<l&&(c=l);var u=s.nav.events,h=s.nav.main.clientHeight,v=parseInt(t.movingShadow.style.height);c+v>h&&(c=h-v),DayPilot.Util.addClass(t.moving,s.b("_event_moving_source")),t.movingShadow.parentNode.style.display="none",t.movingShadow.style.top=c+"px",t.movingShadow.parentNode.style.display="";var p=u.clientWidth/u.rows[0].cells.length,f=Math.floor((s.coords.x-45)/p);f<0&&(f=0),f<u.rows[0].cells.length&&f>=0&&t.movingShadow.column!==f&&(t.movingShadow.column=f,t.moveShadow(u.rows[0].cells[f]))}else if(t.selecting){var n=DayPilot.mc(e),g=s.V.getCellCoords(),m=t.column,y=s.nav.main.rows[g.y].cells[m];n.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(y),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(y),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),s.S()}},s.nav.scrollable.style.display=""},this.ja=function(e,t){return this.businessBeginsHour<this.businessEndsHour?!(e.getHours()<this.businessBeginsHour||e.getHours()>=this.businessEndsHour||6===e.getDayOfWeek()||0===e.getDayOfWeek()):e.getHours()>=this.businessBeginsHour||e.getHours()<this.businessEndsHour},this.p=function(){var e=this.nav.header;if(e&&e.rows)for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],n=0;n<i.cells.length;n++){var s=i.cells[n];s.onclick=null,s.onmousemove=null,s.onmouseout=null}this.fasterDispose||DayPilot.pu(e)},this.ka=function(e){for(var t=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],i=this.Q,n=i.length,a=0;a<n;a++){var l=i[a],o=e?t.insertCell(-1):t.cells[a];o.data=l,o.style.overflow="hidden",o.style.padding="0px",o.style.border="0px none",o.style.height=this.headerHeight+"px",o.onclick=s.la;var r=e?document.createElement("div"):o.firstChild;if(e){r.unselectable="on",r.style.MozUserSelect="none",r.style.cursor="default",r.style.position="relative",r.className=s.b("_colheader"),r.style.height=this.headerHeight+"px",s.headerTextWrappingEnabled||(r.style.whiteSpace="nowrap");var h=document.createElement("div");h.className=s.b("_colheader_inner"),h.unselectable="on",r.appendChild(h),o.appendChild(r)}l.toolTip&&(h.title=l.toolTip);var h=r.firstChild;h.innerHTML=s.ma(l.name,l.html)}},this.la=function(e){if("Disabled"!==s.headerClickHandling){var t=this.data,i=s.na(t),n={};n.header={},n.header.id=t.id,n.header.name=t.name,n.header.start=t.start,n.column=i,n.originalEvent=e,n.shift=e.shiftKey,n.ctrl=e.ctrlKey,n.meta=e.metaKey,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onHeaderClick&&(s.onHeaderClick(n),n.preventDefault.value)||"function"==typeof s.onHeaderClicked&&s.onHeaderClicked(n)}},this.na=function(e){return new DayPilot.CalendarColumn(e,s)},this.oa=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.B=function(){var e=this.nav.header,t=!0,i=this.Q;for(i.length;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.ka(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var i={};i.command=e,this.k("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.pa=function(){var e=this.nav.scroll;e.onscroll||(e.onscroll=function(){s.qa()});var t="undefined"!=typeof this.ra.scrollpos?this.ra.scrollpos:this.initScrollPos;t&&("Auto"===t&&(t="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),e.root=this,0===e.scrollTop&&(e.scrollTop=t))},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.sa=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.ta=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp),DayPilot.re(window,"unload",t.gUnload))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";t=e}s.events.list||(s.events.list=[]),s.events.list.push(t),s.update(),s.N.notify()},this.events.find=function(e){if(!s.events.list)return null;for(var t=0;t<s.events.list.length;t++){var i=s.events.list[t];if(i.id===e)return new DayPilot.Event(i,s)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=s.events.find(e.id);if(t){var i=DayPilot.indexOf(s.events.list,t.data);s.events.list.splice(i,1,e)}}s.update(),s.N.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=s.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=s.events.find(e);i&&(t=i.data)}var n=DayPilot.indexOf(s.events.list,t);s.events.list.splice(n,1),s.update(),s.N.notify()},this.events.load=function(e,t,i){var n=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},a=function(e){var i,a=e.request;try{i=JSON.parse(a.responseText)}catch(e){var l={};return l.exception=e,void n(l)}if(DayPilot.isArray(i)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=i,"function"==typeof t&&t(o),o.preventDefault.value)return;s.events.list=i,s.W&&s.update()}};if(s.eventsLoadMethod&&"POST"===s.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":s.visibleStart().toString(),"end":s.visibleEnd().toString()},"url":e,"success":a,"error":n});else{var l=e,o="start="+s.visibleStart().toString()+"&end="+s.visibleEnd().toString();l+=l.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.Http.ajax({"method":"GET","url":l,"success":a,"error":n})}},this.ua=function(){if(s.nav.top.className!==s.b("_main")){s.nav.top.className=s.b("_main");var e=s.nav.corner;e.className=s.b("_corner"),e.firstChild.className=s.b("_corner_inner");var t=s.nav.cornerRight;t&&(t.className=s.b("_cornerright"),t.firstChild.className=s.b("_cornerright_inner"))}},this.update=function(e){if(s.va(e),this.W){s.wa(),s.n(),s.nav.top.style.cursor="auto";s.w(),s.B(),s.C(),s.D(),s.E(),s.ha(),s.ua(),s.xa(),s.z(),s.A(),s.u(),s.F(),s.clearSelection(),this.visible?this.show():this.hide()}},this.ya=null,this.va=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?s.events.list=e.list:s.events.list=e}},"columns":{"preInit":function(){s.columns.list=this.data}}};this.ya=t;for(var i in e)if(t[i]){var n=t[i];n.data=e[i],n.preInit&&n.preInit()}else s[i]=e[i]}},this.za=function(){var e=this.ya;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.Aa=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.Ba={},this.Ba.events=[],this.Ca=function(e){var t=this.Ba.events,i=this.events.list[e],n={};for(var s in i)n[s]=i[s];if("function"==typeof this.onBeforeEventRender){var a={};a.data=n,this.onBeforeEventRender(a)}t[e]=n},this.z=function(){var e=this.events.list;if(s.Ba.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,i=864e5;this.cache.pixels={};var n=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var a=0;a<t;a++){var l=e[a],o=l;if("object"!=typeof o)throw new DayPilot.Exception("Event data item must be an object");if(!o.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!o.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(o instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.");l.start=new DayPilot.Date(l.start),l.end=new DayPilot.Date(l.end)}if("function"==typeof this.onBeforeEventRender)for(var a=0;a<t;a++)this.Ca(a);for(var a=0;a<this.Q.length;a++){var r={};r.minEnd=1e6,r.maxStart=-1,this.scrollLabels.push(r);var h=this.Q[a];h.events=[],h.lines=[],h.blocks=[];for(var c=new DayPilot.Date(h.start),d=c.getTime(),u=c.addTime(i),v=u.getTime(),p=0;p<t;p++)if(!n[p]){var l=e[p],f=l.start,g=l.end,m=f.getTime(),y=g.getTime();if(!(y<m)){var b=!(y<=d||m>=v);if("Resources"===s.viewType&&(b=b&&h.id===l.resource),b){var C=new DayPilot.Event(l,s);C.part.dayIndex=a,C.part.start=d<m?l.start:c,C.part.end=v>y?l.end:u;var w=this.getPixels(C.part.start,h.start),D=this.getPixels(C.part.end,h.start),S=w.top,x=D.top;if(S===x&&(w.cut||D.cut))continue;var k=D.boxBottom;C.part.top=Math.floor(S/this.cellHeight)*this.cellHeight+1,C.part.height=Math.max(Math.ceil(k/this.cellHeight)*this.cellHeight-C.part.top,this.cellHeight-1)+1,C.part.barTop=Math.max(S-C.part.top-1,0),C.part.barHeight=Math.max(x-S-2,1);var f=C.part.top,g=C.part.top+C.part.height;f>r.maxStart&&(r.maxStart=f),g<r.minEnd&&(r.minEnd=g),f<this.minStart&&(this.minStart=f),g>this.maxEnd&&(this.maxEnd=g),h.events.push(C),"function"==typeof this.onBeforeEventRender&&(C.cache=this.Ba.events[p]),C.part.start.getTime()===m&&C.part.end.getTime()===y&&(n[p]=!0)}}}}for(var a=0;a<this.Q.length;a++){var h=this.Q[a];h.events.sort(this.Da);for(var p=0;p<h.events.length;p++){var l=h.events[p];h.putIntoBlock(l)}for(var p=0;p<h.blocks.length;p++){var P=h.blocks[p];P.events.sort(this.Da);for(var E=0;E<P.events.length;E++){var l=P.events[E];P.putIntoLine(l)}}}}},this.Da=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.debug=function(e,t){this.debuggingEnabled&&(s.debugMessages||(s.debugMessages=[]),s.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var i=t.getTime(),n=e.getTime(),s=this.cache.pixels[n+"_"+i];if(s)return s;i=t.getTime();var a=18e5,l=n-i,o=l%a,r=l-o,h=r+a;0===o&&(h=r);var c={};return c.cut=!1,c.top=this.Ea(l),c.boxTop=this.Ea(r),c.boxBottom=this.Ea(h),this.cache.pixels[n+"_"+i]=c,c},this.Ea=function(e){return Math.floor(this.cellHeight*e/18e5)},this.wa=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.A=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.E=function(){var e=this.aa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.N={},this.N.scope=null,this.N.notify=function(){s.N.scope&&s.N.scope["$apply"]()},this.N.apply=function(e){e()},this.qa=function(){if(s.nav.scroll){var e=s.nav.scroll.scrollTop,t=e/(2*s.cellHeight);s.ra.scrollHour=t}},this.xa=function(){var e=0;s.ra.scrollHour?e=2*s.cellHeight*s.ra.scrollHour:"Auto"===s.initScrollPos&&(e="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),s.nav.scroll.scrollTop=e},this.Fa=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof s.events.list||!s.events.list)},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){s.visible=!0,s.nav.top.style.display=""},this.hide=function(){s.visible=!1,s.nav.top.style.display="none"},this.Ga=function(){this.wa(),this.w(),this._(),this.B(),this.C(),this.sa(),this.pa(),this.ta(),t.register(this),this.Ha(),this.k("Init")},this.ra={},this.Ia=function(){this.ra.themes=[],this.ra.themes.push(this.theme||this.cssClassPrefix)},this.Ja=function(){for(var e=this.ra.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.ra.themes=[]},this.Ka=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.La=function(){if("function"==typeof this.onInit&&!this.Ma){this.Ma=!0;var e={};this.onInit(e)}},this.Na=function(){var e=s.nav.top;return e.offsetWidth>0&&e.offsetHeight>0},this.Ha=function(){var e=s.Na;e()||(s.Oa=setInterval(function(){e()&&(s.pa(),s.sa(),clearInterval(s.Oa))},100))},this.ma=function(e,t){return s.s.t()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=s.va,this.internal.xssTextHtml=s.ma,this.init=function(){this.Aa();var e=this.Fa();return this.Ia(),e?void this.Ga():(this.wa(),this.w(),this.z(),this._(),this.B(),this.C(),this.u(),this.sa(),this.pa(),this.ta(),t.register(this),this.events&&(this.A(),this.F()),this.Ka(),this.La(),this.Ha(),this.W=!0,this)},this.Init=this.init,this.va(i)},DayPilot.CalendarColumn=function(e,t){var i=this;i.id=e.id,i.name=e.name,i.data=e.data,i.start=new DayPilot.Date(e.start),i.calendar=t,i.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Calendar(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,n){var s=new DayPilot.Calendar(i[0]);s.N.scope=t,s.init();var a=n["id"];a&&(t[a]=s);var l=n["publishAs"];if(l){(0,e(l).assign)(t,s)}for(var o in n)0===o.indexOf("on")&&!function(i){s[i]=function(s){var a=e(n[i]);t["$apply"](function(){a(t,{"args":s})})}}(o);var r=t["$watch"],h=n["config"]||n["daypilotConfig"],c=n["events"]||n["daypilotEvents"];r.call(t,h,function(e){for(var t in e)s[t]=e[t];s.update(),s.La()},!0),r.call(t,c,function(e){s.events.list=e,s.update()},!0)}}}])}()}}();if("undefined"==typeof DayPilot)var DayPilot={};!function(){"undefined"!=typeof DayPilot.DatePicker&&DayPilot.DatePicker.close||(DayPilot.DatePicker=function(t){this.v="2023.1.447-lite";var e="navigator_"+(new Date).getTime(),i=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.a.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,t)for(var e in t)this[e]=t[e]},this.init=function(){this.date=new DayPilot.Date(this.date);var t=this.b();this.resetTarget&&!t?this.c(this.date):this.resetTarget||(i.date=t);var e=this.d();return e&&e.addEventListener("input",function(){i.date=i.b(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.e&&(this.e=!1,this.navigator&&this.navigator.dispose(),this.div.innerHTML="",this.div&&this.div.parentNode===document.body&&document.body.removeChild(this.div))},this.setDate=function(t){this.date=new DayPilot.Date(t),this.c(this.date)},this.b=function(){var t=this.d();if(!t)return this.date;var e=null;if(e="INPUT"===t.tagName?t.value:t.innerText,!e)return null;for(var n=DayPilot.Date.parse(e,i.pattern),a=0;a<i.patterns.length;a++){if(n)return n;n=DayPilot.Date.parse(e,i.patterns[a])}return n},this.c=function(t){var e=this.d();if(e){var n=t.toString(i.pattern,i.locale);"INPUT"===e.tagName?e.value=n:e.innerHTML=n}},this.a={},this.a.locale=function(){return DayPilot.Locale.find(i.locale)},this.d=function(){var t=this.target;return t&&t.nodeType&&1===t.nodeType?t:document.getElementById(t)},Object.defineProperty(this,"visible",{get:function(){return i.e}}),this.show=function(){if(!this.e){var t=this.d(),n=this.navigator,n=new DayPilot.Navigator(e);n.api=2,n.cssOnly=!0,n.theme=i.theme,n.weekStarts="Auto",n.locale=i.locale,n.onTimeRangeSelected=function(t){i.date=t.start;var e=t.start.addTime(n.f),a=e.toString(i.pattern,i.locale),t={};t.start=e,t.date=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(t),t.preventDefault.value)||(i.c(a),i.close(),"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(t))},this.navigator=n;var a=DayPilot.abs(t),o=t.offsetHeight,s=i.targetAlignment,r=document.createElement("div");r.style.position="absolute","left"===s&&(r.style.left=a.x+"px"),r.style.top=a.y+o+"px",i.zIndex&&(r.style.zIndex=i.zIndex);var l=document.createElement("div");l.id=e,r.appendChild(l),r.addEventListener("mousedown",function(t){var t=t||window.event;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}),document.body.appendChild(r),this.div=r;var h=i.b()||(new DayPilot.Date).getDatePart();if(n.startDate=h,n.f=h.getTimePart(),n.selectionDay=h.getDatePart(),n.init(),"right"===s){var d=a.x+t.offsetWidth-n.nav.top.offsetWidth;r.style.left=d+"px"}this.e=!0,this.onShow&&this.onShow()}},this.prepare(),this.init()})}();if("undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(n){var i=this,o=null;this.v="2023.1.447-lite",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null,this.b=function(){},n&&DayPilot.isArray(n)&&(this.items=n),this.toJSON=function(){return null},this.show=function(n,u){u=u||{};var a=null;if(n?"string"==typeof n.id||"number"==typeof n.id?a=n.id:"function"==typeof n.id?a=n.id():"function"==typeof n.value&&(a=n.value()):a=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),u.submenu||t.menuClean(),this.b.submenu=null,null!==t.mouse){i.cssOnly||(i.cssOnly=!0);var s=null;if(n&&n.isRow&&n.$.row.task?(s=new DayPilot.Task(n.$.row.task,n.calendar),s.menuType="resource"):s=n&&n.isEvent&&n.data.task?new DayPilot.Task(n,n.calendar):n,"function"==typeof i.onShow){var l={};if(l.source=s,l.menu=i,l.preventDefault=function(){l.preventDefault.value=!0},i.onShow(l),l.preventDefault.value)return}var c=document.createElement("div");if(c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.style.display="none",c.style.overflow="hidden",c.style.zIndex=this.zIndex+1,c.className=this.c("main"),c.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(c.onmousemove=function(e){clearTimeout(t.hideTimeout)},c.onmouseleave=function(e){i.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var r=document.createElement("div");r.innerHTML=this.menuTitle,r.className=this.c("title"),c.appendChild(r)}for(var d=0;d<this.items.length;d++){var m=this.items[d],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.c("item")),m.items&&(DayPilot.Util.addClass(f,this.c("item_haschildren")),DayPilot.Util.addClass(c,this.c("withchildren"))),"undefined"!=typeof m&&!m.hidden){if("-"===m.text){var h=document.createElement("div");h.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(h)}else{var v=document.createElement("a");if(v.style.position="relative",v.style.display="block",m.cssClass&&DayPilot.Util.addClass(v,m.cssClass),m.disabled)DayPilot.Util.addClass(v,i.c("item_disabled"));else{if(m.onclick||m.onClick){v.item=m,v.onclick=function(e,t){return function(n){if("function"==typeof e.onClick){var i={};if(i.item=e,i.source=t.source,i.originalEvent=n,i.preventDefault=function(){i.preventDefault.value=!0},e.onClick(i),i.preventDefault.value)return}e.onclick&&e.onclick.call(t,n)}}(m,v);var p=function(e,n){return function(i){i.stopPropagation(),i.preventDefault();var o=function(){window.setTimeout(function(){n.source.calendar.internal.touch.active=!1},500)};if("function"==typeof e.onClick){var u={};if(u.item=e,u.source=n.source,u.originalEvent=i,u.preventDefault=function(){u.preventDefault.value=!0},e.onClick(u),u.preventDefault.value)return void o()}e.onclick&&e.onclick.call(n,i),t.menuClean(),o()}};DayPilot.reNonPassive(v,"touchstart",function(e){e.stopPropagation(),e.preventDefault(),v.source.calendar.internal.touch.active=!0}),DayPilot.reNonPassive(v,"touchend",p(m,v))}if(m.items&&!m.disabled){var b=function(e,t){return function(n){n.preventDefault(),n.stopPropagation(),i.d(e,t)}};v.ontouchend=b(m,v)}if(m.onclick)e();else if(m.href)v.href=m.href.replace(/\x7B0\x7D/gim,a),m.target&&v.setAttribute("target",m.target);else if(m.command){var b=function(e,t){return function(n){var i=t.source,o=e;o.action=o.action?o.action:"CallBack";var u=i.calendar||i.root;if(i instanceof DayPilot.Link)return void u.internal.linkMenuClick(o.command,i,o.action);if(i instanceof DayPilot.Selection)return void u.internal.timeRangeMenuClick(o.command,i,o.action);if(i instanceof DayPilot.Event)return void u.internal.eventMenuClick(o.command,i,o.action);if(i instanceof DayPilot.Selection)return void u.internal.timeRangeMenuClick(o.command,i,o.action);if(i instanceof DayPilot.Task)return void("resource"===i.menuType?u.internal.resourceHeaderMenuClick(o.command,t.menuSource,o.action):u.internal.eventMenuClick(o.command,t.menuSource,o.action));switch(i.menuType){case"resource":return void u.internal.resourceHeaderMenuClick(o.command,i,o.action);case"selection":return void u.internal.timeRangeMenuClick(o.command,i,o.action);default:return void u.internal.eventMenuClick(o.command,i,o.action)}n.preventDefault()}};v.onclick=b(m,v),v.ontouchend=b(m,v)}}m.items&&v.addEventListener("click",function(e){e.stopPropagation()}),v.source=s,v.menuSource=n;var y=document.createElement("span");if(y.className=i.c("item_text"),y.innerHTML=DayPilot.Util.escapeTextHtml(m.text,m.html),v.appendChild(y),m.image){var w=document.createElement("img");w.src=m.image,w.style.position="absolute",w.style.top="0px",w.style.left="0px",v.appendChild(w)}if(m.icon){var g=document.createElement("span");g.className=i.c("item_icon");var C=document.createElement("i");C.className=m.icon,g.appendChild(C),v.appendChild(g)}if(m.symbol){var M="http://www.w3.org/2000/svg",k=document.createElementNS(M,"svg");k.setAttribute("width","100%"),k.setAttribute("height","100%");var x=document.createElementNS(M,"use");x.setAttribute("href",m.symbol),k.appendChild(x);var T=document.createElement("span");T.className=i.c("item_symbol"),T.style.position="absolute",T.style.top="0px",T.style.left="0px",T.appendChild(k),v.appendChild(T)}var E=function(e,n){return function(){var o=(n.source,e),u=t.waitingSubmenu;if(u){if(u.parent===o)return;clearTimeout(u.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=o,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,i.d(o,n)},300))}};v.onmouseover=E(m,v),f.appendChild(v)}c.appendChild(f)}}var P=function(e){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};c.onclick=P,c.ontouchend=P,c.onmousedown=function(e){e=e||window.event,e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},c.oncontextmenu=function(){return!1},document.body.appendChild(c),i.b.visible=!0,i.b.source=n,c.style.display="";var S=c.offsetHeight,D=c.offsetWidth;c.style.display="none";var N=document.documentElement.clientHeight,B=window.innerWidth,H="number"==typeof u.windowMargin?u.windowMargin:5;if(function(){var e=u.initiator;if(e){var t=e.div,n=e.e,i=e.area,a=i.visibility||i.v||"Visible",s=e.a;if("Visible"!==a&&(s=DayPilot.Areas.createArea(t,n,i),t.appendChild(s),o=s),s){var l=DayPilot.abs(s);u.x=l.x,u.y=l.y+l.h+2}}}(),function(){var e="number"==typeof u.x?u.x:t.mouse.x+1,n="number"==typeof u.y?u.y:t.mouse.y+1,i=document.body.scrollTop||document.documentElement.scrollTop,o=document.body.scrollLeft||document.documentElement.scrollLeft;if(n-i>N-S&&0!==N){var a=n-i-(N-S)+H;c.style.top=n-a+"px"}else c.style.top=n+"px";if("right"===u.align&&(e-=D),e-o>B-D&&0!==B){var s=e-o-(B-D)+H;c.style.left=e-s+"px"}else c.style.left=e+"px"}(),u.parentLink){var _=u.parentLink,L=parseInt(new DayPilot.StyleReader(c).get("border-top-width")),O=DayPilot.abs(u.parentLink.parentNode),A=O.x+_.offsetWidth,U=O.y-L;A+D>B&&(A=Math.max(0,O.x-D));var R=document.body.scrollTop+document.documentElement.scrollTop;U+S-R>N&&(U=Math.max(0,N-S+R)),c.style.left=A+"px",c.style.top=U+"px"}c.style.display="",this.addShadow(c),this.b.div=c,u.submenu||(DayPilot.Menu.active=this)}},this.d=function(e,t){var n=e,o=t.source;if((!i.b.submenu||i.b.submenu.item!==e)&&(i.b.submenu&&i.b.submenu.item!==e&&(DayPilot.Util.removeClass(i.b.submenu.link.parentNode,i.c("item_haschildren_active")),i.b.submenu.menu.hide(),i.b.submenu=null),e.items)){var u=i.cloneOptions();u.items=e.items,i.b.submenu={},i.b.submenu.menu=new DayPilot.Menu(u),i.b.submenu.menu.f=i,i.b.submenu.menu.show(o,{"submenu":!0,"parentLink":t,"parentItem":n}),i.b.submenu.item=e,i.b.submenu.link=t,DayPilot.Util.addClass(t.parentNode,i.c("item_haschildren_active"))}},this.c=function(e){var t=this.theme||this.cssClassPrefix,n=this.cssOnly?"_":"";return t?t+n+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(u,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.b.submenu&&this.b.submenu.menu.hide();var n=t.waitingSubmenu;if(n&&(t.waitingSubmenu=null,clearTimeout(n.timeout)),this.removeShadow(),this.b.div&&this.b.div.parentNode===document.body&&document.body.removeChild(this.b.div),o&&(DayPilot.de(o),o=null),i.b.visible=!1,i.b.source=null,i.f&&e.hideParent&&i.f.hide(e),DayPilot.Menu.active===i&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var u={};this.onHide(u)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){i.hide(e)},i.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(e){},this.removeShadow=function(){};var u=DayPilot.isArray(n)?null:n;if(u)for(var a in u)this[a]=u[a]},DayPilot.MenuBar=function(e,t){var n=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=DayPilot.list(),this.g=null,this.i=!1;for(var i in t)this[i]=t[i];this.j=function(e){return this.theme+"_"+e},this.k=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.j("main"),DayPilot.list(n.items).forEach(function(e){var i=document.createElement("span");i.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),i.className=n.j("item"),e.cssClass&&i.classList.add(e.cssClass),i.data=e,i.onclick=function(t){if(n.active&&n.active.item===e)n.l();else if(e.children)return void n.m(i);if("function"==typeof e.onClick){var o={};o.item=e,o.originalEvent=t,e.onClick(o)}},i.onmousedown=function(e){e.stopPropagation()},i.onmouseover=function(){n.active&&n.active.item!==e&&n.m(i)},t.appendChild(i),n.elements.items.push(i)})},this.l=function(){var e=n.j("item_active");n.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),n.active&&n.active.menu&&n.active.menu.hide(),n.active=null},this.n=function(e){return!!n.active&&n.active.item===e.data},this.m=function(e){if(!n.n(e)){n.l();var t=e.data,i=n.active={};i.item=t,i.div=e;var o=n.j("item_active");DayPilot.Util.addClass(e,o);var u=DayPilot.abs(e);if(t.children){i.menu=new DayPilot.Menu({"items":t.children});var a=u.x;"right"===t.align&&(a+=u.w),i.menu.show(null,{"x":a,"y":u.y+u.h,"align":t.align,"windowMargin":n.windowMargin})}DayPilot.MenuBar.active=n}},this.init=function(){return this.k(),this.i=!0,this},this.dispose=function(){this.i&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.l(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(e){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],n={};return n.x=t.pageX,n.y=t.pageY,n},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var n=DayPilot.Menu.active;if(n){var i=n.b.source;i&&i.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot);"undefined"==typeof DayPilot&&(DayPilot={}),function(DayPilot){"use strict";function e(t,a,i){var n=a.indexOf(".");if(n===-1)return void("__proto__"!==a&&"constructor"!==a&&(t[a]=i));var o=a.substring(0,n);if("__proto__"!==o&&"constructor"!==o){var l=a.substring(n+1),d=t[o];"object"==typeof d&&null!==d||(t[o]={},d=t[o]),e(d,l,i)}}function t(e,a,i){a=a||{},i=i||"";for(var n in e){var o=e[n];"object"==typeof o?"[object Array]"===Object.prototype.toString.call(o)?a[i+n]=o:o&&o.toJSON?a[i+n]=o.toJSON():t(o,a,i+n+"."):a[i+n]=o}return a}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,a=0;a<t.length;a++)if(t[a]===e)return void t.splice(a,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,a=0;a<t.length;a++)if(t[a]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var a=function(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,a={};return a.rules=[],a.commit=function(){try{t&&(e.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},a.add=function(a,i,n){if(t)return void this.rules.push(a+"{"+i+"}");if(e.sheet.insertRule)"undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(a+"{"+i+"}",n);else{if(!e.sheet.addRule)throw"No CSS registration method found";e.sheet.addRule(a,i,n)}},a},i="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new a;n.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),n.add(".modal_default_main:focus","outline: none;"),n.add(".modal_default_content","padding: 10px 0px;"),n.add(".modal_default_inner","padding: 20px;"),n.add(".modal_default_input","padding: 10px 0px;"),n.add(".modal_default_buttons","margin-top: 10px;"),n.add(".modal_default_buttons","padding: 10px 0px;"),n.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),n.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),n.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),n.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),n.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item label","display: block;"),n.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item_label","margin: 2px 0px;"),n.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),n.add(".modal_default_form_item_invalid",""),n.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),n.add(".modal_default_background","opacity: 0.5; background-color: #000;"),n.add(".modal_default_ok","padding: 3px; width: 80px;"),n.add(".modal_default_cancel","padding: 3px; width: 80px;"),n.add(".modal_default_form_item_date","position: relative;"),n.add(".modal_default_form_item_date:after","content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url("+"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg=="+")"),navigator.userAgent.indexOf("Edge")!==-1&&n.add(".modal_default_form_item_date input::-ms-clear","display: none;"),n.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),n.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),n.add(".modal_default_form_item_searchable","position: relative;"),n.add(".modal_default_form_item_searchable_icon",""),n.add(".modal_default_form_item_searchable_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+i+");"),n.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_time","position: relative;"),n.add(".modal_default_form_item_time_icon",""),n.add(".modal_default_form_item_time_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+i+");"),n.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_datetime_parent","display: flex;"),n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),n.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),n.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),n.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),n.add(".modal_default_form_item_tabular_row","display: table-row;"),n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),n.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),n.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]","width:100%; box-sizing: border-box;"),n.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),n.add(".modal_default_form_item_tabular_plus","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),n.add(".modal_default_form_item_tabular_plus:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),n.add(".modal_default_form_item_tabular_delete","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),n.add(".modal_default_form_item_tabular_delete:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),n.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),n.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),n.add(".modal_min_background","opacity: 0.5; background-color: #000;"),n.add(".modal_min_ok","padding: 3px 10px;"),n.add(".modal_min_cancel","padding: 3px 10px;"),n.add(".navigator_modal_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),n.add(".navigator_modal_month","font-size: 11px;"),n.add(".navigator_modal_day","color: black;"),n.add(".navigator_modal_weekend","background-color: #f0f0f0;"),n.add(".navigator_modal_dayheader","color: black;"),n.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),n.add(".navigator_modal_dayother","color: gray;"),n.add(".navigator_modal_todaybox","border: 1px solid red;"),n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),n.add(".navigator_modal_busy","font-weight: bold;"),n.add(".navigator_modal_cell","text-align: center;"),n.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),n.add(".navigator_modal_title","text-align: center;"),n.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),n.add(".navigator_modal_dayheader","text-align: center;"),n.add(".navigator_modal_weeknumber","text-align: center;"),n.add(".navigator_modal_cell_text","cursor: pointer;"),n.commit(),DayPilot.Modal=function(e){this.autoFocus=!0,this.focus=null,this.autoStretch=!0,this.autoStretchFirstLoadOnly=!1,this.className=null,this.theme="modal_default",this.disposeOnClose=!0,this.dragDrop=!0,this.loadingHtml=null,this.maxHeight=null,this.scrollWithPage=!0,this.useIframe=!0,this.zIndex=99999,this.left=null,this.width=600,this.top=20,this.height=200,this.locale=null,this.closed=null,this.onClose=null,this.onClosed=null,this.onShow=null;var t=this;this.id="_"+(new Date).getTime()+"n"+10*Math.random(),this.a=!1,this.b=null,this.c=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.d(),this.e(),this.useIframe){var t=function(e,t){return function(){e.setInnerHTML(e.id+"iframe",t)}};window.setTimeout(t(this,e),0)}else e.nodeType?this.div.appendChild(e):this.div.innerHTML=e;this.e(),this.f(),this.g()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.d();var a=this.loadingHtml;a&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",a)),this.re(this.iframe,"load",this.h),this.iframe.src=e,this.e(),this.f(),this.g()}else t.i({"url":e,"success":function(e){var a=e.request.responseText;t.showHtml(a)},"error":function(e){t.showHtml("Error loading the modal dialog")}})},this.g=function(){if("function"==typeof t.onShow){var e={};e.root=t.j(),e.modal=t,t.onShow(e)}},this.j=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.i=function(e){var t=new XMLHttpRequest;if(t){var a=e.method||"GET",i=e.success||function(){},n=e.error||function(){},o=e.data,l=e.url;t.open(a,l,!0),t.setRequestHeader("Content-type","text/plain"),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||304===t.status){var e={};e.request=t,i(e)}else if(n){var e={};e.request=t,n(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&("object"==typeof o&&(o=JSON.stringify(o)),t.send(o))}},this.e=function(){delete this.result;var e=window,a=document,i=e.pageYOffset?e.pageYOffset:a.documentElement&&a.documentElement.scrollTop?a.documentElement.scrollTop:a.body.scrollTop;this.theme&&(this.hideDiv.className=this.theme+"_background"),this.zIndex&&(this.hideDiv.style.zIndex=this.zIndex),this.hideDiv.style.display="",window.setTimeout(function(){t.hideDiv&&(t.hideDiv.onclick=function(){t.hide({"backgroundClick":!0})})},500),this.theme?this.div.className=this.theme+"_main":this.div.className="",this.className&&(this.div.className+=" "+this.className),this.left?this.div.style.left=this.left+"px":this.div.style.marginLeft="-"+Math.floor(this.width/2)+"px",this.div.style.position="absolute",this.div.style.boxSizing="content-box",this.div.style.top=i+this.top+"px",this.div.style.width=this.width+"px",this.zIndex&&(this.div.style.zIndex=this.zIndex),this.height&&(this.useIframe||!this.autoStretch?this.div.style.height=this.height+"px":this.div.style.height=""),this.useIframe&&this.height&&(this.iframe.style.height=this.height+"px"),this.div.style.display="",this.l(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.h=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.k().y},a=function(){return t.k().x};if(this.useIframe){for(var i=a()-40,n=this.width;n<i&&this.m();n+=10)this.div.style.width=n+"px",this.div.style.marginLeft="-"+Math.floor(n/2)+"px";for(var o=this.maxHeight||e()-2*this.top,l=this.height;l<o&&this.n();l+=10)this.iframe.style.height=l+"px",this.div.style.height=l+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.h)}else this.div.style.height=""},this.m=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,a=t.scrollWidth,i=e.body.children,n=0;n<i.length;n++){var o=i[n].offsetLeft+i[n].offsetWidth;a=Math.max(a,o)}return a>t.clientWidth},this.n=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,a=t.scrollHeight,i=e.body.children,n=0;n<i.length;n++){var o=i[n].offsetTop+i[n].offsetHeight;a=Math.max(a,o)}return a>t.clientHeight},this.k=function(){var e=document;if("CSS1Compat"===e.compatMode&&e.documentElement&&e.documentElement.clientWidth){var t=e.documentElement.clientWidth,a=e.documentElement.clientHeight;return{x:t,y:a}}var t=e.body.clientWidth,a=e.body.clientHeight;return{x:t,y:a}},this.f=function(){this.a||(this.re(window,"resize",this.o),this.re(window,"scroll",this.p),this.dragDrop&&(this.re(document,"mousemove",this.q),this.re(document,"mouseup",this.r)),this.a=!0)},this.s=function(){this.ue(window,"resize",this.o),this.ue(window,"scroll",this.p),this.dragDrop&&(this.ue(document,"mousemove",this.q),this.ue(document,"mouseup",this.r)),this.a=!1},this.t=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.u(),t.c=t.mc(e||window.event),t.b={x:t.div.offsetLeft,y:t.div.offsetTop})},this.q=function(e){if(t.c){var e=e||window.event,a=t.mc(e),i=a.x-t.c.x,n=a.y-t.c.y;t.div.style.marginLeft="0px",t.div.style.top=t.b.y+n+"px",t.div.style.left=t.b.x+i+"px"}},this.r=function(e){t.c&&(t.v(),t.div.style.cursor=null,t.c=null)},this.u=function(){if(this.useIframe){var e=document.createElement("div");e.style.backgroundColor="#ffffff",e.style.filter="alpha(opacity=80)",e.style.opacity="0.80",e.style.width="100%",e.style.height=this.height+"px",e.style.position="absolute",e.style.left="0px",e.style.top="0px",this.div.appendChild(e),this.mask=e}},this.v=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.o=function(){t.w(),t.l()},this.p=function(){t.w()},this.l=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.w=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.z.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.z={},this.z.container=function(){return t.container||document.body},this.z.scrollY=function(){var e=t.z.container();return e===document.body?window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop:e.scrollTop},this.re=function(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent&&e.attachEvent("on"+t,a)},this.ue=function(e,t,a){e.removeEventListener?e.removeEventListener(t,a,!1):e.detachEvent&&e.detachEvent("on"+t,a)},this.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},this.abs=function(e){for(var t={x:e.offsetLeft,y:e.offsetTop};e.offsetParent;)e=e.offsetParent,t.x+=e.offsetLeft,t.y+=e.offsetTop;return t},this.d=function(){var e=t.z.container(),a=e===document.body,i=a?"fixed":"absolute",n=document.createElement("div");n.id=this.id+"hide",n.style.position=i,n.style.left="0px",n.style.top="0px",n.style.right="0px",n.style.bottom="0px",n.oncontextmenu=function(){return!1},n.onmousedown=function(){return!1},e.appendChild(n);var o=document.createElement("div");o.id=this.id+"popup",o.style.position=i,o.style.left="50%",o.style.top="0px",o.style.backgroundColor="white",o.style.width="50px",o.style.height="50px",this.dragDrop&&(o.onmousedown=this.t),o.addEventListener("keydown",function(e){e.stopPropagation()});var l=null;this.useIframe&&(l=document.createElement("iframe"),l.id=this.id+"iframe",l.name=this.id+"iframe",l.frameBorder="0",l.style.width="100%",l.style.height="50px",o.appendChild(l)),e.appendChild(o),this.div=o,this.iframe=l,this.hideDiv=n},this.setInnerHTML=function(e,a){var i=window.frames[e],n=i.contentWindow||i.document||i.contentDocument;n.document&&(n=n.document),null==n.body&&n.write("<body></body>"),a.nodeType?n.body.appendChild(a):n.body.innerHTML=a,t.autoStretch&&(t.autoStretchFirstLoadOnly&&t.A||(t.stretch(),t.A=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.j(),a=e.querySelectorAll("input, textarea, select"),i={},n=0;n<a.length;n++){var o=a[n],l=o.name;if(l){var d=o.value;i[l]=d}}t.close(i)},this.hide=function(e){e=e||{};var a={};a.backgroundClick=!!e.backgroundClick,a.result=this.result,a.canceled="undefined"==typeof this.result,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof this.onClose&&(this.onClose(a),a.preventDefault.value)||(this.div&&(this.div.style.display="none",this.hideDiv.style.display="none",this.useIframe||(this.div.innerHTML=null)),window.focus(),DayPilot.ModalStatic.remove(this),"function"==typeof this.onClosed?this.onClosed(a):this.closed&&this.closed(),delete this.result,this.disposeOnClose&&(t.s(),t.B(t.div),t.B(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.B=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},this.C=function(){if(e)for(var t in e)this[t]=e[t]},this.C()},DayPilot.Modal.alert=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var a=t.okText||"OK";t.cancelText||"Cancel";return DayPilot.getPromise(function(i,n){t.onClosed=function(e){i(e)};var o=new DayPilot.Modal(t),l=document.createElement("div");l.className=o.theme+"_inner";var d=document.createElement("div");d.className=o.theme+"_content",d.innerHTML=e;var r=document.createElement("div");r.className=o.theme+"_buttons";var s=document.createElement("button");s.innerText=a,s.className=o.theme+"_ok",s.onclick=function(e){DayPilot.ModalStatic.close("OK")},r.appendChild(s),l.appendChild(d),l.appendChild(r),o.showHtml(l),o.autoFocus&&s.focus()})},DayPilot.Modal.confirm=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var a=t.okText||"OK",i=t.cancelText||"Cancel";return DayPilot.getPromise(function(n,o){t.onClosed=function(e){n(e)};var l=new DayPilot.Modal(t),d=document.createElement("div");d.className=l.theme+"_inner";var r=document.createElement("div");r.className=l.theme+"_content",r.innerHTML=e;var s=document.createElement("div");s.className=l.theme+"_buttons";var c=document.createElement("button");c.innerText=a,c.className=l.theme+"_ok",c.onclick=function(e){DayPilot.ModalStatic.close("OK")};var u=document.createTextNode(" "),m=document.createElement("button");m.innerText=i,m.className=l.theme+"_cancel",m.onclick=function(e){DayPilot.ModalStatic.close()},s.appendChild(c),s.appendChild(u),s.appendChild(m),d.appendChild(r),d.appendChild(s),l.showHtml(d),l.autoFocus&&c.focus()})},DayPilot.Modal.prompt=function(e,t,a){"object"==typeof t&&(a=t,t=""),a=a||{},a.height=a.height||40,a.useIframe=!1;var i=a.okText||"OK",n=a.cancelText||"Cancel",o=t||"";return DayPilot.getPromise(function(t,l){a.onClosed=function(e){t(e)};var d=new DayPilot.Modal(a),r=document.createElement("div");r.className=d.theme+"_inner";var s=document.createElement("div");s.className=d.theme+"_content",s.innerHTML=e;var c=document.createElement("div");c.className=d.theme+"_input";var u=document.createElement("input");u.value=o,u.style.width="100%",u.onkeydown=function(e){var t=!1;switch(e.keyCode){case 13:d.close(this.value);break;case 27:d.close();break;default:t=!0}t||(e.preventDefault(),e.stopPropagation())},c.appendChild(u);var m=document.createElement("div");m.className=d.theme+"_buttons";var h=document.createElement("button");h.innerText=i,h.className=d.theme+"_ok",h.onclick=function(e){d.close(u.value)};var p=document.createTextNode(" "),f=document.createElement("button");f.innerText=n,f.className=d.theme+"_cancel",f.onclick=function(e){d.close()},m.appendChild(h),m.appendChild(p),m.appendChild(f),r.appendChild(s),r.appendChild(c),r.appendChild(m),d.showHtml(r),d.autoFocus&&u.focus()})};var o=function(e){return"[object Array]"===Object.prototype.toString.call(e)};DayPilot.Modal.form=function(t,a,i){if(1===arguments.length){var n=t;if(o(n))a={};else{if("object"!=typeof n)throw"Invalid DayPilot.Modal.form() parameter";a=t,t=[];for(var d in a){var r={};r.name=d,r.id=d,t.push(r)}}}var s={};for(var d in i)s[d]=i[d];s.height=s.height||40,s.useIframe=!1;var c=s.okText||"OK",u=s.cancelText||"Cancel";return DayPilot.getPromise(function(i,n){s.onClosed=function(t){if(t.result){var n=JSON.parse(JSON.stringify(a));for(var o in t.result)e(n,o,t.result[o]);t.result=n}i(t)};var o=new DayPilot.Modal(s),d=document.createElement("div");d.className=o.theme+"_inner";var r=document.createElement("div");r.className=o.theme+"_input";var m=new l({theme:o.theme,form:t,data:a,zIndex:o.zIndex,locale:o.locale,plugins:o.plugins,onKey:function(e){switch(e.key){case"Enter":m.validate()&&o.close(m.serialize());break;case"Escape":o.close()}},onChange:function(e){"function"==typeof o.onChange&&o.onChange(e)}}),h=m.create();r.append(h);var p=document.createElement("div");p.className=o.theme+"_buttons";var f=document.createElement("button");f.innerText=c,f.className=o.theme+"_ok",s.okDisabled&&(f.disabled=!0),f.onclick=function(e){m.validate()&&o.close(m.serialize())};var v=document.createTextNode(" "),g=document.createElement("button");if(g.innerText=u,g.className=o.theme+"_cancel",g.onclick=function(e){o.close()},g.onmousedown=function(e){m.canceling=!0},p.appendChild(f),p.appendChild(v),p.appendChild(g),d.appendChild(r),d.appendChild(p),o.showHtml(d),o.div.setAttribute("tabindex","-1"),o.div.addEventListener("keydown",function(e){switch(e.keyCode){case 27:o.close();break;case 13:m.validate()&&o.close(m.serialize())}}),o.focus){var b=null;if("object"==typeof o.focus){var y=o.focus.id,_=o.focus.value;b=m.findViewById(y,_)}else"string"==typeof o.focus&&(b=m.findViewById(o.focus));b&&b.focus()}else{var I=m.firstFocusable();o.autoFocus&&I?I.focus():o.div.focus()}})},DayPilot.Modal.close=function(e){var t=DayPilot.Modal.opener();t&&t.close(e)},DayPilot.Modal.stretch=function(e){var t=DayPilot.Modal.opener();if(!t)throw"Unable to find the opener DayPilot.Modal instance.";t.stretch()},DayPilot.Modal.closeSerialized=function(){var e=DayPilot.Modal.opener()||DayPilot.ModalStatic.last();e&&e.closeSerialized()},DayPilot.Modal.opener=function(){return"undefined"!=typeof DayPilot&&"undefined"!=typeof DayPilot.ModalStatic&&DayPilot.ModalStatic.list.length>0?DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length-1]:parent&&parent.DayPilot&&parent.DayPilot.ModalStatic&&parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length-1]},DayPilot.Modal.Experimental={},DayPilot.Modal.Experimental.Form=l,"undefined"==typeof DayPilot.getPromise&&(DayPilot.getPromise=function(e){return"undefined"!=typeof Promise?new Promise(e):(DayPilot.Promise=function(e){var t=this;this.then=function(t,a){return t=t||function(){},a=a||function(){},e(t,a),DayPilot.getPromise(e)},this["catch"]=function(a){return t.then(null,a),DayPilot.getPromise(e)}},new DayPilot.Promise(e))});var l=function(e){this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.D=[],this.E=null,this.canceling=!1,this.F=[],this.G=[],this.H=null,e=e||{};for(var t in e)this[t]=e[t]};l.prototype.create=function(){return this.load(),this.render(),this.H},l.prototype.render=function(){var e=this;this.H=document.createElement("div"),this.D.forEach(function(t){e.createView(t)}),this.applyState()},l.prototype.createView=function(e){var t=this.theme,a=this,i=document.createElement("div");if(i.className=t+"_form_item "+t+"_form_item_level"+e.level,
|
|
12
|
-
e.interactive||"title"!==e.type?i.className+=" "+t+"_form_item_"+e.type:i.className+=" "+t+"_form_title",e.data.cssClass&&(i.className+=" "+e.data.cssClass),!e.isValue){var n=document.createElement("div");n.className=t+"_form_item_label",n.innerText=e.text,i.appendChild(n)}var o=this.createInteractive(e);o.onInput=function(e){if(e=e||{},a.I(o,{"debounce":!e.immediate}),"function"==typeof a.onChange){var t={};t.result=a.serialize(),a.onChange(t)}},o.onBlur=function(){a.canceling||a.I(o)},o.apply(e),o.H=i,o.row=e,o.element&&i.appendChild(o.element),this.G.push(o),this.H.appendChild(i)},l.prototype.validate=function(){var e=this,t=!0;return this.G.forEach(function(a){var i=e.I(a);t=t&&i}),t},l.prototype.I=function(e,t){function a(){e.J&&(e.J.remove(),e.J=null),e.H.classList.add(u);var t=document.createElement("div");t.classList.add(m),t.innerText=c.message,e.J=t,e.H.appendChild(t)}t=t||{};var i=t.debounce,n=t.silent,o=e.row,l=!0,d="function"==typeof o.data.onValidate?o.data.onValidate:null,r="function"==typeof o.data.validate?o.data.validate:null,s=d||r;if(s){var c={};c.valid=!0,c.value=e.save()[o.field],c.message="Error",c.values=this.serialize(),c.result=this.serialize(),s(c);var u=this.theme+"_form_item_invalid",m=this.theme+"_form_item_invalid_message";if(c.valid)clearTimeout(this.F[o.field]),e.J&&(e.J.remove(),e.J=null),e.H.classList.remove(u);else if(!n)if(i){var h=1e3;clearTimeout(this.F[o.field]),this.F[o.field]=setTimeout(function(){a()},h)}else a();l=c.valid}return l},l.prototype.load=function(){var e=this;this.form.forEach(function(t){e.processFormItem(t,0)});var a;try{var i=JSON.stringify(this.data);a=t(JSON.parse(i))}catch(e){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+e)}for(var n in a)this.setValue(n,a[n])},l.prototype.setValue=function(e,t){this.D.forEach(function(a){a.applyValue(e,t)})},l.prototype.updateDependentState=function(){var e=this,t=[!0];(this.E?this.E:this.D).forEach(function(a){var i=e.updateState(a,{enabled:t[a.level]&&!a.data.disabled});i.isValue&&(t[i.level+1]=i.enabled&&i.checked)})},l.prototype.processFormItem=function(e,t){var a=this,i=this.getFieldType(e),n=[];if("radio"===i){if(e.name){var o=new d;o.field=e.id,o.data=e,o.level=t,o.type="label",o.interactive=!1,o.text=e.name,a.D.push(o),n.push(o)}e.options.forEach(function(o){var l=new d;l.field=e.id,l.data=o,l.level=t,l.type=i,l.isValue=!0,l.text=o.name,l.resolved=o.id,a.D.push(l),n.push(l),o.children&&o.children.forEach(function(e){var i=a.processFormItem(e,t+1);n=n.concat(i)})})}else if("title"===i){var o=new d;o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=e.name,a.D.push(o),n.push(o)}else if("image"===i){var o=new d;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.D.push(o),n.push(o)}else if("html"===i){var o=new d;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.D.push(o),n.push(o)}else if("scrollable"===i){var o=new d;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.D.push(o),n.push(o)}else{var o=new d;o.field=e.id,o.data=e,o.level=t,o.type=i,o.text=e.name,o.children=[],a.D.push(o),n.push(o)}return"checkbox"===i&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var i=a.processFormItem(e,t+1);n=n.concat(i)})),n},l.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},l.prototype.createInteractive=function(e){var t=this,a={"label":function(){return new r},"title":function(){return new r},"image":function(){var t=new r,a=document.createElement("img");return a.src=e.data.image,t.element=a,t},"html":function(){var t=new r,a=document.createElement("div");return"string"==typeof e.data.text?a.innerText=e.data.text:"string"==typeof e.data.html&&(a.innerHTML=e.data.html),t.element=a,t},"scrollable":function(){var a=new r,i=document.createElement("div");i.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(i.style.height=e.data.height+"px");var n=document.createElement("div");return n.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),i.appendChild(n),a.element=i,a},"text":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.element;t.value=e.value,t.disabled=!e.enabled};var i=document.createElement("input");return i.name=e.field,i.type="text",i.autocomplete="off",i.onkeydown=function(e){var a=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:a=!0}a||(e.preventDefault(),e.stopPropagation())},i.oninput=function(e){a.onInput()},i.onblur=function(e){a.onBlur()},a.element=i,a.canFocus=function(){return!a.element.disabled},a.focus=function(){a.element.focus(),a.element.setSelectionRange(0,a.element.value.length)},a.save=function(){var t={};return t[e.field]=i.value,t},a},"textarea":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.element;t.value=e.value,t.disabled=!e.enabled};var i=document.createElement("textarea");return i.name=e.field,e.data.height&&(i.style.height=e.data.height+"px"),i.onkeydown=function(e){var a=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),a=!1;break;case 27:t.doOnKey("Escape");break;default:a=!0}a||e.stopPropagation()},i.oninput=function(e){a.onInput()},i.onblur=function(e){a.onBlur()},a.element=i,a.canFocus=function(){return!a.element.disabled},a.focus=function(){a.element.focus(),a.element.setSelectionRange(0,0)},a.save=function(){var t={};return t[e.field]=i.value,t},a},"date":function(){var a=new r;a.apply=function(e){a.row=e;var i=a.element,n=a.picker;e.data.dateFormat&&(n.pattern=e.data.dateFormat);var o=e.data.locale||t.locale;o&&(n.locale=o),i.disabled=!e.enabled,n.date=new DayPilot.Date(e.value);var l=new DayPilot.Date(e.value).toString(e.data.dateFormat||n.pattern,n.locale);i.value=l};var i=document.createElement("input");i.name=e.field;var n=new DayPilot.DatePicker({target:i,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){a.onInput({"immediate":!0})}});return i.picker=n,i.className=t.theme+"_input_date",i.type="text",i.onkeydown=function(e){var a=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),a=!0;break;default:a=!0}a||(e.preventDefault(),e.stopPropagation())},i.onfocus=function(){n.show()},i.onclick=function(){n.show()},i.oninput=function(e){a.onInput()},i.onblur=function(e){a.onBlur()},a.element=i,a.picker=n,a.canFocus=function(){return!a.element.disabled},a.focus=function(){a.element.focus()},a.save=function(){var t=n.date?n.date.toString():null,a={};return a[e.field]=t,a},a},"time":function(){return t.K(e)},"datetime":function(){return t.L(e)},"select":function(){var t=new r;t.apply=function(e){t.row=e;var a=t.element;a.value=e.value,a.disabled=!e.enabled};var a=document.createElement("select");return a.name=e.field,e.data.options&&e.data.options.forEach&&e.data.options.forEach(function(e){var t=document.createElement("option");t.innerText=e.name||e.id,t.value=e.id,t.M=e.id,a.appendChild(t)}),a.onchange=function(e){t.onInput({"immediate":!0})},a.onblur=function(e){t.onBlur()},t.element=a,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,i=a.options[a.selectedIndex];i&&"undefined"!=typeof i.M&&(t=i.M);var n={};return n[e.field]=t,n},t},"searchable":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.searchable;t.disabled=!e.enabled,t.select(e.value)};var i=new s({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&a.onInput({"immediate":!0})}}),n=i.create();return a.element=n,a.searchable=i,a.canFocus=function(){return!a.searchable.disabled},a.focus=function(){a.searchable.focus()},a.save=function(){var t=i.selected&&i.selected.id,a={};return a[e.field]=t,a},a},"radio":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.radio;t.checked=e.checked,t.disabled=!e.enabled};var i=document.createElement("label"),n=document.createElement("input");n.type="radio",n.name=e.field,n.M=e.resolved,n.onchange=function(e){var i=a.row;t.findRowsByField(i.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(i,{checked:!0}),t.applyState(),a.onInput({"immediate":!0})},n.onblur=function(e){a.onBlur()},i.appendChild(n);var o=document.createTextNode(e.text);return i.append(o),a.element=i,a.radio=n,a.canFocus=function(){return!1},a.focus=function(){a.radio.focus()},a.save=function(){if(!n.checked)return{};var t=n.M,a={};return a[e.field]=t,a},a},"checkbox":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var i=document.createElement("label"),n=document.createElement("input");n.type="checkbox",n.name=e.field,n.M=e.resolved,n.onchange=function(e){var i=a.row;t.updateState(i,{checked:this.checked}),t.applyState(),a.onInput({"immediate":!0})},n.onblur=function(e){a.onBlur()},i.appendChild(n);var o=document.createTextNode(e.text);return i.append(o),a.element=i,a.checkbox=n,a.canFocus=function(){return!1},a.focus=function(){a.checkbox.focus()},a.save=function(){var t=n.checked,a={};return a[e.field]=t,a},a},"table":function(){var a=new r;a.apply=function(e){a.row=e;var t=a.table;t.disabled=!e.enabled,t.load(e.value||[])};var i=new c({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(e){a.onInput()}}),n=i.create();return a.element=n,a.table=i,a.canFocus=function(){return!1},a.focus=function(){a.table.focus()},a.save=function(){var t=i.save(),a={};return a[e.field]=t,a},a}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):a[e.type]()},l.prototype.K=function(e){var t=this,a=new r;a.apply=function(e){a.row=e;var t=a.searchable;t.disabled=!e.enabled,t.select(e.value)};var i=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,l=e.data.locale||t.locale,d=DayPilot.Locale.find(l)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*o;u++){var m=c.addMinutes(n*u),h={};h.name=m.toString(e.data.timeFormat||d.timePattern,d),h.id=m.toString("HH:mm"),i.push(h)}var p=new s({data:i,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&a.onInput({"immediate":!0})}}),f=p.create();return a.element=f,a.searchable=p,a.canFocus=function(){return!a.searchable.disabled},a.focus=function(){a.searchable.focus()},a.save=function(){var t=p.selected&&p.selected.id,a={};return a[e.field]=t,a},a},l.prototype.L=function(e){var t=this,a=new r;a.apply=function(e){a.row=e;var i=a.searchable;i.disabled=!e.enabled;var n=new DayPilot.Date(e.value).toString("HH:mm");i.select(n);var o=a.dateInput,l=a.picker;e.data.dateFormat&&(l.pattern=e.data.dateFormat);var d=e.data.locale||t.locale;if(d){var r=DayPilot.Locale.find(d)||DayPilot.Locale.US;l.locale=d,l.pattern=r.datePattern}o.disabled=!e.enabled,l.date=new DayPilot.Date(e.value);var s=new DayPilot.Date(e.value).toString(e.data.dateFormat||l.pattern,l.locale);o.value=s};var i=function(){var i=document.createElement("input");i.name=e.field;var n=new DayPilot.DatePicker({target:i,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){a.onInput({"immediate":!0})}});return i.picker=n,i.className=t.theme+"_input_date",i.type="text",i.onkeydown=function(e){var a=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),a=!0;break;default:a=!0}a||(e.preventDefault(),e.stopPropagation())},i.onfocus=function(){n.show()},i.onclick=function(){n.show()},i.oninput=function(e){a.onInput()},i.onblur=function(e){a.onBlur()},a.dateInput=i,a.picker=n,i}(),n=function(){var i=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,l=e.data.locale||t.locale,d=DayPilot.Locale.find(l)||DayPilot.Locale.US,r=DayPilot.Date.today(),c=0;c<24*o;c++){var u=r.addMinutes(n*c),m={};m.name=u.toString(e.data.timeFormat||d.timePattern,d),m.id=u.toString("HH:mm"),i.push(m)}var h=new s({data:i,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&a.onInput({"immediate":!0})}});return a.searchable=h,h.create()}(),o=document.createElement("div");return o.className=t.theme+"_form_item_datetime_parent",o.appendChild(i),o.appendChild(n),a.element=o,a.canFocus=function(){return!a.searchable.disabled},a.focus=function(){a.dateInput.focus()},a.save=function(){var t=a.searchable.selected&&a.searchable.selected.id,i=a.picker.date?a.picker.date.toString():null,n=new DayPilot.Date(i).getDatePart(),o=DayPilot.Date.parse(n.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),l={};return l[e.field]=o,l},a},l.prototype.findRowsByField=function(e){return this.D.filter(function(t){return t.field===e})},l.prototype.findViewById=function(e,t){return this.G.find(function(a){return a.row.field===e&&("radio"!==a.row.type||a.row.resolved===t)})},l.prototype.firstFocusable=function(){return this.G.find(function(e){return e.canFocus&&e.canFocus()})},l.prototype.updateState=function(e,t){var a=this.E?this.E:this.D,i=a.indexOf(e);return this.E=a.map(function(a){if(a!==e)return a;if(e.propsEqual(t))return e;var i=e.clone();for(var n in t)i[n]=t[n];return i}),this.E[i]},l.prototype.updateInteractive=function(e){var t=this.E.indexOf(e);this.G[t].apply(e)},l.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.E){this.E.filter(function(t,a){return e.D[a]!==t}).forEach(function(t){e.updateInteractive(t)}),this.D=this.E,this.E=null}},l.prototype.getFieldType=function(e){return["text","date","select","searchable","radio","checkbox","table","title","image","html","textarea","scrollable","time","datetime"].indexOf(e.type)!==-1?e.type:e.type&&this.plugins&&this.plugins[e.type]?e.type:e.image?"image":e.html||e.text?"html":e.id?e.options?"searchable":e.dateFormat?"date":e.columns?"table":"text":"title"},l.prototype.serialize=function(){var e={};return this.G.forEach(function(t){var a=t.save();for(var i in a)e[i]=a[i]}),e};var d=function(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null};d.prototype.clone=function(){var e=new d;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},d.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},d.prototype.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},d.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))};var r=function(){this.element=null,this.canFocus=function(){return!1},this.apply=function(e){},this.focus=function(){},this.save=function(){return{}}},s=function(e){this.data=[],this.name=null,this.theme="searchable_default",this.N=!1,this.listZIndex=1e5,this.onSelect=null,this.O=null,this.P=null,this.Q=!1,this.R=null,this.S=null,this.T=[],this.U=null,e=e||{};var t=this,a={"selected":{post:function(e){"object"==typeof e&&e.id?t.O=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.O}}),Object.defineProperty(this,"disabled",{get:function(){return this.N},set:function(e){this.N=e,this.R&&(this.R.disabled=e,e&&this.V())}});for(var i in e)a[i]||(this[i]=e[i]);for(var i in e)a[i]&&a[i].post(e[i])};s.prototype.select=function(e){return this.O=this.data.find(function(t){return t.id===e}),this.W(!1),this},s.prototype.create=function(){function e(e){var a=r.strategy;"includes"!==r.strategy&&"startsWith"!==r.strategy&&(a="includes"),e=e||a||"includes",m.style.display="",m.style.top=p.offsetHeight+"px",m.style.left="0px",m.style.width=p.offsetWidth+"px",m.innerHTML="",m.addEventListener("mousedown",function(e){e.preventDefault()}),r.P=null,r.T=[];var n=null;r.data.forEach(function(a){var o=a.name||a.id;if("includes"===e){if(o.toLowerCase().indexOf(p.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==o.toLowerCase().indexOf(p.value.toLowerCase()))return;var l=document.createElement("div");l.className=r.theme+"_list_item",l.innerText=o,l.item=a,a===r.O&&(r.P=l),n||(n=l),l.addEventListener("mousedown",function(e){i(l),e.preventDefault()}),l.addEventListener("mousemove",function(e){r.P!==l&&(r.P=l,t({dontScroll:!0}))}),m.appendChild(l),r.T.push(l)}),r.P||(r.P=n),t()}function t(e){e=e||{};var t=!e.dontScroll;document.querySelectorAll("."+r.theme+"_list_item_highlight").forEach(function(e){e.className=e.className.replace(r.theme+"_list_item_highlight","")}),r.P&&(r.P.className+=" "+r.theme+"_list_item_highlight",t&&!a(r.P,m)&&r.P.scrollIntoView())}function a(e,t){var a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return a.top>=i.top&&a.bottom<=i.bottom}function i(e){var t=e.item;r.O=t,r.W(!0),o(),l()}function n(){r.V()}function o(){r.X()}function l(){r.Q=!0,p.setAttribute("readonly","readonly"),p.focus()}function d(){r.Q=!1,p.removeAttribute("readonly"),p.select(),e("all")}var r=this,s=this,c=document.createElement("div");c.className=this.theme+"_main",c.style.position="relative";var u=document.createElement("div");u.className=this.theme+"_icon",u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="20px",u.addEventListener("mousedown",function(e){e.preventDefault(),r.Q?(r.focus(),d()):(n(),l())});var m=document.createElement("div");m.className=this.theme+"_list",m.style.display="none",m.style.position="absolute",m.style.zIndex=this.listZIndex;var h=document.createElement("input");h.type="hidden",h.name=this.name,h.searchable=s,this.U=h;var p=document.createElement("input");return p.type="text",p.className=this.theme+"_input",p.disabled=this.N,p.addEventListener("click",function(e){d()}),p.addEventListener("focus",function(t){e("all")}),p.addEventListener("input",function(t){e()}),p.addEventListener("blur",function(e){p.removeAttribute("readonly"),n()}),p.addEventListener("keydown",function(e){if(r.Q){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;d()}if("ArrowDown"===e.key){var a=s.T.indexOf(s.P);a+1<s.T.length&&(s.P=s.T[a+1]),t()}else if("ArrowUp"===e.key){var a=s.T.indexOf(s.P);a-1>=0&&(s.P=s.T[a-1]),t()}else"Enter"===e.key?r.P?(e.stopPropagation(),i(r.P)):(e.stopPropagation(),n(),l()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),l())}),this.R=p,this.S=m,this.O||(this.O=this.data[0],this.O&&(p.value=this.O.name)),c.appendChild(p),c.appendChild(u),c.appendChild(h),c.appendChild(m),c},s.prototype.V=function(){this.X(),this.O?this.R.value=this.O.name:(this.R.value="",this.W(!0))},s.prototype.focus=function(){this.Q=!0,this.R.setAttribute("readonly","readonly"),this.R.focus(),this.V()},s.prototype.X=function(){this.S.style.display="none"},s.prototype.W=function(e){if(this.U.value=this.selected?this.selected.id:null,this.O?this.R.value=this.O.name:this.R.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}};var c=function(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.Y=null,this.D=[],e=e||{};for(var t in e)this[t]=e[t]};c.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var a=document.createElement("input");a.type="hidden",a.name=e.name,a.table=this,t.appendChild(a);var i=document.createElement("div");i.className=this.theme+"_table";var n=this.Z();i.appendChild(n);var o=e.$({});o.spacer=!0;var l=this._(o);l.classList.add(e.theme+"_spacer"),i.appendChild(l);var d=document.createElement("div");d.className=e.theme+"_tbody",i.appendChild(d),t.appendChild(i);var r=document.createElement("div");t.appendChild(r),this.nav.body=d,this.nav.table=i,this.nav.main=t,this.nav.after=r;var s=document.createElement("div"),c=document.createElement("span");return c.className=this.theme+"_plus",c.addEventListener("click",function(t){if(!e.disabled){var a=e.item.onNewRow,i={};if("function"==typeof a){var n={};n.result=e.form.serialize(),n.value={},a(n),i=n.value}var o=e.$(i);e.D.push(o),e.aa(),e.ba()}}),this.nav.plus=c,s.appendChild(c),t.appendChild(s),t},c.prototype.Z=function(){var e=this,t=document.createElement("div");return t.classList.add(this.theme+"_row"),t.classList.add(this.theme+"_header"),this.item.columns.forEach(function(a){var i=document.createElement("div");i.classList.add(e.theme+"_cell"),i.innerText=a.name,t.appendChild(i)}),t},c.prototype.ca=function(){var e=this.item.max||0;return!!(e&&this.D.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.D.forEach(function(e){var a={};e.cells.forEach(function(e){a[e.id]=e.value}),t.push(a)}),t},c.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.da(),this.aa()},c.prototype.ea=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.ca()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.da=function(){var e=this;this.D=[],this.data.forEach(function(t){var a=e.$(t);e.D.push(a)})},c.prototype.fa=function(e){var t=this,a=t.D.indexOf(e);t.D.splice(a,1)},c.prototype.$=function(e){var t=this,a={};return a.data=e,a.cells=[],t.item.columns.forEach(function(i){var n=i.id,o=e[n],l=t.ga(i);if("undefined"==typeof o)if("text"===l)o="";else if("number"===l)o=0;else if("select"===l){var d=i.options;o=d&&d[0].id}var r={};r.id=n,r.value=o,r.type=l,r.data=i,a.cells.push(r)}),a},c.prototype.ga=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.aa=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.D.forEach(function(t){var a=e._(t);e.nav.body.appendChild(a)}),0===this.D.length){var t=e.ha();e.nav.after.appendChild(t)}this.ea()},c.prototype.ha=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype._=function(e){var t=this,a=document.createElement("div");a.className=t.theme+"_row",e.cells.forEach(function(i){var n=document.createElement("div");n.className=t.theme+"_cell";var o=t.ia(i);if(e.spacer){var l=document.createElement("div");l.style.height="0px",l.style.overflow="hidden",l.appendChild(o),n.appendChild(l)}else n.appendChild(o);a.appendChild(n)});var i=document.createElement("div");i.classList.add(t.theme+"_cell"),i.classList.add(t.theme+"_rowaction");var n=document.createElement("span");return n.className=this.theme+"_delete",n.addEventListener("click",function(a){t.disabled||(t.fa(e),t.aa(),t.ba())}),e.spacer||i.appendChild(n),a.appendChild(i),a},c.prototype.ba=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.ia=function(e){var t=this,a=e.type;if("text"===a||"number"===a){var i=document.createElement("input");return i.type=a,t.disabled&&(i.disabled=!0),e.value&&(i.value=e.value),i.addEventListener("keyup",function(i){"number"===a?e.value=Number(this.value):e.value=this.value,t.ba()}),i}if("select"===a){var n=document.createElement("select");return t.disabled&&(n.disabled=!0),e.data.options.forEach(function(t){var a=document.createElement("option");a.innerText=t.name,a.value=t.id,a.M=t.id,n.appendChild(a),e.value===t.id&&a.setAttribute("selected",!0)}),n.addEventListener("change",function(a){var i=n.options[n.selectedIndex];i&&"undefined"!=typeof i.M&&(e.value=i.M),t.ba()}),n}throw new Error("Unsupported item type: "+a)},c.prototype.focus=function(){}}}(DayPilot);if("undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var t={};t.Month=function(e,i){this.v="2023.1.447-lite",this.nav={};var n=this;this.id=e,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,this.contextMenu=null,this.cssClassPrefix="month_default",this.eventBarVisible=!0,this.eventHeight=25,this.eventsLoadMethod="GET",this.headerHeight=30,this.hideUntilInit=!0,this.lineSpace=1,this.locale="en-us",this.showToolTip=!0,this.startDate=new DayPilot.Date,this.theme=null,this.visible=!0,this.weekStarts=1,this.width="100%",this.xssProtection="Enabled",this.afterRender=function(){},this.cellHeaderClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.headerClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onCellHeaderClick=null,this.onCellHeaderClicked=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.a=function(t,e){var t=JSON.parse(t);return t.CallBackRedirect?void(document.location.href=t.CallBackRedirect):"None"===t.UpdateType?void n.fireAfterRenderDetached(t.CallBackData,!0):(n.events.list=t.Events,"Full"===t.UpdateType&&(n.startDate=t.StartDate,n.timeFormat=t.TimeFormat?t.TimeFormat:n.timeFormat,"undefined"!=typeof t.WeekStarts&&(n.weekStarts=t.WeekStarts),n.hashes=t.Hashes),n.b(),n.c(),n.d(),"Full"===t.UpdateType&&(n.f(),n.g()),n.h(),n.show(),n.i(),void n.fireAfterRenderDetached(t.CallBackData,!0))},this.fireAfterRenderDetached=function(t,e){var i=function(t,e){return function(){n.afterRender&&n.afterRender(t,e)}};window.setTimeout(i(t,e),0)},this.lineHeight=function(){return this.eventHeight+this.lineSpace},this.events={},this.events.add=function(t){var e=null;if(t instanceof DayPilot.Event)e=t.data;else{if("object"!=typeof t)throw"DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";e=t}n.events.list||(n.events.list=[]),n.events.list.push(e),n.update(),n.j.notify()},this.events.find=function(t){if(!n.events.list)return null;for(var e=0;e<n.events.list.length;e++){var i=n.events.list[e];if(i.id===t)return new DayPilot.Event(i,n)}return null},this.events.update=function(t){if(t instanceof DayPilot.Event)t.commit();else if("object"==typeof t){var e=n.events.find(t.id);if(e){var i=DayPilot.indexOf(n.events.list,e.data);n.events.list.splice(i,1,t)}}n.update(),n.j.notify()},this.events.remove=function(t){var e=DayPilot.indexOf(n.events.list,t.data);n.events.list.splice(e,1),n.update(),n.j.notify()},this.events.load=function(t,e,i){var a=function(t){var e={};e.exception=t.exception,e.request=t.request,"function"==typeof i&&i(e)},s=function(t){var i,s=t.request;try{i=JSON.parse(s.responseText)}catch(t){var l={};return l.exception=t,void a(l)}if(DayPilot.isArray(i)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=i,"function"==typeof e&&e(o),o.preventDefault.value)return;n.events.list=i,n.k&&n.update()}};if(n.eventsLoadMethod&&"POST"===n.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":n.visibleStart().toString(),"end":n.visibleEnd().toString()},"url":t,"success":s,"error":a});else{var l=t,o="start="+n.visibleStart().toString()+"&end="+n.visibleEnd().toString();l+=l.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.Http.ajax({"method":"GET","url":l,"success":s,"error":a})}},this.update=function(t){if(n.l(t),this.k&&this.cells){n.b(),n.c(),n.d(),n.f(),n.g(),n.h(),n.m(),n.i(),this.visible?this.show():this.hide()}},this.n=null,this.l=function(t){if(t){var e={"events":{"preInit":function(){var t=this.data||[];DayPilot.isArray(t.list)?n.events.list=t.list:n.events.list=t}}};this.n=e;for(var i in t)if(e[i]){var a=e[i];a.data=t[i],a.preInit&&a.preInit()}else n[i]=t[i]}},this.o=function(){var t=this.n;for(var e in t){var i=t[e];i.postInit&&i.postInit()}},this.p={},this.p.events=[],this.q=function(t){var e=this.p.events,i=this.events.list[t],n={};for(var a in i)n[a]=i[a];if("function"==typeof this.onBeforeEventRender){var s={};s.data=n,this.onBeforeEventRender(s)}e[t]=n},this.d=function(){var t=this.events.list;if(t){if(!DayPilot.isArray(t))throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: "+typeof t);if("function"==typeof this.onBeforeEventRender)for(var e=0;e<t.length;e++)this.q(e);for(var i=0;i<t.length;i++){var n=t[i];if("object"!=typeof n)throw new DayPilot.Exception("Event data item must be an object");if(!n.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!n.end)throw new DayPilot.Exception("Event data item must specify 'end' property");var a=new DayPilot.Date(n.start),s=new DayPilot.Date(n.end);if(!(a.getTime()>s.getTime()))for(var e=0;e<this.rows.length;e++){var l=this.rows[e],o=new DayPilot.Event(n,this);l.belongsHere(o)&&(l.events.push(o),"function"==typeof this.onBeforeEventRender&&(o.cache=this.p.events[i]))}}for(var r=0;r<this.rows.length;r++){var l=this.rows[r];l.events.sort(this.r);for(var h=0;h<this.rows[r].events.length;h++){var c=l.events[h],d=l.getStartColumn(c),v=l.getWidth(c);l.putIntoLine(c,d,v,r)}}}},this.b=function(){for(var t=0;t<this.elements.events.length;t++){var e=this.elements.events[t];e.event=null,e.click=null,e.parentNode.removeChild(e)}this.elements.events=[]},this.i=function(){this.s()},this.s=function(){this.elements.events=[];for(var t=0;t<this.rows.length;t++)for(var e=this.rows[t],i=0;i<e.lines.length;i++)for(var n=e.lines[i],a=0;a<n.length;a++)this.t(n[a])},this.r=function(t,e){if(!(t&&e&&t.start&&e.start))return 0;var i=t.start().getTime()-e.start().getTime();return 0!==i?i:e.end().getTime()-t.end().getTime()},this.drawShadow=function(e,i,n,a,s,l){s||(s=0);var o=a;this.shadow={},this.shadow.list=[],this.shadow.start={x:e,y:i},this.shadow.width=a;var r=7*i+e-s;r<0&&(o+=r,e=0,i=0);for(var h=s;h>=7;)i--,h-=7;if(h>e){h>e+(7-this.getColCount())?(i--,e=e+7-h):(o=o-h+e,e=0)}else e-=h;i<0&&(i=0,e=0);var c=null;for(t.resizingEvent?c="w-resize":t.movingEvent&&(c="move"),this.nav.top.style.cursor=c;o>0&&i<this.rows.length;){var d=Math.min(this.getColCount()-e,o),v=this.rows[i],u=this.getRowTop(i),f=v.getHeight(),p=document.createElement("div");p.setAttribute("unselectable","on"),p.style.position="absolute",p.style.left=this.getCellWidth()*e+"%",p.style.width=this.getCellWidth()*d+"%",p.style.top=u+"px",p.style.height=f+"px",p.style.cursor=c;var y=document.createElement("div");y.setAttribute("unselectable","on"),p.appendChild(y),y.style.position="absolute",y.style.top="0px",y.style.right="0px",y.style.left="0px",y.style.bottom="0px",y.style.backgroundColor="#aaaaaa",y.style.opacity=.5,y.style.filter="alpha(opacity=50)",this.nav.top.appendChild(p),this.shadow.list.push(p),o-=d+7-this.getColCount(),e=0,i++}},this.clearShadow=function(){if(this.shadow){for(var t=0;t<this.shadow.list.length;t++)this.nav.top.removeChild(this.shadow.list[t]);this.shadow=null,this.nav.top.style.cursor=""}},this.getEventTop=function(t,e){for(var i=this.headerHeight,n=0;n<t;n++)i+=this.rows[n].getHeight();return i+=this.cellHeaderHeight,i+=e*this.lineHeight()},this.getDateFromCell=function(t,e){return this.firstDate.addDays(7*e+t)},this.t=function(e){var i=e.cache||e.data,a=e.part.row,s=e.part.line,l=e.part.colStart,o=e.part.colWidth,r=this.getCellWidth()*l,h=this.getCellWidth()*o,c=this.getEventTop(a,s),d=document.createElement("div");d.setAttribute("unselectable","on"),d.style.height=this.eventHeight+"px",d.className=this.u("_event"),i.cssClass&&DayPilot.Util.addClass(d,i.cssClass),e.part.startsHere||DayPilot.Util.addClass(d,this.u("_event_continueleft")),e.part.endsHere||DayPilot.Util.addClass(d,this.u("_event_continueright")),d.event=e,d.style.width=h+"%",d.style.position="absolute",d.style.left=r+"%",d.style.top=c+"px",this.showToolTip&&e.client.toolTip()&&(d.title=e.client.toolTip()),d.onclick=n.w,d.oncontextmenu=n.z,d.onmousedown=function(i){i=i||window.event;var r=i.which||i.button;if(i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation(),1===r)if(t.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var h={};h.start={},h.start.x=l,h.start.y=a,h.event=d.event,h.width=DayPilot.DateUtil.daysSpan(h.event.start(),h.event.end())+1,h.direction=this.style.cursor,t.resizingEvent=h}else if("move"===this.style.cursor||e.client.moveEnabled()){n.clearShadow();var c=DayPilot.mo2(n.nav.top,i);if(!c)return;var v=n.getCellBelowPoint(c.x,c.y),u=DayPilot.DateUtil.daysDiff(e.start(),n.rows[a].start),f=7*v.y+v.x-(7*a+l);u&&(f+=u);var p={};p.start={},p.start.x=l,p.start.y=a,p.start.line=s,p.offset=n.eventMoveToPosition?0:f,p.colWidth=o,p.event=d.event,p.coords=c,t.movingEvent=p}},d.onmousemove=function(i){if("undefined"!=typeof t&&!t.movingEvent&&!t.resizingEvent){var n=DayPilot.mo3(d,i);if(n){d.deleteIcon&&(d.deleteIcon.style.display="");var a=6;n.x<=a&&e.client.resizeEnabled()?e.part.startsHere?(d.style.cursor="w-resize",d.dpBorder="left"):d.style.cursor="not-allowed":d.clientWidth-n.x<=a&&e.client.resizeEnabled()?e.part.endsHere?(d.style.cursor="e-resize",d.dpBorder="right"):d.style.cursor="not-allowed":e.client.clickEnabled()?d.style.cursor="pointer":d.style.cursor="default"}}},d.onmouseleave=function(t){d.deleteIcon&&(d.deleteIcon.style.display="none"),d.style.cursor=""},d.onmouseenter=function(t){d.deleteIcon&&(d.deleteIcon.style.display="")};var v=document.createElement("div");if(v.setAttribute("unselectable","on"),v.className=this.u("_event_inner"),"darker"===i.borderColor&&i.backColor?v.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):v.style.borderColor=i.borderColor,i.backColor&&(v.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(v.style.filter="")),i.fontColor&&(v.style.color=i.fontColor),v.innerHTML=e.client.html(),d.appendChild(v),e.client.barVisible()){var u=document.createElement("div");u.setAttribute("unselectable","on"),u.className=this.u("_event_bar"),u.style.position="absolute";var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.u("_event_bar_inner"),f.style.top="0%",f.style.height="100%",i.barColor&&(f.style.backgroundColor=i.barColor),u.appendChild(f),d.appendChild(u)}if(e.client.deleteEnabled()){var p=Math.floor(n.eventHeight/2-9),y=document.createElement("div");y.style.position="absolute",y.style.right="2px",y.style.top=p+"px",y.style.width="18px",y.style.height="18px",y.className=n.u("_event_delete"),y.onmousedown=function(t){t.stopPropagation()},y.onclick=function(t){t.stopPropagation();var e=this.parentNode.event;e&&n.A(e)},y.style.display="none",d.deleteIcon=y,d.appendChild(y)}var g=i.areas?DayPilot.Areas.copy(i.areas):[];DayPilot.Areas.attach(d,e,{"areas":g}),this.elements.events.push(d),this.nav.events.appendChild(d)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.c=function(){"string"==typeof this.startDate&&(this.startDate=new DayPilot.Date(this.startDate)),this.startDate=this.startDate.firstDayOfMonth(),this.firstDate=this.startDate.firstDayOfWeek(this.getWeekStart());var t,e=(this.startDate,this.lastVisibleDayOfMonth()),i=DayPilot.DateUtil.daysDiff(this.firstDate,e)+1;t=Math.ceil(i/7),this.days=7*t,this.rows=[];for(var a=0;a<t;a++){var s={};s.start=this.firstDate.addDays(7*a),s.end=s.start.addDays(this.getColCount()),s.events=[],s.lines=[],s.index=a,s.minHeight=this.cellHeight,s.calendar=this,s.belongsHere=function(t){return t.end().getTime()===t.start().getTime()&&t.start().getTime()===this.start.getTime()||!(t.end().getTime()<=this.start.getTime()||t.start().getTime()>=this.end.getTime())},s.getPartStart=function(t){return DayPilot.DateUtil.max(this.start,t.start())},s.getPartEnd=function(t){return DayPilot.DateUtil.min(this.end,t.end())},s.getStartColumn=function(t){var e=this.getPartStart(t);return DayPilot.DateUtil.daysDiff(this.start,e)},s.getWidth=function(t){return DayPilot.DateUtil.daysSpan(this.getPartStart(t),this.getPartEnd(t))+1},s.putIntoLine=function(t,e,i,n){for(var a=this,s=0;s<this.lines.length;s++){var l=this.lines[s];if(l.isFree(e,i))return l.addEvent(t,e,i,n,s),s}var l=[];return l.isFree=function(t,e){for(var i=!0,n=0;n<this.length;n++)t+e-1<this[n].part.colStart||t>this[n].part.colStart+this[n].part.colWidth-1||(i=!1);return i},l.addEvent=function(t,e,i,n,s){t.part.colStart=e,t.part.colWidth=i,t.part.row=n,t.part.line=s,t.part.startsHere=a.start.getTime()<=t.start().getTime(),t.part.endsHere=a.end.getTime()>=t.end().getTime(),this.push(t)},l.addEvent(t,e,i,n,this.lines.length),this.lines.push(l),this.lines.length-1},s.getStart=function(){for(var t=0,e=0;e<n.rows.length&&e<this.index;e++)t+=n.rows[e].getHeight()},s.getHeight=function(){return Math.max(this.lines.length*n.lineHeight()+n.cellHeaderHeight,this.calendar.cellHeight)},this.rows.push(s)}this.endDate=this.firstDate.addDays(7*t)},this.visibleStart=function(){return n.firstDate},this.visibleEnd=function(){return n.endDate},this.getHeight=function(){for(var t=this.headerHeight,e=0;e<this.rows.length;e++)t+=this.rows[e].getHeight();return t},this.getWidth=function(t,e){return 7*e.y+e.x-(7*t.y+t.x)+1},this.getMinCoords=function(t,e){return 7*t.y+t.x<7*e.y+e.x?t:e},this.u=function(t){var e=this.theme||this.cssClassPrefix;return e?e+t:""},this.B=function(){var e=this.nav.top;e.setAttribute("unselectable","on"),e.style.MozUserSelect="none",e.style.KhtmlUserSelect="none",e.style.WebkitUserSelect="none",e.style.position="relative",this.width&&(e.style.width=this.width),e.style.height=this.getHeight()+"px",e.onselectstart=function(t){return!1},this.hideUntilInit&&(e.style.visibility="hidden"),this.visible||(e.style.display="none"),e.className=this.u("_main");var i=document.createElement("div");this.nav.cells=i,i.style.position="absolute",i.style.left="0px",i.style.right="0px",i.setAttribute("unselectable","on"),e.appendChild(i);var a=document.createElement("div");this.nav.events=a,a.style.position="absolute",a.style.left="0px",a.style.right="0px",a.setAttribute("unselectable","on"),e.appendChild(a),e.onmousemove=function(e){if(t.resizingEvent){var i=DayPilot.mo2(n.nav.top,e);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var s,l,o=t.resizingEvent;o.start;if("w-resize"===o.direction){l=a;var r=o.event.end();r.getDatePart()===r&&(r=r.addDays(-1));var h=n.getCellFromDate(r);s=n.getWidth(a,h)}else l=n.getCellFromDate(o.event.start()),s=n.getWidth(l,a);s<1&&(s=1),n.drawShadow(l.x,l.y,0,s)}else if(t.movingEvent){var i=DayPilot.mo2(n.nav.top,e);if(!i)return;if(i.x===t.movingEvent.coords.x&&i.y===t.movingEvent.coords.y)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var c=t.movingEvent.event,d=t.movingEvent.offset,s=n.cellMode?1:DayPilot.DateUtil.daysSpan(c.start(),c.end())+1;s<1&&(s=1),n.drawShadow(a.x,a.y,0,s,d,c)}else if(t.timeRangeSelecting){var i=DayPilot.mo2(n.nav.top,e);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var l=t.timeRangeSelecting,v=7*l.y+l.x,u=7*a.y+a.x,s=Math.abs(u-v)+1;s<1&&(s=1);var f=v<u?l:a;t.timeRangeSelecting.from={x:f.x,y:f.y},t.timeRangeSelecting.width=s,t.timeRangeSelecting.moved=!0,n.drawShadow(f.x,f.y,0,s,0,null)}}},this.h=function(){this.nav.top.style.height=this.getHeight()+"px";for(var t=0;t<this.cells.length;t++)for(var e=0;e<this.cells[t].length;e++)this.cells[t][e].style.top=this.getRowTop(e)+"px",this.cells[t][e].style.height=this.rows[e].getHeight()+"px"},this.getCellBelowPoint=function(t,e){for(var i=Math.floor(this.nav.top.clientWidth/this.getColCount()),n=Math.min(Math.floor(t/i),this.getColCount()-1),a=null,s=this.headerHeight,l=0,o=0;o<this.rows.length;o++){var r=s;if(s+=this.rows[o].getHeight(),e<s){l=e-r,a=o;break}}null===a&&(a=this.rows.length-1);var h={};return h.x=n,h.y=a,h.relativeY=l,h},this.getCellFromDate=function(t){for(var e=DayPilot.DateUtil.daysDiff(this.firstDate,t),i={x:0,y:0};e>=7;)i.y++,e-=7;return i.x=e,i},this.g=function(){var t=document.createElement("div");t.oncontextmenu=function(){return!1},this.nav.cells.appendChild(t),this.cells=[];for(var e=0;e<this.getColCount();e++){this.cells[e]=[];var i=document.createElement("div");i.setAttribute("unselectable","on"),i.style.position="absolute",i.style.left=this.getCellWidth()*e+"%",i.style.width=this.getCellWidth()+"%",i.style.top="0px",i.style.height=this.headerHeight+"px";var n=e+this.getWeekStart();n>6&&(n-=7),i.className=this.u("_header");var s=document.createElement("div");s.setAttribute("unselectable","on"),s.innerHTML=a.locale().dayNames[n],i.appendChild(s),s.style.position="absolute",s.style.top="0px",s.style.bottom="0px",s.style.left="0px",s.style.right="0px",s.className=this.u("_header_inner"),s.innerHTML=a.locale().dayNames[n],t.appendChild(i);for(var l=0;l<this.rows.length;l++)this.C(e,l,t)}},this.f=function(){for(var t=0;t<this.cells.length;t++)for(var e=0;e<this.cells[t].length;e++)this.cells[t][e].onclick=null;this.nav.cells.innerHTML=""},this.D=function(){return 2===n.api},this.C=function(e,i,s){var l=this.rows[i],o=this.firstDate.addDays(7*i+e),r=document.createElement("div");if(r.setAttribute("unselectable","on"),r.style.position="absolute",r.style.cursor="default",r.style.left=this.getCellWidth()*e+"%",r.style.width=this.getCellWidth()+"%",r.style.top=this.getRowTop(i)+"px",r.style.height=l.getHeight()+"px",r.className=this.u("_cell"),!this.isWeekend(o)){var h=this.u("_cell_business");DayPilot.Util.addClass(r,h)}var c=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));c.setAttribute("unselectable","on"),r.appendChild(c),c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.top="0px",c.style.bottom="0px",c.className=this.u("_cell_inner"),r.onmousedown=function(a){"Disabled"!==n.timeRangeSelectedHandling&&(n.clearShadow(),t.timeRangeSelecting={"root":n,"x":e,"y":i,"from":{x:e,y:i},"width":1})},r.onclick=function(){var t=function(t){var e=new DayPilot.Date(t),i=e.addDays(1);n.E(e,i)};if("Disabled"!==n.timeRangeSelectedHandling)return void t(o)};var d=document.createElement("div");d.setAttribute("unselectable","on"),d.style.height=this.cellHeaderHeight+"px",d.className=this.u("_cell_header"),d.onclick=function(t){if("Enabled"===n.cellHeaderClickHandling){t.stopPropagation();var e={};e.control=n,e.start=o,e.end=o.addDays(1),e.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onCellHeaderClick&&(n.onCellHeaderClick(e),e.preventDefault.value)||"function"==typeof n.onCellHeaderClicked&&n.onCellHeaderClicked(e)}};var v=o.getDay();1===v?d.innerHTML=a.locale().monthNames[o.getMonth()]+" "+v:d.innerHTML=v,c.appendChild(d),this.cells[e][i]=r,s.appendChild(r)},this.getWeekStart=function(){return a.locale().weekStarts},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(t){for(var e=this.headerHeight,i=0;i<t;i++)e+=this.rows[i].getHeight();return e},this.F=function(t,e,i){var n={};n.action=t,n.parameters=i,n.data=e,n.header=this.G();var a="JSON"+DayPilot.JSON.stringify(n);this.backendUrl&&DayPilot.request(this.backendUrl,this.H,a,this.ajaxError)},this.H=function(t){n.a(t.responseText)},this.G=function(){var t={};return t.control="dpm",t.id=this.id,t.v=this.v,t.visibleStart=new DayPilot.Date(this.firstDate),t.visibleEnd=t.visibleStart.addDays(this.days),t.startDate=n.startDate,t.timeFormat=this.timeFormat,t.weekStarts=this.weekStarts,t},this.eventClickCallBack=function(t,e){this.F("EventClick",e,t)},this.w=function(e){t.movingEvent=null,t.resizingEvent=null;var i=this,e=e||window.event;e.ctrlKey;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),n.eventClickSingle(i,e)},this.eventClickSingle=function(t,e){var i=t.event;if(i.client.clickEnabled())if(n.D()){var a={};if(a.e=i,a.control=n,a.div=t,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.j.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"ContextMenu":var s=i.client.contextMenu();s?s.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.j.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.z=function(){var t=this;return n.I(t.event),!1},this.I=function(t){if(this.event=t,!t.client.rightClickEnabled())return!1;var e={};if(e.e=t,e.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof n.onEventRightClick||(n.onEventRightClick(e),!e.preventDefault.value)){switch(n.eventRightClickHandling){case"ContextMenu":var i=t.client.contextMenu();i?i.show(t):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(e),!1}},this.A=function(t){if(n.D()){var e={};if(e.e=t,e.control=n,e.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.j.apply(function(){n.onEventDelete(e)}),e.preventDefault.value))return;switch(n.eventDeleteHandling){case"CallBack":n.eventDeleteCallBack(t);break;case"PostBack":n.eventDeletePostBack(t);break;case"Update":n.events.remove(t)}"function"==typeof n.onEventDeleted&&n.j.apply(function(){n.onEventDeleted(e)})}else switch(n.eventDeleteHandling){case"PostBack":n.eventDeletePostBack(t);break;case"CallBack":n.eventDeleteCallBack(t);break;case"JavaScript":n.onEventDelete(t)}},this.eventDeleteCallBack=function(t,e){this.F("EventDelete",e,t)},this.eventDeletePostBack=function(t,e){this.J("EventDelete",e,t)},this.eventMoveCallBack=function(t,e,i,n,a){if(!e)throw"newStart is null";if(!i)throw"newEnd is null";var s={};s.e=t,s.newStart=e,s.newEnd=i,s.position=a,this.F("EventMove",n,s)},this.K=function(t,e,i,a,s,l){var o=t.start().getTimePart(),r=t.end().getDatePart();r!==t.end()&&(r=r.addDays(1));var h=DayPilot.DateUtil.diff(t.end(),r),c=this.getDateFromCell(e,i);c=c.addDays(-a);var d=DayPilot.DateUtil.daysSpan(t.start(),t.end())+1,v=c.addDays(d),u=c.addTime(o),f=v.addTime(h);if(n.D()){var p={};if(p.e=t,p.control=n,p.newStart=u,p.newEnd=f,p.ctrl=s.ctrlKey,p.shift=s.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.j.apply(function(){n.onEventMove(p)}),p.preventDefault.value))return;switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(t,u,f);break;case"Update":t.start(u),t.end(f),n.events.update(t)}"function"==typeof n.onEventMoved&&n.j.apply(function(){n.onEventMoved(p)})}else switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(t,u,f);break;case"JavaScript":n.onEventMove(t,u,f)}},this.eventResizeCallBack=function(t,e,i,n){if(!e)throw"newStart is null";if(!i)throw"newEnd is null";var a={};a.e=t,a.newStart=e,a.newEnd=i,this.F("EventResize",n,a)},this.L=function(t,e,i){var a=t.start().getTimePart(),s=t.end().getDatePart();s!==t.end()&&(s=s.addDays(1));var l=DayPilot.DateUtil.diff(t.end(),s),o=this.getDateFromCell(e.x,e.y),r=o.addDays(i),h=o.addTime(a),c=r.addTime(l);if(n.D()){var d={};if(d.e=t,d.control=n,d.newStart=h,d.newEnd=c,d.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.j.apply(function(){n.onEventResize(d)}),d.preventDefault.value))return;switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(t,h,c);break;case"Update":t.start(h),t.end(c),n.events.update(t)}"function"==typeof n.onEventResized&&n.j.apply(function(){n.onEventResized(d)})}else switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(t,h,c);break;case"JavaScript":n.onEventResize(t,h,c)}},this.timeRangeSelectedCallBack=function(t,e,i){var n={};n.start=t,n.end=e,this.F("TimeRangeSelected",i,n)},this.E=function(t,e){if(this.D()){var i={};if(i.control=n,i.start=t,i.end=e,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.j.apply(function(){n.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(t,e)}"function"==typeof n.onTimeRangeSelected&&n.j.apply(function(){n.onTimeRangeSelected(i)})}else switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(t,e);break;case"JavaScript":n.onTimeRangeSelected(t,e)}},this.j={},this.j.scope=null,this.j.notify=function(){n.j.scope&&n.j.scope["$apply"]()},this.j.apply=function(t){t()},this.clearSelection=function(){n.clearShadow()},this.commandCallBack=function(t,e){var i={};i.command=t,this.F("Command",e,i)},this.isWeekend=function(t){return t=new DayPilot.Date(t),0===t.dayOfWeek()||6===t.dayOfWeek()},this.M={},this.M.locale=function(){var t=DayPilot.Locale.find(n.locale);return t?t:DayPilot.Locale.US},this.M.N=function(){return"Disabled"!==n.xssProtection};var a=this.M;this.debug=function(t,e){this.debuggingEnabled&&(n.debugMessages||(n.debugMessages=[]),n.debugMessages.push(t),"undefined"!=typeof console&&console.log(t))},this.dispose=function(){var t=n;t.nav.top&&(t.b(),t.nav.top.removeAttribute("style"),t.nav.top.removeAttribute("class"),t.nav.top.innerHTML="",t.nav.top.dp=null,t.nav.top.onmousemove=null,t.nav.top=null)},this.O=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.m=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){n.visible=!0,n.nav.top.style.display=""},this.hide=function(){n.visible=!1,n.nav.top.style.display="none"},this.P=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Month() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Month: The placeholder element not found: '"+id+"'."}},this.Q=function(){this.c(),this.B(),this.g(),this.O(),this.F("Init")},this.R=function(t,e){return n.M.N()?DayPilot.Util.escapeTextHtml(t,e):DayPilot.Util.isNullOrUndefined(e)?DayPilot.Util.isNullOrUndefined(t)?"":t:e},this.internal={},this.internal.loadOptions=this.l,this.internal.xssTextHtml=n.R,this.init=function(){return this.P(),this.loadFromServer()?void this.Q():(this.c(),this.d(),this.B(),this.g(),this.m(),this.i(),this.O(),this.fireAfterRenderDetached(null,!1),this.k=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return n.eventBarVisible}}),this.l(i)},t.gMouseUp=function(e){if(t.movingEvent){var i=t.movingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var n=t.movingEvent.event.calendar,a=t.movingEvent.event,s=n.shadow.start,l=n.shadow.position,o=t.movingEvent.offset;n.clearShadow(),t.movingEvent=null;var e=e||window.event;return n.K(a,s.x,s.y,o,e,l),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),t.movingEvent=null,!1}if(t.resizingEvent){var i=t.resizingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var n=t.resizingEvent.event.calendar,a=t.resizingEvent.event,s=n.shadow.start,r=n.shadow.width;return n.clearShadow(),t.resizingEvent=null,n.L(a,s,r),e.cancelBubble=!0,t.resizingEvent=null,!1}if(t.timeRangeSelecting){if(t.timeRangeSelecting.moved){var h=t.timeRangeSelecting,n=h.root,s=new DayPilot.Date(n.getDateFromCell(h.from.x,h.from.y)),c=s.addDays(h.width);n.E(s,c),n.clearShadow()}t.timeRangeSelecting=null}},DayPilot.Month=t.Month,"undefined"!=typeof jQuery&&!function(t){t.fn.daypilotMonth=function(t){var e=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Month(this.id);this.daypilot=i;for(name in t)i[name]=t[name];i.Init(),e||(e=i)}});return 1===this.length?e:i}}(jQuery),function(){var t=DayPilot.am();t&&t.directive("daypilotMonth",["$parse",function(t){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(e,i,n){var a=new DayPilot.Month(i[0]);a.j.scope=e,a.init();var s=n["id"];s&&(e[s]=a);var l=n["publishAs"];if(l){(0,t(l).assign)(e,a)}for(var o in n)0===o.indexOf("on")&&!function(i){a[i]=function(a){var s=t(n[i]);e["$apply"](function(){s(e,{"args":a})})}}(o);var r=e["$watch"],h=n["config"]||n["daypilotConfig"],c=n["events"]||n["daypilotEvents"];r.call(e,h,function(t){for(var e in t)a[e]=t[e];a.update()},!0),r.call(e,c,function(t){a.events.list=t,a.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}();if("undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.nav){DayPilot.Navigator=function(t,e){this.v="2023.1.447-lite";var i=this;this.id=t,this.api=2,this.isNavigator=!0,this.autoFocusOnClick=!0,this.weekStarts="Auto",this.selectMode="Day",this.titleHeight=30,this.dayHeaderHeight=30,this.bound=null,this.cellWidth=30,this.cellHeight=30,this.cssClassPrefix="navigator_default",this.freeHandSelectionEnabled=!1,this.selectionStart=(new DayPilot.Date).getDatePart(),this.selectionEnd=null,this.selectionDay=null,this.showMonths=1,this.skipMonths=1,this.command="navigate",this.year=(new DayPilot.Date).getYear(),this.month=(new DayPilot.Date).getMonth()+1,this.showWeekNumbers=!1,this.weekNumberAlgorithm="Auto",this.rowsPerMonth="Six",this.orientation="Vertical",this.locale="en-us",this.rtl=!1,this.visible=!0,this.timeRangeSelectedHandling="Bind",this.visibleRangeChangedHandling="Enabled",this.onVisibleRangeChange=null,this.onVisibleRangeChanged=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.nav={},this.a={},this.b=function(){this.root.dp=this,this.root.className=this.c("_main"),"Horizontal"===this.orientation?(this.root.style.width=this.showMonths*(7*a.cellWidth()+this.d())+"px",this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):this.root.style.width=7*a.cellWidth()+this.d()+"px",this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var t=document.createElement("input");t.type="hidden",t.name=i.id+"_state",t.id=t.name,this.root.appendChild(t),this.state=t,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.e=function(){return 2===i.api},this.f=function(){this.root.innerHTML=""},this.c=function(t){var e=this.theme||this.cssClassPrefix;return e?e+t:""},this.g=function(t,e){var i=this.c("_"+e);DayPilot.Util.addClass(t,i)},this.h=function(t,e){var i=this.c("_"+e);DayPilot.Util.removeClass(t,i)},this.i=function(t,e){var s={};s.cells=[],s.days=[],s.weeks=[];var n=this.startDate.addMonths(t),l=e.before,o=e.after,h=n.firstDayOfMonth(),r=h.firstDayOfWeek(a.weekStarts()),c=h.addMonths(1),d=DayPilot.DateUtil.daysDiff(r,c),u="Auto"===this.rowsPerMonth?Math.ceil(d/7):6;s.rowCount=u;var f=(new DayPilot.Date).getDatePart(),y=7*a.cellWidth()+this.d();s.width=y;var p=this.cellHeight*u+this.titleHeight+this.dayHeaderHeight;s.height=p;var v=document.createElement("div");if(v.style.width=y+"px",v.style.height=p+"px","Horizontal"===this.orientation)v.style.position="absolute",v.style.left=y*t+"px",v.style.top="0px",s.top=0,s.left=y*t;else{v.style.position="relative";var g=t>0?i.months[t-1].top+i.months[t-1].height:0;s.top=g,s.left=0}v.className=this.c("_month"),v.style.cursor="default",v.style.MozUserSelect="none",v.style.KhtmlUserSelect="none",v.style.WebkitUserSelect="none",v.month=s,this.root.appendChild(v);var m=this.titleHeight+this.dayHeaderHeight,b=document.createElement("div");b.style.position="absolute",b.style.left="0px",b.style.right="0px",b.style.top="0px",b.style.width=a.cellWidth()+"px",b.style.height=this.titleHeight+"px",b.style.lineHeight=this.titleHeight+"px",b.setAttribute("unselectable","on"),b.className=this.c("_titleleft"),e.left&&(b.style.cursor="pointer",b.innerHTML="<span><</span>",b.onclick=this.j),v.appendChild(b),this.tl=b;var D=document.createElement("div");D.style.position="absolute",D.style.left=a.cellWidth()+"px",D.style.top="0px",D.style.width=5*a.cellWidth()+this.d()+"px",D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.c("_title"),D.innerHTML=a.locale().monthNames[n.getMonth()]+" "+n.getYear(),v.appendChild(D),this.ti=D;var x=document.createElement("div");x.style.position="absolute",x.style.left=6*a.cellWidth()+this.d()+"px",x.style.right=6*a.cellWidth()+this.d()+"px",x.style.top="0px",x.style.width=a.cellWidth()+"px",x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.c("_titleright"),e.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.k),v.appendChild(x),this.tr=x;var w=this.d();if(this.showWeekNumbers)for(var k=0;k<u;k++){var S=r.addDays(7*k),C=null;switch(this.weekNumberAlgorithm){case"Auto":C=1===a.weekStarts()?S.weekNumberISO():S.weekNumber();break;case"US":C=S.weekNumber();break;case"ISO8601":C=S.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var H=document.createElement("div");H.style.position="absolute",H.style.left="0px",H.style.right="0px",H.style.top=k*this.cellHeight+m+"px",H.style.width=a.cellWidth()+"px",H.style.height=this.cellHeight+"px",H.style.lineHeight=this.cellHeight+"px",H.setAttribute("unselectable","on"),H.className=this.c("_weeknumber"),H.innerHTML="<span>"+C+"</span>",v.appendChild(H),s.weeks.push(H)}for(var M=0;M<7;M++){s.cells[M]=[];var H=document.createElement("div");H.style.position="absolute",H.style.left=M*a.cellWidth()+w+"px",H.style.right=M*a.cellWidth()+w+"px",H.style.top=this.titleHeight+"px",H.style.width=a.cellWidth()+"px",H.style.height=this.dayHeaderHeight+"px",H.style.lineHeight=this.dayHeaderHeight+"px",H.setAttribute("unselectable","on"),H.className=this.c("_dayheader"),H.innerHTML="<span>"+this.l(M)+"</span>",v.appendChild(H),s.days.push(H);for(var k=0;k<u;k++){var S=r.addDays(7*k+M),P=this.m(S)&&"none"!==this.n(),E=S.firstDayOfMonth()===n,N=S<n,W=S>=n.addMonths(1);if("month"===this.n())P=P&&E;else if("day"===this.n())P=P&&(E||l&&N||o&&W);else if("week"===this.n()){var O=S.firstDayOfMonth()===n;P=P&&(O||l&&N||o&&W)}var R=document.createElement("div");s.cells[M][k]=R;var T=i.o(M,k),A=T.x,B=T.y;R.day=S,R.x=M,R.y=k,R.left=A,R.top=B,R.isCurrentMonth=E,R.isNextMonth=W,R.isPrevMonth=N,R.showBefore=l,R.showAfter=o,R.className=this.c(E?"_day":"_dayother"),i.g(R,"cell"),S.getTime()===f.getTime()&&E&&this.g(R,"today"),0!==S.dayOfWeek()&&6!==S.dayOfWeek()||this.g(R,"weekend"),R.style.position="absolute",R.style.left=A+"px",R.style.right=A+"px",R.style.top=B+"px",R.style.width=a.cellWidth()+"px",R.style.height=this.cellHeight+"px",R.style.lineHeight=this.cellHeight+"px";var _=document.createElement("div");_.style.position="absolute",_.className=S.getTime()===f.getTime()&&E?this.c("_todaybox"):this.c("_daybox"),i.g(_,"cell_box"),_.style.left="0px",_.style.top="0px",_.style.right="0px",_.style.bottom="0px",R.appendChild(_);var U=null;if(this.cells&&this.cells[S.toStringSortable()]&&(U=this.cells[S.toStringSortable()]),"function"==typeof i.onBeforeCellRender){var I={};I.cell=U||{},I.cell.day=S,I.cell.isCurrentMonth=E,I.cell.isToday=S.getTime()===f.getTime()&&E,I.cell.isWeekend=0===S.dayOfWeek()||6===S.dayOfWeek(),U?(I.cell.html=U.html||S.getDay(),I.cell.cssClass=U.css):(I.cell.html=S.getDay(),I.cell.cssClass=null),i.onBeforeCellRender(I),U=I.cell}if(U&&DayPilot.Util.addClass(R,U.cssClass||U.css),E||l&&N||o&&W){var L=document.createElement("div");L.innerHTML=S.getDay(),L.style.position="absolute",L.style.left="0px",L.style.top="0px",L.style.right="0px",L.style.bottom="0px",i.g(L,"cell_text"),R.isClickable=!0,U&&U.html&&(L.innerHTML=U.html),R.appendChild(L)}R.setAttribute("unselectable","on"),R.onclick=this.p,v.appendChild(R),P&&(i.q(v,M,k),this.selected.push(R))}}var V=document.createElement("div");V.style.position="absolute",V.style.left="0px",V.style.top=m-2+"px",V.style.width=7*a.cellWidth()+this.d()+"px",V.style.height="1px",V.style.fontSize="1px",V.style.lineHeight="1px",V.className=this.c("_line"),v.appendChild(V),this.months.push(s)},this.o=function(t,e){var i=this.titleHeight+this.dayHeaderHeight,s=this.d();return{"x":t*a.cellWidth()+s,"y":e*this.cellHeight+i}},this.q=function(t,e,s){var n=t.month.cells[e][s];i.g(n,"select")},this.r=function(t,e,s){var n=t.month.cells[e][s];i.h(n,"select")},this.d=function(){return this.showWeekNumbers?a.cellWidth():0},this.s=function(){if(this.items)for(var t=0;t<this.showMonths;t++)for(var e=0;e<7;e++)for(var i=0;i<6;i++){var s=this.months[t].cells[e][i];s&&(1===this.items[s.day.toStringSortable()]?(this.g(s,"busy"),this.h(s,"free")):(this.h(s,"busy"),this.g(s,"free")))}},this.t=function(){var t={};t.startDate=i.startDate,t.selectionStart=i.selectionStart,t.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(t)},this.n=function(){return(this.selectMode||"").toLowerCase()},this.u=function(){var t=this.selectionDay||this.selectionStart;switch(t||(t=DayPilot.Date.today()),t=new DayPilot.Date(t),this.n()){case"day":this.selectionStart=t,this.selectionDay=t,this.selectionEnd=t;break;case"week":this.selectionDay=t,this.selectionStart=t.firstDayOfWeek(a.weekStarts()),this.selectionEnd=this.selectionStart.addDays(6);break;case"month":this.selectionDay=t,this.selectionStart=t.firstDayOfMonth(),this.selectionEnd=this.selectionStart.lastDayOfMonth();break;case"none":this.selectionEnd=t;break;default:throw"Unknown selectMode value."}},this.w=null,this.select=function(t,e,s){var n=e&&(e instanceof DayPilot.Date||"string"==typeof e),a=e&&"object"==typeof e||"boolean"==typeof e,l=t,o=n?e:null,h=a?e:s;if(!this.z)return void(this.w={"date1":l,"date2":o,"options":h});var r=!0,c=!0;h&&"object"==typeof h?(h.dontFocus&&(r=!1),h.dontNotify&&(c=!1)):"boolean"==typeof h&&(r=!h);var d=this.selectionStart,u=this.selectionEnd;this.selectionStart=new DayPilot.Date(l).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(r){var y=this.startDate;(this.selectionStart<this.A()||this.selectionStart>=this.B())&&(y=this.selectionStart.firstDayOfMonth()),y.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=y}o&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(o):this.u(),this.f(),this.b(),this.C(),this.s(),this.t(),!c||d.equals(this.selectionStart)&&u.equals(this.selectionEnd)||this.D(),f&&this.E()},this.update=function(t){if(i.F(t),this.z){if(i.G)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.H();var e={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.I(),e.start===i.selectionStart&&e.end==i.selectionEnd&&e.day===i.selectionDay||i.D()}},this.I=function(){this.f(),this.b(),this.u(),this.C(),this.J(),this.s(),this.t(),this.visible?this.show():this.hide()},this.H=function(){i.a={}},this.K=null,this.F=function(t){if(t){var e={"events":{"preInit":function(){var t=this.data||[];DayPilot.isArray(t.list)?i.events.list=t.list:i.events.list=t}}};this.K=e;for(var s in t)if(e[s]){var n=e[s];n.data=t[s],n.preInit&&n.preInit()}else i[s]=t[s]}},this.L=function(){var t=this.K;for(var e in t){var i=t[e];i.postInit&&i.postInit()}},this.M=function(t,e,i){var s={};s.action=t,s.parameters=i,s.data=e,s.header=this.N();var n="JSON"+JSON.stringify(s);this.backendUrl?DayPilot.request(this.backendUrl,this.O,n,this.P):WebForm_DoCallback(this.uniqueID,n,this.Q,null,this.callbackError,!0)},this.P=function(t){if("function"==typeof i.onAjaxError){var e={};e.request=t,i.onAjaxError(e)}else"function"==typeof i.ajaxError&&i.ajaxError(t)},this.O=function(t){i.Q(t.responseText)},this.R=function(t,e,s){var n={};n.action=t,n.parameters=s,n.data=e,n.header=this.N();var a="JSON"+JSON.stringify(n);__doPostBack(i.uniqueID,a)},this.N=function(){var t={};return t.v=this.v,t.startDate=this.startDate,t.selectionStart=this.selectionStart,t.showMonths=this.showMonths,t},this.S=function(t,e){"refresh"===t&&this.E()},this.l=function(t){var e=t+a.weekStarts();return e>6&&(e-=7),a.locale().dayNamesShort[e]},this.m=function(t){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=t.getTime()&&t.getTime()<=this.selectionEnd.getTime())},this.T=function(t){for(var e=0;e<i.months.length;e++){var s=i.months[e];if(!s)return null;if(t.x<s.left||s.width<t.x)return null;i.months[e].height;if(s.top<=t.y&&t.y<s.top+s.height)return e}return null},this.U=function(t){var e=DayPilot.mo3(i.nav.top,t),s=i.T(e);if(null===s)return null;var n=i.months[s],a=this.titleHeight+this.dayHeaderHeight;if(n.top<=e.y&&e.y<n.top+a)return{"month":s,"x":0,"y":0,"coords":e,"header":!0};for(var l=0;l<n.cells.length;l++)for(var o=0;o<n.cells[l].length;o++){var h=n.cells[l][o],r=h.top+n.top,c=h.left+n.left;if(c<=e.x&&e.x<c+i.cellWidth&&r<=e.y&&e.y<r+i.cellHeight)return{"month":s,"x":l,"y":o,"coords":e}}return null},this.V=function(t){if(i.freeHandSelectionEnabled){var e=i.U(t);e&&!e.header&&(s.start=e),i.months[e.month].cells[e.x][e.y],t.preventDefault()}},this.W=function(t){if(s.start){var e=i.U(t);if(s.end)s.end=e;else if(e){var n=3,a=DayPilot.distance(s.start.coords,e.coords);a>n&&(s.end=e)}s.end&&(s.clear(),s.draw())}},this.X={};var s=this.X;s.start=null,s.drawCell=function(t){var e=i.months[t.month],n=i.o(t.x,t.y),a=e.top+n.y,l=e.left+n.x,o=document.createElement("div");o.style.position="absolute",o.style.left=l+"px",o.style.top=a+"px",o.style.height=i.cellHeight+"px",o.style.width=i.cellWidth+"px",o.style.backgroundColor="#ccc",o.style.opacity=.5,o.style.cursor="default",i.nav.preselection.appendChild(o),s.cells.push(o)},s.clear=function(){if(s.cells){for(var t=0;t<s.cells.length;t++)i.nav.preselection.removeChild(s.cells[t]);s.cells=[]}},s.draw=function(){var t=s.ordered(),e=new n(t.start),a=t.end;if(a){if(a===s.end&&a.header&&a.month>0){a.month-=1;var l=i.months[a.month];a.x=6,a.y=l.rowCount-1}for(s.cells=[];!e.is(a);){s.drawCell(e);var o=new n(e).next();if(!o)return;e.month=o.month,e.x=o.x,e.y=o.y}s.drawCell(e)}},s.ordered=function(){var t=s.start,e=s.end,i={};return!e||new n(t).before(e)?(i.start=t,i.end=e):(i.start=e,i.end=t),i};var n=function(t,e,s){if(t instanceof n)return t;if("object"==typeof t){var a=t;this.month=a.month,this.x=a.x,this.y=a.y}else this.month=t,this.x=e,this.y=s;this.is=function(t){return this.month===t.month&&this.x===t.x&&this.y===t.y},this.next=function(){var t=this;if(t.x<6)return{"month":t.month,"x":t.x+1,"y":t.y};var e=i.months[t.month];return t.y<e.rowCount-1?{"month":t.month,"x":0,"y":t.y+1}:t.month<i.months.length-1?{"month":t.month+1,"x":0,"y":0}:null},this.visible=function(){var t=this.cell();return!!t.isCurrentMonth||(!(!t.isPrevMonth||!t.showBefore)||!(!t.isNextMonth||!t.showAfter))},this.nextVisible=function(){for(var t=this;!t.visible();){var e=t.next();if(!e)return null;t=new n(e)}return t},this.previous=function(){var t=this;if(t.x>0)return{"month":t.month,"x":t.x-1,"y":t.y};i.months[t.month];if(t.y>0)return{"month":t.month,"x":6,"y":t.y-1};if(t.month>0){var e=i.months[t.month-1];return{"month":t.month-1,"x":6,"y":e.rowCount-1}}return null},this.previousVisible=function(){for(var t=this;!t.visible();){var e=t.previous();if(!e)return null;t=new n(e)}return t},this.cell=function(){return i.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(t){return this.date()<new n(t).date()}};this.p=function(t){var e=this.parentNode,s=this.parentNode.month,n=this.x,a=this.y,l=s.cells[n][a].day;if(s.cells[n][a].isClickable){i.clearSelection(),i.selectionDay=l;var l=i.selectionDay;switch(i.n()){case"none":i.selectionStart=l,i.selectionEnd=l;break;case"day":if(i.autoFocusOnClick){var o=l;if(l<i.A()||l>=i.B())return void i.select(l)}var h=s.cells[n][a];i.q(e,n,a),i.selected.push(h),i.selectionStart=h.day,i.selectionEnd=h.day;break;case"week":if(i.autoFocusOnClick){var o=s.cells[0][a].day,r=s.cells[6][a].day;if(o.firstDayOfMonth()===r.firstDayOfMonth()&&(o<i.A()||r>=i.B()))return void i.select(l)}for(var c=0;c<7;c++)i.q(e,c,a),i.selected.push(s.cells[c][a]);i.selectionStart=s.cells[0][a].day,i.selectionEnd=s.cells[6][a].day;break;case"month":if(i.autoFocusOnClick){var o=l;if(l<i.A()||l>=i.B())return void i.select(l)}for(var o=null,r=null,a=0;a<6;a++)for(var n=0;n<7;n++){var h=s.cells[n][a];h&&h.day.getYear()===l.getYear()&&h.day.getMonth()===l.getMonth()&&(i.q(e,n,a),i.selected.push(h),null===o&&(o=h.day),r=h.day)}i.selectionStart=o,i.selectionEnd=r;break;default:throw"unknown selectMode"}i.t(),i.D()}},this.D=function(t){var e=i.selectionStart,s=i.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(e,s),a=i.selectionDay;if(t=t||{},i.e()){var l={};if(l.start=e,l.end=s,l.day=a,l.days=n,l.mode=t.mode||i.selectMode,l.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(l),l.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var o={};o.start=e,o.end=s,o.days=n,o.day=a,bound.commandCallBack(i.command,o)}break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(e,s,a)}"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(l)}else switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var o={};o.start=e,o.end=s,o.days=n,o.day=a,bound.commandCallBack(i.command,o)}break;case"JavaScript":i.onTimeRangeSelected(e,s,a);break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(e,s,a)}},this.timeRangeSelectedPostBack=function(t,e,i,s){var n={};n.start=t,n.end=e,n.day=s,this.R("TimeRangeSelected",i,n)},this.k=function(t){i.Y(i.skipMonths)},this.j=function(t){i.Y(-i.skipMonths)},this.Y=function(t){this.startDate=this.startDate.addMonths(t),this.f(),this.b(),this.C(),this.t(),this.E(),this.s()},this.A=function(){return i.startDate.firstDayOfMonth()},this.B=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return i.startDate.firstDayOfMonth().firstDayOfWeek(a.weekStarts())},this.visibleEnd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(a.weekStarts()).addDays(42)},this.E=function(){var t=this.visibleStart(),e=this.visibleEnd();if(i.e()){var s={};if(s.start=t,s.end=e,s.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onVisibleRangeChange&&(i.onVisibleRangeChange(s),s.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof i.onVisibleRangeChanged&&i.onVisibleRangeChanged(s)}else switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"JavaScript":this.onVisibleRangeChanged(t,e);break;case"Disabled":}},this.visibleRangeChangedCallBack=function(t){var e={};this.M("Visible",t,e)},this.visibleRangeChangedPostBack=function(t){var e={};this.R("Visible",t,e)},this.Q=function(t,e){var t=JSON.parse(t);i.items=t.Items,i.cells=t.Cells,i.cells?i.update():i.s()},this.C=function(){for(var t=0;t<this.showMonths;t++){var e=this.Z(t);this.i(t,e)}this.root.style.height=this.$()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.$=function(){if("Horizontal"===this.orientation){for(var t=0,e=0;e<this.months.length;e++){var i=this.months[e];i.height>t&&(t=i.height)}return t}for(var s=0,e=0;e<this.months.length;e++){var i=this.months[e];s+=i.height}return s},this.Z=function(t){if(this.internal.showLinks)return this.internal.showLinks;var e={};return e.left=0===t,e.right=0===t,e.before=0===t,e.after=t===this.showMonths-1,"Horizontal"===this.orientation&&(e.right=t===this.showMonths-1),e},this._={},this._.scope=null,this._.notify=function(){i._.scope&&i._.scope["$apply"]()},this.internal={},this.internal.loadOptions=i.F,this.internal.initialized=function(){return i.z},this.aa={};var a=this.aa;a.locale=function(){return DayPilot.Locale.find(i.locale)},a.weekStarts=function(){if("Auto"===i.weekStarts){var t=a.locale();return t?t.weekStarts:0}return i.weekStarts},a.cellWidth=function(){if(i.a.cellWidth)return i.a.cellWidth;var t=i.ba("_cell_dimensions").width;return t||(t=i.cellWidth),i.a.cellWidth=t,t},this.clearSelection=function(){for(var t=0;t<this.selected.length;t++){var e=this.selected[t];i.r(e.parentNode,e.x,e.y)}this.selected=[]},this.ca=function(){return!!this.backendUrl&&("undefined"==typeof i.items||!i.items)},this.events={},this.J=function(){if(DayPilot.isArray(this.events.list)){this.items={};for(var t=0;t<this.events.list.length;t++){var e=this.events.list[t];if(!e.hidden){var i=this.da(e);for(var s in i)this.items[s]=1}}}},this.ba=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.top="-2000px",e.style.left="-2000px",e.className=this.c(t);var s=i.root||document.body;s.appendChild(e);var n=e.offsetHeight,a=e.offsetWidth;s.removeChild(e);var l={};return l.height=n,l.width=a,l},this.da=function(t){for(var e=new DayPilot.Date(t.start),i=new DayPilot.Date(t.end),s={},n=e.getDatePart();n.getTime()<i.getTime();)s[n.toStringSortable()]=1,n=n.addDays(1);return s},this.show=function(){i.visible=!0,i.root.style.display=""},this.hide=function(){i.visible=!1,i.root.style.display="none"},this.ea=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Navigator() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Navigator: The placeholder element not found: '"+t+"'."}this.root=this.nav.top},this.init=function(){if(this.ea(),!this.root.dp){this.u(),this.b(),this.C(),this.J(),this.s(),this.fa(),this.ga(),this.ha();if(this.ca()&&this.E(),this.z=!0,this.L(),this.w){var t=this.w;this.select(t.date1,t.date2,t.options),this.w=null}return this}},this.ga=function(){i.nav.top.onmousedown=this.V,i.nav.top.onmousemove=this.W},this.ha=function(){DayPilot.re(document,"mouseup",i.ia)},this.ia=function(t){if(s.start&&s.end){var e=DayPilot.mo3(i.nav.top,t);if(e.x===s.start.coords.x&&e.y===s.start.coords.y)return s.start=null,void s.clear();s.clear();var a=s.ordered();a.start=new n(a.start).nextVisible(),a.end=new n(a.end).previousVisible(),i.selectionDay=new n(a.start).date(),i.selectionStart=i.selectionDay,i.selectionEnd=new n(a.end).date(),s.start=null,s.end=null,i.f(),i.b(),i.C(),i.s(),i.t();i.D({"mode":"FreeHand"})}s.start=null,s.end=null},this.dispose=function(){var t=i;t.root&&(t.root.removeAttribute("style"),t.root.removeAttribute("class"),t.root.dp=null,t.root.innerHTML=null,t.root=null,t.G=!0)},this.fa=function(){this.root.dispose=this.dispose},this.Init=this.init,this.F(e)},"undefined"!=typeof jQuery&&!function(t){t.fn.daypilotNavigator=function(t){var e=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Navigator(this.id);this.daypilot=i;for(var s in t)i[s]=t[s];i.Init(),e||(e=i)}});return 1===this.length?e:i}}(jQuery),function(){var t=DayPilot.am();t&&t.directive("daypilotNavigator",["$parse",function(t){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(e,i){return e.replaceWith(this["template"].replace("{{id}}",i["id"])),function(e,i,s){var n=new DayPilot.Navigator(i[0]);n._.scope=e,n.init();var a=s["id"];a&&(e[a]=n);var l=s["publishAs"];if(l){(0,t(l).assign)(e,n)}for(var o in s)if(0===o.indexOf("on")){var h=DayPilot.Util.shouldApply(o);h?!function(i){n[i]=function(n){var a=t(s[i]);e["$apply"](function(){a(e,{"args":n})})}}(o):!function(i){n[i]=function(n){t(s[i])(e,{"args":n})}}(o)}var r=e["$watch"],c=s["config"]||s["daypilotConfig"],d=s["events"]||s["daypilotEvents"];r.call(e,c,function(t,e){for(var i in t)n[i]=t[i];n.update()},!0),r.call(e,d,function(t){n.events.list=t,n.J(),n.s()},!0)}}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}();!function(){var t="undefined"!=typeof t?t:require("vue"),n="function"==typeof t.h,o=n&&t.version&&!t.version.startsWith("2"),i={};o?(i.DayPilotCalendar={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Calendar(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}},i.DayPilotMonth={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Month(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}},i.DayPilotNavigator={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Navigator(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}}):(i.DayPilotCalendar={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Calendar(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},i.DayPilotMonth={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Month(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},i.DayPilotNavigator={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Navigator(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}}),module.exports={DayPilot:DayPilot,DayPilotCalendar:i.DayPilotCalendar,DayPilotMonth:i.DayPilotMonth,DayPilotNavigator:i.DayPilotNavigator}}();
|
|
8
|
+
if("undefined"==typeof DayPilot)var DayPilot={};if(function(){function e(e){var t=DayPilot.Date.Cache.Ticks;if(t[e])return DayPilot.Stats.cacheHitsTicks+=1,t[e];var i,a=new Date(e),n=a.getUTCMilliseconds();i=0===n?"":n<10?".00"+n:n<100?".0"+n:"."+n;var o=a.getUTCSeconds();o<10&&(o="0"+o);var r=a.getUTCMinutes();r<10&&(r="0"+r);var s=a.getUTCHours();s<10&&(s="0"+s);var l=a.getUTCDate();l<10&&(l="0"+l);var d=a.getUTCMonth()+1;d<10&&(d="0"+d);var c=a.getUTCFullYear();if(c<=0)throw"The minimum year supported is 1.";c<10?c="000"+c:c<100?c="00"+c:c<1e3&&(c="0"+c);var u=c+"-"+d+"-"+l+"T"+s+":"+r+":"+o+i;return t[e]=u,u}function t(e,t){return!DayPilot.Util.isNullOrUndefined(e)&&(!DayPilot.Util.isNullOrUndefined(t)&&e.toLocaleLowerCase()===t.toLocaleLowerCase())}function i(e){e=Math.min(e,255),e=Math.max(e,0);var t=e.toString(16);return e<16?"0"+t:t}if("undefined"==typeof DayPilot.$){"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),DayPilot.$=function(e){return document.getElementById(e)},DayPilot.isKhtml=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("KHTML")!==-1,DayPilot.isIE=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,DayPilot.mo2=function(e,t){if(t=t||window.event,"undefined"!=typeof t.offsetX){var i={x:t.offsetX+1,y:t.offsetY+1};if(!e)return i;for(var a=t.srcElement;a&&a!==e;)"SPAN"!==a.tagName&&(i.x+=a.offsetLeft,a.offsetTop>0&&(i.y+=a.offsetTop-a.scrollTop)),a=a.offsetParent;return a?i:null}if("undefined"!=typeof t.layerX){var i={x:t.layerX,y:t.layerY,src:t.target};if(!e)return i;for(var a=t.target;a&&"absolute"!==a.style.position&&"relative"!==a.style.position;)a=a.parentNode,DayPilot.isKhtml&&(i.y+=a.scrollTop);for(;a&&a!==e;)i.x+=a.offsetLeft,i.y+=a.offsetTop-a.scrollTop,a=a.offsetParent;return a?i:null}return null},DayPilot.mo3=function(e,t){var i,a=DayPilot.page(t);if(a)if(e){var n=DayPilot.abs(e);if(!n)throw new Error("no abs");i={x:a.x-n.x,y:a.y-n.y}}else i={x:a.x,y:a.y};else if(i=DayPilot.mo2(e,t),!i)return null;return i.shift=t.shiftKey,i.meta=t.metaKey,i.ctrl=t.ctrlKey,i.alt=t.altKey,i},DayPilot.browser={},DayPilot.browser.ie9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.ielt9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if lt IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.hover=!window.matchMedia("(any-hover: none)").matches,DayPilot.touch={},DayPilot.page=function(e){var t=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0]:e;return"undefined"==typeof t.pageX||DayPilot.browser.ie?"undefined"!=typeof e.clientX&&document.body&&document.documentElement?{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop}:null:{x:t.pageX,y:t.pageY}},DayPilot.abs=function(e,t){if(!e)return null;if(e.getBoundingClientRect){var i=DayPilot.absBoundingClientBased(e);if(t){var a=DayPilot.absOffsetBased(e,!1),t=DayPilot.absOffsetBased(e,!0);i.x+=t.x-a.x,i.y+=t.y-a.y,i.w=t.w,i.h=t.h}return i}return DayPilot.absOffsetBased(e,t)},DayPilot.absBoundingClientBased=function(e){var t=e.getBoundingClientRect();return{x:t.left+window.pageXOffset,y:t.top+window.pageYOffset,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}}},DayPilot.absOffsetBased=function(e,t){for(var i={x:e.offsetLeft,y:e.offsetTop,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}};e.offsetParent;)e=e.offsetParent,i.x-=e.scrollLeft,i.y-=e.scrollTop,t&&(i.x<0&&(i.w+=i.x,i.x=0),i.y<0&&(i.h+=i.y,i.y=0),e.scrollLeft>0&&i.x+i.w>e.clientWidth&&(i.w-=i.x+i.w-e.clientWidth),e.scrollTop&&i.y+i.h>e.clientHeight&&(i.h-=i.y+i.h-e.clientHeight)),i.x+=e.offsetLeft,i.y+=e.offsetTop;var a=DayPilot.pageOffset();return i.x+=a.x,i.y+=a.y,i},DayPilot.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},DayPilot.distance=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},DayPilot.sheet=function(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,i={};return i.rules=[],i.commit=function(){t&&(e.styleSheet.cssText=this.rules.join("\n"))},i.add=function(i,a,n){return t?void this.rules.push(i+"{"+a+"}"):void(e.sheet.insertRule?("undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(i+"{"+a+"}",n)):e.sheet.addRule&&e.sheet.addRule(i,a,n))},i},DayPilot.gs=function(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)||""},DayPilot.StyleReader=function(e){this.get=function(t){return e?DayPilot.gs(e,t):null},this.getPx=function(e){var t=this.get(e);return t.indexOf("px")===-1?void 0:parseInt(t,10)}},function(){if(!DayPilot.Global.defaultCss){var e=DayPilot.sheet();e.add(".calendar_default_main","border: 1px solid #c0c0c0; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after","box-sizing: content-box;"),e.add(".calendar_default_rowheader_inner,.calendar_default_cornerright_inner,.calendar_default_corner_inner,.calendar_default_colheader_inner,.calendar_default_alldayheader_inner","color: #333;background: #f3f3f3;"),e.add(".calendar_default_cornerright_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\tborder-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_direction_rtl .calendar_default_cornerright_inner","border-right: 1px solid #c0c0c0;"),e.add(".calendar_default_rowheader_inner","font-size: 16pt;text-align: right; position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; padding: 3px;"),e.add(".calendar_default_direction_rtl .calendar_default_rowheader_inner","border-right: none;"),e.add(".calendar_default_corner_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_direction_rtl .calendar_default_corner_inner","border-right: none;"),e.add(".calendar_default_rowheader_minutes","font-size:10px;vertical-align: super;padding-left: 2px;padding-right: 2px;"),e.add(".calendar_default_colheader_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; display: flex; align-items: center; justify-content: center; font-size: 13px;"),e.add(".calendar_default_cell_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd; background: #f9f9f9;"),e.add(".calendar_default_cell_business .calendar_default_cell_inner","background: #fff"),e.add(".calendar_default_alldayheader_inner","text-align: center;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_message","opacity: 0.9; padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner","color: #333; border: 1px solid #999;"),e.add(".calendar_default_event_bar","top: 0px;bottom: 0px;left: 0px;width: 6px;background-color: #9dc8e8;"),e.add(".calendar_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner",'background: #fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_selected .calendar_default_event_inner","background: #ddd;"),e.add(".calendar_default_alldayevent_inner","position: absolute;top: 2px;bottom: 2px;left: 2px;right: 2px;overflow:hidden;padding: 2px;margin-right: 1px; font-size: 13px;"),e.add(".calendar_default_event_withheader .calendar_default_event_inner","padding-top: 15px;"),e.add(".calendar_default_event","cursor: default;"),e.add(".calendar_default_event_inner","position: absolute;overflow: hidden;top: 0px;bottom: 0px;left: 0px;right: 0px;padding: 2px 2px 2px 8px; font-size: 13px;"),e.add(".calendar_default_shadow_inner","position:absolute;top:0px;left:0px;right:0px;bottom:0px;background-color: #666666; opacity: 0.5;"),e.add(".calendar_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".calendar_default_event_delete:hover","opacity: 1;-ms-filter: none;"),e.add(".calendar_default_scroll_up","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAB3RJTUUH2wESDiYcrhwCiQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAARnQU1BAACxjwv8YQUAAACcSURBVHjaY2AgF9wWsTW6yGMlhi7OhC7AyMDQzMnBXIpFHAFuCtuaMTP+P8nA8P/b1x//FfW/HHuF1UQmxv+NUP1c3OxMVVhNvCVi683E8H8LXOY/w9+fTH81tF8fv4NiIpBRj+YoZtZ/LDUoJmKYhsVUpv0MDiyMDP96sIYV0FS2/8z9ICaLlOhvS4b/jC//MzC8xBG0vJeF7GQBlK0xdiUzCtsAAAAASUVORK5CYII=);"),e.add(".calendar_default_scroll_down","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAACqSURBVChTY7wpam3L9J+xmQEP+PGPKZZxP4MDi4zI78uMDIwa2NT+Z2DYovrmiC+TI8OBP/8ZmEqwGvif4e8vxr+FIDkmEKH25vBWBgbG0+iK/zEwLtF+ffwOXCGI8Y+BoRFFIdC030x/WmBiYBNhpgLdswNJ8RSYaSgmgk39z1gPUfj/29ef/9rwhQTDHRHbrbdEbLvRFcGthkkAra/9/uMvhkK8piNLAgCRpTnNn4AEmAAAAABJRU5ErkJggg==);"),e.add(".calendar_default_now","background-color: red;"),e.add(".calendar_default_now:before","content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent red; border-style: solid; width: 0px; height:0px; position: absolute; -moz-transform: scale(.9999);"),e.add(".calendar_default_shadow_forbidden .calendar_default_shadow_inner","background-color: red;"),e.add(".calendar_default_shadow_top",'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_shadow_bottom",'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_crosshair_vertical, .calendar_default_crosshair_horizontal, .calendar_default_crosshair_left, .calendar_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".calendar_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".calendar_default_scroll","background-color: #f3f3f3;"),e.add(".calendar_default_event_moving_source","opacity: 0.5;"),e.add(".menu_default_main","user-select:none; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size: 13px;border: 1px solid #dddddd;background-color: white;padding: 0px;cursor: default;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAABCAIAAABG0om7AAAAKXRFWHRDcmVhdGlvbiBUaW1lAHBvIDEwIDUgMjAxMCAyMjozMzo1OSArMDEwMGzy7+IAAAAHdElNRQfaBQoUJAesj4VUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAABGdBTUEAALGPC/xhBQAAABVJREFUeNpj/P//PwO1weMnT2RlZAAYuwX/4oA3BgAAAABJRU5ErkJggg==);background-repeat: repeat-y;xborder-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);"),e.add(".menu_default_main, .menu_default_main *, .menu_default_main *:before, .menu_default_main *:after","box-sizing: content-box;"),e.add(".menu_default_title","background-color: #f2f2f2;border-bottom: 1px solid gray;padding: 4px 4px 4px 37px;"),e.add(".menu_default_main a","padding: 2px 2px 2px 35px;color: black;text-decoration: none;cursor: default;"),e.add(".menu_default_main.menu_default_withchildren a","padding: 2px 35px 2px 35px;"),e.add(".menu_default_main a img","margin-left: 6px;margin-top: 2px;"),e.add(".menu_default_item_text","display: block;height: 20px;line-height: 20px; overflow:hidden;padding-left: 2px;padding-right: 20px; white-space: nowrap;"),e.add(".menu_default_main a:hover","background-color: #f3f3f3;"),e.add(".menu_default_main div div","border-top: 1px solid #dddddd;margin-top: 2px;margin-bottom: 2px;margin-left: 28px;"),e.add(".menu_default_main a.menu_default_item_disabled","color: #ccc"),e.add(".menu_default_item_haschildren.menu_default_item_haschildren_active","background-color: #f3f3f3;"),e.add(".menu_default_item_haschildren a:before","content: ''; border-width: 5px; border-color: transparent transparent transparent #666; border-style: solid; width: 0px; height:0px; position: absolute; right: 5px; margin-top: 5px;"),e.add(".menu_default_item_icon","position: absolute; top:0px; left: 0px; padding: 2px 2px 2px 8px;"),e.add(".menu_default_item a i","height: 20px;line-height: 20px;"),e.add(".menu_default_item .menu_default_item_symbol","width: 18px; height: 18px; color: #999; margin-left: 6px;margin-top: 2px;"),e.add(".menubar_default_main","border-bottom: 1px solid #ccc; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px; user-select:none;"),e.add(".menubar_default_item","display: inline-block; padding: 6px 10px; cursor: default;"),e.add(".menubar_default_item:hover","background-color: #f2f2f2;"),e.add(".menubar_default_item_active","background-color: #f2f2f2;"),e.add(".scheduler_default_selected .scheduler_default_event_inner","background: #ddd;"),e.add(".scheduler_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".scheduler_default_timeheader","cursor: default;color: #333;"),e.add(".scheduler_default_message","opacity: 0.9;filter: alpha(opacity=90);padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader,.scheduler_default_corner","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #eee;padding: 2px;"),e.add(".scheduler_default_timeheadergroup, .scheduler_default_timeheadercol","text-align: center;"),e.add(".scheduler_default_timeheadergroup_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".scheduler_default_timeheadercol_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;"),e.add(".scheduler_default_divider","background-color: #c0c0c0;"),e.add(".scheduler_default_divider_horizontal","background-color: #c0c0c0;"),e.add(".scheduler_default_matrix_vertical_line","background-color: #eee;"),e.add(".scheduler_default_matrix_vertical_break","background-color: #000;"),e.add(".scheduler_default_matrix_horizontal_line","background-color: #eee;"),e.add(".scheduler_default_resourcedivider","background-color: #c0c0c0;"),e.add(".scheduler_default_shadow_inner","background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;xborder-radius: 5px;"),e.add(".scheduler_default_event","color:#333; font-size: 13px;"),e.add(".scheduler_default_event_inner","position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:5px 2px 2px 2px;overflow:hidden;border:1px solid #ccc;"),e.add(".scheduler_default_event_bar","top:0px;left:0px;right:0px;height:4px;background-color:#9dc8e8;"),e.add(".scheduler_default_event_bar_inner","position:absolute;height:4px;background-color:#1066a8;"),e.add(".scheduler_default_event_inner",'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".scheduler_default_event_float_inner","padding:6px 2px 2px 8px;"),e.add(".scheduler_default_event_float_inner:after",'content:"";border-color: transparent #666 transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:8px;left:-4px;'),e.add(".scheduler_default_columnheader_inner","font-weight: bold;"),e.add(".scheduler_default_columnheader_splitter","background-color: #666;opacity: 0.5;filter: alpha(opacity=50);"),e.add(".scheduler_default_columnheader_cell_inner","padding: 2px;"),e.add(".scheduler_default_cell","background-color: #f9f9f9;"),e.add(".scheduler_default_cell.scheduler_default_cell_business","background-color: #fff;"),e.add(".navigator_default_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after","box-sizing: content-box;"),e.add(".navigator_default_month","font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 12px;"),e.add(".navigator_default_day","color: black;"),e.add(".navigator_default_weekend","background-color: #f0f0f0;"),e.add(".navigator_default_dayheader","color: black;"),e.add(".navigator_default_line","border-bottom: 1px solid #c0c0c0;"),e.add(".navigator_default_dayother","color: gray;"),e.add(".navigator_default_todaybox","border: 1px solid red;"),e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),e.add(".navigator_default_busy","font-weight: bold;"),e.add(".navigator_default_cell","text-align: center;"),e.add(".navigator_default_select .navigator_default_cell_box","background-color: #FFE794; opacity: 0.5;"),e.add(".navigator_default_title","text-align: center;"),e.add(".navigator_default_titleleft, .navigator_default_titleright","text-align: center;"),e.add(".navigator_default_dayheader","text-align: center;"),e.add(".navigator_default_weeknumber","text-align: center; color: #999;"),e.add(".navigator_default_cell_text","cursor: pointer;"),e.add(".month_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;color: #333;"),e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after","box-sizing: content-box;"),e.add(".month_default_cell_inner","border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;background-color: #f9f9f9;"),e.add(".month_default_cell_business .month_default_cell_inner","background-color: #fff;"),e.add(".month_default_cell_header","text-align: right; padding: 4px; box-sizing: border-box;"),e.add(".month_default_header_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;cursor: default;color: #333;background: #f3f3f3; overflow:hidden; display: flex; align-items: center; justify-content: center;"),e.add(".month_default_message","padding: 10px;opacity: 0.9; color: #ffffff;background: #ffa216;"),e.add(".month_default_event_inner","position: absolute;top: 0px;bottom: 0px;left: 1px;right: 1px;overflow:hidden;padding: 2px;padding-left: 10px;color: #333;background: #fff;background: linear-gradient(to bottom, #ffffff 0%, #eeeeee);border: 1px solid #999;border-radius: 0px;display: flex; align-items: center; font-size: 13px;"),e.add(".month_default_event_continueright .month_default_event_inner","border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-right-style: dotted;"),e.add(".month_default_event_continueleft .month_default_event_inner","border-top-left-radius: 0px;border-bottom-left-radius: 0px;border-left-style: dotted;"),e.add(".month_default_event_bar","top: 0px;bottom: 0px;left: 0px;width: 6px;"),e.add(".month_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".month_default_event_continueleft .month_default_event_bar","display: none;"),e.add(".month_default_selected .month_default_event_inner","background: #ddd;"),e.add(".month_default_shadow_inner","background-color: #666666;opacity: 0.5;height: 100%;"),e.add(".month_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".month_default_event_delete:hover","opacity: 1;-ms-filter: none;"),e.add(".month_default_event_timeleft","color: #ccc; font-size: 8pt"),e.add(".month_default_event_timeright","color: #ccc; font-size: 8pt; text-align: right;"),e.add(".month_default_loading","background-color: orange; color: white; padding: 2px;"),e.commit(),DayPilot.Global.defaultCss=!0}}(),DayPilot.doc=function(){var e=document.documentElement;return e&&e.clientHeight?e:document.body},DayPilot.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},DayPilot.pageOffset=function(){if("undefined"!=typeof pageXOffset)return{x:pageXOffset,y:pageYOffset};var e=DayPilot.doc();return{x:e.scrollLeft,y:e.scrollTop}},DayPilot.indexOf=function(e,t){if(!e||!e.length)return-1;for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},DayPilot.ac=function(e,t){if(!t)var t=[];for(var i=0;e.children&&i<e.children.length;i++)t.push(e.children[i]),DayPilot.ac(e.children[i],t);return t},DayPilot.rfa=function(e,t){var i=DayPilot.indexOf(e,t);i!==-1&&e.splice(i,1)},DayPilot.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},DayPilot.Stats={},DayPilot.Stats.eventObjects=0,DayPilot.Stats.dateObjects=0,DayPilot.Stats.cacheHitsCtor=0,DayPilot.Stats.cacheHitsParsing=0,DayPilot.Stats.cacheHitsTicks=0,DayPilot.re=function(e,t,i){i&&t&&e&&e.addEventListener(t,i,!1)},DayPilot.rePassive=function(e,t,i){i&&t&&e&&e.addEventListener(t,i,{"passive":!0})},DayPilot.reNonPassive=function(e,t,i){i&&t&&e&&e.addEventListener(t,i,{"passive":!1})},DayPilot.pu=function(e){var t,i,a,n=e.attributes;if(n)for(i=n.length,t=0;t<i;t+=1)n[t]&&(a=n[t].name,"function"==typeof e[a]&&(e[a]=null));if(n=e.childNodes)for(i=n.length,t=0;t<i;t+=1){DayPilot.pu(e.childNodes[t])}},DayPilot.de=function(e){if(e)if(DayPilot.isArray(e))for(var t=0;t<e.length;t++)DayPilot.de(e[t]);else e.parentNode&&e.parentNode.removeChild(e)},DayPilot.sw=function(e){return e?e.offsetWidth-e.clientWidth:0},DayPilot.am=function(){return"undefined"==typeof angular?null:(DayPilot.am.cached||(DayPilot.am.cached=angular.module("daypilot",[])),DayPilot.am.cached)},DayPilot.Selection=function(e,t,i,a){this.type="selection",this.start=e.isDayPilotDate?e:new DayPilot.Date(e),this.end=t.isDayPilotDate?t:new DayPilot.Date(t),this.resource=i,this.root=a,this.toJSON=function(e){var t={};return t.start=this.start,t.end=this.end,t.resource=this.resource,t}},DayPilot.request=function(e,t,i,a){var n=DayPilot.createXmlHttp();n&&(n.open("POST",e,!0),n.setRequestHeader("Content-type","text/plain"),n.onreadystatechange=function(){if(4===n.readyState)return 200!==n.status&&304!==n.status?void(a?a(n):window.console&&console.log("HTTP error "+n.status)):void t(n)},4!==n.readyState&&("object"==typeof i&&(i=JSON.stringify(i)),n.send(i)))},DayPilot.ajax=function(e){if(!e)throw new DayPilot.Exception("Parameter object required.");if("string"!=typeof e.url)throw new DayPilot.Exception("The parameter object must have 'url' property.");var t=DayPilot.createXmlHttp();if(!t)throw new DayPilot.Exception("Unable to create XMLHttpRequest object");var i="object"==typeof e.data,a=e.data,n=e.method||(e.data?"POST":"GET"),o=e.success||function(){},r=e.error||function(){},s=e.url,l=e.contentType||(i?"application/json":"text/plain"),d=e.headers||{};t.open(n,s,!0),t.setRequestHeader("Content-type",l),DayPilot.Util.ownPropsAsArray(d).forEach(function(e){t.setRequestHeader(e.key,e.val)}),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||201===t.status||204===t.status||304===t.status){var e={};e.request=t,t.responseText&&(e.data=JSON.parse(t.responseText)),o(e)}else if(r){var e={};e.request=t,r(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&(i&&(a=JSON.stringify(a)),t.send(a))},DayPilot.createXmlHttp=function(){return new XMLHttpRequest},DayPilot.Http={},DayPilot.Http.ajax=function(e){DayPilot.ajax(e)},DayPilot.Http.get=function(e,t){return t=t||{},new Promise(function(i,a){var n={};n.url=e,n.method="GET",n.success=function(e){i(e)},n.error=function(e){a(e)},n.contentType=t.contentType,n.headers=t.headers,DayPilot.ajax(n)})},DayPilot.Http.post=function(e,t,i){return i=i||{},new Promise(function(a,n){var o={};o.url=e,o.method="POST",o.data=t,o.success=function(e){a(e)},o.error=function(e){n(e)},o.contentType=i.contentType,o.headers=i.headers,DayPilot.ajax(o)})},DayPilot.Http.put=function(e,t,i){return i=i||{},new Promise(function(a,n){var o={};o.url=e,o.method="PUT",o.data=t,o.success=function(e){a(e)},o.error=function(e){n(e)},o.contentType=i.contentType,o.headers=i.headers,DayPilot.ajax(o)})},DayPilot.Http.delete=function(e,t){return t=t||{},new Promise(function(i,a){var n={};n.url=e,n.method="DELETE",n.success=function(e){i(e)},n.error=function(e){a(e)},n.contentType=t.contentType,n.headers=t.headers,DayPilot.ajax(n)})},DayPilot.Util={},DayPilot.Util.addClass=function(e,t){if(e){if(!e.className)return void(e.className=t);new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)||(e.className=e.className+" "+t)}},DayPilot.Util.removeClass=function(e,t){if(e){var i=new RegExp("(^|\\s)"+t+"($|\\s)");e.className=e.className.replace(i," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}},DayPilot.Util.copyProps=function(e,t,i){if(t||(t={}),!e)return t;if("undefined"==typeof i)for(var a in e)e.hasOwnProperty(a)&&"undefined"!=typeof e[a]&&(t[a]=e[a]);else for(var n=0;n<i.length;n++){var a=i[n];"undefined"!=typeof e[a]&&(t[a]=e[a])}return t},DayPilot.Util.ownPropsAsArray=function(e){var t=[];if(!e)return t;for(var i in e)if(e.hasOwnProperty(i)){var a={};a.key=i,a.val=e[i],t.push(a)}return t},DayPilot.Util.replaceCharAt=function(e,t,i){return e.substr(0,t)+i+e.substr(t+i.length)},DayPilot.Util.isNullOrUndefined=function(e){return null===e||"undefined"==typeof e},DayPilot.Util.escapeHtml=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},DayPilot.Util.escapeTextHtml=function(e,t){return DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":DayPilot.Util.escapeHtml(e):t},DayPilot.Areas={},DayPilot.Areas.attach=function(e,t,i){var i=i||{},n=i.areas,o=i.allowed||function(){return!0},r=i.offsetX||0;n=a(t,n),n&&DayPilot.isArray(n)&&0!==n.length&&(DayPilot.re(e,"mousemove",function(a){e.active||e.areasDisabled||!o()||DayPilot.Areas.showAreas(e,t,a,n,{"offsetX":r,"eventDiv":i.eventDiv})}),DayPilot.re(e,"mouseleave",function(t){DayPilot.Areas.hideAreas(e,t)}),n.forEach(function(a){if(DayPilot.Areas.isVisible(a)){var n=DayPilot.Areas.createArea(e,t,a,{"offsetX":r,"eventDiv":i.eventDiv});e.appendChild(n)}}))},DayPilot.Areas.disable=function(e){e.areasDisabled=!0,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c=e.style.display,e.style.display="none"})},DayPilot.Areas.enable=function(e){e.areasDisabled=!1,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c?e.style.display=e.c:e.style.display=""})},DayPilot.Areas.remove=function(e){var t=Array.from(e.childNodes).filter(function(e){return e.isActiveArea});DayPilot.de(t)},DayPilot.Areas.isVisible=function(e){var t=e.visibility||e.v||"Visible";return"Visible"===t||"TouchVisible"===t&&!DayPilot.browser.hover},DayPilot.Areas.copy=function(e){return DayPilot.isArray(e)?e.map(function(e){return DayPilot.Util.copyProps(e,{})}):[]};var a=function(e,t){return DayPilot.isArray(t)||(t=e.areas,t||(e.cache?t=e.cache.areas:e.data&&(t=e.data.areas))),t};DayPilot.Areas.showAreas=function(e,t,i,a,n){if(!DayPilot.Global.resizing&&!DayPilot.Global.moving&&!DayPilot.Global.selecting&&!e.active&&DayPilot.browser.hover){if(DayPilot.Areas.all&&DayPilot.Areas.all.length>0)for(var o=0;o<DayPilot.Areas.all.length;o++){var r=DayPilot.Areas.all[o];r!==e&&DayPilot.Areas.hideAreas(r,i)}if(e.active={},DayPilot.isArray(a)||(a=t.areas,a||(t.cache?a=t.cache.areas:t.data&&(a=t.data.areas))),a&&0!==a.length&&!(e.areas&&e.areas.length>0)){e.areas=[];for(var o=0;o<a.length;o++){var s=a[o];if(!DayPilot.Areas.isVisible(s)){var l=DayPilot.Areas.createArea(e,t,s,n);e.areas.push(l),e.appendChild(l),DayPilot.Areas.all.push(e)}}e.active.children=DayPilot.ac(e)}}},DayPilot.Areas.createArea=function(e,t,i,a){function n(e,t,i){var a={};return a.area=e,a.source=t,a.originalEvent=i,a.preventDefault=function(){a.preventDefault.value=!0},"function"==typeof e.onClick&&e.onClick(a),a}function o(e,t,i){DayPilot.Bubble&&DayPilot.Bubble.touchPosition(i),e.calendar.bubble&&e.calendar.bubble.showEvent(e,!0)}function r(e,t,i,a){DayPilot.Menu&&DayPilot.Menu.touchPosition(a);var n=i.contextMenu||i.menu;if(n instanceof DayPilot.Menu||(t.isEvent&&t.client.contextMenu()?n=t.client.contextMenu():t.isEvent&&t.calendar.contextMenu&&(n=t.calendar.contextMenu)),
|
|
9
|
+
n&&n.show){var o={"type":"area","div":e,"e":t,"area":i,"a":d};n.show(t,{"initiator":o})}}function s(e){return"string"==typeof e&&isNaN(e)?e:"undefined"!=typeof e?e+"px":void 0}var a=a||{},l=(a.offsetX||0,a.eventDiv||e),d=document.createElement("div");d.isActiveArea=!0,d.area=i,d.setAttribute("unselectable","on");var c=i.w||i.width,u=i.h||i.height,h=i.cssClass||i.css||i.className;if("undefined"!=typeof i.style&&d.setAttribute("style",i.style),d.style.position="absolute",d.style.width=s(c),d.style.height=s(u),d.style.right=s(i.right),d.style.top=s(i.top),d.style.left=s(i.left),d.style.bottom=s(i.bottom),"undefined"!=typeof i.html||"undefined"!=typeof i.text)d.innerHTML=DayPilot.Util.escapeTextHtml(i.text,i.html);else if(i.icon){var f=document.createElement("i");f.className=i.icon,d.appendChild(f)}else if(i.image){var m=document.createElement("img");m.src=i.image,d.appendChild(m)}else if(i.symbol){var p="http://www.w3.org/2000/svg",v=document.createElementNS(p,"svg");v.setAttribute("width","100%"),v.setAttribute("height","100%");var y=document.createElementNS(p,"use");y.setAttribute("href",i.symbol),v.appendChild(y),d.appendChild(v)}if(h&&(d.className=h),i.toolTip&&d.setAttribute("title",i.toolTip),i.backColor&&(d.style.background=i.backColor),i.background&&(d.style.background=i.background),i.fontColor&&(d.style.color=i.fontColor),i.padding&&(d.style.padding=i.padding+"px",d.style.boxSizing="border-box"),i.verticalAlignment)switch(d.style.display="flex",i.verticalAlignment){case"center":d.style.alignItems="center";break;case"top":d.style.alignItems="flex-start";break;case"bottom":d.style.alignItems="flex-end"}if(i.horizontalAlignment)switch(d.style.display="flex",i.horizontalAlignment){case"right":d.style.justifyContent="flex-end";break;case"left":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center"}if("ResizeEnd"===i.action||"ResizeStart"===i.action||"Move"===i.action){if(t.calendar.isCalendar)switch(i.action){case"ResizeEnd":i.cursor="s-resize",i.dpBorder="bottom";break;case"ResizeStart":i.cursor="n-resize",i.dpBorder="top";break;case"Move":i.cursor="move"}if(t.calendar.isScheduler||t.calendar.isMonth)switch(i.action){case"ResizeEnd":i.cursor="e-resize",i.dpBorder="right";break;case"ResizeStart":i.cursor="w-resize",i.dpBorder="left";break;case"Move":i.cursor="move"}d.onmousemove=function(e,t,i){return function(a){t.calendar.internal&&t.calendar.internal.dragInProgress&&t.calendar.internal.dragInProgress()||(a.cancelBubble=!0,e.style.cursor=i.cursor,i.dpBorder&&(e.dpBorder=i.dpBorder))}}(l,t,i),d.onmouseout=function(e,t,i){return function(t){e.style.cursor=""}}(l,t,i)}if(("ResizeEnd"===i.action||"ResizeStart"===i.action)&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(a){a.cancelBubble=!0;var n=t.calendar.internal.touch,o=a.touches?a.touches[0]:a,r={x:o.pageX,y:o.pageY};t.calendar.coords=n.relativeCoords(a),n.preventEventTap=!0,t.calendar.isScheduler?n.startResizing(e,"ResizeEnd"===i.action?"right":"left"):t.calendar.isCalendar&&n.startResizing(e,"ResizeEnd"===i.action?"bottom":"top",r)}}(l,t,i);DayPilot.rePassive(d,DayPilot.touch.start,g)}if("ContextMenu"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(a){a.cancelBubble=!0,a.preventDefault(),r(e,t,i,a),t.calendar.internal.touch.preventEventTap=!0}}(l,t,i),b=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g),DayPilot.reNonPassive(d,DayPilot.touch.end,b)}if("Bubble"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault();var a=n(i,t,e);if(!a.preventDefault.value){o(t,i,e);t.calendar.internal.touch.preventEventTap=!0,"function"==typeof i.onClicked&&i.onClicked(a)}}}(l,t,i),b=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g),DayPilot.reNonPassive(d,DayPilot.touch.end,b)}if("Move"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(i){i.cancelBubble=!0;var a=t.calendar.internal.touch,n=i.touches?i.touches[0]:i,o={x:n.pageX,y:n.pageY};t.calendar.coords=a.relativeCoords(i),DayPilot.Global&&DayPilot.Global.touch&&(DayPilot.Global.touch.active=!0),a.preventEventTap=!0,a.startMoving(e,o)}}(l,t,i);DayPilot.rePassive(d,DayPilot.touch.start,g)}if("Bubble"===i.action&&t.isEvent?(d.onmousemove=function(e,t,i){return function(e){i.bubble?i.bubble.showEvent(t,!0):t.calendar.bubble&&t.calendar.bubble.showEvent(t,!0)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&(i.bubble?i.bubble.hideOnMouseOut():t.calendar.bubble&&t.calendar.bubble.hideOnMouseOut())}}(e,t,i)):"Bubble"===i.action&&t.isRow?(d.onmousemove=function(e,t,i){return function(e){i.bubble?i.bubble.showResource(t,!0):t.calendar.resourceBubble&&t.calendar.resourceBubble.showResource(t,!0)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&(i.bubble?i.bubble.hideOnMouseOut():t.calendar.resourceBubble&&t.calendar.resourceBubble.hideOnMouseOut())}}(e,t,i)):"Bubble"===i.action&&"undefined"!=typeof DayPilot.Bubble&&i.bubble instanceof DayPilot.Bubble&&(d.onmousemove=function(e,t,i){return function(e){i.bubble.showHtml(null,null)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&i.bubble&&i.bubble.hideOnMouseOut()}}(e,t,i)),"HoverMenu"===i.action&&(d.onmousemove=function(e,t,i){return function(e){var a=i.menu;a&&a.show&&(a.visible?a.source&&"undefined"!=typeof a.source.id&&a.source.id!==t.id&&a.show(t):a.show(t),a.cancelHideTimeout())}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){var t=i.menu;t&&t.hideOnMouseOver&&t.delayedHide()}}(e,t,i)),"None"===i.action){var g=function(e,t,i){return function(e){var a=n(i,t,e);"function"==typeof i.onClicked&&i.onClicked(a),e.preventDefault(),e.stopPropagation()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g)}return d.onmousedown=function(e,t,i){return function(a){if("function"==typeof i.onmousedown&&i.onmousedown(a),"function"==typeof i.mousedown){var n={};n.area=i,n.div=e,n.originalEvent=a,n.source=t,i.mousedown(n)}if("Move"===i.action&&t.isRow){var o=t.$.row;(0,t.calendar.internal.rowStartMoving)(o)}"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),"Move"===i.action&&(DayPilot.Global.movingAreaData=i.data),"Move"===i.action&&t.isEvent&&t.calendar.internal&&t.calendar.internal.startMoving&&t.calendar.internal.startMoving(e,a);"Move"!==i.action&&"ResizeEnd"!==i.action&&"ResizeStart"!==i.action&&i.action&&"Default"!==i.action&&(a.preventDefault(),a.cancelBubble=!0)}}(e,t,i),d.onclick=function(e,t,i){return function(a){var o=n(i,t,a);if(!o.preventDefault.value){switch(i.action){case"ContextMenu":r(e,t,i,a),a.cancelBubble=!0;break;case"None":a.cancelBubble=!0}"function"==typeof i.onClicked&&i.onClicked(o)}}}(e,t,i),"function"==typeof i.onMouseEnter&&d.addEventListener("mouseenter",function(e,t,i){return function(e){var a={};a.area=i,a.source=t,a.originalEvent=e,i.onMouseEnter(a)}}(e,t,i)),"function"==typeof i.onMouseLeave&&d.addEventListener("mouseleave",function(e,t,i){return function(e){var a={};a.area=i,a.source=t,a.originalEvent=e,i.onMouseLeave(a)}}(e,t,i)),d},DayPilot.Areas.all=[],DayPilot.Areas.hideAreas=function(e,t){if(e&&e&&e.active){var i=e.active,a=e.areas;if(i&&i.children&&t){var n=t.toElement||t.relatedTarget;if(~DayPilot.indexOf(i.children,n))return}if(!a||0===a.length)return void(e.active=null);DayPilot.de(a),e.active=null,e.areas=[],DayPilot.rfa(DayPilot.Areas.all,e),i.children=null}},DayPilot.Areas.hideAll=function(e){if(DayPilot.Areas.all&&0!==DayPilot.Areas.all.length)for(var t=0;t<DayPilot.Areas.all.length;t++)DayPilot.Areas.hideAreas(DayPilot.Areas.all[t],e)},DayPilot.Exception=function(e){return new Error(e)},DayPilot.Locale=function(e,t){if(this.id=e,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,t)for(var i in t)this[i]=t[i]},DayPilot.Locale.all={},DayPilot.Locale.find=function(e){if(!e)return null;var t=e.toLowerCase();return t.length>2&&(t=DayPilot.Util.replaceCharAt(t,2,"-")),DayPilot.Locale.all[t]},DayPilot.Locale.register=function(e){DayPilot.Locale.all[e.id]=e},DayPilot.Locale.register(new DayPilot.Locale("ca-es",{"dayNames":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"dayNamesShort":["dg","dl","dt","dc","dj","dv","ds"],"monthNames":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],"monthNamesShort":["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("cs-cz",{"dayNames":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"dayNamesShort":["ne","po","út","st","čt","pá","so"],"monthNames":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],"monthNamesShort":["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],"timePattern":"H:mm","datePattern":"d. M. yyyy","dateTimePattern":"d. M. yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("da-dk",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"dd-MM-yyyy","dateTimePattern":"dd-MM-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-at",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-ch",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-de",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-lu",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-au",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-ca",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("en-gb",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-us",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"M/d/yyyy","dateTimePattern":"M/d/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("es-es",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["D","L","M","X","J","V","S"],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("es-mx",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["do.","lu.","ma.","mi.","ju.","vi.","sá."],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"hh:mm tt","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy hh:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("eu-es",{"dayNames":["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],"dayNamesShort":["ig","al","as","az","og","or","lr"],"monthNames":["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],"monthNamesShort":["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fi-fi",{"dayNames":["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"dayNamesShort":["su","ma","ti","ke","to","pe","la"],"monthNames":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],"monthNamesShort":["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-be",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd-MM-yy","dateTimePattern":"dd-MM-yy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-ch",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-fr",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-lu",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("gl-es",{"dayNames":["domingo","luns","martes","mércores","xoves","venres","sábado"],"dayNamesShort":["do","lu","ma","mé","xo","ve","sá"],"monthNames":["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],"monthNamesShort":["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-it",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-ch",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ja-jp",{"dayNames":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dayNamesShort":["日","月","火","水","木","金","土"],"monthNames":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("nb-no",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-nl",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"d-M-yyyy","dateTimePattern":"d-M-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-be",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"H:mm","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nn-no",{"dayNames":["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],"dayNamesShort":["sø","må","ty","on","to","fr","la"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-br",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("pl-pl",{"dayNames":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dayNamesShort":["N","Pn","Wt","Śr","Cz","Pt","So"],"monthNames":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],"monthNamesShort":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-pt",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ro-ro",{"dayNames":["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],"dayNamesShort":["D","L","Ma","Mi","J","V","S"],"monthNames":["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],"monthNamesShort":["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ru-ru",{"dayNames":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"dayNamesShort":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],"monthNamesShort":["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sk-sk",{"dayNames":["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],"dayNamesShort":["ne","po","ut","st","št","pi","so"],"monthNames":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sv-se",{"dayNames":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dayNamesShort":["sö","må","ti","on","to","fr","lö"],"monthNames":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("tr-tr",{"dayNames":["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],"dayNamesShort":["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],"monthNames":["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],"monthNamesShort":["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],"timePattern":"HH:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("uk-ua",{"dayNames":["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],"dayNamesShort":["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень",""],"monthNamesShort":["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-cn",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"timePattern":"H:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.US=DayPilot.Locale.find("en-us"),DayPilot.Duration=function(e){var t=this,i=864e5,a=36e5,n=6e4,o=1e3;if(2===arguments.length){var r=arguments[0],s=arguments[1];if(!(r instanceof DayPilot.Date)&&"string"!=typeof r)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(s instanceof DayPilot.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof r&&(r=new DayPilot.Date(r)),"string"==typeof s&&(s=new DayPilot.Date(s)),e=s.getTime()-r.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var i=t.minutes();i=(i<10?"0":"")+i;var a=e;return a=a.replace("mm",i),a=a.replace("m",t.minutes()),a=a.replace("H",t.hours()),a=a.replace("h",t.hours()),a=a.replace("d",t.days()),a=a.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/a},this.totalDays=function(){return t.ticks/i},this.totalMinutes=function(){return t.ticks/n},this.totalSeconds=function(){return t.ticks/o},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*i;return Math.floor(e/a)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*a;return Math.floor(e/n)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*n;return Math.floor(e/o)},void(this.milliseconds=function(){return t.ticks%o}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(t,i){if(t instanceof DayPilot.Date)return t;var a;DayPilot.Util.isNullOrUndefined(t)&&(a=DayPilot.DateUtil.fromLocal().getTime(),t=a);var n=DayPilot.Date.Cache.Ctor;if(n[t])return DayPilot.Stats.cacheHitsCtor+=1,n[t];var o=!1;if("string"==typeof t)a=DayPilot.DateUtil.fromStringSortable(t,i).getTime(),o=!0;else if("number"==typeof t){if(isNaN(t))throw"Cannot create DayPilot.Date from NaN";a=t}else{if(!(t instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";a=i?DayPilot.DateUtil.fromLocal(t).getTime():t.getTime()}var r=e(a);return n[r]?n[r]:(n[r]=this,n[a]=this,o&&r!==t&&DayPilot.DateUtil.hasTzSpec(t)&&(n[t]=this),Object.defineProperty&&!DayPilot.browser.ielt9?(Object.defineProperty(this,"ticks",{get:function(){return a}}),Object.defineProperty(this,"value",{"value":r,"writable":!1,"enumerable":!0})):(this.ticks=a,this.value=r),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(a)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},
|
|
10
|
+
DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),i=t.getUTCFullYear(),a=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,i++;e>12-a?(i++,a=e-(12-a)):a+=e}else{for(;e<=-12;)e+=12,i--;a+e<=0?(i--,a=12+a+e):a+=e}var n=new Date(t.getTime());n.setUTCDate(1),n.setUTCFullYear(i),n.setUTCMonth(a-1);var o=new DayPilot.Date(n).daysInMonth();return n.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(n)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),i=new Date(this.ticks),a=this.getYear()+e,n=this.getMonth();i.setUTCDate(1),i.setUTCFullYear(a),i.setUTCMonth(n);var o=new DayPilot.Date(i).daysInMonth();return i.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(i)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,i=e.getUTCFullYear(),a=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?a[t-1]:i%4!==0?a[1]:i%100===0&&i%400!==0?a[1]:a[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var i=DayPilot.Locale.find(e);e=i.weekStarts}else e=e||0;for(var a=t.dayOfWeek();a!==e;)t=t.addDays(-1),a=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),i=this.firstDayOfYear().dayOfWeek(),a=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===i&&(i=7),0===a&&(a=7);var n=8-i;4!==i&&4!==a||(e=!0);var o=Math.ceil((t-n)/7),r=o;return n>=4&&(r+=1),r>52&&!e&&(r=1),0===r&&(r=this.firstDayOfYear().addDays(-1).weekNumberISO()),r},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new n(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return e(this.ticks)},DayPilot.Date.parse=function(e,t,i){return new n(t,i).parse(e)};DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,i){t=t||1,i=i||1;var a=new Date(0);return a.setUTCFullYear(e),a.setUTCMonth(t-1),a.setUTCDate(i),new DayPilot.Date(a)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var i=e.length,a=10===i,n=19===i,o=i>19;if(!a&&!n&&!o)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var r=e.substring(0,4),s=e.substring(5,7),l=e.substring(8,10),d=new Date(0);if(d.setUTCFullYear(r,s-1,l),a)return DayPilot.Date.Cache.Parsing[e]=d,d;var c=e.substring(11,13),u=e.substring(14,16),h=e.substring(17,19);if(d.setUTCHours(c),d.setUTCMinutes(u),d.setUTCSeconds(h),n)return DayPilot.Date.Cache.Parsing[e]=d,d;var f=e[19],m=0;if("."===f){var p=parseInt(e.substring(20,23));d.setUTCMilliseconds(p),m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var v=new DayPilot.Date(d);return t||(v=v.addMinutes(-m)),d=v.toDate(),DayPilot.Date.Cache.Parsing[e]=d,d},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],i=parseInt(e.substring(1,3)),a=parseInt(e.substring(4)),n=60*i+a;if("-"===t)return-n;if("+"===t)return n;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var i=0,a=e.getDatePart(),n=t.getDatePart();a<n;)a=a.addDays(1),i++;return i},DayPilot.DateUtil.daysSpan=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var i=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()==t.getDatePart().getTime()&&i--,i},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var i=e.getUTCMinutes();i<10&&(i="0"+i);var a=e.getUTCHours();if(t){var n=a<12,a=a%12;0===a&&(a=12);return a+":"+i+" "+(n?"AM":"PM")}return a+":"+i},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t};var n=function(e,i){"string"==typeof i&&(i=DayPilot.Locale.find(i));var i=i||DayPilot.Locale.US,a=[{"seq":"yyyy","expr":"[0-9]{4,4}","str":function(e){return e.getYear()}},{"seq":"yy","expr":"[0-9]{2,2}","str":function(e){return e.getYear()%100}},{"seq":"mm","expr":"[0-9]{2,2}","str":function(e){var t=e.getMinutes();return t<10?"0"+t:t}},{"seq":"m","expr":"[0-9]{1,2}","str":function(e){return e.getMinutes()}},{"seq":"HH","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();return t<10?"0"+t:t}},{"seq":"H","expr":"[0-9]{1,2}","str":function(e){return e.getHours()}},{"seq":"hh","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours(),t=t%12;0===t&&(t=12);var i=t;return i<10?"0"+i:i}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours(),t=t%12;return 0===t&&(t=12),t}},{"seq":"ss","expr":"[0-9]{2,2}","str":function(e){var t=e.getSeconds();return t<10?"0"+t:t}},{"seq":"s","expr":"[0-9]{1,2}","str":function(e){return e.getSeconds()}},{"seq":"MMMM","expr":"[^\\s0-9]*","str":function(e){return i.monthNames[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNames,e,t);return a<0?null:a+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return i.monthNamesShort[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNamesShort,e,t);return a<0?null:a+1}},{"seq":"MM","expr":"[0-9]{2,2}","str":function(e){var t=e.getMonth()+1;return t<10?"0"+t:t}},{"seq":"M","expr":"[0-9]{1,2}","str":function(e){return e.getMonth()+1}},{"seq":"dddd","expr":"[^\\s0-9]*","str":function(e){return i.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return i.dayNamesShort[e.getDayOfWeek()]}},{"seq":"dd","expr":"[0-9]{2,2}","str":function(e){var t=e.getDay();return t<10?"0"+t:t}},{"seq":"%d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"tt","expr":"(AM|PM|am|pm)","str":function(e){return e.getHours()<12?"AM":"PM"},"transform":function(e){return e.toUpperCase()}}],n=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function i(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(o){for(var r=n(e),s=null,l=0;l<a.length;l++){var d=(a[l].length,t===a[l].seq),c=a[l].expr;d&&(c="("+c+")",s=a[l].transform),r=r.replace(a[l].seq,c)}r="^"+r+"$";try{var u=new RegExp(r),h=u.exec(o);return h?(s=s||i)(h[1]):null}catch(e){throw"unable to create regex from: "+r}}}},this.print=function(t){for(var i=function(e){for(var t=0;t<a.length;t++)if(a[t]&&a[t].seq===e)return a[t];return null},n=e.length<=0,o=0,r=[];!n;){var s=e.substring(o),l=/%?(.)\1*/.exec(s);if(l&&l.length>0){var d=l[0],c=i(d);c?r.push(c):r.push(d),o+=d.length,n=e.length<=o}else n=!0}for(var u=0;u<r.length;u++){var h=r[u];"string"!=typeof h&&(r[u]=h.str(t))}return r.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var i=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(i))return null;if(i>12||i<1)return null;var a=this.day.findValue(e),n=DayPilot.Date.fromYearMonthDay(t,i).daysInMonth();if(a<1||a>n)return null;var o=this.hours?this.hours.findValue(e):0,r=this.minutes?this.minutes.findValue(e):0,s=this.seconds?this.seconds.findValue(e):0,l=this.ampm?this.ampm.findValue(e):null;if(this.ampm&&this.hours12){var d=this.hours12.findValue(e);if(d<1||d>12)return null;o="PM"===l?12===d?12:d+12:12===d?0:d}if(o<0||o>23)return null;if(r<0||r>59)return null;if(s<0||s>59)return null;var c=new Date;return c.setUTCFullYear(t,i-1,a),c.setUTCHours(o),c.setUTCMinutes(r),c.setUTCSeconds(s),c.setUTCMilliseconds(0),new DayPilot.Date(c)},this.init()};DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+i(e.r)+i(e.g)+i(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var i=DayPilot.ColorUtil.hexToRgb(e);t=t||1;var a=17,n=t*a,o=DayPilot.ColorUtil.adjustLuminance(i,-n);return DayPilot.ColorUtil.rgbToHex(o)},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),i=t.r/255,a=t.g/255,n=t.b/255;return Math.sqrt(.299*i*i+.587*a*a+.114*n*n)},DayPilot.ColorUtil.contrasting=function(e,t,i){var a=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",i=i||"#000000",a>.5?i:t},DayPilot.Event=function(e,t,i){var a=this;this.calendar=t,this.data=e?e:{},this.part=i?i:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var n={},o=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(n.dirty)return n;for(var e=0;e<o.length;e++)n[o[e]]=a.data[o[e]];return n.dirty=!0,n},this.copy=function(){for(var e={},t=0;t<o.length;t++)e[o[t]]=a.data[o[t]];return e},this.commit=function(){if(n.dirty){for(var e=0;e<o.length;e++)a.data[o[e]]=n[o[e]];n.dirty=!1}},this.dirty=function(){return n.dirty},this.id=function(e){return"undefined"==typeof e?a.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?a.id():void a.id(e)},this.text=function(e){return"undefined"==typeof e?a.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?a.data.resource:void(this.temp().resource=e)},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=a.data.tag;if(!t)return null;if("undefined"==typeof e)return a.data.tag;for(var i=a.calendar.tagFields,n=-1,o=0;o<i.length;o++)e===i[o]&&(n=o);if(n===-1)throw"Field name not found.";return t[n]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=a.cache||a.data,i=a.calendar&&a.calendar.internal&&a.calendar.internal.xssTextHtml;return i?i(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}a.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?a.data.header:void(a.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.cssClass?a.cache.cssClass:a.data.cssClass:void(a.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.toolTip?a.cache.toolTip:"undefined"!=typeof a.data.toolTip?a.data.toolTip:a.data.text:void(a.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.barHidden?!a.cache.barHidden:a.calendar.durationBarVisible&&!a.data.barHidden:void(a.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.backColor?a.cache.backColor:"undefined"!=typeof a.data.backColor?a.data.backColor:a.calendar.eventBackColor:void(a.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.borderColor?a.cache.borderColor:"undefined"!=typeof a.data.borderColor?a.data.borderColor:a.calendar.eventBorderColor:void(a.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(a.oContextMenu)return a.oContextMenu;a.cache?a.cache.contextMenu:a.data.contextMenu}else a.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.moveDisabled?!a.cache.moveDisabled:"Disabled"!==a.calendar.eventMoveHandling&&!a.data.moveDisabled:void(a.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.resizeDisabled?!a.cache.resizeDisabled:"Disabled"!==a.calendar.eventResizeHandling&&!a.data.resizeDisabled:void(a.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.clickDisabled?!a.cache.clickDisabled:"Disabled"!==a.calendar.eventClickHandling&&!a.data.clickDisabled:void(a.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.rightClickDisabled?!a.cache.rightClickDisabled:"Disabled"!==a.calendar.eventRightClickHandling&&!a.data.rightClickDisabled:void(a.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.deleteDisabled?!a.cache.deleteDisabled:"Disabled"!==a.calendar.eventDeleteHandling&&!a.data.deleteDisabled:void(a.data.deleteDisabled=!e)},this.toJSON=function(e){var t={};if(t.value=this.id(),t.id=this.id(),t.text=this.text(),t.start=this.start(),t.end=this.end(),t.tag={},a.calendar&&a.calendar.tagFields)for(var i=a.calendar.tagFields,n=0;n<i.length;n++)t.tag[i[n]]=this.tag(i[n]);return t}}}}(),DayPilot.JSON={},function(){function e(e){return e<10?"0"+e:e}function t(e){return r.lastIndex=0,r.test(e)?'"'+e.replace(r,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function i(e,r){var s,l,d,c,u,h=a,f=r[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON2?f=f.toJSON2(e):f&&"object"==typeof f&&"function"==typeof f.toJSON&&!f.ignoreToJSON&&(f=f.toJSON(e)),"function"==typeof o&&(f=o.call(r,e,f)),typeof f){case"string":return t(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(a+=n,u=[],"number"==typeof f.length&&!f.propertyIsEnumerable("length")){for(c=f.length,s=0;s<c;s+=1)u[s]=i(s,f)||"null";return d=0===u.length?"[]":a?"[\n"+a+u.join(",\n"+a)+"\n"+h+"]":"["+u.join(",")+"]",a=h,d}if(o&&"object"==typeof o)for(c=o.length,s=0;s<c;s+=1)l=o[s],"string"==typeof l&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));else for(l in f)Object.hasOwnProperty.call(f,l)&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));return d=0===u.length?"{}":a?"{\n"+a+u.join(",\n"+a)+"\n"+h+"}":"{"+u.join(",")+"}",a=h,d}}"function"!=typeof Date.prototype.toJSON2&&(Date.prototype.toJSON2=function(t){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var a,n,o,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};"function"!=typeof DayPilot.JSON.stringify&&(DayPilot.JSON.stringify=function(e,t,r){var s;if(a="",n="","number"==typeof r)for(s=0;s<r;s+=1)n+=" ";else"string"==typeof r&&(n=r);if(o=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return i("",{"":e})})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.selecting=!1,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var i=t.registered,a=0;a<i.length;a++)if(i[a]===e)return;i.push(e)},t.unregister=function(e){var i=t.registered;if(i){var a=DayPilot.indexOf(i,e);a!==-1&&i.splice(a,1)}},t.getCellsAbove=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.previousSibling;n&&"TR"!==n.tagName;)n=n.previousSibling;return i},t.getCellsBelow=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.nextSibling;n&&"TR"!==n.tagName;)n=n.nextSibling;return i},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(e){if(t.registered)for(var i=t.registered,a=0;a<i.length;a++){var n=i[a];n.dispose(),t.unregister(n)}},t.gMouseUp=function(i){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var a=t.resizing.event,n=t.resizingShadow.clientHeight+4,o=t.resizingShadow.offsetTop,r=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",a.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,a.calendar.f(a,n,o,r)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var o=t.movingShadow.offsetTop,a=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,a.calendar.i("_event_moving_source"));var s=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,a.calendar.nav.top.style.cursor="auto",a.calendar.j(a,s,o,i)}else if(t.selecting&&null!==t.topSelectedCell){var l=t.selecting.calendar;t.selecting=!1;var d=l.getSelection();l.k(d.start,d.end,d.resource),"Hold"!==l.timeRangeSelectedHandling&&"HoldForever"!==l.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var i=t.movingShadow,a=i.parentNode;a.style.display="none",i.parentNode.removeChild(i),e.firstChild.appendChild(i),i.style.left="0px",a.style.display="",i.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"},t.Calendar=function(e,i){var a=!1;if(this instanceof t.Calendar&&!this.l&&(a=!0,this.l=!0),!a)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var n=this;this.uniqueID=null,this.isCalendar=!0,this.v="2023.1.450-lite",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellHeight=30,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventHeaderHeight=14,this.eventsLoadMethod="GET",this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.loadingLabelBackColor="ff0000",this.loadingLabelFontColor="#ffffff",this.loadingLabelFontFamily="Tahoma, Arial, Helvetica, sans-serif",this.loadingLabelFontSize="10pt",this.locale="en-us",this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeEventRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.m()},this.m=function(){DayPilot.de(n.elements.selection),n.elements.selection=[],n.nav.activeSelection=null},this.n=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,this.cleanSelection=this.clearSelection,this.o=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.p();var o="JSON"+DayPilot.JSON.stringify(a);__doPostBack(n.uniqueID,o)},this.q=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){n.loadingStart()},100);var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.p();var o="JSON"+DayPilot.JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.s,o,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,o,this.t,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=n;e.u(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.z(),e.A(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e)},this.B=function(){this.nav.top.dispose=this.dispose},this.s=function(e){n.t(e.responseText)},this.p=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=n.days,e.startDate=n.startDate,e.heightSpec=n.heightSpec,e.businessBeginsHour=n.businessBeginsHour,e.businessEndsHour=n.businessEndsHour,e.hashes=n.hashes,e.timeFormat=n.timeFormat,e.viewType=n.viewType,e.locale=n.locale,e},this.C=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var a=document.createElement("div");a.setAttribute("unselectable","on"),a.style.position="absolute",a.style.width=e.offsetWidth+"px",a.style.height=e.offsetHeight+"px",a.style.left=e.offsetLeft+"px",a.style.top=e.offsetTop+"px",a.style.boxSizing="border-box",a.style.zIndex=101,a.className=n.i("_shadow");var o=document.createElement("div");return o.className=n.i("_shadow_inner"),a.appendChild(o),i.firstChild.appendChild(a),a},this.D={},this.D.locale=function(){var e=DayPilot.Locale.find(n.locale);return e?e:DayPilot.Locale.US},this.D.timeFormat=function(){return"Auto"!==n.timeFormat?n.timeFormat:this.locale().timeFormat},this.D.E=function(){return"Disabled"!==n.xssProtection};var o=this.D;this.t=function(e,t){if(e&&0===e.indexOf("$$$")){if(!window.console)throw"Error received from the server side: "+e;return void console.log("Error received from the server side: "+e)}var e=JSON.parse(e);if(e.CallBackRedirect)return void(document.location.href=e.CallBackRedirect);if("None"===e.UpdateType)return n.loadingStop(),void n.F();if(n.u(),"Full"===e.UpdateType&&(n.columns=e.Columns,n.days=e.Days,n.startDate=new DayPilot.Date(e.StartDate),n.heightSpec=e.HeightSpec?e.HeightSpec:n.heightSpec,n.businessBeginsHour=e.BusinessBeginsHour?e.BusinessBeginsHour:n.businessBeginsHour,n.businessEndsHour=e.BusinessEndsHour?e.BusinessEndsHour:n.businessEndsHour,n.headerDateFormat=e.HeaderDateFormat?e.HeaderDateFormat:n.headerDateFormat,n.viewType=e.ViewType,n.backColor=e.BackColor?e.BackColor:n.backColor,n.eventHeaderVisible=e.EventHeaderVisible?e.EventHeaderVisible:n.eventHeaderVisible,n.timeFormat=e.TimeFormat?e.TimeFormat:n.timeFormat,n.locale=e.Locale?e.Locale:n.locale,n.G()),e.Hashes)for(var i in e.Hashes)n.hashes[i]=e.Hashes[i];n.events.list=e.Events,n.H(),n.I(),"Full"===e.UpdateType&&(n.J(),n.K(),n.L(),n.M()),n.F(),n.N(),n.clearSelection(),n.afterRender(e.CallBackData,!0),n.loadingStop()},this.O=function(){return this.P()/36e5},this.Q=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.R=function(){return this.P()/18e5},this.P=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.Q():24,60*e*60*1e3},this.S=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.T=function(){return 2===n.api},this.eventClickCallBack=function(e,t){this.q("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.o("EventClick",t,e)},this.U=function(e){var t=this,i=t.event;if(n.T()){var a={};if(a.e=i,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.V.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"PostBack":n.eventClickPostBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.V.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"PostBack":n.eventClickPostBack(i);break;case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.W=function(e){var t=this.event;if(e.stopPropagation&&e.stopPropagation(),!t.client.rightClickEnabled())return!1;var i={};if(i.e=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventRightClick&&(n.onEventRightClick(i),i.preventDefault.value))return!1;switch(n.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(i),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.q("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.o("EventDelete",t,e)},this.X=function(e){if(n.T()){var t={};if(t.e=e,t.control=n,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.V.apply(function(){n.onEventDelete(t)}),t.preventDefault.value))return;switch(n.eventDeleteHandling){case"CallBack":n.eventDeleteCallBack(e);break;case"PostBack":n.eventDeletePostBack(e);break;case"Update":n.events.remove(e)}"function"==typeof n.onEventDeleted&&n.V.apply(function(){n.onEventDeleted(t)})}else switch(n.eventDeleteHandling){case"PostBack":n.eventDeletePostBack(e);break;case"CallBack":n.eventDeleteCallBack(e);break;case"JavaScript":n.onEventDelete(e)}},this.eventResizeCallBack=function(e,t,i,a){
|
|
11
|
+
if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.q("EventResize",a,n)},this.eventResizePostBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.o("EventResize",a,n)},this.f=function(e,t,i,a){var o=1,r=new Date,s=new Date,l=e.start(),d=e.end();if("top"===a){var c=l.getDatePart(),u=Math.floor((i-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.S()*60*1e3;r=c.addTime(f+m),s=e.end()}else if("bottom"===a){var c=d.getDatePart(),u=Math.floor((i+t-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.S()*60*1e3;r=l,s=c.addTime(f+m)}if(n.T()){var p={};if(p.e=e,p.control=n,p.newStart=r,p.newEnd=s,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.V.apply(function(){n.onEventResize(p)}),p.preventDefault.value))return;switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"Update":e.start(r),e.end(s),n.events.update(e)}"function"==typeof n.onEventResized&&n.V.apply(function(){n.onEventResized(p)})}else switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"JavaScript":n.onEventResize(e,r,s)}},this.eventMovePostBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,this.o("EventMove",n,o)},this.eventMoveCallBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,this.q("EventMove",n,o)},this.j=function(e,t,i,a){var o=1,r=Math.floor((i-o)/n.cellHeight),s=30*r*60*1e3,l=e.start(),d=e.end(),c=new Date;l instanceof DayPilot.Date&&(l=l.toDate()),c.setTime(Date.UTC(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()));var u=l.getTime()-(c.getTime()+3600*l.getUTCHours()*1e3+30*Math.floor(l.getUTCMinutes()/30)*60*1e3),h=d.getTime()-l.getTime(),f=this.Y[t],m=f.id,p=f.start.getTime(),v=new Date;v.setTime(p+s+u);var y=new DayPilot.Date(v),g=y.addTime(h);if(n.T()){var b={};if(b.e=e,b.newStart=y,b.newEnd=g,b.newResource=m,b.ctrl=a.ctrlKey,b.shift=a.shiftKey,b.control=n,b.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.V.apply(function(){n.onEventMove(b)}),b.preventDefault.value))return;switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"Update":e.start(y),e.end(g),e.resource(m),n.events.update(e)}"function"==typeof n.onEventMoved&&n.V.apply(function(){n.onEventMoved(b)})}else switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"JavaScript":n.onEventMove(e,y,g,f.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.o("TimeRangeSelected",a,n)},this.timeRangeSelectedCallBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.q("TimeRangeSelected",a,n)},this.k=function(e,t,i){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.T()){var a={};if(a.start=e,a.end=t,a.resource=i,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.V.apply(function(){n.onTimeRangeSelect(a)}),a.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t)}"function"==typeof n.onTimeRangeSelected&&n.V.apply(function(){n.onTimeRangeSelected(a)})}else switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t);break;case"JavaScript":n.onTimeRangeSelected(e,t)}},this.Z=function(e){if(!t.selecting&&"Disabled"!==n.timeRangeSelectedHandling){var i=e.which;if(1===i||0===i)return t.firstMousePos=DayPilot.mc(e),t.selecting={},t.selecting.calendar=n,t.selectedCells&&(n.clearSelection(),t.selectedCells=[]),t.column=t.getColumn(this),t.selectedCells.push(this),t.firstSelected=this,t.topSelectedCell=this,t.bottomSelectedCell=this,n._(),!1}},this._=function(){this.getSelection();!function(){var e=t.topSelectedCell,i=t.bottomSelectedCell,a=function(){if(e.data)return e.data.x;for(var t=e.parentNode.cells,i=0;i<t.length;i++)if(t[i]===e)return i;return-1}(),o=n.Y[a];if(o){var r=o.start,s=n.getPixels(e.start,r).boxTop,l=n.getPixels(i.end,r).boxBottom,d=l-s,c=function(){if(n.nav.activeSelection)return n.nav.activeSelection;var e=document.createElement("div");e.setAttribute("unselectable","on"),e.style.position="absolute",e.style.left="0px",e.style.width="100%";var t=document.createElement("div");return t.setAttribute("unselectable","on"),t.className=n.i("_shadow_inner"),e.appendChild(t),n.nav.events.rows[0].cells[a].selection.appendChild(e),n.elements.selection.push(e),n.nav.activeSelection=e,e}();c.className=n.i("_shadow"),c.firstChild.innerHTML="",c.style.top=s+"px",c.style.height=d+"px"}}()},this.aa=function(e){if("undefined"!=typeof t&&t.selecting){var i=DayPilot.mc(e);t.getColumn(this)===t.column&&(n.clearSelection(),i.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(this),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(this),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),n._())}},this.getSelection=function(){var e=t.topSelectedCell.start,i=t.bottomSelectedCell.end,a=t.topSelectedCell.resource;return new DayPilot.Selection(e,i,a,n)},this.ba=function(e){if(e<0)return null;for(var t=0,i=n.nav.events.rows[0].cells,a=0;a<i.length;a++){if(t+=i[a].offsetWidth,e<t)return a}return null},this.ca={},this.ca.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!n.coords)return null;e.x=n.ba(n.coords.x);var t=0,i=Math.floor((n.coords.y-t)/n.cellHeight);return e.y=i,e.x<0?null:e},this.columns={},this.columns.list=[],this.columns.load=function(e,t,i){if(!e)throw new DayPilot.Exception("columns.load(): 'url' parameter required");var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},o=function(e){var i,o=e.request;try{i=JSON.parse(o.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;n.columns.list=i,n.da&&n.update()}};n.columnsLoadMethod&&"POST"===n.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":o,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":o,"error":a})},this.G=function(){var e;e="Resources"!==n.viewType?this.ea():n.columns.list,this.Y=[];for(var t=0;t<e.length;t++){var i=this.fa(e[t]);this.Y.push(i)}},this.fa=function(e){var t={};return t.name=e.name,t.html=e.html,t.id=e.id,t.toolTip=e.toolTip,t.data=e,e.start?t.start=new DayPilot.Date(e.start):t.start=new DayPilot.Date(n.startDate),t.putIntoBlock=function(e){for(var t=0;t<this.blocks.length;t++){var i=this.blocks[t];if(i.overlapsWith(e.part.top,e.part.height))return i.events.push(e),i.min=Math.min(i.min,e.part.top),i.max=Math.max(i.max,e.part.top+e.part.height),t}var i=[];return i.lines=[],i.events=[],i.overlapsWith=function(e,t){return!(e+t-1<this.min||e>this.max-1)},i.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,a=this.length,n=0;n<a;n++){var o=this[n];if(!(i<o.part.top||e>o.part.top+o.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},i.events.push(e),i.min=e.part.top,i.max=e.part.top+e.part.height,this.blocks.push(i),this.blocks.length-1},t.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,a=this.length,n=0;n<a;n++){var o=this[n];if(!(i<o.part.top||e>o.part.top+o.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},t},this.ea=function(){var e=[],t=this.startDate.getDatePart(),i=this.days;switch(this.viewType){case"Day":i=1;break;case"Week":i=7,t=t.firstDayOfWeek(o.locale().weekStarts);break;case"WorkWeek":i=5,t=t.firstDayOfWeek(1)}"BusinessHoursNoScroll"===this.heightSpec&&(t=t.addHours(this.businessBeginsHour));for(var a=0;a<i;a++){var r=n.headerDateFormat?n.headerDateFormat:o.locale().datePattern,s={};s.start=t.addDays(a),s.name=s.start.toString(r,o.locale()),e.push(s)}return e},this.visibleStart=function(){if("Resources"===n.viewType){if(0===n.Y.length)return DayPilot.Date.today();var e=n.Y.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.Y[0].start},this.visibleEnd=function(){if("Resources"===n.viewType){if(0===n.Y.length)return DayPilot.Date.today().addDays(1);var e=n.Y.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var t=this.Y.length-1;return this.Y[t].start.addDays(1)},this.i=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.u=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],i=t.event;if(i&&(i.calendar=null),t.onclick=null,t.onclickSave=null,t.onmouseover=null,t.onmouseout=null,t.onmousemove=null,t.onmousedown=null,t.firstChild&&t.firstChild.firstChild&&t.firstChild.firstChild.tagName&&"IMG"===t.firstChild.firstChild.tagName.toUpperCase()){var a=t.firstChild.firstChild;a.onmousedown=null,a.onmousemove=null,a.onclick=null}t.helper=null,t.data=null,t.event=null,DayPilot.de(t)}this.elements.events=[]},this.ga=function(e){var i=e.cache||e.data,a=this.nav.events,o=document.createElement("div");o.style.position="absolute",o.style.left=e.part.left+"%",o.style.top=e.part.top+"px",o.style.width=e.part.width+"%",o.style.height=Math.max(e.part.height,2)+"px",o.style.overflow="hidden",o.data=e,o.event=e,o.unselectable="on",o.style.MozUserSelect="none",o.style.KhtmlUserSelect="none",o.className=this.i("_event"),i.cssClass&&DayPilot.Util.addClass(o,i.cssClass),o.isFirst=e.part.start.getTime()===e.start().getTime(),o.isLast=e.part.end.getTime()===e.end().getTime(),o.onclick=this.U,DayPilot.re(o,"contextmenu",this.W),o.onmouseout=function(e){o.deleteIcon&&(o.deleteIcon.style.display="none")},o.onmousemove=function(i){var a=5;if("undefined"!=typeof t){var r=DayPilot.mo3(o,i);if(r&&!t.resizing&&!t.moving){o.deleteIcon&&(o.deleteIcon.style.display="");var s=this.isLast;r.y<=a&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-r.y<=a&&e.client.resizeEnabled()?s?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==n.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},o.onmousedown=function(i){var a=i.which||i.button;if("n-resize"!==this.style.cursor&&"s-resize"!==this.style.cursor||1!==a){if(1===a&&e.client.moveEnabled()){t.moving=this,DayPilot.Global.moving=this,t.moving.event=this.event;var o=t.moving.helper={};o.oldColumn=n.Y[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(i),t.originalTop=this.offsetTop;var r=DayPilot.mo3(this,i);r?t.moveOffsetY=r.y:t.moveOffsetY=0,n.nav.top.style.cursor="move"}}else t.resizing=this,DayPilot.Global.resizing=this,t.originalMouse=DayPilot.mc(i),t.originalHeight=this.offsetHeight,t.originalTop=this.offsetTop,n.nav.top.style.cursor=this.style.cursor;return!1};var r=document.createElement("div");if(r.setAttribute("unselectable","on"),r.className=n.i("_event_inner"),r.innerHTML=e.client.html(),"darker"===i.borderColor&&i.backColor?r.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):r.style.borderColor=i.borderColor,i.backColor&&(r.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(r.style.filter="")),i.fontColor&&(r.style.color=i.fontColor),o.appendChild(r),e.client.barVisible()){var s=e.part.height-2,l=100*e.part.barTop/s,d=Math.ceil(100*e.part.barHeight/s),c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=this.i("_event_bar"),c.style.position="absolute",i.barBackColor&&(c.style.backgroundColor=i.barBackColor);var u=document.createElement("div");u.setAttribute("unselectable","on"),u.className=this.i("_event_bar_inner"),u.style.top=l+"%",0<d&&d<=1?u.style.height="1px":u.style.height=d+"%",i.barColor&&(u.style.backgroundColor=i.barColor),c.appendChild(u),o.appendChild(c)}if(e.client.deleteEnabled()){var h=document.createElement("div");h.style.position="absolute",h.style.right="2px",h.style.top="2px",h.style.width="17px",h.style.height="17px",h.className=n.i("_event_delete"),h.onmousedown=function(e){e.stopPropagation()},h.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&n.X(t)},h.style.display="none",o.deleteIcon=h,o.appendChild(h)}var f=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(o,e,{"areas":f}),a.rows[0].cells[e.part.dayIndex]){a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(o),n.ha(o)}n.elements.events.push(o)},this.ha=function(e){for(var t=e&&e.childNodes?e.childNodes.length:0,i=0;i<t;i++)try{var a=e.childNodes[i];1===a.nodeType&&(a.unselectable="on",this.ha(a))}catch(e){}},this.N=function(){for(var e=0;e<this.Y.length;e++){var t=this.Y[e];if(t.blocks)for(var i=0;i<t.blocks.length;i++)for(var a=t.blocks[i],n=0;n<a.lines.length;n++)for(var o=a.lines[n],r=0;r<o.length;r++){var s=o[r];s.part.width=100/a.lines.length,s.part.left=s.part.width*n;var l=n===a.lines.length-1;l||(s.part.width=1.5*s.part.width),this.ga(s)}}},this.ia=function(){this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.i("_main")),this.nav.top.style.MozUserSelect="none",this.nav.top.style.KhtmlUserSelect="none",this.nav.top.style.position="relative",this.nav.top.style.width=this.width?this.width:"100%",this.hideUntilInit&&(this.nav.top.style.visibility="hidden"),this.visible||(this.nav.top.style.display="none"),this.nav.scroll=document.createElement("div"),this.nav.scroll.style.height=this.ja()+"px","BusinessHours"===this.heightSpec?this.nav.scroll.style.overflow="auto":this.nav.scroll.style.overflow="hidden",this.nav.scroll.style.position="relative";var e=this.ka();this.nav.top.appendChild(e),this.nav.scroll.style.zoom=1;var t=this.la();this.nav.scrollable=t.firstChild,this.nav.scroll.appendChild(t),this.nav.top.appendChild(this.nav.scroll),this.nav.scrollLayer=document.createElement("div"),this.nav.scrollLayer.style.position="absolute",this.nav.scrollLayer.style.top="0px",this.nav.scrollLayer.style.left="0px",this.nav.top.appendChild(this.nav.scrollLayer),this.nav.loading=document.createElement("div"),this.nav.loading.style.position="absolute",this.nav.loading.style.top="0px",this.nav.loading.style.left=this.hourWidth+5+"px",this.nav.loading.style.backgroundColor=this.loadingLabelBackColor,this.nav.loading.style.fontSize=this.loadingLabelFontSize,this.nav.loading.style.fontFamily=this.loadingLabelFontFamily,this.nav.loading.style.color=this.loadingLabelFontColor,this.nav.loading.style.padding="2px",this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.display="none",this.nav.top.appendChild(this.nav.loading)},this.L=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this.ma(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.la=function(){var e=document.createElement("div");e.style.zoom=1,e.style.position="relative";var t=document.createElement("table");t.cellSpacing="0",t.cellPadding="0",t.border="0",t.style.border="0px none",t.style.width="100%",t.style.position="absolute";var i,a=t.insertRow(-1);i=a.insertCell(-1),i.valign="top",i.style.padding="0px",i.style.border="0px none",this.nav.hourTable=this.ma(),i.appendChild(this.nav.hourTable),i=a.insertCell(-1),i.valign="top",i.width="100%",i.style.padding="0px",i.style.border="0px none";var n=document.createElement("div");return n.style.position="relative",i.appendChild(n),n.appendChild(this.na()),n.appendChild(this.oa()),e.appendChild(t),this.nav.zoom=e,e},this.na=function(){var e=document.createElement("table");return e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.main=e,this.nav.events=e,e},this.oa=function(){var e=document.createElement("table");e.style.top="0px",e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.position="absolute",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.events=e;for(var t=this.Y,i=t.length,a=e.insertRow(-1),o=0;o<i;o++){var r=a.insertCell(-1);r.style.padding="0px",r.style.border="0px none",r.style.height="0px",r.style.overflow="visible",n.rtl||(r.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=n.columnMarginRight+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");r.selection=l,r.appendChild(s),r.appendChild(l)}return e},this.ma=function(){var e=document.createElement("table");e.cellSpacing="0",e.cellPadding="0",e.border="0",e.style.border="0px none",e.style.width=this.hourWidth+"px",e.oncontextmenu=function(){return!1};for(var t=n.O(),i=0;i<t;i++)this.pa(e,i);return e},this.pa=function(e,t){var i=2*this.cellHeight,a=e.insertRow(-1);a.style.height=i+"px";var r=a.insertCell(-1);r.valign="bottom",r.unselectable="on",r.style.cursor="default",r.style.padding="0px",r.style.border="0px none";var s=document.createElement("div");s.style.position="relative",s.className=this.i("_rowheader"),s.style.width=this.hourWidth+"px",s.style.height=i+"px",s.style.overflow="hidden",s.unselectable="on";var l=document.createElement("div");l.className=this.i("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(n.S()),u=c.getHours(),h=u<12,f=o.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var m=document.createElement("span");m.unselectable="on",m.className=this.i("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",m.innerHTML=p,d.appendChild(m),l.appendChild(d),s.appendChild(l),r.appendChild(s)},this.ja=function(){switch(this.heightSpec){case"Full":return 48*this.cellHeight;case"BusinessHours":var e=this.Q();return e*this.cellHeight*2;case"BusinessHoursNoScroll":var e=this.Q();return e*this.cellHeight*2;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.qa=function(){var e=n.nav.corner?n.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.ra();e.appendChild(t),n.nav.corner=t}},this.ka=function(){var e=document.createElement("div");e.style.overflow="auto";var t=document.createElement("table");t.cellPadding="0",t.cellSpacing="0",t.border="0",t.style.width="100%",t.style.borderCollapse="separate",t.style.border="0px none";var i=t.insertRow(-1),a=i.insertCell(-1);a.style.padding="0px",a.style.border="0px none";var n=this.ra();a.appendChild(n),this.nav.corner=n,a=i.insertCell(-1),a.style.width="100%",a.valign="top",a.style.position="relative",a.style.padding="0px",a.style.border="0px none",this.nav.header=document.createElement("table"),this.nav.header.cellPadding="0",this.nav.header.cellSpacing="0",this.nav.header.border="0",this.nav.header.width="100%",this.nav.header.style.tableLayout="fixed",this.nav.header.oncontextmenu=function(){return!1};var o="hidden"!==this.nav.scroll.style.overflow;if(a.appendChild(this.nav.header),o){a=i.insertCell(-1),a.unselectable="on";var r=document.createElement("div");r.unselectable="on",r.style.position="relative",r.style.width="16px",r.style.height=this.headerHeight+"px",r.className=this.i("_cornerright");var s=document.createElement("div");s.className=this.i("_cornerright_inner"),r.appendChild(s),a.appendChild(r),this.nav.cornerRight=r}return e.appendChild(t),e},this.ra=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.i("_corner"),e.style.width=this.hourWidth+"px",e.style.height=this.headerHeight+"px",e.oncontextmenu=function(){return!1};var t=document.createElement("div");return t.unselectable="on",t.className=this.i("_corner_inner"),e.appendChild(t),e},this.z=function(){var e=this.nav.main;e.root=null,e.onmouseup=null;for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],a=0;a<i.cells.length;a++){var n=i.cells[a];n.root=null,n.onmousedown=null,n.onmousemove=null,n.onmouseout=null,n.onmouseup=null}this.fasterDispose||DayPilot.pu(e)},this.K=function(){var e=this.nav.main,i=18e5,a=this.R(),o=n.Y;for(e&&this.z();e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.tableCreated=!0;for(var r=o.length,s=this.nav.events;s&&s.rows&&s.rows.length>0;)this.fasterDispose||DayPilot.pu(s.rows[0]),s.deleteRow(0);for(var r=o.length,l=s.insertRow(-1),d=0;d<r;d++){var c=l.insertCell(-1);c.style.padding="0px",c.style.border="0px none",c.style.height="0px",c.style.overflow="visible",n.rtl||(c.style.textAlign="left");var u=document.createElement("div");u.style.marginRight=n.columnMarginRight+"px",u.style.position="relative",u.style.height="1px",u.style.marginTop="-1px";var h=document.createElement("div");h.style.position="relative",c.selection=h,c.appendChild(u),c.appendChild(h)}for(var f=0;f<a;f++){var l=e.insertRow(-1);l.style.MozUserSelect="none",l.style.KhtmlUserSelect="none";for(var d=0;d<r;d++){var m=this.Y[d],c=l.insertCell(-1);c.start=m.start.addTime(f*i),c.end=c.start.addTime(i),c.resource=m.id,c.onmousedown=this.Z,c.onmouseup=function(){return!1},c.onclick=function(){return!1},c.root=this,c.style.padding="0px",c.style.border="0px none",c.style.verticalAlign="top",c.style.height=n.cellHeight+"px",c.style.overflow="hidden",c.unselectable="on";var u=document.createElement("div");u.unselectable="on",u.style.height=n.cellHeight+"px",u.style.position="relative",u.className=this.i("_cell");this.sa(c.start,c.end)&&DayPilot.Util.addClass(u,n.i("_cell_business"));var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.i("_cell_inner"),u.appendChild(p),c.appendChild(u),c.appendChild(u)}}e.root=this,n.nav.scrollable.onmousemove=function(e){var i=n.nav.scrollable;n.coords=DayPilot.mo3(i,e);var a=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=n.C(t.resizing,!1,n.shadow));var o=n.cellHeight,r=1,s=a.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=Math.floor((t.originalHeight+t.originalTop+s+o/2)/o)*o-t.originalTop+r;l<o&&(l=o);var d=n.nav.main.clientHeight;t.originalTop+l>d&&(l=d-t.originalTop),t.resizingShadow.style.height=l+"px"}else if("top"===t.resizing.dpBorder){var c=Math.floor((t.originalTop+s-r+o/2)/o)*o+r;c<r&&(c=r),c>t.originalTop+t.originalHeight-o&&(c=t.originalTop+t.originalHeight-o);var l=t.originalHeight-(c-t.originalTop);l<o?l=o:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(t.movingShadow||(t.movingShadow=n.C(t.moving,!n.n,n.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"),!n.coords)return;var o=n.cellHeight,r=1,u=t.moveOffsetY;u||(u=o/2);var c=Math.floor((n.coords.y-u-r+o/2)/o)*o+r;c<r&&(c=r);var h=n.nav.events,d=n.nav.main.clientHeight,f=parseInt(t.movingShadow.style.height);c+f>d&&(c=d-f),DayPilot.Util.addClass(t.moving,n.i("_event_moving_source")),t.movingShadow.parentNode.style.display="none",t.movingShadow.style.top=c+"px",t.movingShadow.parentNode.style.display="";var m=h.clientWidth/h.rows[0].cells.length,p=Math.floor((n.coords.x-45)/m);p<0&&(p=0),p<h.rows[0].cells.length&&p>=0&&t.movingShadow.column!==p&&(t.movingShadow.column=p,t.moveShadow(h.rows[0].cells[p]))}else if(t.selecting){var a=DayPilot.mc(e),v=n.ca.getCellCoords(),y=t.column,g=n.nav.main.rows[v.y].cells[y];a.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(g),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(g),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),n._()}},n.nav.scrollable.style.display=""},this.sa=function(e,t){return this.businessBeginsHour<this.businessEndsHour?!(e.getHours()<this.businessBeginsHour||e.getHours()>=this.businessEndsHour||6===e.getDayOfWeek()||0===e.getDayOfWeek()):e.getHours()>=this.businessBeginsHour||e.getHours()<this.businessEndsHour},this.A=function(){var e=this.nav.header;if(e&&e.rows)for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],a=0;a<i.cells.length;a++){var n=i.cells[a];n.onclick=null,n.onmousemove=null,n.onmouseout=null}this.fasterDispose||DayPilot.pu(e)},this.ta=function(e){for(var t=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],i=this.Y,a=i.length,o=0;o<a;o++){var r=i[o],s=e?t.insertCell(-1):t.cells[o];s.data=r,s.style.overflow="hidden",s.style.padding="0px",s.style.border="0px none",s.style.height=this.headerHeight+"px",s.onclick=n.ua;var l=e?document.createElement("div"):s.firstChild;if(e){l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",l.className=n.i("_colheader"),l.style.height=this.headerHeight+"px",n.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap");var d=document.createElement("div");d.className=n.i("_colheader_inner"),d.unselectable="on",l.appendChild(d),s.appendChild(l)}r.toolTip&&(d.title=r.toolTip);var d=l.firstChild;d.innerHTML=n.va(r.name,r.html)}},this.ua=function(e){if("Disabled"!==n.headerClickHandling){var t=this.data,i=n.wa(t),a={};a.header={},a.header.id=t.id,a.header.name=t.name,a.header.start=t.start,a.column=i,a.originalEvent=e,a.shift=e.shiftKey,a.ctrl=e.ctrlKey,a.meta=e.metaKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onHeaderClick&&(n.onHeaderClick(a),a.preventDefault.value)||"function"==typeof n.onHeaderClicked&&n.onHeaderClicked(a)}},this.wa=function(e){return new DayPilot.CalendarColumn(e,n)},this.xa=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.J=function(){var e=this.nav.header,t=!0,i=this.Y;for(i.length;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.ta(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var i={};i.command=e,this.q("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.ya=function(){var e=this.nav.scroll;e.onscroll||(e.onscroll=function(){n.za()});var t="undefined"!=typeof this.Aa.scrollpos?this.Aa.scrollpos:this.initScrollPos;t&&("Auto"===t&&(t="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),e.root=this,0===e.scrollTop&&(e.scrollTop=t))},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.Ba=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.Ca=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp),DayPilot.re(window,"unload",t.gUnload))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";t=e}n.events.list||(n.events.list=[]),n.events.list.push(t),n.update(),n.V.notify()},this.events.find=function(e){if(!n.events.list)return null;for(var t=0;t<n.events.list.length;t++){var i=n.events.list[t];if(i.id===e)return new DayPilot.Event(i,n)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=n.events.find(e.id);if(t){var i=DayPilot.indexOf(n.events.list,t.data);n.events.list.splice(i,1,e)}}n.update(),n.V.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=n.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=n.events.find(e);i&&(t=i.data)}var a=DayPilot.indexOf(n.events.list,t);n.events.list.splice(a,1),n.update(),n.V.notify()},this.events.load=function(e,t,i){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},o=function(e){var i,o=e.request;try{i=JSON.parse(o.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;n.events.list=i,n.da&&n.update()}};if(n.eventsLoadMethod&&"POST"===n.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":n.visibleStart().toString(),"end":n.visibleEnd().toString()},"url":e,"success":o,"error":a});else{var r=e,s="start="+n.visibleStart().toString()+"&end="+n.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":a})}},this.Da=function(){if(n.nav.top.className!==n.i("_main")){n.nav.top.className=n.i("_main");var e=n.nav.corner;e.className=n.i("_corner"),e.firstChild.className=n.i("_corner_inner");var t=n.nav.cornerRight;t&&(t.className=n.i("_cornerright"),t.firstChild.className=n.i("_cornerright_inner"))}},this.update=function(e){if(n.Ea(e),this.da){n.Fa(),n.u(),n.nav.top.style.cursor="auto";n.G(),n.J(),n.K(),n.L(),n.M(),n.qa(),n.Da(),n.Ga(),n.H(),n.I(),n.F(),n.N(),n.clearSelection(),this.visible?this.show():this.hide()}},this.Ha=null,this.Ea=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?n.events.list=e.list:n.events.list=e}},"columns":{"preInit":function(){n.columns.list=this.data}}};this.Ha=t;for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}else n[i]=e[i]}},this.Ia=function(){var e=this.Ha;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.Ja=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.Ka={},this.Ka.events=[],this.La=function(e){var t=this.Ka.events,i=this.events.list[e],a={};for(var n in i)a[n]=i[n];if("function"==typeof this.onBeforeEventRender){var o={};o.data=a,this.onBeforeEventRender(o)}t[e]=a},this.H=function(){var e=this.events.list;if(n.Ka.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,i=864e5;this.cache.pixels={};var a=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var o=0;o<t;o++){var r=e[o],s=r;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.");r.start=new DayPilot.Date(r.start),r.end=new DayPilot.Date(r.end)}if("function"==typeof this.onBeforeEventRender)for(var o=0;o<t;o++)this.La(o);for(var o=0;o<this.Y.length;o++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.Y[o];d.events=[],d.lines=[],d.blocks=[];for(var c=new DayPilot.Date(d.start),u=c.getTime(),h=c.addTime(i),f=h.getTime(),m=0;m<t;m++)if(!a[m]){var r=e[m],p=r.start,v=r.end,y=p.getTime(),g=v.getTime();if(!(g<y)){var b=!(g<=u||y>=f);if("Resources"===n.viewType&&(b=b&&d.id===r.resource),
|
|
12
|
+
b){var D=new DayPilot.Event(r,n);D.part.dayIndex=o,D.part.start=u<y?r.start:c,D.part.end=f>g?r.end:h;var x=this.getPixels(D.part.start,d.start),w=this.getPixels(D.part.end,d.start),C=x.top,P=w.top;if(C===P&&(x.cut||w.cut))continue;var _=w.boxBottom;D.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,D.part.height=Math.max(Math.ceil(_/this.cellHeight)*this.cellHeight-D.part.top,this.cellHeight-1)+1,D.part.barTop=Math.max(C-D.part.top-1,0),D.part.barHeight=Math.max(P-C-2,1);var p=D.part.top,v=D.part.top+D.part.height;p>l.maxStart&&(l.maxStart=p),v<l.minEnd&&(l.minEnd=v),p<this.minStart&&(this.minStart=p),v>this.maxEnd&&(this.maxEnd=v),d.events.push(D),"function"==typeof this.onBeforeEventRender&&(D.cache=this.Ka.events[m]),D.part.start.getTime()===y&&D.part.end.getTime()===g&&(a[m]=!0)}}}}for(var o=0;o<this.Y.length;o++){var d=this.Y[o];d.events.sort(this.Ma);for(var m=0;m<d.events.length;m++){var r=d.events[m];d.putIntoBlock(r)}for(var m=0;m<d.blocks.length;m++){var k=d.blocks[m];k.events.sort(this.Ma);for(var S=0;S<k.events.length;S++){var r=k.events[S];k.putIntoLine(r)}}}}},this.Ma=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.debug=function(e,t){this.debuggingEnabled&&(n.debugMessages||(n.debugMessages=[]),n.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var i=t.getTime(),a=e.getTime(),n=this.cache.pixels[a+"_"+i];if(n)return n;i=t.getTime();var o=18e5,r=a-i,s=r%o,l=r-s,d=l+o;0===s&&(d=l);var c={};return c.cut=!1,c.top=this.Na(r),c.boxTop=this.Na(l),c.boxBottom=this.Na(d),this.cache.pixels[a+"_"+i]=c,c},this.Na=function(e){return Math.floor(this.cellHeight*e/18e5)},this.Fa=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.I=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.M=function(){var e=this.ja();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.V={},this.V.scope=null,this.V.notify=function(){n.V.scope&&n.V.scope["$apply"]()},this.V.apply=function(e){e()},this.za=function(){if(n.nav.scroll){var e=n.nav.scroll.scrollTop,t=e/(2*n.cellHeight);n.Aa.scrollHour=t}},this.Ga=function(){var e=0;n.Aa.scrollHour?e=2*n.cellHeight*n.Aa.scrollHour:"Auto"===n.initScrollPos&&(e="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),n.nav.scroll.scrollTop=e},this.Oa=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.F=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){n.visible=!0,n.nav.top.style.display=""},this.hide=function(){n.visible=!1,n.nav.top.style.display="none"},this.Pa=function(){this.Fa(),this.G(),this.ia(),this.J(),this.K(),this.Ba(),this.ya(),this.Ca(),t.register(this),this.Qa(),this.q("Init")},this.Aa={},this.Ra=function(){this.Aa.themes=[],this.Aa.themes.push(this.theme||this.cssClassPrefix)},this.Sa=function(){for(var e=this.Aa.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.Aa.themes=[]},this.Ta=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.Ua=function(){if("function"==typeof this.onInit&&!this.Va){this.Va=!0;var e={};this.onInit(e)}},this.Wa=function(){var e=n.nav.top;return e.offsetWidth>0&&e.offsetHeight>0},this.Qa=function(){var e=n.Wa;e()||(n.Xa=setInterval(function(){e()&&(n.ya(),n.Ba(),clearInterval(n.Xa))},100))},this.va=function(e,t){return n.D.E()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=n.Ea,this.internal.xssTextHtml=n.va,this.init=function(){this.Ja();var e=this.Oa();return this.Ra(),e?void this.Pa():(this.Fa(),this.G(),this.H(),this.ia(),this.J(),this.K(),this.F(),this.Ba(),this.ya(),this.Ca(),t.register(this),this.events&&(this.I(),this.N()),this.Ta(),this.Ua(),this.Qa(),this.da=!0,this)},this.Init=this.init,this.Ea(i)},DayPilot.CalendarColumn=function(e,t){var i=this;i.id=e.id,i.name=e.name,i.data=e.data,i.start=new DayPilot.Date(e.start),i.calendar=t,i.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Calendar(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Calendar(i[0]);n.V.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(s);var l=t["$watch"],d=a["config"]||a["daypilotConfig"],c=a["events"]||a["daypilotEvents"];l.call(t,d,function(e){for(var t in e)n[t]=e[t];n.update(),n.Ua()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}()}}(),"undefined"==typeof DayPilot)var DayPilot={};if(function(){"undefined"!=typeof DayPilot.DatePicker&&DayPilot.DatePicker.close||(DayPilot.DatePicker=function(e){this.v="2023.1.450-lite";var t="navigator_"+(new Date).getTime(),i=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.D.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,e)for(var t in e)this[t]=e[t]},this.init=function(){this.date=new DayPilot.Date(this.date);var e=this.Ya();this.resetTarget&&!e?this.Za(this.date):this.resetTarget||(i.date=e);var t=this.$a();return t&&t.addEventListener("input",function(){i.date=i.Ya(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.Wa&&(this.Wa=!1,this.navigator&&this.navigator.dispose(),this.div.innerHTML="",this.div&&this.div.parentNode===document.body&&document.body.removeChild(this.div))},this.setDate=function(e){this.date=new DayPilot.Date(e),this.Za(this.date)},this.Ya=function(){var e=this.$a();if(!e)return this.date;var t=null;if(t="INPUT"===e.tagName?e.value:e.innerText,!t)return null;for(var a=DayPilot.Date.parse(t,i.pattern),n=0;n<i.patterns.length;n++){if(a)return a;a=DayPilot.Date.parse(t,i.patterns[n])}return a},this.Za=function(e){var t=this.$a();if(t){var a=e.toString(i.pattern,i.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this.D={},this.D.locale=function(){return DayPilot.Locale.find(i.locale)},this.$a=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return i.Wa}}),this.show=function(){if(!this.Wa){var e=this.$a(),a=this.navigator,a=new DayPilot.Navigator(t);a.api=2,a.cssOnly=!0,a.theme=i.theme,a.weekStarts="Auto",a.locale=i.locale,a.onTimeRangeSelected=function(e){i.date=e.start;var t=e.start.addTime(a._a),n=t.toString(i.pattern,i.locale),e={};e.start=t,e.date=t,e.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(e),e.preventDefault.value)||(i.Za(n),i.close(),"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(e))},this.navigator=a;var n=DayPilot.abs(e),o=e.offsetHeight,r=i.targetAlignment,s=document.createElement("div");s.style.position="absolute","left"===r&&(s.style.left=n.x+"px"),s.style.top=n.y+o+"px",i.zIndex&&(s.style.zIndex=i.zIndex);var l=document.createElement("div");l.id=t,s.appendChild(l),s.addEventListener("mousedown",function(e){var e=e||window.event;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}),document.body.appendChild(s),this.div=s;var d=i.Ya()||(new DayPilot.Date).getDatePart();if(a.startDate=d,a._a=d.getTimePart(),a.selectionDay=d.getDatePart(),a.init(),"right"===r){var c=n.x+e.offsetWidth-a.nav.top.offsetWidth;s.style.left=c+"px"}this.Wa=!0,this.onShow&&this.onShow()}},this.prepare(),this.init()})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(i){var a=this,n=null;this.v="2023.1.450-lite",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null,this.ab=function(){},i&&DayPilot.isArray(i)&&(this.items=i),this.toJSON=function(){return null},this.show=function(i,o){o=o||{};var r=null;if(i?"string"==typeof i.id||"number"==typeof i.id?r=i.id:"function"==typeof i.id?r=i.id():"function"==typeof i.value&&(r=i.value()):r=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),o.submenu||t.menuClean(),this.ab.submenu=null,null!==t.mouse){a.cssOnly||(a.cssOnly=!0);var s=null;if(i&&i.isRow&&i.$.row.task?(s=new DayPilot.Task(i.$.row.task,i.calendar),s.menuType="resource"):s=i&&i.isEvent&&i.data.task?new DayPilot.Task(i,i.calendar):i,"function"==typeof a.onShow){var l={};if(l.source=s,l.menu=a,l.preventDefault=function(){l.preventDefault.value=!0},a.onShow(l),l.preventDefault.value)return}var d=document.createElement("div");if(d.style.position="absolute",d.style.top="0px",d.style.left="0px",d.style.display="none",d.style.overflow="hidden",d.style.zIndex=this.zIndex+1,d.className=this.bb("main"),d.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(d.onmousemove=function(e){clearTimeout(t.hideTimeout)},d.onmouseleave=function(e){a.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var c=document.createElement("div");c.innerHTML=this.menuTitle,c.className=this.bb("title"),d.appendChild(c)}for(var u=0;u<this.items.length;u++){var h=this.items[u],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.bb("item")),h.items&&(DayPilot.Util.addClass(f,this.bb("item_haschildren")),DayPilot.Util.addClass(d,this.bb("withchildren"))),"undefined"!=typeof h&&!h.hidden){if("-"===h.text){var m=document.createElement("div");m.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(m)}else{var p=document.createElement("a");if(p.style.position="relative",p.style.display="block",h.cssClass&&DayPilot.Util.addClass(p,h.cssClass),h.disabled)DayPilot.Util.addClass(p,a.bb("item_disabled"));else{if(h.onclick||h.onClick){p.item=h,p.onclick=function(e,t){return function(i){if("function"==typeof e.onClick){var a={};if(a.item=e,a.source=t.source,a.originalEvent=i,a.preventDefault=function(){a.preventDefault.value=!0},e.onClick(a),a.preventDefault.value)return}e.onclick&&e.onclick.call(t,i)}}(h,p);var v=function(e,i){return function(a){a.stopPropagation(),a.preventDefault();var n=function(){window.setTimeout(function(){i.source.calendar.internal.touch.active=!1},500)};if("function"==typeof e.onClick){var o={};if(o.item=e,o.source=i.source,o.originalEvent=a,o.preventDefault=function(){o.preventDefault.value=!0},e.onClick(o),o.preventDefault.value)return void n()}e.onclick&&e.onclick.call(i,a),t.menuClean(),n()}};DayPilot.reNonPassive(p,"touchstart",function(e){e.stopPropagation(),e.preventDefault(),p.source.calendar.internal.touch.active=!0}),DayPilot.reNonPassive(p,"touchend",v(h,p))}if(h.items&&!h.disabled){var y=function(e,t){return function(i){i.preventDefault(),i.stopPropagation(),a.cb(e,t)}};p.ontouchend=y(h,p)}if(h.onclick)e();else if(h.href)p.href=h.href.replace(/\x7B0\x7D/gim,r),h.target&&p.setAttribute("target",h.target);else if(h.command){var y=function(e,t){return function(i){var a=t.source,n=e;n.action=n.action?n.action:"CallBack";var o=a.calendar||a.root;if(a instanceof DayPilot.Link)return void o.internal.linkMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Event)return void o.internal.eventMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Task)return void("resource"===a.menuType?o.internal.resourceHeaderMenuClick(n.command,t.menuSource,n.action):o.internal.eventMenuClick(n.command,t.menuSource,n.action));switch(a.menuType){case"resource":return void o.internal.resourceHeaderMenuClick(n.command,a,n.action);case"selection":return void o.internal.timeRangeMenuClick(n.command,a,n.action);default:return void o.internal.eventMenuClick(n.command,a,n.action)}i.preventDefault()}};p.onclick=y(h,p),p.ontouchend=y(h,p)}}h.items&&p.addEventListener("click",function(e){e.stopPropagation()}),p.source=s,p.menuSource=i;var g=document.createElement("span");if(g.className=a.bb("item_text"),g.innerHTML=DayPilot.Util.escapeTextHtml(h.text,h.html),p.appendChild(g),h.image){var b=document.createElement("img");b.src=h.image,b.style.position="absolute",b.style.top="0px",b.style.left="0px",p.appendChild(b)}if(h.icon){var D=document.createElement("span");D.className=a.bb("item_icon");var x=document.createElement("i");x.className=h.icon,D.appendChild(x),p.appendChild(D)}if(h.symbol){var w="http://www.w3.org/2000/svg",C=document.createElementNS(w,"svg");C.setAttribute("width","100%"),C.setAttribute("height","100%");var P=document.createElementNS(w,"use");P.setAttribute("href",h.symbol),C.appendChild(P);var _=document.createElement("span");_.className=a.bb("item_symbol"),_.style.position="absolute",_.style.top="0px",_.style.left="0px",_.appendChild(C),p.appendChild(_)}var k=function(e,i){return function(){var n=(i.source,e),o=t.waitingSubmenu;if(o){if(o.parent===n)return;clearTimeout(o.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=n,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,a.cb(n,i)},300))}};p.onmouseover=k(h,p),f.appendChild(p)}d.appendChild(f)}}var S=function(e){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};d.onclick=S,d.ontouchend=S,d.onmousedown=function(e){e=e||window.event,e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},d.oncontextmenu=function(){return!1},document.body.appendChild(d),a.ab.visible=!0,a.ab.source=i,d.style.display="";var M=d.offsetHeight,T=d.offsetWidth;d.style.display="none";var A=document.documentElement.clientHeight,H=window.innerWidth,E="number"==typeof o.windowMargin?o.windowMargin:5;if(function(){var e=o.initiator;if(e){var t=e.div,i=e.e,a=e.area,r=a.visibility||a.v||"Visible",s=e.a;if("Visible"!==r&&(s=DayPilot.Areas.createArea(t,i,a),t.appendChild(s),n=s),s){var l=DayPilot.abs(s);o.x=l.x,o.y=l.y+l.h+2}}}(),function(){var e="number"==typeof o.x?o.x:t.mouse.x+1,i="number"==typeof o.y?o.y:t.mouse.y+1,a=document.body.scrollTop||document.documentElement.scrollTop,n=document.body.scrollLeft||document.documentElement.scrollLeft;if(i-a>A-M&&0!==A){var r=i-a-(A-M)+E;d.style.top=i-r+"px"}else d.style.top=i+"px";if("right"===o.align&&(e-=T),e-n>H-T&&0!==H){var s=e-n-(H-T)+E;d.style.left=e-s+"px"}else d.style.left=e+"px"}(),o.parentLink){var N=o.parentLink,I=parseInt(new DayPilot.StyleReader(d).get("border-top-width")),z=DayPilot.abs(o.parentLink.parentNode),O=z.x+N.offsetWidth,U=z.y-I;O+T>H&&(O=Math.max(0,z.x-T));var L=document.body.scrollTop+document.documentElement.scrollTop;U+M-L>A&&(U=Math.max(0,A-M+L)),d.style.left=O+"px",d.style.top=U+"px"}d.style.display="",this.addShadow(d),this.ab.div=d,o.submenu||(DayPilot.Menu.active=this)}},this.cb=function(e,t){var i=e,n=t.source;if((!a.ab.submenu||a.ab.submenu.item!==e)&&(a.ab.submenu&&a.ab.submenu.item!==e&&(DayPilot.Util.removeClass(a.ab.submenu.link.parentNode,a.bb("item_haschildren_active")),a.ab.submenu.menu.hide(),a.ab.submenu=null),e.items)){var o=a.cloneOptions();o.items=e.items,a.ab.submenu={},a.ab.submenu.menu=new DayPilot.Menu(o),a.ab.submenu.menu.db=a,a.ab.submenu.menu.show(n,{"submenu":!0,"parentLink":t,"parentItem":i}),a.ab.submenu.item=e,a.ab.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.bb("item_haschildren_active"))}},this.bb=function(e){var t=this.theme||this.cssClassPrefix,i=this.cssOnly?"_":"";return t?t+i+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(o,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.ab.submenu&&this.ab.submenu.menu.hide();var i=t.waitingSubmenu;if(i&&(t.waitingSubmenu=null,clearTimeout(i.timeout)),this.removeShadow(),this.ab.div&&this.ab.div.parentNode===document.body&&document.body.removeChild(this.ab.div),n&&(DayPilot.de(n),n=null),a.ab.visible=!1,a.ab.source=null,a.db&&e.hideParent&&a.db.hide(e),DayPilot.Menu.active===a&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var o={};this.onHide(o)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){a.hide(e)},a.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(e){},this.removeShadow=function(){};var o=DayPilot.isArray(i)?null:i;if(o)for(var r in o)this[r]=o[r]},DayPilot.MenuBar=function(e,t){var i=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=DayPilot.list(),this.eb=null,this.da=!1;for(var a in t)this[a]=t[a];this.fb=function(e){return this.theme+"_"+e},this.F=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.fb("main"),DayPilot.list(i.items).forEach(function(e){var a=document.createElement("span");a.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),a.className=i.fb("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(i.active&&i.active.item===e)i.gb();else if(e.children)return void i.hb(a);if("function"==typeof e.onClick){var n={};n.item=e,n.originalEvent=t,e.onClick(n)}},a.onmousedown=function(e){e.stopPropagation()},a.onmouseover=function(){i.active&&i.active.item!==e&&i.hb(a)},t.appendChild(a),i.elements.items.push(a)})},this.gb=function(){var e=i.fb("item_active");i.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),i.active&&i.active.menu&&i.active.menu.hide(),i.active=null},this.ib=function(e){return!!i.active&&i.active.item===e.data},this.hb=function(e){if(!i.ib(e)){i.gb();var t=e.data,a=i.active={};a.item=t,a.div=e;var n=i.fb("item_active");DayPilot.Util.addClass(e,n);var o=DayPilot.abs(e);if(t.children){a.menu=new DayPilot.Menu({"items":t.children});var r=o.x;"right"===t.align&&(r+=o.w),a.menu.show(null,{"x":r,"y":o.y+o.h,"align":t.align,"windowMargin":i.windowMargin})}DayPilot.MenuBar.active=i}},this.init=function(){return this.F(),this.da=!0,this},this.dispose=function(){this.da&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.gb(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(e){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],i={};return i.x=t.pageX,i.y=t.pageY,i},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var i=DayPilot.Menu.active;if(i){var a=i.ab.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot),"undefined"==typeof DayPilot&&(DayPilot={}),function(DayPilot){"use strict";function e(t,i,a){var n=i.indexOf(".");if(n===-1)return void("__proto__"!==i&&"constructor"!==i&&(t[i]=a));var o=i.substring(0,n);if("__proto__"!==o&&"constructor"!==o){var r=i.substring(n+1),s=t[o];"object"==typeof s&&null!==s||(t[o]={},s=t[o]),e(s,r,a)}}function t(e,i,a){i=i||{},a=a||"";for(var n in e){var o=e[n];"object"==typeof o?"[object Array]"===Object.prototype.toString.call(o)?i[a+n]=o:o&&o.toJSON?i[a+n]=o.toJSON():t(o,i,a+n+"."):i[a+n]=o}return i}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return void t.splice(i,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var i=function(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,i={};return i.rules=[],i.commit=function(){try{t&&(e.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},i.add=function(i,a,n){if(t)return void this.rules.push(i+"{"+a+"}");if(e.sheet.insertRule)"undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(i+"{"+a+"}",n);else{if(!e.sheet.addRule)throw"No CSS registration method found";e.sheet.addRule(i,a,n)}},i},a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new i;n.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),n.add(".modal_default_main:focus","outline: none;"),n.add(".modal_default_content","padding: 10px 0px;"),n.add(".modal_default_inner","padding: 20px;"),n.add(".modal_default_input","padding: 10px 0px;"),n.add(".modal_default_buttons","margin-top: 10px;"),n.add(".modal_default_buttons","padding: 10px 0px;"),n.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),n.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),n.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),n.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),n.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item label","display: block;"),n.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item_label","margin: 2px 0px;"),n.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),n.add(".modal_default_form_item_invalid",""),n.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),n.add(".modal_default_background","opacity: 0.5; background-color: #000;"),n.add(".modal_default_ok","padding: 3px; width: 80px;"),n.add(".modal_default_cancel","padding: 3px; width: 80px;"),n.add(".modal_default_form_item_date","position: relative;"),n.add(".modal_default_form_item_date:after","content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url("+"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg=="+")"),navigator.userAgent.indexOf("Edge")!==-1&&n.add(".modal_default_form_item_date input::-ms-clear","display: none;"),n.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),n.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),n.add(".modal_default_form_item_searchable","position: relative;"),n.add(".modal_default_form_item_searchable_icon",""),n.add(".modal_default_form_item_searchable_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+a+");"),n.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_time","position: relative;"),n.add(".modal_default_form_item_time_icon",""),n.add(".modal_default_form_item_time_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+a+");"),
|
|
13
|
+
n.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_datetime_parent","display: flex;"),n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),n.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),n.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),n.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),n.add(".modal_default_form_item_tabular_row","display: table-row;"),n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),n.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),n.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]","width:100%; box-sizing: border-box;"),n.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),n.add(".modal_default_form_item_tabular_plus","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),n.add(".modal_default_form_item_tabular_plus:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),n.add(".modal_default_form_item_tabular_delete","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),n.add(".modal_default_form_item_tabular_delete:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),n.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),n.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),n.add(".modal_min_background","opacity: 0.5; background-color: #000;"),n.add(".modal_min_ok","padding: 3px 10px;"),n.add(".modal_min_cancel","padding: 3px 10px;"),n.add(".navigator_modal_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),n.add(".navigator_modal_month","font-size: 11px;"),n.add(".navigator_modal_day","color: black;"),n.add(".navigator_modal_weekend","background-color: #f0f0f0;"),n.add(".navigator_modal_dayheader","color: black;"),n.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),n.add(".navigator_modal_dayother","color: gray;"),n.add(".navigator_modal_todaybox","border: 1px solid red;"),n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),n.add(".navigator_modal_busy","font-weight: bold;"),n.add(".navigator_modal_cell","text-align: center;"),n.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),n.add(".navigator_modal_title","text-align: center;"),n.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),n.add(".navigator_modal_dayheader","text-align: center;"),n.add(".navigator_modal_weeknumber","text-align: center;"),n.add(".navigator_modal_cell_text","cursor: pointer;"),n.commit(),DayPilot.Modal=function(e){this.autoFocus=!0,this.focus=null,this.autoStretch=!0,this.autoStretchFirstLoadOnly=!1,this.className=null,this.theme="modal_default",this.disposeOnClose=!0,this.dragDrop=!0,this.loadingHtml=null,this.maxHeight=null,this.scrollWithPage=!0,this.useIframe=!0,this.zIndex=99999,this.left=null,this.width=600,this.top=20,this.height=200,this.locale=null,this.closed=null,this.onClose=null,this.onClosed=null,this.onShow=null;var t=this;this.id="_"+(new Date).getTime()+"n"+10*Math.random(),this.jb=!1,this.kb=null,this.lb=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.mb(),this.nb(),this.useIframe){var t=function(e,t){return function(){e.setInnerHTML(e.id+"iframe",t)}};window.setTimeout(t(this,e),0)}else e.nodeType?this.div.appendChild(e):this.div.innerHTML=e;this.nb(),this.ob(),this.pb()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.mb();var i=this.loadingHtml;i&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",i)),this.re(this.iframe,"load",this.qb),this.iframe.src=e,this.nb(),this.ob(),this.pb()}else t.rb({"url":e,"success":function(e){var i=e.request.responseText;t.showHtml(i)},"error":function(e){t.showHtml("Error loading the modal dialog")}})},this.pb=function(){if("function"==typeof t.onShow){var e={};e.root=t.sb(),e.modal=t,t.onShow(e)}},this.sb=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.rb=function(e){var t=new XMLHttpRequest;if(t){var i=e.method||"GET",a=e.success||function(){},n=e.error||function(){},o=e.data,r=e.url;t.open(i,r,!0),t.setRequestHeader("Content-type","text/plain"),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||304===t.status){var e={};e.request=t,a(e)}else if(n){var e={};e.request=t,n(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&("object"==typeof o&&(o=JSON.stringify(o)),t.send(o))}},this.nb=function(){delete this.result;var e=window,i=document,a=e.pageYOffset?e.pageYOffset:i.documentElement&&i.documentElement.scrollTop?i.documentElement.scrollTop:i.body.scrollTop;this.theme&&(this.hideDiv.className=this.theme+"_background"),this.zIndex&&(this.hideDiv.style.zIndex=this.zIndex),this.hideDiv.style.display="",window.setTimeout(function(){t.hideDiv&&(t.hideDiv.onclick=function(){t.hide({"backgroundClick":!0})})},500),this.theme?this.div.className=this.theme+"_main":this.div.className="",this.className&&(this.div.className+=" "+this.className),this.left?this.div.style.left=this.left+"px":this.div.style.marginLeft="-"+Math.floor(this.width/2)+"px",this.div.style.position="absolute",this.div.style.boxSizing="content-box",this.div.style.top=a+this.top+"px",this.div.style.width=this.width+"px",this.zIndex&&(this.div.style.zIndex=this.zIndex),this.height&&(this.useIframe||!this.autoStretch?this.div.style.height=this.height+"px":this.div.style.height=""),this.useIframe&&this.height&&(this.iframe.style.height=this.height+"px"),this.div.style.display="",this.ub(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.qb=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.tb().y},i=function(){return t.tb().x};if(this.useIframe){for(var a=i()-40,n=this.width;n<a&&this.vb();n+=10)this.div.style.width=n+"px",this.div.style.marginLeft="-"+Math.floor(n/2)+"px";for(var o=this.maxHeight||e()-2*this.top,r=this.height;r<o&&this.wb();r+=10)this.iframe.style.height=r+"px",this.div.style.height=r+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.qb)}else this.div.style.height=""},this.vb=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,i=t.scrollWidth,a=e.body.children,n=0;n<a.length;n++){var o=a[n].offsetLeft+a[n].offsetWidth;i=Math.max(i,o)}return i>t.clientWidth},this.wb=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,i=t.scrollHeight,a=e.body.children,n=0;n<a.length;n++){var o=a[n].offsetTop+a[n].offsetHeight;i=Math.max(i,o)}return i>t.clientHeight},this.tb=function(){var e=document;if("CSS1Compat"===e.compatMode&&e.documentElement&&e.documentElement.clientWidth){var t=e.documentElement.clientWidth,i=e.documentElement.clientHeight;return{x:t,y:i}}var t=e.body.clientWidth,i=e.body.clientHeight;return{x:t,y:i}},this.ob=function(){this.jb||(this.re(window,"resize",this.xb),this.re(window,"scroll",this.yb),this.dragDrop&&(this.re(document,"mousemove",this.zb),this.re(document,"mouseup",this.Ab)),this.jb=!0)},this.Bb=function(){this.ue(window,"resize",this.xb),this.ue(window,"scroll",this.yb),this.dragDrop&&(this.ue(document,"mousemove",this.zb),this.ue(document,"mouseup",this.Ab)),this.jb=!1},this.Cb=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.Db(),t.lb=t.mc(e||window.event),t.kb={x:t.div.offsetLeft,y:t.div.offsetTop})},this.zb=function(e){if(t.lb){var e=e||window.event,i=t.mc(e),a=i.x-t.lb.x,n=i.y-t.lb.y;t.div.style.marginLeft="0px",t.div.style.top=t.kb.y+n+"px",t.div.style.left=t.kb.x+a+"px"}},this.Ab=function(e){t.lb&&(t.Eb(),t.div.style.cursor=null,t.lb=null)},this.Db=function(){if(this.useIframe){var e=document.createElement("div");e.style.backgroundColor="#ffffff",e.style.filter="alpha(opacity=80)",e.style.opacity="0.80",e.style.width="100%",e.style.height=this.height+"px",e.style.position="absolute",e.style.left="0px",e.style.top="0px",this.div.appendChild(e),this.mask=e}},this.Eb=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.xb=function(){t.Fb(),t.ub()},this.yb=function(){t.Fb()},this.ub=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.Fb=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.Gb.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.Gb={},this.Gb.container=function(){return t.container||document.body},this.Gb.scrollY=function(){var e=t.Gb.container();return e===document.body?window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop:e.scrollTop},this.re=function(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i)},this.ue=function(e,t,i){e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent&&e.detachEvent("on"+t,i)},this.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},this.abs=function(e){for(var t={x:e.offsetLeft,y:e.offsetTop};e.offsetParent;)e=e.offsetParent,t.x+=e.offsetLeft,t.y+=e.offsetTop;return t},this.mb=function(){var e=t.Gb.container(),i=e===document.body,a=i?"fixed":"absolute",n=document.createElement("div");n.id=this.id+"hide",n.style.position=a,n.style.left="0px",n.style.top="0px",n.style.right="0px",n.style.bottom="0px",n.oncontextmenu=function(){return!1},n.onmousedown=function(){return!1},e.appendChild(n);var o=document.createElement("div");o.id=this.id+"popup",o.style.position=a,o.style.left="50%",o.style.top="0px",o.style.backgroundColor="white",o.style.width="50px",o.style.height="50px",this.dragDrop&&(o.onmousedown=this.Cb),o.addEventListener("keydown",function(e){e.stopPropagation()});var r=null;this.useIframe&&(r=document.createElement("iframe"),r.id=this.id+"iframe",r.name=this.id+"iframe",r.frameBorder="0",r.style.width="100%",r.style.height="50px",o.appendChild(r)),e.appendChild(o),this.div=o,this.iframe=r,this.hideDiv=n},this.setInnerHTML=function(e,i){var a=window.frames[e],n=a.contentWindow||a.document||a.contentDocument;n.document&&(n=n.document),null==n.body&&n.write("<body></body>"),i.nodeType?n.body.appendChild(i):n.body.innerHTML=i,t.autoStretch&&(t.autoStretchFirstLoadOnly&&t.Hb||(t.stretch(),t.Hb=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.sb(),i=e.querySelectorAll("input, textarea, select"),a={},n=0;n<i.length;n++){var o=i[n],r=o.name;if(r){var s=o.value;a[r]=s}}t.close(a)},this.hide=function(e){e=e||{};var i={};i.backgroundClick=!!e.backgroundClick,i.result=this.result,i.canceled="undefined"==typeof this.result,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof this.onClose&&(this.onClose(i),i.preventDefault.value)||(this.div&&(this.div.style.display="none",this.hideDiv.style.display="none",this.useIframe||(this.div.innerHTML=null)),window.focus(),DayPilot.ModalStatic.remove(this),"function"==typeof this.onClosed?this.onClosed(i):this.closed&&this.closed(),delete this.result,this.disposeOnClose&&(t.Bb(),t.Ib(t.div),t.Ib(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.Ib=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},this.Jb=function(){if(e)for(var t in e)this[t]=e[t]},this.Jb()},DayPilot.Modal.alert=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var i=t.okText||"OK";t.cancelText||"Cancel";return DayPilot.getPromise(function(a,n){t.onClosed=function(e){a(e)};var o=new DayPilot.Modal(t),r=document.createElement("div");r.className=o.theme+"_inner";var s=document.createElement("div");s.className=o.theme+"_content",s.innerHTML=e;var l=document.createElement("div");l.className=o.theme+"_buttons";var d=document.createElement("button");d.innerText=i,d.className=o.theme+"_ok",d.onclick=function(e){DayPilot.ModalStatic.close("OK")},l.appendChild(d),r.appendChild(s),r.appendChild(l),o.showHtml(r),o.autoFocus&&d.focus()})},DayPilot.Modal.confirm=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var i=t.okText||"OK",a=t.cancelText||"Cancel";return DayPilot.getPromise(function(n,o){t.onClosed=function(e){n(e)};var r=new DayPilot.Modal(t),s=document.createElement("div");s.className=r.theme+"_inner";var l=document.createElement("div");l.className=r.theme+"_content",l.innerHTML=e;var d=document.createElement("div");d.className=r.theme+"_buttons";var c=document.createElement("button");c.innerText=i,c.className=r.theme+"_ok",c.onclick=function(e){DayPilot.ModalStatic.close("OK")};var u=document.createTextNode(" "),h=document.createElement("button");h.innerText=a,h.className=r.theme+"_cancel",h.onclick=function(e){DayPilot.ModalStatic.close()},d.appendChild(c),d.appendChild(u),d.appendChild(h),s.appendChild(l),s.appendChild(d),r.showHtml(s),r.autoFocus&&c.focus()})},DayPilot.Modal.prompt=function(e,t,i){"object"==typeof t&&(i=t,t=""),i=i||{},i.height=i.height||40,i.useIframe=!1;var a=i.okText||"OK",n=i.cancelText||"Cancel",o=t||"";return DayPilot.getPromise(function(t,r){i.onClosed=function(e){t(e)};var s=new DayPilot.Modal(i),l=document.createElement("div");l.className=s.theme+"_inner";var d=document.createElement("div");d.className=s.theme+"_content",d.innerHTML=e;var c=document.createElement("div");c.className=s.theme+"_input";var u=document.createElement("input");u.value=o,u.style.width="100%",u.onkeydown=function(e){var t=!1;switch(e.keyCode){case 13:s.close(this.value);break;case 27:s.close();break;default:t=!0}t||(e.preventDefault(),e.stopPropagation())},c.appendChild(u);var h=document.createElement("div");h.className=s.theme+"_buttons";var f=document.createElement("button");f.innerText=a,f.className=s.theme+"_ok",f.onclick=function(e){s.close(u.value)};var m=document.createTextNode(" "),p=document.createElement("button");p.innerText=n,p.className=s.theme+"_cancel",p.onclick=function(e){s.close()},h.appendChild(f),h.appendChild(m),h.appendChild(p),l.appendChild(d),l.appendChild(c),l.appendChild(h),s.showHtml(l),s.autoFocus&&u.focus()})};var o=function(e){return"[object Array]"===Object.prototype.toString.call(e)};DayPilot.Modal.form=function(t,i,a){if(1===arguments.length){var n=t;if(o(n))i={};else{if("object"!=typeof n)throw"Invalid DayPilot.Modal.form() parameter";i=t,t=[];for(var s in i){var l={};l.name=s,l.id=s,t.push(l)}}}var d={};for(var s in a)d[s]=a[s];d.height=d.height||40,d.useIframe=!1;var c=d.okText||"OK",u=d.cancelText||"Cancel";return DayPilot.getPromise(function(a,n){d.onClosed=function(t){if(t.result){var n=JSON.parse(JSON.stringify(i));for(var o in t.result)e(n,o,t.result[o]);t.result=n}a(t)};var o=new DayPilot.Modal(d),s=document.createElement("div");s.className=o.theme+"_inner";var l=document.createElement("div");l.className=o.theme+"_input";var h=new r({theme:o.theme,form:t,data:i,zIndex:o.zIndex,locale:o.locale,plugins:o.plugins,onKey:function(e){switch(e.key){case"Enter":h.validate()&&o.close(h.serialize());break;case"Escape":o.close()}},onChange:function(e){"function"==typeof o.onChange&&o.onChange(e)}}),f=h.create();l.append(f);var m=document.createElement("div");m.className=o.theme+"_buttons";var p=document.createElement("button");p.innerText=c,p.className=o.theme+"_ok",d.okDisabled&&(p.disabled=!0),p.onclick=function(e){h.validate()&&o.close(h.serialize())};var v=document.createTextNode(" "),y=document.createElement("button");if(y.innerText=u,y.className=o.theme+"_cancel",y.onclick=function(e){o.close()},y.onmousedown=function(e){h.canceling=!0},m.appendChild(p),m.appendChild(v),m.appendChild(y),s.appendChild(l),s.appendChild(m),o.showHtml(s),o.div.setAttribute("tabindex","-1"),o.div.addEventListener("keydown",function(e){switch(e.keyCode){case 27:o.close();break;case 13:h.validate()&&o.close(h.serialize())}}),o.focus){var g=null;if("object"==typeof o.focus){var b=o.focus.id,D=o.focus.value;g=h.findViewById(b,D)}else"string"==typeof o.focus&&(g=h.findViewById(o.focus));g&&g.focus()}else{var x=h.firstFocusable();o.autoFocus&&x?x.focus():o.div.focus()}})},DayPilot.Modal.close=function(e){var t=DayPilot.Modal.opener();t&&t.close(e)},DayPilot.Modal.stretch=function(e){var t=DayPilot.Modal.opener();if(!t)throw"Unable to find the opener DayPilot.Modal instance.";t.stretch()},DayPilot.Modal.closeSerialized=function(){var e=DayPilot.Modal.opener()||DayPilot.ModalStatic.last();e&&e.closeSerialized()},DayPilot.Modal.opener=function(){return"undefined"!=typeof DayPilot&&"undefined"!=typeof DayPilot.ModalStatic&&DayPilot.ModalStatic.list.length>0?DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length-1]:parent&&parent.DayPilot&&parent.DayPilot.ModalStatic&&parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length-1]},DayPilot.Modal.Experimental={},DayPilot.Modal.Experimental.Form=r,"undefined"==typeof DayPilot.getPromise&&(DayPilot.getPromise=function(e){return"undefined"!=typeof Promise?new Promise(e):(DayPilot.Promise=function(e){var t=this;this.then=function(t,i){return t=t||function(){},i=i||function(){},e(t,i),DayPilot.getPromise(e)},this["catch"]=function(i){return t.then(null,i),DayPilot.getPromise(e)}},new DayPilot.Promise(e))});var r=function(e){this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.Kb=[],this.Lb=null,this.canceling=!1,this.Mb=[],this.Nb=[],this.Ob=null,e=e||{};for(var t in e)this[t]=e[t]};r.prototype.create=function(){return this.load(),this.render(),this.Ob},r.prototype.render=function(){var e=this;this.Ob=document.createElement("div"),this.Kb.forEach(function(t){e.createView(t)}),this.applyState()},r.prototype.createView=function(e){var t=this.theme,i=this,a=document.createElement("div");if(a.className=t+"_form_item "+t+"_form_item_level"+e.level,e.interactive||"title"!==e.type?a.className+=" "+t+"_form_item_"+e.type:a.className+=" "+t+"_form_title",e.data.cssClass&&(a.className+=" "+e.data.cssClass),!e.isValue){var n=document.createElement("div");n.className=t+"_form_item_label",n.innerText=e.text,a.appendChild(n)}var o=this.createInteractive(e);o.onInput=function(e){if(e=e||{},i.Pb(o,{"debounce":!e.immediate}),"function"==typeof i.onChange){var t={};t.result=i.serialize(),i.onChange(t)}},o.onBlur=function(){i.canceling||i.Pb(o)},o.apply(e),o.Ob=a,o.row=e,o.element&&a.appendChild(o.element),this.Nb.push(o),this.Ob.appendChild(a)},r.prototype.validate=function(){var e=this,t=!0;return this.Nb.forEach(function(i){var a=e.Pb(i);t=t&&a}),t},r.prototype.Pb=function(e,t){function i(){e.Qb&&(e.Qb.remove(),e.Qb=null),e.Ob.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.Qb=t,e.Ob.appendChild(t)}t=t||{};var a=t.debounce,n=t.silent,o=e.row,r=!0,s="function"==typeof o.data.onValidate?o.data.onValidate:null,l="function"==typeof o.data.validate?o.data.validate:null,d=s||l;if(d){var c={};c.valid=!0,c.value=e.save()[o.field],c.message="Error",c.values=this.serialize(),c.result=this.serialize(),d(c);var u=this.theme+"_form_item_invalid",h=this.theme+"_form_item_invalid_message";if(c.valid)clearTimeout(this.Mb[o.field]),e.Qb&&(e.Qb.remove(),e.Qb=null),e.Ob.classList.remove(u);else if(!n)if(a){var f=1e3;clearTimeout(this.Mb[o.field]),this.Mb[o.field]=setTimeout(function(){i()},f)}else i();r=c.valid}return r},r.prototype.load=function(){var e=this;this.form.forEach(function(t){e.processFormItem(t,0)});var i;try{var a=JSON.stringify(this.data);i=t(JSON.parse(a))}catch(e){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+e)}for(var n in i)this.setValue(n,i[n])},r.prototype.setValue=function(e,t){this.Kb.forEach(function(i){i.applyValue(e,t)})},r.prototype.updateDependentState=function(){var e=this,t=[!0];(this.Lb?this.Lb:this.Kb).forEach(function(i){var a=e.updateState(i,{enabled:t[i.level]&&!i.data.disabled});a.isValue&&(t[a.level+1]=a.enabled&&a.checked)})},r.prototype.processFormItem=function(e,t){var i=this,a=this.getFieldType(e),n=[];if("radio"===a){if(e.name){var o=new s;o.field=e.id,o.data=e,o.level=t,o.type="label",o.interactive=!1,o.text=e.name,i.Kb.push(o),n.push(o)}e.options.forEach(function(o){var r=new s;r.field=e.id,r.data=o,r.level=t,r.type=a,r.isValue=!0,r.text=o.name,r.resolved=o.id,i.Kb.push(r),n.push(r),o.children&&o.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})})}else if("title"===a){var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=e.name,i.Kb.push(o),n.push(o)}else if("image"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.Kb.push(o),n.push(o)}else if("html"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.Kb.push(o),n.push(o)}else if("scrollable"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.Kb.push(o),n.push(o)}else{var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.text=e.name,o.children=[],i.Kb.push(o),n.push(o)}return"checkbox"===a&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})),n},r.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},r.prototype.createInteractive=function(e){var t=this,i={"label":function(){return new l},"title":function(){return new l},"image":function(){var t=new l,i=document.createElement("img");return i.src=e.data.image,t.element=i,t},"html":function(){var t=new l,i=document.createElement("div");return"string"==typeof e.data.text?i.innerText=e.data.text:"string"==typeof e.data.html&&(i.innerHTML=e.data.html),t.element=i,t},"scrollable":function(){var i=new l,a=document.createElement("div");a.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(a.style.height=e.data.height+"px");var n=document.createElement("div");return n.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),a.appendChild(n),i.element=a,i},"text":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("input");return a.name=e.field,a.type="text",a.autocomplete="off",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,i.element.value.length)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"textarea":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("textarea");return a.name=e.field,e.data.height&&(a.style.height=e.data.height+"px"),a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),i=!1;break;case 27:t.doOnKey("Escape");break;default:i=!0}i||e.stopPropagation()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,0)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"date":function(){var i=new l;i.apply=function(e){i.row=e;var a=i.element,n=i.picker;e.data.dateFormat&&(n.pattern=e.data.dateFormat);var o=e.data.locale||t.locale;o&&(n.locale=o),a.disabled=!e.enabled,n.date=new DayPilot.Date(e.value);var r=new DayPilot.Date(e.value).toString(e.data.dateFormat||n.pattern,n.locale);a.value=r};var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.picker=n,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus()},i.save=function(){var t=n.date?n.date.toString():null,i={};return i[e.field]=t,i},i},"time":function(){return t.Rb(e)},"datetime":function(){return t.Sb(e)},"select":function(){var t=new l;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var i=document.createElement("select");return i.name=e.field,e.data.options&&e.data.options.forEach&&e.data.options.forEach(function(e){var t=document.createElement("option");t.innerText=e.name||e.id,t.value=e.id,t.Tb=e.id,i.appendChild(t)}),i.onchange=function(e){t.onInput({"immediate":!0})},i.onblur=function(e){t.onBlur()},t.element=i,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,a=i.options[i.selectedIndex];a&&"undefined"!=typeof a.Tb&&(t=a.Tb);var n={};return n[e.field]=t,n},t},"searchable":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=new d({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),n=a.create();return i.element=n,i.searchable=a,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=a.selected&&a.selected.id,i={};return i[e.field]=t,i},i},"radio":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.radio;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="radio",n.name=e.field,n.Tb=e.resolved,n.onchange=function(e){var a=i.row;t.findRowsByField(a.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(a,{checked:!0}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.radio=n,i.canFocus=function(){return!1},i.focus=function(){i.radio.focus()},i.save=function(){if(!n.checked)return{};var t=n.Tb,i={};return i[e.field]=t,i},i},"checkbox":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="checkbox",n.name=e.field,n.Tb=e.resolved,n.onchange=function(e){var a=i.row;t.updateState(a,{checked:this.checked}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.checkbox=n,i.canFocus=function(){return!1},i.focus=function(){i.checkbox.focus()},i.save=function(){var t=n.checked,i={};return i[e.field]=t,i},i},"table":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.table;t.disabled=!e.enabled,t.load(e.value||[])};var a=new c({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(e){i.onInput()}}),n=a.create();return i.element=n,i.table=a,i.canFocus=function(){return!1},i.focus=function(){i.table.focus()},i.save=function(){var t=a.save(),i={};return i[e.field]=t,i},i}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):i[e.type]()},r.prototype.Rb=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*o;u++){var h=c.addMinutes(n*u),f={};f.name=h.toString(e.data.timeFormat||s.timePattern,s),f.id=h.toString("HH:mm"),a.push(f)}var m=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),p=m.create();return i.element=p,i.searchable=m,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=m.selected&&m.selected.id,i={};return i[e.field]=t,i},i},r.prototype.Sb=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var a=i.searchable;a.disabled=!e.enabled;var n=new DayPilot.Date(e.value).toString("HH:mm");a.select(n);var o=i.dateInput,r=i.picker;e.data.dateFormat&&(r.pattern=e.data.dateFormat);var s=e.data.locale||t.locale;if(s){var l=DayPilot.Locale.find(s)||DayPilot.Locale.US;r.locale=s,r.pattern=l.datePattern}o.disabled=!e.enabled,
|
|
14
|
+
r.date=new DayPilot.Date(e.value);var d=new DayPilot.Date(e.value).toString(e.data.dateFormat||r.pattern,r.locale);o.value=d};var a=function(){var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.dateInput=a,i.picker=n,a}(),n=function(){var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,l=DayPilot.Date.today(),c=0;c<24*o;c++){var u=l.addMinutes(n*c),h={};h.name=u.toString(e.data.timeFormat||s.timePattern,s),h.id=u.toString("HH:mm"),a.push(h)}var f=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}});return i.searchable=f,f.create()}(),o=document.createElement("div");return o.className=t.theme+"_form_item_datetime_parent",o.appendChild(a),o.appendChild(n),i.element=o,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.dateInput.focus()},i.save=function(){var t=i.searchable.selected&&i.searchable.selected.id,a=i.picker.date?i.picker.date.toString():null,n=new DayPilot.Date(a).getDatePart(),o=DayPilot.Date.parse(n.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),r={};return r[e.field]=o,r},i},r.prototype.findRowsByField=function(e){return this.Kb.filter(function(t){return t.field===e})},r.prototype.findViewById=function(e,t){return this.Nb.find(function(i){return i.row.field===e&&("radio"!==i.row.type||i.row.resolved===t)})},r.prototype.firstFocusable=function(){return this.Nb.find(function(e){return e.canFocus&&e.canFocus()})},r.prototype.updateState=function(e,t){var i=this.Lb?this.Lb:this.Kb,a=i.indexOf(e);return this.Lb=i.map(function(i){if(i!==e)return i;if(e.propsEqual(t))return e;var a=e.clone();for(var n in t)a[n]=t[n];return a}),this.Lb[a]},r.prototype.updateInteractive=function(e){var t=this.Lb.indexOf(e);this.Nb[t].apply(e)},r.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.Lb){this.Lb.filter(function(t,i){return e.Kb[i]!==t}).forEach(function(t){e.updateInteractive(t)}),this.Kb=this.Lb,this.Lb=null}},r.prototype.getFieldType=function(e){return["text","date","select","searchable","radio","checkbox","table","title","image","html","textarea","scrollable","time","datetime"].indexOf(e.type)!==-1?e.type:e.type&&this.plugins&&this.plugins[e.type]?e.type:e.image?"image":e.html||e.text?"html":e.id?e.options?"searchable":e.dateFormat?"date":e.columns?"table":"text":"title"},r.prototype.serialize=function(){var e={};return this.Nb.forEach(function(t){var i=t.save();for(var a in i)e[a]=i[a]}),e};var s=function(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null};s.prototype.clone=function(){var e=new s;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},s.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},s.prototype.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},s.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))};var l=function(){this.element=null,this.canFocus=function(){return!1},this.apply=function(e){},this.focus=function(){},this.save=function(){return{}}},d=function(e){this.data=[],this.name=null,this.theme="searchable_default",this.Ub=!1,this.listZIndex=1e5,this.onSelect=null,this.Vb=null,this.Wb=null,this.Xb=!1,this.Yb=null,this.Zb=null,this.$b=[],this._b=null,e=e||{};var t=this,i={"selected":{post:function(e){"object"==typeof e&&e.id?t.Vb=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.Vb}}),Object.defineProperty(this,"disabled",{get:function(){return this.Ub},set:function(e){this.Ub=e,this.Yb&&(this.Yb.disabled=e,e&&this.bc())}});for(var a in e)i[a]||(this[a]=e[a]);for(var a in e)i[a]&&i[a].post(e[a])};d.prototype.select=function(e){return this.Vb=this.data.find(function(t){return t.id===e}),this.cc(!1),this},d.prototype.create=function(){function e(e){var i=l.strategy;"includes"!==l.strategy&&"startsWith"!==l.strategy&&(i="includes"),e=e||i||"includes",h.style.display="",h.style.top=m.offsetHeight+"px",h.style.left="0px",h.style.width=m.offsetWidth+"px",h.innerHTML="",h.addEventListener("mousedown",function(e){e.preventDefault()}),l.Wb=null,l.$b=[];var n=null;l.data.forEach(function(i){var o=i.name||i.id;if("includes"===e){if(o.toLowerCase().indexOf(m.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==o.toLowerCase().indexOf(m.value.toLowerCase()))return;var r=document.createElement("div");r.className=l.theme+"_list_item",r.innerText=o,r.item=i,i===l.Vb&&(l.Wb=r),n||(n=r),r.addEventListener("mousedown",function(e){a(r),e.preventDefault()}),r.addEventListener("mousemove",function(e){l.Wb!==r&&(l.Wb=r,t({dontScroll:!0}))}),h.appendChild(r),l.$b.push(r)}),l.Wb||(l.Wb=n),t()}function t(e){e=e||{};var t=!e.dontScroll;document.querySelectorAll("."+l.theme+"_list_item_highlight").forEach(function(e){e.className=e.className.replace(l.theme+"_list_item_highlight","")}),l.Wb&&(l.Wb.className+=" "+l.theme+"_list_item_highlight",t&&!i(l.Wb,h)&&l.Wb.scrollIntoView())}function i(e,t){var i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return i.top>=a.top&&i.bottom<=a.bottom}function a(e){var t=e.item;l.Vb=t,l.cc(!0),o(),r()}function n(){l.bc()}function o(){l.dc()}function r(){l.Xb=!0,m.setAttribute("readonly","readonly"),m.focus()}function s(){l.Xb=!1,m.removeAttribute("readonly"),m.select(),e("all")}var l=this,d=this,c=document.createElement("div");c.className=this.theme+"_main",c.style.position="relative";var u=document.createElement("div");u.className=this.theme+"_icon",u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="20px",u.addEventListener("mousedown",function(e){e.preventDefault(),l.Xb?(l.focus(),s()):(n(),r())});var h=document.createElement("div");h.className=this.theme+"_list",h.style.display="none",h.style.position="absolute",h.style.zIndex=this.listZIndex;var f=document.createElement("input");f.type="hidden",f.name=this.name,f.searchable=d,this._b=f;var m=document.createElement("input");return m.type="text",m.className=this.theme+"_input",m.disabled=this.Ub,m.addEventListener("click",function(e){s()}),m.addEventListener("focus",function(t){e("all")}),m.addEventListener("input",function(t){e()}),m.addEventListener("blur",function(e){m.removeAttribute("readonly"),n()}),m.addEventListener("keydown",function(e){if(l.Xb){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var i=d.$b.indexOf(d.Wb);i+1<d.$b.length&&(d.Wb=d.$b[i+1]),t()}else if("ArrowUp"===e.key){var i=d.$b.indexOf(d.Wb);i-1>=0&&(d.Wb=d.$b[i-1]),t()}else"Enter"===e.key?l.Wb?(e.stopPropagation(),a(l.Wb)):(e.stopPropagation(),n(),r()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),r())}),this.Yb=m,this.Zb=h,this.Vb||(this.Vb=this.data[0],this.Vb&&(m.value=this.Vb.name)),c.appendChild(m),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},d.prototype.bc=function(){this.dc(),this.Vb?this.Yb.value=this.Vb.name:(this.Yb.value="",this.cc(!0))},d.prototype.focus=function(){this.Xb=!0,this.Yb.setAttribute("readonly","readonly"),this.Yb.focus(),this.bc()},d.prototype.dc=function(){this.Zb.style.display="none"},d.prototype.cc=function(e){if(this._b.value=this.selected?this.selected.id:null,this.Vb?this.Yb.value=this.Vb.name:this.Yb.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}};var c=function(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.ec=null,this.Kb=[],e=e||{};for(var t in e)this[t]=e[t]};c.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var i=document.createElement("input");i.type="hidden",i.name=e.name,i.table=this,t.appendChild(i);var a=document.createElement("div");a.className=this.theme+"_table";var n=this.fc();a.appendChild(n);var o=e.gc({});o.spacer=!0;var r=this.hc(o);r.classList.add(e.theme+"_spacer"),a.appendChild(r);var s=document.createElement("div");s.className=e.theme+"_tbody",a.appendChild(s),t.appendChild(a);var l=document.createElement("div");t.appendChild(l),this.nav.body=s,this.nav.table=a,this.nav.main=t,this.nav.after=l;var d=document.createElement("div"),c=document.createElement("span");return c.className=this.theme+"_plus",c.addEventListener("click",function(t){if(!e.disabled){var i=e.item.onNewRow,a={};if("function"==typeof i){var n={};n.result=e.form.serialize(),n.value={},i(n),a=n.value}var o=e.gc(a);e.Kb.push(o),e.ic(),e.jc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},c.prototype.fc=function(){var e=this,t=document.createElement("div");return t.classList.add(this.theme+"_row"),t.classList.add(this.theme+"_header"),this.item.columns.forEach(function(i){var a=document.createElement("div");a.classList.add(e.theme+"_cell"),a.innerText=i.name,t.appendChild(a)}),t},c.prototype.kc=function(){var e=this.item.max||0;return!!(e&&this.Kb.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.Kb.forEach(function(e){var i={};e.cells.forEach(function(e){i[e.id]=e.value}),t.push(i)}),t},c.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.lc(),this.ic()},c.prototype.nc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.kc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.lc=function(){var e=this;this.Kb=[],this.data.forEach(function(t){var i=e.gc(t);e.Kb.push(i)})},c.prototype.oc=function(e){var t=this,i=t.Kb.indexOf(e);t.Kb.splice(i,1)},c.prototype.gc=function(e){var t=this,i={};return i.data=e,i.cells=[],t.item.columns.forEach(function(a){var n=a.id,o=e[n],r=t.pc(a);if("undefined"==typeof o)if("text"===r)o="";else if("number"===r)o=0;else if("select"===r){var s=a.options;o=s&&s[0].id}var l={};l.id=n,l.value=o,l.type=r,l.data=a,i.cells.push(l)}),i},c.prototype.pc=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.ic=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.Kb.forEach(function(t){var i=e.hc(t);e.nav.body.appendChild(i)}),0===this.Kb.length){var t=e.qc();e.nav.after.appendChild(t)}this.nc()},c.prototype.qc=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype.hc=function(e){var t=this,i=document.createElement("div");i.className=t.theme+"_row",e.cells.forEach(function(a){var n=document.createElement("div");n.className=t.theme+"_cell";var o=t.rc(a);if(e.spacer){var r=document.createElement("div");r.style.height="0px",r.style.overflow="hidden",r.appendChild(o),n.appendChild(r)}else n.appendChild(o);i.appendChild(n)});var a=document.createElement("div");a.classList.add(t.theme+"_cell"),a.classList.add(t.theme+"_rowaction");var n=document.createElement("span");return n.className=this.theme+"_delete",n.addEventListener("click",function(i){t.disabled||(t.oc(e),t.ic(),t.jc())}),e.spacer||a.appendChild(n),i.appendChild(a),i},c.prototype.jc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.rc=function(e){var t=this,i=e.type;if("text"===i||"number"===i){var a=document.createElement("input");return a.type=i,t.disabled&&(a.disabled=!0),e.value&&(a.value=e.value),a.addEventListener("keyup",function(a){"number"===i?e.value=Number(this.value):e.value=this.value,t.jc()}),a}if("select"===i){var n=document.createElement("select");return t.disabled&&(n.disabled=!0),e.data.options.forEach(function(t){var i=document.createElement("option");i.innerText=t.name,i.value=t.id,i.Tb=t.id,n.appendChild(i),e.value===t.id&&i.setAttribute("selected",!0)}),n.addEventListener("change",function(i){var a=n.options[n.selectedIndex];a&&"undefined"!=typeof a.Tb&&(e.value=a.Tb),t.jc()}),n}throw new Error("Unsupported item type: "+i)},c.prototype.focus=function(){}}}(DayPilot),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var e={};e.Month=function(t,i){this.v="2023.1.450-lite",this.nav={};var a=this;this.id=t,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,this.contextMenu=null,this.cssClassPrefix="month_default",this.eventBarVisible=!0,this.eventHeight=25,this.eventsLoadMethod="GET",this.headerHeight=30,this.hideUntilInit=!0,this.lineSpace=1,this.locale="en-us",this.showToolTip=!0,this.startDate=new DayPilot.Date,this.theme=null,this.visible=!0,this.weekStarts=1,this.width="100%",this.xssProtection="Enabled",this.afterRender=function(){},this.cellHeaderClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.headerClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onCellHeaderClick=null,this.onCellHeaderClicked=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.t=function(e,t){var e=JSON.parse(e);return e.CallBackRedirect?void(document.location.href=e.CallBackRedirect):"None"===e.UpdateType?void a.fireAfterRenderDetached(e.CallBackData,!0):(a.events.list=e.Events,"Full"===e.UpdateType&&(a.startDate=e.StartDate,a.timeFormat=e.TimeFormat?e.TimeFormat:a.timeFormat,"undefined"!=typeof e.WeekStarts&&(a.weekStarts=e.WeekStarts),a.hashes=e.Hashes),a.u(),a.sc(),a.H(),"Full"===e.UpdateType&&(a.tc(),a.uc()),a.M(),a.show(),a.N(),void a.fireAfterRenderDetached(e.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var i=function(e,t){return function(){a.afterRender&&a.afterRender(e,t)}};window.setTimeout(i(e,t),0)},this.lineHeight=function(){return this.eventHeight+this.lineSpace},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";t=e}a.events.list||(a.events.list=[]),a.events.list.push(t),a.update(),a.V.notify()},this.events.find=function(e){if(!a.events.list)return null;for(var t=0;t<a.events.list.length;t++){var i=a.events.list[t];if(i.id===e)return new DayPilot.Event(i,a)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=a.events.find(e.id);if(t){var i=DayPilot.indexOf(a.events.list,t.data);a.events.list.splice(i,1,e)}}a.update(),a.V.notify()},this.events.remove=function(e){var t=DayPilot.indexOf(a.events.list,e.data);a.events.list.splice(t,1),a.update(),a.V.notify()},this.events.load=function(e,t,i){var n=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},o=function(e){var i,o=e.request;try{i=JSON.parse(o.responseText)}catch(e){var r={};return r.exception=e,void n(r)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;a.events.list=i,a.da&&a.update()}};if(a.eventsLoadMethod&&"POST"===a.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":a.visibleStart().toString(),"end":a.visibleEnd().toString()},"url":e,"success":o,"error":n});else{var r=e,s="start="+a.visibleStart().toString()+"&end="+a.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":n})}},this.update=function(e){if(a.Ea(e),this.da&&this.cells){a.u(),a.sc(),a.H(),a.tc(),a.uc(),a.M(),a.F(),a.N(),this.visible?this.show():this.hide()}},this.Ha=null,this.Ea=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e}}};this.Ha=t;for(var i in e)if(t[i]){var n=t[i];n.data=e[i],n.preInit&&n.preInit()}else a[i]=e[i]}},this.Ia=function(){var e=this.Ha;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.Ka={},this.Ka.events=[],this.La=function(e){var t=this.Ka.events,i=this.events.list[e],a={};for(var n in i)a[n]=i[n];if("function"==typeof this.onBeforeEventRender){var o={};o.data=a,this.onBeforeEventRender(o)}t[e]=a},this.H=function(){var e=this.events.list;if(e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: "+typeof e);if("function"==typeof this.onBeforeEventRender)for(var t=0;t<e.length;t++)this.La(t);for(var i=0;i<e.length;i++){var a=e[i];if("object"!=typeof a)throw new DayPilot.Exception("Event data item must be an object");if(!a.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!a.end)throw new DayPilot.Exception("Event data item must specify 'end' property");var n=new DayPilot.Date(a.start),o=new DayPilot.Date(a.end);if(!(n.getTime()>o.getTime()))for(var t=0;t<this.rows.length;t++){var r=this.rows[t],s=new DayPilot.Event(a,this);r.belongsHere(s)&&(r.events.push(s),"function"==typeof this.onBeforeEventRender&&(s.cache=this.Ka.events[i]))}}for(var l=0;l<this.rows.length;l++){var r=this.rows[l];r.events.sort(this.Ma);for(var d=0;d<this.rows[l].events.length;d++){var c=r.events[d],u=r.getStartColumn(c),h=r.getWidth(c);r.putIntoLine(c,u,h,l)}}}},this.u=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];t.event=null,t.click=null,t.parentNode.removeChild(t)}this.elements.events=[]},this.N=function(){this.vc()},this.vc=function(){this.elements.events=[];for(var e=0;e<this.rows.length;e++)for(var t=this.rows[e],i=0;i<t.lines.length;i++)for(var a=t.lines[i],n=0;n<a.length;n++)this.ga(a[n])},this.Ma=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.drawShadow=function(t,i,a,n,o,r){o||(o=0);var s=n;this.shadow={},this.shadow.list=[],this.shadow.start={x:t,y:i},this.shadow.width=n;var l=7*i+t-o;l<0&&(s+=l,t=0,i=0);for(var d=o;d>=7;)i--,d-=7;if(d>t){d>t+(7-this.getColCount())?(i--,t=t+7-d):(s=s-d+t,t=0)}else t-=d;i<0&&(i=0,t=0);var c=null;for(e.resizingEvent?c="w-resize":e.movingEvent&&(c="move"),this.nav.top.style.cursor=c;s>0&&i<this.rows.length;){var u=Math.min(this.getColCount()-t,s),h=this.rows[i],f=this.getRowTop(i),m=h.getHeight(),p=document.createElement("div");p.setAttribute("unselectable","on"),p.style.position="absolute",p.style.left=this.getCellWidth()*t+"%",p.style.width=this.getCellWidth()*u+"%",p.style.top=f+"px",p.style.height=m+"px",p.style.cursor=c;var v=document.createElement("div");v.setAttribute("unselectable","on"),p.appendChild(v),v.style.position="absolute",v.style.top="0px",v.style.right="0px",v.style.left="0px",v.style.bottom="0px",v.style.backgroundColor="#aaaaaa",v.style.opacity=.5,v.style.filter="alpha(opacity=50)",this.nav.top.appendChild(p),this.shadow.list.push(p),s-=u+7-this.getColCount(),t=0,i++}},this.clearShadow=function(){if(this.shadow){for(var e=0;e<this.shadow.list.length;e++)this.nav.top.removeChild(this.shadow.list[e]);this.shadow=null,this.nav.top.style.cursor=""}},this.getEventTop=function(e,t){for(var i=this.headerHeight,a=0;a<e;a++)i+=this.rows[a].getHeight();return i+=this.cellHeaderHeight,i+=t*this.lineHeight()},this.getDateFromCell=function(e,t){return this.firstDate.addDays(7*t+e)},this.ga=function(t){var i=t.cache||t.data,n=t.part.row,o=t.part.line,r=t.part.colStart,s=t.part.colWidth,l=this.getCellWidth()*r,d=this.getCellWidth()*s,c=this.getEventTop(n,o),u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.eventHeight+"px",u.className=this.i("_event"),i.cssClass&&DayPilot.Util.addClass(u,i.cssClass),t.part.startsHere||DayPilot.Util.addClass(u,this.i("_event_continueleft")),t.part.endsHere||DayPilot.Util.addClass(u,this.i("_event_continueright")),u.event=t,u.style.width=d+"%",u.style.position="absolute",u.style.left=l+"%",u.style.top=c+"px",this.showToolTip&&t.client.toolTip()&&(u.title=t.client.toolTip()),u.onclick=a.U,u.oncontextmenu=a.wc,u.onmousedown=function(i){i=i||window.event;var l=i.which||i.button;if(i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation(),1===l)if(e.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var d={};d.start={},d.start.x=r,d.start.y=n,d.event=u.event,d.width=DayPilot.DateUtil.daysSpan(d.event.start(),d.event.end())+1,d.direction=this.style.cursor,e.resizingEvent=d}else if("move"===this.style.cursor||t.client.moveEnabled()){a.clearShadow();var c=DayPilot.mo2(a.nav.top,i);if(!c)return;var h=a.getCellBelowPoint(c.x,c.y),f=DayPilot.DateUtil.daysDiff(t.start(),a.rows[n].start),m=7*h.y+h.x-(7*n+r);f&&(m+=f);var p={};p.start={},p.start.x=r,p.start.y=n,p.start.line=o,p.offset=a.eventMoveToPosition?0:m,p.colWidth=s,p.event=u.event,p.coords=c,e.movingEvent=p}},u.onmousemove=function(i){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var a=DayPilot.mo3(u,i);if(a){u.deleteIcon&&(u.deleteIcon.style.display="");var n=6;a.x<=n&&t.client.resizeEnabled()?t.part.startsHere?(u.style.cursor="w-resize",u.dpBorder="left"):u.style.cursor="not-allowed":u.clientWidth-a.x<=n&&t.client.resizeEnabled()?t.part.endsHere?(u.style.cursor="e-resize",u.dpBorder="right"):u.style.cursor="not-allowed":t.client.clickEnabled()?u.style.cursor="pointer":u.style.cursor="default"}}},u.onmouseleave=function(e){u.deleteIcon&&(u.deleteIcon.style.display="none"),u.style.cursor=""},u.onmouseenter=function(e){u.deleteIcon&&(u.deleteIcon.style.display="")};var h=document.createElement("div");if(h.setAttribute("unselectable","on"),h.className=this.i("_event_inner"),"darker"===i.borderColor&&i.backColor?h.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):h.style.borderColor=i.borderColor,i.backColor&&(h.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(h.style.filter="")),i.fontColor&&(h.style.color=i.fontColor),h.innerHTML=t.client.html(),u.appendChild(h),t.client.barVisible()){var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.i("_event_bar"),f.style.position="absolute";var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.i("_event_bar_inner"),m.style.top="0%",m.style.height="100%",i.barColor&&(m.style.backgroundColor=i.barColor),f.appendChild(m),u.appendChild(f)}if(t.client.deleteEnabled()){var p=Math.floor(a.eventHeight/2-9),v=document.createElement("div");v.style.position="absolute",v.style.right="2px",v.style.top=p+"px",v.style.width="18px",v.style.height="18px",v.className=a.i("_event_delete"),v.onmousedown=function(e){e.stopPropagation()},v.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&a.X(t)},v.style.display="none",u.deleteIcon=v,u.appendChild(v)}var y=i.areas?DayPilot.Areas.copy(i.areas):[];DayPilot.Areas.attach(u,t,{"areas":y}),this.elements.events.push(u),this.nav.events.appendChild(u)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.sc=function(){"string"==typeof this.startDate&&(this.startDate=new DayPilot.Date(this.startDate)),this.startDate=this.startDate.firstDayOfMonth(),this.firstDate=this.startDate.firstDayOfWeek(this.getWeekStart());var e,t=(this.startDate,this.lastVisibleDayOfMonth()),i=DayPilot.DateUtil.daysDiff(this.firstDate,t)+1;e=Math.ceil(i/7),this.days=7*e,this.rows=[];for(var n=0;n<e;n++){var o={};o.start=this.firstDate.addDays(7*n),o.end=o.start.addDays(this.getColCount()),o.events=[],o.lines=[],o.index=n,o.minHeight=this.cellHeight,o.calendar=this,o.belongsHere=function(e){return e.end().getTime()===e.start().getTime()&&e.start().getTime()===this.start.getTime()||!(e.end().getTime()<=this.start.getTime()||e.start().getTime()>=this.end.getTime())},o.getPartStart=function(e){return DayPilot.DateUtil.max(this.start,e.start())},o.getPartEnd=function(e){return DayPilot.DateUtil.min(this.end,e.end())},o.getStartColumn=function(e){var t=this.getPartStart(e);return DayPilot.DateUtil.daysDiff(this.start,t)},o.getWidth=function(e){return DayPilot.DateUtil.daysSpan(this.getPartStart(e),this.getPartEnd(e))+1},o.putIntoLine=function(e,t,i,a){for(var n=this,o=0;o<this.lines.length;o++){var r=this.lines[o];if(r.isFree(t,i))return r.addEvent(e,t,i,a,o),o}var r=[];return r.isFree=function(e,t){for(var i=!0,a=0;a<this.length;a++)e+t-1<this[a].part.colStart||e>this[a].part.colStart+this[a].part.colWidth-1||(i=!1);return i},r.addEvent=function(e,t,i,a,o){e.part.colStart=t,e.part.colWidth=i,e.part.row=a,e.part.line=o,e.part.startsHere=n.start.getTime()<=e.start().getTime(),e.part.endsHere=n.end.getTime()>=e.end().getTime(),this.push(e)},r.addEvent(e,t,i,a,this.lines.length),this.lines.push(r),this.lines.length-1},o.getStart=function(){for(var e=0,t=0;t<a.rows.length&&t<this.index;t++)e+=a.rows[t].getHeight()},o.getHeight=function(){return Math.max(this.lines.length*a.lineHeight()+a.cellHeaderHeight,this.calendar.cellHeight)},this.rows.push(o)}this.endDate=this.firstDate.addDays(7*e)},this.visibleStart=function(){return a.firstDate},this.visibleEnd=function(){return a.endDate},this.getHeight=function(){for(var e=this.headerHeight,t=0;t<this.rows.length;t++)e+=this.rows[t].getHeight();return e},this.getWidth=function(e,t){return 7*t.y+t.x-(7*e.y+e.x)+1},this.getMinCoords=function(e,t){return 7*e.y+e.x<7*t.y+t.x?e:t},this.i=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.ia=function(){var t=this.nav.top;t.setAttribute("unselectable","on"),t.style.MozUserSelect="none",t.style.KhtmlUserSelect="none",t.style.WebkitUserSelect="none",t.style.position="relative",this.width&&(t.style.width=this.width),t.style.height=this.getHeight()+"px",t.onselectstart=function(e){return!1},this.hideUntilInit&&(t.style.visibility="hidden"),this.visible||(t.style.display="none"),t.className=this.i("_main");var i=document.createElement("div");this.nav.cells=i,i.style.position="absolute",i.style.left="0px",i.style.right="0px",i.setAttribute("unselectable","on"),t.appendChild(i);var n=document.createElement("div");this.nav.events=n,n.style.position="absolute",n.style.left="0px",n.style.right="0px",n.setAttribute("unselectable","on"),t.appendChild(n),t.onmousemove=function(t){if(e.resizingEvent){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var o,r,s=e.resizingEvent;s.start;if("w-resize"===s.direction){r=n;var l=s.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=a.getCellFromDate(l);o=a.getWidth(n,d)}else r=a.getCellFromDate(s.event.start()),o=a.getWidth(r,n);o<1&&(o=1),a.drawShadow(r.x,r.y,0,o)}else if(e.movingEvent){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;if(i.x===e.movingEvent.coords.x&&i.y===e.movingEvent.coords.y)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var c=e.movingEvent.event,u=e.movingEvent.offset,o=a.cellMode?1:DayPilot.DateUtil.daysSpan(c.start(),c.end())+1;o<1&&(o=1),a.drawShadow(n.x,n.y,0,o,u,c)}else if(e.timeRangeSelecting){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var r=e.timeRangeSelecting,h=7*r.y+r.x,f=7*n.y+n.x,o=Math.abs(f-h)+1;o<1&&(o=1);var m=h<f?r:n;e.timeRangeSelecting.from={x:m.x,y:m.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,a.drawShadow(m.x,m.y,0,o,0,null)}}},this.M=function(){this.nav.top.style.height=this.getHeight()+"px";for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].style.top=this.getRowTop(t)+"px",this.cells[e][t].style.height=this.rows[t].getHeight()+"px"},this.getCellBelowPoint=function(e,t){for(var i=Math.floor(this.nav.top.clientWidth/this.getColCount()),a=Math.min(Math.floor(e/i),this.getColCount()-1),n=null,o=this.headerHeight,r=0,s=0;s<this.rows.length;s++){var l=o;if(o+=this.rows[s].getHeight(),t<o){r=t-l,n=s;break}}null===n&&(n=this.rows.length-1);var d={};return d.x=a,d.y=n,d.relativeY=r,d},this.getCellFromDate=function(e){for(var t=DayPilot.DateUtil.daysDiff(this.firstDate,e),i={x:0,y:0};t>=7;)i.y++,t-=7;return i.x=t,i},this.uc=function(){var e=document.createElement("div");e.oncontextmenu=function(){return!1},this.nav.cells.appendChild(e),this.cells=[];for(var t=0;t<this.getColCount();t++){this.cells[t]=[];var i=document.createElement("div");i.setAttribute("unselectable","on"),i.style.position="absolute",i.style.left=this.getCellWidth()*t+"%",i.style.width=this.getCellWidth()+"%",i.style.top="0px",i.style.height=this.headerHeight+"px";var a=t+this.getWeekStart();a>6&&(a-=7),i.className=this.i("_header");var o=document.createElement("div");o.setAttribute("unselectable","on"),o.innerHTML=n.locale().dayNames[a],i.appendChild(o),o.style.position="absolute",o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.right="0px",o.className=this.i("_header_inner"),o.innerHTML=n.locale().dayNames[a],e.appendChild(i);for(var r=0;r<this.rows.length;r++)this.xc(t,r,e)}},this.tc=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].onclick=null;this.nav.cells.innerHTML=""},this.T=function(){return 2===a.api},this.xc=function(t,i,o){var r=this.rows[i],s=this.firstDate.addDays(7*i+t),l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.style.position="absolute",l.style.cursor="default",l.style.left=this.getCellWidth()*t+"%",l.style.width=this.getCellWidth()+"%",l.style.top=this.getRowTop(i)+"px",l.style.height=r.getHeight()+"px",l.className=this.i("_cell"),!this.isWeekend(s)){var d=this.i("_cell_business");DayPilot.Util.addClass(l,d)}var c=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));c.setAttribute("unselectable","on"),l.appendChild(c),c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.top="0px",c.style.bottom="0px",c.className=this.i("_cell_inner"),l.onmousedown=function(n){"Disabled"!==a.timeRangeSelectedHandling&&(a.clearShadow(),e.timeRangeSelecting={"root":a,"x":t,"y":i,"from":{x:t,y:i},"width":1})},l.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),i=t.addDays(1);a.k(t,i)};if("Disabled"!==a.timeRangeSelectedHandling)return void e(s)};var u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.cellHeaderHeight+"px",u.className=this.i("_cell_header"),u.onclick=function(e){if("Enabled"===a.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=a,t.start=s,t.end=s.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onCellHeaderClick&&(a.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof a.onCellHeaderClicked&&a.onCellHeaderClicked(t);
|
|
15
|
+
}};var h=s.getDay();1===h?u.innerHTML=n.locale().monthNames[s.getMonth()]+" "+h:u.innerHTML=h,c.appendChild(u),this.cells[t][i]=l,o.appendChild(l)},this.getWeekStart=function(){return n.locale().weekStarts},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(e){for(var t=this.headerHeight,i=0;i<e;i++)t+=this.rows[i].getHeight();return t},this.q=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.p();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.s,n,this.ajaxError)},this.s=function(e){a.t(e.responseText)},this.p=function(){var e={};return e.control="dpm",e.id=this.id,e.v=this.v,e.visibleStart=new DayPilot.Date(this.firstDate),e.visibleEnd=e.visibleStart.addDays(this.days),e.startDate=a.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.q("EventClick",t,e)},this.U=function(t){e.movingEvent=null,e.resizingEvent=null;var i=this,t=t||window.event;t.ctrlKey;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),a.eventClickSingle(i,t)},this.eventClickSingle=function(e,t){var i=e.event;if(i.client.clickEnabled())if(a.T()){var n={};if(n.e=i,n.control=a,n.div=e,n.originalEvent=t,n.meta=t.metaKey,n.ctrl=t.ctrlKey,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventClick&&(a.V.apply(function(){a.onEventClick(n)}),n.preventDefault.value))return;switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):a.contextMenu&&a.contextMenu.show(i)}"function"==typeof a.onEventClicked&&a.V.apply(function(){a.onEventClicked(n)})}else switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"JavaScript":a.onEventClick(i)}},this.wc=function(){var e=this;return a.W(e.event),!1},this.W=function(e){if(this.event=e,!e.client.rightClickEnabled())return!1;var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof a.onEventRightClick||(a.onEventRightClick(t),!t.preventDefault.value)){switch(a.eventRightClickHandling){case"ContextMenu":var i=e.client.contextMenu();i?i.show(e):a.contextMenu&&a.contextMenu.show(this.event)}return"function"==typeof a.onEventRightClicked&&a.onEventRightClicked(t),!1}},this.X=function(e){if(a.T()){var t={};if(t.e=e,t.control=a,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventDelete&&(a.V.apply(function(){a.onEventDelete(t)}),t.preventDefault.value))return;switch(a.eventDeleteHandling){case"CallBack":a.eventDeleteCallBack(e);break;case"PostBack":a.eventDeletePostBack(e);break;case"Update":a.events.remove(e)}"function"==typeof a.onEventDeleted&&a.V.apply(function(){a.onEventDeleted(t)})}else switch(a.eventDeleteHandling){case"PostBack":a.eventDeletePostBack(e);break;case"CallBack":a.eventDeleteCallBack(e);break;case"JavaScript":a.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.q("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.o("EventDelete",t,e)},this.eventMoveCallBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,o.position=n,this.q("EventMove",a,o)},this.j=function(e,t,i,n,o,r){var s=e.start().getTimePart(),l=e.end().getDatePart();l!==e.end()&&(l=l.addDays(1));var d=DayPilot.DateUtil.diff(e.end(),l),c=this.getDateFromCell(t,i);c=c.addDays(-n);var u=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,h=c.addDays(u),f=c.addTime(s),m=h.addTime(d);if(a.T()){var p={};if(p.e=e,p.control=a,p.newStart=f,p.newEnd=m,p.ctrl=o.ctrlKey,p.shift=o.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventMove&&(a.V.apply(function(){a.onEventMove(p)}),p.preventDefault.value))return;switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"Update":e.start(f),e.end(m),a.events.update(e)}"function"==typeof a.onEventMoved&&a.V.apply(function(){a.onEventMoved(p)})}else switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"JavaScript":a.onEventMove(e,f,m)}},this.eventResizeCallBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.q("EventResize",a,n)},this.f=function(e,t,i){var n=e.start().getTimePart(),o=e.end().getDatePart();o!==e.end()&&(o=o.addDays(1));var r=DayPilot.DateUtil.diff(e.end(),o),s=this.getDateFromCell(t.x,t.y),l=s.addDays(i),d=s.addTime(n),c=l.addTime(r);if(a.T()){var u={};if(u.e=e,u.control=a,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventResize&&(a.V.apply(function(){a.onEventResize(u)}),u.preventDefault.value))return;switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),a.events.update(e)}"function"==typeof a.onEventResized&&a.V.apply(function(){a.onEventResized(u)})}else switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"JavaScript":a.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,i){var a={};a.start=e,a.end=t,this.q("TimeRangeSelected",i,a)},this.k=function(e,t){if(this.T()){var i={};if(i.control=a,i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.V.apply(function(){a.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t)}"function"==typeof a.onTimeRangeSelected&&a.V.apply(function(){a.onTimeRangeSelected(i)})}else switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t);break;case"JavaScript":a.onTimeRangeSelected(e,t)}},this.V={},this.V.scope=null,this.V.notify=function(){a.V.scope&&a.V.scope["$apply"]()},this.V.apply=function(e){e()},this.clearSelection=function(){a.clearShadow()},this.commandCallBack=function(e,t){var i={};i.command=e,this.q("Command",t,i)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this.D={},this.D.locale=function(){var e=DayPilot.Locale.find(a.locale);return e?e:DayPilot.Locale.US},this.D.E=function(){return"Disabled"!==a.xssProtection};var n=this.D;this.debug=function(e,t){this.debuggingEnabled&&(a.debugMessages||(a.debugMessages=[]),a.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=a;e.nav.top&&(e.u(),e.nav.top.removeAttribute("style"),e.nav.top.removeAttribute("class"),e.nav.top.innerHTML="",e.nav.top.dp=null,e.nav.top.onmousemove=null,e.nav.top=null)},this.Ca=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof a.events.list||!a.events.list)},this.F=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){a.visible=!0,a.nav.top.style.display=""},this.hide=function(){a.visible=!1,a.nav.top.style.display="none"},this.Ja=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Month() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Month: The placeholder element not found: '"+id+"'."}},this.Pa=function(){this.sc(),this.ia(),this.uc(),this.Ca(),this.q("Init")},this.va=function(e,t){return a.D.E()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=this.Ea,this.internal.xssTextHtml=a.va,this.init=function(){return this.Ja(),this.loadFromServer()?void this.Pa():(this.sc(),this.H(),this.ia(),this.uc(),this.F(),this.N(),this.Ca(),this.fireAfterRenderDetached(null,!1),this.da=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return a.eventBarVisible}}),this.Ea(i)},e.gMouseUp=function(t){if(e.movingEvent){var i=e.movingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.movingEvent.event.calendar,n=e.movingEvent.event,o=a.shadow.start,r=a.shadow.position,s=e.movingEvent.offset;a.clearShadow(),e.movingEvent=null;var t=t||window.event;return a.j(n,o.x,o.y,s,t,r),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),e.movingEvent=null,!1}if(e.resizingEvent){var i=e.resizingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.resizingEvent.event.calendar,n=e.resizingEvent.event,o=a.shadow.start,l=a.shadow.width;return a.clearShadow(),e.resizingEvent=null,a.f(n,o,l),t.cancelBubble=!0,e.resizingEvent=null,!1}if(e.timeRangeSelecting){if(e.timeRangeSelecting.moved){var d=e.timeRangeSelecting,a=d.root,o=new DayPilot.Date(a.getDateFromCell(d.from.x,d.from.y)),c=o.addDays(d.width);a.k(o,c),a.clearShadow()}e.timeRangeSelecting=null}},DayPilot.Month=e.Month,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotMonth=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Month(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotMonth",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Month(i[0]);n.V.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(s);var l=t["$watch"],d=a["config"]||a["daypilotConfig"],c=a["events"]||a["daypilotEvents"];l.call(t,d,function(e){for(var t in e)n[t]=e[t];n.update()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(),"undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.nav){DayPilot.Navigator=function(e,t){this.v="2023.1.450-lite";var i=this;this.id=e,this.api=2,this.isNavigator=!0,this.autoFocusOnClick=!0,this.weekStarts="Auto",this.selectMode="Day",this.titleHeight=30,this.dayHeaderHeight=30,this.bound=null,this.cellWidth=30,this.cellHeight=30,this.cssClassPrefix="navigator_default",this.freeHandSelectionEnabled=!1,this.selectionStart=(new DayPilot.Date).getDatePart(),this.selectionEnd=null,this.selectionDay=null,this.showMonths=1,this.skipMonths=1,this.command="navigate",this.year=(new DayPilot.Date).getYear(),this.month=(new DayPilot.Date).getMonth()+1,this.showWeekNumbers=!1,this.weekNumberAlgorithm="Auto",this.rowsPerMonth="Six",this.orientation="Vertical",this.locale="en-us",this.rtl=!1,this.visible=!0,this.timeRangeSelectedHandling="Bind",this.visibleRangeChangedHandling="Enabled",this.onVisibleRangeChange=null,this.onVisibleRangeChanged=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.nav={},this.Ka={},this.yc=function(){this.root.dp=this,this.root.className=this.i("_main"),"Horizontal"===this.orientation?(this.root.style.width=this.showMonths*(7*o.cellWidth()+this.zc())+"px",this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):this.root.style.width=7*o.cellWidth()+this.zc()+"px",this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var e=document.createElement("input");e.type="hidden",e.name=i.id+"_state",e.id=e.name,this.root.appendChild(e),this.state=e,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.T=function(){return 2===i.api},this.tc=function(){this.root.innerHTML=""},this.i=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Ac=function(e,t){var i=this.i("_"+t);DayPilot.Util.addClass(e,i)},this.Bc=function(e,t){var i=this.i("_"+t);DayPilot.Util.removeClass(e,i)},this.uc=function(e,t){var a={};a.cells=[],a.days=[],a.weeks=[];var n=this.startDate.addMonths(e),r=t.before,s=t.after,l=n.firstDayOfMonth(),d=l.firstDayOfWeek(o.weekStarts()),c=l.addMonths(1),u=DayPilot.DateUtil.daysDiff(d,c),h="Auto"===this.rowsPerMonth?Math.ceil(u/7):6;a.rowCount=h;var f=(new DayPilot.Date).getDatePart(),m=7*o.cellWidth()+this.zc();a.width=m;var p=this.cellHeight*h+this.titleHeight+this.dayHeaderHeight;a.height=p;var v=document.createElement("div");if(v.style.width=m+"px",v.style.height=p+"px","Horizontal"===this.orientation)v.style.position="absolute",v.style.left=m*e+"px",v.style.top="0px",a.top=0,a.left=m*e;else{v.style.position="relative";var y=e>0?i.months[e-1].top+i.months[e-1].height:0;a.top=y,a.left=0}v.className=this.i("_month"),v.style.cursor="default",v.style.MozUserSelect="none",v.style.KhtmlUserSelect="none",v.style.WebkitUserSelect="none",v.month=a,this.root.appendChild(v);var g=this.titleHeight+this.dayHeaderHeight,b=document.createElement("div");b.style.position="absolute",b.style.left="0px",b.style.right="0px",b.style.top="0px",b.style.width=o.cellWidth()+"px",b.style.height=this.titleHeight+"px",b.style.lineHeight=this.titleHeight+"px",b.setAttribute("unselectable","on"),b.className=this.i("_titleleft"),t.left&&(b.style.cursor="pointer",b.innerHTML="<span><</span>",b.onclick=this.Cc),v.appendChild(b),this.tl=b;var D=document.createElement("div");D.style.position="absolute",D.style.left=o.cellWidth()+"px",D.style.top="0px",D.style.width=5*o.cellWidth()+this.zc()+"px",D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.i("_title"),D.innerHTML=o.locale().monthNames[n.getMonth()]+" "+n.getYear(),v.appendChild(D),this.ti=D;var x=document.createElement("div");x.style.position="absolute",x.style.left=6*o.cellWidth()+this.zc()+"px",x.style.right=6*o.cellWidth()+this.zc()+"px",x.style.top="0px",x.style.width=o.cellWidth()+"px",x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.i("_titleright"),t.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.Dc),v.appendChild(x),this.tr=x;var w=this.zc();if(this.showWeekNumbers)for(var C=0;C<h;C++){var P=d.addDays(7*C),_=null;switch(this.weekNumberAlgorithm){case"Auto":_=1===o.weekStarts()?P.weekNumberISO():P.weekNumber();break;case"US":_=P.weekNumber();break;case"ISO8601":_=P.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var k=document.createElement("div");k.style.position="absolute",k.style.left="0px",k.style.right="0px",k.style.top=C*this.cellHeight+g+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.cellHeight+"px",k.style.lineHeight=this.cellHeight+"px",k.setAttribute("unselectable","on"),k.className=this.i("_weeknumber"),k.innerHTML="<span>"+_+"</span>",v.appendChild(k),a.weeks.push(k)}for(var S=0;S<7;S++){a.cells[S]=[];var k=document.createElement("div");k.style.position="absolute",k.style.left=S*o.cellWidth()+w+"px",k.style.right=S*o.cellWidth()+w+"px",k.style.top=this.titleHeight+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.dayHeaderHeight+"px",k.style.lineHeight=this.dayHeaderHeight+"px",k.setAttribute("unselectable","on"),k.className=this.i("_dayheader"),k.innerHTML="<span>"+this.Ec(S)+"</span>",v.appendChild(k),a.days.push(k);for(var C=0;C<h;C++){var P=d.addDays(7*C+S),M=this.Fc(P)&&"none"!==this.Gc(),T=P.firstDayOfMonth()===n,A=P<n,H=P>=n.addMonths(1);if("month"===this.Gc())M=M&&T;else if("day"===this.Gc())M=M&&(T||r&&A||s&&H);else if("week"===this.Gc()){var E=P.firstDayOfMonth()===n;M=M&&(E||r&&A||s&&H)}var N=document.createElement("div");a.cells[S][C]=N;var I=i.Hc(S,C),z=I.x,O=I.y;N.day=P,N.x=S,N.y=C,N.left=z,N.top=O,N.isCurrentMonth=T,N.isNextMonth=H,N.isPrevMonth=A,N.showBefore=r,N.showAfter=s,N.className=this.i(T?"_day":"_dayother"),i.Ac(N,"cell"),P.getTime()===f.getTime()&&T&&this.Ac(N,"today"),0!==P.dayOfWeek()&&6!==P.dayOfWeek()||this.Ac(N,"weekend"),N.style.position="absolute",N.style.left=z+"px",N.style.right=z+"px",N.style.top=O+"px",N.style.width=o.cellWidth()+"px",N.style.height=this.cellHeight+"px",N.style.lineHeight=this.cellHeight+"px";var U=document.createElement("div");U.style.position="absolute",U.className=P.getTime()===f.getTime()&&T?this.i("_todaybox"):this.i("_daybox"),i.Ac(U,"cell_box"),U.style.left="0px",U.style.top="0px",U.style.right="0px",U.style.bottom="0px",N.appendChild(U);var L=null;if(this.cells&&this.cells[P.toStringSortable()]&&(L=this.cells[P.toStringSortable()]),"function"==typeof i.onBeforeCellRender){var j={};j.cell=L||{},j.cell.day=P,j.cell.isCurrentMonth=T,j.cell.isToday=P.getTime()===f.getTime()&&T,j.cell.isWeekend=0===P.dayOfWeek()||6===P.dayOfWeek(),L?(j.cell.html=L.html||P.getDay(),j.cell.cssClass=L.css):(j.cell.html=P.getDay(),j.cell.cssClass=null),i.onBeforeCellRender(j),L=j.cell}if(L&&DayPilot.Util.addClass(N,L.cssClass||L.css),T||r&&A||s&&H){var R=document.createElement("div");R.innerHTML=P.getDay(),R.style.position="absolute",R.style.left="0px",R.style.top="0px",R.style.right="0px",R.style.bottom="0px",i.Ac(R,"cell_text"),N.isClickable=!0,L&&L.html&&(R.innerHTML=L.html),N.appendChild(R)}N.setAttribute("unselectable","on"),N.onclick=this.Ic,v.appendChild(N),M&&(i.Jc(v,S,C),this.selected.push(N))}}var B=document.createElement("div");B.style.position="absolute",B.style.left="0px",B.style.top=g-2+"px",B.style.width=7*o.cellWidth()+this.zc()+"px",B.style.height="1px",B.style.fontSize="1px",B.style.lineHeight="1px",B.className=this.i("_line"),v.appendChild(B),this.months.push(a)},this.Hc=function(e,t){var i=this.titleHeight+this.dayHeaderHeight,a=this.zc();return{"x":e*o.cellWidth()+a,"y":t*this.cellHeight+i}},this.Jc=function(e,t,a){var n=e.month.cells[t][a];i.Ac(n,"select")},this.Kc=function(e,t,a){var n=e.month.cells[t][a];i.Bc(n,"select")},this.zc=function(){return this.showWeekNumbers?o.cellWidth():0},this.Lc=function(){if(this.items)for(var e=0;e<this.showMonths;e++)for(var t=0;t<7;t++)for(var i=0;i<6;i++){var a=this.months[e].cells[t][i];a&&(1===this.items[a.day.toStringSortable()]?(this.Ac(a,"busy"),this.Bc(a,"free")):(this.Bc(a,"busy"),this.Ac(a,"free")))}},this.Mc=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.Gc=function(){return(this.selectMode||"").toLowerCase()},this.Nc=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.Gc()){case"day":this.selectionStart=e,this.selectionDay=e,this.selectionEnd=e;break;case"week":this.selectionDay=e,this.selectionStart=e.firstDayOfWeek(o.weekStarts()),this.selectionEnd=this.selectionStart.addDays(6);break;case"month":this.selectionDay=e,this.selectionStart=e.firstDayOfMonth(),this.selectionEnd=this.selectionStart.lastDayOfMonth();break;case"none":this.selectionEnd=e;break;default:throw"Unknown selectMode value."}},this.Oc=null,this.select=function(e,t,a){var n=t&&(t instanceof DayPilot.Date||"string"==typeof t),o=t&&"object"==typeof t||"boolean"==typeof t,r=e,s=n?t:null,l=o?t:a;if(!this.da)return void(this.Oc={"date1":r,"date2":s,"options":l});var d=!0,c=!0;l&&"object"==typeof l?(l.dontFocus&&(d=!1),l.dontNotify&&(c=!1)):"boolean"==typeof l&&(d=!l);var u=this.selectionStart,h=this.selectionEnd;this.selectionStart=new DayPilot.Date(r).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(d){var m=this.startDate;(this.selectionStart<this.Pc()||this.selectionStart>=this.Qc())&&(m=this.selectionStart.firstDayOfMonth()),m.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=m}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.Nc(),this.tc(),this.yc(),this.Rc(),this.Lc(),this.Mc(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.k(),f&&this.Sc()},this.update=function(e){if(i.Ea(e),this.da){if(i.Tc)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.Uc();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.nb(),t.start===i.selectionStart&&t.end==i.selectionEnd&&t.day===i.selectionDay||i.k()}},this.nb=function(){this.tc(),this.yc(),this.Nc(),this.Rc(),this.H(),this.Lc(),this.Mc(),this.visible?this.show():this.hide()},this.Uc=function(){i.Ka={}},this.Ha=null,this.Ea=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?i.events.list=e.list:i.events.list=e}}};this.Ha=t;for(var a in e)if(t[a]){var n=t[a];n.data=e[a],n.preInit&&n.preInit()}else i[a]=e[a]}},this.Ia=function(){var e=this.Ha;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.q=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.p();var n="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.s,n,this.Vc):WebForm_DoCallback(this.uniqueID,n,this.t,null,this.callbackError,!0)},this.Vc=function(e){if("function"==typeof i.onAjaxError){var t={};t.request=e,i.onAjaxError(t)}else"function"==typeof i.ajaxError&&i.ajaxError(e)},this.s=function(e){i.t(e.responseText)},this.o=function(e,t,a){var n={};n.action=e,n.parameters=a,n.data=t,n.header=this.p();var o="JSON"+JSON.stringify(n);__doPostBack(i.uniqueID,o)},this.p=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.Wc=function(e,t){"refresh"===e&&this.Sc()},this.Ec=function(e){var t=e+o.weekStarts();return t>6&&(t-=7),o.locale().dayNamesShort[t]},this.Fc=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.Xc=function(e){for(var t=0;t<i.months.length;t++){var a=i.months[t];if(!a)return null;if(e.x<a.left||a.width<e.x)return null;i.months[t].height;if(a.top<=e.y&&e.y<a.top+a.height)return t}return null},this.Yc=function(e){var t=DayPilot.mo3(i.nav.top,e),a=i.Xc(t);if(null===a)return null;var n=i.months[a],o=this.titleHeight+this.dayHeaderHeight;if(n.top<=t.y&&t.y<n.top+o)return{"month":a,"x":0,"y":0,"coords":t,"header":!0};for(var r=0;r<n.cells.length;r++)for(var s=0;s<n.cells[r].length;s++){var l=n.cells[r][s],d=l.top+n.top,c=l.left+n.left;if(c<=t.x&&t.x<c+i.cellWidth&&d<=t.y&&t.y<d+i.cellHeight)return{"month":a,"x":r,"y":s,"coords":t}}return null},this.Zc=function(e){if(i.freeHandSelectionEnabled){var t=i.Yc(e);t&&!t.header&&(a.start=t),i.months[t.month].cells[t.x][t.y],e.preventDefault()}},this.$c=function(e){if(a.start){var t=i.Yc(e);if(a.end)a.end=t;else if(t){var n=3,o=DayPilot.distance(a.start.coords,t.coords);o>n&&(a.end=t)}a.end&&(a.clear(),a.draw())}},this._c={};var a=this._c;a.start=null,a.drawCell=function(e){var t=i.months[e.month],n=i.Hc(e.x,e.y),o=t.top+n.y,r=t.left+n.x,s=document.createElement("div");s.style.position="absolute",s.style.left=r+"px",s.style.top=o+"px",s.style.height=i.cellHeight+"px",s.style.width=i.cellWidth+"px",s.style.backgroundColor="#ccc",s.style.opacity=.5,s.style.cursor="default",i.nav.preselection.appendChild(s),a.cells.push(s)},a.clear=function(){if(a.cells){for(var e=0;e<a.cells.length;e++)i.nav.preselection.removeChild(a.cells[e]);a.cells=[]}},a.draw=function(){var e=a.ordered(),t=new n(e.start),o=e.end;if(o){if(o===a.end&&o.header&&o.month>0){o.month-=1;var r=i.months[o.month];o.x=6,o.y=r.rowCount-1}for(a.cells=[];!t.is(o);){a.drawCell(t);var s=new n(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}a.drawCell(t)}},a.ordered=function(){var e=a.start,t=a.end,i={};return!t||new n(e).before(t)?(i.start=e,i.end=t):(i.start=t,i.end=e),i};var n=function(e,t,a){if(e instanceof n)return e;if("object"==typeof e){var o=e;this.month=o.month,this.x=o.x,this.y=o.y}else this.month=e,this.x=t,this.y=a;this.is=function(e){return this.month===e.month&&this.x===e.x&&this.y===e.y},this.next=function(){var e=this;if(e.x<6)return{"month":e.month,"x":e.x+1,"y":e.y};var t=i.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<i.months.length-1?{"month":e.month+1,"x":0,"y":0}:null},this.visible=function(){var e=this.cell();return!!e.isCurrentMonth||(!(!e.isPrevMonth||!e.showBefore)||!(!e.isNextMonth||!e.showAfter))},this.nextVisible=function(){for(var e=this;!e.visible();){var t=e.next();if(!t)return null;e=new n(t)}return e},this.previous=function(){var e=this;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};i.months[e.month];if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=i.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=this;!e.visible();){var t=e.previous();if(!t)return null;e=new n(t)}return e},this.cell=function(){return i.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new n(e).date()}};this.Ic=function(e){var t=this.parentNode,a=this.parentNode.month,n=this.x,o=this.y,r=a.cells[n][o].day;if(a.cells[n][o].isClickable){i.clearSelection(),i.selectionDay=r;var r=i.selectionDay;switch(i.Gc()){case"none":i.selectionStart=r,i.selectionEnd=r;break;case"day":if(i.autoFocusOnClick){var s=r;if(r<i.Pc()||r>=i.Qc())return void i.select(r)}var l=a.cells[n][o];i.Jc(t,n,o),i.selected.push(l),i.selectionStart=l.day,i.selectionEnd=l.day;break;case"week":if(i.autoFocusOnClick){var s=a.cells[0][o].day,d=a.cells[6][o].day;if(s.firstDayOfMonth()===d.firstDayOfMonth()&&(s<i.Pc()||d>=i.Qc()))return void i.select(r)}for(var c=0;c<7;c++)i.Jc(t,c,o),i.selected.push(a.cells[c][o]);i.selectionStart=a.cells[0][o].day,i.selectionEnd=a.cells[6][o].day;break;case"month":if(i.autoFocusOnClick){var s=r;if(r<i.Pc()||r>=i.Qc())return void i.select(r)}for(var s=null,d=null,o=0;o<6;o++)for(var n=0;n<7;n++){var l=a.cells[n][o];l&&l.day.getYear()===r.getYear()&&l.day.getMonth()===r.getMonth()&&(i.Jc(t,n,o),i.selected.push(l),null===s&&(s=l.day),d=l.day)}i.selectionStart=s,i.selectionEnd=d;break;default:throw"unknown selectMode"}i.Mc(),i.k()}},this.k=function(e){var t=i.selectionStart,a=i.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(t,a),o=i.selectionDay;if(e=e||{},i.T()){var r={};if(r.start=t,r.end=a,r.day=o,r.days=n,r.mode=e.mode||i.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(r),r.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(r)}else switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"JavaScript":i.onTimeRangeSelected(t,a,o);break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,n.day=a,this.o("TimeRangeSelected",i,n)},this.Dc=function(e){i.ad(i.skipMonths)},this.Cc=function(e){i.ad(-i.skipMonths)},this.ad=function(e){this.startDate=this.startDate.addMonths(e),this.tc(),this.yc(),this.Rc(),this.Mc(),this.Sc(),this.Lc()},this.Pc=function(){return i.startDate.firstDayOfMonth()},this.Qc=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts())},this.visibleEnd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(o.weekStarts()).addDays(42)},this.Sc=function(){var e=this.visibleStart(),t=this.visibleEnd();if(i.T()){var a={};if(a.start=e,a.end=t,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onVisibleRangeChange&&(i.onVisibleRangeChange(a),a.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof i.onVisibleRangeChanged&&i.onVisibleRangeChanged(a)}else switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"JavaScript":this.onVisibleRangeChanged(e,t);break;case"Disabled":}},this.visibleRangeChangedCallBack=function(e){var t={};this.q("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.o("Visible",e,t)},this.t=function(e,t){var e=JSON.parse(e);i.items=e.Items,i.cells=e.Cells,i.cells?i.update():i.Lc()},this.Rc=function(){for(var e=0;e<this.showMonths;e++){var t=this.bd(e);this.uc(e,t)}this.root.style.height=this.cd()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.cd=function(){if("Horizontal"===this.orientation){for(var e=0,t=0;t<this.months.length;t++){var i=this.months[t];i.height>e&&(e=i.height)}return e}for(var a=0,t=0;t<this.months.length;t++){var i=this.months[t];a+=i.height}return a},this.bd=function(e){if(this.internal.showLinks)return this.internal.showLinks;var t={};return t.left=0===e,t.right=0===e,t.before=0===e,t.after=e===this.showMonths-1,"Horizontal"===this.orientation&&(t.right=e===this.showMonths-1),t},this.V={},this.V.scope=null,this.V.notify=function(){i.V.scope&&i.V.scope["$apply"]()},this.internal={},this.internal.loadOptions=i.Ea,this.internal.initialized=function(){return i.da},this.D={};var o=this.D;o.locale=function(){return DayPilot.Locale.find(i.locale)},o.weekStarts=function(){if("Auto"===i.weekStarts){var e=o.locale();return e?e.weekStarts:0}return i.weekStarts},o.cellWidth=function(){if(i.Ka.cellWidth)return i.Ka.cellWidth;var e=i.dd("_cell_dimensions").width;return e||(e=i.cellWidth),i.Ka.cellWidth=e,e},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];i.Kc(t.parentNode,t.x,t.y)}this.selected=[]},this.ed=function(){return!!this.backendUrl&&("undefined"==typeof i.items||!i.items)},this.events={},this.H=function(){if(DayPilot.isArray(this.events.list)){this.items={};for(var e=0;e<this.events.list.length;e++){var t=this.events.list[e];if(!t.hidden){var i=this.fd(t);for(var a in i)this.items[a]=1}}}},this.dd=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.i(e);var a=i.root||document.body;a.appendChild(t);var n=t.offsetHeight,o=t.offsetWidth;a.removeChild(t);var r={};return r.height=n,r.width=o,r},this.fd=function(e){for(var t=new DayPilot.Date(e.start),i=new DayPilot.Date(e.end),a={},n=t.getDatePart();n.getTime()<i.getTime();)a[n.toStringSortable()]=1,n=n.addDays(1);return a},this.show=function(){i.visible=!0,i.root.style.display=""},this.hide=function(){i.visible=!1,i.root.style.display="none"},this.Ja=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Navigator() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Navigator: The placeholder element not found: '"+e+"'."}this.root=this.nav.top},this.init=function(){if(this.Ja(),!this.root.dp){this.Nc(),this.yc(),
|
|
16
|
+
this.Rc(),this.H(),this.Lc(),this.B(),this.gd(),this.Ca();if(this.ed()&&this.Sc(),this.da=!0,this.Ia(),this.Oc){var e=this.Oc;this.select(e.date1,e.date2,e.options),this.Oc=null}return this}},this.gd=function(){i.nav.top.onmousedown=this.Zc,i.nav.top.onmousemove=this.$c},this.Ca=function(){DayPilot.re(document,"mouseup",i.hd)},this.hd=function(e){if(a.start&&a.end){var t=DayPilot.mo3(i.nav.top,e);if(t.x===a.start.coords.x&&t.y===a.start.coords.y)return a.start=null,void a.clear();a.clear();var o=a.ordered();o.start=new n(o.start).nextVisible(),o.end=new n(o.end).previousVisible(),i.selectionDay=new n(o.start).date(),i.selectionStart=i.selectionDay,i.selectionEnd=new n(o.end).date(),a.start=null,a.end=null,i.tc(),i.yc(),i.Rc(),i.Lc(),i.Mc();i.k({"mode":"FreeHand"})}a.start=null,a.end=null},this.dispose=function(){var e=i;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.Tc=!0)},this.B=function(){this.root.dispose=this.dispose},this.Init=this.init,this.Ea(t)},"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotNavigator=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Navigator(this.id);this.daypilot=i;for(var a in e)i[a]=e[a];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotNavigator",["$parse",function(e){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(t,i){return t.replaceWith(this["template"].replace("{{id}}",i["id"])),function(t,i,a){var n=new DayPilot.Navigator(i[0]);n.V.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)if(0===s.indexOf("on")){var l=DayPilot.Util.shouldApply(s);l?!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(s):!function(i){n[i]=function(n){e(a[i])(t,{"args":n})}}(s)}var d=t["$watch"],c=a["config"]||a["daypilotConfig"],u=a["events"]||a["daypilotEvents"];d.call(t,c,function(e,t){for(var i in e)n[i]=e[i];n.update()},!0),d.call(t,u,function(e){n.events.list=e,n.H(),n.Lc()},!0)}}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}();!function(){var t="undefined"!=typeof t?t:require("vue"),n="function"==typeof t.h,o=n&&t.version&&!t.version.startsWith("2"),i={};o?(i.DayPilotCalendar={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Calendar(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}},i.DayPilotMonth={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Month(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}},i.DayPilotNavigator={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(){return t.h("div",{id:this.id})},mounted:function(){this.control=new DayPilot.Navigator(this.id,this.config).init()},beforeUnmount:function(){this.control&&this.control.dispose()}}):(i.DayPilotCalendar={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Calendar(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},i.DayPilotMonth={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Month(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},i.DayPilotNavigator={props:["id","config","events"],watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.id}})},mounted:function(){this.control=new DayPilot.Navigator(this.id,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}}),module.exports={DayPilot:DayPilot,DayPilotCalendar:i.DayPilotCalendar,DayPilotMonth:i.DayPilotMonth,DayPilotNavigator:i.DayPilotNavigator}}();
|