UNPKG

@dlhsoft/ganttcharthyperlibrary

Version:

Gantt Chart library for JavaScript and TypeScript with Angular, React, and Vue extensions

94 lines 103 kB
"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.Data.HTML.Controls",company:"DlhSoft",product:"Data Modern Library",version:"5.2.3.1",copyright:"Copyright \ufffd 2014-2021 DlhSoft",title:"Data HTML Controls",description:"Data related HTML client components"});DlhSoft.buildReleaseDate=function(m,g,n){m=new Date(m,g-1,n);return m>DlhSoft.buildReleaseDate?m:DlhSoft.buildReleaseDate}(2015,5,8);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var m=_0x5c25[1],g=_0x5c25[2],n=[],u=[],D=_0x5c25[3],A=function(v,q){if(typeof v!==g||typeof q!==g)return!1;if(q==D)return!0;var n=q[_0x5c25[11]](_0x5c25[10]);if(0<=n){var t=q[_0x5c25[12]](0,n),p,s=t[_0x5c25[11]](_0x5c25[10]);if(0<=s)try{p=new Date(parseInt(t[_0x5c25[12]](s+1)))}catch(j){}typeof p===m&&(p=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>p)return!1;t=t+_0x5c25[10]+v;for(i=p=0;i<t[_0x5c25[5]];i++)s=t[_0x5c25[14]](i),p=(p<<5)- p+s,p&=p;0>p&&(p=Math[_0x5c25[15]](2,32)-p);t=p.toString(16)[_0x5c25[16]]();n=q[_0x5c25[12]](n+1);if(t==n)return!0}return!1},C=function(g,q,n,t,p){var s=_0x5c25[17],j=_0x5c25[18],k=typeof ComponentSource===m||!ComponentSource?j+_0x5c25[19]+t+_0x5c25[20]+p:_0x5c25[21],c=t+_0x5c25[22]+p+_0x5c25[23],a=_0x5c25[24],b=_0x5c25[25],d=_0x5c25[26];setTimeout(function(){var f=g[_0x5c25[27]],e=f[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var h=f[_0x5c25[29]](_0x5c25[28]);h[_0x5c25[32]](_0x5c25[30], _0x5c25[33]);var l=f[_0x5c25[29]](_0x5c25[28]);l[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);h[_0x5c25[35]](l);l[_0x5c25[35]](f[_0x5c25[36]](s));h[_0x5c25[35]](f[_0x5c25[36]](a+_0x5c25[10]));l=f[_0x5c25[29]](_0x5c25[28]);l[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);l[_0x5c25[35]](f[_0x5c25[36]](q));h[_0x5c25[35]](l);h[_0x5c25[35]](f[_0x5c25[36]](b+_0x5c25[10]));l=f[_0x5c25[29]](_0x5c25[28]);l[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);l[_0x5c25[35]](f[_0x5c25[36]](c));h[_0x5c25[35]](l);h[_0x5c25[35]](f[_0x5c25[36]](d+ _0x5c25[10]));l=f[_0x5c25[29]](_0x5c25[28]);l[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var o=f[_0x5c25[29]](_0x5c25[39]);o[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);o[_0x5c25[32]](_0x5c25[41],k);o[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);o[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[44]));l[_0x5c25[35]](o);o=f[_0x5c25[29]](_0x5c25[39]);o[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);o[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);o[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[47]));o[_0x5c25[50]](_0x5c25[48],function(){g[_0x5c25[49]](e);u[_0x5c25[7]](n)}, !1);l[_0x5c25[35]](o);h[_0x5c25[35]](l);e[_0x5c25[35]](h);g[_0x5c25[35]](e)},0);setTimeout(function(){alert(s+_0x5c25[51]+a+_0x5c25[52]+q+_0x5c25[51]+b+_0x5c25[53]+c+_0x5c25[51]+d+_0x5c25[4])},6E5)};return{setLicense:function(g,m){n[_0x5c25[7]]({type:g,content:m})},validate:function(v,q,w,t,p,s,j){for(var q=q+_0x5c25[4]+w,k=0;k<u[_0x5c25[5]];k++)if(u[k]==q)return;a:if(typeof s!==g&&typeof j!==m&&(j[_0x5c25[6]]!==m&&(s=j[_0x5c25[6]]),typeof j===g&&(s=j)),typeof s!==g)for(j=0;j<n[_0x5c25[5]];j++)if(k= n[j],k[_0x5c25[8]]==q&&typeof k[_0x5c25[9]]===g){s=k[_0x5c25[9]];break a}A(q,s)?v[_0x5c25[6]]=s:C(v,w,q,t,p)}}}());var __extends=this&&this.__extends||function(m,g){function n(){this.constructor=m}for(var u in g)g.hasOwnProperty(u)&&(m[u]=g[u]);m.prototype=null===g?Object.create(g):(n.prototype=g.prototype,new n)},DlhSoft; (function(m){(function(g){var n;(function(j){j.initialize=function(c,a,b){return new g(c,a,b)};j.get=function(c){return c.component};var g=function(){function c(a,b,d){this.host=a;this.settings=b;this.isInitialized=!1;var f="DlhSoft.Controls ContentControl DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[f[5]][f[4]](a,f[0],f[1],f[2],f[3],d,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;c.initializeSettings(this.settings);b=this.settings.content;if("undefined"=== typeof b||null==b)b=c.getContent(a);this.content=b;this.settings.content=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.containerStyle&&(a.containerStyle="font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.contentTemplate&&(a.contentTemplate=function(a,d){if(typeof d==="undefined"||d==null)d="";if(d instanceof HTMLElement)return d;var c=a.createElement("span"); c.innerHTML=d.toString();return c})};c.getContent=function(a){var b=a.ownerDocument.createElement("span"),d=[],c;for(c=0;c<a.childNodes.length;c++)d.push(a.childNodes[c]);for(c=a.childNodes.length;0<c--;)a.removeChild(a.childNodes[c]);for(c=0;c<d.length;c++)b.appendChild(d[c]);return b};c.prototype.refresh=function(){for(var a=this.host.ownerDocument,b=this.host.childNodes.length;0<b--;)this.host.removeChild(this.host.childNodes[b]);this.contentContainer=this.settings.contentTemplate(a,this.content); null!=this.settings.containerStyle&&this.contentContainer.setAttribute("style",this.settings.containerStyle);"undefined"!==typeof this.settings.containerClass&&this.contentContainer.setAttribute("class",this.settings.containerClass);this.host.appendChild(this.contentContainer)};c.prototype.setContent=function(a){this.content=a;this.settings.content=a;this.refresh()};return c}();j.Element=g})(n=g.ContentControl||(g.ContentControl={}));(function(j){j.initialize=function(c,a,b,d){return new g(c,a,b, d)};j.get=function(c){return c.component};var g=function(){function c(a,b,d,f){this.host=a;this.settings=d;this.isInitialized=!1;var e="DlhSoft.Controls ItemsControl DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[e[5]][e[4]](a,e[0],e[1],e[2],e[3],f,d);this.host.component=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings);if("undefined"===typeof b||null==b)b=this.settings.items;if("undefined"===typeof b||null==b)b=c.getItems(a);this.items=b;this.settings.items= b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.itemContainerStyle&&(a.itemContainerStyle="font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.itemTemplate&&(a.itemTemplate=function(a,d){if(typeof d==="undefined"||d==null)d="";if(d instanceof HTMLElement)return d;var c=a.createElement("span");c.innerHTML=d.toString();return c})};c.getItems=function(a){var b=[],d; for(d=0;d<a.childNodes.length;d++)a.childNodes[d]instanceof HTMLElement&&b.push(a.childNodes[d]);for(d=a.childNodes.length;0<d--;)a.removeChild(a.childNodes[d]);return b};c.prototype.refresh=function(){for(var a=this.host.ownerDocument,b=this.host.childNodes.length;0<b--;)this.host.removeChild(this.host.childNodes[b]);this.itemContainers=[];for(b=0;b<this.items.length;b++){var d=this.settings.itemTemplate(a,this.items[b]);null!=this.settings.itemContainerStyle&&d.setAttribute("style",this.settings.itemContainerStyle); "undefined"!==typeof this.settings.itemContainerClass&&d.setAttribute("class",this.settings.itemContainerClass);this.host.appendChild(d)}};c.prototype.setItems=function(a){this.items=a;this.settings.items=a;this.refresh()};return c}();j.Element=g})(g.ItemsControl||(g.ItemsControl={}));var u;(function(j){j.initialize=function(c,a,b,d){return new g(c,a,b,d)};j.get=function(c){return c.component};var g=function(){function c(a,b,d,f){this.host=a;this.clickHandler=b;this.settings=d;this.isInitialized= !1;b="DlhSoft.Controls Button DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[b[5]][b[4]](a,b[0],b[1],b[2],b[3],f,d);this.host.component=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings);var e=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null)e=e.createElement("span"),this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(e,this.inputHost),this.host=e,m[b[5]][b[4]](e,b[0],b[1],b[2],b[3],f,d),this.host.component= this;if(d=this.host.getAttribute("style"))this.settings.containerStyle=d+";"+this.settings.containerStyle,this.host.setAttribute("style","");if((d=this.host.getAttribute("class"))&&!this.settings.containerClass)this.settings.containerClass=d,this.host.setAttribute("class","");d=this.settings.content;if("undefined"===typeof d||null==d)d=n.Element.getContent(a);this.content=d;this.settings.content=d;this.isEnabled=this.settings.isEnabled;this.isInitialRefresh=!0;this.refresh();this.isInitialized=!0} c.initializeSettings=function(a){n.Element.initializeSettings(a);a.containerStyle+=("Modern"==a.theme?"; color: #505050":"")+"; display: inline-block; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; background-color: #f0f0f0; border: 1px solid #e0e0e0; "+("Modern"==a.theme?"":"; border-radius: 3px");"undefined"===typeof a.inputType&&(a.inputType="button");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"=== typeof a.disabledStyle&&(a.disabledStyle="opacity: 0.5");"undefined"===typeof a.hoveringStyle&&(a.hoveringStyle="background-color: "+("Modern"==a.theme?"#e8e8ff":"#e8e8e8"));"undefined"===typeof a.pressedStyle&&(a.pressedStyle="background-color: "+("Modern"==a.theme?"#d0d0ff":"#e8e8e8"));"undefined"===typeof a.contentStyle&&(a.contentStyle="padding: 4px 8px 4px 8px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default")};c.prototype.refresh= function(){var a=this;if(this.isInitialRefresh&&(delete this.isInitialRefresh,this instanceof D.Element))return;for(var b=this.host.ownerDocument,d=this.host.childNodes.length;0<d--;)this.host.removeChild(this.host.childNodes[d]);this.inputHost?(this.inputElement=this.inputHost,this.inputElement.value&&(this.content=this.inputElement.value)):this.inputElement=b.createElement("input");this.settings.inputName&&this.inputElement.setAttribute("name",this.settings.inputName);this.inputElement.value||(this.inputElement.value= this.inputElement.name);this.inputElement.setAttribute("type","toggleButton"!=this.settings.inputType?this.settings.inputType:"checkbox");this.inputElement.style.display="none";this.host.appendChild(this.inputElement);this.contentControlHost=b.createElement("div");this.contentControlHost.setAttribute("style",this.settings.containerStyle);"undefined"!==typeof this.settings.containerClass&&this.contentControlHost.setAttribute("class",this.settings.containerClass);this.host.appendChild(this.contentControlHost); this.contentControl=new n.Element(this.contentControlHost,{theme:this.settings.theme,containerStyle:null,content:this.content,contentTemplate:function(b,d){if(typeof d==="undefined"||d==null)d="";var c=b.createElement("div");a.contentContainer=c;c.setAttribute("style",a.settings.contentStyle);typeof a.settings.contentClass!=="undefined"&&c.setAttribute("class",a.settings.contentClass);c.appendChild(a.settings.contentTemplate(b,d));var l=b.createElement("div");a.hoverableContainer=l;if(!a.isEnabled){a.hoverableContainer.setAttribute("style", a.settings.disabledStyle);typeof a.settings.disabledClass!=="undefined"&&a.hoverableContainer.setAttribute("class",a.settings.disabledClass)}var o=b.createElement("div");a.pressableContainer=o;o.appendChild(c);l.appendChild(o);l.onmouseenter=function(){if(a.isEnabled&&a.hoverableContainer==l){l.setAttribute("style",a.settings.hoveringStyle);typeof a.settings.hoveringClass!=="undefined"&&l.setAttribute("class",a.settings.hoveringClass);if(a.settings.inputType!="toggleButton"&&a.isPressed){o.setAttribute("style", a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"&&o.setAttribute("class",a.settings.pressedClass)}a.isHovering=true;a.settings.hoveringHandler&&a.settings.hoveringHandler(a)}};l.onmouseleave=function(){if(a.isEnabled&&a.hoverableContainer==l){a.isHovering=false;l.setAttribute("style","");l.setAttribute("class","");if(a.settings.inputType!="toggleButton"){o.setAttribute("style","");o.setAttribute("class","")}a.settings.unhoveringHandler&&a.settings.unhoveringHandler(a)}};if(a.settings.inputType!= "toggleButton"){o.onmousedown=function(){if(a.isEnabled&&a.pressableContainer==o){o.setAttribute("style",a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"&&o.setAttribute("class",a.settings.pressedClass);a.isPressed=true;a.settings.pressedHandler&&a.settings.pressedHandler(a)}};b.addEventListener("mouseup",function(){if(a.isEnabled&&a.pressableContainer==o){a.isPressed=false;o.setAttribute("style","");o.setAttribute("class","");a.settings.unpressedHandler&&a.settings.unpressedHandler(a)}}, false);o.onmouseup=function(){if(a.isEnabled&&a.pressableContainer==o){a.clickHandler&&a.clickHandler();try{var b=a.inputElement.ownerDocument.createEvent("HTMLEvents");b.initEvent("click",true,true);a.inputElement.dispatchEvent(b)}catch(d){}}}}else o.onmousedown=function(){if(a.isEnabled&&a.pressableContainer==o)if(a.isPressed){a.isPressed=false;o.setAttribute("style","");o.setAttribute("class","");a.settings.unpressedHandler&&a.settings.unpressedHandler(a);a.clickHandler&&a.clickHandler();try{d= a.inputElement.ownerDocument.createEvent("HTMLEvents");d.initEvent("click",true,true);a.inputElement.dispatchEvent(d);c=a.inputElement.ownerDocument.createEvent("HTMLEvents");c.initEvent("change",true,true);a.inputElement.dispatchEvent(c)}catch(b){}}else{o.setAttribute("style",a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"&&o.setAttribute("class",a.settings.pressedClass);a.isPressed=true;a.settings.pressedHandler&&a.settings.pressedHandler(a);a.clickHandler&&a.clickHandler(); try{var d=a.inputElement.ownerDocument.createEvent("HTMLEvents");d.initEvent("click",true,true);a.inputElement.dispatchEvent(d);var c=a.inputElement.ownerDocument.createEvent("HTMLEvents");c.initEvent("change",true,true);a.inputElement.dispatchEvent(c)}catch(f){}}};return l}},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")};c.prototype.setContent=function(a){this.content=a;this.settings.content=a;this.refresh()}; c.prototype.enable=function(){this.isEnabled=!0;this.settings.isEnabled=!0;this.refresh()};c.prototype.disable=function(){this.isEnabled=!1;this.settings.isEnabled=!1;this.refresh()};return c}();j.Element=g})(u=g.Button||(g.Button={}));var D;(function(j){j.initialize=function(c,a,b,d){return new g(c,a,b,d)};j.get=function(c){return c.component};var g=function(c){function a(a,d,f,e){var h=this;c.call(this,a,void 0,f,e);this.toggleHandler=d;this.isInitialized=!1;this.settings.inputType="toggleButton"; this.clickHandler=function(){h.toggleHandler&&h.toggleHandler(h.isPressed)};this.refresh();this.isInitialized=!0}__extends(a,c);return a}(u.Element);j.Element=g})(D=g.ToggleButton||(g.ToggleButton={}));(function(j){j.initialize=function(c,a,b){return new g(c,a,b)};j.get=function(c){return c.component};var g=function(){function c(a,b,d){this.host=a;this.settings=b;this.isInitialized=!1;var f="DlhSoft.Controls TextBox DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[f[5]][f[4]](a,f[0], f[1],f[2],f[3],d,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;c.initializeSettings(this.settings);var e=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null)a=e.createElement("span"),this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost),this.host=a,m[f[5]][f[4]](a,f[0],f[1],f[2],f[3],d,b),this.host.component=this;b=b.value;if("undefined"===typeof b||null==b)b=this.inputHost?this.inputHost.value:this.host.innerText? this.host.innerText:this.host.innerHTML;this.value=b;this.settings.value=b;this.isEnabled=this.settings.isEnabled;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")}; c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0<d--;)this.host.removeChild(this.host.childNodes[d]);this.inputElement=!this.inputHost?b.createElement("input"):this.inputHost;this.settings.inputName&&this.inputElement.setAttribute("name",this.settings.inputName);this.inputElement.setAttribute("type","text");"undefined"!==typeof this.settings.inputStyle&&this.inputElement.setAttribute("style",this.settings.inputStyle+(this.inputElement.getAttribute("style")? ";"+this.inputElement.getAttribute("style"):""));this.settings.inputClass&&this.inputElement.setAttribute("class",this.settings.inputClass);this.inputElement.value=this.value;this.settings.isReadOnly?this.inputElement.setAttribute("readonly","readonly"):this.inputElement.removeAttribute("readonly");this.settings.isEnabled?this.inputElement.removeAttribute("disabled"):this.inputElement.setAttribute("disabled","disabled");this.host.appendChild(this.inputElement);this.inputElement.onchange=function(){a.isEnabled&& (a.value=a.inputElement.value,a.settings.changeHandler&&a.settings.changeHandler(a.value))};this.inputElement.onclick=function(){a.settings.clickHandler&&a.settings.clickHandler()}};c.prototype.getValue=function(){return this.value};c.prototype.setValue=function(a){this.value=a;this.settings.value=a;this.refresh()};c.prototype.enable=function(){this.isEnabled=!0;this.settings.isEnabled=!0;this.refresh()};c.prototype.disable=function(){this.isEnabled=!1;this.settings.isEnabled=!1;this.refresh()};return c}(); j.Element=g})(g.TextBox||(g.TextBox={}));var A;(function(j){j.initialize=function(c,a,b,d){return new g(c,a,b,d)};j.get=function(c){return c.component};var g=function(){function c(a,b,d,f){this.host=a;this.selectedTime=b;this.settings=d;this.isInitialized=!1;var e="DlhSoft.Controls CalendarSelector DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[e[5]][e[4]](a,e[0],e[1],e[2],e[3],f,d);this.host.component=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings); "undefined"===typeof b&&(b=d.minValue);b<d.minValue&&(b=d.minValue);this.selectedTime=b;null==this.settings.displayedTime&&(a=this.settings.rows*this.settings.columns,this.settings.displayedTime=Math.floor(this.selectedTime/a)*a);this.settings.displayedTime<d.minValue&&(this.settings.displayedTime=d.minValue);this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.rows?a.rows=4:0>=a.rows&&(a.rows=1);"undefined"=== typeof a.columns?a.columns=3:0>=a.columns&&(a.columns=1);"undefined"===typeof a.headerProvider&&(a.headerProvider=function(b,d){return b.createTextNode(d!=null?d.toString()+" - "+(d+a.rows*a.columns-1).toString():"?")});"undefined"===typeof a.headerStyle&&(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default"); "undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: "+Math.max(128/a.columns,64)+"px; height: "+Math.max(80/a.rows,20)+"px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"=== typeof a.timeFormatter&&(a.timeFormatter=function(a){return a.toString()});"undefined"===typeof a.invertMatrix&&(a.invertMatrix=!1);"undefined"===typeof a.minValue&&(a.minValue=0);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0<d--;)this.host.removeChild(this.host.childNodes[d]);d=b.createElement("table");d.cellSpacing="0";d.cellPadding="0";d.setAttribute("style",this.settings.containerStyle); this.settings.containerClass&&d.setAttribute("class",this.settings.containerClass);var c=null!=this.settings.displayedTime?this.settings.displayedTime:0,e=b.createElement("tr");e.setAttribute("style",this.settings.headerStyle);e.setAttribute("class",this.settings.headerClass);var h=b.createElement("td");h.setAttribute("style","text-align: left; padding-left: 4px");var l=b.createElement("a");l.setAttribute("href","javascript://");l.setAttribute("style","text-decoration: none; color: Gray; font-size: "+ ("Modern"==this.settings.theme?"10px":"x-small")+"; cursor: pointer");l.appendChild(b.createTextNode("\u25c4"));l.onclick=function(b){a.setDisplayedValue(c-a.settings.rows*a.settings.columns);b.stopPropagation()};h.appendChild(l);e.appendChild(h);h=b.createElement("td");h.setAttribute("style",this.settings.headerStyle);h.setAttribute("class",this.settings.headerClass);l=b.createElement("span");l.appendChild(this.settings.headerProvider(b,this.settings.displayedTime));h.appendChild(l);e.appendChild(h); h=b.createElement("td");h.setAttribute("style","text-align: right; padding-right: 4px");l=b.createElement("a");l.setAttribute("href","javascript://");l.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+"; cursor: pointer");l.appendChild(b.createTextNode("\u25ba"));l.onclick=function(b){a.setDisplayedValue(c+a.settings.rows*a.settings.columns);b.stopPropagation()};h.appendChild(l);e.appendChild(h);d.appendChild(e);h=b.createElement("tr"); d.appendChild(h);e=b.createElement("td");e.colSpan=3;h.appendChild(e);h=b.createElement("div");h.setAttribute("style","padding: 2px; max-height: "+this.settings.scrollingHeight+"; overflow-y: auto");e.appendChild(h);e=b.createElement("table");e.cellSpacing="0";e.cellPadding="0";h.appendChild(e);for(var h=null!=this.settings.displayedTime?this.settings.displayedTime:0,l=null!=this.selectedTime?this.selectedTime:0,o=this.settings.rows,g=this.settings.columns,j=0;j<o;j++){for(var k=b.createElement("tr"), E=0;E<g;E++){this.settings.invertMatrix&&(h=c+E*o+j);var r=b.createElement("td");r.setAttribute("style",this.settings.timeStyle);r.setAttribute("class",this.settings.timeClass);var m;try{m=this.settings.timeFormatter(h)}catch(p){m=h.toString()}var x=b.createElement("div");r.appendChild(x);var n=b.createElement("a");n.setAttribute("href","javascript://");n.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");n.appendChild(b.createTextNode(m));x.appendChild(n); null!=l&&h==l&&(x.setAttribute("style",this.settings.selectedTimeStyle),x.setAttribute("class",this.settings.selectedTimeClass),this.selectedElement=x);n.value=h;n.onclick=function(b){a.setValue(b.currentTarget.value);b.stopPropagation()};k.appendChild(r);h++}e.appendChild(k)}this.host.appendChild(d)};c.prototype.getValue=function(){return this.selectedTime};c.prototype.setValue=function(a){if(!a||a<this.settings.minValue)a=this.settings.minValue;this.selectedTime=a;this.refresh();this.settings.selectedTimeChangeHandler&& this.settings.selectedTimeChangeHandler(a)};c.prototype.setDisplayedValue=function(a){if(!a||a<this.settings.minValue)a=this.settings.minValue;if(null==this.settings.displayedTime||a!=this.settings.displayedTime)this.settings.displayedTime=a,this.refresh(),this.settings.displayedTimeChangeHandler&&this.settings.displayedTimeChangeHandler(a)};return c}();j.Element=g})(A=g.CalendarSelector||(g.CalendarSelector={}));var C;(function(j){j.initialize=function(c,a,b,d){return new g(c,a,b,d)};j.get=function(c){return c.component}; var g=function(){function c(a,b,d,f){this.host=a;this.selectedDate=b;this.settings=d;this.isInitialized=!1;var e="DlhSoft.Controls Calendar DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[e[5]][e[4]](a,e[0],e[1],e[2],e[3],f,d);this.host.component=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings);"undefined"===typeof b&&(b=new Date);b<this.settings.minValue&&(b=this.settings.minValue);this.selectedDates=(this.selectedDate=b)?[this.selectedDate]:[]; this.selectedDateRanges=(this.selectedDateRange=this.selectedDate?{start:this.selectedDate,finish:this.selectedDate}:null)?[this.selectedDateRange]:null;null==this.settings.displayedDate&&(this.settings.displayedDate=this.selectedDate);this.settings.displayedDate<this.settings.minValue&&(this.settings.displayedDate=this.settings.minValue);this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly= !1);"undefined"===typeof a.isTodayLinkVisible&&(a.isTodayLinkVisible=!1);"undefined"===typeof a.defaultTimeOfDay&&(a.defaultTimeOfDay=0);"undefined"===typeof a.allowMultipleSelection&&(a.allowMultipleSelection=!1);"undefined"===typeof a.allowRangeSelection&&(a.allowRangeSelection=!1);"undefined"===typeof a.monthYearHeaderStyle&&(a.monthYearHeaderStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default"); "undefined"===typeof a.dayOfWeekHeaderStyle&&(a.dayOfWeekHeaderStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; padding: 3px; padding-top: 4px; padding-bottom: 2px; border-bottom: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.dayStyle&&(a.dayStyle="color: "+("Modern"==a.theme?"#505050": "Black")+"; min-width: 24px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small")+(a.allowMultipleSelection||a.allowRangeSelection?"; height: "+("Modern"==a.theme?"18px":"20px"):""));"undefined"===typeof a.otherMonthDayStyle&&(a.otherMonthDayStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.selectedDayStyle&&(a.selectedDayStyle="background-color: #3399ff; color: White; padding: 2px"); "undefined"===typeof a.disabledDayStyle&&(a.disabledDayStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.todayLinkStyle&&(a.todayLinkStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; padding: 4px; border-top: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.todayString&& (a.todayString="Today");"undefined"===typeof a.months&&(a.months="January February March April May June July August September October November December".split(" "));"undefined"===typeof a.daysOfWeek&&(a.daysOfWeek="Su Mo Tu We Th Fr Sa".split(" "));"undefined"===typeof a.monthRows&&(a.monthRows=1);1>a.monthRows&&(a.monthRows=1);"undefined"===typeof a.monthColumns&&(a.monthColumns=1);1>a.monthColumns&&(a.monthColumns=1);"undefined"===typeof a.monthCellSpacing&&(a.monthCellSpacing="0");"undefined"=== typeof a.applyMonthStyleForSingleCell&&(a.applyMonthStyleForSingleCell=!1);"undefined"===typeof a.applyNextMonthButtonToLastColumn&&(a.applyNextMonthButtonToLastColumn=!0);"undefined"===typeof a.applyNextMonthButtonToLastRow&&(a.applyNextMonthButtonToLastRow=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle=("Modern"==a.theme?"":"border: 1px solid #707070; ")+"font-family: Arial"+("undefined"===typeof a.monthCellStyle&&(1<a.monthRows||1<a.monthColumns||a.applyMonthStyleForSingleCell)?"Modern"== a.theme?"; margin: -2px":"; padding: 2px":"Modern"==a.theme?"; border: 1px solid #e0e0e0":""));"undefined"===typeof a.monthCellStyle&&(a.monthCellStyle="margin: 2px; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver"));"undefined"===typeof a.calendarSelectorLevels&&(a.calendarSelectorLevels=0);"undefined"===typeof a.calendarSelectorPopupStyle&&(a.calendarSelectorPopupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial");"undefined"=== typeof a.minValue&&(a.minValue=new Date(101,0,1));"undefined"===typeof a.weekStart&&(a.weekStart=0)};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0<d--;)this.host.removeChild(this.host.childNodes[d]);var d=b.createElement("table"),f,e;d.cellSpacing=this.settings.monthCellSpacing;d.cellPadding="0";d.setAttribute("style",this.settings.containerStyle);this.settings.containerClass&&d.setAttribute("class",this.settings.containerClass);var h=c.getDate(null!= this.settings.displayedDate?this.settings.displayedDate:null!=this.selectedDate?this.selectedDate:new Date);this.settings.defaultTimeOfDay>=c.dayDuration&&(h=c.subtractDay(h));f=h;for(var l=0;l<this.settings.monthRows;l++){var o=b.createElement("tr");d.appendChild(o);for(var g=0;g<this.settings.monthColumns;g++){var j=b.createElement("td");o.appendChild(j);var m=b.createElement("table");m.cellSpacing="0";m.cellPadding="0";if(1<this.settings.monthRows||1<this.settings.monthColumns||this.settings.applyMonthStyleForSingleCell)m.setAttribute("style", this.settings.monthCellStyle),m.setAttribute("class",this.settings.monthCellClass);j.appendChild(m);j=b.createElement("tr");j.setAttribute("style",this.settings.monthYearHeaderStyle);j.setAttribute("class",this.settings.monthYearHeaderClass);var k=b.createElement("td");k.setAttribute("style","text-align: left; padding-left: 4px");if(0==l&&0==g){var r=b.createElement("a");r.setAttribute("href","javascript://");r.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme? "10px":"x-small")+"; cursor: pointer");r.appendChild(b.createTextNode("\u25c4"));r.onclick=function(b){for(var d=h;d.getMonth()==h.getMonth();)d=c.subtractDay(d);a.setDisplayedValue(d);b.stopPropagation()};k.appendChild(r)}j.appendChild(k);k=b.createElement("td");k.setAttribute("style",this.settings.monthYearHeaderStyle);k.setAttribute("class",this.settings.monthYearHeaderClass);k.colSpan=5;var r=b.createElement("span"),n=b.createTextNode(this.settings.months[f.getMonth()]+" "+f.getFullYear());if(1> this.settings.calendarSelectorLevels||0<l||0<g)r.appendChild(n);else{var p=b.createElement("a");p.setAttribute("href","javascript://");p.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");p.appendChild(n);r.appendChild(p);var x=b.createElement("div");x.setAttribute("style","display: none; position: absolute; margin-left: -40px");p.appendChild(x);var q=b.createElement("div");q.setAttribute("style",this.settings.calendarSelectorPopupStyle);this.settings.calendarSelectorPopupClass&& q.setAttribute("class",this.settings.calendarSelectorPopupClass);x.appendChild(q);p.onclick=function(b){if((b.target||b.srcElement)==p){if("none"!=x.style.display)x.style.display="none";else{var d=12*h.getFullYear()+h.getMonth(),c={theme:a.settings.theme,headerProvider:function(b,d){var c=b.createTextNode(Math.floor(d/12).toString());if(2>a.settings.calendarSelectorLevels)return c;var e=b.createElement("a");e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit"); e.appendChild(c);var h=b.createElement("div");h.setAttribute("style","display: none; position: absolute; margin-left: -10px");e.appendChild(h);var l=b.createElement("div");l.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&l.setAttribute("class",a.settings.calendarSelectorPopupClass);h.appendChild(l);e.onclick=function(b){if((b.target||b.srcElement)==e){if("none"!=h.style.display)h.style.display="none";else{var c=Math.floor(d/12)-1;h.style.display= "block";var g=A.initialize(l,c,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(b,d){var c=b.createTextNode((d+1).toString()+" - "+(d+10).toString());if(3>a.settings.calendarSelectorLevels)return c;var f=b.createElement("a");f.setAttribute("href","javascript://");f.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");f.appendChild(c);var e=b.createElement("div");e.setAttribute("style","display: none; position: absolute; margin-left: -10px"); f.appendChild(e);var h=b.createElement("div");h.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&h.setAttribute("class",a.settings.calendarSelectorPopupClass);e.appendChild(h);f.onclick=function(a){if((a.target||a.srcElement)==f){if("none"!=e.style.display)e.style.display="none";else{var b=Math.floor(d/10);e.style.display="block";A.initialize(h,b,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(a,b){return a.createTextNode((10*b+1).toString()+ " - "+(10*(b+10)).toString())},timeFormatter:function(a){return(10*a+1).toString()+"-"+(10*a+10).toString().substr((10*a+10).toString().length-2)},minValue:10},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.").settings.selectedTimeChangeHandler=function(a){g.setDisplayedValue(10*a)}}a.stopPropagation()}};return f},timeFormatter:function(a){return(a+1).toString()},minValue:100},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); g.settings.selectedTimeChangeHandler=function(a){f.setDisplayedValue(12*(a+1))}}b.stopPropagation()}};return e},timeFormatter:function(b){return a.settings.months[b-12*Math.floor(b/12)]},minValue:1212};x.style.display="block";var f=A.initialize(q,d,c,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");f.settings.selectedTimeChangeHandler=function(b){a.setDisplayedValue(new Date(Math.floor(b/12),b-12*Math.floor(b/ 12),1))}}b.stopPropagation()}}}k.appendChild(r);j.appendChild(k);k=b.createElement("td");k.setAttribute("style","text-align: right; padding-right: 4px");if((!this.settings.applyNextMonthButtonToLastRow?0==l:l==this.settings.monthRows-1)&&(this.settings.applyNextMonthButtonToLastColumn?g==this.settings.monthColumns-1:0==g))r=b.createElement("a"),r.setAttribute("href","javascript://"),r.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+ "; cursor: pointer"),r.appendChild(b.createTextNode("\u25ba")),r.onclick=function(b){for(var d=h;d.getMonth()==h.getMonth();)d=c.addDay(d);a.setDisplayedValue(d);b.stopPropagation()},k.appendChild(r);j.appendChild(k);m.appendChild(j);r=b.createElement("tr");for(k=j=this.settings.weekStart;k<j+7;k++)e=k%7,n=b.createElement("td"),n.setAttribute("style",this.settings.dayOfWeekHeaderStyle),n.setAttribute("class",this.settings.dayOfWeekHeaderClass),n.appendChild(b.createTextNode(this.settings.daysOfWeek[e% 7])),r.appendChild(n);m.appendChild(r);r=null!=this.selectedDate?c.getDate(this.selectedDate):null;null!=r&&this.settings.defaultTimeOfDay>=c.dayDuration&&(r=c.subtractDay(r));var n=f.getMonth(),k=c.getFirstDayOfMonth(f),s=c.getPreviousWeekStart(k,j);for(f=0;6>f;f++){for(var t=b.createElement("tr"),k=j;k<j+7;k++){e=k%7;e=b.createElement("td");e.setAttribute("style",this.settings.dayStyle);e.setAttribute("class",this.settings.dayClass);var u=s.getDate().toString(),y=b.createElement("span");e.appendChild(y); var B=b.createElement("span");y.appendChild(B);var v="undefined"!==typeof this.settings.disabledDateSelector&&this.settings.disabledDateSelector(s),w=s.getMonth()==n,z=b.createElement("a");z.setAttribute("href","javascript://");z.setAttribute("style","text-decoration: none; display: inline-block; cursor: "+(this.settings.isReadOnly||v||!w&&(this.settings.allowRangeSelection||this.settings.allowMultipleSelection)?"default":"pointer")+"; color: inherit; width: 20px");z.appendChild(b.createTextNode(u)); B.appendChild(z);if(v)y.setAttribute("style",this.settings.disabledDayStyle),y.setAttribute("class",this.settings.disabledDayClass);else if(w){if(u=r&&Math.abs(s.valueOf()-r.valueOf())<=c.hourDuration||this.isValueSelected(s))y.setAttribute("style",this.settings.selectedDayStyle),y.setAttribute("class",this.settings.selectedDayClass);this.settings.highlightingStyleSelector&&(y=this.settings.highlightingStyleSelector(s,u))&&B.setAttribute("style",y);this.settings.highlightingClassSelector&&(y=this.settings.highlightingClassSelector(s, u))&&B.setAttribute("class",y)}else B.setAttribute("style",this.settings.otherMonthDayStyle),B.setAttribute("class",this.settings.otherMonthDayClass);!this.settings.isReadOnly&&!v&&(z.value=c.addTimeOfDay(s,this.settings.defaultTimeOfDay),!this.settings.allowMultipleSelection&&!this.settings.allowRangeSelection?z.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d);a.setValue(d);b.stopPropagation()}:this.settings.allowRangeSelection?w&&(z.onmousedown=function(b){var d=b.currentTarget.value; a.draggingFromDate=d;a.setValue(d);b.preventDefault()},z.onmouseover=function(b){if(a.draggingFromDate&&(b=b.currentTarget.value,!a.draggingToDate||b.valueOf()!=a.draggingToDate.valueOf()))a.draggingToDate=b,a.setValueRange({start:a.draggingFromDate,finish:a.draggingToDate})}):w&&(z.onclick=function(b){a.invertValueSelection(b.currentTarget.value);b.stopPropagation()}));t.appendChild(e);s=c.addDay(s)}m.appendChild(t)}f=s}}!this.settings.isReadOnly&&this.settings.isTodayLinkVisible&&(l=b.createElement("tr"), o=b.createElement("td"),o.colSpan=7,o.setAttribute("style",this.settings.todayLinkStyle),o.setAttribute("class",this.settings.todayLinkClass),g=b.createElement("a"),g.setAttribute("href","javascript://"),g.setAttribute("style","text-decoration: none; color: inherit; cursor: pointer"),g.appendChild(b.createTextNode(this.settings.todayString)),o.appendChild(g),g.value=c.addTimeOfDay(c.getDate(new Date),this.settings.defaultTimeOfDay),g.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d); a.setValue(d);b.stopPropagation()},l.appendChild(o),d.appendChild(l));this.host.appendChild(d);this.isInitialized||b.addEventListener("mouseup",function(){a.draggingToDate&&delete a.draggingToDate;a.draggingFromDate&&delete a.draggingFromDate},!0)};c.prototype.getValue=function(){return this.selectedDate};c.prototype.setValue=function(a){null!=a&&a<this.settings.minValue&&(a=this.settings.minValue);if(null==this.selectedDate&&null!=a||null!=this.selectedDate&&null==a||null!=this.selectedDate&&null!= a&&a.valueOf()!=this.selectedDate.valueOf()||this.settings.forceSetOnClick)this.isDuringInternalSetValue=!0,this.selectedDate=a,this.setValues(null!=a?[a]:[]),delete this.isDuringInternalSetValue,null==this.settings.displayedDate&&null!=a?(this.settings.displayedDate=a,this.refresh(),this.settings.displayedDateChangeHandler&&this.settings.displayedDateChangeHandler(a)):this.refresh(),this.settings.selectedDateChangeHandler&&this.settings.selectedDateChangeHandler(a)};c.prototype.setDisplayedValue= function(a){null!=a&&a<this.settings.minValue&&(a=this.settings.minValue);if(null==this.settings.displayedDate||a.valueOf()!=this.settings.displayedDate.valueOf())this.settings.displayedDate=a,this.refresh(),this.settings.displayedDateChangeHandler&&this.settings.displayedDateChangeHandler(a)};c.prototype.getValues=function(){return this.selectedDates};c.prototype.setValues=function(a){this.selectedDates=a;0<a.length&&(this.isDuringInternalSetValues=!0,this.selectedDate=a[0],this.setValueRanges([{start:this.selectedDate, finish:this.selectedDate}]),delete this.isDuringInternalSetValues)};c.prototype.getValueRange=function(){return this.selectedDateRange};c.prototype.setValueRange=function(a){a.finish||(a.finish=a.start);if(a.finish<a.start){var b=a.finish;a.finish=a.start;a.start=b}this.setValueRanges([a])};c.prototype.getValueRanges=function(){return this.selectedDateRanges};c.prototype.setValueRanges=function(a){this.selectedDateRanges=a;if(0<a.length&&(this.selectedDateRange=a[0],!this.isDuringInternalSetValues)){this.selectedDates= [];for(var b=0;b<a.length;b++){var d=a[b];d.finish||(d.finish=d.start);if(d.finish<d.start){var f=d.finish;d.finish=d.start;d.start=f}for(f=d.start;f<=d.finish;f=c.addDay(f))this.selectedDates.push(f)}this.selectedDate=this.selectedDateRange.start}this.isDuringInternalSetValue||(this.refresh(),this.settings.selectedDateChangeHandler&&this.settings.selectedDateChangeHandler(this.selectedDate));this.settings.selectionChangedHandler&&this.settings.selectionChangedHandler()};c.prototype.isValueSelected= function(a){for(var a=a.valueOf(),b=0;b<this.selectedDates.length;b++)if(this.selectedDates[b].valueOf()==a)return!0;return!1};c.prototype.invertValueSelection=function(a){for(var b=a.valueOf(),d=0;d<this.selectedDates.length;d++)if(this.selectedDates[d].valueOf()==b){1<this.selectedDates.length&&(this.selectedDates.splice(d,1),this.setValues(this.selectedDates));return}this.selectedDates.push(a);this.setValues(this.selectedDates)};c.getDate=function(a){var b=a.getTimezoneOffset()*c.minuteDuration; return new Date(Math.floor((a.valueOf()-b)/c.dayDuration)*c.dayDuration+b)};c.getPreviousWeekStart=function(a,b){for(var d=c.getDate(a),f=d;d.getDay()!=b;)d=c.subtractDay(d);if(f.valueOf()-d.valueOf()>6.5*c.dayDuration)for(f=0;7>f;f++)d=c.addDay(d);return d};c.addDay=function(a){var b=a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-b+c.dayDuration),b=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+b)};c.subtractDay=function(a){return c.getDate(new Date(a.valueOf()- c.dayDuration))};c.addTimeOfDay=function(a,b){var d=a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-d+b),d=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+d)};c.getFirstDayOfMonth=function(a){for(a=c.getDate(a);1<a.getDate();)a=c.subtractDay(a);return a};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration;c.dayDuration=24*c.hourDuration;c.weekDuration=7*c.dayDuration;c.initialSundayDateTimeValue=3*c.dayDuration;return c}(); j.Element=g})(C=g.Calendar||(g.Calendar={}));var v;(function(g){g.initialize=function(c,a,b,d){return new k(c,a,b,d)};g.get=function(c){return c.component};var k=function(){function c(a,b,d,f){this.host=a;this.value=b;this.settings=d;this.isInitialized=!1;this.dropDownButtonElement=null;var e="DlhSoft.Controls DatePicker DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");m[e[5]][e[4]](a,e[0],e[1],e[2],e[3],f,d);this.host.component=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings); var h=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null){if(null==b)try{b=this.settings.dateTimeParser(this.inputHost.value)}catch(l){}a=h.createElement("span");this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost);this.host=a;m[e[5]][e[4]](a,e[0],e[1],e[2],e[3],f,d);this.host.component=this}"undefined"===typeof b&&(b=d.isNullValueAccepted?null:new Date);this.value=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"=== typeof a.isTodayLinkVisible&&(a.isTodayLinkVisible=!0);"undefined"===typeof a.calendarSelectorLevels&&(a.calendarSelectorLevels=Infinity);"undefined"===typeof a.popupStyle&&(a.popupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial");"undefined"===typeof a.calendarSelectorPopupStyle&&(a.calendarSelectorPopupStyle=a.popupStyle);"undefined"===typeof a.calendarSelectorPopupClass&&(a.calendarSelectorPopupClass=a.popupClass);C.Element.initializeSettings(a); "undefined"===typeof a.openDropDownOnInputClick&&(a.openDropDownOnInputClick=!0);"undefined"===typeof a.dateTimeFormatter&&(a.dateTimeFormatter=function(b){if(b==null&&a.isNullValueAccepted)return"";var d=function(a,b){b===void 0&&(b=2);for(var d=a.toString();d.length<b;)d="0"+d;return d},c=b.getFullYear(),e=b.getMonth()+1,h=b.getDate(),l=b.getHours(),b=b.getMinutes();return d(e)+"/"+d(h)+"/"+d(c,4)+" "+d(l)+":"+d(b)});"undefined"===typeof a.dateTimeParser&&(a.dateTimeParser=function(b){if(typeof b=== "undefined"||b==null||b.length==0)return a.isNullValueAccepted?null:new Date;b=new Date(b);return isNaN(b.valueOf())||b.getFullYear()<=0?new Date:b});"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition="<svg style='display: inline-block; margin-left: 4px; cursor: pointer; vertical-align: middle' width='12' height='12'><rect x='0' y='0' width='12' height='3' style='fill: #707070; stroke: #707070; stroke-width: 0.65'/><rect x='0' y='3' width='12' height='9' style='fill: none; stroke: #707070; stroke-width: 0.65'/><line x1='3' y1='3' x2='3' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='6' y1='3' x2='6' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='9' y1='3' x2='9' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='0' y1='6' x2='12' y2='6' style='stroke: #707070; stroke-width: 0.65'/><line x1='0' y1='9' x2='12' y2='9' style='stroke: #707070; stroke-width: 0.65'/></svg>"); "undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0<d--;)this.host.removeChild(this.host.childNodes[d]);d=b.createElement("div");d.setAttribute("style","margin-top: -1px");if(this.inputHost)c=b.createElement("span"),c.setAttribute("style","display: inline-block"), c.appendChild(d),this.host.appendChild(c),d=this.host.firstChild,this.popupElement=d.firstChild,this.inputHost.parentElement&&this.inputHost.parentElement.removeChild(this.inputHost),this.popupElement&&this.popupElement.parentElement&&this.popupElement.parentElement.insertBefore(this.inputHost,this.popupElement),this.inputElement=this.inputHost;else{var c=b.createElement("span");c.setAttribute("style","display: inline-block");var e=b.createElement("input");c.appendChild(e);c.appendChild(d);this.host.appendChild(c); d=this.host.firstChild;this.inputElement=d.firstChild;this.popupElement=d.childNodes[1]}this.popupElement&&(d=b.createElement("div"),d.setAttribute("style",this.settings.popupStyle),this.settings.popupClass&&d.setAttribute("class",this.settings.popupClass),this.popupElement.appendChild(d));this.inputElement&&("undefined"!==typeof this.settings.inputStyle&&this.inputElement.setAttribute("style",this.settings.inputStyle+(this.inputElement.getAttribute("style")?";"+this.inputElement.getAttribute("style"): "")),this.settings.inputClass&&this.inputElement.setAttribute("class",this.settings.inputClass));this.settings.isDropDownButtonVisible&&(this.dropDownButtonElement=b.createElement("span"),this.dropDownButtonElement.setAttribute("style","display: inline-block"),this.dropDownButtonElement.innerHTML=this.settings.dropDownButtonDefinition,this.popupElement&&this.popupElement.parentElement&&this.popupElement.parentElement.insertBefore(this.dropDownButtonElement,this.popupElement));this.inputElement&&(this.inputElement.DatePicker= this,this.setValue(this.value),this.settings.isReadOnly&&this.inputElement.setAttribute("readonly","readonly"));this.popupElement&&(d=this.popupElement.firstChild,this.calendarHost=b.createElement("div"),d.appendChild(this.calendarHost));this.calendarHost&&(this.calendar=new C.Element(this.calendarHost,this.value,{theme:this.settings.theme,isReadOnly:this.settings.isReadOnly,displayedDate:this.settings.displayedDate,defaultTimeOfDay:this.settings.defaultTimeOfDay,weekStart:this.settings.weekStart, isTodayLinkVisible:this.settings.isTodayLinkVisible,containerStyle:null,monthYearHeaderStyle:this.settings.monthYearHeaderStyle,monthYearHeaderClass:this.settings.monthYearHeaderClass,dayOfWeekHeaderStyle:this.settings.dayOfWeekHeaderStyle,dayOfWeekHeaderClass:this.settings.dayOfWeekHeaderClass,dayStyle:this.settings.dayStyle,dayClass:this.settin