bootstrap-table-pipeline.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.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=i(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,u()?Reflect.construct(e,n||[],i(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,l(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,n){return(e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},o.apply(null,arguments)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function f(t,e,n,r){var u=o(i(t.prototype),e,n);return function(t){return u.apply(n,t)}}function l(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 p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h=function(t){return t&&t.Math===Math&&t},y=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof p&&p)||h("object"==typeof p&&p)||function(){return this}()||Function("return this")(),b={},v=function(t){try{return!!t()}catch(t){return!0}},d=!v((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),g=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),w=g,m=Function.prototype.call,O=w?m.bind(m):function(){return m.apply(m,arguments)},j={},S={}.propertyIsEnumerable,P=Object.getOwnPropertyDescriptor,C=P&&!S.call({1:2},1);j.f=C?function(t){var e=P(this,t);return!!e&&e.enumerable}:S;var E,T,R=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=g,W=Function.prototype,x=W.call,z=k&&W.bind.bind(x,x),A=k?z:function(t){return function(){return x.apply(t,arguments)}},F=A,D=F({}.toString),I=F("".slice),_=function(t){return I(D(t),8,-1)},M=v,L=_,N=Object,H=A("".split),q=M((function(){return!N("z").propertyIsEnumerable(0)}))?function(t){return"String"===L(t)?H(t,""):N(t)}:N,B=function(t){return null==t},G=B,$=TypeError,J=function(t){if(G(t))throw new $("Can't call method on "+t);return t},U=q,V=J,K=function(t){return U(V(t))},Q="object"==typeof document&&document.all,X=void 0===Q&&void 0!==Q?function(t){return"function"==typeof t||t===Q}:function(t){return"function"==typeof t},Y=X,Z=function(t){return"object"==typeof t?null!==t:Y(t)},tt=y,et=X,nt=function(t,e){return arguments.length<2?(n=tt[t],et(n)?n:void 0):tt[t]&&tt[t][e];var n},rt=A({}.isPrototypeOf),ot=y.navigator,it=ot&&ot.userAgent,ut=y,ct=it?String(it):"",at=ut.process,st=ut.Deno,ft=at&&at.versions||st&&st.version,lt=ft&&ft.v8;lt&&(T=(E=lt.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!T&&ct&&(!(E=ct.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=ct.match(/Chrome\/(\d+)/))&&(T=+E[1]);var pt=T,ht=pt,yt=v,bt=y.String,vt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol("symbol detection");return!bt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ht&&ht<41})),dt=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,gt=nt,wt=X,mt=rt,Ot=Object,jt=dt?function(t){return"symbol"==typeof t}:function(t){var e=gt("Symbol");return wt(e)&&mt(e.prototype,Ot(t))},St=String,Pt=X,Ct=function(t){try{return St(t)}catch(t){return"Object"}},Et=TypeError,Tt=function(t){if(Pt(t))return t;throw new Et(Ct(t)+" is not a function")},Rt=B,kt=O,Wt=X,xt=Z,zt=TypeError,At={exports:{}},Ft=y,Dt=Object.defineProperty,It=function(t,e){try{Dt(Ft,t,{value:e,configurable:!0,writable:!0})}catch(n){Ft[t]=e}return e},_t=y,Mt=It,Lt="__core-js_shared__",Nt=At.exports=_t[Lt]||Mt(Lt,{});(Nt.versions||(Nt.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 Ht=At.exports,qt=Ht,Bt=function(t,e){return qt[t]||(qt[t]=e||{})},Gt=J,$t=Object,Jt=function(t){return $t(Gt(t))},Ut=Jt,Vt=A({}.hasOwnProperty),Kt=Object.hasOwn||function(t,e){return Vt(Ut(t),e)},Qt=A,Xt=0,Yt=Math.random(),Zt=Qt(1..toString),te=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Zt(++Xt+Yt,36)},ee=Bt,ne=Kt,re=te,oe=vt,ie=dt,ue=y.Symbol,ce=ee("wks"),ae=ie?ue.for||ue:ue&&ue.withoutSetter||re,se=function(t){return ne(ce,t)||(ce[t]=oe&&ne(ue,t)?ue[t]:ae("Symbol."+t)),ce[t]},fe=O,le=Z,pe=jt,he=function(t,e){var n=t[e];return Rt(n)?void 0:Tt(n)},ye=function(t,e){var n,r;if("string"===e&&Wt(n=t.toString)&&!xt(r=kt(n,t)))return r;if(Wt(n=t.valueOf)&&!xt(r=kt(n,t)))return r;if("string"!==e&&Wt(n=t.toString)&&!xt(r=kt(n,t)))return r;throw new zt("Can't convert object to primitive value")},be=TypeError,ve=se("toPrimitive"),de=function(t,e){if(!le(t)||pe(t))return t;var n,r=he(t,ve);if(r){if(void 0===e&&(e="default"),n=fe(r,t,e),!le(n)||pe(n))return n;throw new be("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},ge=jt,we=function(t){var e=de(t,"string");return ge(e)?e:e+""},me=Z,Oe=y.document,je=me(Oe)&&me(Oe.createElement),Se=function(t){return je?Oe.createElement(t):{}},Pe=!d&&!v((function(){return 7!==Object.defineProperty(Se("div"),"a",{get:function(){return 7}}).a})),Ce=d,Ee=O,Te=j,Re=R,ke=K,We=we,xe=Kt,ze=Pe,Ae=Object.getOwnPropertyDescriptor;b.f=Ce?Ae:function(t,e){if(t=ke(t),e=We(e),ze)try{return Ae(t,e)}catch(t){}if(xe(t,e))return Re(!Ee(Te.f,t,e),t[e])};var Fe={},De=d&&v((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ie=Z,_e=String,Me=TypeError,Le=function(t){if(Ie(t))return t;throw new Me(_e(t)+" is not an object")},Ne=d,He=Pe,qe=De,Be=Le,Ge=we,$e=TypeError,Je=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Ve="enumerable",Ke="configurable",Qe="writable";Fe.f=Ne?qe?function(t,e,n){if(Be(t),e=Ge(e),Be(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Qe in n&&!n[Qe]){var r=Ue(t,e);r&&r[Qe]&&(t[e]=n.value,n={configurable:Ke in n?n[Ke]:r[Ke],enumerable:Ve in n?n[Ve]:r[Ve],writable:!1})}return Je(t,e,n)}:Je:function(t,e,n){if(Be(t),e=Ge(e),Be(n),He)try{return Je(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new $e("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Xe=Fe,Ye=R,Ze=d?function(t,e,n){return Xe.f(t,e,Ye(1,n))}:function(t,e,n){return t[e]=n,t},tn={exports:{}},en=d,nn=Kt,rn=Function.prototype,on=en&&Object.getOwnPropertyDescriptor,un=nn(rn,"name"),cn={EXISTS:un,PROPER:un&&"something"===function(){}.name,CONFIGURABLE:un&&(!en||en&&on(rn,"name").configurable)},an=X,sn=Ht,fn=A(Function.toString);an(sn.inspectSource)||(sn.inspectSource=function(t){return fn(t)});var ln,pn,hn,yn=sn.inspectSource,bn=X,vn=y.WeakMap,dn=bn(vn)&&/native code/.test(String(vn)),gn=te,wn=Bt("keys"),mn={},On=dn,jn=y,Sn=Z,Pn=Ze,Cn=Kt,En=Ht,Tn=function(t){return wn[t]||(wn[t]=gn(t))},Rn=mn,kn="Object already initialized",Wn=jn.TypeError,xn=jn.WeakMap;if(On||En.state){var zn=En.state||(En.state=new xn);zn.get=zn.get,zn.has=zn.has,zn.set=zn.set,ln=function(t,e){if(zn.has(t))throw new Wn(kn);return e.facade=t,zn.set(t,e),e},pn=function(t){return zn.get(t)||{}},hn=function(t){return zn.has(t)}}else{var An=Tn("state");Rn[An]=!0,ln=function(t,e){if(Cn(t,An))throw new Wn(kn);return e.facade=t,Pn(t,An,e),e},pn=function(t){return Cn(t,An)?t[An]:{}},hn=function(t){return Cn(t,An)}}var Fn={set:ln,get:pn,has:hn,enforce:function(t){return hn(t)?pn(t):ln(t,{})},getterFor:function(t){return function(e){var n;if(!Sn(e)||(n=pn(e)).type!==t)throw new Wn("Incompatible receiver, "+t+" required");return n}}},Dn=A,In=v,_n=X,Mn=Kt,Ln=d,Nn=cn.CONFIGURABLE,Hn=yn,qn=Fn.enforce,Bn=Fn.get,Gn=String,$n=Object.defineProperty,Jn=Dn("".slice),Un=Dn("".replace),Vn=Dn([].join),Kn=Ln&&!In((function(){return 8!==$n((function(){}),"length",{value:8}).length})),Qn=String(String).split("String"),Xn=tn.exports=function(t,e,n){"Symbol("===Jn(Gn(e),0,7)&&(e="["+Un(Gn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Mn(t,"name")||Nn&&t.name!==e)&&(Ln?$n(t,"name",{value:e,configurable:!0}):t.name=e),Kn&&n&&Mn(n,"arity")&&t.length!==n.arity&&$n(t,"length",{value:n.arity});try{n&&Mn(n,"constructor")&&n.constructor?Ln&&$n(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=qn(t);return Mn(r,"source")||(r.source=Vn(Qn,"string"==typeof e?e:"")),t};Function.prototype.toString=Xn((function(){return _n(this)&&Bn(this).source||Hn(this)}),"toString");var Yn=tn.exports,Zn=X,tr=Fe,er=Yn,nr=It,rr={},or=Math.ceil,ir=Math.floor,ur=Math.trunc||function(t){var e=+t;return(e>0?ir:or)(e)},cr=function(t){var e=+t;return e!=e||0===e?0:ur(e)},ar=cr,sr=Math.max,fr=Math.min,lr=function(t,e){var n=ar(t);return n<0?sr(n+e,0):fr(n,e)},pr=cr,hr=Math.min,yr=function(t){var e=pr(t);return e>0?hr(e,9007199254740991):0},br=function(t){return yr(t.length)},vr=K,dr=lr,gr=br,wr=function(t){return function(e,n,r){var o=vr(e),i=gr(o);if(0===i)return!t&&-1;var u,c=dr(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}},mr={includes:wr(!0),indexOf:wr(!1)},Or=Kt,jr=K,Sr=mr.indexOf,Pr=mn,Cr=A([].push),Er=function(t,e){var n,r=jr(t),o=0,i=[];for(n in r)!Or(Pr,n)&&Or(r,n)&&Cr(i,n);for(;e.length>o;)Or(r,n=e[o++])&&(~Sr(i,n)||Cr(i,n));return i},Tr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Rr=Er,kr=Tr.concat("length","prototype");rr.f=Object.getOwnPropertyNames||function(t){return Rr(t,kr)};var Wr={};Wr.f=Object.getOwnPropertySymbols;var xr=nt,zr=rr,Ar=Wr,Fr=Le,Dr=A([].concat),Ir=xr("Reflect","ownKeys")||function(t){var e=zr.f(Fr(t)),n=Ar.f;return n?Dr(e,n(t)):e},_r=Kt,Mr=Ir,Lr=b,Nr=Fe,Hr=v,qr=X,Br=/#|\.prototype\./,Gr=function(t,e){var n=Jr[$r(t)];return n===Vr||n!==Ur&&(qr(e)?Hr(e):!!e)},$r=Gr.normalize=function(t){return String(t).replace(Br,".").toLowerCase()},Jr=Gr.data={},Ur=Gr.NATIVE="N",Vr=Gr.POLYFILL="P",Kr=Gr,Qr=y,Xr=b.f,Yr=Ze,Zr=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Zn(n)&&er(n,i,r),r.global)o?t[e]=n:nr(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:tr.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},to=It,eo=function(t,e,n){for(var r=Mr(e),o=Nr.f,i=Lr.f,u=0;u<r.length;u++){var c=r[u];_r(t,c)||n&&_r(n,c)||o(t,c,i(e,c))}},no=Kr,ro=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,s=t.stat;if(n=a?Qr:s?Qr[c]||to(c,{}):Qr[c]&&Qr[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Xr(n,r))&&u.value:n[r],!no(a?r:c+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;eo(i,o)}(t.sham||o&&o.sham)&&Yr(i,"sham",!0),Zr(n,r,i,t)}},oo=_,io=Array.isArray||function(t){return"Array"===oo(t)},uo={};uo[se("toStringTag")]="z";var co="[object z]"===String(uo),ao=X,so=_,fo=se("toStringTag"),lo=Object,po="Arguments"===so(function(){return arguments}()),ho=co?so:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=lo(t),fo))?n:po?so(e):"Object"===(r=so(e))&&ao(e.callee)?"Arguments":r},yo=A,bo=v,vo=X,go=ho,wo=yn,mo=function(){},Oo=nt("Reflect","construct"),jo=/^\s*(?:class|function)\b/,So=yo(jo.exec),Po=!jo.test(mo),Co=function(t){if(!vo(t))return!1;try{return Oo(mo,[],t),!0}catch(t){return!1}},Eo=function(t){if(!vo(t))return!1;switch(go(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Po||!!So(jo,wo(t))}catch(t){return!0}};Eo.sham=!0;var To=!Oo||bo((function(){var t;return Co(Co.call)||!Co(Object)||!Co((function(){t=!0}))||t}))?Eo:Co,Ro=d,ko=Fe,Wo=R,xo=v,zo=pt,Ao=se("species"),Fo=A([].slice),Do=ro,Io=io,_o=To,Mo=Z,Lo=lr,No=br,Ho=K,qo=function(t,e,n){Ro?ko.f(t,e,Wo(0,n)):t[e]=n},Bo=se,Go=Fo,$o=function(t){return zo>=51||!xo((function(){var e=[];return(e.constructor={})[Ao]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),Jo=Bo("species"),Uo=Array,Vo=Math.max;Do({target:"Array",proto:!0,forced:!$o},{slice:function(t,e){var n,r,o,i=Ho(this),u=No(i),c=Lo(t,u),a=Lo(void 0===e?u:e,u);if(Io(i)&&(n=i.constructor,(_o(n)&&(n===Uo||Io(n.prototype))||Mo(n)&&null===(n=n[Jo]))&&(n=void 0),n===Uo||void 0===n))return Go(i,c,a);for(r=new(void 0===n?Uo:n)(Vo(a-c,0)),o=0;c<a;c++,o++)c in i&&qo(r,o,i[c]);return r.length=o,r}});var Ko=Er,Qo=Tr,Xo=Object.keys||function(t){return Ko(t,Qo)},Yo=d,Zo=A,ti=O,ei=v,ni=Xo,ri=Wr,oi=j,ii=Jt,ui=q,ci=Object.assign,ai=Object.defineProperty,si=Zo([].concat),fi=!ci||ei((function(){if(Yo&&1!==ci({b:1},ci(ai({},"a",{enumerable:!0,get:function(){ai(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!==ci({},t)[n]||ni(ci({},e)).join("")!==r}))?function(t,e){for(var n=ii(t),r=arguments.length,o=1,i=ri.f,u=oi.f;r>o;)for(var c,a=ui(arguments[o++]),s=i?si(ni(a),i(a)):ni(a),f=s.length,l=0;f>l;)c=s[l++],Yo&&!ti(u,a,c)||(n[c]=a[c]);return n}:ci,li=fi;ro({target:"Object",stat:!0,arity:2,forced:Object.assign!==li},{assign:li});var pi=ho,hi=String,yi=function(t){if("Symbol"===pi(t))throw new TypeError("Cannot convert a Symbol value to a string");return hi(t)},bi="\t\n\v\f\r                 \u2028\u2029\ufeff",vi=J,di=yi,gi=bi,wi=A("".replace),mi=RegExp("^["+gi+"]+"),Oi=RegExp("(^|[^"+gi+"])["+gi+"]+$"),ji=function(t){return function(e){var n=di(vi(e));return 1&t&&(n=wi(n,mi,"")),2&t&&(n=wi(n,Oi,"$1")),n}},Si={start:ji(1),end:ji(2),trim:ji(3)},Pi=y,Ci=v,Ei=A,Ti=yi,Ri=Si.trim,ki=bi,Wi=Pi.parseInt,xi=Pi.Symbol,zi=xi&&xi.iterator,Ai=/^[+-]?0x/i,Fi=Ei(Ai.exec),Di=8!==Wi(ki+"08")||22!==Wi(ki+"0x16")||zi&&!Ci((function(){Wi(Object(zi))}))?function(t,e){var n=Ri(Ti(t));return Wi(n,e>>>0||(Fi(Ai,n)?16:10))}:Wi;ro({global:!0,forced:parseInt!==Di},{parseInt:Di});var Ii=t.fn.bootstrapTable.utils;Object.assign(t.fn.bootstrapTable.defaults,{usePipeline:!1,pipelineSize:1e3,onCachedDataHit:function(t){return!1},onCachedDataReset:function(t){return!1}}),Object.assign(t.fn.bootstrapTable.events,{"cached-data-hit.bs.table":"onCachedDataHit","cached-data-reset.bs.table":"onCachedDataReset"}),t.BootstrapTable=function(r){function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e(this,o,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&&s(t,e)}(o,r),n(o,[{key:"init",value:function(){this.options.usePipeline&&this.initPipeline();for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f(o,"init",this)(e)}},{key:"initPipeline",value:function(){this.cacheRequestJSON={},this.cacheWindows=[],this.currWindow=0,this.resetCache=!0}},{key:"onSearch",value:function(){this.options.usePipeline&&(this.resetCache=!0);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f(o,"onSearch",this)(e)}},{key:"onSort",value:function(){this.options.usePipeline&&(this.resetCache=!0);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f(o,"onSort",this)(e)}},{key:"onPageListChange",value:function(e){var n=t(e.currentTarget),r=parseInt(n.text(),10);this.options.pipelineSize=this.calculatePipelineSize(this.options.pipelineSize,r),this.resetCache=!0,f(o,"onPageListChange",this)([e])}},{key:"calculatePipelineSize",value:function(t,e){return 0===e?0:Math.ceil(t/e)*e}},{key:"setCacheWindows",value:function(){this.cacheWindows=[];for(var t=0;t<=this.options.totalRows/this.options.pipelineSize;t++){var e=t*this.options.pipelineSize;this.cacheWindows[t]={lower:e,upper:e+this.options.pipelineSize-1}}}},{key:"setCurrWindow",value:function(t){this.currWindow=0;for(var e=0;e<this.cacheWindows.length;e++)if(this.cacheWindows[e].lower<=t&&t<=this.cacheWindows[e].upper){this.currWindow=e;break}}},{key:"drawFromCache",value:function(t,e){var n=Ii.extend(!0,{},this.cacheRequestJSON),r=t-this.cacheWindows[this.currWindow].lower,o=r+e;return n.rows=n.rows.slice(r,o),n}},{key:"initServer",value:function(t,e){var n=this;if(!this.options.usePipeline)return f(o,"initServer",this)([t,e]);var r=!0,i={};if("limit"===this.options.queryParamsType&&this.options.pagination&&"server"===this.options.sidePagination)if(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize,this.cacheWindows.length){var u=this.cacheWindows[this.currWindow];this.resetCache||i.offset<u.lower||i.offset>u.upper?(r=!0,this.setCurrWindow(i.offset),i.drawOffset=i.offset,i.offset=this.cacheWindows[this.currWindow].lower):r=!1}else r=!0,i.drawOffset=i.offset;if(this.resetCache&&(r=!0,this.resetCache=!1),r&&(i.drawLimit=i.limit,i.limit=this.options.pipelineSize),!r){var c=this.drawFromCache(i.offset,i.limit);return this.load(c),this.trigger("load-success",c),void this.trigger("cached-data-hit",c)}return this.pipelineResponseHandler||(this.pipelineResponseHandler=this.options.responseHandler,this.options.responseHandler=function(t,e){var r=Ii.calculateObjectValue(n.options,n.pipelineResponseHandler,[t,e],t);return n.cacheRequestJSON=Ii.extend(!0,{},r),n.options.totalRows=r[n.options.totalField],n.setCacheWindows(),r=n.drawFromCache(i.drawOffset,i.drawLimit),n.trigger("cached-data-reset",r),r}),f(o,"initServer",this)([t,a(a({},e),i)])}},{key:"destroy",value:function(){this.options.responseHandler=this.pipelineResponseHandler,this.pipelineResponseHandler=null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f(o,"destroy",this)(e)}}])}(t.BootstrapTable)}));