UNPKG

8.17 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 c=Math.max,d=Math.min;function b(a,b){return b={exports:{}},a(b,b.exports),b.exports}a=a&&a.hasOwnProperty("default")?a["default"]:a;var e,g,h,i="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,j="object",k=function(a){return a&&a.Math==Math&&a},l=k(typeof globalThis==j&&globalThis)||k(typeof window==j&&window)||k(typeof self==j&&self)||k(typeof i==j&&i)||Function("return this")(),m=function(a){try{return!!a()}catch(a){return!0}},n=!m(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),o={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,q=p&&!o.call({1:2},1),r=q?function(a){var b=p(this,a);return!!b&&b.enumerable}:o,f={f:r},s=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}},t={}.toString,u=function(a){return t.call(a).slice(8,-1)},v="".split,w=m(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return"String"==u(a)?v.call(a,""):Object(a)}:Object,x=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a},y=function(a){return w(x(a))},z=function(a){return"object"==typeof a?null!==a:"function"==typeof a},A=function(a,b){if(!z(a))return a;var c,d;if(b&&"function"==typeof(c=a.toString)&&!z(d=c.call(a)))return d;if("function"==typeof(c=a.valueOf)&&!z(d=c.call(a)))return d;if(!b&&"function"==typeof(c=a.toString)&&!z(d=c.call(a)))return d;throw TypeError("Can't convert object to primitive value")},B={}.hasOwnProperty,C=function(a,b){return B.call(a,b)},D=l.document,E=z(D)&&z(D.createElement),F=function(a){return E?D.createElement(a):{}},G=!n&&!m(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),H=Object.getOwnPropertyDescriptor,I=n?H:function(a,b){if(a=y(a),b=A(b,!0),G)try{return H(a,b)}catch(a){}return C(a,b)?s(!f.f.call(a,b),a[b]):void 0},J={f:I},K=function(a){if(!z(a))throw TypeError(a+" is not an object");return a},L=Object.defineProperty,M=n?L:function(a,b,c){if(K(a),b=A(b,!0),K(c),G)try{return L(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},N={f:M},P=n?function(a,b,c){return N.f(a,b,s(1,c))}:function(a,b,c){return a[b]=c,a},Q=function(a,b){try{P(l,a,b)}catch(c){l[a]=b}return b},R=b(function(a){var b=l["__core-js_shared__"]||Q("__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)"})}),S=R("native-function-to-string",Function.toString),T=l.WeakMap,U="function"==typeof T&&/native code/.test(S.call(T)),V=0,O=Math.random(),W=function(a){return"Symbol("+((a===void 0?"":a)+"")+")_"+(++V+O).toString(36)},X=R("keys"),Y=function(a){return X[a]||(X[a]=W(a))},Z={},_=l.WeakMap,aa=function(a){return h(a)?g(a):e(a,{})};if(U){var ba=new _,ca=ba.get,da=ba.has,ea=ba.set;e=function(a,b){return ea.call(ba,a,b),b},g=function(a){return ca.call(ba,a)||{}},h=function(a){return da.call(ba,a)}}else{var fa=Y("state");Z[fa]=!0,e=function(a,b){return P(a,fa,b),b},g=function(a){return C(a,fa)?a[fa]:{}},h=function(a){return C(a,fa)}}var ga={set:e,get:g,has:h,enforce:aa,getterFor:function(a){return function(b){var c;if(!z(b)||(c=g(b)).type!==a)throw TypeError("Incompatible receiver, "+a+" required");return c}}},ha=b(function(a){var b=ga.get,c=ga.enforce,d=(S+"").split("toString");R("inspectSource",function(a){return S.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&&!C(e,"name")&&P(e,"name",b),c(e).source=d.join("string"==typeof b?b:"")),a===l)?void(h?a[b]=e:Q(b,e)):void(g?!i&&a[b]&&(h=!0):delete a[b],h?a[b]=e:P(a,b,e))})(Function.prototype,"toString",function(){return"function"==typeof this&&b(this).source||S.call(this)})}),ia=l,ja=function(a){return"function"==typeof a?a:void 0},ka=Math.ceil,la=Math.floor,ma=function(a){return isNaN(a=+a)?0:(0<a?la:ka)(a)},na=function(a){return 0<a?d(ma(a),9007199254740991):0},oa=function(a,b){var e=ma(a);return 0>e?c(e+b,0):d(e,b)},pa=function(a){return function(b,c,d){var e,f=y(b),g=na(f.length),h=oa(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}},qa={includes:pa(!0),indexOf:pa(!1)},ra=qa.indexOf,sa=function(a,b){var c,d=y(a),e=0,f=[];for(c in d)!C(Z,c)&&C(d,c)&&f.push(c);for(;b.length>e;)C(d,c=b[e++])&&(~ra(f,c)||f.push(c));return f},ta=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ua=Object.getOwnPropertyNames||function(a){return sa(a,ta)},va={f:ua},wa=Object.getOwnPropertySymbols,xa={f:wa},ya=function(a,b){return 2>arguments.length?ja(ia[a])||ja(l[a]):ia[a]&&ia[a][b]||l[a]&&l[a][b]}("Reflect","ownKeys")||function(a){var b=va.f(K(a)),c=xa.f;return c?b.concat(c(a)):b},za=function(a,b){for(var c,d=ya(b),e=N.f,f=J.f,g=0;g<d.length;g++)c=d[g],C(a,c)||e(a,c,f(b,c))},Aa=/#|\.prototype\./,Ba=function(a,b){var c=Da[Ca(a)];return!(c!=Fa)||c!=Ea&&("function"==typeof b?m(b):!!b)},Ca=Ba.normalize=function(a){return(a+"").replace(Aa,".").toLowerCase()},Da=Ba.data={},Ea=Ba.NATIVE="N",Fa=Ba.POLYFILL="P",Ga=J.f,Ha=Array.isArray||function(a){return"Array"==u(a)},Ia=function(a,b,c){var d=A(b);d in a?N.f(a,d,s(0,c)):a[d]=c},Ja=!!Object.getOwnPropertySymbols&&!m(function(){return!(Symbol()+"")}),Ka=l.Symbol,La=R("wks"),Ma=function(a){return La[a]||(La[a]=Ja&&Ka[a]||(Ja?Ka:W)("Symbol."+a))},Na=Ma("species"),Oa=Ma("species"),Pa=[].slice;(function(a,b){var c,d,e,f,g,h,i=a.target,j=a.global,k=a.stat;if(d=j?l:k?l[i]||Q(i,{}):(l[i]||{}).prototype,d)for(e in b){if(g=b[e],a.noTargetGet?(h=Ga(d,e),f=h&&h.value):f=d[e],c=Ba(j?e:i+(k?".":"#")+e,a.forced),!c&&void 0!==f){if(typeof g==typeof f)continue;za(g,f)}(a.sham||f&&f.sham)&&P(g,"sham",!0),ha(d,e,g,a)}})({target:"Array",proto:!0,forced:!function(a){return!m(function(){var b=[],c=b.constructor={};return c[Na]=function(){return{foo:1}},1!==b[a](Boolean).foo})}("slice")},{slice:function(a,b){var d,e,f,g=y(this),h=na(g.length),i=oa(a,h),j=oa(void 0===b?h:b,h);if(Ha(g)&&(d=g.constructor,"function"==typeof d&&(d===Array||Ha(d.prototype))?d=void 0:z(d)&&(d=d[Oa],null===d&&(d=void 0)),d===Array||void 0===d))return Pa.call(g,i,j);for(e=new(void 0===d?Array:d)(c(j-i,0)),f=0;i<j;i++,f++)i in g&&Ia(e,f,g[i]);return e.length=f,e}});var Qa=function(a){return a.$el.data("resizableColumns")!==void 0},Ra=function(a){!a.options.resizable||a.options.cardView||Qa(a)||a.$el.resizableColumns()},Sa=function(a){Qa(a)&&a.$el.data("resizableColumns").destroy()},Ta=function(a){Sa(a),Ra(a)};a.extend(a.fn.bootstrapTable.defaults,{resizable:!1});var Ua=a.fn.bootstrapTable.Constructor,Va=Ua.prototype.initBody,Wa=Ua.prototype.toggleView,Xa=Ua.prototype.resetView;Ua.prototype.initBody=function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];Va.apply(this,Array.prototype.slice.apply(c)),a.$el.off("column-switch.bs.table, page-change.bs.table").on("column-switch.bs.table, page-change.bs.table",function(){Ta(a)})},Ua.prototype.toggleView=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];Wa.apply(this,Array.prototype.slice.apply(b)),this.options.resizable&&this.options.cardView&&Sa(this)},Ua.prototype.resetView=function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];Xa.apply(this,Array.prototype.slice.apply(c)),this.options.resizable&&setTimeout(function(){Ra(a)},100)}});