//>>built define("../main dojo/_base/array dojo/_base/lang dojo/_base/window dojo/_base/event dojo/_base/sniff dojo/_base/connect dojo/dnd/Moveable dojox/html/metrics ./util dojo/_base/html dojo/dom-geometry".split(" "),function(v,w,m,n,x,p,A,B,C,t,g,D){var q=v.grid,E=function(a){return 0<=a.rowIndex?a.rowIndex:w.indexOf(a.parentNode.childNodes,a)},F=function(a,b){return a&&((a.rows||0)[b]||a.childNodes[b])},y=function(a){for(;a&&"TABLE"!=a.tagName;a=a.parentNode);return a},G=function(a){var b=a.toUpperCase(); return function(a){return a.tagName!=b}},z=t.rowIndexTag,u=t.gridViewTag,r=q._Builder=m.extend(function(a){a&&(this.view=a,this.grid=a.grid)},{view:null,_table:'\x3ctable class\x3d"dojoxGridRowTable" border\x3d"0" cellspacing\x3d"0" cellpadding\x3d"0" role\x3d"presentation"',getTableArray:function(){var a=[this._table];this.view.viewWidth&&a.push([' style\x3d"width:',this.view.viewWidth,';"'].join(""));a.push("\x3e");return a},generateCellMarkup:function(a,b,c,f){var e=[],d;f?(d=a.index!=a.grid.getSortIndex()? "":0=a.cellNode.offsetWidth-this.overResizeWidth:0=a.cellNode.offsetWidth-this.overResizeWidth&&this.prepareResize(a,-1)},domousemove:function(a){if(!this.moveable){var b=this.overRightResizeArea(a)?"dojoxGridColResize":this.overLeftResizeArea(a)?"dojoxGridColResize":"";b&&!this.canResize(a)&& (b="dojoxGridColNoResize");g.toggleClass(a.sourceView.headerNode,"dojoxGridColNoResize","dojoxGridColNoResize"==b);g.toggleClass(a.sourceView.headerNode,"dojoxGridColResize","dojoxGridColResize"==b);b&&x.stop(a)}},domousedown:function(a){this.moveable||((this.overRightResizeArea(a)||this.overLeftResizeArea(a))&&this.canResize(a)?this.beginColumnResize(a):(this.grid.onMouseDown(a),this.grid.onMouseOverRow(a)))},doclick:function(a){return this._skipBogusClicks?(x.stop(a),!0):!1},colResizeSetup:function(a, b){var c=g.contentBox(a.sourceView.headerNode);if(b){this.lineDiv=document.createElement("div");b=g.position(a.sourceView.headerNode,!0);var f=g.contentBox(a.sourceView.domNode),e=a.pageX;!this.grid.isLeftToRight()&&8>p("ie")&&(e-=C.getScrollbar().w);g.style(this.lineDiv,{top:b.y+"px",left:e+"px",height:f.h+c.h+"px"});g.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=e;n.body().appendChild(this.lineDiv)}b=[];for(var f=this.tableMap.findOverlappingNodes(a.cellNode),e=0,d;d=f[e];e++)b.push({node:d, index:this.getCellNodeIndex(d),width:d.offsetWidth});f=a.sourceView;d=this.grid.isLeftToRight()?1:-1;for(var m=a.grid.views.views,e=[],l=f.idx+d,h;h=m[l];l+=d)e.push({node:h.headerNode,left:window.parseInt(h.headerNode.style.left)});d=f.headerContentNode.firstChild;return{scrollLeft:a.sourceView.headerNode.scrollLeft,view:f,node:a.cellNode,index:a.cellIndex,w:g.contentBox(a.cellNode).w,vw:c.w,table:d,tw:g.contentBox(d).w,spanners:b,followers:e}},beginColumnResize:function(a){this.moverDiv=document.createElement("div"); g.style(this.moverDiv,{position:"absolute",left:0});n.body().appendChild(this.moverDiv);g.addClass(this.grid.domNode,"dojoxGridColumnResizing");var b=this.moveable=new B(this.moverDiv),c=this.colResizeSetup(a,!0);b.onMove=m.hitch(this,"doResizeColumn",c);A.connect(b,"onMoveStop",m.hitch(this,function(){this.endResizeColumn(c);c.node.releaseCapture&&c.node.releaseCapture();this.moveable.destroy();delete this.moveable;this.moveable=null;g.removeClass(this.grid.domNode,"dojoxGridColumnResizing")})); a.cellNode.setCapture&&a.cellNode.setCapture();b.onMouseDown(a)},doResizeColumn:function(a,b,c){var f=c.l,f={deltaX:f,w:a.w+(this.grid.isLeftToRight()?f:-f),vw:a.vw+f,tw:a.tw+f};this.dragRecord={inDrag:a,mover:b,leftTop:c};f.w>=this.minColWidth&&(b?g.style(this.lineDiv,"left",this.lineDiv._origLeft+f.deltaX+"px"):this.doResizeNow(a,f))},endResizeColumn:function(a){if(this.dragRecord){var b=this.dragRecord.leftTop,b=this.grid.isLeftToRight()?b.l:-b.l,b=b+(Math.max(a.w+b,this.minColWidth)-(a.w+b)); p("webkit")&&a.spanners.length&&(b+=g._getPadBorderExtents(a.spanners[0].node).w);this.doResizeNow(a,{deltaX:b,w:a.w+b,vw:a.vw+b,tw:a.tw+b});delete this.dragRecord}g.destroy(this.lineDiv);g.destroy(this.moverDiv);g.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=!0;a.view.update();this._skipBogusClicks=!1;this.grid.onResizeColumn(a.index)},doResizeNow:function(a,b){a.view.convertColPctToFixed();if(a.view.flexCells&&!a.view.testFlexCells()){var c=y(a.node);c&&(c.style.width="")}for(var f, e,c=0;f=a.spanners[c];c++)e=f.width+b.deltaX,0