bootstrap-table-materialize.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  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. var aFunction$1 = function (it) {
  434. if (typeof it != 'function') {
  435. throw TypeError(String(it) + ' is not a function');
  436. } return it;
  437. };
  438. // optional / simple context binding
  439. var bindContext = function (fn, that, length) {
  440. aFunction$1(fn);
  441. if (that === undefined) return fn;
  442. switch (length) {
  443. case 0: return function () {
  444. return fn.call(that);
  445. };
  446. case 1: return function (a) {
  447. return fn.call(that, a);
  448. };
  449. case 2: return function (a, b) {
  450. return fn.call(that, a, b);
  451. };
  452. case 3: return function (a, b, c) {
  453. return fn.call(that, a, b, c);
  454. };
  455. }
  456. return function (/* ...args */) {
  457. return fn.apply(that, arguments);
  458. };
  459. };
  460. // `ToObject` abstract operation
  461. // https://tc39.github.io/ecma262/#sec-toobject
  462. var toObject = function (argument) {
  463. return Object(requireObjectCoercible(argument));
  464. };
  465. // `IsArray` abstract operation
  466. // https://tc39.github.io/ecma262/#sec-isarray
  467. var isArray = Array.isArray || function isArray(arg) {
  468. return classofRaw(arg) == 'Array';
  469. };
  470. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  471. // Chrome 38 Symbol has incorrect toString conversion
  472. // eslint-disable-next-line no-undef
  473. return !String(Symbol());
  474. });
  475. var Symbol$1 = global_1.Symbol;
  476. var store$1 = shared('wks');
  477. var wellKnownSymbol = function (name) {
  478. return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
  479. || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
  480. };
  481. var SPECIES = wellKnownSymbol('species');
  482. // `ArraySpeciesCreate` abstract operation
  483. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  484. var arraySpeciesCreate = function (originalArray, length) {
  485. var C;
  486. if (isArray(originalArray)) {
  487. C = originalArray.constructor;
  488. // cross-realm fallback
  489. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  490. else if (isObject(C)) {
  491. C = C[SPECIES];
  492. if (C === null) C = undefined;
  493. }
  494. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  495. };
  496. var push = [].push;
  497. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  498. var createMethod$1 = function (TYPE) {
  499. var IS_MAP = TYPE == 1;
  500. var IS_FILTER = TYPE == 2;
  501. var IS_SOME = TYPE == 3;
  502. var IS_EVERY = TYPE == 4;
  503. var IS_FIND_INDEX = TYPE == 6;
  504. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  505. return function ($this, callbackfn, that, specificCreate) {
  506. var O = toObject($this);
  507. var self = indexedObject(O);
  508. var boundFunction = bindContext(callbackfn, that, 3);
  509. var length = toLength(self.length);
  510. var index = 0;
  511. var create = specificCreate || arraySpeciesCreate;
  512. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  513. var value, result;
  514. for (;length > index; index++) if (NO_HOLES || index in self) {
  515. value = self[index];
  516. result = boundFunction(value, index, O);
  517. if (TYPE) {
  518. if (IS_MAP) target[index] = result; // map
  519. else if (result) switch (TYPE) {
  520. case 3: return true; // some
  521. case 5: return value; // find
  522. case 6: return index; // findIndex
  523. case 2: push.call(target, value); // filter
  524. } else if (IS_EVERY) return false; // every
  525. }
  526. }
  527. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  528. };
  529. };
  530. var arrayIteration = {
  531. // `Array.prototype.forEach` method
  532. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  533. forEach: createMethod$1(0),
  534. // `Array.prototype.map` method
  535. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  536. map: createMethod$1(1),
  537. // `Array.prototype.filter` method
  538. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  539. filter: createMethod$1(2),
  540. // `Array.prototype.some` method
  541. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  542. some: createMethod$1(3),
  543. // `Array.prototype.every` method
  544. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  545. every: createMethod$1(4),
  546. // `Array.prototype.find` method
  547. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  548. find: createMethod$1(5),
  549. // `Array.prototype.findIndex` method
  550. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  551. findIndex: createMethod$1(6)
  552. };
  553. // `Object.keys` method
  554. // https://tc39.github.io/ecma262/#sec-object.keys
  555. var objectKeys = Object.keys || function keys(O) {
  556. return objectKeysInternal(O, enumBugKeys);
  557. };
  558. // `Object.defineProperties` method
  559. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  560. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  561. anObject(O);
  562. var keys = objectKeys(Properties);
  563. var length = keys.length;
  564. var index = 0;
  565. var key;
  566. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  567. return O;
  568. };
  569. var html = getBuiltIn('document', 'documentElement');
  570. var IE_PROTO = sharedKey('IE_PROTO');
  571. var PROTOTYPE = 'prototype';
  572. var Empty = function () { /* empty */ };
  573. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  574. var createDict = function () {
  575. // Thrash, waste and sodomy: IE GC bug
  576. var iframe = documentCreateElement('iframe');
  577. var length = enumBugKeys.length;
  578. var lt = '<';
  579. var script = 'script';
  580. var gt = '>';
  581. var js = 'java' + script + ':';
  582. var iframeDocument;
  583. iframe.style.display = 'none';
  584. html.appendChild(iframe);
  585. iframe.src = String(js);
  586. iframeDocument = iframe.contentWindow.document;
  587. iframeDocument.open();
  588. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  589. iframeDocument.close();
  590. createDict = iframeDocument.F;
  591. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  592. return createDict();
  593. };
  594. // `Object.create` method
  595. // https://tc39.github.io/ecma262/#sec-object.create
  596. var objectCreate = Object.create || function create(O, Properties) {
  597. var result;
  598. if (O !== null) {
  599. Empty[PROTOTYPE] = anObject(O);
  600. result = new Empty();
  601. Empty[PROTOTYPE] = null;
  602. // add "__proto__" for Object.getPrototypeOf polyfill
  603. result[IE_PROTO] = O;
  604. } else result = createDict();
  605. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  606. };
  607. hiddenKeys[IE_PROTO] = true;
  608. var UNSCOPABLES = wellKnownSymbol('unscopables');
  609. var ArrayPrototype = Array.prototype;
  610. // Array.prototype[@@unscopables]
  611. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  612. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  613. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  614. }
  615. // add a key to Array.prototype[@@unscopables]
  616. var addToUnscopables = function (key) {
  617. ArrayPrototype[UNSCOPABLES][key] = true;
  618. };
  619. var $find = arrayIteration.find;
  620. var FIND = 'find';
  621. var SKIPS_HOLES = true;
  622. // Shouldn't skip holes
  623. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  624. // `Array.prototype.find` method
  625. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  626. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  627. find: function find(callbackfn /* , that = undefined */) {
  628. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  629. }
  630. });
  631. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  632. addToUnscopables(FIND);
  633. function _classCallCheck(instance, Constructor) {
  634. if (!(instance instanceof Constructor)) {
  635. throw new TypeError("Cannot call a class as a function");
  636. }
  637. }
  638. function _defineProperties(target, props) {
  639. for (var i = 0; i < props.length; i++) {
  640. var descriptor = props[i];
  641. descriptor.enumerable = descriptor.enumerable || false;
  642. descriptor.configurable = true;
  643. if ("value" in descriptor) descriptor.writable = true;
  644. Object.defineProperty(target, descriptor.key, descriptor);
  645. }
  646. }
  647. function _createClass(Constructor, protoProps, staticProps) {
  648. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  649. if (staticProps) _defineProperties(Constructor, staticProps);
  650. return Constructor;
  651. }
  652. function _inherits(subClass, superClass) {
  653. if (typeof superClass !== "function" && superClass !== null) {
  654. throw new TypeError("Super expression must either be null or a function");
  655. }
  656. subClass.prototype = Object.create(superClass && superClass.prototype, {
  657. constructor: {
  658. value: subClass,
  659. writable: true,
  660. configurable: true
  661. }
  662. });
  663. if (superClass) _setPrototypeOf(subClass, superClass);
  664. }
  665. function _getPrototypeOf(o) {
  666. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  667. return o.__proto__ || Object.getPrototypeOf(o);
  668. };
  669. return _getPrototypeOf(o);
  670. }
  671. function _setPrototypeOf(o, p) {
  672. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  673. o.__proto__ = p;
  674. return o;
  675. };
  676. return _setPrototypeOf(o, p);
  677. }
  678. function _assertThisInitialized(self) {
  679. if (self === void 0) {
  680. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  681. }
  682. return self;
  683. }
  684. function _possibleConstructorReturn(self, call) {
  685. if (call && (typeof call === "object" || typeof call === "function")) {
  686. return call;
  687. }
  688. return _assertThisInitialized(self);
  689. }
  690. function _superPropBase(object, property) {
  691. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  692. object = _getPrototypeOf(object);
  693. if (object === null) break;
  694. }
  695. return object;
  696. }
  697. function _get(target, property, receiver) {
  698. if (typeof Reflect !== "undefined" && Reflect.get) {
  699. _get = Reflect.get;
  700. } else {
  701. _get = function _get(target, property, receiver) {
  702. var base = _superPropBase(target, property);
  703. if (!base) return;
  704. var desc = Object.getOwnPropertyDescriptor(base, property);
  705. if (desc.get) {
  706. return desc.get.call(receiver);
  707. }
  708. return desc.value;
  709. };
  710. }
  711. return _get(target, property, receiver || target);
  712. }
  713. /**
  714. * @author zhixin wen <wenzhixin2010@gmail.com>
  715. * https://github.com/wenzhixin/bootstrap-table/
  716. * theme: https://github.com/jgthms/bulma/
  717. */
  718. $.extend($.fn.bootstrapTable.defaults, {
  719. classes: 'table highlight',
  720. buttonsPrefix: '',
  721. buttonsClass: 'waves-effect waves-light btn',
  722. iconsPrefix: 'material-icons',
  723. icons: {
  724. paginationSwitchDown: 'grid_on',
  725. paginationSwitchUp: 'grid_off',
  726. refresh: 'refresh',
  727. toggleOff: 'tablet',
  728. toggleOn: 'tablet_android',
  729. columns: 'view_list',
  730. detailOpen: 'add',
  731. detailClose: 'remove',
  732. fullscreen: 'fullscreen',
  733. sort: 'sort'
  734. }
  735. });
  736. $.fn.bootstrapTable.theme = 'materialize';
  737. $.BootstrapTable =
  738. /*#__PURE__*/
  739. function (_$$BootstrapTable) {
  740. _inherits(_class, _$$BootstrapTable);
  741. function _class() {
  742. _classCallCheck(this, _class);
  743. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  744. }
  745. _createClass(_class, [{
  746. key: "initConstants",
  747. value: function initConstants() {
  748. _get(_getPrototypeOf(_class.prototype), "initConstants", this).call(this);
  749. this.constants.classes.buttonsGroup = 'button-group';
  750. this.constants.classes.buttonsDropdown = '';
  751. this.constants.classes.input = 'input-field';
  752. this.constants.classes.input = '';
  753. this.constants.classes.paginationDropdown = '';
  754. this.constants.classes.buttonActive = 'green';
  755. this.constants.html.toolbarDropdown = ['<ul id="toolbar-columns-id" class="dropdown-content">', '</ul>'];
  756. this.constants.html.toolbarDropdownItem = '<li><label>%s</label></li>';
  757. this.constants.html.toolbarDropdownSeperator = '<li class="divider" tabindex="-1"></li>';
  758. this.constants.html.pageDropdown = ['<ul id="pagination-list-id" class="dropdown-content">', '</ul>'];
  759. this.constants.html.pageDropdownItem = '<li><a class="%s" href="#">%s</a></li>';
  760. this.constants.html.dropdownCaret = '<i class="material-icons">arrow_drop_down</i>';
  761. this.constants.html.pagination = ['<ul class="pagination%s">', '</ul>'];
  762. this.constants.html.paginationItem = '<li class="waves-effect page-item%s" aria-label="%s"><a href="#">%s</a></li>';
  763. this.constants.html.icon = '<i class="%s">%s</i>';
  764. }
  765. }, {
  766. key: "initToolbar",
  767. value: function initToolbar() {
  768. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  769. this.handleToolbar();
  770. }
  771. }, {
  772. key: "handleToolbar",
  773. value: function handleToolbar() {
  774. if (this.$toolbar.find('.dropdown-toggle').length) {
  775. this.$toolbar.find('.dropdown-toggle').each(function (i, el) {
  776. $(el).attr('data-target', $(el).next().attr('id')).dropdown({
  777. alignment: 'right',
  778. constrainWidth: false,
  779. closeOnClick: false
  780. });
  781. });
  782. }
  783. }
  784. }, {
  785. key: "initPagination",
  786. value: function initPagination() {
  787. _get(_getPrototypeOf(_class.prototype), "initPagination", this).call(this);
  788. if (this.options.pagination && !this.options.onlyInfoPagination) {
  789. this.$pagination.find('.dropdown-toggle').attr('data-target', this.$pagination.find('.dropdown-content').attr('id')).dropdown();
  790. }
  791. }
  792. }]);
  793. return _class;
  794. }($.BootstrapTable);
  795. }));