bootstrap-table-pipeline.js 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($$4) { 'use strict';
  6. function _assertThisInitialized(e) {
  7. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  8. return e;
  9. }
  10. function _callSuper(t, o, e) {
  11. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  12. }
  13. function _classCallCheck(a, n) {
  14. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  15. }
  16. function _defineProperties(e, r) {
  17. for (var t = 0; t < r.length; t++) {
  18. var o = r[t];
  19. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  20. }
  21. }
  22. function _createClass(e, r, t) {
  23. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  24. writable: !1
  25. }), e;
  26. }
  27. function _defineProperty(e, r, t) {
  28. return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
  29. value: t,
  30. enumerable: !0,
  31. configurable: !0,
  32. writable: !0
  33. }) : e[r] = t, e;
  34. }
  35. function _get() {
  36. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  37. var p = _superPropBase(e, t);
  38. if (p) {
  39. var n = Object.getOwnPropertyDescriptor(p, t);
  40. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  41. }
  42. }, _get.apply(null, arguments);
  43. }
  44. function _getPrototypeOf(t) {
  45. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  46. return t.__proto__ || Object.getPrototypeOf(t);
  47. }, _getPrototypeOf(t);
  48. }
  49. function _inherits(t, e) {
  50. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  51. t.prototype = Object.create(e && e.prototype, {
  52. constructor: {
  53. value: t,
  54. writable: !0,
  55. configurable: !0
  56. }
  57. }), Object.defineProperty(t, "prototype", {
  58. writable: !1
  59. }), e && _setPrototypeOf(t, e);
  60. }
  61. function _isNativeReflectConstruct() {
  62. try {
  63. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  64. } catch (t) {}
  65. return (_isNativeReflectConstruct = function () {
  66. return !!t;
  67. })();
  68. }
  69. function ownKeys$2(e, r) {
  70. var t = Object.keys(e);
  71. if (Object.getOwnPropertySymbols) {
  72. var o = Object.getOwnPropertySymbols(e);
  73. r && (o = o.filter(function (r) {
  74. return Object.getOwnPropertyDescriptor(e, r).enumerable;
  75. })), t.push.apply(t, o);
  76. }
  77. return t;
  78. }
  79. function _objectSpread2(e) {
  80. for (var r = 1; r < arguments.length; r++) {
  81. var t = null != arguments[r] ? arguments[r] : {};
  82. r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) {
  83. _defineProperty(e, r, t[r]);
  84. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) {
  85. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
  86. });
  87. }
  88. return e;
  89. }
  90. function _possibleConstructorReturn(t, e) {
  91. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  92. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  93. return _assertThisInitialized(t);
  94. }
  95. function _setPrototypeOf(t, e) {
  96. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  97. return t.__proto__ = e, t;
  98. }, _setPrototypeOf(t, e);
  99. }
  100. function _superPropBase(t, o) {
  101. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  102. return t;
  103. }
  104. function _toPrimitive(t, r) {
  105. if ("object" != typeof t || !t) return t;
  106. var e = t[Symbol.toPrimitive];
  107. if (void 0 !== e) {
  108. var i = e.call(t, r);
  109. if ("object" != typeof i) return i;
  110. throw new TypeError("@@toPrimitive must return a primitive value.");
  111. }
  112. return (String )(t);
  113. }
  114. function _toPropertyKey(t) {
  115. var i = _toPrimitive(t, "string");
  116. return "symbol" == typeof i ? i : i + "";
  117. }
  118. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  119. var check = function (it) {
  120. return it && it.Math === Math && it;
  121. };
  122. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  123. var global$b =
  124. // eslint-disable-next-line es/no-global-this -- safe
  125. check(typeof globalThis == 'object' && globalThis) ||
  126. check(typeof window == 'object' && window) ||
  127. // eslint-disable-next-line no-restricted-globals -- safe
  128. check(typeof self == 'object' && self) ||
  129. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  130. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  131. // eslint-disable-next-line no-new-func -- fallback
  132. (function () { return this; })() || Function('return this')();
  133. var objectGetOwnPropertyDescriptor = {};
  134. var fails$d = function (exec) {
  135. try {
  136. return !!exec();
  137. } catch (error) {
  138. return true;
  139. }
  140. };
  141. var fails$c = fails$d;
  142. // Detect IE8's incomplete defineProperty implementation
  143. var descriptors = !fails$c(function () {
  144. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  145. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  146. });
  147. var fails$b = fails$d;
  148. var functionBindNative = !fails$b(function () {
  149. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  150. var test = (function () { /* empty */ }).bind();
  151. // eslint-disable-next-line no-prototype-builtins -- safe
  152. return typeof test != 'function' || test.hasOwnProperty('prototype');
  153. });
  154. var NATIVE_BIND$1 = functionBindNative;
  155. var call$5 = Function.prototype.call;
  156. var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
  157. return call$5.apply(call$5, arguments);
  158. };
  159. var objectPropertyIsEnumerable = {};
  160. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  161. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  162. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  163. // Nashorn ~ JDK8 bug
  164. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  165. // `Object.prototype.propertyIsEnumerable` method implementation
  166. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  167. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  168. var descriptor = getOwnPropertyDescriptor$1(this, V);
  169. return !!descriptor && descriptor.enumerable;
  170. } : $propertyIsEnumerable;
  171. var createPropertyDescriptor$3 = function (bitmap, value) {
  172. return {
  173. enumerable: !(bitmap & 1),
  174. configurable: !(bitmap & 2),
  175. writable: !(bitmap & 4),
  176. value: value
  177. };
  178. };
  179. var NATIVE_BIND = functionBindNative;
  180. var FunctionPrototype$1 = Function.prototype;
  181. var call$4 = FunctionPrototype$1.call;
  182. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
  183. var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  184. return function () {
  185. return call$4.apply(fn, arguments);
  186. };
  187. };
  188. var uncurryThis$d = functionUncurryThis;
  189. var toString$4 = uncurryThis$d({}.toString);
  190. var stringSlice$1 = uncurryThis$d(''.slice);
  191. var classofRaw$1 = function (it) {
  192. return stringSlice$1(toString$4(it), 8, -1);
  193. };
  194. var uncurryThis$c = functionUncurryThis;
  195. var fails$a = fails$d;
  196. var classof$4 = classofRaw$1;
  197. var $Object$3 = Object;
  198. var split = uncurryThis$c(''.split);
  199. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  200. var indexedObject = fails$a(function () {
  201. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  202. // eslint-disable-next-line no-prototype-builtins -- safe
  203. return !$Object$3('z').propertyIsEnumerable(0);
  204. }) ? function (it) {
  205. return classof$4(it) === 'String' ? split(it, '') : $Object$3(it);
  206. } : $Object$3;
  207. // we can't use just `it == null` since of `document.all` special case
  208. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  209. var isNullOrUndefined$2 = function (it) {
  210. return it === null || it === undefined;
  211. };
  212. var isNullOrUndefined$1 = isNullOrUndefined$2;
  213. var $TypeError$6 = TypeError;
  214. // `RequireObjectCoercible` abstract operation
  215. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  216. var requireObjectCoercible$3 = function (it) {
  217. if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
  218. return it;
  219. };
  220. // toObject with fallback for non-array-like ES3 strings
  221. var IndexedObject$1 = indexedObject;
  222. var requireObjectCoercible$2 = requireObjectCoercible$3;
  223. var toIndexedObject$4 = function (it) {
  224. return IndexedObject$1(requireObjectCoercible$2(it));
  225. };
  226. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  227. var documentAll = typeof document == 'object' && document.all;
  228. // `IsCallable` abstract operation
  229. // https://tc39.es/ecma262/#sec-iscallable
  230. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  231. var isCallable$c = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  232. return typeof argument == 'function' || argument === documentAll;
  233. } : function (argument) {
  234. return typeof argument == 'function';
  235. };
  236. var isCallable$b = isCallable$c;
  237. var isObject$8 = function (it) {
  238. return typeof it == 'object' ? it !== null : isCallable$b(it);
  239. };
  240. var global$a = global$b;
  241. var isCallable$a = isCallable$c;
  242. var aFunction = function (argument) {
  243. return isCallable$a(argument) ? argument : undefined;
  244. };
  245. var getBuiltIn$3 = function (namespace, method) {
  246. return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
  247. };
  248. var uncurryThis$b = functionUncurryThis;
  249. var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
  250. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  251. var global$9 = global$b;
  252. var userAgent = engineUserAgent;
  253. var process = global$9.process;
  254. var Deno = global$9.Deno;
  255. var versions = process && process.versions || Deno && Deno.version;
  256. var v8 = versions && versions.v8;
  257. var match, version;
  258. if (v8) {
  259. match = v8.split('.');
  260. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  261. // but their correct versions are not interesting for us
  262. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  263. }
  264. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  265. // so check `userAgent` even if `.v8` exists, but 0
  266. if (!version && userAgent) {
  267. match = userAgent.match(/Edge\/(\d+)/);
  268. if (!match || match[1] >= 74) {
  269. match = userAgent.match(/Chrome\/(\d+)/);
  270. if (match) version = +match[1];
  271. }
  272. }
  273. var engineV8Version = version;
  274. /* eslint-disable es/no-symbol -- required for testing */
  275. var V8_VERSION$2 = engineV8Version;
  276. var fails$9 = fails$d;
  277. var global$8 = global$b;
  278. var $String$4 = global$8.String;
  279. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  280. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
  281. var symbol = Symbol('symbol detection');
  282. // Chrome 38 Symbol has incorrect toString conversion
  283. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  284. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  285. // of course, fail.
  286. return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
  287. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  288. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  289. });
  290. /* eslint-disable es/no-symbol -- required for testing */
  291. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  292. var useSymbolAsUid = NATIVE_SYMBOL$1
  293. && !Symbol.sham
  294. && typeof Symbol.iterator == 'symbol';
  295. var getBuiltIn$2 = getBuiltIn$3;
  296. var isCallable$9 = isCallable$c;
  297. var isPrototypeOf = objectIsPrototypeOf;
  298. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  299. var $Object$2 = Object;
  300. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  301. return typeof it == 'symbol';
  302. } : function (it) {
  303. var $Symbol = getBuiltIn$2('Symbol');
  304. return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  305. };
  306. var $String$3 = String;
  307. var tryToString$1 = function (argument) {
  308. try {
  309. return $String$3(argument);
  310. } catch (error) {
  311. return 'Object';
  312. }
  313. };
  314. var isCallable$8 = isCallable$c;
  315. var tryToString = tryToString$1;
  316. var $TypeError$5 = TypeError;
  317. // `Assert: IsCallable(argument) is true`
  318. var aCallable$1 = function (argument) {
  319. if (isCallable$8(argument)) return argument;
  320. throw new $TypeError$5(tryToString(argument) + ' is not a function');
  321. };
  322. var aCallable = aCallable$1;
  323. var isNullOrUndefined = isNullOrUndefined$2;
  324. // `GetMethod` abstract operation
  325. // https://tc39.es/ecma262/#sec-getmethod
  326. var getMethod$1 = function (V, P) {
  327. var func = V[P];
  328. return isNullOrUndefined(func) ? undefined : aCallable(func);
  329. };
  330. var call$3 = functionCall;
  331. var isCallable$7 = isCallable$c;
  332. var isObject$7 = isObject$8;
  333. var $TypeError$4 = TypeError;
  334. // `OrdinaryToPrimitive` abstract operation
  335. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  336. var ordinaryToPrimitive$1 = function (input, pref) {
  337. var fn, val;
  338. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$3(fn, input))) return val;
  339. if (isCallable$7(fn = input.valueOf) && !isObject$7(val = call$3(fn, input))) return val;
  340. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$3(fn, input))) return val;
  341. throw new $TypeError$4("Can't convert object to primitive value");
  342. };
  343. var sharedStore = {exports: {}};
  344. var global$7 = global$b;
  345. // eslint-disable-next-line es/no-object-defineproperty -- safe
  346. var defineProperty$2 = Object.defineProperty;
  347. var defineGlobalProperty$3 = function (key, value) {
  348. try {
  349. defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
  350. } catch (error) {
  351. global$7[key] = value;
  352. } return value;
  353. };
  354. var globalThis$1 = global$b;
  355. var defineGlobalProperty$2 = defineGlobalProperty$3;
  356. var SHARED = '__core-js_shared__';
  357. var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
  358. (store$3.versions || (store$3.versions = [])).push({
  359. version: '3.37.1',
  360. mode: 'global',
  361. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  362. license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
  363. source: 'https://github.com/zloirock/core-js'
  364. });
  365. var sharedStoreExports = sharedStore.exports;
  366. var store$2 = sharedStoreExports;
  367. var shared$3 = function (key, value) {
  368. return store$2[key] || (store$2[key] = value || {});
  369. };
  370. var requireObjectCoercible$1 = requireObjectCoercible$3;
  371. var $Object$1 = Object;
  372. // `ToObject` abstract operation
  373. // https://tc39.es/ecma262/#sec-toobject
  374. var toObject$3 = function (argument) {
  375. return $Object$1(requireObjectCoercible$1(argument));
  376. };
  377. var uncurryThis$a = functionUncurryThis;
  378. var toObject$2 = toObject$3;
  379. var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
  380. // `HasOwnProperty` abstract operation
  381. // https://tc39.es/ecma262/#sec-hasownproperty
  382. // eslint-disable-next-line es/no-object-hasown -- safe
  383. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  384. return hasOwnProperty(toObject$2(it), key);
  385. };
  386. var uncurryThis$9 = functionUncurryThis;
  387. var id = 0;
  388. var postfix = Math.random();
  389. var toString$3 = uncurryThis$9(1.0.toString);
  390. var uid$2 = function (key) {
  391. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
  392. };
  393. var global$6 = global$b;
  394. var shared$2 = shared$3;
  395. var hasOwn$6 = hasOwnProperty_1;
  396. var uid$1 = uid$2;
  397. var NATIVE_SYMBOL = symbolConstructorDetection;
  398. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  399. var Symbol$2 = global$6.Symbol;
  400. var WellKnownSymbolsStore = shared$2('wks');
  401. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  402. var wellKnownSymbol$7 = function (name) {
  403. if (!hasOwn$6(WellKnownSymbolsStore, name)) {
  404. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)
  405. ? Symbol$2[name]
  406. : createWellKnownSymbol('Symbol.' + name);
  407. } return WellKnownSymbolsStore[name];
  408. };
  409. var call$2 = functionCall;
  410. var isObject$6 = isObject$8;
  411. var isSymbol$1 = isSymbol$2;
  412. var getMethod = getMethod$1;
  413. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  414. var wellKnownSymbol$6 = wellKnownSymbol$7;
  415. var $TypeError$3 = TypeError;
  416. var TO_PRIMITIVE = wellKnownSymbol$6('toPrimitive');
  417. // `ToPrimitive` abstract operation
  418. // https://tc39.es/ecma262/#sec-toprimitive
  419. var toPrimitive$1 = function (input, pref) {
  420. if (!isObject$6(input) || isSymbol$1(input)) return input;
  421. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  422. var result;
  423. if (exoticToPrim) {
  424. if (pref === undefined) pref = 'default';
  425. result = call$2(exoticToPrim, input, pref);
  426. if (!isObject$6(result) || isSymbol$1(result)) return result;
  427. throw new $TypeError$3("Can't convert object to primitive value");
  428. }
  429. if (pref === undefined) pref = 'number';
  430. return ordinaryToPrimitive(input, pref);
  431. };
  432. var toPrimitive = toPrimitive$1;
  433. var isSymbol = isSymbol$2;
  434. // `ToPropertyKey` abstract operation
  435. // https://tc39.es/ecma262/#sec-topropertykey
  436. var toPropertyKey$2 = function (argument) {
  437. var key = toPrimitive(argument, 'string');
  438. return isSymbol(key) ? key : key + '';
  439. };
  440. var global$5 = global$b;
  441. var isObject$5 = isObject$8;
  442. var document$1 = global$5.document;
  443. // typeof document.createElement is 'object' in old IE
  444. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  445. var documentCreateElement = function (it) {
  446. return EXISTS$1 ? document$1.createElement(it) : {};
  447. };
  448. var DESCRIPTORS$8 = descriptors;
  449. var fails$8 = fails$d;
  450. var createElement = documentCreateElement;
  451. // Thanks to IE8 for its funny defineProperty
  452. var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
  453. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  454. return Object.defineProperty(createElement('div'), 'a', {
  455. get: function () { return 7; }
  456. }).a !== 7;
  457. });
  458. var DESCRIPTORS$7 = descriptors;
  459. var call$1 = functionCall;
  460. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  461. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  462. var toIndexedObject$3 = toIndexedObject$4;
  463. var toPropertyKey$1 = toPropertyKey$2;
  464. var hasOwn$5 = hasOwnProperty_1;
  465. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  466. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  467. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  468. // `Object.getOwnPropertyDescriptor` method
  469. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  470. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  471. O = toIndexedObject$3(O);
  472. P = toPropertyKey$1(P);
  473. if (IE8_DOM_DEFINE$1) try {
  474. return $getOwnPropertyDescriptor$1(O, P);
  475. } catch (error) { /* empty */ }
  476. if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
  477. };
  478. var objectDefineProperty = {};
  479. var DESCRIPTORS$6 = descriptors;
  480. var fails$7 = fails$d;
  481. // V8 ~ Chrome 36-
  482. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  483. var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$7(function () {
  484. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  485. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  486. value: 42,
  487. writable: false
  488. }).prototype !== 42;
  489. });
  490. var isObject$4 = isObject$8;
  491. var $String$2 = String;
  492. var $TypeError$2 = TypeError;
  493. // `Assert: Type(argument) is Object`
  494. var anObject$2 = function (argument) {
  495. if (isObject$4(argument)) return argument;
  496. throw new $TypeError$2($String$2(argument) + ' is not an object');
  497. };
  498. var DESCRIPTORS$5 = descriptors;
  499. var IE8_DOM_DEFINE = ie8DomDefine;
  500. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  501. var anObject$1 = anObject$2;
  502. var toPropertyKey = toPropertyKey$2;
  503. var $TypeError$1 = TypeError;
  504. // eslint-disable-next-line es/no-object-defineproperty -- safe
  505. var $defineProperty = Object.defineProperty;
  506. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  507. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  508. var ENUMERABLE = 'enumerable';
  509. var CONFIGURABLE$1 = 'configurable';
  510. var WRITABLE = 'writable';
  511. // `Object.defineProperty` method
  512. // https://tc39.es/ecma262/#sec-object.defineproperty
  513. objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  514. anObject$1(O);
  515. P = toPropertyKey(P);
  516. anObject$1(Attributes);
  517. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  518. var current = $getOwnPropertyDescriptor(O, P);
  519. if (current && current[WRITABLE]) {
  520. O[P] = Attributes.value;
  521. Attributes = {
  522. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  523. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  524. writable: false
  525. };
  526. }
  527. } return $defineProperty(O, P, Attributes);
  528. } : $defineProperty : function defineProperty(O, P, Attributes) {
  529. anObject$1(O);
  530. P = toPropertyKey(P);
  531. anObject$1(Attributes);
  532. if (IE8_DOM_DEFINE) try {
  533. return $defineProperty(O, P, Attributes);
  534. } catch (error) { /* empty */ }
  535. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
  536. if ('value' in Attributes) O[P] = Attributes.value;
  537. return O;
  538. };
  539. var DESCRIPTORS$4 = descriptors;
  540. var definePropertyModule$3 = objectDefineProperty;
  541. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  542. var createNonEnumerableProperty$2 = DESCRIPTORS$4 ? function (object, key, value) {
  543. return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
  544. } : function (object, key, value) {
  545. object[key] = value;
  546. return object;
  547. };
  548. var makeBuiltIn$2 = {exports: {}};
  549. var DESCRIPTORS$3 = descriptors;
  550. var hasOwn$4 = hasOwnProperty_1;
  551. var FunctionPrototype = Function.prototype;
  552. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  553. var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
  554. var EXISTS = hasOwn$4(FunctionPrototype, 'name');
  555. // additional protection from minified / mangled / dropped function names
  556. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  557. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
  558. var functionName = {
  559. EXISTS: EXISTS,
  560. PROPER: PROPER,
  561. CONFIGURABLE: CONFIGURABLE
  562. };
  563. var uncurryThis$8 = functionUncurryThis;
  564. var isCallable$6 = isCallable$c;
  565. var store$1 = sharedStoreExports;
  566. var functionToString = uncurryThis$8(Function.toString);
  567. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  568. if (!isCallable$6(store$1.inspectSource)) {
  569. store$1.inspectSource = function (it) {
  570. return functionToString(it);
  571. };
  572. }
  573. var inspectSource$2 = store$1.inspectSource;
  574. var global$4 = global$b;
  575. var isCallable$5 = isCallable$c;
  576. var WeakMap$1 = global$4.WeakMap;
  577. var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
  578. var shared$1 = shared$3;
  579. var uid = uid$2;
  580. var keys = shared$1('keys');
  581. var sharedKey$1 = function (key) {
  582. return keys[key] || (keys[key] = uid(key));
  583. };
  584. var hiddenKeys$3 = {};
  585. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  586. var global$3 = global$b;
  587. var isObject$3 = isObject$8;
  588. var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
  589. var hasOwn$3 = hasOwnProperty_1;
  590. var shared = sharedStoreExports;
  591. var sharedKey = sharedKey$1;
  592. var hiddenKeys$2 = hiddenKeys$3;
  593. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  594. var TypeError$1 = global$3.TypeError;
  595. var WeakMap = global$3.WeakMap;
  596. var set, get, has;
  597. var enforce = function (it) {
  598. return has(it) ? get(it) : set(it, {});
  599. };
  600. var getterFor = function (TYPE) {
  601. return function (it) {
  602. var state;
  603. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  604. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  605. } return state;
  606. };
  607. };
  608. if (NATIVE_WEAK_MAP || shared.state) {
  609. var store = shared.state || (shared.state = new WeakMap());
  610. /* eslint-disable no-self-assign -- prototype methods protection */
  611. store.get = store.get;
  612. store.has = store.has;
  613. store.set = store.set;
  614. /* eslint-enable no-self-assign -- prototype methods protection */
  615. set = function (it, metadata) {
  616. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  617. metadata.facade = it;
  618. store.set(it, metadata);
  619. return metadata;
  620. };
  621. get = function (it) {
  622. return store.get(it) || {};
  623. };
  624. has = function (it) {
  625. return store.has(it);
  626. };
  627. } else {
  628. var STATE = sharedKey('state');
  629. hiddenKeys$2[STATE] = true;
  630. set = function (it, metadata) {
  631. if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  632. metadata.facade = it;
  633. createNonEnumerableProperty$1(it, STATE, metadata);
  634. return metadata;
  635. };
  636. get = function (it) {
  637. return hasOwn$3(it, STATE) ? it[STATE] : {};
  638. };
  639. has = function (it) {
  640. return hasOwn$3(it, STATE);
  641. };
  642. }
  643. var internalState = {
  644. set: set,
  645. get: get,
  646. has: has,
  647. enforce: enforce,
  648. getterFor: getterFor
  649. };
  650. var uncurryThis$7 = functionUncurryThis;
  651. var fails$6 = fails$d;
  652. var isCallable$4 = isCallable$c;
  653. var hasOwn$2 = hasOwnProperty_1;
  654. var DESCRIPTORS$2 = descriptors;
  655. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  656. var inspectSource$1 = inspectSource$2;
  657. var InternalStateModule = internalState;
  658. var enforceInternalState = InternalStateModule.enforce;
  659. var getInternalState = InternalStateModule.get;
  660. var $String$1 = String;
  661. // eslint-disable-next-line es/no-object-defineproperty -- safe
  662. var defineProperty$1 = Object.defineProperty;
  663. var stringSlice = uncurryThis$7(''.slice);
  664. var replace$1 = uncurryThis$7(''.replace);
  665. var join = uncurryThis$7([].join);
  666. var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$6(function () {
  667. return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  668. });
  669. var TEMPLATE = String(String).split('String');
  670. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  671. if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
  672. name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  673. }
  674. if (options && options.getter) name = 'get ' + name;
  675. if (options && options.setter) name = 'set ' + name;
  676. if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  677. if (DESCRIPTORS$2) defineProperty$1(value, 'name', { value: name, configurable: true });
  678. else value.name = name;
  679. }
  680. if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
  681. defineProperty$1(value, 'length', { value: options.arity });
  682. }
  683. try {
  684. if (options && hasOwn$2(options, 'constructor') && options.constructor) {
  685. if (DESCRIPTORS$2) defineProperty$1(value, 'prototype', { writable: false });
  686. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  687. } else if (value.prototype) value.prototype = undefined;
  688. } catch (error) { /* empty */ }
  689. var state = enforceInternalState(value);
  690. if (!hasOwn$2(state, 'source')) {
  691. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  692. } return value;
  693. };
  694. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  695. // eslint-disable-next-line no-extend-native -- required
  696. Function.prototype.toString = makeBuiltIn$1(function toString() {
  697. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  698. }, 'toString');
  699. var makeBuiltInExports = makeBuiltIn$2.exports;
  700. var isCallable$3 = isCallable$c;
  701. var definePropertyModule$2 = objectDefineProperty;
  702. var makeBuiltIn = makeBuiltInExports;
  703. var defineGlobalProperty$1 = defineGlobalProperty$3;
  704. var defineBuiltIn$1 = function (O, key, value, options) {
  705. if (!options) options = {};
  706. var simple = options.enumerable;
  707. var name = options.name !== undefined ? options.name : key;
  708. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  709. if (options.global) {
  710. if (simple) O[key] = value;
  711. else defineGlobalProperty$1(key, value);
  712. } else {
  713. try {
  714. if (!options.unsafe) delete O[key];
  715. else if (O[key]) simple = true;
  716. } catch (error) { /* empty */ }
  717. if (simple) O[key] = value;
  718. else definePropertyModule$2.f(O, key, {
  719. value: value,
  720. enumerable: false,
  721. configurable: !options.nonConfigurable,
  722. writable: !options.nonWritable
  723. });
  724. } return O;
  725. };
  726. var objectGetOwnPropertyNames = {};
  727. var ceil = Math.ceil;
  728. var floor = Math.floor;
  729. // `Math.trunc` method
  730. // https://tc39.es/ecma262/#sec-math.trunc
  731. // eslint-disable-next-line es/no-math-trunc -- safe
  732. var mathTrunc = Math.trunc || function trunc(x) {
  733. var n = +x;
  734. return (n > 0 ? floor : ceil)(n);
  735. };
  736. var trunc = mathTrunc;
  737. // `ToIntegerOrInfinity` abstract operation
  738. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  739. var toIntegerOrInfinity$2 = function (argument) {
  740. var number = +argument;
  741. // eslint-disable-next-line no-self-compare -- NaN check
  742. return number !== number || number === 0 ? 0 : trunc(number);
  743. };
  744. var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
  745. var max$1 = Math.max;
  746. var min$1 = Math.min;
  747. // Helper for a popular repeating case of the spec:
  748. // Let integer be ? ToInteger(index).
  749. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  750. var toAbsoluteIndex$2 = function (index, length) {
  751. var integer = toIntegerOrInfinity$1(index);
  752. return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
  753. };
  754. var toIntegerOrInfinity = toIntegerOrInfinity$2;
  755. var min = Math.min;
  756. // `ToLength` abstract operation
  757. // https://tc39.es/ecma262/#sec-tolength
  758. var toLength$1 = function (argument) {
  759. var len = toIntegerOrInfinity(argument);
  760. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  761. };
  762. var toLength = toLength$1;
  763. // `LengthOfArrayLike` abstract operation
  764. // https://tc39.es/ecma262/#sec-lengthofarraylike
  765. var lengthOfArrayLike$3 = function (obj) {
  766. return toLength(obj.length);
  767. };
  768. var toIndexedObject$2 = toIndexedObject$4;
  769. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  770. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  771. // `Array.prototype.{ indexOf, includes }` methods implementation
  772. var createMethod$1 = function (IS_INCLUDES) {
  773. return function ($this, el, fromIndex) {
  774. var O = toIndexedObject$2($this);
  775. var length = lengthOfArrayLike$2(O);
  776. if (length === 0) return !IS_INCLUDES && -1;
  777. var index = toAbsoluteIndex$1(fromIndex, length);
  778. var value;
  779. // Array#includes uses SameValueZero equality algorithm
  780. // eslint-disable-next-line no-self-compare -- NaN check
  781. if (IS_INCLUDES && el !== el) while (length > index) {
  782. value = O[index++];
  783. // eslint-disable-next-line no-self-compare -- NaN check
  784. if (value !== value) return true;
  785. // Array#indexOf ignores holes, Array#includes - not
  786. } else for (;length > index; index++) {
  787. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  788. } return !IS_INCLUDES && -1;
  789. };
  790. };
  791. var arrayIncludes = {
  792. // `Array.prototype.includes` method
  793. // https://tc39.es/ecma262/#sec-array.prototype.includes
  794. includes: createMethod$1(true),
  795. // `Array.prototype.indexOf` method
  796. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  797. indexOf: createMethod$1(false)
  798. };
  799. var uncurryThis$6 = functionUncurryThis;
  800. var hasOwn$1 = hasOwnProperty_1;
  801. var toIndexedObject$1 = toIndexedObject$4;
  802. var indexOf = arrayIncludes.indexOf;
  803. var hiddenKeys$1 = hiddenKeys$3;
  804. var push = uncurryThis$6([].push);
  805. var objectKeysInternal = function (object, names) {
  806. var O = toIndexedObject$1(object);
  807. var i = 0;
  808. var result = [];
  809. var key;
  810. for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
  811. // Don't enum bug & hidden keys
  812. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  813. ~indexOf(result, key) || push(result, key);
  814. }
  815. return result;
  816. };
  817. // IE8- don't enum bug keys
  818. var enumBugKeys$2 = [
  819. 'constructor',
  820. 'hasOwnProperty',
  821. 'isPrototypeOf',
  822. 'propertyIsEnumerable',
  823. 'toLocaleString',
  824. 'toString',
  825. 'valueOf'
  826. ];
  827. var internalObjectKeys$1 = objectKeysInternal;
  828. var enumBugKeys$1 = enumBugKeys$2;
  829. var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
  830. // `Object.getOwnPropertyNames` method
  831. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  832. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  833. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  834. return internalObjectKeys$1(O, hiddenKeys);
  835. };
  836. var objectGetOwnPropertySymbols = {};
  837. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  838. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  839. var getBuiltIn$1 = getBuiltIn$3;
  840. var uncurryThis$5 = functionUncurryThis;
  841. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  842. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  843. var anObject = anObject$2;
  844. var concat$1 = uncurryThis$5([].concat);
  845. // all object keys, includes non-enumerable and symbols
  846. var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
  847. var keys = getOwnPropertyNamesModule.f(anObject(it));
  848. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  849. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  850. };
  851. var hasOwn = hasOwnProperty_1;
  852. var ownKeys = ownKeys$1;
  853. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  854. var definePropertyModule$1 = objectDefineProperty;
  855. var copyConstructorProperties$1 = function (target, source, exceptions) {
  856. var keys = ownKeys(source);
  857. var defineProperty = definePropertyModule$1.f;
  858. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  859. for (var i = 0; i < keys.length; i++) {
  860. var key = keys[i];
  861. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  862. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  863. }
  864. }
  865. };
  866. var fails$5 = fails$d;
  867. var isCallable$2 = isCallable$c;
  868. var replacement = /#|\.prototype\./;
  869. var isForced$1 = function (feature, detection) {
  870. var value = data[normalize(feature)];
  871. return value === POLYFILL ? true
  872. : value === NATIVE ? false
  873. : isCallable$2(detection) ? fails$5(detection)
  874. : !!detection;
  875. };
  876. var normalize = isForced$1.normalize = function (string) {
  877. return String(string).replace(replacement, '.').toLowerCase();
  878. };
  879. var data = isForced$1.data = {};
  880. var NATIVE = isForced$1.NATIVE = 'N';
  881. var POLYFILL = isForced$1.POLYFILL = 'P';
  882. var isForced_1 = isForced$1;
  883. var global$2 = global$b;
  884. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  885. var createNonEnumerableProperty = createNonEnumerableProperty$2;
  886. var defineBuiltIn = defineBuiltIn$1;
  887. var defineGlobalProperty = defineGlobalProperty$3;
  888. var copyConstructorProperties = copyConstructorProperties$1;
  889. var isForced = isForced_1;
  890. /*
  891. options.target - name of the target object
  892. options.global - target is the global object
  893. options.stat - export as static methods of target
  894. options.proto - export as prototype methods of target
  895. options.real - real prototype method for the `pure` version
  896. options.forced - export even if the native feature is available
  897. options.bind - bind methods to the target, required for the `pure` version
  898. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  899. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  900. options.sham - add a flag to not completely full polyfills
  901. options.enumerable - export as enumerable property
  902. options.dontCallGetSet - prevent calling a getter on target
  903. options.name - the .name of the function if it does not match the key
  904. */
  905. var _export = function (options, source) {
  906. var TARGET = options.target;
  907. var GLOBAL = options.global;
  908. var STATIC = options.stat;
  909. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  910. if (GLOBAL) {
  911. target = global$2;
  912. } else if (STATIC) {
  913. target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
  914. } else {
  915. target = global$2[TARGET] && global$2[TARGET].prototype;
  916. }
  917. if (target) for (key in source) {
  918. sourceProperty = source[key];
  919. if (options.dontCallGetSet) {
  920. descriptor = getOwnPropertyDescriptor(target, key);
  921. targetProperty = descriptor && descriptor.value;
  922. } else targetProperty = target[key];
  923. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  924. // contained in target
  925. if (!FORCED && targetProperty !== undefined) {
  926. if (typeof sourceProperty == typeof targetProperty) continue;
  927. copyConstructorProperties(sourceProperty, targetProperty);
  928. }
  929. // add a flag to not completely full polyfills
  930. if (options.sham || (targetProperty && targetProperty.sham)) {
  931. createNonEnumerableProperty(sourceProperty, 'sham', true);
  932. }
  933. defineBuiltIn(target, key, sourceProperty, options);
  934. }
  935. };
  936. var classof$3 = classofRaw$1;
  937. // `IsArray` abstract operation
  938. // https://tc39.es/ecma262/#sec-isarray
  939. // eslint-disable-next-line es/no-array-isarray -- safe
  940. var isArray$3 = Array.isArray || function isArray(argument) {
  941. return classof$3(argument) === 'Array';
  942. };
  943. var $TypeError = TypeError;
  944. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  945. var doesNotExceedSafeInteger$1 = function (it) {
  946. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  947. return it;
  948. };
  949. var DESCRIPTORS$1 = descriptors;
  950. var definePropertyModule = objectDefineProperty;
  951. var createPropertyDescriptor = createPropertyDescriptor$3;
  952. var createProperty$2 = function (object, key, value) {
  953. if (DESCRIPTORS$1) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  954. else object[key] = value;
  955. };
  956. var wellKnownSymbol$5 = wellKnownSymbol$7;
  957. var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
  958. var test = {};
  959. test[TO_STRING_TAG$1] = 'z';
  960. var toStringTagSupport = String(test) === '[object z]';
  961. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  962. var isCallable$1 = isCallable$c;
  963. var classofRaw = classofRaw$1;
  964. var wellKnownSymbol$4 = wellKnownSymbol$7;
  965. var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
  966. var $Object = Object;
  967. // ES3 wrong here
  968. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
  969. // fallback for IE11 Script Access Denied error
  970. var tryGet = function (it, key) {
  971. try {
  972. return it[key];
  973. } catch (error) { /* empty */ }
  974. };
  975. // getting tag from ES6+ `Object.prototype.toString`
  976. var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  977. var O, tag, result;
  978. return it === undefined ? 'Undefined' : it === null ? 'Null'
  979. // @@toStringTag case
  980. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  981. // builtinTag case
  982. : CORRECT_ARGUMENTS ? classofRaw(O)
  983. // ES3 arguments fallback
  984. : (result = classofRaw(O)) === 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  985. };
  986. var uncurryThis$4 = functionUncurryThis;
  987. var fails$4 = fails$d;
  988. var isCallable = isCallable$c;
  989. var classof$1 = classof$2;
  990. var getBuiltIn = getBuiltIn$3;
  991. var inspectSource = inspectSource$2;
  992. var noop = function () { /* empty */ };
  993. var construct = getBuiltIn('Reflect', 'construct');
  994. var constructorRegExp = /^\s*(?:class|function)\b/;
  995. var exec$1 = uncurryThis$4(constructorRegExp.exec);
  996. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  997. var isConstructorModern = function isConstructor(argument) {
  998. if (!isCallable(argument)) return false;
  999. try {
  1000. construct(noop, [], argument);
  1001. return true;
  1002. } catch (error) {
  1003. return false;
  1004. }
  1005. };
  1006. var isConstructorLegacy = function isConstructor(argument) {
  1007. if (!isCallable(argument)) return false;
  1008. switch (classof$1(argument)) {
  1009. case 'AsyncFunction':
  1010. case 'GeneratorFunction':
  1011. case 'AsyncGeneratorFunction': return false;
  1012. }
  1013. try {
  1014. // we can't check .prototype since constructors produced by .bind haven't it
  1015. // `Function#toString` throws on some built-it function in some legacy engines
  1016. // (for example, `DOMQuad` and similar in FF41-)
  1017. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  1018. } catch (error) {
  1019. return true;
  1020. }
  1021. };
  1022. isConstructorLegacy.sham = true;
  1023. // `IsConstructor` abstract operation
  1024. // https://tc39.es/ecma262/#sec-isconstructor
  1025. var isConstructor$2 = !construct || fails$4(function () {
  1026. var called;
  1027. return isConstructorModern(isConstructorModern.call)
  1028. || !isConstructorModern(Object)
  1029. || !isConstructorModern(function () { called = true; })
  1030. || called;
  1031. }) ? isConstructorLegacy : isConstructorModern;
  1032. var isArray$2 = isArray$3;
  1033. var isConstructor$1 = isConstructor$2;
  1034. var isObject$2 = isObject$8;
  1035. var wellKnownSymbol$3 = wellKnownSymbol$7;
  1036. var SPECIES$2 = wellKnownSymbol$3('species');
  1037. var $Array$1 = Array;
  1038. // a part of `ArraySpeciesCreate` abstract operation
  1039. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1040. var arraySpeciesConstructor$1 = function (originalArray) {
  1041. var C;
  1042. if (isArray$2(originalArray)) {
  1043. C = originalArray.constructor;
  1044. // cross-realm fallback
  1045. if (isConstructor$1(C) && (C === $Array$1 || isArray$2(C.prototype))) C = undefined;
  1046. else if (isObject$2(C)) {
  1047. C = C[SPECIES$2];
  1048. if (C === null) C = undefined;
  1049. }
  1050. } return C === undefined ? $Array$1 : C;
  1051. };
  1052. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1053. // `ArraySpeciesCreate` abstract operation
  1054. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1055. var arraySpeciesCreate$1 = function (originalArray, length) {
  1056. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1057. };
  1058. var fails$3 = fails$d;
  1059. var wellKnownSymbol$2 = wellKnownSymbol$7;
  1060. var V8_VERSION$1 = engineV8Version;
  1061. var SPECIES$1 = wellKnownSymbol$2('species');
  1062. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1063. // We can't use this feature detection in V8 since it causes
  1064. // deoptimization and serious performance degradation
  1065. // https://github.com/zloirock/core-js/issues/677
  1066. return V8_VERSION$1 >= 51 || !fails$3(function () {
  1067. var array = [];
  1068. var constructor = array.constructor = {};
  1069. constructor[SPECIES$1] = function () {
  1070. return { foo: 1 };
  1071. };
  1072. return array[METHOD_NAME](Boolean).foo !== 1;
  1073. });
  1074. };
  1075. var $$3 = _export;
  1076. var fails$2 = fails$d;
  1077. var isArray$1 = isArray$3;
  1078. var isObject$1 = isObject$8;
  1079. var toObject$1 = toObject$3;
  1080. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1081. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1082. var createProperty$1 = createProperty$2;
  1083. var arraySpeciesCreate = arraySpeciesCreate$1;
  1084. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1085. var wellKnownSymbol$1 = wellKnownSymbol$7;
  1086. var V8_VERSION = engineV8Version;
  1087. var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable');
  1088. // We can't use this feature detection in V8 since it causes
  1089. // deoptimization and serious performance degradation
  1090. // https://github.com/zloirock/core-js/issues/679
  1091. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$2(function () {
  1092. var array = [];
  1093. array[IS_CONCAT_SPREADABLE] = false;
  1094. return array.concat()[0] !== array;
  1095. });
  1096. var isConcatSpreadable = function (O) {
  1097. if (!isObject$1(O)) return false;
  1098. var spreadable = O[IS_CONCAT_SPREADABLE];
  1099. return spreadable !== undefined ? !!spreadable : isArray$1(O);
  1100. };
  1101. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$1('concat');
  1102. // `Array.prototype.concat` method
  1103. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1104. // with adding support of @@isConcatSpreadable and @@species
  1105. $$3({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  1106. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1107. concat: function concat(arg) {
  1108. var O = toObject$1(this);
  1109. var A = arraySpeciesCreate(O, 0);
  1110. var n = 0;
  1111. var i, k, length, len, E;
  1112. for (i = -1, length = arguments.length; i < length; i++) {
  1113. E = i === -1 ? O : arguments[i];
  1114. if (isConcatSpreadable(E)) {
  1115. len = lengthOfArrayLike$1(E);
  1116. doesNotExceedSafeInteger(n + len);
  1117. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1118. } else {
  1119. doesNotExceedSafeInteger(n + 1);
  1120. createProperty$1(A, n++, E);
  1121. }
  1122. }
  1123. A.length = n;
  1124. return A;
  1125. }
  1126. });
  1127. var uncurryThis$3 = functionUncurryThis;
  1128. var arraySlice = uncurryThis$3([].slice);
  1129. var $$2 = _export;
  1130. var isArray = isArray$3;
  1131. var isConstructor = isConstructor$2;
  1132. var isObject = isObject$8;
  1133. var toAbsoluteIndex = toAbsoluteIndex$2;
  1134. var lengthOfArrayLike = lengthOfArrayLike$3;
  1135. var toIndexedObject = toIndexedObject$4;
  1136. var createProperty = createProperty$2;
  1137. var wellKnownSymbol = wellKnownSymbol$7;
  1138. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1139. var nativeSlice = arraySlice;
  1140. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  1141. var SPECIES = wellKnownSymbol('species');
  1142. var $Array = Array;
  1143. var max = Math.max;
  1144. // `Array.prototype.slice` method
  1145. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1146. // fallback for not array-like ES3 strings and DOM objects
  1147. $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1148. slice: function slice(start, end) {
  1149. var O = toIndexedObject(this);
  1150. var length = lengthOfArrayLike(O);
  1151. var k = toAbsoluteIndex(start, length);
  1152. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1153. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1154. var Constructor, result, n;
  1155. if (isArray(O)) {
  1156. Constructor = O.constructor;
  1157. // cross-realm fallback
  1158. if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
  1159. Constructor = undefined;
  1160. } else if (isObject(Constructor)) {
  1161. Constructor = Constructor[SPECIES];
  1162. if (Constructor === null) Constructor = undefined;
  1163. }
  1164. if (Constructor === $Array || Constructor === undefined) {
  1165. return nativeSlice(O, k, fin);
  1166. }
  1167. }
  1168. result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
  1169. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  1170. result.length = n;
  1171. return result;
  1172. }
  1173. });
  1174. var internalObjectKeys = objectKeysInternal;
  1175. var enumBugKeys = enumBugKeys$2;
  1176. // `Object.keys` method
  1177. // https://tc39.es/ecma262/#sec-object.keys
  1178. // eslint-disable-next-line es/no-object-keys -- safe
  1179. var objectKeys$1 = Object.keys || function keys(O) {
  1180. return internalObjectKeys(O, enumBugKeys);
  1181. };
  1182. var DESCRIPTORS = descriptors;
  1183. var uncurryThis$2 = functionUncurryThis;
  1184. var call = functionCall;
  1185. var fails$1 = fails$d;
  1186. var objectKeys = objectKeys$1;
  1187. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1188. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1189. var toObject = toObject$3;
  1190. var IndexedObject = indexedObject;
  1191. // eslint-disable-next-line es/no-object-assign -- safe
  1192. var $assign = Object.assign;
  1193. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1194. var defineProperty = Object.defineProperty;
  1195. var concat = uncurryThis$2([].concat);
  1196. // `Object.assign` method
  1197. // https://tc39.es/ecma262/#sec-object.assign
  1198. var objectAssign = !$assign || fails$1(function () {
  1199. // should have correct order of operations (Edge bug)
  1200. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1201. enumerable: true,
  1202. get: function () {
  1203. defineProperty(this, 'b', {
  1204. value: 3,
  1205. enumerable: false
  1206. });
  1207. }
  1208. }), { b: 2 })).b !== 1) return true;
  1209. // should work with symbols and should have deterministic property order (V8 bug)
  1210. var A = {};
  1211. var B = {};
  1212. // eslint-disable-next-line es/no-symbol -- safe
  1213. var symbol = Symbol('assign detection');
  1214. var alphabet = 'abcdefghijklmnopqrst';
  1215. A[symbol] = 7;
  1216. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1217. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  1218. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1219. var T = toObject(target);
  1220. var argumentsLength = arguments.length;
  1221. var index = 1;
  1222. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1223. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1224. while (argumentsLength > index) {
  1225. var S = IndexedObject(arguments[index++]);
  1226. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1227. var length = keys.length;
  1228. var j = 0;
  1229. var key;
  1230. while (length > j) {
  1231. key = keys[j++];
  1232. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  1233. }
  1234. } return T;
  1235. } : $assign;
  1236. var $$1 = _export;
  1237. var assign = objectAssign;
  1238. // `Object.assign` method
  1239. // https://tc39.es/ecma262/#sec-object.assign
  1240. // eslint-disable-next-line es/no-object-assign -- required for testing
  1241. $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1242. assign: assign
  1243. });
  1244. var classof = classof$2;
  1245. var $String = String;
  1246. var toString$2 = function (argument) {
  1247. if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1248. return $String(argument);
  1249. };
  1250. // a string of all valid unicode whitespaces
  1251. var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1252. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1253. var uncurryThis$1 = functionUncurryThis;
  1254. var requireObjectCoercible = requireObjectCoercible$3;
  1255. var toString$1 = toString$2;
  1256. var whitespaces$1 = whitespaces$2;
  1257. var replace = uncurryThis$1(''.replace);
  1258. var ltrim = RegExp('^[' + whitespaces$1 + ']+');
  1259. var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
  1260. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1261. var createMethod = function (TYPE) {
  1262. return function ($this) {
  1263. var string = toString$1(requireObjectCoercible($this));
  1264. if (TYPE & 1) string = replace(string, ltrim, '');
  1265. if (TYPE & 2) string = replace(string, rtrim, '$1');
  1266. return string;
  1267. };
  1268. };
  1269. var stringTrim = {
  1270. // `String.prototype.{ trimLeft, trimStart }` methods
  1271. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1272. start: createMethod(1),
  1273. // `String.prototype.{ trimRight, trimEnd }` methods
  1274. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1275. end: createMethod(2),
  1276. // `String.prototype.trim` method
  1277. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1278. trim: createMethod(3)
  1279. };
  1280. var global$1 = global$b;
  1281. var fails = fails$d;
  1282. var uncurryThis = functionUncurryThis;
  1283. var toString = toString$2;
  1284. var trim = stringTrim.trim;
  1285. var whitespaces = whitespaces$2;
  1286. var $parseInt$1 = global$1.parseInt;
  1287. var Symbol$1 = global$1.Symbol;
  1288. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1289. var hex = /^[+-]?0x/i;
  1290. var exec = uncurryThis(hex.exec);
  1291. var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
  1292. // MS Edge 18- broken with boxed symbols
  1293. || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
  1294. // `parseInt` method
  1295. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1296. var numberParseInt = FORCED ? function parseInt(string, radix) {
  1297. var S = trim(toString(string));
  1298. return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  1299. } : $parseInt$1;
  1300. var $ = _export;
  1301. var $parseInt = numberParseInt;
  1302. // `parseInt` method
  1303. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1304. $({ global: true, forced: parseInt !== $parseInt }, {
  1305. parseInt: $parseInt
  1306. });
  1307. /**
  1308. * @author doug-the-guy
  1309. * @update zhixin wen <wenzhixin2010@gmail.com>
  1310. *
  1311. * Bootstrap Table Pipeline
  1312. * -----------------------
  1313. *
  1314. * This plugin enables client side data caching for server side requests which will
  1315. * eliminate the need to issue a new request every page change. This will allow
  1316. * for a performance balance for a large data set between returning all data at once
  1317. * (client side paging) and a new server side request (server side paging).
  1318. *
  1319. * There are two new options:
  1320. * - usePipeline: enables this feature
  1321. * - pipelineSize: the size of each cache window
  1322. *
  1323. * The size of the pipeline must be evenly divisible by the current page size. This is
  1324. * assured by rounding up to the nearest evenly divisible value. For example, if
  1325. * the pipeline size is 4990 and the current page size is 25, then pipeline size will
  1326. * be dynamically set to 5000.
  1327. *
  1328. * The cache windows are computed based on the pipeline size and the total number of rows
  1329. * returned by the server side query. For example, with pipeline size 500 and total rows
  1330. * 1300, the cache windows will be:
  1331. *
  1332. * [{'lower': 0, 'upper': 499}, {'lower': 500, 'upper': 999}, {'lower': 1000, 'upper': 1499}]
  1333. *
  1334. * Using the limit (i.e. the pipelineSize) and offset parameters, the server side request
  1335. * **MUST** return only the data in the requested cache window **AND** the total number of rows.
  1336. * To wit, the server side code must use the offset and limit parameters to prepare the response
  1337. * data.
  1338. *
  1339. * On a page change, the new offset is checked if it is within the current cache window. If so,
  1340. * the requested page data is returned from the cached data set. Otherwise, a new server side
  1341. * request will be issued for the new cache window.
  1342. *
  1343. * The current cached data is only invalidated on these events:
  1344. * * sorting
  1345. * * searching
  1346. * * page size change
  1347. * * page change moves into a new cache window
  1348. *
  1349. * There are two new events:
  1350. * - cached-data-hit.bs.table: issued when cached data is used on a page change
  1351. * - cached-data-reset.bs.table: issued when the cached data is invalidated and a
  1352. * new server side request is issued
  1353. *
  1354. **/
  1355. var Utils = $$4.fn.bootstrapTable.utils;
  1356. Object.assign($$4.fn.bootstrapTable.defaults, {
  1357. usePipeline: false,
  1358. pipelineSize: 1000,
  1359. // eslint-disable-next-line no-unused-vars
  1360. onCachedDataHit: function onCachedDataHit(data) {
  1361. return false;
  1362. },
  1363. // eslint-disable-next-line no-unused-vars
  1364. onCachedDataReset: function onCachedDataReset(data) {
  1365. return false;
  1366. }
  1367. });
  1368. Object.assign($$4.fn.bootstrapTable.events, {
  1369. 'cached-data-hit.bs.table': 'onCachedDataHit',
  1370. 'cached-data-reset.bs.table': 'onCachedDataReset'
  1371. });
  1372. $$4.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1373. function _class() {
  1374. _classCallCheck(this, _class);
  1375. return _callSuper(this, _class, arguments);
  1376. }
  1377. _inherits(_class, _$$BootstrapTable);
  1378. return _createClass(_class, [{
  1379. key: "init",
  1380. value:
  1381. // needs to be called before initServer
  1382. function init() {
  1383. var _get2;
  1384. if (this.options.usePipeline) {
  1385. this.initPipeline();
  1386. }
  1387. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1388. args[_key] = arguments[_key];
  1389. }
  1390. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1391. }
  1392. }, {
  1393. key: "initPipeline",
  1394. value: function initPipeline() {
  1395. this.cacheRequestJSON = {};
  1396. this.cacheWindows = [];
  1397. this.currWindow = 0;
  1398. this.resetCache = true;
  1399. }
  1400. // force a cache reset on search
  1401. }, {
  1402. key: "onSearch",
  1403. value: function onSearch() {
  1404. var _get3;
  1405. if (this.options.usePipeline) {
  1406. this.resetCache = true;
  1407. }
  1408. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1409. args[_key2] = arguments[_key2];
  1410. }
  1411. (_get3 = _get(_getPrototypeOf(_class.prototype), "onSearch", this)).call.apply(_get3, [this].concat(args));
  1412. }
  1413. // force a cache reset on sort
  1414. }, {
  1415. key: "onSort",
  1416. value: function onSort() {
  1417. var _get4;
  1418. if (this.options.usePipeline) {
  1419. this.resetCache = true;
  1420. }
  1421. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1422. args[_key3] = arguments[_key3];
  1423. }
  1424. (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
  1425. }
  1426. // rebuild cache window on page size change
  1427. }, {
  1428. key: "onPageListChange",
  1429. value: function onPageListChange(event) {
  1430. var target = $$4(event.currentTarget);
  1431. var newPageSize = parseInt(target.text(), 10);
  1432. this.options.pipelineSize = this.calculatePipelineSize(this.options.pipelineSize, newPageSize);
  1433. this.resetCache = true;
  1434. _get(_getPrototypeOf(_class.prototype), "onPageListChange", this).call(this, event);
  1435. }
  1436. // calculate pipeline size by rounding up to
  1437. // the nearest value evenly divisible by the pageSize
  1438. }, {
  1439. key: "calculatePipelineSize",
  1440. value: function calculatePipelineSize(pipelineSize, pageSize) {
  1441. if (pageSize === 0) {
  1442. return 0;
  1443. }
  1444. return Math.ceil(pipelineSize / pageSize) * pageSize;
  1445. }
  1446. // set cache windows based on the total number of rows returned
  1447. // by server side request and the pipelineSize
  1448. }, {
  1449. key: "setCacheWindows",
  1450. value: function setCacheWindows() {
  1451. this.cacheWindows = [];
  1452. for (var i = 0; i <= this.options.totalRows / this.options.pipelineSize; i++) {
  1453. var lower = i * this.options.pipelineSize;
  1454. this.cacheWindows[i] = {
  1455. lower: lower,
  1456. upper: lower + this.options.pipelineSize - 1
  1457. };
  1458. }
  1459. }
  1460. // set the current cache window index, based on where the current offset falls
  1461. }, {
  1462. key: "setCurrWindow",
  1463. value: function setCurrWindow(offset) {
  1464. this.currWindow = 0;
  1465. for (var i = 0; i < this.cacheWindows.length; i++) {
  1466. if (this.cacheWindows[i].lower <= offset && offset <= this.cacheWindows[i].upper) {
  1467. this.currWindow = i;
  1468. break;
  1469. }
  1470. }
  1471. }
  1472. // draw rows from the cache using offset and limit
  1473. }, {
  1474. key: "drawFromCache",
  1475. value: function drawFromCache(offset, limit) {
  1476. var res = Utils.extend(true, {}, this.cacheRequestJSON);
  1477. var drawStart = offset - this.cacheWindows[this.currWindow].lower;
  1478. var drawEnd = drawStart + limit;
  1479. res.rows = res.rows.slice(drawStart, drawEnd);
  1480. return res;
  1481. }
  1482. /*
  1483. * determine if requested data is in cache (on paging) or if
  1484. * a new ajax request needs to be issued (sorting, searching, paging
  1485. * moving outside of cached data, page size change)
  1486. * initial version of this extension will entirely override base initServer
  1487. */
  1488. }, {
  1489. key: "initServer",
  1490. value: function initServer(silent, query, url) {
  1491. var _this = this;
  1492. if (!this.options.usePipeline) {
  1493. return _get(_getPrototypeOf(_class.prototype), "initServer", this).call(this, silent, query, url);
  1494. }
  1495. var useAjax = true;
  1496. var params = {};
  1497. if (this.options.queryParamsType === 'limit' && this.options.pagination && this.options.sidePagination === 'server') {
  1498. // same as parent initServer: params.offset
  1499. params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1);
  1500. params.limit = this.options.pageSize;
  1501. // if cacheWindows is empty, this is the initial request
  1502. if (!this.cacheWindows.length) {
  1503. useAjax = true;
  1504. params.drawOffset = params.offset;
  1505. // cache exists: determine if the page request is entirely within the current cached window
  1506. } else {
  1507. var w = this.cacheWindows[this.currWindow];
  1508. // case 1: reset cache but stay within current window (e.g. column sort)
  1509. // case 2: move outside of the current window (e.g. search or paging)
  1510. // since each cache window is aligned with the current page size
  1511. // checking if params.offset is outside the current window is sufficient.
  1512. // need to re-query for preceding or succeeding cache window
  1513. // also handle case
  1514. if (this.resetCache || params.offset < w.lower || params.offset > w.upper) {
  1515. useAjax = true;
  1516. this.setCurrWindow(params.offset);
  1517. // store the relative offset for drawing the page data afterwards
  1518. params.drawOffset = params.offset;
  1519. // now set params.offset to the lower bound of the new cache window
  1520. // the server will return that whole cache window
  1521. params.offset = this.cacheWindows[this.currWindow].lower;
  1522. // within current cache window
  1523. } else {
  1524. useAjax = false;
  1525. }
  1526. }
  1527. }
  1528. // force an ajax call - this is on search, sort or page size change
  1529. if (this.resetCache) {
  1530. useAjax = true;
  1531. this.resetCache = false;
  1532. }
  1533. if (useAjax) {
  1534. // in this scenario limit is used on the server to get the cache window
  1535. // and drawLimit is used to get the page data afterwards
  1536. params.drawLimit = params.limit;
  1537. params.limit = this.options.pipelineSize;
  1538. }
  1539. // cached results can be used
  1540. if (!useAjax) {
  1541. var res = this.drawFromCache(params.offset, params.limit);
  1542. this.load(res);
  1543. this.trigger('load-success', res);
  1544. this.trigger('cached-data-hit', res);
  1545. return;
  1546. }
  1547. if (!this.pipelineResponseHandler) {
  1548. this.pipelineResponseHandler = this.options.responseHandler;
  1549. this.options.responseHandler = function (_res, jqXHR) {
  1550. var res = Utils.calculateObjectValue(_this.options, _this.pipelineResponseHandler, [_res, jqXHR], _res);
  1551. // store entire request in cache
  1552. _this.cacheRequestJSON = Utils.extend(true, {}, res);
  1553. // this gets set in load() also but needs to be set before
  1554. // setting cacheWindows
  1555. _this.options.totalRows = res[_this.options.totalField];
  1556. // if this is a search, potentially less results will be returned
  1557. // so cache windows need to be rebuilt. Otherwise it
  1558. // will come out the same
  1559. _this.setCacheWindows();
  1560. // just load data for the page
  1561. res = _this.drawFromCache(params.drawOffset, params.drawLimit);
  1562. _this.trigger('cached-data-reset', res);
  1563. return res;
  1564. };
  1565. }
  1566. return _get(_getPrototypeOf(_class.prototype), "initServer", this).call(this, silent, _objectSpread2(_objectSpread2({}, query), params), url);
  1567. }
  1568. }, {
  1569. key: "destroy",
  1570. value: function destroy() {
  1571. var _get5;
  1572. this.options.responseHandler = this.pipelineResponseHandler;
  1573. this.pipelineResponseHandler = null;
  1574. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1575. args[_key4] = arguments[_key4];
  1576. }
  1577. (_get5 = _get(_getPrototypeOf(_class.prototype), "destroy", this)).call.apply(_get5, [this].concat(args));
  1578. }
  1579. }]);
  1580. }($$4.BootstrapTable);
  1581. }));