bootstrap-table-materialize.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125
  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 ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. return Constructor;
  26. }
  27. function _inherits(subClass, superClass) {
  28. if (typeof superClass !== "function" && superClass !== null) {
  29. throw new TypeError("Super expression must either be null or a function");
  30. }
  31. subClass.prototype = Object.create(superClass && superClass.prototype, {
  32. constructor: {
  33. value: subClass,
  34. writable: true,
  35. configurable: true
  36. }
  37. });
  38. if (superClass) _setPrototypeOf(subClass, superClass);
  39. }
  40. function _getPrototypeOf(o) {
  41. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  42. return o.__proto__ || Object.getPrototypeOf(o);
  43. };
  44. return _getPrototypeOf(o);
  45. }
  46. function _setPrototypeOf(o, p) {
  47. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  48. o.__proto__ = p;
  49. return o;
  50. };
  51. return _setPrototypeOf(o, p);
  52. }
  53. function _isNativeReflectConstruct() {
  54. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  55. if (Reflect.construct.sham) return false;
  56. if (typeof Proxy === "function") return true;
  57. try {
  58. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  59. return true;
  60. } catch (e) {
  61. return false;
  62. }
  63. }
  64. function _assertThisInitialized(self) {
  65. if (self === void 0) {
  66. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  67. }
  68. return self;
  69. }
  70. function _possibleConstructorReturn(self, call) {
  71. if (call && (typeof call === "object" || typeof call === "function")) {
  72. return call;
  73. }
  74. return _assertThisInitialized(self);
  75. }
  76. function _createSuper(Derived) {
  77. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  78. return function _createSuperInternal() {
  79. var Super = _getPrototypeOf(Derived),
  80. result;
  81. if (hasNativeReflectConstruct) {
  82. var NewTarget = _getPrototypeOf(this).constructor;
  83. result = Reflect.construct(Super, arguments, NewTarget);
  84. } else {
  85. result = Super.apply(this, arguments);
  86. }
  87. return _possibleConstructorReturn(this, result);
  88. };
  89. }
  90. function _superPropBase(object, property) {
  91. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  92. object = _getPrototypeOf(object);
  93. if (object === null) break;
  94. }
  95. return object;
  96. }
  97. function _get(target, property, receiver) {
  98. if (typeof Reflect !== "undefined" && Reflect.get) {
  99. _get = Reflect.get;
  100. } else {
  101. _get = function _get(target, property, receiver) {
  102. var base = _superPropBase(target, property);
  103. if (!base) return;
  104. var desc = Object.getOwnPropertyDescriptor(base, property);
  105. if (desc.get) {
  106. return desc.get.call(receiver);
  107. }
  108. return desc.value;
  109. };
  110. }
  111. return _get(target, property, receiver || target);
  112. }
  113. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  114. function createCommonjsModule(fn, module) {
  115. return module = { exports: {} }, fn(module, module.exports), module.exports;
  116. }
  117. var check = function (it) {
  118. return it && it.Math == Math && it;
  119. };
  120. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  121. var global_1 =
  122. /* global globalThis -- safe */
  123. check(typeof globalThis == 'object' && globalThis) ||
  124. check(typeof window == 'object' && window) ||
  125. check(typeof self == 'object' && self) ||
  126. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  127. // eslint-disable-next-line no-new-func -- fallback
  128. (function () { return this; })() || Function('return this')();
  129. var fails = function (exec) {
  130. try {
  131. return !!exec();
  132. } catch (error) {
  133. return true;
  134. }
  135. };
  136. // Detect IE8's incomplete defineProperty implementation
  137. var descriptors = !fails(function () {
  138. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  139. });
  140. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  141. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  142. // Nashorn ~ JDK8 bug
  143. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  144. // `Object.prototype.propertyIsEnumerable` method implementation
  145. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  146. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  147. var descriptor = getOwnPropertyDescriptor$1(this, V);
  148. return !!descriptor && descriptor.enumerable;
  149. } : nativePropertyIsEnumerable;
  150. var objectPropertyIsEnumerable = {
  151. f: f$4
  152. };
  153. var createPropertyDescriptor = function (bitmap, value) {
  154. return {
  155. enumerable: !(bitmap & 1),
  156. configurable: !(bitmap & 2),
  157. writable: !(bitmap & 4),
  158. value: value
  159. };
  160. };
  161. var toString = {}.toString;
  162. var classofRaw = function (it) {
  163. return toString.call(it).slice(8, -1);
  164. };
  165. var split = ''.split;
  166. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  167. var indexedObject = fails(function () {
  168. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  169. // eslint-disable-next-line no-prototype-builtins -- safe
  170. return !Object('z').propertyIsEnumerable(0);
  171. }) ? function (it) {
  172. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  173. } : Object;
  174. // `RequireObjectCoercible` abstract operation
  175. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  176. var requireObjectCoercible = function (it) {
  177. if (it == undefined) throw TypeError("Can't call method on " + it);
  178. return it;
  179. };
  180. // toObject with fallback for non-array-like ES3 strings
  181. var toIndexedObject = function (it) {
  182. return indexedObject(requireObjectCoercible(it));
  183. };
  184. var isObject = function (it) {
  185. return typeof it === 'object' ? it !== null : typeof it === 'function';
  186. };
  187. // `ToPrimitive` abstract operation
  188. // https://tc39.es/ecma262/#sec-toprimitive
  189. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  190. // and the second argument - flag - preferred type is a string
  191. var toPrimitive = function (input, PREFERRED_STRING) {
  192. if (!isObject(input)) return input;
  193. var fn, val;
  194. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  195. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  196. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  197. throw TypeError("Can't convert object to primitive value");
  198. };
  199. var hasOwnProperty = {}.hasOwnProperty;
  200. var has$1 = function (it, key) {
  201. return hasOwnProperty.call(it, key);
  202. };
  203. var document$1 = global_1.document;
  204. // typeof document.createElement is 'object' in old IE
  205. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  206. var documentCreateElement = function (it) {
  207. return EXISTS ? document$1.createElement(it) : {};
  208. };
  209. // Thank's IE8 for his funny defineProperty
  210. var ie8DomDefine = !descriptors && !fails(function () {
  211. return Object.defineProperty(documentCreateElement('div'), 'a', {
  212. get: function () { return 7; }
  213. }).a != 7;
  214. });
  215. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  216. // `Object.getOwnPropertyDescriptor` method
  217. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  218. var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  219. O = toIndexedObject(O);
  220. P = toPrimitive(P, true);
  221. if (ie8DomDefine) try {
  222. return nativeGetOwnPropertyDescriptor(O, P);
  223. } catch (error) { /* empty */ }
  224. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  225. };
  226. var objectGetOwnPropertyDescriptor = {
  227. f: f$3
  228. };
  229. var anObject = function (it) {
  230. if (!isObject(it)) {
  231. throw TypeError(String(it) + ' is not an object');
  232. } return it;
  233. };
  234. var nativeDefineProperty = Object.defineProperty;
  235. // `Object.defineProperty` method
  236. // https://tc39.es/ecma262/#sec-object.defineproperty
  237. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  238. anObject(O);
  239. P = toPrimitive(P, true);
  240. anObject(Attributes);
  241. if (ie8DomDefine) try {
  242. return nativeDefineProperty(O, P, Attributes);
  243. } catch (error) { /* empty */ }
  244. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  245. if ('value' in Attributes) O[P] = Attributes.value;
  246. return O;
  247. };
  248. var objectDefineProperty = {
  249. f: f$2
  250. };
  251. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  252. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  253. } : function (object, key, value) {
  254. object[key] = value;
  255. return object;
  256. };
  257. var setGlobal = function (key, value) {
  258. try {
  259. createNonEnumerableProperty(global_1, key, value);
  260. } catch (error) {
  261. global_1[key] = value;
  262. } return value;
  263. };
  264. var SHARED = '__core-js_shared__';
  265. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  266. var sharedStore = store$1;
  267. var functionToString = Function.toString;
  268. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  269. if (typeof sharedStore.inspectSource != 'function') {
  270. sharedStore.inspectSource = function (it) {
  271. return functionToString.call(it);
  272. };
  273. }
  274. var inspectSource = sharedStore.inspectSource;
  275. var WeakMap$1 = global_1.WeakMap;
  276. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  277. var shared = createCommonjsModule(function (module) {
  278. (module.exports = function (key, value) {
  279. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  280. })('versions', []).push({
  281. version: '3.9.1',
  282. mode: 'global',
  283. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  284. });
  285. });
  286. var id = 0;
  287. var postfix = Math.random();
  288. var uid = function (key) {
  289. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  290. };
  291. var keys = shared('keys');
  292. var sharedKey = function (key) {
  293. return keys[key] || (keys[key] = uid(key));
  294. };
  295. var hiddenKeys$1 = {};
  296. var WeakMap = global_1.WeakMap;
  297. var set, get, has;
  298. var enforce = function (it) {
  299. return has(it) ? get(it) : set(it, {});
  300. };
  301. var getterFor = function (TYPE) {
  302. return function (it) {
  303. var state;
  304. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  305. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  306. } return state;
  307. };
  308. };
  309. if (nativeWeakMap) {
  310. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  311. var wmget = store.get;
  312. var wmhas = store.has;
  313. var wmset = store.set;
  314. set = function (it, metadata) {
  315. metadata.facade = it;
  316. wmset.call(store, it, metadata);
  317. return metadata;
  318. };
  319. get = function (it) {
  320. return wmget.call(store, it) || {};
  321. };
  322. has = function (it) {
  323. return wmhas.call(store, it);
  324. };
  325. } else {
  326. var STATE = sharedKey('state');
  327. hiddenKeys$1[STATE] = true;
  328. set = function (it, metadata) {
  329. metadata.facade = it;
  330. createNonEnumerableProperty(it, STATE, metadata);
  331. return metadata;
  332. };
  333. get = function (it) {
  334. return has$1(it, STATE) ? it[STATE] : {};
  335. };
  336. has = function (it) {
  337. return has$1(it, STATE);
  338. };
  339. }
  340. var internalState = {
  341. set: set,
  342. get: get,
  343. has: has,
  344. enforce: enforce,
  345. getterFor: getterFor
  346. };
  347. var redefine = createCommonjsModule(function (module) {
  348. var getInternalState = internalState.get;
  349. var enforceInternalState = internalState.enforce;
  350. var TEMPLATE = String(String).split('String');
  351. (module.exports = function (O, key, value, options) {
  352. var unsafe = options ? !!options.unsafe : false;
  353. var simple = options ? !!options.enumerable : false;
  354. var noTargetGet = options ? !!options.noTargetGet : false;
  355. var state;
  356. if (typeof value == 'function') {
  357. if (typeof key == 'string' && !has$1(value, 'name')) {
  358. createNonEnumerableProperty(value, 'name', key);
  359. }
  360. state = enforceInternalState(value);
  361. if (!state.source) {
  362. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  363. }
  364. }
  365. if (O === global_1) {
  366. if (simple) O[key] = value;
  367. else setGlobal(key, value);
  368. return;
  369. } else if (!unsafe) {
  370. delete O[key];
  371. } else if (!noTargetGet && O[key]) {
  372. simple = true;
  373. }
  374. if (simple) O[key] = value;
  375. else createNonEnumerableProperty(O, key, value);
  376. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  377. })(Function.prototype, 'toString', function toString() {
  378. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  379. });
  380. });
  381. var path = global_1;
  382. var aFunction$1 = function (variable) {
  383. return typeof variable == 'function' ? variable : undefined;
  384. };
  385. var getBuiltIn = function (namespace, method) {
  386. return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
  387. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  388. };
  389. var ceil = Math.ceil;
  390. var floor = Math.floor;
  391. // `ToInteger` abstract operation
  392. // https://tc39.es/ecma262/#sec-tointeger
  393. var toInteger = function (argument) {
  394. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  395. };
  396. var min$1 = Math.min;
  397. // `ToLength` abstract operation
  398. // https://tc39.es/ecma262/#sec-tolength
  399. var toLength = function (argument) {
  400. return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  401. };
  402. var max = Math.max;
  403. var min = Math.min;
  404. // Helper for a popular repeating case of the spec:
  405. // Let integer be ? ToInteger(index).
  406. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  407. var toAbsoluteIndex = function (index, length) {
  408. var integer = toInteger(index);
  409. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  410. };
  411. // `Array.prototype.{ indexOf, includes }` methods implementation
  412. var createMethod$1 = function (IS_INCLUDES) {
  413. return function ($this, el, fromIndex) {
  414. var O = toIndexedObject($this);
  415. var length = toLength(O.length);
  416. var index = toAbsoluteIndex(fromIndex, length);
  417. var value;
  418. // Array#includes uses SameValueZero equality algorithm
  419. // eslint-disable-next-line no-self-compare -- NaN check
  420. if (IS_INCLUDES && el != el) while (length > index) {
  421. value = O[index++];
  422. // eslint-disable-next-line no-self-compare -- NaN check
  423. if (value != value) return true;
  424. // Array#indexOf ignores holes, Array#includes - not
  425. } else for (;length > index; index++) {
  426. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  427. } return !IS_INCLUDES && -1;
  428. };
  429. };
  430. var arrayIncludes = {
  431. // `Array.prototype.includes` method
  432. // https://tc39.es/ecma262/#sec-array.prototype.includes
  433. includes: createMethod$1(true),
  434. // `Array.prototype.indexOf` method
  435. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  436. indexOf: createMethod$1(false)
  437. };
  438. var indexOf = arrayIncludes.indexOf;
  439. var objectKeysInternal = function (object, names) {
  440. var O = toIndexedObject(object);
  441. var i = 0;
  442. var result = [];
  443. var key;
  444. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  445. // Don't enum bug & hidden keys
  446. while (names.length > i) if (has$1(O, key = names[i++])) {
  447. ~indexOf(result, key) || result.push(key);
  448. }
  449. return result;
  450. };
  451. // IE8- don't enum bug keys
  452. var enumBugKeys = [
  453. 'constructor',
  454. 'hasOwnProperty',
  455. 'isPrototypeOf',
  456. 'propertyIsEnumerable',
  457. 'toLocaleString',
  458. 'toString',
  459. 'valueOf'
  460. ];
  461. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  462. // `Object.getOwnPropertyNames` method
  463. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  464. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  465. return objectKeysInternal(O, hiddenKeys);
  466. };
  467. var objectGetOwnPropertyNames = {
  468. f: f$1
  469. };
  470. var f = Object.getOwnPropertySymbols;
  471. var objectGetOwnPropertySymbols = {
  472. f: f
  473. };
  474. // all object keys, includes non-enumerable and symbols
  475. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  476. var keys = objectGetOwnPropertyNames.f(anObject(it));
  477. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  478. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  479. };
  480. var copyConstructorProperties = function (target, source) {
  481. var keys = ownKeys(source);
  482. var defineProperty = objectDefineProperty.f;
  483. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  484. for (var i = 0; i < keys.length; i++) {
  485. var key = keys[i];
  486. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  487. }
  488. };
  489. var replacement = /#|\.prototype\./;
  490. var isForced = function (feature, detection) {
  491. var value = data[normalize(feature)];
  492. return value == POLYFILL ? true
  493. : value == NATIVE ? false
  494. : typeof detection == 'function' ? fails(detection)
  495. : !!detection;
  496. };
  497. var normalize = isForced.normalize = function (string) {
  498. return String(string).replace(replacement, '.').toLowerCase();
  499. };
  500. var data = isForced.data = {};
  501. var NATIVE = isForced.NATIVE = 'N';
  502. var POLYFILL = isForced.POLYFILL = 'P';
  503. var isForced_1 = isForced;
  504. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  505. /*
  506. options.target - name of the target object
  507. options.global - target is the global object
  508. options.stat - export as static methods of target
  509. options.proto - export as prototype methods of target
  510. options.real - real prototype method for the `pure` version
  511. options.forced - export even if the native feature is available
  512. options.bind - bind methods to the target, required for the `pure` version
  513. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  514. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  515. options.sham - add a flag to not completely full polyfills
  516. options.enumerable - export as enumerable property
  517. options.noTargetGet - prevent calling a getter on target
  518. */
  519. var _export = function (options, source) {
  520. var TARGET = options.target;
  521. var GLOBAL = options.global;
  522. var STATIC = options.stat;
  523. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  524. if (GLOBAL) {
  525. target = global_1;
  526. } else if (STATIC) {
  527. target = global_1[TARGET] || setGlobal(TARGET, {});
  528. } else {
  529. target = (global_1[TARGET] || {}).prototype;
  530. }
  531. if (target) for (key in source) {
  532. sourceProperty = source[key];
  533. if (options.noTargetGet) {
  534. descriptor = getOwnPropertyDescriptor(target, key);
  535. targetProperty = descriptor && descriptor.value;
  536. } else targetProperty = target[key];
  537. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  538. // contained in target
  539. if (!FORCED && targetProperty !== undefined) {
  540. if (typeof sourceProperty === typeof targetProperty) continue;
  541. copyConstructorProperties(sourceProperty, targetProperty);
  542. }
  543. // add a flag to not completely full polyfills
  544. if (options.sham || (targetProperty && targetProperty.sham)) {
  545. createNonEnumerableProperty(sourceProperty, 'sham', true);
  546. }
  547. // extend global
  548. redefine(target, key, sourceProperty, options);
  549. }
  550. };
  551. var aFunction = function (it) {
  552. if (typeof it != 'function') {
  553. throw TypeError(String(it) + ' is not a function');
  554. } return it;
  555. };
  556. // optional / simple context binding
  557. var functionBindContext = function (fn, that, length) {
  558. aFunction(fn);
  559. if (that === undefined) return fn;
  560. switch (length) {
  561. case 0: return function () {
  562. return fn.call(that);
  563. };
  564. case 1: return function (a) {
  565. return fn.call(that, a);
  566. };
  567. case 2: return function (a, b) {
  568. return fn.call(that, a, b);
  569. };
  570. case 3: return function (a, b, c) {
  571. return fn.call(that, a, b, c);
  572. };
  573. }
  574. return function (/* ...args */) {
  575. return fn.apply(that, arguments);
  576. };
  577. };
  578. // `ToObject` abstract operation
  579. // https://tc39.es/ecma262/#sec-toobject
  580. var toObject = function (argument) {
  581. return Object(requireObjectCoercible(argument));
  582. };
  583. // `IsArray` abstract operation
  584. // https://tc39.es/ecma262/#sec-isarray
  585. var isArray = Array.isArray || function isArray(arg) {
  586. return classofRaw(arg) == 'Array';
  587. };
  588. var engineIsNode = classofRaw(global_1.process) == 'process';
  589. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  590. var process = global_1.process;
  591. var versions = process && process.versions;
  592. var v8 = versions && versions.v8;
  593. var match, version;
  594. if (v8) {
  595. match = v8.split('.');
  596. version = match[0] + match[1];
  597. } else if (engineUserAgent) {
  598. match = engineUserAgent.match(/Edge\/(\d+)/);
  599. if (!match || match[1] >= 74) {
  600. match = engineUserAgent.match(/Chrome\/(\d+)/);
  601. if (match) version = match[1];
  602. }
  603. }
  604. var engineV8Version = version && +version;
  605. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  606. /* global Symbol -- required for testing */
  607. return !Symbol.sham &&
  608. // Chrome 38 Symbol has incorrect toString conversion
  609. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  610. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  611. });
  612. var useSymbolAsUid = nativeSymbol
  613. /* global Symbol -- safe */
  614. && !Symbol.sham
  615. && typeof Symbol.iterator == 'symbol';
  616. var WellKnownSymbolsStore = shared('wks');
  617. var Symbol$1 = global_1.Symbol;
  618. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  619. var wellKnownSymbol = function (name) {
  620. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  621. if (nativeSymbol && has$1(Symbol$1, name)) {
  622. WellKnownSymbolsStore[name] = Symbol$1[name];
  623. } else {
  624. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  625. }
  626. } return WellKnownSymbolsStore[name];
  627. };
  628. var SPECIES = wellKnownSymbol('species');
  629. // `ArraySpeciesCreate` abstract operation
  630. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  631. var arraySpeciesCreate = function (originalArray, length) {
  632. var C;
  633. if (isArray(originalArray)) {
  634. C = originalArray.constructor;
  635. // cross-realm fallback
  636. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  637. else if (isObject(C)) {
  638. C = C[SPECIES];
  639. if (C === null) C = undefined;
  640. }
  641. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  642. };
  643. var push = [].push;
  644. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  645. var createMethod = function (TYPE) {
  646. var IS_MAP = TYPE == 1;
  647. var IS_FILTER = TYPE == 2;
  648. var IS_SOME = TYPE == 3;
  649. var IS_EVERY = TYPE == 4;
  650. var IS_FIND_INDEX = TYPE == 6;
  651. var IS_FILTER_OUT = TYPE == 7;
  652. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  653. return function ($this, callbackfn, that, specificCreate) {
  654. var O = toObject($this);
  655. var self = indexedObject(O);
  656. var boundFunction = functionBindContext(callbackfn, that, 3);
  657. var length = toLength(self.length);
  658. var index = 0;
  659. var create = specificCreate || arraySpeciesCreate;
  660. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  661. var value, result;
  662. for (;length > index; index++) if (NO_HOLES || index in self) {
  663. value = self[index];
  664. result = boundFunction(value, index, O);
  665. if (TYPE) {
  666. if (IS_MAP) target[index] = result; // map
  667. else if (result) switch (TYPE) {
  668. case 3: return true; // some
  669. case 5: return value; // find
  670. case 6: return index; // findIndex
  671. case 2: push.call(target, value); // filter
  672. } else switch (TYPE) {
  673. case 4: return false; // every
  674. case 7: push.call(target, value); // filterOut
  675. }
  676. }
  677. }
  678. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  679. };
  680. };
  681. var arrayIteration = {
  682. // `Array.prototype.forEach` method
  683. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  684. forEach: createMethod(0),
  685. // `Array.prototype.map` method
  686. // https://tc39.es/ecma262/#sec-array.prototype.map
  687. map: createMethod(1),
  688. // `Array.prototype.filter` method
  689. // https://tc39.es/ecma262/#sec-array.prototype.filter
  690. filter: createMethod(2),
  691. // `Array.prototype.some` method
  692. // https://tc39.es/ecma262/#sec-array.prototype.some
  693. some: createMethod(3),
  694. // `Array.prototype.every` method
  695. // https://tc39.es/ecma262/#sec-array.prototype.every
  696. every: createMethod(4),
  697. // `Array.prototype.find` method
  698. // https://tc39.es/ecma262/#sec-array.prototype.find
  699. find: createMethod(5),
  700. // `Array.prototype.findIndex` method
  701. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  702. findIndex: createMethod(6),
  703. // `Array.prototype.filterOut` method
  704. // https://github.com/tc39/proposal-array-filtering
  705. filterOut: createMethod(7)
  706. };
  707. // `Object.keys` method
  708. // https://tc39.es/ecma262/#sec-object.keys
  709. var objectKeys = Object.keys || function keys(O) {
  710. return objectKeysInternal(O, enumBugKeys);
  711. };
  712. // `Object.defineProperties` method
  713. // https://tc39.es/ecma262/#sec-object.defineproperties
  714. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  715. anObject(O);
  716. var keys = objectKeys(Properties);
  717. var length = keys.length;
  718. var index = 0;
  719. var key;
  720. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  721. return O;
  722. };
  723. var html = getBuiltIn('document', 'documentElement');
  724. var GT = '>';
  725. var LT = '<';
  726. var PROTOTYPE = 'prototype';
  727. var SCRIPT = 'script';
  728. var IE_PROTO = sharedKey('IE_PROTO');
  729. var EmptyConstructor = function () { /* empty */ };
  730. var scriptTag = function (content) {
  731. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  732. };
  733. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  734. var NullProtoObjectViaActiveX = function (activeXDocument) {
  735. activeXDocument.write(scriptTag(''));
  736. activeXDocument.close();
  737. var temp = activeXDocument.parentWindow.Object;
  738. activeXDocument = null; // avoid memory leak
  739. return temp;
  740. };
  741. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  742. var NullProtoObjectViaIFrame = function () {
  743. // Thrash, waste and sodomy: IE GC bug
  744. var iframe = documentCreateElement('iframe');
  745. var JS = 'java' + SCRIPT + ':';
  746. var iframeDocument;
  747. iframe.style.display = 'none';
  748. html.appendChild(iframe);
  749. // https://github.com/zloirock/core-js/issues/475
  750. iframe.src = String(JS);
  751. iframeDocument = iframe.contentWindow.document;
  752. iframeDocument.open();
  753. iframeDocument.write(scriptTag('document.F=Object'));
  754. iframeDocument.close();
  755. return iframeDocument.F;
  756. };
  757. // Check for document.domain and active x support
  758. // No need to use active x approach when document.domain is not set
  759. // see https://github.com/es-shims/es5-shim/issues/150
  760. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  761. // avoid IE GC bug
  762. var activeXDocument;
  763. var NullProtoObject = function () {
  764. try {
  765. /* global ActiveXObject -- old IE */
  766. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  767. } catch (error) { /* ignore */ }
  768. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  769. var length = enumBugKeys.length;
  770. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  771. return NullProtoObject();
  772. };
  773. hiddenKeys$1[IE_PROTO] = true;
  774. // `Object.create` method
  775. // https://tc39.es/ecma262/#sec-object.create
  776. var objectCreate = Object.create || function create(O, Properties) {
  777. var result;
  778. if (O !== null) {
  779. EmptyConstructor[PROTOTYPE] = anObject(O);
  780. result = new EmptyConstructor();
  781. EmptyConstructor[PROTOTYPE] = null;
  782. // add "__proto__" for Object.getPrototypeOf polyfill
  783. result[IE_PROTO] = O;
  784. } else result = NullProtoObject();
  785. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  786. };
  787. var UNSCOPABLES = wellKnownSymbol('unscopables');
  788. var ArrayPrototype = Array.prototype;
  789. // Array.prototype[@@unscopables]
  790. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  791. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  792. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  793. configurable: true,
  794. value: objectCreate(null)
  795. });
  796. }
  797. // add a key to Array.prototype[@@unscopables]
  798. var addToUnscopables = function (key) {
  799. ArrayPrototype[UNSCOPABLES][key] = true;
  800. };
  801. var $find = arrayIteration.find;
  802. var FIND = 'find';
  803. var SKIPS_HOLES = true;
  804. // Shouldn't skip holes
  805. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  806. // `Array.prototype.find` method
  807. // https://tc39.es/ecma262/#sec-array.prototype.find
  808. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  809. find: function find(callbackfn /* , that = undefined */) {
  810. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  811. }
  812. });
  813. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  814. addToUnscopables(FIND);
  815. var $includes = arrayIncludes.includes;
  816. // `Array.prototype.includes` method
  817. // https://tc39.es/ecma262/#sec-array.prototype.includes
  818. _export({ target: 'Array', proto: true }, {
  819. includes: function includes(el /* , fromIndex = 0 */) {
  820. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  821. }
  822. });
  823. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  824. addToUnscopables('includes');
  825. var MATCH$1 = wellKnownSymbol('match');
  826. // `IsRegExp` abstract operation
  827. // https://tc39.es/ecma262/#sec-isregexp
  828. var isRegexp = function (it) {
  829. var isRegExp;
  830. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  831. };
  832. var notARegexp = function (it) {
  833. if (isRegexp(it)) {
  834. throw TypeError("The method doesn't accept regular expressions");
  835. } return it;
  836. };
  837. var MATCH = wellKnownSymbol('match');
  838. var correctIsRegexpLogic = function (METHOD_NAME) {
  839. var regexp = /./;
  840. try {
  841. '/./'[METHOD_NAME](regexp);
  842. } catch (error1) {
  843. try {
  844. regexp[MATCH] = false;
  845. return '/./'[METHOD_NAME](regexp);
  846. } catch (error2) { /* empty */ }
  847. } return false;
  848. };
  849. // `String.prototype.includes` method
  850. // https://tc39.es/ecma262/#sec-string.prototype.includes
  851. _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
  852. includes: function includes(searchString /* , position = 0 */) {
  853. return !!~String(requireObjectCoercible(this))
  854. .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  855. }
  856. });
  857. /**
  858. * @author zhixin wen <wenzhixin2010@gmail.com>
  859. * https://github.com/wenzhixin/bootstrap-table/
  860. * theme: https://materializecss.com/
  861. */
  862. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
  863. classes: 'table highlight',
  864. buttonsPrefix: '',
  865. buttonsClass: 'waves-effect waves-light btn',
  866. iconsPrefix: 'material-icons',
  867. icons: {
  868. paginationSwitchDown: 'grid_on',
  869. paginationSwitchUp: 'grid_off',
  870. refresh: 'refresh',
  871. toggleOff: 'tablet',
  872. toggleOn: 'tablet_android',
  873. columns: 'view_list',
  874. detailOpen: 'add',
  875. detailClose: 'remove',
  876. fullscreen: 'fullscreen',
  877. sort: 'sort',
  878. search: 'search',
  879. clearSearch: 'delete'
  880. }
  881. });
  882. $__default['default'].fn.bootstrapTable.theme = 'materialize';
  883. $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  884. _inherits(_class, _$$BootstrapTable);
  885. var _super = _createSuper(_class);
  886. function _class() {
  887. _classCallCheck(this, _class);
  888. return _super.apply(this, arguments);
  889. }
  890. _createClass(_class, [{
  891. key: "initConstants",
  892. value: function initConstants() {
  893. _get(_getPrototypeOf(_class.prototype), "initConstants", this).call(this);
  894. this.constants.classes.buttonsGroup = 'button-group';
  895. this.constants.classes.buttonsDropdown = '';
  896. this.constants.classes.input = 'input-field';
  897. this.constants.classes.input = '';
  898. this.constants.classes.paginationDropdown = '';
  899. this.constants.classes.buttonActive = 'green';
  900. this.constants.html.toolbarDropdown = ['<ul class="dropdown-content">', '</ul>'];
  901. this.constants.html.toolbarDropdownItem = '<li class="dropdown-item-marker"><label>%s</label></li>';
  902. this.constants.html.toolbarDropdownSeparator = '<li class="divider" tabindex="-1"></li>';
  903. this.constants.html.pageDropdown = ['<ul id="pagination-list-id" class="dropdown-content">', '</ul>'];
  904. this.constants.html.pageDropdownItem = '<li><a class="%s" href="#">%s</a></li>';
  905. this.constants.html.dropdownCaret = '<i class="material-icons">arrow_drop_down</i>';
  906. this.constants.html.pagination = ['<ul class="pagination%s">', '</ul>'];
  907. this.constants.html.paginationItem = '<li class="waves-effect page-item%s" aria-label="%s"><a href="#">%s</a></li>';
  908. this.constants.html.icon = '<i class="%s">%s</i>';
  909. this.constants.html.inputGroup = '%s%s';
  910. }
  911. }, {
  912. key: "initToolbar",
  913. value: function initToolbar() {
  914. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  915. this.handleToolbar();
  916. }
  917. }, {
  918. key: "handleToolbar",
  919. value: function handleToolbar() {
  920. if (this.$toolbar.find('.dropdown-toggle').length) {
  921. this.$toolbar.find('.dropdown-toggle').each(function (i, el) {
  922. if (!$__default['default'](el).next().length) {
  923. return;
  924. }
  925. var id = "toolbar-columns-id".concat(i);
  926. $__default['default'](el).next().attr('id', id);
  927. $__default['default'](el).attr('data-target', id).dropdown({
  928. alignment: 'right',
  929. constrainWidth: false,
  930. closeOnClick: false
  931. });
  932. });
  933. }
  934. }
  935. }, {
  936. key: "initPagination",
  937. value: function initPagination() {
  938. _get(_getPrototypeOf(_class.prototype), "initPagination", this).call(this);
  939. if (this.options.pagination && this.paginationParts.includes('pageSize')) {
  940. this.$pagination.find('.dropdown-toggle').attr('data-target', this.$pagination.find('.dropdown-content').attr('id')).dropdown();
  941. }
  942. }
  943. }]);
  944. return _class;
  945. }($__default['default'].BootstrapTable);
  946. })));