@dlhsoft/ganttcharthyperlibrary
Version:
Gantt Chart library for JavaScript and TypeScript with Angular, React, and Vue extensions
97 lines • 60.8 kB
JavaScript
var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.HierarchicalData.HTML.Controls",company:"DlhSoft",product:"Hierarchical Data Modern Library",version:"5.3.6.1",copyright:"Copyright \u00a9 2012-2025 DlhSoft",title:"Hierarchical Data HTML Controls",description:"Hierarchical Data related HTML client components"});
DlhSoft.buildReleaseDate=function(y,u,A){y=new Date(y,u-1,A);return y>DlhSoft.buildReleaseDate?y:DlhSoft.buildReleaseDate}(2025,6,28);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 y=_0x5c25[1],u=_0x5c25[2],A=[],K=[],E=_0x5c25[3],G=function(x,s){if(typeof x!==u||typeof s!==u)return!1;if(s==E)return!0;var B=s[_0x5c25[11]](_0x5c25[10]);if(0<=B){var q=s[_0x5c25[12]](0,B),n,t=q[_0x5c25[11]](_0x5c25[10]);if(0<=t)try{n=new Date(parseInt(q[_0x5c25[12]](t+1)))}catch(p){}typeof n===y&&(n=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>n)return!1;q=q+_0x5c25[10]+x;for(i=n=0;i<q[_0x5c25[5]];i++)t=q[_0x5c25[14]](i),n=(n<<5)-
n+t,n&=n;0>n&&(n=Math[_0x5c25[15]](2,32)-n);q=n.toString(16)[_0x5c25[16]]();B=s[_0x5c25[12]](B+1);if(q==B)return!0}return!1},H=function(x,s,u,q,n){var t=_0x5c25[17],p=_0x5c25[18],z=typeof ComponentSource===y||!ComponentSource?p+_0x5c25[19]+q+_0x5c25[20]+n:_0x5c25[21],A=q+_0x5c25[22]+n+_0x5c25[23],E=_0x5c25[24],G=_0x5c25[25],H=_0x5c25[26];setTimeout(function(){var n=x[_0x5c25[27]],p=n[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var q=n[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30],
_0x5c25[33]);var r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);q[_0x5c25[35]](r);r[_0x5c25[35]](n[_0x5c25[36]](t));q[_0x5c25[35]](n[_0x5c25[36]](E+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](s));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](G+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](A));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](H+
_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);w[_0x5c25[32]](_0x5c25[41],z);w[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[44]));r[_0x5c25[35]](w);w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);w[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[47]));w[_0x5c25[50]](_0x5c25[48],function(){x[_0x5c25[49]](p);K[_0x5c25[7]](u)},
!1);r[_0x5c25[35]](w);q[_0x5c25[35]](r);p[_0x5c25[35]](q);x[_0x5c25[35]](p)},0);setTimeout(function(){alert(t+_0x5c25[51]+E+_0x5c25[52]+s+_0x5c25[51]+G+_0x5c25[53]+A+_0x5c25[51]+H+_0x5c25[4])},600000)};return{setLicense:function(u,s){A[_0x5c25[7]]({type:u,content:s})},validate:function(x,s,B,q,n,t,p){for(var s=s+_0x5c25[4]+B,z=0;z<K[_0x5c25[5]];z++)if(K[z]==s)return;a:if(typeof t!==u&&typeof p!==y&&(p[_0x5c25[6]]!==y&&(t=p[_0x5c25[6]]),typeof p===u&&(t=p)),typeof t!==u)for(p=0;p<A[_0x5c25[5]];p++)if(z=
A[p],z[_0x5c25[8]]==s&&typeof z[_0x5c25[9]]===u){t=z[_0x5c25[9]];break a}G(s,t)?x[_0x5c25[6]]=t:H(x,B,s,q,n)}}}());void 0==DlhSoft.Controls&&(DlhSoft.Controls={});
void 0==DlhSoft.Controls.TreeGrid&&(DlhSoft.Controls.TreeGrid=function(){var y=function(a,b,c,d){if(typeof a.ownerDocument.createElementNS==="undefined"||typeof a.ownerDocument.addEventListener==="undefined")alert("The required HTML5 features are not supported by the application host. Some features will be unavailable. Consider upgrading.");else{var e=["DlhSoft.Controls","TreeGrid","DlhSoft.HierarchicalData.HTML.Controls","5","validate","Licensing"];DlhSoft[e[5]][e[4]](a,e[0],e[1],e[2],e[3],d,c);
a.isInitializing=true;typeof a.settings!=="undefined"&&typeof a.settings.toggleButtonAreaWidth!=="undefined"&&delete a.settings.toggleButtonAreaWidth;typeof c!=="object"&&(c={});E(b,c);K(c,b,a);pa(a,b,c);d=c.columns;ma(d,a,c);N(b,a);O(b,c,a);typeof c.visibilityFilter!=="undefined"&&qa(b,c.visibilityFilter);var f=G(a,b,c),h=a.ownerDocument,e=h.createElement("div");e.setAttribute("style","font-family: Arial; font-size: small; overflow: auto");var g=h.createElement("div");typeof c.containerClass!=="undefined"?
g.setAttribute("class",c.containerClass):g.setAttribute("class","dlh-treegrid-container");typeof c.containerStyle!=="undefined"&&g.setAttribute("style",c.containerStyle);e.appendChild(g);var j=h.createElement("div");j.setAttribute("style","border: solid 1px "+c.border+"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; overflow: auto");g.appendChild(j);g=h.createElement("div");
g.setAttribute("style","overflow: auto; float: left; border-right: solid 1px "+c.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+c.gridWidth);j.appendChild(g);h.addEventListener("mouseup",function(){if(DlhSoft.Controls.ToolTip&&c.useUpdatingToolTips)(toolTip=a.toolTip)&&toolTip.hide()},true);j=h.createElement("div");j.setAttribute("style","float: right; background: "+c.headerBackground+"; width: 0px; height: "+c.headerHeight+"px");g.appendChild(j);
var m=h.createElement("div");m.setAttribute("style","overflow: hidden; background: "+c.headerBackground+"; border-bottom: solid 1px "+c.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; height: "+c.headerHeight+"px");g.appendChild(m);var k=h.createElement("div");k.setAttribute("style","overflow-x: "+(typeof c.isExport==="undefined"||!c.isExport?"scroll":"hidden")+"; overflow-y: "+(typeof c.isExport==="undefined"||!c.isExport?"auto":"hidden")+"; height: "+
f);g.appendChild(k);var o=U(d),f=h.createElement("div");f.setAttribute("style","background: "+c.headerBackground+"; border-bottom: solid 1px "+c.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+o+"px; overflow: hidden; height: "+c.headerHeight+"px");m.appendChild(f);var F=h.createElement("div");F.setAttribute("style","float: left; width: "+o+"px; overflow: auto");k.appendChild(F);if(typeof c.extraSpaceHeight!=="undefined"){h=h.createElement("div");
h.setAttribute("style","overflow: hidden; width: "+o+"px; height: "+c.extraSpaceHeight+"px");k.appendChild(h)}var l;setTimeout(function(){l=a.offsetHeight},0);typeof a.heightUpdateTimer!=="undefined"&&clearInterval(a.heightUpdateTimer);a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var e=a.clientHeight;if(e!=l){var d=G(a,b,c);k.style.height=d;I(b,k,c);l=e}}}catch(f){try{clearInterval(a.heightUpdateTimer)}catch(g){}}},100);F.container=k;f.container=m;a.gridContainer=g;a.gridContent=
F;a.gridContentContainer=k;a.gridHeader=f;a.gridHeaderContainer=m;h=H(b,c);ra(a,e);na(f,d,c);r(F,b,d,h,c);I(b,k,c);sa(a,k,g,m,j,F,b,c);a.isInitializing=false;a.isInitialized=true;return a}},u=function(a){y(a,a.items,a.settings,a.license)},A=function(a){if(typeof a.itemPropertyChangeHandler==="undefined")a.itemPropertyChangeHandler=function(){};if(typeof a.target==="undefined")a.target="Standard";if(typeof a.theme==="undefined")a.theme="Modern";if(typeof a.interaction==="undefined")a.interaction=a.target!=
"Phone"?"Standard":"TouchEnabled";if(typeof a.isReadOnly==="undefined")a.isReadOnly=false;if(typeof a.isContentReadOnly==="undefined")a.isContentReadOnly=false;if(typeof a.selectionMode==="undefined")a.selectionMode="Focus";if(typeof a.isVirtualizing==="undefined")a.isVirtualizing=true},K=function(a,b,c){A(a);if(typeof a.gridWidth==="undefined")a.gridWidth="100%";if(typeof a.minColumnWidth==="undefined")a.minColumnWidth=32;if(typeof a.border==="undefined")switch(a.theme){default:a.border="#e0e0e0";
break;case "ModernBordered":case "Aero":a.border="#9a9a9a"}if(typeof a.splitterWidth==="undefined")a.splitterWidth=4;if(typeof a.indentationLevelWidth==="undefined")a.indentationLevelWidth=16;if(typeof a.itemHeight==="undefined")a.itemHeight=21;if(typeof a.headerBackground==="undefined")a.headerBackground="#f4f4f4";if(typeof a.headerHeight==="undefined")a.headerHeight=21;if(typeof a.columns==="undefined")a.columns=B(b,a);if(typeof a.toggleButtonStyle==="undefined"&&a.toggleButtonClass==null)a.toggleButtonStyle=
"fill: Gray";if(typeof a.toggleButtonHoveringStyle==="undefined"&&a.toggleButtonHoveringClass==null)a.toggleButtonHoveringStyle="fill: Black";if(typeof a.collapsedToggleButtonTemplate==="undefined")a.collapsedToggleButtonTemplate=Z(c,a);if(typeof a.expandedToggleButtonTemplate==="undefined")a.expandedToggleButtonTemplate=$(c,a);if(typeof a.gridLines==="undefined")a.gridLines="LightGray";if(typeof a.horizontalGridLines==="undefined")a.horizontalGridLines=a.gridLines;if(typeof a.verticalGridLines===
"undefined")a.verticalGridLines=a.gridLines;if(typeof a.itemStyle==="undefined"&&typeof a.horizontalGridLines!=="undefined"){a.itemStyle="border-top: solid 1px "+a.horizontalGridLines+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box";if(typeof a.cellStyle==="undefined")a.cellStyle=typeof a.verticalGridLines!=="undefined"?"border-right: solid 1px "+a.verticalGridLines+"; height: "+a.itemHeight+"px; padding-top: 2px; padding-left: 2px":"height: "+
a.itemHeight+"px; padding-top: 2px"}if(typeof a.cellStyle==="undefined"&&typeof a.verticalGridLines!=="undefined")a.cellStyle="border-right: solid 1px "+a.verticalGridLines+"; height: "+a.itemHeight+"px; padding-top: 3px; padding-left: 2px";if(typeof a.selectedItemStyle==="undefined"&&a.selectedItemClass==null)switch(a.theme){default:a.selectedItemStyle=typeof a.horizontalGridLines!=="undefined"||typeof a.verticalGridLines==="undefined"?"background-color: #f4f4f4; border-top: solid 1px "+(typeof a.horizontalGridLines!==
"undefined"?a.horizontalGridLines:"White")+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box":"background-color: #f4f4f4";break;case "Aero":a.selectedItemStyle=typeof a.horizontalGridLines!=="undefined"||typeof a.verticalGridLines==="undefined"?"background-color: LightBlue; border-top: solid 1px "+(typeof a.horizontalGridLines!=="undefined"?a.horizontalGridLines:"White")+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box":
"background-color: LightBlue"}if(typeof a.summaryItemStyle==="undefined"&&a.summaryItemClass==null)a.summaryItemStyle="font-weight: bold"},E=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(typeof c==="string"){c={content:c};a[b]=c}if(typeof c.indentation==="string")c.indentation=parseInt(c.indentation);if(typeof c.isExpanded==="string")c.isExpanded=c.isExpanded.toLowerCase()=="true";typeof c.wasGridItemContentLoaded!=="undefined"&&delete c.wasGridItemContentLoaded}},G=function(a,b,c){var d;
if(a.isContentHeightInitialized&&a.isContentHeightAuto)d=b.length>0?"auto":c.itemHeight+"px";else{var e=a.clientHeight-c.headerHeight-2;e<0&&(e=0);d=e+"px";if(e<c.itemHeight){if(!a.isContentHeightInitialized)a.isContentHeightAuto=true;d=b.length>0?"auto":c.itemHeight+"px"}a.isContentHeightInitialized=true}return d},H=function(a,b){if(typeof b.toggleButtonAreaWidth!=="undefined")return b.toggleButtonAreaWidth;for(var c=0,d=0;d<a.length;d++)if(a[d].indentation>0){c=16;break}return b.toggleButtonAreaWidth=
c},x=function(a,b){var c=a.createElement("span");c.innerHTML=b;return c},s=function(a,b){var c=a.ownerDocument,d=c.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("style","width: 12px; height: 12px");d.setAttribute("focusable","false");c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("id","PART_Border");c.setAttribute("width","12");c.setAttribute("height","12");c.setAttribute("style","fill: White; fill-opacity: 0");d.appendChild(c);a.setAttribute("id","PART_Button");
typeof b.toggleButtonClass!=="undefined"?a.setAttribute("class",b.toggleButtonClass):a.setAttribute("class","dlh-treegrid-togglebutton");typeof b.toggleButtonStyle!=="undefined"&&a.setAttribute("style",b.toggleButtonStyle);d.appendChild(a);return d},B=function(a,b){typeof b!=="object"&&(b={});A(b);var c=[{header:"",width:32,isSelection:true},{header:"Item",width:280,isTreeView:true}];c[0].cellTemplate=q(b,c[0],a);c[1].cellTemplate=z(b,c[1],a);c[1].exportCellTemplate=z(b,c[1],a,false);b.selectionMode!=
"Single"&&(b.selectionMode!="Extended"&&b.selectionMode!="ExtendedFocus")&&c.splice(0,1);return c},q=function(a,b,c){return function(d){return!b.isReadOnly?n(d,a,c):getBooleanNode(d.treeGrid.ownerDocument,d.isSelected)}},n=function(a,b){var c=a.treeGrid.ownerDocument,d;if(typeof a.selectionInput==="undefined"){d=c.createElement("input");a.selectionInput=d;d.type="checkbox";d.setAttribute("style","margin: 0px")}else d=a.selectionInput;if(a.isSelected){d.setAttribute("checked","checked");if(!d.checked)d.checked=
true}else if(d.checked)d.checked=false;var e=function(){d.checked?t(a,true,b.selectionMode):t(a,false,b.selectionMode)};typeof d.changeEventListener!=="undefined"&&d.removeEventListener("change",d.changeEventListener,true);d.addEventListener("change",e,true);d.changeEventListener=e;c=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();e(a)}};typeof d.keyPressEventListener!=="undefined"&&d.removeEventListener("keypress",d.keyPressEventListener,true);d.addEventListener("keypress",c,
true);d.keyPressEventListener=c;return d},t=function(a,b,c){a.isSelected=b;v(a,"isSelected",true,true);aa(a);if(typeof a.treeGrid!=null){a.treeGrid.selectedItem=a;if(c!="Extended"&&c!="ExtendedFocus")a.treeGrid.selectedItems=[a];var d;if(c!="Extended"&&c!="ExtendedFocus")for(d=0;d<a.treeGrid.items.length;d++){b=a.treeGrid.items[d];if(b!=a&&b.isSelected){b.isSelected=false;v(b,"isSelected",false,true);aa(b)}}}if(typeof a.treeGrid!=null&&(c=="Extended"||c=="ExtendedFocus")){c=[];for(d=0;d<a.treeGrid.items.length;d++){b=
a.treeGrid.items[d];b.isSelected&&c.push(b)}a.treeGrid.selectedItems=c}},p=function(a,b){if(typeof a.treeGrid!=null)a.treeGrid.currentItem=a;if(b.selectionMode=="Focus"||b.selectionMode=="ExtendedFocus")a.isSelected||t(a,true,b.selectionMode)},z=function(a,b,c,d){var e=function(a){return x(a.treeGrid.ownerDocument,a.content)};return(typeof d==="undefined"||d)&&!a.isReadOnly&&!a.isContentReadOnly?function(c){return!b.isReadOnly&&(typeof c.isReadOnly==="undefined"||!c.isReadOnly)?la(c,Math.max(0,b.width-
c.indentation*c.treeGrid.settings.indentationLevelWidth-c.treeGrid.settings.toggleButtonAreaWidth-16),a):e(c)}:e},la=function(a,b,c){var d=a.treeGrid.ownerDocument,e;if(typeof a.contentInput==="undefined"){e=d.createElement("input");a.contentInput=e;e.type="text";e.addEventListener("focus",function(){p(a,c)},false);var f=function(){a.content=e.value;v(a,"content",true,true);J(a)};typeof e.changeEventListener!=="undefined"&&e.removeEventListener("change",e.changeEventListener,true);e.addEventListener("change",
f,true);e.changeEventListener=f;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();f(a)}};typeof e.keyPressEventListener!=="undefined"&&e.removeEventListener("keypress",e.keyPressEventListener,true);e.addEventListener("keypress",d,true);e.keyPressEventListener=d;e.addEventListener("focus",function(){e.style.backgroundColor="White"},false);e.addEventListener("blur",function(){e.style.backgroundColor="Transparent"},false)}else e=a.contentInput;e.value=a.content;d="";if(a.hasChildren&&
(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))d="; font-weight: bold";e.setAttribute("style","background-color: Transparent; width: "+b+"px; border-width: 0px; padding: 0px"+d);return e},U=function(a){for(var b=0,c=0;c<a.length;c++)b=b+a[c].width;return b},ma=function(a,b,c){for(var d=H(b.items,c),e=0;e<a.length;e++){var f=a[e];f.treeGrid=b;if(typeof f.width==="undefined")f.width=100;if(typeof f.minWidth==="undefined")f.minWidth=Math.min(f.width,c.minColumnWidth+(f.isTreeView?d:0));
if(typeof f.maxWidth==="undefined")f.maxWidth=c.maxColumnWidth;if(typeof f.cellTemplate==="undefined")f.cellTemplate=function(a){return x(a.treeGrid.ownerDocument,a.content)}}},na=function(a,b,c){var d=a.ownerDocument,e=d.createElement("div");typeof c.columnHeaderClass!=="undefined"?e.setAttribute("class",c.columnHeaderClass):e.setAttribute("class","dlh-treegrid-columnheader");typeof c.columnHeaderStyle!=="undefined"&&e.setAttribute("style",c.columnHeaderStyle);for(var f=0;f<b.length;f++)e.appendChild(oa(d,
b[f],c));a.appendChild(e)},oa=function(a,b,c){var d=a.createElement("div");d.setAttribute("style","overflow-y: hidden; vertical-align: middle; display: table-cell; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; height: "+c.headerHeight+"px");var e=a.createElement("div");e.setAttribute("style","padding-left: 2px; padding-right: 2px; overflow-x: hidden; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+b.width+"px");var f=
a.createElement("div");typeof b.headerClass!=="undefined"?f.setAttribute("class",b.headerClass):f.setAttribute("class","dlh-treegrid-columnheader-content");typeof b.headerStyle!=="undefined"&&f.setAttribute("style",b.headerStyle);f.appendChild(x(a,b.header));e.appendChild(f);d.appendChild(e);if(b.width>=1&&(typeof c.allowUserToResizeColumns==="undefined"||c.allowUserToResizeColumns)&&(typeof b.allowUserToResize==="undefined"||b.allowUserToResize)){d.isGripperVisible=false;var h=b.treeGrid,g=function(a){d.isGripperVisible=
a;d.style.cursor=a?"e-resize":"default";d.style.borderRight=a?"solid 1px "+c.border:"";e.style.width=b.width-(a?1:0)+"px"},j=c.splitterWidth;d.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!=="undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);d.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||
typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!=="undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);e.addEventListener("mouseover",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!=="undefined"||a.currentTarget!=e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);e.addEventListener("mousemove",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!==
"undefined"||a.currentTarget!=e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);d.addEventListener("mousedown",function(a){if(!(a.button!=0||!d.isGripperVisible||DlhSoft.Controls.TreeGrid.isGripperDragging)){DlhSoft.Controls.TreeGrid.isGripperDragging=true;d.isGripperDragging=true;d.initialGripperDraggingX=a.clientX;d.initialColumnWidth=b.width}},true);a.addEventListener("mousemove",function(a){if(d.isGripperDragging){b.width=Math.max(b.minWidth,d.initialColumnWidth+(a.clientX-d.initialGripperDraggingX));
if(typeof b.maxWidth!=="undefined"&&b.width>b.maxWidth)b.width=b.maxWidth;e.style.width=b.width-1+"px";typeof c.columnWidthChangeHandler!=="undefined"&&setTimeout(function(){c.columnWidthChangeHandler(b,b.width)},0);if(!h.isWaitingToRefreshColumns){h.isWaitingToRefreshColumns=true;setTimeout(function(){var a=U(c.columns);h.gridHeader.style.width=a+"px";h.gridContent.style.width=a+"px";delete h.isWaitingToRefreshColumns;h.refreshGridItems()},0)}}},true);a.addEventListener("mouseup",function(){if(d.isGripperDragging){delete d.isGripperDragging;
delete d.initialGripperDraggingX;delete d.initialColumnWidth;g(false);delete DlhSoft.Controls.TreeGrid.isGripperDragging}},true);d.addEventListener("mouseout",function(){d.isGripperDragging||g(false)},false)}return d},N=function(a,b){for(var c=-1,d=null,e=null,f=[],h=0;h<a.length;h++){var g=a[h];if(typeof g.isSelected==="undefined")g.isSelected=false;if(g.isSelected){e==null&&(e=g);f.push(g)}if(typeof g.indentation==="undefined")g.indentation=0;if(h==0&&g.indentation!=0){g.indentation=0;v(g,"indentation",
false,true)}if(typeof g.isExpanded==="undefined")g.isExpanded=true;if(d!=null){var j=d.indentation+1;if(g.indentation>j){g.indentation=j;v(g,"indentation",false,true)}d.hasChildren=g.indentation>d.indentation;if(d.hasChildren&&typeof d.isMilestone!=="undefined"&&d.isMilestone){d.isMilestone=false;v(d,"isMilestone",false,true)}}g.isVisible=c<0||g.indentation<=c;if(g.isVisible&&!g.isExpanded)c=g.indentation;g.isExpanded&&g.indentation==c&&(c=-1);d=g}if(d!=null)d.hasChildren=false;b.selectedItem=e;b.selectedItems=
f},O=function(a,b,c){c.isHierarchicalInformationInitialized=false;var b=[],d,e;for(e=0;e<a.length;e++){d=a[e];d.index=e;var f=null;for(b.length>0&&(f=b[b.length-1]);f!=null&&d.indentation<=f.indentation;){b.pop();f=b[b.length-1]}d.parent=f;d.children=[];f!=null&&f.children.push(d);(f==null||d.indentation>f.indentation)&&b.push(d)}c.isHierarchicalInformationInitialized=true},r=function(a,b,c,d,e){for(var f=0,h=0;h<b.length;h++){var g=b[h];a.appendChild(ba(g,b,c,d,e));var j=f;g.isVisible&&!(typeof g.isHidden!==
"undefined"&&g.isHidden)&&(f=Math.max(f,j+e.itemHeight));g.itemTop=j}setTimeout(function(){P(b,e)},0)},w=function(a,b){for(var c=0,d=0;d<a.length;d++){var e=a[d];e.isVisible&&!(typeof e.isHidden!=="undefined"&&e.isHidden)&&(c=c+b.itemHeight)}return c},V=function(a,b,c){for(var d=0,e=0;e<b.length;e++){var f=b[e];if(f==a)break;f.isVisible&&!(typeof f.isHidden!=="undefined"&&f.isHidden)&&(d=d+c.itemHeight)}return a.itemTop=d},P=function(a,b){if(!(typeof b.alternativeItemClass==="undefined"&&typeof b.alternativeItemStyle===
"undefined")){var c,d=0;for(c=0;c<a.length;c++){var e=a[c];if(e.isVisible&&typeof e.alternativeContentContainer!=="undefined"){e=e.alternativeContentContainer;if(d%2==1){typeof b.alternativeItemClass!=="undefined"?e.setAttribute("class",b.alternativeItemClass):e.setAttribute("class","dlh-treegrid-alternativeitem");typeof b.alternativeItemStyle!=="undefined"&&e.setAttribute("style",b.alternativeItemStyle)}else{e.setAttribute("class","");e.setAttribute("style","")}d++}}}},ba=function(a,b,c,d,e){var f=
a.treeGrid.ownerDocument,h=f.createElement("div");typeof e.itemClass!=="undefined"?h.setAttribute("class",e.itemClass):h.setAttribute("class","dlh-treegrid-item");typeof e.itemStyle!=="undefined"&&h.setAttribute("style",e.itemStyle);var g=f.createElement("div");a.alternativeContentContainer=g;var j=f.createElement("div");try{j.addEventListener("mousedown",function(b){b.target!=a.selectionInput&&p(a,e)},false);j.addEventListener("mouseup",function(b){b.target!=a.selectionInput&&p(a,e)},false)}catch(m){}if(a.isSelected){typeof e.selectedItemClass!==
"undefined"?j.setAttribute("class",e.selectedItemClass):j.setAttribute("class","dlh-treegrid-selecteditem");typeof e.selectedItemStyle!=="undefined"&&j.setAttribute("style",e.selectedItemStyle)}var k=f.createElement("div");typeof a["class"]!=="undefined"?k.setAttribute("class",a["class"]):k.setAttribute("class","dlh-treegrid-item-content");typeof a.style!=="undefined"&&k.setAttribute("style",a.style);var o=f.createElement("div");if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)){typeof e.summaryItemClass!==
"undefined"?o.setAttribute("class",e.summaryItemClass):o.setAttribute("class","dlh-treegrid-summaryitem");typeof e.summaryItemStyle!=="undefined"&&o.setAttribute("style",e.summaryItemStyle)}else{typeof e.standardItemClass!=="undefined"?o.setAttribute("class",e.standardItemClass):o.setAttribute("class","dlh-treegrid-standarditem");typeof e.standardItemStyle!=="undefined"&&o.setAttribute("style",e.standardItemStyle)}f=f.createElement("div");a.gridItem=f;a.gridItemContent=o;a.gridItemSelectionContainer=
j;var F=e.itemHeight;if(!a.isVisible||typeof a.isHidden!=="undefined"&&a.isHidden)F=0;f.setAttribute("style","overflow: hidden; height: "+F+"px");Q(f,a,b,c,d,e);o.appendChild(f);k.appendChild(o);j.appendChild(k);g.appendChild(j);h.appendChild(g);return a.gridItemContainer=h},Q=function(a,b,c,d,e,f){var h=b.treeGrid.ownerDocument;if(!f.isVirtualizing||typeof b.isVirtuallyVisible!=="undefined"&&b.isVirtuallyVisible){var g=function(){if(typeof b.gridItemSelectionContainer!=="undefined"){var g=b.gridItemSelectionContainer;
typeof f.selectedItemClass!=="undefined"?g.setAttribute("class",b.isSelected?f.selectedItemClass:null):g.setAttribute("class",b.isSelected?"dlh-treegrid-selecteditem":null);typeof f.selectedItemStyle!=="undefined"&&g.setAttribute("style",b.isSelected?f.selectedItemStyle:null)}if(typeof b.gridItemContent!=="undefined"){g=b.gridItemContent;g.setAttribute("class","");g.setAttribute("style","");if(b.hasChildren&&(typeof b.isSummaryEnabled==="undefined"||b.isSummaryEnabled)){typeof f.summaryItemClass!==
"undefined"?g.setAttribute("class",f.summaryItemClass):g.setAttribute("class","dlh-treegrid-summaryitem");typeof f.summaryItemStyle!=="undefined"&&g.setAttribute("style",f.summaryItemStyle)}else{typeof f.standardItemClass!=="undefined"?g.setAttribute("class",f.standardItemClass):g.setAttribute("class","dlh-treegrid-standarditem");typeof f.standardItemStyle!=="undefined"&&g.setAttribute("style",f.standardItemStyle)}}var g=[],m=null;try{m=h.activeElement}catch(k){}for(;m!=null&&m!=b.gridItem;){g.push(m);
m=m.parentNode}for(var o=-1,m=a.childNodes.length;m-- >0;)if(g.indexOf(a.childNodes[m])>=0){o=m;break}for(m=a.childNodes.length;m-- >0;)a.removeChild(a.childNodes[m]);for(m=0;m<d.length;m++)a.appendChild(ca(b,c,d[m],e,f));typeof b.treeGrid.draggingItem==="undefined"&&o>=0&&setTimeout(function(){try{for(var b=a.childNodes[o];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:
setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)};if(b.wasGridItemContentLoaded)setTimeout(g,0);else{g();b.wasGridItemContentLoaded=true}}},W=function(a){if(typeof a.isWaitingToRefreshGridItem==="undefined"){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!=="undefined"&&Q(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings);V(a,a.treeGrid.items,a.treeGrid.settings);delete a.isWaitingToRefreshGridItem},
0)}},ta=function(a,b,c,d,e,f){var h=b.treeGrid.ownerDocument;(!f.isVirtualizing||typeof b.isVirtuallyVisible!=="undefined"&&b.isVirtuallyVisible)&&setTimeout(function(){if(typeof b.gridItemSelectionContainer!=="undefined"){var g=b.gridItemSelectionContainer;typeof f.selectedItemClass!=="undefined"?g.setAttribute("class",b.isSelected?f.selectedItemClass:null):g.setAttribute("class",b.isSelected?"dlh-treegrid-selecteditem":null);typeof f.selectedItemStyle!=="undefined"&&g.setAttribute("style",b.isSelected?
f.selectedItemStyle:null)}var g=[],j=null;try{j=h.activeElement}catch(m){}for(;j!=null&&j!=b.gridItem;){g.push(j);j=j.parentNode}for(var k=-1,j=a.childNodes.length;j-- >0;)if(a.childNodes[j].isSelection&&g.indexOf(a.childNodes[j])>=0){k=j;break}for(j=a.childNodes.length;j-- >0;)a.childNodes[j].isSelection&&a.removeChild(a.childNodes[j]);for(j=0;j<d.length;j++)d[j].isSelection&&j<a.childNodes.length&&a.insertBefore(ca(b,c,d[j],e,f),a.childNodes[j]);typeof b.treeGrid.draggingItem==="undefined"&&k>=
0&&setTimeout(function(){try{for(var b=a.childNodes[k];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)},0)},aa=function(a){typeof a.gridItem!=="undefined"&&ta(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings)},ca=function(a,
b,c,d,e){var f=a.treeGrid.ownerDocument,h=f.createElement("div"),g=0;c.isTreeView==true&&(g=e.indentationLevelWidth*a.indentation);h.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing; margin: 0px; padding: 0px; width: "+c.width+"px; height: "+e.itemHeight+"px; padding-left: "+g+"px");var j=f.createElement("div");typeof c.cellClass!=="undefined"?j.setAttribute("class",c.cellClass):typeof e.cellClass!==
"undefined"?j.setAttribute("class",e.cellClass):j.setAttribute("class","dlh-treegrid-cell");typeof c.cellStyle!=="undefined"?j.setAttribute("style",c.cellStyle):typeof e.cellStyle!=="undefined"&&j.setAttribute("style",e.cellStyle);var m=f.createElement("div");m.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(c.width-g-16)+"px");if(c.isTreeView==true){g=f.createElement("div");g.setAttribute("style","display: inline-block; width: "+d+"px");if(a.hasChildren){d=
f.createElement("div");d.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");f=e.collapsedToggleButtonTemplate;if(a.isExpanded)f=e.expandedToggleButtonTemplate;f=f();d.appendChild(f);da(d,a,b,f,null,null,e);g.appendChild(d)}m.appendChild(g)}a=c.cellTemplate(a);m.appendChild(a);j.appendChild(m);h.appendChild(j);h.isSelection=c.isSelection;return h},Z=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");
c.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return s(c,b)}},$=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");c.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return s(c,b)}},da=function(a,b,c,d,e,f,h){if(typeof e==="undefined"||e==null)e=d.querySelector("#PART_Button");e!=null&&ea(e,e,h);if(typeof f==="undefined"||f==null)f=d.querySelector("#PART_Border");f!=null&&ea(f,e,h);c={toggleButton:a,item:b,items:c,content:d,settings:h};
if(e!=null){e.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&e.addEventListener("mouseup",X,true)}if(f!=null){f.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&f.addEventListener("mouseup",X,true)}a.tag=c;e==null&&(f==null&&(typeof h.isExport==="undefined"||!h.isExport))&&a.addEventListener("mouseup",X,true);d.addEventListener("keypress",function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();C(b,!b.isExpanded,true)}},true);b.toggleButton=a},ea=function(a,b,c){if(!(typeof c.isExport!==
"undefined"&&c.isExport)){a.addEventListener("mouseover",function(){typeof c.toggleButtonHoveringClass!=="undefined"?b.setAttribute("class",c.toggleButtonHoveringClass):b.setAttribute("class","dlh-treegrid-togglebuttonhovering");typeof c.toggleButtonHoveringStyle!=="undefined"&&b.setAttribute("style",c.toggleButtonHoveringStyle)},true);a.addEventListener("mouseout",function(){typeof c.toggleButtonClass!=="undefined"?b.setAttribute("class",c.toggleButtonClass):b.setAttribute("class","dlh-tregrid-togglebutton");
b.setAttribute("style",c.toggleButtonStyle)},true)}},X=function(a){a.stopPropagation();a=a.target.tag.item;C(a,!a.isExpanded,true)},C=function(a,b,c,d){if(a.isExpanded!=b){a.isExpanded=b;(typeof d==="undefined"||d)&&v(a,"isExpanded",c,true);fa(a)}},fa=function(a,b){if(typeof a.toggleButton==="undefined")(typeof b==="undefined"||b)&&setTimeout(function(){fa(a,false)},0);else{var c=a.toggleButton,d=c.tag,e=d.settings,f=e.expandedToggleButtonTemplate,h=e.collapsedToggleButtonTemplate;a.isExpanded&&(h=
f);var f=h(),h=f.querySelector("#PART_Button"),g=f.querySelector("#PART_Border");c.replaceChild(f,d.content);d.content=f;d=d.items;da(c,a,d,f,h,g,e);a.isVisible&&!(typeof a.isHidden!=="undefined"&&a.isHidden)&&ua(d,a,e);P(d,e)}},ua=function(a,b,c){var d=-1,e=false,f=false,h=false,g=0,j,m,k;for(m=0;m<a.length;m++){k=a[m];if(k==b){e=k.isExpanded;d=k.indentation}else k.indentation<=d&&(h=true);if(f&&!h){if(e){j=true;for(var o=k.parent;o!=null;){if(!o.isVisible||!o.isExpanded){j=false;break}o=o.parent}}else j=
false;if(k.isVisible!=j){k.isVisible=e;v(k,"isVisible",false,true);j=c.itemHeight;if(!k.isVisible||typeof k.isHidden!=="undefined"&&k.isHidden)j=0;if(typeof k.gridItem!=="undefined")k.gridItem.style.height=j+"px"}}k==b&&(f=true);j=c.itemHeight;if(!k.isVisible||typeof k.isHidden!=="undefined"&&k.isHidden)j=0;if(k.itemTop!=g)k.itemTop=g;g=g+j}I(a,b.treeGrid.gridContentContainer,c)},L=function(a){for(var b=0;b<a.length;b++)J(a[b])},J=function(a){if(!a.treeGrid.settings.isVirtualizing||typeof a.isVirtuallyVisible!==
"undefined"&&a.isVirtuallyVisible){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!=="undefined"&&Q(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings);V(a,a.treeGrid.items,a.treeGrid.settings);delete a.isWaitingToRefreshGridItem},0)}},R=function(a){J(a);for(a=a.parent;a!=null;){J(a);a=a.parent}},M=function(a,b,c,d){E(b,d);N(b,c);O(b,d,c);c=a.index-1;c>=0&&R(b[c]);R(a);c=a.index+1;c<b.length&&R(b[c])},S=
function(a,b){var c=b.toggleButtonAreaWidth;delete b.toggleButtonAreaWidth;H(a,b);return b.toggleButtonAreaWidth!=c},v=function(a,b,c,d){if(typeof a.treeGrid!=="undefined"){a.treeGrid.settings.itemPropertyChangeHandler(a,b,c,d);b=="isExpanded"?typeof a.treeGrid!=="undefined"&&typeof a.treeGrid.settings.itemExpansionChangeHandler!=="undefined"&&a.treeGrid.settings.itemExpansionChangeHandler(a,a.isExpanded):b=="isSelected"&&typeof a.treeGrid!=="undefined"&&typeof a.treeGrid.settings.itemSelectionChangeHandler!==
"undefined"&&a.treeGrid.settings.itemSelectionChangeHandler(a,a.isSelected,c)}},qa=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=b==null||b(d);d.isHidden=!e;if(e)for(d=d.parent;d!=null;){d.isHidden=false;d=d.parent}}},va=function(a){var b=0;if(a.offsetParent){do{b=b+a.offsetTop;a=a.offsetParent}while(a)}return b},wa=function(a,b){if(typeof b.draggingItem!=="undefined"){var a=a-va(b),c,d;if(a<b.gridHeaderContainer.clientHeight+24){c=b.gridContentContainer.scrollTop;b.gridContentContainer.scrollTop=
b.gridContentContainer.scrollTop-20;if(typeof b.isDuringVerticalScrolling==="undefined"){b.isDuringVerticalScrolling=true;setTimeout(function(){d=c-b.gridContentContainer.scrollTop;b.draggingInitialThumbPosition=b.draggingInitialThumbPosition-d;delete b.isDuringVerticalScrolling},0)}}else if(a>=b.gridHeaderContainer.clientHeight+b.gridContentContainer.clientHeight-24){c=b.gridContentContainer.scrollTop;b.gridContentContainer.scrollTop=b.gridContentContainer.scrollTop+20;if(typeof b.isDuringVerticalScrolling===
"undefined"){b.isDuringVerticalScrolling=true;setTimeout(function(){d=b.gridContentContainer.scrollTop-c;b.draggingInitialThumbPosition=b.draggingInitialThumbPosition+d;delete b.isDuringVerticalScrolling},0)}}}},ga=function(a){var b=a.itemTop-a.treeGrid.gridContentContainer.scrollTop;if(b<0)a.treeGrid.gridContentContainer.scrollTop=a.itemTop;else if(b>a.treeGrid.gridContentContainer.clientHeight-a.treeGrid.settings.itemHeight)a.treeGrid.gridContentContainer.scrollTop=a.itemTop-(a.treeGrid.gridContentContainer.clientHeight-
a.treeGrid.settings.itemHeight)},sa=function(a,b,c,d,e,f,h,g){b.addEventListener("scroll",function(){if(d.scrollLeft!=b.scrollLeft)d.scrollLeft=b.scrollLeft;I(h,b,g)},true);ha(b,c,e,g);typeof a.updateGridHeaderTimer!=="undefined"&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{ha(b,c,e,g)}catch(d){try{clearInterval(a.updateGridHeaderTimer)}catch(f){}}},100);window.addEventListener("mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true)},ha=function(a,
b,c,d){setTimeout(function(){try{var e=b.clientWidth-a.clientWidth;e<0&&(e=0);var f=e+"px";if(c.style.width!=f){c.style.width=f;if(e>0){c.style.boxSizing="border-box";c.style.MozBoxSizing="border-box";c.style.border="solid 1px "+d.border;c.style.borderTop="none";c.style.borderRight="none"}else{c.style.border="";c.style.borderTop="";c.style.borderRight="";c.style.boxSizing="";c.style.MozBoxSizing=""}}}catch(h){}},0)},I=function(a,b,c){if(c.isVirtualizing)for(var d=b.scrollTop-c.itemHeight,b=d+b.clientHeight+
2*c.itemHeight,e=0;e<a.length;e++){var f=a[e];if(typeof f.isVirtuallyVisible==="undefined"&&(typeof f.isVisible==="undefined"||f.isVisible)&&!(typeof f.isHidden!=="undefined"&&f.isHidden)&&typeof f.itemTop!=="undefined"&&f.itemTop>=d&&f.itemTop<b){f.isVirtuallyVisible=true;v(f,"isVirtuallyVisible",false,true);typeof f.gridItem!=="undefined"&&Q(f.gridItem,f,a,c.columns,c.toggleButtonAreaWidth,c)}else typeof f.isVirtuallyVisible!=="undefined"&&((typeof f.isVisible==="undefined"||f.isVisible)&&!(typeof f.isHidden!==
"undefined"&&f.isHidden)&&typeof f.itemTop!=="undefined"&&(f.itemTop<d||f.itemTop>=b))&&delete f.isVirtuallyVisible}},ra=function(a,b){for(var c=a.childNodes.length;c-- >0;)a.removeChild(a.childNodes[c]);a.appendChild(b)},Y=function(a,b,c,d){var e=d.indexOf(a);if(!(e<0||b<0||b==e||b>=d.length)){d.splice(e,1);d.splice(b,0,a);ia(d);u(c);typeof c.settings.itemMoveHandler!=="undefined"&&c.settings.itemMoveHandler(a,e,b)}},T=function(a,b,c,d,e){if(!(a<0||c<0||c==a||c>e.length-b)){var f=[],h;for(h=a;h<
a+b;h++)f.push(e[h]);e.splice(a,b);for(h=0;h<f.length;h++)e.splice(c+h,0,f[h]);ia(e);u(d);if(typeof d.settings.itemMoveHandler!=="undefined")for(h=0;h<f.length;h++)d.settings.itemMoveHandler(f[h],a+h,c+h)}},ia=function(a){for(var b=0,c=0;c<a.length;c++){var d=a[c];if(d.indentation>b){d.indentation=b;v(d,"indentation",false,true)}b=d.indentation+1}},xa=function(a,b,c,d,e,f,h,g,j,m){a.addEventListener("mousedown",function(c){if(c.button==0){delete d.cancelDrag;d.draggingItem=b;d.dragType="Ordering";
d.style.cursor=a.style.cursor;d.draggingInitialY=c.clientY;d.draggingInitialThumbPosition=0;c.preventDefault()}},true);if(typeof d.draggableOrderingItems==="undefined")d.draggableOrderingItems=[];for(var k=false,o=0;o<d.draggableOrderingItems.length;o++)if(d.draggableOrderingItems[o]==b){k=true;break}if(!k){d.addEventListener("mousemove",function(a){if(!(typeof d.draggingItem==="undefined"||d.draggingItem!=b||d.dragType!="Ordering")){if(typeof d.temporaryHoveredGridItemSelectionContainer!=="undefined"){d.temporaryHoveredGridItemSelectionContainer.setAttribute("class",
d.temporaryHoveredGridItemClass);d.temporaryHoveredGridItemSelectionContainer.setAttribute("style",d.temporaryHoveredGridItemStyle);delete d.temporaryHoveredGridItemSelectionContainer;delete d.temporaryHoveredGridItemClass;delete d.temporaryHoveredGridItemStyle}var l=a.clientY-d.draggingInitialY;wa(a.clientY,d);delete d.draggingItem;if(d.cancelDrag){p(b,e);delete d.cancelDrag;delete d.draggingItem;d.style.cursor="default"}else{for(var a=Math.floor((b.itemTop+d.draggingInitialThumbPosition+l)/e.itemHeight),
l=null,k=0,o=0;o<c.length;o++){var n=c[o];if(n.isVisible&&!(typeof n.isHidden!=="undefined"&&n.isHidden)){if(k==a){l=n;break}k++}}if(l!=null&&l!=b&&l.gridItemSelectionContainer!=null){d.temporaryHoveredGridItemSelectionContainer=l.gridItemSelectionContainer;d.temporaryHoveredGridItemClass=l.gridItemSelectionContainer.getAttribute("class");d.temporaryHoveredGridItemStyle=l.gridItemSelectionContainer.getAttribute("style");typeof f==="undefined"||f(a,l)?typeof h!=="undefined"?l.gridItemSelectionContainer.setAttribute("class",
h):typeof g!=="undefined"&&l.gridItemSelectionContainer.setAttribute("style",g):typeof j!=="undefined"?l.gridItemSelectionContainer.setAttribute("class",j):typeof m!=="undefined"&&l.gridItemSelectionContainer.setAttribute("style",m)}d.draggingItem=b}}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof d.draggingItem==="undefined"||d.draggingItem!=b||d.dragType!="Ordering")){if(typeof d.temporaryHoveredGridItemSelectionContainer!=="undefined"){d.temporaryHoveredGridItemSelectionContainer.setAttribute("class",
d.temporaryHoveredGridItemClass);d.temporaryHoveredGridItemSelectionContainer.setAttribute("style",d.temporaryHoveredGridItemStyle);delete d.temporaryHoveredGridItemSelectionContainer;delete d.temporaryHoveredGridItemClass;delete d.temporaryHoveredGridItemStyle}for(var a=Math.floor((b.itemTop+d.draggingInitialThumbPosition+(a.clientY-d.draggingInitialY))/e.itemHeight),g=null,h=0,j=0;j<c.length;j++){var k=c[j];if(k.isVisible&&!(typeof k.isHidden!=="undefined"&&k.isHidden)){if(h==a){g=k;break}h++}}g!=
null&&(typeof f==="undefined"||f(a,g))&&d.moveItemHierarchy(d.draggingItem,g.index);setTimeout(function(){p(b,e);ga(b)},0);delete d.draggingItem;d.style.cursor="default"}},true);d.draggableOrderingItems.push(b)}},ya=function(a,b){for(var c in b)c.indexOf("custom")!=0&&c.indexOf("description")!=0||typeof a[c]==="undefined"&&(a[c]=b[c])},ja=function(a,b,c,d,e,f,h,g,j,m,k){var o,n=[],l;if(typeof c!=="undefined")for(o=0;o<c.length;o++){l=k.columns[c[o]];n.push({isTreeView:l.isTreeView,header:l.header,
width:l.width,headerClass:l.headerClass,headerStyle:l.headerStyle,cellClass:l.cellClass,cellStyle:l.cellStyle,cellTemplate:typeof l.exportCellTemplate!=="undefined"?l.exportCellTemplate:l.cellTemplate})}else for(o=0;o<k.columns.length;o++){l=k.columns[o];l.isSelection||n.push({isTreeView:l.isTreeView,header:l.header,width:l.width,headerClass:l.headerClass,headerStyle:l.headerStyle,cellClass:l.cellClass,cellStyle:l.cellStyle,cellTemplate:typeof l.exportCellTemplate!=="undefined"?l.exportCellTemplate:
l.cellTemplate})}o=U(n)+1;var k={isExport:true,isReadOnly:true,selectionMode:"None",isVirtualizing:false,gridWidth:o+"px",columns:n,allowUserToResizeColumns:false,containerClass:k.containerClass,containerStyle:k.containerStyle,border:k.border,theme:k.theme,headerBackground:k.headerBackground,headerHeight:k.headerHeight,itemHeight:k.itemHeight,itemClass:k.itemClass,itemStyle:k.itemStyle,standardItemClass:k.standardItemClass,summaryItemClass:k.summaryItemClass,standardItemStyle:k.standardItemStyle,
summaryItemStyle:k.summaryItemStyle,indentationLevelWidth:k.indentationLevelWidth,toggleButtonClass:k.toggleButtonClass,toggleButtonStyle:k.toggleButtonStyle,gridLines:k.gridLines,horizontalGridLines:k.horizontalGridLines,verticalGridLines:k.verticalGridLines,target:k.target},q=o+2,D,p,t=false;if(f!=null&&typeof f.createElement!=="undefined")D=f;else{if(f!=null&&typeof f.focus!=="undefined")p=f;else{p=window.open("",f!=null?f:"_blank",typeof h!=="undefined"&&h&&(typeof j==="undefined"||j)?"width=320,height=100,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":
"");t=true}D=p.document}D.title=typeof a!=="undefined"?a:"Exported hierarchy"+(typeof h!=="undefined"&&h?" (printable)":"");typeof d==="undefined"&&(d=0);typeof e==="undefined"&&(e=m.length-1);a=[];for(o=c=0;o<m.length;o++){f=m[o];if(!(c++<d||c>e+1)){n={content:f.content,indentation:f.indentation,"class":f["class"],style:f.style,isSummaryEnabled:f.isSummaryEnabled,isHidden:f.isHidden,isExported:true,tag:f};ya(n,f);a.push(n);f.exportItem=n}}var s=D.createElement("p");s.innerHTML=typeof b!=="undefined"?
b:"";D.body.appendChild(s);var r=D.createElement("div");r.setAttribute("style","width: "+q+"px");try{DlhSoft.Controls.TreeGrid.initialize(r,a,k,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(u){}setTimeout(function(){t&&D.body.setAttribute("style","margin: 0px");var a=D.createElement("div");a.appendChild(r);D.body.replaceChild(a,s);if(g){a.setAttribute("style","width: "+r.offsetHeight+"px; height: "+
q+"px; overflow: hidden");a=Math.round((r.offsetWidth-r.offsetHeight)/2);r.setAttribute("style","width: "+q+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}D.close();if(typeof p!==void 0){p.focus();if(typeof h!=="undefined"&&h){p.print();(typeof j==="undefined"||j)&&p.close()}}},0)},ka=function(a,b,c){typeof c==="undefined"&&(c=false);var d=a.parent,e=a.index;if(d==null){for(d=0;e-- >0;){a=b[e];a.indentation==
0&&d++}return d+(!c?1:0)}return ka(d,b)+"."+(d.children.indexOf(a)+(!c?1:0))},pa=function(a,b,c){var d;for(d=0;d<b.length;d++)b[d].treeGrid=a;a.items=b;a.settings=c;a.refresh=function(){u(a)};a.refreshItems=function(){L(b)};a.refreshGridItems=function(){for(var a=0;a<b.length;a++)W(b[a])};a.refreshGridItem=W;a.refreshItem=J;a.refreshItemPath=R;a.refreshItemNeighbourhood=function(e){M(e,b,a,c)};a.getCurrentItem=function(){return a.currentItem};a.getSelectedItem=function(){return a.selectedItem};a.getSelectedItems=
function(){return a.selectedItems};a.selectItem=function(a){t(a,true,c.selectionMode)};a.unselectItem=function(a){t(a,false,c.selectionMode)};a.expandItem=function(a){C(a,true,true)};a.collapseItem=function(a){C(a,false,true)};a.scrollToItem=ga;a.scrollToBottom=function(){a.gridContentContainer.scrollTop=a.gridContent.clientHeight};a.getItemsHeight=function(){return w(b,c)};a.getItemTop=function(a){return V(a,b,c)};a.onItemPropertyChanged=v;a.insertItem=function(e,d){d.treeGrid=a;d.isVirtuallyVisible=
true;var h=e<b.length?b[e]:null;if(h==null){h=e>0?b[e-1]:null;h=h!=null?h.indentation+1:0;if(d.indentation>h)d.indentation=h}else if(typeof d.indentation==="undefined"||d.indentation<h.indentation-1||d.indentation>h.indentation)d.indentation=h.indentation;E([d],c);b.splice(e,0,d);N(b,a);O(b,c,a);var g,j=null;if(e<b.length-1){h=b[e+1];g=h.itemTop;if(typeof h.gridItemContainer!=="undefined")j=h.gridItemContainer}a.gridContent.insertBefore(ba(d,b,c.columns,c.toggleButtonAreaWidth,c),j);typeof g==="undefined"&&
(g=w(b,c)-c.itemHeight);h=g;d.isVisible&&!(typeof d.isHidden!=="undefined"&&d.isHidden)&&Math.max(g,h+c.itemHeight);d.itemTop=h;for(g=e+1;g<b.length;g++)W(b[g]);if(a.isContentHeightInitialized&&a.isContentHeightAuto){g=G(a,b,c);a.gridContentContainer.style.height=g}P(b,c);S(b,c)&&L(b);M(d,b,a,c);I(b,a.gridContentContainer,c)};a.addItem=function(c){a.insertItem(b.length,c)};a.insertItems=function(b,c){for(var d=0;d<c.length;d++)a.insertItem(b++,c[d])};a.addItems=function(b){for(var c=0;c<b.length;c++)a.addItem(b[c])};
a.removeItem=function(d){var f=d.index,h=d.itemTop,g=null,j=false;if(f>0){for(g=b[f-1];g.parent!=null;)g=g.parent;j=g.isExpanded;d.hasChildren&&C(g,d.isExpanded,false,true);g.indentation>=d.indentation&&(g=null)}else b[0].isExpanded||C(b[0],true,false,true);var m=f+1<b.length?b[f+1]:null;m!=null&&(!m.isExpanded&&m.indentation>d.indentation)&&C(m,true,false,true);var k=m!=null?m.indentation:null;b.splice(f,1);N(b,a);O(b,c,a);typeof d.gridItemContainer!=="undefined"&&a.gridContent.removeChild(d.gridItemContainer);
m=f<b.length?b[f]:null;m!=null&&m.indentation<k&&v(m,"indentation",false,true);g!=null&&C(g,j,false,true);for(d=f;d<b.length;d++){g=b[d];actualItemTop=h;g.isVisible&&!(typeof g.isHidden!=="undefined"&&g.isHidden)&&(h=Math.max(h,actualItemTop+c.itemHeight));g.itemTop=actualItemTop;J(g)}P(b,c);S(b,c)&&L(b);f>=b.length&&(f=b.length-1);f>=0&&M(b[f],b,a,c);I(b,a.gridContentContainer,c)};a.removeItems=function(b){for(var c=0;c<b.length;c++)a.removeItem(b[c])};a.increaseItemIndentation=function(d){var f=
d.index>0?a.items[d.index-1]:null;if(!(f==null||d.indentation>f.indentation)){C(d,true,false,true);d.indentation++;v(d,"indentation",true,true);S(b,c)&&L(b);for(M(d,b,a,c);d!=null;){d.isExpanded||C(d,true,false);d=d.parent}}};a.decreaseItemIndentation=function(d){var f=d.index<a.items.length-1?a.items[d.index+1]:null;if(!(d.indentation<=0||f!=null&&d.indentation<f.indentation)){d.indentation--;v(d,"indentation",true,true);S(b,c)&&L(b);for(M(d,b,a,c);d!=null;){d.isExpanded||C(d,true,false);d=d.parent}}};
a.setItemContent=function(a,b){a.content=b;v(a,"content",true,true)};a.getItemIndexString=function(a,b){typeof b==="undefined"&&(b=false);return typeof a.index!=="undefined"?(a.index+(!b?1:0)).toString():""};a.getItemWbsIndexString=function(a,c){return ka(a,b,c).toString()};a.moveRange=function(c,d,h){T(c,d,h,a,b)};a.moveItem=function(c,d){Y(c,d,a,b)};a.moveItemUp=function(c){var d=b.indexOf(c);d<=0||Y(c,d-1,a,b)};a.moveItemDown=function(c){var d=b.indexOf(c);d<0||d>=b.length-1||Y(c,d+1,a,b)};a.moveItemHierarchy=
function(c,d){for(var h=b.indexOf(c),g=h+1;g<b.length;g++)if(b[g].indentation<=c.indentation)break;T(h,g-h,d,a,b)};a.moveItemHierarchyUp=function(c){for(var d=b.indexOf(c),h=d+1;h<b.length;h++)if(b[h].indentation<=c.indentation)break;for(var g=d;g-- >0;){if(b[g].indentation<c.indentation)return;if(b[g].indentation==c.indentation)break}T(d,h-d,g,a,b)};a.moveItemHierarchyDown=function(c){for(var d=b.indexOf(c),h=d+1;h<b.length;h++)if(b[h].indentation<=c.indentation)break;for(var h=h-d,g=d+h;g++<b.length-
1;)if(b[g].indentation<=c.indentation)break;b[g-1].indentation<c.indentation||T(d,h,g-h,a,b)};a.exportContent=function(a,d){typeof a==="undefine