bootstrap-table-auto-refresh.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  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 = global || self, factory(global.jQuery));
  5. }(this, function ($) { 'use strict';
  6. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  8. function createCommonjsModule(fn, module) {
  9. return module = { exports: {} }, fn(module, module.exports), module.exports;
  10. }
  11. var O = 'object';
  12. var check = function (it) {
  13. return it && it.Math == Math && it;
  14. };
  15. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  16. var global_1 =
  17. // eslint-disable-next-line no-undef
  18. check(typeof globalThis == O && globalThis) ||
  19. check(typeof window == O && window) ||
  20. check(typeof self == O && self) ||
  21. check(typeof commonjsGlobal == O && commonjsGlobal) ||
  22. // eslint-disable-next-line no-new-func
  23. Function('return this')();
  24. var fails = function (exec) {
  25. try {
  26. return !!exec();
  27. } catch (error) {
  28. return true;
  29. }
  30. };
  31. // Thank's IE8 for his funny defineProperty
  32. var descriptors = !fails(function () {
  33. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  34. });
  35. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  36. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  37. // Nashorn ~ JDK8 bug
  38. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  39. // `Object.prototype.propertyIsEnumerable` method implementation
  40. // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
  41. var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  42. var descriptor = getOwnPropertyDescriptor(this, V);
  43. return !!descriptor && descriptor.enumerable;
  44. } : nativePropertyIsEnumerable;
  45. var objectPropertyIsEnumerable = {
  46. f: f
  47. };
  48. var createPropertyDescriptor = function (bitmap, value) {
  49. return {
  50. enumerable: !(bitmap & 1),
  51. configurable: !(bitmap & 2),
  52. writable: !(bitmap & 4),
  53. value: value
  54. };
  55. };
  56. var toString = {}.toString;
  57. var classofRaw = function (it) {
  58. return toString.call(it).slice(8, -1);
  59. };
  60. var split = ''.split;
  61. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  62. var indexedObject = fails(function () {
  63. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  64. // eslint-disable-next-line no-prototype-builtins
  65. return !Object('z').propertyIsEnumerable(0);
  66. }) ? function (it) {
  67. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  68. } : Object;
  69. // `RequireObjectCoercible` abstract operation
  70. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  71. var requireObjectCoercible = function (it) {
  72. if (it == undefined) throw TypeError("Can't call method on " + it);
  73. return it;
  74. };
  75. // toObject with fallback for non-array-like ES3 strings
  76. var toIndexedObject = function (it) {
  77. return indexedObject(requireObjectCoercible(it));
  78. };
  79. var isObject = function (it) {
  80. return typeof it === 'object' ? it !== null : typeof it === 'function';
  81. };
  82. // `ToPrimitive` abstract operation
  83. // https://tc39.github.io/ecma262/#sec-toprimitive
  84. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  85. // and the second argument - flag - preferred type is a string
  86. var toPrimitive = function (input, PREFERRED_STRING) {
  87. if (!isObject(input)) return input;
  88. var fn, val;
  89. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  90. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  91. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  92. throw TypeError("Can't convert object to primitive value");
  93. };
  94. var hasOwnProperty = {}.hasOwnProperty;
  95. var has = function (it, key) {
  96. return hasOwnProperty.call(it, key);
  97. };
  98. var document = global_1.document;
  99. // typeof document.createElement is 'object' in old IE
  100. var EXISTS = isObject(document) && isObject(document.createElement);
  101. var documentCreateElement = function (it) {
  102. return EXISTS ? document.createElement(it) : {};
  103. };
  104. // Thank's IE8 for his funny defineProperty
  105. var ie8DomDefine = !descriptors && !fails(function () {
  106. return Object.defineProperty(documentCreateElement('div'), 'a', {
  107. get: function () { return 7; }
  108. }).a != 7;
  109. });
  110. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  111. // `Object.getOwnPropertyDescriptor` method
  112. // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
  113. var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  114. O = toIndexedObject(O);
  115. P = toPrimitive(P, true);
  116. if (ie8DomDefine) try {
  117. return nativeGetOwnPropertyDescriptor(O, P);
  118. } catch (error) { /* empty */ }
  119. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  120. };
  121. var objectGetOwnPropertyDescriptor = {
  122. f: f$1
  123. };
  124. var anObject = function (it) {
  125. if (!isObject(it)) {
  126. throw TypeError(String(it) + ' is not an object');
  127. } return it;
  128. };
  129. var nativeDefineProperty = Object.defineProperty;
  130. // `Object.defineProperty` method
  131. // https://tc39.github.io/ecma262/#sec-object.defineproperty
  132. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  133. anObject(O);
  134. P = toPrimitive(P, true);
  135. anObject(Attributes);
  136. if (ie8DomDefine) try {
  137. return nativeDefineProperty(O, P, Attributes);
  138. } catch (error) { /* empty */ }
  139. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  140. if ('value' in Attributes) O[P] = Attributes.value;
  141. return O;
  142. };
  143. var objectDefineProperty = {
  144. f: f$2
  145. };
  146. var hide = descriptors ? function (object, key, value) {
  147. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  148. } : function (object, key, value) {
  149. object[key] = value;
  150. return object;
  151. };
  152. var setGlobal = function (key, value) {
  153. try {
  154. hide(global_1, key, value);
  155. } catch (error) {
  156. global_1[key] = value;
  157. } return value;
  158. };
  159. var shared = createCommonjsModule(function (module) {
  160. var SHARED = '__core-js_shared__';
  161. var store = global_1[SHARED] || setGlobal(SHARED, {});
  162. (module.exports = function (key, value) {
  163. return store[key] || (store[key] = value !== undefined ? value : {});
  164. })('versions', []).push({
  165. version: '3.1.3',
  166. mode: 'global',
  167. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  168. });
  169. });
  170. var functionToString = shared('native-function-to-string', Function.toString);
  171. var WeakMap = global_1.WeakMap;
  172. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
  173. var id = 0;
  174. var postfix = Math.random();
  175. var uid = function (key) {
  176. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  177. };
  178. var keys = shared('keys');
  179. var sharedKey = function (key) {
  180. return keys[key] || (keys[key] = uid(key));
  181. };
  182. var hiddenKeys = {};
  183. var WeakMap$1 = global_1.WeakMap;
  184. var set, get, has$1;
  185. var enforce = function (it) {
  186. return has$1(it) ? get(it) : set(it, {});
  187. };
  188. var getterFor = function (TYPE) {
  189. return function (it) {
  190. var state;
  191. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  192. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  193. } return state;
  194. };
  195. };
  196. if (nativeWeakMap) {
  197. var store = new WeakMap$1();
  198. var wmget = store.get;
  199. var wmhas = store.has;
  200. var wmset = store.set;
  201. set = function (it, metadata) {
  202. wmset.call(store, it, metadata);
  203. return metadata;
  204. };
  205. get = function (it) {
  206. return wmget.call(store, it) || {};
  207. };
  208. has$1 = function (it) {
  209. return wmhas.call(store, it);
  210. };
  211. } else {
  212. var STATE = sharedKey('state');
  213. hiddenKeys[STATE] = true;
  214. set = function (it, metadata) {
  215. hide(it, STATE, metadata);
  216. return metadata;
  217. };
  218. get = function (it) {
  219. return has(it, STATE) ? it[STATE] : {};
  220. };
  221. has$1 = function (it) {
  222. return has(it, STATE);
  223. };
  224. }
  225. var internalState = {
  226. set: set,
  227. get: get,
  228. has: has$1,
  229. enforce: enforce,
  230. getterFor: getterFor
  231. };
  232. var redefine = createCommonjsModule(function (module) {
  233. var getInternalState = internalState.get;
  234. var enforceInternalState = internalState.enforce;
  235. var TEMPLATE = String(functionToString).split('toString');
  236. shared('inspectSource', function (it) {
  237. return functionToString.call(it);
  238. });
  239. (module.exports = function (O, key, value, options) {
  240. var unsafe = options ? !!options.unsafe : false;
  241. var simple = options ? !!options.enumerable : false;
  242. var noTargetGet = options ? !!options.noTargetGet : false;
  243. if (typeof value == 'function') {
  244. if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
  245. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  246. }
  247. if (O === global_1) {
  248. if (simple) O[key] = value;
  249. else setGlobal(key, value);
  250. return;
  251. } else if (!unsafe) {
  252. delete O[key];
  253. } else if (!noTargetGet && O[key]) {
  254. simple = true;
  255. }
  256. if (simple) O[key] = value;
  257. else hide(O, key, value);
  258. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  259. })(Function.prototype, 'toString', function toString() {
  260. return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
  261. });
  262. });
  263. var path = global_1;
  264. var aFunction = function (variable) {
  265. return typeof variable == 'function' ? variable : undefined;
  266. };
  267. var getBuiltIn = function (namespace, method) {
  268. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
  269. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  270. };
  271. var ceil = Math.ceil;
  272. var floor = Math.floor;
  273. // `ToInteger` abstract operation
  274. // https://tc39.github.io/ecma262/#sec-tointeger
  275. var toInteger = function (argument) {
  276. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  277. };
  278. var min = Math.min;
  279. // `ToLength` abstract operation
  280. // https://tc39.github.io/ecma262/#sec-tolength
  281. var toLength = function (argument) {
  282. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  283. };
  284. var max = Math.max;
  285. var min$1 = Math.min;
  286. // Helper for a popular repeating case of the spec:
  287. // Let integer be ? ToInteger(index).
  288. // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
  289. var toAbsoluteIndex = function (index, length) {
  290. var integer = toInteger(index);
  291. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  292. };
  293. // `Array.prototype.{ indexOf, includes }` methods implementation
  294. var createMethod = function (IS_INCLUDES) {
  295. return function ($this, el, fromIndex) {
  296. var O = toIndexedObject($this);
  297. var length = toLength(O.length);
  298. var index = toAbsoluteIndex(fromIndex, length);
  299. var value;
  300. // Array#includes uses SameValueZero equality algorithm
  301. // eslint-disable-next-line no-self-compare
  302. if (IS_INCLUDES && el != el) while (length > index) {
  303. value = O[index++];
  304. // eslint-disable-next-line no-self-compare
  305. if (value != value) return true;
  306. // Array#indexOf ignores holes, Array#includes - not
  307. } else for (;length > index; index++) {
  308. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  309. } return !IS_INCLUDES && -1;
  310. };
  311. };
  312. var arrayIncludes = {
  313. // `Array.prototype.includes` method
  314. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  315. includes: createMethod(true),
  316. // `Array.prototype.indexOf` method
  317. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  318. indexOf: createMethod(false)
  319. };
  320. var indexOf = arrayIncludes.indexOf;
  321. var objectKeysInternal = function (object, names) {
  322. var O = toIndexedObject(object);
  323. var i = 0;
  324. var result = [];
  325. var key;
  326. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  327. // Don't enum bug & hidden keys
  328. while (names.length > i) if (has(O, key = names[i++])) {
  329. ~indexOf(result, key) || result.push(key);
  330. }
  331. return result;
  332. };
  333. // IE8- don't enum bug keys
  334. var enumBugKeys = [
  335. 'constructor',
  336. 'hasOwnProperty',
  337. 'isPrototypeOf',
  338. 'propertyIsEnumerable',
  339. 'toLocaleString',
  340. 'toString',
  341. 'valueOf'
  342. ];
  343. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  344. // `Object.getOwnPropertyNames` method
  345. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  346. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  347. return objectKeysInternal(O, hiddenKeys$1);
  348. };
  349. var objectGetOwnPropertyNames = {
  350. f: f$3
  351. };
  352. var f$4 = Object.getOwnPropertySymbols;
  353. var objectGetOwnPropertySymbols = {
  354. f: f$4
  355. };
  356. // all object keys, includes non-enumerable and symbols
  357. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  358. var keys = objectGetOwnPropertyNames.f(anObject(it));
  359. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  360. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  361. };
  362. var copyConstructorProperties = function (target, source) {
  363. var keys = ownKeys(source);
  364. var defineProperty = objectDefineProperty.f;
  365. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  366. for (var i = 0; i < keys.length; i++) {
  367. var key = keys[i];
  368. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  369. }
  370. };
  371. var replacement = /#|\.prototype\./;
  372. var isForced = function (feature, detection) {
  373. var value = data[normalize(feature)];
  374. return value == POLYFILL ? true
  375. : value == NATIVE ? false
  376. : typeof detection == 'function' ? fails(detection)
  377. : !!detection;
  378. };
  379. var normalize = isForced.normalize = function (string) {
  380. return String(string).replace(replacement, '.').toLowerCase();
  381. };
  382. var data = isForced.data = {};
  383. var NATIVE = isForced.NATIVE = 'N';
  384. var POLYFILL = isForced.POLYFILL = 'P';
  385. var isForced_1 = isForced;
  386. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  387. /*
  388. options.target - name of the target object
  389. options.global - target is the global object
  390. options.stat - export as static methods of target
  391. options.proto - export as prototype methods of target
  392. options.real - real prototype method for the `pure` version
  393. options.forced - export even if the native feature is available
  394. options.bind - bind methods to the target, required for the `pure` version
  395. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  396. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  397. options.sham - add a flag to not completely full polyfills
  398. options.enumerable - export as enumerable property
  399. options.noTargetGet - prevent calling a getter on target
  400. */
  401. var _export = function (options, source) {
  402. var TARGET = options.target;
  403. var GLOBAL = options.global;
  404. var STATIC = options.stat;
  405. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  406. if (GLOBAL) {
  407. target = global_1;
  408. } else if (STATIC) {
  409. target = global_1[TARGET] || setGlobal(TARGET, {});
  410. } else {
  411. target = (global_1[TARGET] || {}).prototype;
  412. }
  413. if (target) for (key in source) {
  414. sourceProperty = source[key];
  415. if (options.noTargetGet) {
  416. descriptor = getOwnPropertyDescriptor$1(target, key);
  417. targetProperty = descriptor && descriptor.value;
  418. } else targetProperty = target[key];
  419. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  420. // contained in target
  421. if (!FORCED && targetProperty !== undefined) {
  422. if (typeof sourceProperty === typeof targetProperty) continue;
  423. copyConstructorProperties(sourceProperty, targetProperty);
  424. }
  425. // add a flag to not completely full polyfills
  426. if (options.sham || (targetProperty && targetProperty.sham)) {
  427. hide(sourceProperty, 'sham', true);
  428. }
  429. // extend global
  430. redefine(target, key, sourceProperty, options);
  431. }
  432. };
  433. // `IsArray` abstract operation
  434. // https://tc39.github.io/ecma262/#sec-isarray
  435. var isArray = Array.isArray || function isArray(arg) {
  436. return classofRaw(arg) == 'Array';
  437. };
  438. // `ToObject` abstract operation
  439. // https://tc39.github.io/ecma262/#sec-toobject
  440. var toObject = function (argument) {
  441. return Object(requireObjectCoercible(argument));
  442. };
  443. var createProperty = function (object, key, value) {
  444. var propertyKey = toPrimitive(key);
  445. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  446. else object[propertyKey] = value;
  447. };
  448. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  449. // Chrome 38 Symbol has incorrect toString conversion
  450. // eslint-disable-next-line no-undef
  451. return !String(Symbol());
  452. });
  453. var Symbol$1 = global_1.Symbol;
  454. var store$1 = shared('wks');
  455. var wellKnownSymbol = function (name) {
  456. return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
  457. || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
  458. };
  459. var SPECIES = wellKnownSymbol('species');
  460. // `ArraySpeciesCreate` abstract operation
  461. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  462. var arraySpeciesCreate = function (originalArray, length) {
  463. var C;
  464. if (isArray(originalArray)) {
  465. C = originalArray.constructor;
  466. // cross-realm fallback
  467. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  468. else if (isObject(C)) {
  469. C = C[SPECIES];
  470. if (C === null) C = undefined;
  471. }
  472. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  473. };
  474. var SPECIES$1 = wellKnownSymbol('species');
  475. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  476. return !fails(function () {
  477. var array = [];
  478. var constructor = array.constructor = {};
  479. constructor[SPECIES$1] = function () {
  480. return { foo: 1 };
  481. };
  482. return array[METHOD_NAME](Boolean).foo !== 1;
  483. });
  484. };
  485. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  486. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  487. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  488. var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
  489. var array = [];
  490. array[IS_CONCAT_SPREADABLE] = false;
  491. return array.concat()[0] !== array;
  492. });
  493. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  494. var isConcatSpreadable = function (O) {
  495. if (!isObject(O)) return false;
  496. var spreadable = O[IS_CONCAT_SPREADABLE];
  497. return spreadable !== undefined ? !!spreadable : isArray(O);
  498. };
  499. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  500. // `Array.prototype.concat` method
  501. // https://tc39.github.io/ecma262/#sec-array.prototype.concat
  502. // with adding support of @@isConcatSpreadable and @@species
  503. _export({ target: 'Array', proto: true, forced: FORCED }, {
  504. concat: function concat(arg) { // eslint-disable-line no-unused-vars
  505. var O = toObject(this);
  506. var A = arraySpeciesCreate(O, 0);
  507. var n = 0;
  508. var i, k, length, len, E;
  509. for (i = -1, length = arguments.length; i < length; i++) {
  510. E = i === -1 ? O : arguments[i];
  511. if (isConcatSpreadable(E)) {
  512. len = toLength(E.length);
  513. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  514. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  515. } else {
  516. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  517. createProperty(A, n++, E);
  518. }
  519. }
  520. A.length = n;
  521. return A;
  522. }
  523. });
  524. var aFunction$1 = function (it) {
  525. if (typeof it != 'function') {
  526. throw TypeError(String(it) + ' is not a function');
  527. } return it;
  528. };
  529. // optional / simple context binding
  530. var bindContext = function (fn, that, length) {
  531. aFunction$1(fn);
  532. if (that === undefined) return fn;
  533. switch (length) {
  534. case 0: return function () {
  535. return fn.call(that);
  536. };
  537. case 1: return function (a) {
  538. return fn.call(that, a);
  539. };
  540. case 2: return function (a, b) {
  541. return fn.call(that, a, b);
  542. };
  543. case 3: return function (a, b, c) {
  544. return fn.call(that, a, b, c);
  545. };
  546. }
  547. return function (/* ...args */) {
  548. return fn.apply(that, arguments);
  549. };
  550. };
  551. var push = [].push;
  552. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  553. var createMethod$1 = function (TYPE) {
  554. var IS_MAP = TYPE == 1;
  555. var IS_FILTER = TYPE == 2;
  556. var IS_SOME = TYPE == 3;
  557. var IS_EVERY = TYPE == 4;
  558. var IS_FIND_INDEX = TYPE == 6;
  559. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  560. return function ($this, callbackfn, that, specificCreate) {
  561. var O = toObject($this);
  562. var self = indexedObject(O);
  563. var boundFunction = bindContext(callbackfn, that, 3);
  564. var length = toLength(self.length);
  565. var index = 0;
  566. var create = specificCreate || arraySpeciesCreate;
  567. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  568. var value, result;
  569. for (;length > index; index++) if (NO_HOLES || index in self) {
  570. value = self[index];
  571. result = boundFunction(value, index, O);
  572. if (TYPE) {
  573. if (IS_MAP) target[index] = result; // map
  574. else if (result) switch (TYPE) {
  575. case 3: return true; // some
  576. case 5: return value; // find
  577. case 6: return index; // findIndex
  578. case 2: push.call(target, value); // filter
  579. } else if (IS_EVERY) return false; // every
  580. }
  581. }
  582. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  583. };
  584. };
  585. var arrayIteration = {
  586. // `Array.prototype.forEach` method
  587. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  588. forEach: createMethod$1(0),
  589. // `Array.prototype.map` method
  590. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  591. map: createMethod$1(1),
  592. // `Array.prototype.filter` method
  593. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  594. filter: createMethod$1(2),
  595. // `Array.prototype.some` method
  596. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  597. some: createMethod$1(3),
  598. // `Array.prototype.every` method
  599. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  600. every: createMethod$1(4),
  601. // `Array.prototype.find` method
  602. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  603. find: createMethod$1(5),
  604. // `Array.prototype.findIndex` method
  605. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  606. findIndex: createMethod$1(6)
  607. };
  608. // `Object.keys` method
  609. // https://tc39.github.io/ecma262/#sec-object.keys
  610. var objectKeys = Object.keys || function keys(O) {
  611. return objectKeysInternal(O, enumBugKeys);
  612. };
  613. // `Object.defineProperties` method
  614. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  615. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  616. anObject(O);
  617. var keys = objectKeys(Properties);
  618. var length = keys.length;
  619. var index = 0;
  620. var key;
  621. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  622. return O;
  623. };
  624. var html = getBuiltIn('document', 'documentElement');
  625. var IE_PROTO = sharedKey('IE_PROTO');
  626. var PROTOTYPE = 'prototype';
  627. var Empty = function () { /* empty */ };
  628. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  629. var createDict = function () {
  630. // Thrash, waste and sodomy: IE GC bug
  631. var iframe = documentCreateElement('iframe');
  632. var length = enumBugKeys.length;
  633. var lt = '<';
  634. var script = 'script';
  635. var gt = '>';
  636. var js = 'java' + script + ':';
  637. var iframeDocument;
  638. iframe.style.display = 'none';
  639. html.appendChild(iframe);
  640. iframe.src = String(js);
  641. iframeDocument = iframe.contentWindow.document;
  642. iframeDocument.open();
  643. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  644. iframeDocument.close();
  645. createDict = iframeDocument.F;
  646. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  647. return createDict();
  648. };
  649. // `Object.create` method
  650. // https://tc39.github.io/ecma262/#sec-object.create
  651. var objectCreate = Object.create || function create(O, Properties) {
  652. var result;
  653. if (O !== null) {
  654. Empty[PROTOTYPE] = anObject(O);
  655. result = new Empty();
  656. Empty[PROTOTYPE] = null;
  657. // add "__proto__" for Object.getPrototypeOf polyfill
  658. result[IE_PROTO] = O;
  659. } else result = createDict();
  660. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  661. };
  662. hiddenKeys[IE_PROTO] = true;
  663. var UNSCOPABLES = wellKnownSymbol('unscopables');
  664. var ArrayPrototype = Array.prototype;
  665. // Array.prototype[@@unscopables]
  666. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  667. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  668. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  669. }
  670. // add a key to Array.prototype[@@unscopables]
  671. var addToUnscopables = function (key) {
  672. ArrayPrototype[UNSCOPABLES][key] = true;
  673. };
  674. var $find = arrayIteration.find;
  675. var FIND = 'find';
  676. var SKIPS_HOLES = true;
  677. // Shouldn't skip holes
  678. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  679. // `Array.prototype.find` method
  680. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  681. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  682. find: function find(callbackfn /* , that = undefined */) {
  683. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  684. }
  685. });
  686. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  687. addToUnscopables(FIND);
  688. function _classCallCheck(instance, Constructor) {
  689. if (!(instance instanceof Constructor)) {
  690. throw new TypeError("Cannot call a class as a function");
  691. }
  692. }
  693. function _defineProperties(target, props) {
  694. for (var i = 0; i < props.length; i++) {
  695. var descriptor = props[i];
  696. descriptor.enumerable = descriptor.enumerable || false;
  697. descriptor.configurable = true;
  698. if ("value" in descriptor) descriptor.writable = true;
  699. Object.defineProperty(target, descriptor.key, descriptor);
  700. }
  701. }
  702. function _createClass(Constructor, protoProps, staticProps) {
  703. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  704. if (staticProps) _defineProperties(Constructor, staticProps);
  705. return Constructor;
  706. }
  707. function _inherits(subClass, superClass) {
  708. if (typeof superClass !== "function" && superClass !== null) {
  709. throw new TypeError("Super expression must either be null or a function");
  710. }
  711. subClass.prototype = Object.create(superClass && superClass.prototype, {
  712. constructor: {
  713. value: subClass,
  714. writable: true,
  715. configurable: true
  716. }
  717. });
  718. if (superClass) _setPrototypeOf(subClass, superClass);
  719. }
  720. function _getPrototypeOf(o) {
  721. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  722. return o.__proto__ || Object.getPrototypeOf(o);
  723. };
  724. return _getPrototypeOf(o);
  725. }
  726. function _setPrototypeOf(o, p) {
  727. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  728. o.__proto__ = p;
  729. return o;
  730. };
  731. return _setPrototypeOf(o, p);
  732. }
  733. function _assertThisInitialized(self) {
  734. if (self === void 0) {
  735. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  736. }
  737. return self;
  738. }
  739. function _possibleConstructorReturn(self, call) {
  740. if (call && (typeof call === "object" || typeof call === "function")) {
  741. return call;
  742. }
  743. return _assertThisInitialized(self);
  744. }
  745. function _superPropBase(object, property) {
  746. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  747. object = _getPrototypeOf(object);
  748. if (object === null) break;
  749. }
  750. return object;
  751. }
  752. function _get(target, property, receiver) {
  753. if (typeof Reflect !== "undefined" && Reflect.get) {
  754. _get = Reflect.get;
  755. } else {
  756. _get = function _get(target, property, receiver) {
  757. var base = _superPropBase(target, property);
  758. if (!base) return;
  759. var desc = Object.getOwnPropertyDescriptor(base, property);
  760. if (desc.get) {
  761. return desc.get.call(receiver);
  762. }
  763. return desc.value;
  764. };
  765. }
  766. return _get(target, property, receiver || target);
  767. }
  768. /**
  769. * @author: Alec Fenichel
  770. * @webSite: https://fenichelar.com
  771. * @update: zhixin wen <wenzhixin2010@gmail.com>
  772. */
  773. var Utils = $.fn.bootstrapTable.utils;
  774. $.extend($.fn.bootstrapTable.defaults, {
  775. autoRefresh: false,
  776. autoRefreshInterval: 60,
  777. autoRefreshSilent: true,
  778. autoRefreshStatus: true,
  779. autoRefreshFunction: null
  780. });
  781. $.extend($.fn.bootstrapTable.defaults.icons, {
  782. autoRefresh: {
  783. bootstrap3: 'glyphicon-time icon-time',
  784. materialize: 'access_time'
  785. }[$.fn.bootstrapTable.theme] || 'fa-clock'
  786. });
  787. $.extend($.fn.bootstrapTable.locales, {
  788. formatAutoRefresh: function formatAutoRefresh() {
  789. return 'Auto Refresh';
  790. }
  791. });
  792. $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
  793. $.BootstrapTable =
  794. /*#__PURE__*/
  795. function (_$$BootstrapTable) {
  796. _inherits(_class, _$$BootstrapTable);
  797. function _class() {
  798. _classCallCheck(this, _class);
  799. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  800. }
  801. _createClass(_class, [{
  802. key: "init",
  803. value: function init() {
  804. var _get2,
  805. _this = this;
  806. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  807. args[_key] = arguments[_key];
  808. }
  809. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  810. if (this.options.autoRefresh && this.options.autoRefreshStatus) {
  811. this.options.autoRefreshFunction = setInterval(function () {
  812. _this.refresh({
  813. silent: _this.options.autoRefreshSilent
  814. });
  815. }, this.options.autoRefreshInterval * 1000);
  816. }
  817. }
  818. }, {
  819. key: "initToolbar",
  820. value: function initToolbar() {
  821. var _get3;
  822. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  823. args[_key2] = arguments[_key2];
  824. }
  825. (_get3 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get3, [this].concat(args));
  826. if (this.options.autoRefresh) {
  827. var $btnGroup = this.$toolbar.find('>.columns');
  828. var $btnAutoRefresh = $btnGroup.find('.auto-refresh');
  829. if (!$btnAutoRefresh.length) {
  830. $btnAutoRefresh = $("\n <button class=\"auto-refresh ".concat(this.constants.buttonsClass, "\n ").concat(this.options.autoRefreshStatus ? " ".concat(this.constants.classes.buttonActive) : '', "\"\n type=\"button\" title=\"").concat(this.options.formatAutoRefresh(), "\">\n ").concat(this.options.showButtonIcons ? Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.autoRefresh) : '', "\n ").concat(this.options.showButtonText ? this.options.formatAutoRefresh() : '', "\n </button>\n ")).appendTo($btnGroup);
  831. $btnAutoRefresh.on('click', $.proxy(this.toggleAutoRefresh, this));
  832. }
  833. }
  834. }
  835. }, {
  836. key: "toggleAutoRefresh",
  837. value: function toggleAutoRefresh() {
  838. var _this2 = this;
  839. if (this.options.autoRefresh) {
  840. if (this.options.autoRefreshStatus) {
  841. clearInterval(this.options.autoRefreshFunction);
  842. this.$toolbar.find('>.columns').find('.auto-refresh').removeClass(this.constants.classes.buttonActive);
  843. } else {
  844. this.options.autoRefreshFunction = setInterval(function () {
  845. _this2.refresh({
  846. silent: _this2.options.autoRefreshSilent
  847. });
  848. }, this.options.autoRefreshInterval * 1000);
  849. this.$toolbar.find('>.columns').find('.auto-refresh').addClass(this.constants.classes.buttonActive);
  850. }
  851. this.options.autoRefreshStatus = !this.options.autoRefreshStatus;
  852. }
  853. }
  854. }]);
  855. return _class;
  856. }($.BootstrapTable);
  857. }));