bootstrap-table-resizable.min.js 14 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.23.4
  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,e,n){return e=o(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(e,n||[],o(t).constructor):e.apply(t,n))}function n(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(){return r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=o(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},r.apply(null,arguments)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e,n,i){var u=r(o(t.prototype),e,n);return function(t){return u.apply(n,t)}}function f(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=function(t){return t&&t.Math===Math&&t},s=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof a&&a)||l("object"==typeof a&&a)||function(){return this}()||Function("return this")(),p={},b=function(t){try{return!!t()}catch(t){return!0}},y=!b((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),v=!b((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),h=v,g=Function.prototype.call,d=h?g.bind(g):function(){return g.apply(g,arguments)},m={},w={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,j=O&&!w.call({1:2},1);m.f=j?function(t){var e=O(this,t);return!!e&&e.enumerable}:w;var S,P,E=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=v,k=Function.prototype,C=k.call,_=T&&k.bind.bind(C,C),z=T?_:function(t){return function(){return C.apply(t,arguments)}},x=z,M=x({}.toString),R=x("".slice),F=b,I=function(t){return R(M(t),8,-1)},A=Object,B=z("".split),D=F((function(){return!A("z").propertyIsEnumerable(0)}))?function(t){return"String"===I(t)?B(t,""):A(t)}:A,L=function(t){return null==t},V=L,$=TypeError,N=function(t){if(V(t))throw new $("Can't call method on "+t);return t},q=D,G=N,W=function(t){return q(G(t))},U="object"==typeof document&&document.all,K=void 0===U&&void 0!==U?function(t){return"function"==typeof t||t===U}:function(t){return"function"==typeof t},Q=K,X=function(t){return"object"==typeof t?null!==t:Q(t)},Y=s,H=K,J=function(t,e){return arguments.length<2?(n=Y[t],H(n)?n:void 0):Y[t]&&Y[t][e];var n},Z=z({}.isPrototypeOf),tt=s.navigator,et=tt&&tt.userAgent,nt=s,rt=et?String(et):"",ot=nt.process,it=nt.Deno,ut=ot&&ot.versions||it&&it.version,ct=ut&&ut.v8;ct&&(P=(S=ct.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!P&&rt&&(!(S=rt.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=rt.match(/Chrome\/(\d+)/))&&(P=+S[1]);var ft=P,at=b,lt=s.String,st=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol("symbol detection");return!lt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ft&&ft<41})),pt=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bt=J,yt=K,vt=Z,ht=Object,gt=pt?function(t){return"symbol"==typeof t}:function(t){var e=bt("Symbol");return yt(e)&&vt(e.prototype,ht(t))},dt=String,mt=K,wt=function(t){try{return dt(t)}catch(t){return"Object"}},Ot=TypeError,jt=function(t){if(mt(t))return t;throw new Ot(wt(t)+" is not a function")},St=L,Pt=d,Et=K,Tt=X,kt=TypeError,Ct={exports:{}},_t=s,zt=Object.defineProperty,xt=function(t,e){try{zt(_t,t,{value:e,configurable:!0,writable:!0})}catch(n){_t[t]=e}return e},Mt=s,Rt=xt,Ft="__core-js_shared__",It=Ct.exports=Mt[Ft]||Rt(Ft,{});(It.versions||(It.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var At=Ct.exports,Bt=At,Dt=function(t,e){return Bt[t]||(Bt[t]=e||{})},Lt=N,Vt=Object,$t=function(t){return Vt(Lt(t))},Nt=$t,qt=z({}.hasOwnProperty),Gt=Object.hasOwn||function(t,e){return qt(Nt(t),e)},Wt=z,Ut=0,Kt=Math.random(),Qt=Wt(1..toString),Xt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Qt(++Ut+Kt,36)},Yt=Dt,Ht=Gt,Jt=Xt,Zt=st,te=pt,ee=s.Symbol,ne=Yt("wks"),re=te?ee.for||ee:ee&&ee.withoutSetter||Jt,oe=d,ie=X,ue=gt,ce=function(t,e){var n=t[e];return St(n)?void 0:jt(n)},fe=function(t,e){var n,r;if("string"===e&&Et(n=t.toString)&&!Tt(r=Pt(n,t)))return r;if(Et(n=t.valueOf)&&!Tt(r=Pt(n,t)))return r;if("string"!==e&&Et(n=t.toString)&&!Tt(r=Pt(n,t)))return r;throw new kt("Can't convert object to primitive value")},ae=TypeError,le=function(t){return Ht(ne,t)||(ne[t]=Zt&&Ht(ee,t)?ee[t]:re("Symbol."+t)),ne[t]}("toPrimitive"),se=function(t,e){if(!ie(t)||ue(t))return t;var n,r=ce(t,le);if(r){if(void 0===e&&(e="default"),n=oe(r,t,e),!ie(n)||ue(n))return n;throw new ae("Can't convert object to primitive value")}return void 0===e&&(e="number"),fe(t,e)},pe=gt,be=function(t){var e=se(t,"string");return pe(e)?e:e+""},ye=X,ve=s.document,he=ye(ve)&&ye(ve.createElement),ge=function(t){return he?ve.createElement(t):{}},de=!y&&!b((function(){return 7!==Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a})),me=y,we=d,Oe=m,je=E,Se=W,Pe=be,Ee=Gt,Te=de,ke=Object.getOwnPropertyDescriptor;p.f=me?ke:function(t,e){if(t=Se(t),e=Pe(e),Te)try{return ke(t,e)}catch(t){}if(Ee(t,e))return je(!we(Oe.f,t,e),t[e])};var Ce={},_e=y&&b((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=X,xe=String,Me=TypeError,Re=function(t){if(ze(t))return t;throw new Me(xe(t)+" is not an object")},Fe=y,Ie=de,Ae=_e,Be=Re,De=be,Le=TypeError,Ve=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ne="enumerable",qe="configurable",Ge="writable";Ce.f=Fe?Ae?function(t,e,n){if(Be(t),e=De(e),Be(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Ge in n&&!n[Ge]){var r=$e(t,e);r&&r[Ge]&&(t[e]=n.value,n={configurable:qe in n?n[qe]:r[qe],enumerable:Ne in n?n[Ne]:r[Ne],writable:!1})}return Ve(t,e,n)}:Ve:function(t,e,n){if(Be(t),e=De(e),Be(n),Ie)try{return Ve(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Le("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var We=Ce,Ue=E,Ke=y?function(t,e,n){return We.f(t,e,Ue(1,n))}:function(t,e,n){return t[e]=n,t},Qe={exports:{}},Xe=y,Ye=Gt,He=Function.prototype,Je=Xe&&Object.getOwnPropertyDescriptor,Ze=Ye(He,"name"),tn={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!Xe||Xe&&Je(He,"name").configurable)},en=K,nn=At,rn=z(Function.toString);en(nn.inspectSource)||(nn.inspectSource=function(t){return rn(t)});var on,un,cn,fn=nn.inspectSource,an=K,ln=s.WeakMap,sn=an(ln)&&/native code/.test(String(ln)),pn=Xt,bn=Dt("keys"),yn={},vn=sn,hn=s,gn=X,dn=Ke,mn=Gt,wn=At,On=function(t){return bn[t]||(bn[t]=pn(t))},jn=yn,Sn="Object already initialized",Pn=hn.TypeError,En=hn.WeakMap;if(vn||wn.state){var Tn=wn.state||(wn.state=new En);Tn.get=Tn.get,Tn.has=Tn.has,Tn.set=Tn.set,on=function(t,e){if(Tn.has(t))throw new Pn(Sn);return e.facade=t,Tn.set(t,e),e},un=function(t){return Tn.get(t)||{}},cn=function(t){return Tn.has(t)}}else{var kn=On("state");jn[kn]=!0,on=function(t,e){if(mn(t,kn))throw new Pn(Sn);return e.facade=t,dn(t,kn,e),e},un=function(t){return mn(t,kn)?t[kn]:{}},cn=function(t){return mn(t,kn)}}var Cn={set:on,get:un,has:cn,enforce:function(t){return cn(t)?un(t):on(t,{})},getterFor:function(t){return function(e){var n;if(!gn(e)||(n=un(e)).type!==t)throw new Pn("Incompatible receiver, "+t+" required");return n}}},_n=z,zn=b,xn=K,Mn=Gt,Rn=y,Fn=tn.CONFIGURABLE,In=fn,An=Cn.enforce,Bn=Cn.get,Dn=String,Ln=Object.defineProperty,Vn=_n("".slice),$n=_n("".replace),Nn=_n([].join),qn=Rn&&!zn((function(){return 8!==Ln((function(){}),"length",{value:8}).length})),Gn=String(String).split("String"),Wn=Qe.exports=function(t,e,n){"Symbol("===Vn(Dn(e),0,7)&&(e="["+$n(Dn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Mn(t,"name")||Fn&&t.name!==e)&&(Rn?Ln(t,"name",{value:e,configurable:!0}):t.name=e),qn&&n&&Mn(n,"arity")&&t.length!==n.arity&&Ln(t,"length",{value:n.arity});try{n&&Mn(n,"constructor")&&n.constructor?Rn&&Ln(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=An(t);return Mn(r,"source")||(r.source=Nn(Gn,"string"==typeof e?e:"")),t};Function.prototype.toString=Wn((function(){return xn(this)&&Bn(this).source||In(this)}),"toString");var Un=Qe.exports,Kn=K,Qn=Ce,Xn=Un,Yn=xt,Hn={},Jn=Math.ceil,Zn=Math.floor,tr=Math.trunc||function(t){var e=+t;return(e>0?Zn:Jn)(e)},er=function(t){var e=+t;return e!=e||0===e?0:tr(e)},nr=er,rr=Math.max,or=Math.min,ir=er,ur=Math.min,cr=function(t){var e=ir(t);return e>0?ur(e,9007199254740991):0},fr=W,ar=function(t,e){var n=nr(t);return n<0?rr(n+e,0):or(n,e)},lr=function(t){return cr(t.length)},sr=function(t){return function(e,n,r){var o=fr(e),i=lr(o);if(0===i)return!t&&-1;var u,c=ar(r,i);if(t&&n!=n){for(;i>c;)if((u=o[c++])!=u)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},pr={includes:sr(!0),indexOf:sr(!1)},br=Gt,yr=W,vr=pr.indexOf,hr=yn,gr=z([].push),dr=function(t,e){var n,r=yr(t),o=0,i=[];for(n in r)!br(hr,n)&&br(r,n)&&gr(i,n);for(;e.length>o;)br(r,n=e[o++])&&(~vr(i,n)||gr(i,n));return i},mr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wr=dr,Or=mr.concat("length","prototype");Hn.f=Object.getOwnPropertyNames||function(t){return wr(t,Or)};var jr={};jr.f=Object.getOwnPropertySymbols;var Sr=J,Pr=Hn,Er=jr,Tr=Re,kr=z([].concat),Cr=Sr("Reflect","ownKeys")||function(t){var e=Pr.f(Tr(t)),n=Er.f;return n?kr(e,n(t)):e},_r=Gt,zr=Cr,xr=p,Mr=Ce,Rr=b,Fr=K,Ir=/#|\.prototype\./,Ar=function(t,e){var n=Dr[Br(t)];return n===Vr||n!==Lr&&(Fr(e)?Rr(e):!!e)},Br=Ar.normalize=function(t){return String(t).replace(Ir,".").toLowerCase()},Dr=Ar.data={},Lr=Ar.NATIVE="N",Vr=Ar.POLYFILL="P",$r=Ar,Nr=s,qr=p.f,Gr=Ke,Wr=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Kn(n)&&Xn(n,i,r),r.global)o?t[e]=n:Yn(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Qn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Ur=xt,Kr=function(t,e,n){for(var r=zr(e),o=Mr.f,i=xr.f,u=0;u<r.length;u++){var c=r[u];_r(t,c)||n&&_r(n,c)||o(t,c,i(e,c))}},Qr=$r,Xr=dr,Yr=mr,Hr=Object.keys||function(t){return Xr(t,Yr)},Jr=y,Zr=z,to=d,eo=b,no=Hr,ro=jr,oo=m,io=$t,uo=D,co=Object.assign,fo=Object.defineProperty,ao=Zr([].concat),lo=!co||eo((function(){if(Jr&&1!==co({b:1},co(fo({},"a",{enumerable:!0,get:function(){fo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==co({},t)[n]||no(co({},e)).join("")!==r}))?function(t,e){for(var n=io(t),r=arguments.length,o=1,i=ro.f,u=oo.f;r>o;)for(var c,f=uo(arguments[o++]),a=i?ao(no(f),i(f)):no(f),l=a.length,s=0;l>s;)c=a[s++],Jr&&!to(u,f,c)||(n[c]=f[c]);return n}:co,so=lo;(function(t,e){var n,r,o,i,u,c=t.target,f=t.global,a=t.stat;if(n=f?Nr:a?Nr[c]||Ur(c,{}):Nr[c]&&Nr[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=qr(n,r))&&u.value:n[r],!Qr(f?r:c+(a?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Kr(i,o)}(t.sham||o&&o.sham)&&Gr(i,"sham",!0),Wr(n,r,i,t)}})({target:"Object",stat:!0,arity:2,forced:Object.assign!==so},{assign:so});var po=function(t){return void 0!==t.$el.data("resizableColumns")},bo=function(t){t.options.resizable&&!t.options.cardView&&!po(t)&&t.$el.is(":visible")&&t.$el.resizableColumns({store:window.store})},yo=function(t){po(t)&&t.$el.data("resizableColumns").destroy()},vo=function(t){yo(t),bo(t)};Object.assign(t.fn.bootstrapTable.defaults,{resizable:!1}),t.BootstrapTable=function(t){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e(this,r,arguments)}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(r,t),n(r,[{key:"initBody",value:function(){for(var t=this,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];c(r,"initBody",this)(n),this.$el.off("column-switch.bs.table page-change.bs.table").on("column-switch.bs.table page-change.bs.table",(function(){vo(t)})),vo(this)}},{key:"toggleView",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];c(r,"toggleView",this)(e),this.options.resizable&&this.options.cardView&&yo(this)}},{key:"resetView",value:function(){for(var t=this,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];c(r,"resetView",this)(n),this.options.resizable&&setTimeout((function(){bo(t)}),100)}}])}(t.BootstrapTable)}));