bootstrap-table-group-by.min.js 20 KB

12345678910
  1. /**
  2. * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
  3. *
  4. * @version v1.18.2
  5. * @homepage https://bootstrap-table.com
  6. * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
  7. * @license MIT
  8. */
  9. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=function(t){return t&&t.Math==Math&&t},u=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n&&n)||function(){return this}()||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},a=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,s={f:l&&!f.call({1:2},1)?function(t){var e=l(this,t);return!!e&&e.enumerable}:f},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d={}.toString,h=function(t){return d.call(t).slice(8,-1)},y="".split,g=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==h(t)?y.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},b=function(t){return g(v(t))},m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},S=function(t,e){if(!m(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!m(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!m(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!m(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,O=function(t,e){return w.call(t,e)},j=u.document,T=m(j)&&m(j.createElement),B=function(t){return T?j.createElement(t):{}},E=!a&&!c((function(){return 7!=Object.defineProperty(B("div"),"a",{get:function(){return 7}}).a})),x=Object.getOwnPropertyDescriptor,G={f:a?x:function(t,e){if(t=b(t),e=S(e,!0),E)try{return x(t,e)}catch(t){}if(O(t,e))return p(!s.f.call(t,e),t[e])}},A=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,P={f:a?k:function(t,e,r){if(A(t),e=S(e,!0),A(r),E)try{return k(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},L=a?function(t,e,r){return P.f(t,e,p(1,r))}:function(t,e,r){return t[e]=r,t},C=function(t,e){try{L(u,t,e)}catch(r){u[t]=e}return e},_="__core-js_shared__",F=u[_]||C(_,{}),M=Function.toString;"function"!=typeof F.inspectSource&&(F.inspectSource=function(t){return M.call(t)});var R,V,I,$=F.inspectSource,D=u.WeakMap,N="function"==typeof D&&/native code/.test($(D)),q=o((function(t){(t.exports=function(t,e){return F[t]||(F[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),H=0,z=Math.random(),W=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++H+z).toString(36)},K=q("keys"),Q=function(t){return K[t]||(K[t]=W(t))},X={},Y=u.WeakMap;if(N){var J=F.state||(F.state=new Y),U=J.get,Z=J.has,tt=J.set;R=function(t,e){return e.facade=t,tt.call(J,t,e),e},V=function(t){return U.call(J,t)||{}},I=function(t){return Z.call(J,t)}}else{var et=Q("state");X[et]=!0,R=function(t,e){return e.facade=t,L(t,et,e),e},V=function(t){return O(t,et)?t[et]:{}},I=function(t){return O(t,et)}}var rt,nt,ot={set:R,get:V,has:I,enforce:function(t){return I(t)?V(t):R(t,{})},getterFor:function(t){return function(e){var r;if(!m(e)||(r=V(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},it=o((function(t){var e=ot.get,r=ot.enforce,n=String(String).split("String");(t.exports=function(t,e,o,i){var c,a=!!i&&!!i.unsafe,f=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||O(o,"name")||L(o,"name",e),(c=r(o)).source||(c.source=n.join("string"==typeof e?e:""))),t!==u?(a?!l&&t[e]&&(f=!0):delete t[e],f?t[e]=o:L(t,e,o)):f?t[e]=o:C(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||$(this)}))})),ut=u,ct=function(t){return"function"==typeof t?t:void 0},at=function(t,e){return arguments.length<2?ct(ut[t])||ct(u[t]):ut[t]&&ut[t][e]||u[t]&&u[t][e]},ft=Math.ceil,lt=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?lt:ft)(t)},pt=Math.min,dt=function(t){return t>0?pt(st(t),9007199254740991):0},ht=Math.max,yt=Math.min,gt=function(t,e){var r=st(t);return r<0?ht(r+e,0):yt(r,e)},vt=function(t){return function(e,r,n){var o,i=b(e),u=dt(i.length),c=gt(n,u);if(t&&r!=r){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},bt={includes:vt(!0),indexOf:vt(!1)}.indexOf,mt=function(t,e){var r,n=b(t),o=0,i=[];for(r in n)!O(X,r)&&O(n,r)&&i.push(r);for(;e.length>o;)O(n,r=e[o++])&&(~bt(i,r)||i.push(r));return i},St=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=St.concat("length","prototype"),Ot={f:Object.getOwnPropertyNames||function(t){return mt(t,wt)}},jt={f:Object.getOwnPropertySymbols},Tt=at("Reflect","ownKeys")||function(t){var e=Ot.f(A(t)),r=jt.f;return r?e.concat(r(t)):e},Bt=function(t,e){for(var r=Tt(e),n=P.f,o=G.f,i=0;i<r.length;i++){var u=r[i];O(t,u)||n(t,u,o(e,u))}},Et=/#|\.prototype\./,xt=function(t,e){var r=At[Gt(t)];return r==Pt||r!=kt&&("function"==typeof e?c(e):!!e)},Gt=xt.normalize=function(t){return String(t).replace(Et,".").toLowerCase()},At=xt.data={},kt=xt.NATIVE="N",Pt=xt.POLYFILL="P",Lt=xt,Ct=G.f,_t=function(t,e){var r,n,o,i,c,a=t.target,f=t.global,l=t.stat;if(r=f?u:l?u[a]||C(a,{}):(u[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(c=Ct(r,n))&&c.value:r[n],!Lt(f?n:a+(l?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Bt(i,o)}(t.sham||o&&o.sham)&&L(i,"sham",!0),it(r,n,i,t)}},Ft=Array.isArray||function(t){return"Array"==h(t)},Mt=function(t){return Object(v(t))},Rt=function(t,e,r){var n=S(e);n in t?P.f(t,n,p(0,r)):t[n]=r},Vt=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),It=Vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$t=q("wks"),Dt=u.Symbol,Nt=It?Dt:Dt&&Dt.withoutSetter||W,qt=function(t){return O($t,t)||(Vt&&O(Dt,t)?$t[t]=Dt[t]:$t[t]=Nt("Symbol."+t)),$t[t]},Ht=qt("species"),zt=function(t,e){var r;return Ft(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ft(r.prototype)?m(r)&&null===(r=r[Ht])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Wt=at("navigator","userAgent")||"",Kt=u.process,Qt=Kt&&Kt.versions,Xt=Qt&&Qt.v8;Xt?nt=(rt=Xt.split("."))[0]+rt[1]:Wt&&(!(rt=Wt.match(/Edge\/(\d+)/))||rt[1]>=74)&&(rt=Wt.match(/Chrome\/(\d+)/))&&(nt=rt[1]);var Yt=nt&&+nt,Jt=qt("species"),Ut=function(t){return Yt>=51||!c((function(){var e=[];return(e.constructor={})[Jt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Zt=qt("isConcatSpreadable"),te=9007199254740991,ee="Maximum allowed index exceeded",re=Yt>=51||!c((function(){var t=[];return t[Zt]=!1,t.concat()[0]!==t})),ne=Ut("concat"),oe=function(t){if(!m(t))return!1;var e=t[Zt];return void 0!==e?!!e:Ft(t)};_t({target:"Array",proto:!0,forced:!re||!ne},{concat:function(t){var e,r,n,o,i,u=Mt(this),c=zt(u,0),a=0;for(e=-1,n=arguments.length;e<n;e++)if(oe(i=-1===e?u:arguments[e])){if(a+(o=dt(i.length))>te)throw TypeError(ee);for(r=0;r<o;r++,a++)r in i&&Rt(c,a,i[r])}else{if(a>=te)throw TypeError(ee);Rt(c,a++,i)}return c.length=a,c}});var ie=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ue=[].push,ce=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,l,s){for(var p,d,h=Mt(a),y=g(h),v=function(t,e,r){if(ie(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}(f,l,3),b=dt(y.length),m=0,S=s||zt,w=e?S(a,b):r||u?S(a,0):void 0;b>m;m++)if((c||m in y)&&(d=v(p=y[m],m,h),t))if(e)w[m]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:ue.call(w,p)}else switch(t){case 4:return!1;case 7:ue.call(w,p)}return i?-1:n||o?o:w}},ae={forEach:ce(0),map:ce(1),filter:ce(2),some:ce(3),every:ce(4),find:ce(5),findIndex:ce(6),filterOut:ce(7)},fe=Object.defineProperty,le={},se=function(t){throw t},pe=function(t,e){if(O(le,t))return le[t];e||(e={});var r=[][t],n=!!O(e,"ACCESSORS")&&e.ACCESSORS,o=O(e,0)?e[0]:se,i=O(e,1)?e[1]:void 0;return le[t]=!!r&&!c((function(){if(n&&!a)return!0;var t={length:-1};n?fe(t,1,{enumerable:!0,get:se}):t[1]=1,r.call(t,o,i)}))},de=ae.filter,he=Ut("filter"),ye=pe("filter");_t({target:"Array",proto:!0,forced:!he||!ye},{filter:function(t){return de(this,t,arguments.length>1?arguments[1]:void 0)}});var ge,ve=Object.keys||function(t){return mt(t,St)},be=a?Object.defineProperties:function(t,e){A(t);for(var r,n=ve(e),o=n.length,i=0;o>i;)P.f(t,r=n[i++],e[r]);return t},me=at("document","documentElement"),Se=Q("IE_PROTO"),we=function(){},Oe=function(t){return"<script>"+t+"</"+"script>"},je=function(){try{ge=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;je=ge?function(t){t.write(Oe("")),t.close();var e=t.parentWindow.Object;return t=null,e}(ge):((e=B("iframe")).style.display="none",me.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Oe("document.F=Object")),t.close(),t.F);for(var r=St.length;r--;)delete je.prototype[St[r]];return je()};X[Se]=!0;var Te=Object.create||function(t,e){var r;return null!==t?(we.prototype=A(t),r=new we,we.prototype=null,r[Se]=t):r=je(),void 0===e?r:be(r,e)},Be=qt("unscopables"),Ee=Array.prototype;null==Ee[Be]&&P.f(Ee,Be,{configurable:!0,value:Te(null)});var xe,Ge=ae.find,Ae="find",ke=!0,Pe=pe(Ae);Ae in[]&&Array(1).find((function(){ke=!1})),_t({target:"Array",proto:!0,forced:ke||!Pe},{find:function(t){return Ge(this,t,arguments.length>1?arguments[1]:void 0)}}),xe=Ae,Ee[Be][xe]=!0;var Le=function(t,e){var r=[][t];return!!r&&c((function(){r.call(null,e||function(){throw 1},1)}))},Ce=ae.forEach,_e=Le("forEach"),Fe=pe("forEach"),Me=_e&&Fe?[].forEach:function(t){return Ce(this,t,arguments.length>1?arguments[1]:void 0)};_t({target:"Array",proto:!0,forced:[].forEach!=Me},{forEach:Me});var Re=[].join,Ve=g!=Object,Ie=Le("join",",");_t({target:"Array",proto:!0,forced:Ve||!Ie},{join:function(t){return Re.call(b(this),void 0===t?",":t)}});var $e=Ut("slice"),De=pe("slice",{ACCESSORS:!0,0:0,1:2}),Ne=qt("species"),qe=[].slice,He=Math.max;_t({target:"Array",proto:!0,forced:!$e||!De},{slice:function(t,e){var r,n,o,i=b(this),u=dt(i.length),c=gt(t,u),a=gt(void 0===e?u:e,u);if(Ft(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Ft(r.prototype)?m(r)&&null===(r=r[Ne])&&(r=void 0):r=void 0,r===Array||void 0===r))return qe.call(i,c,a);for(n=new(void 0===r?Array:r)(He(a-c,0)),o=0;c<a;c++,o++)c in i&&Rt(n,o,i[c]);return n.length=o,n}});var ze=[],We=ze.sort,Ke=c((function(){ze.sort(void 0)})),Qe=c((function(){ze.sort(null)})),Xe=Le("sort");_t({target:"Array",proto:!0,forced:Ke||!Qe||!Xe},{sort:function(t){return void 0===t?We.call(Mt(this)):We.call(Mt(this),ie(t))}});var Ye=P.f,Je=Function.prototype,Ue=Je.toString,Ze=/^\s*function ([^ (]*)/,tr="name";a&&!(tr in Je)&&Ye(Je,tr,{configurable:!0,get:function(){try{return Ue.call(this).match(Ze)[1]}catch(t){return""}}});var er=Object.assign,rr=Object.defineProperty,nr=!er||c((function(){if(a&&1!==er({b:1},er(rr({},"a",{enumerable:!0,get:function(){rr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=er({},t)[r]||ve(er({},e)).join("")!=n}))?function(t,e){for(var r=Mt(t),n=arguments.length,o=1,i=jt.f,u=s.f;n>o;)for(var c,f=g(arguments[o++]),l=i?ve(f).concat(i(f)):ve(f),p=l.length,d=0;p>d;)c=l[d++],a&&!u.call(f,c)||(r[c]=f[c]);return r}:er;_t({target:"Object",stat:!0,forced:Object.assign!==nr},{assign:nr});var or;for(var ir in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var ur=u[ir],cr=ur&&ur.prototype;if(cr&&cr.forEach!==Me)try{L(cr,"forEach",Me)}catch(t){cr.forEach=Me}}function ar(t){return(ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sr(t){return(sr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pr(t,e){return(pr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dr(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function hr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sr(t);if(e){var o=sr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dr(this,r)}}function yr(t,e,r){return(yr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}var gr=function(t,e){var r={};return t.forEach((function(t){var n=e(t);r[n]=r[n]||[],r[n].push(t)})),r};r.default.extend(r.default.fn.bootstrapTable.defaults.icons,{collapseGroup:{bootstrap3:"glyphicon-chevron-up",materialize:"arrow_drop_down"}[r.default.fn.bootstrapTable.theme]||"fa-angle-up",expandGroup:{bootstrap3:"glyphicon-chevron-down",materialize:"arrow_drop_up"}[r.default.fn.bootstrapTable.theme]||"fa-angle-down"}),r.default.extend(r.default.fn.bootstrapTable.defaults,{groupBy:!1,groupByField:"",groupByFormatter:void 0,groupByToggle:!1,groupByShowToggleIcon:!1,groupByCollapsedGroups:[]});var vr=r.default.fn.bootstrapTable.utils,br=r.default.fn.bootstrapTable.Constructor,mr=br.prototype.initSort,Sr=br.prototype.initBody,wr=br.prototype.updateSelected;br.prototype.initSort=function(){for(var t=this,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];mr.apply(this,Array.prototype.slice.apply(n));var i=this;if(this.tableGroups=[],this.options.groupBy&&""!==this.options.groupByField){this.options.sortName!==this.options.groupByField&&(this.options.customSort?vr.calculateObjectValue(this.options,this.options.customSort,[this.options.sortName,this.options.sortOrder,this.data]):this.options.data.sort((function(e,n){var o=t.getGroupByFields(),i=[],u=[];return r.default.each(o,(function(t,r){i.push(e[r]),u.push(n[r])})),e=i.join(),n=u.join(),e.localeCompare(n,void 0,{numeric:!0})})));var u=gr(i.data,(function(e){var n=t.getGroupByFields(),o=[];return r.default.each(n,(function(t,r){o.push(e[r])})),o.join(", ")})),c=0;r.default.each(u,(function(e,r){t.tableGroups.push({id:c,name:e,data:r}),r.forEach((function(n){n._data||(n._data={}),t.isCollapsed(e,r)&&(n._class="hidden"),n._data["parent-index"]=c})),c++}))}},br.prototype.initBody=function(){var t=this;or=!0;for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(Sr.apply(this,Array.prototype.slice.apply(n)),this.options.groupBy&&""!==this.options.groupByField){var i=this,u=!1,c=0;this.columns.forEach((function(t){t.checkbox?u=!0:t.visible&&(c+=1)})),this.options.detailView&&!this.options.cardView&&(c+=1),this.tableGroups.forEach((function(e){var n=[];n.push(vr.sprintf('<tr class="info groupBy %s" data-group-index="%s">',t.options.groupByToggle?"expanded":"",e.id)),i.options.detailView&&!i.options.cardView&&n.push('<td class="detail"></td>'),u&&n.push('<td class="bs-checkbox">','<input name="btSelectGroup" type="checkbox" />',"</td>");var o=e.name;void 0!==i.options.groupByFormatter&&(o=vr.calculateObjectValue(i.options,i.options.groupByFormatter,[e.name,e.id,e.data])),n.push("<td",vr.sprintf(' colspan="%s"',c),">",o);var a=t.options.icons.collapseGroup;t.isCollapsed(e.name,e.data)&&(a=t.options.icons.expandGroup),t.options.groupByToggle&&t.options.groupByShowToggleIcon&&n.push('<span class="float-right '.concat(t.options.iconsPrefix," ").concat(a,'"></span>')),n.push("</td></tr>"),i.$body.find("tr[data-parent-index=".concat(e.id,"]:first")).before(r.default(n.join("")))})),this.$selectGroup=[],this.$body.find('[name="btSelectGroup"]').each((function(){var t=r.default(this);i.$selectGroup.push({group:t,item:i.$selectItem.filter((function(){return r.default(this).closest("tr").data("parent-index")===t.closest("tr").data("group-index")}))})})),this.options.groupByToggle&&this.$container.off("click",".groupBy").on("click",".groupBy",(function(){var t=r.default(this),e=t.closest("tr").data("group-index"),n=i.$body.find("tr[data-parent-index=".concat(e,"]"));t.toggleClass("expanded collapsed"),t.find("span").toggleClass("".concat(i.options.icons.collapseGroup," ").concat(i.options.icons.expandGroup)),n.toggleClass("hidden"),n.each((function(t,e){return i.collapseRow(r.default(e).data("index"))}))})),this.$container.off("click",'[name="btSelectGroup"]').on("click",'[name="btSelectGroup"]',(function(t){t.stopImmediatePropagation();var e=r.default(this).prop("checked");i[e?"checkGroup":"uncheckGroup"](r.default(this).closest("tr").data("group-index"))}))}or=!1,this.updateSelected()},br.prototype.updateSelected=function(){if(!or){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];wr.apply(this,Array.prototype.slice.apply(e)),this.options.groupBy&&""!==this.options.groupByField&&this.$selectGroup.forEach((function(t){var e=t.item.filter(":enabled").length===t.item.filter(":enabled").filter(":checked").length;t.group.prop("checked",e)}))}},br.prototype.checkGroup=function(t){this.checkGroup_(t,!0)},br.prototype.uncheckGroup=function(t){this.checkGroup_(t,!1)},br.prototype.isCollapsed=function(t,e){if(this.options.groupByCollapsedGroups){var n=vr.calculateObjectValue(this,this.options.groupByCollapsedGroups,[t,e],!0);if(r.default.inArray(t,n)>-1)return!0}return!1},br.prototype.checkGroup_=function(t,e){var n=this.getSelections();this.$selectItem.filter((function(){return r.default(this).closest("tr").data("parent-index")===t})).prop("checked",e),this.updateRows(),this.updateSelected();var o=this.getSelections();e?this.trigger("check-all",o,n):this.trigger("uncheck-all",o,n)},br.prototype.getGroupByFields=function(){var t=this.options.groupByField;return r.default.isArray(this.options.groupByField)||(t=[this.options.groupByField]),t},r.default.BootstrapTable=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pr(t,e)}(u,t);var e,n,o,i=hr(u);function u(){return fr(this,u),i.apply(this,arguments)}return e=u,(n=[{key:"scrollTo",value:function(t){if(this.options.groupBy){var e={unit:"px",value:0};if("object"===ar(t)&&(e=Object.assign(e,t)),"rows"===e.unit){var n=0;return this.$body.find("> tr:not(.groupBy):lt(".concat(e.value,")")).each((function(t,e){n+=r.default(e).outerHeight(!0)})),this.$body.find("> tr:not(.groupBy):eq(".concat(e.value,")")).prevAll(".groupBy").each((function(t,e){n+=r.default(e).outerHeight(!0)})),void this.$tableBody.scrollTop(n)}}yr(sr(u.prototype),"scrollTo",this).call(this,t)}}])&&lr(e.prototype,n),o&&lr(e,o),u}(r.default.BootstrapTable)}));