!function(r){"use strict";"function"==typeof define&&define.amd?define(["jquery","./grid.base"],function(e){return r(e)}):"object"==typeof module&&module.exports?module.exports=function(e,t){return e||(e=window),void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),require("./grid.base"),r(t),t}:r(jQuery)}(function(x){"use strict";x.jgrid=x.jgrid||{};var g=x.jgrid,v=g.getMethod("getGridRes"),b=x.fn.jqGrid;x.fmatter=x.fmatter||{};var y=x.fmatter,w=function(e,t){var r=e.formatoptions||{};return r.hasOwnProperty(t)?r[t]:(e.editoptions||{})[t]},C=function(e){return String(e).replace(/\'/g,"'")},o=function(e){var t,r,i=e.colModel||e.cm,n=!1!==i.title?" title='"+C(e.colName||i.name)+"'":"",o=function(e){return w(i,e)},a=o("checkedClass"),l=o("uncheckedClass"),s=o("value"),c="string"==typeof s&&s.split(":")[0]||"Yes",u="string"==typeof s&&s.split(":")[1]||"No",d=function(e){return""},f=o("disabled");void 0===f&&(f=g.formatter.checkbox.disabled);var m=b.getIconRes.call(this,"checkbox.checked"),p=b.getIconRes.call(this,"checkbox.checkedClasses"),h=b.getIconRes.call(this,"checkbox.unchecked");return!0===f&&(a||l||m||h)?(t=d(a||m),r=d(l||h),a=p||(a||m)):(t="",r=""),{checkedClasses:a,checked:t,unchecked:r,yes:c,no:u}},n={1:1,x:1,true:1,yes:1,y:1,on:1},a={0:1,false:1,no:1,n:1,off:1};x.extend(!0,g,{formatter:{date:{parseRe:/[#%\\\/:_;.,\t\s\-]/,masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO"},reformatAfterEdit:!0,userLocalTime:!1},baseLinkUrl:"",showAction:"",target:"",checkbox:{disabled:!0,defaultValue:!1},idName:"id"},cmTemplate:{integerStr:{formatter:"integer",align:"right",sorttype:"integer",searchoptions:{sopt:["eq","ne","lt","le","gt","ge"]}},integer:{formatter:"integer",align:"right",sorttype:"integer",convertOnSave:function(e){var t=e.newValue;return isNaN(t)?t:parseInt(t,10)},searchoptions:{sopt:["eq","ne","lt","le","gt","ge"]}},numberStr:{formatter:"number",align:"right",sorttype:"number",searchoptions:{sopt:["eq","ne","lt","le","gt","ge"]}},number:{formatter:"number",align:"right",sorttype:"number",convertOnSave:function(e){var t=e.newValue;return isNaN(t)?t:parseFloat(t)},searchoptions:{sopt:["eq","ne","lt","le","gt","ge"]}},booleanCheckbox:{align:"center",formatter:"checkbox",sorttype:"boolean",edittype:"checkbox",editoptions:{value:"true:false",defaultValue:"false"},convertOnSave:function(e){var t=e.newValue,r=o.call(this,e),i=String(t).toLowerCase();return n[i]||i===r.yes.toLowerCase()?t=!0:(a[i]||i===r.no.toLowerCase())&&(t=!1),t},stype:"checkbox",searchoptions:{sopt:["eq"],value:"true:false"}},actions:function(){return{formatter:"actions",width:(null!=this.p&&(b.isInCommonIconClass.call(this,"fa")||b.isInCommonIconClass.call(this,"glyphicon"))?x(this).jqGrid("isBootstrapGuiStyle")?45:39:40)+(g.cellWidth()?5:0),align:"center",label:"",autoResizable:!1,title:!1,frozen:!0,fixed:!0,hidedlg:!0,resizable:!1,sortable:!1,search:!1,editable:!1,viewable:!1}}}}),g.cmTemplate.booleanCheckboxFa=g.cmTemplate.booleanCheckbox,x.extend(y,{isObject:function(e){return e&&("object"==typeof e||x.isFunction(e))||!1},isNumber:function(e){return"number"==typeof e&&isFinite(e)},isValue:function(e){return this.isObject(e)||"string"==typeof e||this.isNumber(e)||"boolean"==typeof e},isEmpty:function(e){return("string"==typeof e||!this.isValue(e))&&(!this.isValue(e)||""===(e=x.trim(e).replace(/ /gi,"").replace(/ /gi,"")))},NumberFormat:function(e,t){var r=y.isNumber;if(r(e)||(e*=1),r(e)){var i,n=e<0,o=String(e),a=t.decimalSeparator||".";if(r(t.decimalPlaces)){var l=t.decimalPlaces;if(i=(o=String(Number(Math.round(e+"e"+l)+"e-"+l))).lastIndexOf("."),0"+e+""},(k.checkbox=function(e,t){var r=o.call(this,t);return i(e,r,t.colModel)}).getCellBuilder=function(e){var t,r=e.colModel;return e.colName=e.colName||this.p.colNames[e.pos],t=o.call(this,e),function(e){return i(e,t,r)}},k.checkbox.unformat=function(e,t,r){var i=o.call(this,t),n=x(r);return(i.checkedClasses?g.hasAllClasses(n.children("i,svg"),i.checkedClasses):n.children("input").is(":checked"))?i.yes:i.no},(k.checkboxFontAwesome4=k.checkbox).getCellBuilder=k.checkbox.getCellBuilder,k.checkboxFontAwesome4.unformat=k.checkbox.unformat,k.link=function(e,t){var r=t.colModel,i="",n={target:t.target};return null!=r&&(n=x.extend({},n,r.formatoptions||{})),n.target&&(i="target="+n.target),y.isEmpty(e)?j(e,n):""+e+""},(k.showlink=function(t,r,i){var e,n,o,a=this,l=r.colModel,s={baseLinkUrl:r.baseLinkUrl,showAction:r.showAction,addParam:r.addParam||"",target:r.target,idName:r.idName,hrefDefaultValue:"#"},c="",u=function(e){return x.isFunction(e)?e.call(a,{cellValue:t,rowid:r.rowId,rowData:i,options:s}):e||""};return null!=l&&(s=x.extend({},s,l.formatoptions||{})),s.target&&(c="target="+u(s.target)),e=u(s.baseLinkUrl)+u(s.showAction),n=s.idName?encodeURIComponent(u(s.idName))+"="+encodeURIComponent(u(s.rowId)||r.rowId):"","object"==typeof(o=u(s.addParam))&&null!==o&&(o=(""!==n?"&":"")+x.param(o)),""===(e+=n||o?"?"+n+o:"")&&(e=u(s.hrefDefaultValue)),"string"==typeof t||y.isNumber(t)||x.isFunction(s.cellValue)?""+(x.isFunction(s.cellValue)?u(s.cellValue):t)+"":j(t,s)}).getCellBuilder=function(e){var u={baseLinkUrl:e.baseLinkUrl,showAction:e.showAction,addParam:e.addParam||"",target:e.target,idName:e.idName,hrefDefaultValue:"#"},t=e.colModel;return null!=t&&(u=x.extend({},u,t.formatoptions||{})),function(t,e,r){var i,n,o,a=this,l=e.rowId,s="",c=function(e){return x.isFunction(e)?e.call(a,{cellValue:t,rowid:l,rowData:r,options:u}):e||""};return u.target&&(s="target="+c(u.target)),i=c(u.baseLinkUrl)+c(u.showAction),n=u.idName?encodeURIComponent(c(u.idName))+"="+encodeURIComponent(c(l)||e.rowId):"","object"==typeof(o=c(u.addParam))&&null!==o&&(o=(""!==n?"&":"")+x.param(o)),""===(i+=n||o?"?"+n+o:"")&&(i=c(u.hrefDefaultValue)),"string"==typeof t||y.isNumber(t)||x.isFunction(u.cellValue)?""+(x.isFunction(u.cellValue)?c(u.cellValue):t)+"":j(t,u)}},k.showlink.pageFinalization=function(e){var t,r,i,o=x(this),a=this.p,n=a.colModel[e],l=a.autoResizing.wrapperClassName,s=this.rows,c=s.length,u=function(e){var t=x(this).closest("tr.jqgrow>td"),r=t.parent(),i=t[0].cellIndex,n=a.colModel[i];if(0td"),l=a.parent(),s=l.attr("id"),c=x(this).closest("table.ui-jqgrid-btable").attr("id").replace(/_frozen([^_]*)$/,"$1"),u=x("#"+g.jqID(c)),d=u[0],f=d.p,m=g.getRelativeRect.call(d,l).top,p=f.colModel[a[0].cellIndex],h=x.extend(!0,{extraparam:{}},g.actionsNav||{},f.actionsNavOptions||{},p.formatoptions||{});switch(void 0!==f.editOptions&&(h.editOptions=x.extend(!0,h.editOptions||{},f.editOptions)),void 0!==f.delOptions&&(h.delOptions=f.delOptions),l.hasClass("jqgrid-new-row")&&(h.extraparam[f.prmNames.oper]=f.prmNames.addoper),o={keys:h.keys,oneditfunc:h.onEdit,successfunc:h.onSuccess,url:h.url,extraparam:h.extraparam,aftersavefunc:h.afterSave,errorfunc:h.onError,afterrestorefunc:h.afterRestore,restoreAfterError:h.restoreAfterError,mtype:h.mtype},!f.multiselect&&s!==f.selrow||f.multiselect&&x.inArray(s,f.selarrrow)<0?u.jqGrid("setSelection",s,!0,e):g.fullBoolFeedback.call(d,"onSelectRow","jqGridSelectRow",s,!0,e),t){case"edit":u.jqGrid("editRow",s,o);break;case"save":u.jqGrid("saveRow",s,o);break;case"cancel":u.jqGrid("restoreRow",s,h.afterRestore);break;case"del":h.delOptions=h.delOptions||{},void 0===h.delOptions.top&&(h.delOptions.top=m),u.jqGrid("delGridRow",s,h.delOptions);break;case"formedit":h.editOptions=h.editOptions||{},void 0===h.editOptions.top&&(h.editOptions.top=m,h.editOptions.recreateForm=!0),u.jqGrid("editGridRow",s,h.editOptions);break;default:if(null!=h.custom&&0"},h=null!=f.custom?f.custom.length-1:-1;if(void 0===l||y.isEmpty(l))return"";if(x.isFunction(f.isDisplayButtons))try{u=f.isDisplayButtons.call(this,f,r,i)||{}}catch(e){}for(;0<=h;)m["first"===(a=f.custom[h--]).position?"unshift":"push"](a);for(n=0,h=m.length;n"+s+""}).pageFinalization=function(e){var t,r,i,s,c=x(this),u=this.p,n=u.colModel[e],o=u.autoResizing.wrapperClassName,a=c.jqGrid("getGuiStyles","states.hover"),l=this.rows,d=this.grid.fbRows,f=l.length,m=(s=n.name,function(e,t){var r,i,n=0,o=u.colModel,a=o.length,l=u.iColByName[s];for(i=0;i.ui-inline-edit,>.ui-inline-del").show(),r.find(">.ui-inline-save,>.ui-inline-cancel").hide()):(r.find(">.ui-inline-edit,>.ui-inline-del").hide(),r.find(">.ui-inline-save,>.ui-inline-cancel").show()))}),p=function(e,t){var r=c.jqGrid("getGridRowById",t);return m(!0,r),!1},h=function(e,t){var r=c.jqGrid("getGridRowById",t);return m(!1,r),!1},g=function(e){1===x(e.target).closest("div.ui-pg-div").data("jqhovering")&&x(this).addClass(a)},v=function(e){1===x(e.target).closest("div.ui-pg-div").data("jqhovering")&&x(this).removeClass(a)},b=function(e){return k.rowactions.call(this,e,x(e.target).closest("div.ui-pg-div").data("jqactionname"))},y=function(e,t){t&&null!=e&&x(e.firstChild).hasClass(o)&&(e=e.firstChild),null!=e&&(x(e.firstChild).on("click",b),x(e.firstChild).children("div.ui-pg-div").on("mouseover",g).on("mouseout",v))},w=(i=n.name,function(e,t){var r=u.iColByName[i];y(t.tr.cells[r],u.colModel[r].autoResizable)});for(null!=n.formatoptions&&n.formatoptions.editformbutton||(c.off("jqGridInlineAfterRestoreRow.jqGridFormatter jqGridInlineAfterSaveRow.jqGridFormatter",p),c.on("jqGridInlineAfterRestoreRow.jqGridFormatter jqGridInlineAfterSaveRow.jqGridFormatter",p),c.off("jqGridInlineEditRow.jqGridFormatter",h),c.on("jqGridInlineEditRow.jqGridFormatter",h),c.off("jqGridAfterAddRow.jqGridFormatter",w),c.on("jqGridAfterAddRow.jqGridFormatter",w)),t=0;t