bootstrap-table-pipeline.js 60 KB

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