UNPKG

17.3 kBJavaScriptView Raw
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.15.3
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):(a=a||self,b(a.jQuery))})(this,function(a){'use strict';var t=Math.max,u=Math.min,v=Math.floor;function b(a,b){return b={exports:{}},a(b,b.exports),b.exports}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function e(a,b,c){return b&&d(a.prototype,b),c&&d(a,c),a}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&i(a,b)}function h(a){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},h(a)}function i(a,b){return i=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},i(a,b)}function j(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function k(a,b){return b&&("object"==typeof b||"function"==typeof b)?b:j(a)}function l(a,b){for(;!Object.prototype.hasOwnProperty.call(a,b)&&(a=h(a),null!==a););return a}function m(a,b,c){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(a,b,c){var d=l(a,b);if(d){var e=Object.getOwnPropertyDescriptor(d,b);return e.get?e.get.call(c):e.value}},m(a,b,c||a)}function n(a,b){return o(a)||p(a,b)||q()}function o(a){if(Array.isArray(a))return a}function p(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!(b&&c.length===b));d=!0);}catch(a){e=!0,f=a}finally{try{d||null==h["return"]||h["return"]()}finally{if(e)throw f}}return c}function q(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:window.location.search,c=new RegExp("(^|&)".concat(a,"=([^&]*)(&|$)")),d=b.substr(1).match(c);return d?decodeURIComponent(d[2]):null}function s(a){for(var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window.location.search,c=0,d=Object.entries(a);c<d.length;c++){var e=n(d[c],2),f=e[0],g=e[1],h="".concat(f,"=([^&]*)"),i="".concat(f,"=").concat(g);if(b.match(h)){var j=new RegExp("(".concat(f,"=)([^&]*)"),"gi");b=b.replace(j,i)}else{var k=b.match("[?]")?"&":"?";b=b+k+i}}return location.hash&&(b+=location.hash),b}a=a&&a.hasOwnProperty("default")?a["default"]:a;var w,x,y,z="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,A="object",B=function(a){return a&&a.Math==Math&&a},C=B(typeof globalThis==A&&globalThis)||B(typeof window==A&&window)||B(typeof self==A&&self)||B(typeof z==A&&z)||Function("return this")(),D=function(a){try{return!!a()}catch(a){return!0}},E=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),F={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,H=G&&!F.call({1:2},1),I=H?function(a){var b=G(this,a);return!!b&&b.enumerable}:F,f={f:I},J=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}},K={}.toString,L=function(a){return K.call(a).slice(8,-1)},M="".split,N=D(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return"String"==L(a)?M.call(a,""):Object(a)}:Object,P=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a},Q=function(a){return N(P(a))},R=function(a){return"object"==typeof a?null!==a:"function"==typeof a},S=function(a,b){if(!R(a))return a;var c,d;if(b&&"function"==typeof(c=a.toString)&&!R(d=c.call(a)))return d;if("function"==typeof(c=a.valueOf)&&!R(d=c.call(a)))return d;if(!b&&"function"==typeof(c=a.toString)&&!R(d=c.call(a)))return d;throw TypeError("Can't convert object to primitive value")},T={}.hasOwnProperty,U=function(a,b){return T.call(a,b)},V=C.document,W=R(V)&&R(V.createElement),X=function(a){return W?V.createElement(a):{}},Y=!E&&!D(function(){return 7!=Object.defineProperty(X("div"),"a",{get:function(){return 7}}).a}),Z=Object.getOwnPropertyDescriptor,_=E?Z:function(a,b){if(a=Q(a),b=S(b,!0),Y)try{return Z(a,b)}catch(a){}return U(a,b)?J(!f.f.call(a,b),a[b]):void 0},aa={f:_},ba=function(a){if(!R(a))throw TypeError(a+" is not an object");return a},ca=Object.defineProperty,da=E?ca:function(a,b,c){if(ba(a),b=S(b,!0),ba(c),Y)try{return ca(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported");return"value"in c&&(a[b]=c.value),a},ea={f:da},fa=E?function(a,b,c){return ea.f(a,b,J(1,c))}:function(a,b,c){return a[b]=c,a},ga=function(a,b){try{fa(C,a,b)}catch(c){C[a]=b}return b},ha=b(function(a){var b=C["__core-js_shared__"]||ga("__core-js_shared__",{});(a.exports=function(a,c){return b[a]||(b[a]=c===void 0?{}:c)})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),ia=ha("native-function-to-string",Function.toString),ja=C.WeakMap,ka="function"==typeof ja&&/native code/.test(ia.call(ja)),la=0,O=Math.random(),ma=function(a){return"Symbol("+((a===void 0?"":a)+"")+")_"+(++la+O).toString(36)},na=ha("keys"),oa=function(a){return na[a]||(na[a]=ma(a))},pa={},qa=C.WeakMap,ra=function(a){return y(a)?x(a):w(a,{})};if(ka){var sa=new qa,ta=sa.get,ua=sa.has,va=sa.set;w=function(a,b){return va.call(sa,a,b),b},x=function(a){return ta.call(sa,a)||{}},y=function(a){return ua.call(sa,a)}}else{var wa=oa("state");pa[wa]=!0,w=function(a,b){return fa(a,wa,b),b},x=function(a){return U(a,wa)?a[wa]:{}},y=function(a){return U(a,wa)}}var xa={set:w,get:x,has:y,enforce:ra,getterFor:function(a){return function(b){var c;if(!R(b)||(c=x(b)).type!==a)throw TypeError("Incompatible receiver, "+a+" required");return c}}},ya=b(function(a){var b=xa.get,c=xa.enforce,d=(ia+"").split("toString");ha("inspectSource",function(a){return ia.call(a)}),(a.exports=function(a,b,e,f){var g=!!f&&!!f.unsafe,h=!!f&&!!f.enumerable,i=!!f&&!!f.noTargetGet;return("function"==typeof e&&("string"==typeof b&&!U(e,"name")&&fa(e,"name",b),c(e).source=d.join("string"==typeof b?b:"")),a===C)?void(h?a[b]=e:ga(b,e)):void(g?!i&&a[b]&&(h=!0):delete a[b],h?a[b]=e:fa(a,b,e))})(Function.prototype,"toString",function(){return"function"==typeof this&&b(this).source||ia.call(this)})}),za=C,Aa=function(a){return"function"==typeof a?a:void 0},Ba=function(a,b){return 2>arguments.length?Aa(za[a])||Aa(C[a]):za[a]&&za[a][b]||C[a]&&C[a][b]},Ca=Math.ceil,Da=function(a){return isNaN(a=+a)?0:(0<a?v:Ca)(a)},Ea=function(a){return 0<a?u(Da(a),9007199254740991):0},Fa=function(a,b){var c=Da(a);return 0>c?t(c+b,0):u(c,b)},Ga=function(a){return function(b,c,d){var e,f=Q(b),g=Ea(f.length),h=Fa(d,g);if(a&&c!=c){for(;g>h;)if(e=f[h++],e!=e)return!0;}else for(;g>h;h++)if((a||h in f)&&f[h]===c)return a||h||0;return!a&&-1}},Ha={includes:Ga(!0),indexOf:Ga(!1)},Ia=Ha.indexOf,Ja=function(a,b){var c,d=Q(a),e=0,f=[];for(c in d)!U(pa,c)&&U(d,c)&&f.push(c);for(;b.length>e;)U(d,c=b[e++])&&(~Ia(f,c)||f.push(c));return f},Ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],La=Ka.concat("length","prototype"),Ma=Object.getOwnPropertyNames||function(a){return Ja(a,La)},Na={f:Ma},Oa=Object.getOwnPropertySymbols,Pa={f:Oa},Qa=Ba("Reflect","ownKeys")||function(a){var b=Na.f(ba(a)),c=Pa.f;return c?b.concat(c(a)):b},Ra=function(a,b){for(var c,d=Qa(b),e=ea.f,f=aa.f,g=0;g<d.length;g++)c=d[g],U(a,c)||e(a,c,f(b,c))},Sa=/#|\.prototype\./,Ta=function(a,b){var c=Va[Ua(a)];return!(c!=Xa)||c!=Wa&&("function"==typeof b?D(b):!!b)},Ua=Ta.normalize=function(a){return(a+"").replace(Sa,".").toLowerCase()},Va=Ta.data={},Wa=Ta.NATIVE="N",Xa=Ta.POLYFILL="P",Ya=Ta,Za=aa.f,$a=function(a,b){var c,d,e,f,g,h,i=a.target,j=a.global,k=a.stat;if(d=j?C:k?C[i]||ga(i,{}):(C[i]||{}).prototype,d)for(e in b){if(g=b[e],a.noTargetGet?(h=Za(d,e),f=h&&h.value):f=d[e],c=Ya(j?e:i+(k?".":"#")+e,a.forced),!c&&void 0!==f){if(typeof g==typeof f)continue;Ra(g,f)}(a.sham||f&&f.sham)&&fa(g,"sham",!0),ya(d,e,g,a)}},_a=Array.isArray||function(a){return"Array"==L(a)},ab=function(a){return Object(P(a))},bb=function(a,b,c){var d=S(b);d in a?ea.f(a,d,J(0,c)):a[d]=c},cb=!!Object.getOwnPropertySymbols&&!D(function(){return!(Symbol()+"")}),db=C.Symbol,eb=ha("wks"),fb=function(a){return eb[a]||(eb[a]=cb&&db[a]||(cb?db:ma)("Symbol."+a))},gb=fb("species"),hb=function(a,b){var c;return _a(a)&&(c=a.constructor,"function"==typeof c&&(c===Array||_a(c.prototype))?c=void 0:R(c)&&(c=c[gb],null===c&&(c=void 0))),new(void 0===c?Array:c)(0===b?0:b)},ib=fb("species"),jb=fb("isConcatSpreadable"),kb=9007199254740991,lb="Maximum allowed index exceeded",mb=!D(function(){var a=[];return a[jb]=!1,a.concat()[0]!==a}),nb=function(a){return!D(function(){var b=[],c=b.constructor={};return c[ib]=function(){return{foo:1}},1!==b[a](Boolean).foo})}("concat"),ob=function(a){if(!R(a))return!1;var b=a[jb];return b===void 0?_a(a):!!b};$a({target:"Array",proto:!0,forced:!mb||!nb},{concat:function(){var a,b,c,d,e,f=ab(this),g=hb(f,0),h=0;for(a=-1,c=arguments.length;a<c;a++)if(e=-1===a?f:arguments[a],ob(e)){if(d=Ea(e.length),h+d>kb)throw TypeError(lb);for(b=0;b<d;b++,h++)b in e&&bb(g,h,e[b])}else{if(h>=kb)throw TypeError(lb);bb(g,h++,e)}return g.length=h,g}});var pb=Object.keys||function(a){return Ja(a,Ka)},qb=f.f,rb=function(a){return function(b){for(var c,d=Q(b),e=pb(d),f=e.length,g=0,h=[];f>g;)c=e[g++],(!E||qb.call(d,c))&&h.push(a?[c,d[c]]:d[c]);return h}},sb={entries:rb(!0),values:rb(!1)},tb=sb.entries;$a({target:"Object",stat:!0},{entries:function(a){return tb(a)}});var ub=function(a){if(!R(a)&&null!==a)throw TypeError("Can't set "+(a+" as a prototype"));return a},vb=Object.setPrototypeOf||("__proto__"in{}?function(){var a,b=!1,c={};try{a=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,a.call(c,[]),b=c instanceof Array}catch(a){}return function(c,d){return ba(c),ub(d),b?a.call(c,d):c.__proto__=d,c}}():void 0),wb=function(a,b,c){var d,e;return vb&&"function"==typeof(d=b.constructor)&&d!==c&&R(e=d.prototype)&&e!==c.prototype&&vb(a,e),a},xb=fb("match"),yb=function(a){var b;return R(a)&&((b=a[xb])===void 0?"RegExp"==L(a):!!b)},zb=function(){var a=ba(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.dotAll&&(b+="s"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b},Ab=fb("species"),Bb=ea.f,Cb=Na.f,Db=fb("match"),Eb=C.RegExp,Fb=Eb.prototype,Gb=/a/g,Hb=/a/g,Ib=new Eb(Gb)!==Gb,Jb=E&&Ya("RegExp",!Ib||D(function(){return Hb[Db]=!1,Eb(Gb)!=Gb||Eb(Hb)==Hb||"/a/i"!=Eb(Gb,"i")}));if(Jb){for(var Kb=function(a,b){var c=this instanceof Kb,d=yb(a),e=void 0===b;return!c&&d&&a.constructor===Kb&&e?a:wb(Ib?new Eb(d&&!e?a.source:a,b):Eb((d=a instanceof Kb)?a.source:a,d&&e?zb.call(a):b),c?this:Fb,Kb)},Lb=function(a){(a in Kb)||Bb(Kb,a,{configurable:!0,get:function(){return Eb[a]},set:function(b){Eb[a]=b}})},Mb=Cb(Eb),Nb=0;Mb.length>Nb;)Lb(Mb[Nb++]);Fb.constructor=Kb,Kb.prototype=Fb,ya(C,"RegExp",Kb)}(function(a){var b=Ba(a),c=ea.f;E&&b&&!b[Ab]&&c(b,Ab,{configurable:!0,get:function(){return this}})})("RegExp");var Ob=RegExp.prototype,Pb=Ob.toString,Qb=D(function(){return"/a/b"!=Pb.call({source:"a",flags:"b"})}),Rb=Pb.name!="toString";(Qb||Rb)&&ya(RegExp.prototype,"toString",function(){var a=ba(this),b=a.source+"",c=a.flags,d=(c===void 0&&a instanceof RegExp&&!("flags"in Ob)?zb.call(a):c)+"";return"/"+b+"/"+d},{unsafe:!0});var Sb=RegExp.prototype.exec,Tb=String.prototype.replace,Ub=Sb,Vb=function(){var a=/a/,b=/b*/g;return Sb.call(a,"a"),Sb.call(b,"a"),0!==a.lastIndex||0!==b.lastIndex}(),Wb=/()??/.exec("")[1]!==void 0;(Vb||Wb)&&(Ub=function(a){var b,c,d,e,f=this;return Wb&&(c=new RegExp("^"+f.source+"$(?!\\s)",zb.call(f))),Vb&&(b=f.lastIndex),d=Sb.call(f,a),Vb&&d&&(f.lastIndex=f.global?d.index+d[0].length:b),Wb&&d&&1<d.length&&Tb.call(d[0],c,function(){for(e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(d[e]=void 0)}),d});var Xb=Ub,Yb=fb("species"),Zb=!D(function(){var a=/./;return a.exec=function(){var a=[];return a.groups={a:"7"},a},"7"!=="".replace(a,"$<a>")}),$b=!D(function(){var a=/(?:)/,b=a.exec;a.exec=function(){return b.apply(this,arguments)};var c="ab".split(a);return 2!==c.length||"a"!==c[0]||"b"!==c[1]}),_b=function(a,b,c,d){var e=fb(a),f=!D(function(){var b={};return b[e]=function(){return 7},7!=""[a](b)}),g=f&&!D(function(){var b=!1,c=/a/;return c.exec=function(){return b=!0,null},"split"===a&&(c.constructor={},c.constructor[Yb]=function(){return c}),c[e](""),!b});if(!f||!g||"replace"===a&&!Zb||"split"===a&&!$b){var h=/./[e],i=c(e,""[a],function(a,b,c,d,e){return b.exec===Xb?f&&!e?{done:!0,value:h.call(b,c,d)}:{done:!0,value:a.call(c,b,d)}:{done:!1}}),j=i[0],k=i[1];ya(String.prototype,a,j),ya(RegExp.prototype,e,2==b?function(a,b){return k.call(a,this,b)}:function(a){return k.call(a,this)}),d&&fa(RegExp.prototype[e],"sham",!0)}},ac=function(a){return function(b,c){var d,e,f=P(b)+"",g=Da(c),h=f.length;return 0>g||g>=h?a?"":void 0:(d=f.charCodeAt(g),55296>d||56319<d||g+1===h||56320>(e=f.charCodeAt(g+1))||57343<e?a?f.charAt(g):d:a?f.slice(g,g+2):(d-55296<<10)+(e-56320)+65536)}},bc={codeAt:ac(!1),charAt:ac(!0)},cc=bc.charAt,dc=function(a,b,c){return b+(c?cc(a,b).length:1)},ec=function(a,b){var c=a.exec;if("function"==typeof c){var d=c.call(a,b);if("object"!=typeof d)throw TypeError("RegExp exec method returned something other than an Object or null");return d}if("RegExp"!==L(a))throw TypeError("RegExp#exec called on incompatible receiver");return Xb.call(a,b)};_b("match",1,function(a,b,c){return[function(b){var c=P(this),d=b==null?void 0:b[a];return d===void 0?new RegExp(b)[a](c+""):d.call(b,c)},function(a){var d=c(b,a,this);if(d.done)return d.value;var e=ba(a),f=this+"";if(!e.global)return ec(e,f);var g=e.unicode;e.lastIndex=0;for(var h,i=[],j=0;null!==(h=ec(e,f));){var k=h[0]+"";i[j]=k,""==k&&(e.lastIndex=dc(f,Ea(e.lastIndex),g)),j++}return 0===j?null:i}]});var fc=/\$([$&'`]|\d\d?|<[^>]*>)/g,gc=/\$([$&'`]|\d\d?)/g,hc=function(a){return a===void 0?a:a+""};_b("replace",2,function(a,b,c){function d(a,c,d,e,g,h){var i=d+a.length,j=e.length,f=gc;return void 0!==g&&(g=ab(g),f=fc),b.call(h,f,function(b,h){var k;switch(h.charAt(0)){case"$":return"$";case"&":return a;case"`":return c.slice(0,d);case"'":return c.slice(i);case"<":k=g[h.slice(1,-1)];break;default:var l=+h;if(0==l)return b;if(l>j){var m=v(l/10);return 0===m?b:m<=j?void 0===e[m-1]?h.charAt(1):e[m-1]+h.charAt(1):b}k=e[l-1];}return void 0===k?"":k})}return[function(c,d){var e=P(this),f=c==null?void 0:c[a];return f===void 0?b.call(e+"",c,d):f.call(c,e,d)},function(a,e){var f=c(b,a,this,e);if(f.done)return f.value;var g=ba(a),h=this+"",k="function"==typeof e;k||(e=e+"");var l=g.global;if(l){var m=g.unicode;g.lastIndex=0}for(var n,o=[];(n=ec(g,h),null!==n)&&!(o.push(n),!l);){var p=n[0]+"";""==p&&(g.lastIndex=dc(h,Ea(g.lastIndex),m))}for(var q="",r=0,s=0;s<o.length;s++){n=o[s];for(var v=n[0]+"",w=t(u(Da(n.index),h.length),0),x=[],y=1;y<n.length;y++)x.push(hc(n[y]));var z=n.groups;if(k){var A=[v].concat(x,w,h);z!==void 0&&A.push(z);var B=e.apply(void 0,A)+""}else B=d(v,h,w,x,z,e);w>=r&&(q+=h.slice(r,w)+B,r=w+v.length)}return q+h.slice(r)}]});var ic=Object.is||function(a,b){return a===b?0!==a||1/a==1/b:a!=a&&b!=b};_b("search",1,function(a,b,c){return[function(b){var c=P(this),d=b==null?void 0:b[a];return d===void 0?new RegExp(b)[a](c+""):d.call(b,c)},function(a){var d=c(b,a,this);if(d.done)return d.value;var e=ba(a),f=this+"",g=e.lastIndex;ic(g,0)||(e.lastIndex=0);var h=ec(e,f);return ic(e.lastIndex,g)||(e.lastIndex=g),null===h?-1:h.index}]}),a.BootstrapTable=function(b){function d(){return c(this,d),k(this,h(d).apply(this,arguments))}return g(d,b),e(d,[{key:"init",value:function(){var b,c=this;if(this.options.pagination&&"server"===this.options.sidePagination&&this.options.addrbar){this.addrbarInit=!0;var e=this.options.addrPrefix||"";this.options.pageNumber=+r("".concat(e,"page"))||a.BootstrapTable.DEFAULTS.pageNumber,this.options.pageSize=+r("".concat(e,"size"))||a.BootstrapTable.DEFAULTS.pageSize,this.options.sortOrder=r("".concat(e,"order"))||a.BootstrapTable.DEFAULTS.sortOrder,this.options.sortName=r("".concat(e,"sort"))||a.BootstrapTable.DEFAULTS.sortName,this.options.searchText=r("".concat(e,"search"))||a.BootstrapTable.DEFAULTS.searchText;var f=this.options.onLoadSuccess;this.options.onLoadSuccess=function(a){if(c.addrbarInit)c.addrbarInit=!1;else{var b={};b["".concat(e,"page")]=c.options.pageNumber,b["".concat(e,"size")]=c.options.pageSize,b["".concat(e,"order")]=c.options.sortOrder,b["".concat(e,"sort")]=c.options.sortName,b["".concat(e,"search")]=c.options.searchText,window.history.pushState({},"",s(b))}f&&f.call(c,a)}}for(var g=arguments.length,i=Array(g),j=0;j<g;j++)i[j]=arguments[j];(b=m(h(d.prototype),"init",this)).call.apply(b,[this].concat(i))}}]),d}(a.BootstrapTable)});