!function(o){"use strict";"function"==typeof define&&define.amd?define(["jquery","./grid.base"],o):"object"==typeof module&&module.exports?module.exports=function(r,e){return r||(r=window),void 0===e&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(r)),require("./grid.base"),o(e),e}:o(jQuery)}(function(D){"use strict";var P=D.jgrid,_=D.fn.jqGrid;P.extend({groupingSetup:function(){return this.each(function(){var r,e,o,i,t,n=this,a=n.p,l=a.colModel,u=a.groupingView,s=function(){return""};if(null===u||"object"!=typeof u&&!D.isFunction(u))a.grouping=!1;else if(u.groupField.length){for(void 0===u.visibiltyOnNextGrouping&&(u.visibiltyOnNextGrouping=[]),u.lastvalues=[],u._locgr||(u.groups=[]),u.counters=[],r=0;rtd>span.tree-wrap")},d=!0,p=!1,g=[],m=function(r){var e,o=r.length;for(e=0;e"+l+"",u=!1,s&&(f.align=s),p&&(f.hidden=!1,w--))}return x}return D.each(N,function(r,e){var o;for(o=0;o";if(q._locgr&&!(e.startRow+e.cnt>(V-1)*x&&e.startRow","string"!=typeof(s=D.isFunction(q.groupText[e.idx])?q.groupText[e.idx].call(C,o,e.cnt,e.summary):P.template(q.groupText[e.idx],o,e.cnt,e.summary))&&"number"!=typeof s&&(s=o),"header"===q.groupSummaryPos[e.idx]?(m=1,"cb"!==N[0].name&&"cb"!==N[1].name||m++,"subgrid"!==N[0].name&&"subgrid"!==N[1].name||m++,w+=T(r,0,e,m,y+""+s+"")):w+=""+y+s+"",w+="",c){for(l=R[r+1],a=e.startRow,u=void 0!==l?l.startRow:R[r].startRow+R[r].cnt,q._locgr&&(f=(V-1)*x)>e.startRow&&(a=f),t=a;t