//>>built
require({cache:{"url:dojox/grid/enhanced/templates/Pagination.html":'\x3cdiv dojoAttachPoint\x3d"paginatorBar"\n\t\x3e\x3ctable cellpadding\x3d"0" cellspacing\x3d"0"  class\x3d"dojoxGridPaginator"\n\t\t\x3e\x3ctr\n\t\t\t\x3e\x3ctd dojoAttachPoint\x3d"descriptionTd" class\x3d"dojoxGridDescriptionTd"\n\t\t\t\t\x3e\x3cdiv dojoAttachPoint\x3d"descriptionDiv" class\x3d"dojoxGridDescription"\x3e\x3c/div\n\t\t\t\x3e\x3c/div\x3e\x3c/td\n\t\t\t\x3e\x3ctd dojoAttachPoint\x3d"sizeSwitchTd"\x3e\x3c/td\n\t\t\t\x3e\x3ctd dojoAttachPoint\x3d"pageStepperTd" class\x3d"dojoxGridPaginatorFastStep"\n\t\t\t\t\x3e\x3cdiv dojoAttachPoint\x3d"pageStepperDiv" class\x3d"dojoxGridPaginatorStep"\x3e\x3c/div\n\t\t\t\x3e\x3c/td\n\t\t\t\x3e\x3ctd dojoAttachPoint\x3d"gotoPageTd" class\x3d"dojoxGridPaginatorGotoTd"\n\t\t\t\t\x3e\x3cdiv dojoAttachPoint\x3d"gotoPageDiv" class\x3d"dojoxGridPaginatorGotoDiv" dojoAttachEvent\x3d"onclick:_openGotopageDialog, onkeydown:_openGotopageDialog"\n\t\t\t\t\t\x3e\x3cspan class\x3d"dojoxGridWardButtonInner"\x3e\x26#8869;\x3c/span\n\t\t\t\t\x3e\x3c/div\n\t\t\t\x3e\x3c/td\n\t\t\x3e\x3c/tr\n\t\x3e\x3c/table\n\x3e\x3c/div\x3e\n'}});
define("dojox/grid/enhanced/plugins/Pagination","dojo/_base/kernel dojo/_base/declare dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/_base/html dojo/_base/event dojo/query dojo/string dojo/keys dojo/text!../templates/Pagination.html ./Dialog ./_StoreLayer ../_Plugin ../../EnhancedGrid dijit/form/Button dijit/form/NumberTextBox dijit/focus dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojox/html/metrics dojo/i18n!../nls/Pagination".split(" "),function(q,p,r,N,g,d,C,w,
v,u,D,E,y,F,G,O,P,Q,z,A,H,I,m){var J=p("dojox.grid.enhanced.plugins.pagination._GotoPagePane",[z,A,H],{templateString:"\x3cdiv\x3e\x3cdiv class\x3d'dojoxGridDialogMargin' dojoAttachPoint\x3d'_mainMsgNode'\x3e\x3c/div\x3e\x3cdiv class\x3d'dojoxGridDialogMargin'\x3e\x3cinput dojoType\x3d'dijit.form.NumberTextBox' style\x3d'width: 50px;' dojoAttachPoint\x3d'_pageInputBox' dojoAttachEvent\x3d'onKeyUp: _onKey'\x3e\x3c/input\x3e\x3clabel dojoAttachPoint\x3d'_pageLabelNode'\x3e\x3c/label\x3e\x3c/div\x3e\x3cdiv class\x3d'dojoxGridDialogButton'\x3e\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d'_confirmBtn' dojoAttachEvent\x3d'onClick: _onConfirm'\x3e\x3c/button\x3e\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d'_cancelBtn' dojoAttachEvent\x3d'onClick: _onCancel'\x3e\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e",
widgetsInTemplate:!0,dlg:null,postMixInProperties:function(){this.plugin=this.dlg.plugin},postCreate:function(){this.inherited(arguments);this._mainMsgNode.innerHTML=this.plugin._nls[12];this._confirmBtn.set("label",this.plugin._nls[14]);this._confirmBtn.set("disabled",!0);this._cancelBtn.set("label",this.plugin._nls[15])},_onConfirm:function(a){this._pageInputBox.isValid()&&""!==this._pageInputBox.getDisplayedValue()&&(this.plugin.currentPage(this._pageInputBox.parse(this._pageInputBox.getDisplayedValue())),
this.dlg._gotoPageDialog.hide(),this._pageInputBox.reset());x(a)},_onCancel:function(a){this._pageInputBox.reset();this.dlg._gotoPageDialog.hide();x(a)},_onKey:function(a){this._confirmBtn.set("disabled",!this._pageInputBox.isValid()||""==this._pageInputBox.getDisplayedValue());a.altKey||a.metaKey||a.keyCode!==u.ENTER||this._onConfirm(a)}}),K=p("dojox.grid.enhanced.plugins.pagination._GotoPageDialog",null,{pageCount:0,dlgPane:null,constructor:function(a){this.plugin=a;this.dlgPane=new J({dlg:this});
this.dlgPane.startup();this._gotoPageDialog=new E({refNode:a.grid.domNode,title:this.plugin._nls[11],content:this.dlgPane});this._gotoPageDialog.startup()},_updatePageCount:function(){this.pageCount=this.plugin.getTotalPageNum();this.dlgPane._pageInputBox.constraints={fractional:!1,min:1,max:this.pageCount};this.dlgPane._pageLabelNode.innerHTML=v.substitute(this.plugin._nls[13],[this.pageCount])},showDialog:function(){this._updatePageCount();this._gotoPageDialog.show()},destroy:function(){this._gotoPageDialog.destroy()}}),
L=p("dojox.grid.enhanced.plugins._ForcedPageStoreLayer",y._StoreLayer,{tags:["presentation"],constructor:function(a){this._plugin=a},_fetch:function(a){var c=this,b=c._plugin,f=b.grid,e=a.scope||q.global,h=a.onBegin;a.start=(b._currentPage-1)*b._currentPageSize+a.start;c.startIdx=a.start;c.endIdx=a.start+b._currentPageSize-1;var k=b._paginator;b._showAll||(b._showAll=!k.sizeSwitch&&!k.pageStepper&&!k.gotoButton);h&&b._showAll?a.onBegin=function(l,n){b._maxSize=b._currentPageSize=l;c.startIdx=0;c.endIdx=
l-1;b._paginator._update();n.onBegin=h;n.onBegin.call(e,l,n)}:h&&(a.onBegin=function(l,n){n.start=0;n.count=b._currentPageSize;b._maxSize=l;c.endIdx=c.endIdx>=l?l-1:c.endIdx;c.startIdx>l&&0!==l&&(f._pending_requests[n.start]=!1,b.firstPage());b._paginator._update();n.onBegin=h;n.onBegin.call(e,Math.min(b._currentPageSize,l-c.startIdx),n)});return g.hitch(this._store,this._originFetch)(a)}}),x=function(a){try{a&&C.stop(a)}catch(c){}},M=p("dojox.grid.enhanced.plugins.pagination._Focus",null,{_focusedNode:null,
_isFocused:!1,constructor:function(a){this._pager=a;a.plugin.connect(a,"onSwitchPageSize",g.hitch(this,"_onActive"));a.plugin.connect(a,"onPageStep",g.hitch(this,"_onActive"));a.plugin.connect(a,"onShowGotoPageDialog",g.hitch(this,"_onActive"));a.plugin.connect(a,"_update",g.hitch(this,"_moveFocus"))},_onFocus:function(a,c){if(!this._isFocused)var b=this._focusedNode||w("[tabindex]",this._pager.domNode)[0];else if(c&&this._focusedNode)for(var f=0<c?-1:1,e=parseInt(this._focusedNode.getAttribute("tabindex"),
10)+f;-3<=e&&0>e&&!(b=w("[tabindex\x3d"+e+"]",this._pager.domNode)[0]);)e+=f;return this._focus(b,a)},_onBlur:function(a,c){if(!c||!this._focusedNode)return this._isFocused=!1,this._focusedNode&&d.hasClass(this._focusedNode,"dojoxGridButtonFocus")&&d.removeClass(this._focusedNode,"dojoxGridButtonFocus"),!0;for(var b,f=0<c?-1:1,e=parseInt(this._focusedNode.getAttribute("tabindex"),10)+f;-3<=e&&0>e&&!(b=w("[tabindex\x3d"+e+"]",this._pager.domNode)[0]);)e+=f;b||(this._isFocused=!1,d.hasClass(this._focusedNode,
"dojoxGridButtonFocus")&&d.removeClass(this._focusedNode,"dojoxGridButtonFocus"));return b?!1:!0},_onMove:function(a,c,b){if(this._focusedNode)for(a=this._focusedNode.getAttribute("tabindex"),c=1==c?"nextSibling":"previousSibling",b=this._focusedNode[c];b;){if(b.getAttribute("tabindex")==a){this._focus(b);break}b=b[c]}},_focus:function(a,c){return a?(this._isFocused=!0,q.isIE&&this._focusedNode&&d.removeClass(this._focusedNode,"dojoxGridButtonFocus"),this._focusedNode=a,a.focus(),q.isIE&&d.addClass(a,
"dojoxGridButtonFocus"),x(c),!0):!1},_onActive:function(a){this._focusedNode=a.target;this._isFocused||this._pager.plugin.grid.focus.focusArea("pagination"+this._pager.position)},_moveFocus:function(){if(this._focusedNode&&!this._focusedNode.getAttribute("tabindex")){for(var a=this._focusedNode.nextSibling;a;){if(a.getAttribute("tabindex")){this._focus(a);return}a=a.nextSibling}for(a=this._focusedNode.previousSibling;a;){if(a.getAttribute("tabindex")){this._focus(a);return}a=a.previousSibling}this._focusedNode=
null;this._onBlur()}else q.isIE&&this._focusedNode&&d.addClass(this._focusedNode,"dojoxGridButtonFocus")}}),B=p("dojox.grid.enhanced.plugins._Paginator",[z,A],{templateString:D,constructor:function(a){g.mixin(this,a);this.grid=this.plugin.grid},postCreate:function(){this.inherited(arguments);var a=this,c=this.grid;this.plugin.connect(c,"_resize",g.hitch(this,"_resetGridHeight"));this._originalResize=c.resize;c.resize=function(b,f){a._changeSize=b;a._resultSize=f;a._originalResize.apply(c,arguments)};
this.focus=M(this);this._placeSelf()},destroy:function(){this.inherited(arguments);this.grid.focus.removeArea("pagination"+this.position);this._gotoPageDialog&&this._gotoPageDialog.destroy();this.grid.resize=this._originalResize},onSwitchPageSize:function(a){},onPageStep:function(a){},onShowGotoPageDialog:function(a){},_update:function(){this._updateDescription();this._updatePageStepper();this._updateSizeSwitch();this._updateGotoButton()},_registerFocus:function(a){var c=this.grid.focus,b="pagination"+
this.position;c.addArea({name:b,onFocus:g.hitch(this.focus,"_onFocus"),onBlur:g.hitch(this.focus,"_onBlur"),onMove:g.hitch(this.focus,"_onMove")});c.placeArea(b,a?"before":"after",a?"header":"content")},_placeSelf:function(){var a=this.grid,c="top"==this.position;this.placeAt(c?a.viewsHeaderNode:a.viewsNode,c?"before":"after");this._registerFocus(c)},_resetGridHeight:function(a,c){var b=this.grid;a=a||this._changeSize;c=c||this._resultSize;delete this._changeSize;delete this._resultSize;if(!b._autoHeight){var f=
b._getPadBorder().h;this.plugin.gh||(this.plugin.gh=(b.domNode.clientHeight||d.style(b.domNode,"height"))+2*f);c&&(a=c);a&&(this.plugin.gh=d.contentBox(b.domNode).h+2*f);var e=this.plugin.gh,h=b._getHeaderHeight(),k=d.marginBox(this.domNode).h;if("number"===typeof b.autoHeight)f=e+k-f,d.style(b.domNode,"height",f+"px"),d.style(b.viewsNode,"height",f-k-h+"px"),this._styleMsgNode(h,d.marginBox(b.viewsNode).w,f-k-h);else{var l=e-k-h-f;d.style(b.viewsNode,"height",l+"px");var n=r.some(b.views.views,function(t){return t.hasHScrollbar()});
r.forEach(b.viewsNode.childNodes,function(t){d.style(t,"height",l+"px")});r.forEach(b.views.views,function(t){t.scrollboxNode&&(!t.hasHScrollbar()&&n?d.style(t.scrollboxNode,"height",l-I.getScrollbar().h+"px"):d.style(t.scrollboxNode,"height",l+"px"))});this._styleMsgNode(h,d.marginBox(b.viewsNode).w,l)}}},_styleMsgNode:function(a,c,b){d.style(this.grid.messagesNode,{position:"absolute",top:a+"px",width:c+"px",height:b+"px","z-Index":"100"})},_updateDescription:function(){var a=this.plugin.forcePageStoreLayer,
c=this.plugin._maxSize,b=this.plugin._nls;this.description&&this.descriptionDiv&&(this.descriptionDiv.innerHTML=0<c?v.substitute(b[0],[0>=c||1==c?b[5]:b[4],c,a.startIdx+1,a.endIdx+1]):"0 "+(0>=c||1==c?b[5]:b[4]))},_updateSizeSwitch:function(){d.style(this.sizeSwitchTd,"display",this.sizeSwitch?"":"none");this.sizeSwitch&&(1>this.sizeSwitchTd.childNodes.length&&this._createSizeSwitchNodes(),this._updateSwitchNodesStyle())},_createSizeSwitchNodes:function(){var a=null,c=this.plugin._nls,b=g.hitch(this.plugin,
"connect");r.forEach(this.pageSizes,function(f){var e=isFinite(f)?v.substitute(c[2],[f]):c[1],h=isFinite(f)?f:c[16];a=d.create("span",{innerHTML:h,title:e,value:f,tabindex:"-1"},this.sizeSwitchTd,"last");a.setAttribute("aria-label",e);b(a,"onclick",g.hitch(this,"_onSwitchPageSize"));b(a,"onkeydown",g.hitch(this,"_onSwitchPageSize"));b(a,"onmouseover",function(k){d.addClass(k.target,"dojoxGridPageTextHover")});b(a,"onmouseout",function(k){d.removeClass(k.target,"dojoxGridPageTextHover")});a=d.create("span",
{innerHTML:"|"},this.sizeSwitchTd,"last");d.addClass(a,"dojoxGridSeparator")},this);d.destroy(a)},_updateSwitchNodesStyle:function(){var a=null,c=function(b,f){f?(d.addClass(b,"dojoxGridActivedSwitch"),d.removeAttr(b,"tabindex")):(d.addClass(b,"dojoxGridInactiveSwitch"),b.setAttribute("tabindex","-1"))};r.forEach(this.sizeSwitchTd.childNodes,function(b){b.value&&(d.removeClass(b),a=b.value,this.plugin._showAll?c(b,isNaN(parseInt(a,10))):c(b,this.plugin._currentPageSize==a))},this)},_updatePageStepper:function(){d.style(this.pageStepperTd,
"display",this.pageStepper?"":"none");this.pageStepper&&(1>this.pageStepperDiv.childNodes.length?(this._createPageStepNodes(),this._createWardBtns()):this._resetPageStepNodes(),this._updatePageStepNodesStyle())},_createPageStepNodes:function(){for(var a=this._getStartPage(),c=this._getStepPageSize(),b="",f=null,e=a,h=g.hitch(this.plugin,"connect");e<a+this.maxPageStep+1;e++)b=v.substitute(this.plugin._nls[3],[e]),f=d.create("div",{innerHTML:e,value:e,title:b},this.pageStepperDiv,"last"),f.setAttribute("aria-label",
b),h(f,"onclick",g.hitch(this,"_onPageStep")),h(f,"onkeydown",g.hitch(this,"_onPageStep")),h(f,"onmouseover",function(k){d.addClass(k.target,"dojoxGridPageTextHover")}),h(f,"onmouseout",function(k){d.removeClass(k.target,"dojoxGridPageTextHover")}),d.style(f,"display",e<a+c?"":"none")},_createWardBtns:function(){var a=this,c=this.plugin._nls,b={prevPage:"\x26#60;",firstPage:"\x26#171;",nextPage:"\x26#62;",lastPage:"\x26#187;"},f=function(e,h,k){var l=d.create("div",{value:e,title:h,tabindex:"-2"},
a.pageStepperDiv,k);a.plugin.connect(l,"onclick",g.hitch(a,"_onPageStep"));a.plugin.connect(l,"onkeydown",g.hitch(a,"_onPageStep"));l.setAttribute("aria-label",h);e=d.create("span",{value:e,title:h,innerHTML:b[e]},l,k);d.addClass(e,"dojoxGridWardButtonInner")};f("prevPage",c[6],"first");f("firstPage",c[7],"first");f("nextPage",c[8],"last");f("lastPage",c[9],"last")},_resetPageStepNodes:function(){for(var a=this._getStartPage(),c=this._getStepPageSize(),b=this.pageStepperDiv.childNodes,f=null,e=a,
h=2,k;h<b.length-2;h++,e++)f=b[h],e<a+c?(k=v.substitute(this.plugin._nls[3],[e]),d.attr(f,{innerHTML:e,title:k,value:e}),d.style(f,"display",""),f.setAttribute("aria-label",k)):d.style(f,"display","none")},_updatePageStepNodesStyle:function(){var a=null,c=this.plugin.currentPage(),b=this.plugin.getTotalPageNum(),f=function(e,h,k){var l=e.value,n=h?"dojoxGrid"+l+"Btn":"dojoxGridInactived";h=h?"dojoxGrid"+l+"BtnDisable":"dojoxGridActived";k?(d.addClass(e,h),d.removeAttr(e,"tabindex")):(d.addClass(e,
n),e.setAttribute("tabindex","-2"))};r.forEach(this.pageStepperDiv.childNodes,function(e){d.removeClass(e);isNaN(parseInt(e.value,10))?(d.addClass(e,"dojoxGridWardButton"),f(e,!0,c===("prevPage"==e.value||"firstPage"==e.value?1:b))):(a=parseInt(e.value,10),f(e,!1,a===c||"none"===d.style(e,"display")))},this)},_showGotoButton:function(a){this.gotoButton=a;this._updateGotoButton()},_updateGotoButton:function(){this.gotoButton?("none"==d.style(this.gotoPageTd,"display")&&d.style(this.gotoPageTd,"display",
""),this.gotoPageDiv.setAttribute("title",this.plugin._nls[10]),d.toggleClass(this.gotoPageDiv,"dojoxGridPaginatorGotoDivDisabled",1>=this.plugin.getTotalPageNum()),1>=this.plugin.getTotalPageNum()?d.removeAttr(this.gotoPageDiv,"tabindex"):this.gotoPageDiv.setAttribute("tabindex","-3")):(this._gotoPageDialog&&this._gotoPageDialog.destroy(),d.removeAttr(this.gotoPageDiv,"tabindex"),d.style(this.gotoPageTd,"display","none"))},_openGotopageDialog:function(a){1>=this.plugin.getTotalPageNum()||"keydown"===
a.type&&a.keyCode!==u.ENTER&&a.keyCode!==u.SPACE||(this._gotoPageDialog||(this._gotoPageDialog=new K(this.plugin)),this._gotoPageDialog.showDialog(),this.onShowGotoPageDialog(a))},_onSwitchPageSize:function(a){if("keydown"!==a.type||a.keyCode===u.ENTER||a.keyCode===u.SPACE)this.onSwitchPageSize(a),this.plugin.currentPageSize(a.target.value)},_onPageStep:function(a){if("keydown"!==a.type||a.keyCode===u.ENTER||a.keyCode===u.SPACE){var c=this.plugin,b=a.target.value;this.onPageStep(a);if(isNaN(parseInt(b,
10)))c[b]();else c.currentPage(parseInt(b,10))}},_getStartPage:function(){var a=this.plugin.currentPage(),c=this.maxPageStep,b=parseInt(c/2,10),f=this.plugin.getTotalPageNum();return a<b||1>a-b||f<=c?1:f-a<b&&0<=a-c?f-c+1:a-b},_getStepPageSize:function(){var a=this._getStartPage(),c=this.plugin.getTotalPageNum(),b=this.maxPageStep;return a+b>c?c-a+1:b}});p=p("dojox.grid.enhanced.plugins.Pagination",F,{name:"pagination",defaultPageSize:25,defaultPage:1,description:!0,sizeSwitch:!0,pageStepper:!0,gotoButton:!1,
pageSizes:[10,25,50,100,Infinity],maxPageStep:7,position:"bottom",init:function(){var a=this.grid;a.usingPagination=!0;this._initOptions();this._currentPage=this.defaultPage;this._currentPageSize=this.grid.rowsPerPage=this.defaultPageSize;this._store=a.store;this.forcePageStoreLayer=new L(this);y.wrap(a,"_storeLayerFetch",this.forcePageStoreLayer);this._paginator="top"!=this.option.position?new B(g.mixin(this.option,{position:"bottom",plugin:this})):new B(g.mixin(this.option,{position:"top",plugin:this}));
this._regApis()},destroy:function(){this.inherited(arguments);this._paginator.destroy();var a=this.grid;a.unwrap(this.forcePageStoreLayer.name());a.scrollToRow=this._gridOriginalfuncs[0];a._onNew=this._gridOriginalfuncs[1];a.removeSelectedRows=this._gridOriginalfuncs[2];this._nls=this._paginator=null},currentPage:function(a){a<=this.getTotalPageNum()&&0<a&&this._currentPage!==a&&(this._currentPage=a,this.grid._refresh(!0),this.grid.resize());return this._currentPage},nextPage:function(){this.currentPage(this._currentPage+
1)},prevPage:function(){this.currentPage(this._currentPage-1)},firstPage:function(){this.currentPage(1)},lastPage:function(){this.currentPage(this.getTotalPageNum())},currentPageSize:function(a){if(!isNaN(a)){var c=this.grid,b=this._currentPageSize*(this._currentPage-1);this._showAll=!isFinite(a);this.grid.usingPagination=!this._showAll;this._currentPageSize=this._showAll?this._maxSize:a;c.rowsPerPage=this._showAll?this._defaultRowsPerPage:a;b+Math.min(this._currentPageSize,this._maxSize)>this._maxSize?
this.lastPage():(a=Math.ceil(b/this._currentPageSize)+1,a!==this._currentPage?this.currentPage(a):this.grid._refresh(!0));this.grid.resize()}return this._currentPageSize},getTotalPageNum:function(){return Math.ceil(this._maxSize/this._currentPageSize)},getTotalRowCount:function(){return this._maxSize},scrollToRow:function(a){var c=parseInt(a/this._currentPageSize,10)+1;if(!(c>this.getTotalPageNum()))return this.currentPage(c),this._gridOriginalfuncs[0](a%this._currentPageSize)},removeSelectedRows:function(){this._multiRemoving=
!0;this._gridOriginalfuncs[2].apply();this._multiRemoving=!1;this.grid.store.save&&this.grid.store.save();this.grid.resize();this.grid._refresh()},showGotoPageButton:function(a){this._paginator.gotoButton=a;this._paginator._updateGotoButton()},gotoPage:function(a){q.deprecated("dojox.grid.enhanced.EnhancedGrid.gotoPage(page)","use dojox.grid.enhanced.EnhancedGrid.currentPage(page) instead","1.8");this.currentPage(a)},gotoFirstPage:function(){q.deprecated("dojox.grid.enhanced.EnhancedGrid.gotoFirstPage()",
"use dojox.grid.enhanced.EnhancedGrid.firstPage() instead","1.8");this.firstPage()},gotoLastPage:function(){q.deprecated("dojox.grid.enhanced.EnhancedGrid.gotoLastPage()","use dojox.grid.enhanced.EnhancedGrid.lastPage() instead","1.8");this.lastPage()},changePageSize:function(a){q.deprecated("dojox.grid.enhanced.EnhancedGrid.changePageSize(size)","use dojox.grid.enhanced.EnhancedGrid.currentPageSize(size) instead","1.8");this.currentPageSize(a)},_nls:null,_showAll:!1,_maxSize:0,_defaultRowsPerPage:25,
_currentPage:1,_currentPageSize:25,_initOptions:function(){this._defaultRowsPerPage=this.grid.rowsPerPage||25;this.defaultPage=1<=this.option.defaultPage?parseInt(this.option.defaultPage,10):1;this.option.description=void 0!==this.option.description?!!this.option.description:this.description;this.option.sizeSwitch=void 0!==this.option.sizeSwitch?!!this.option.sizeSwitch:this.sizeSwitch;this.option.pageStepper=void 0!==this.option.pageStepper?!!this.option.pageStepper:this.pageStepper;this.option.gotoButton=
void 0!==this.option.gotoButton?!!this.option.gotoButton:this.gotoButton;if(g.isArray(this.option.pageSizes)){var a=[];r.forEach(this.option.pageSizes,function(c){c="number"==typeof c?c:parseInt(c,10);!isNaN(c)&&0<c?a.push(c):0>r.indexOf(a,Infinity)&&a.push(Infinity)},this);this.option.pageSizes=a.sort(function(c,b){return c-b})}else this.option.pageSizes=this.pageSizes;this.defaultPageSize=1<=this.option.defaultPageSize?parseInt(this.option.defaultPageSize,10):this.option.pageSizes[0];this.option.maxPageStep=
0<this.option.maxPageStep?this.option.maxPageStep:this.maxPageStep;this.option.position=g.isString(this.option.position)?this.option.position.toLowerCase():this.position;this._nls=[m.descTemplate,m.allItemsLabelTemplate,m.pageSizeLabelTemplate,m.pageStepLabelTemplate,m.itemTitle,m.singularItemTitle,m.prevTip,m.firstTip,m.nextTip,m.lastTip,m.gotoButtonTitle,m.dialogTitle,m.dialogIndication,m.pageCountIndication,m.dialogConfirm,m.dialogCancel,m.all]},_regApis:function(){var a=this.grid;a.currentPage=
g.hitch(this,this.currentPage);a.nextPage=g.hitch(this,this.nextPage);a.prevPage=g.hitch(this,this.prevPage);a.firstPage=g.hitch(this,this.firstPage);a.lastPage=g.hitch(this,this.lastPage);a.currentPageSize=g.hitch(this,this.currentPageSize);a.showGotoPageButton=g.hitch(this,this.showGotoPageButton);a.getTotalRowCount=g.hitch(this,this.getTotalRowCount);a.getTotalPageNum=g.hitch(this,this.getTotalPageNum);a.gotoPage=g.hitch(this,this.gotoPage);a.gotoFirstPage=g.hitch(this,this.gotoFirstPage);a.gotoLastPage=
g.hitch(this,this.gotoLastPage);a.changePageSize=g.hitch(this,this.changePageSize);this._gridOriginalfuncs=[g.hitch(a,a.scrollToRow),g.hitch(a,a._onNew),g.hitch(a,a.removeSelectedRows)];a.scrollToRow=g.hitch(this,this.scrollToRow);a.removeSelectedRows=g.hitch(this,this.removeSelectedRows);a._onNew=g.hitch(this,this._onNew);this.connect(a,"_onDelete",g.hitch(this,this._onDelete))},_onNew:function(a,c){var b=this.getTotalPageNum();if((this._currentPage===b||0===b)&&this.grid.get("rowCount")<this._currentPageSize||
this._showAll)g.hitch(this.grid,this._gridOriginalfuncs[1])(a,c),this.forcePageStoreLayer.endIdx++;this._maxSize++;this._showAll&&this._currentPageSize++;this._showAll&&this.grid.autoHeight?this.grid._refresh():this._paginator._update()},_onDelete:function(){this._multiRemoving||(this.grid.resize(),this._showAll&&this.grid._refresh());0===this.grid.get("rowCount")&&this.prevPage()}});G.registerPlugin(p);return p});