bootstrap-table-mobile.js 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
  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. // `Object.keys` method
  525. // https://tc39.github.io/ecma262/#sec-object.keys
  526. var objectKeys = Object.keys || function keys(O) {
  527. return objectKeysInternal(O, enumBugKeys);
  528. };
  529. // `Object.defineProperties` method
  530. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  531. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  532. anObject(O);
  533. var keys = objectKeys(Properties);
  534. var length = keys.length;
  535. var index = 0;
  536. var key;
  537. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  538. return O;
  539. };
  540. var html = getBuiltIn('document', 'documentElement');
  541. var IE_PROTO = sharedKey('IE_PROTO');
  542. var PROTOTYPE = 'prototype';
  543. var Empty = function () { /* empty */ };
  544. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  545. var createDict = function () {
  546. // Thrash, waste and sodomy: IE GC bug
  547. var iframe = documentCreateElement('iframe');
  548. var length = enumBugKeys.length;
  549. var lt = '<';
  550. var script = 'script';
  551. var gt = '>';
  552. var js = 'java' + script + ':';
  553. var iframeDocument;
  554. iframe.style.display = 'none';
  555. html.appendChild(iframe);
  556. iframe.src = String(js);
  557. iframeDocument = iframe.contentWindow.document;
  558. iframeDocument.open();
  559. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  560. iframeDocument.close();
  561. createDict = iframeDocument.F;
  562. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  563. return createDict();
  564. };
  565. // `Object.create` method
  566. // https://tc39.github.io/ecma262/#sec-object.create
  567. var objectCreate = Object.create || function create(O, Properties) {
  568. var result;
  569. if (O !== null) {
  570. Empty[PROTOTYPE] = anObject(O);
  571. result = new Empty();
  572. Empty[PROTOTYPE] = null;
  573. // add "__proto__" for Object.getPrototypeOf polyfill
  574. result[IE_PROTO] = O;
  575. } else result = createDict();
  576. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  577. };
  578. hiddenKeys[IE_PROTO] = true;
  579. var UNSCOPABLES = wellKnownSymbol('unscopables');
  580. var ArrayPrototype = Array.prototype;
  581. // Array.prototype[@@unscopables]
  582. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  583. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  584. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  585. }
  586. // add a key to Array.prototype[@@unscopables]
  587. var addToUnscopables = function (key) {
  588. ArrayPrototype[UNSCOPABLES][key] = true;
  589. };
  590. var $includes = arrayIncludes.includes;
  591. // `Array.prototype.includes` method
  592. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  593. _export({ target: 'Array', proto: true }, {
  594. includes: function includes(el /* , fromIndex = 0 */) {
  595. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  596. }
  597. });
  598. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  599. addToUnscopables('includes');
  600. var MATCH = wellKnownSymbol('match');
  601. // `IsRegExp` abstract operation
  602. // https://tc39.github.io/ecma262/#sec-isregexp
  603. var isRegexp = function (it) {
  604. var isRegExp;
  605. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  606. };
  607. var notARegexp = function (it) {
  608. if (isRegexp(it)) {
  609. throw TypeError("The method doesn't accept regular expressions");
  610. } return it;
  611. };
  612. var MATCH$1 = wellKnownSymbol('match');
  613. var correctIsRegexpLogic = function (METHOD_NAME) {
  614. var regexp = /./;
  615. try {
  616. '/./'[METHOD_NAME](regexp);
  617. } catch (e) {
  618. try {
  619. regexp[MATCH$1] = false;
  620. return '/./'[METHOD_NAME](regexp);
  621. } catch (f) { /* empty */ }
  622. } return false;
  623. };
  624. // `String.prototype.includes` method
  625. // https://tc39.github.io/ecma262/#sec-string.prototype.includes
  626. _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
  627. includes: function includes(searchString /* , position = 0 */) {
  628. return !!~String(requireObjectCoercible(this))
  629. .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  630. }
  631. });
  632. // iterable DOM collections
  633. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  634. var domIterables = {
  635. CSSRuleList: 0,
  636. CSSStyleDeclaration: 0,
  637. CSSValueList: 0,
  638. ClientRectList: 0,
  639. DOMRectList: 0,
  640. DOMStringList: 0,
  641. DOMTokenList: 1,
  642. DataTransferItemList: 0,
  643. FileList: 0,
  644. HTMLAllCollection: 0,
  645. HTMLCollection: 0,
  646. HTMLFormElement: 0,
  647. HTMLSelectElement: 0,
  648. MediaList: 0,
  649. MimeTypeArray: 0,
  650. NamedNodeMap: 0,
  651. NodeList: 1,
  652. PaintRequestList: 0,
  653. Plugin: 0,
  654. PluginArray: 0,
  655. SVGLengthList: 0,
  656. SVGNumberList: 0,
  657. SVGPathSegList: 0,
  658. SVGPointList: 0,
  659. SVGStringList: 0,
  660. SVGTransformList: 0,
  661. SourceBufferList: 0,
  662. StyleSheetList: 0,
  663. TextTrackCueList: 0,
  664. TextTrackList: 0,
  665. TouchList: 0
  666. };
  667. var aFunction$1 = function (it) {
  668. if (typeof it != 'function') {
  669. throw TypeError(String(it) + ' is not a function');
  670. } return it;
  671. };
  672. // optional / simple context binding
  673. var bindContext = function (fn, that, length) {
  674. aFunction$1(fn);
  675. if (that === undefined) return fn;
  676. switch (length) {
  677. case 0: return function () {
  678. return fn.call(that);
  679. };
  680. case 1: return function (a) {
  681. return fn.call(that, a);
  682. };
  683. case 2: return function (a, b) {
  684. return fn.call(that, a, b);
  685. };
  686. case 3: return function (a, b, c) {
  687. return fn.call(that, a, b, c);
  688. };
  689. }
  690. return function (/* ...args */) {
  691. return fn.apply(that, arguments);
  692. };
  693. };
  694. var push = [].push;
  695. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  696. var createMethod$1 = function (TYPE) {
  697. var IS_MAP = TYPE == 1;
  698. var IS_FILTER = TYPE == 2;
  699. var IS_SOME = TYPE == 3;
  700. var IS_EVERY = TYPE == 4;
  701. var IS_FIND_INDEX = TYPE == 6;
  702. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  703. return function ($this, callbackfn, that, specificCreate) {
  704. var O = toObject($this);
  705. var self = indexedObject(O);
  706. var boundFunction = bindContext(callbackfn, that, 3);
  707. var length = toLength(self.length);
  708. var index = 0;
  709. var create = specificCreate || arraySpeciesCreate;
  710. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  711. var value, result;
  712. for (;length > index; index++) if (NO_HOLES || index in self) {
  713. value = self[index];
  714. result = boundFunction(value, index, O);
  715. if (TYPE) {
  716. if (IS_MAP) target[index] = result; // map
  717. else if (result) switch (TYPE) {
  718. case 3: return true; // some
  719. case 5: return value; // find
  720. case 6: return index; // findIndex
  721. case 2: push.call(target, value); // filter
  722. } else if (IS_EVERY) return false; // every
  723. }
  724. }
  725. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  726. };
  727. };
  728. var arrayIteration = {
  729. // `Array.prototype.forEach` method
  730. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  731. forEach: createMethod$1(0),
  732. // `Array.prototype.map` method
  733. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  734. map: createMethod$1(1),
  735. // `Array.prototype.filter` method
  736. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  737. filter: createMethod$1(2),
  738. // `Array.prototype.some` method
  739. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  740. some: createMethod$1(3),
  741. // `Array.prototype.every` method
  742. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  743. every: createMethod$1(4),
  744. // `Array.prototype.find` method
  745. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  746. find: createMethod$1(5),
  747. // `Array.prototype.findIndex` method
  748. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  749. findIndex: createMethod$1(6)
  750. };
  751. var sloppyArrayMethod = function (METHOD_NAME, argument) {
  752. var method = [][METHOD_NAME];
  753. return !method || !fails(function () {
  754. // eslint-disable-next-line no-useless-call,no-throw-literal
  755. method.call(null, argument || function () { throw 1; }, 1);
  756. });
  757. };
  758. var $forEach = arrayIteration.forEach;
  759. // `Array.prototype.forEach` method implementation
  760. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  761. var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
  762. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  763. } : [].forEach;
  764. for (var COLLECTION_NAME in domIterables) {
  765. var Collection = global_1[COLLECTION_NAME];
  766. var CollectionPrototype = Collection && Collection.prototype;
  767. // some Chrome versions have non-configurable methods on DOMTokenList
  768. if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
  769. hide(CollectionPrototype, 'forEach', arrayForEach);
  770. } catch (error) {
  771. CollectionPrototype.forEach = arrayForEach;
  772. }
  773. }
  774. function _classCallCheck(instance, Constructor) {
  775. if (!(instance instanceof Constructor)) {
  776. throw new TypeError("Cannot call a class as a function");
  777. }
  778. }
  779. function _defineProperties(target, props) {
  780. for (var i = 0; i < props.length; i++) {
  781. var descriptor = props[i];
  782. descriptor.enumerable = descriptor.enumerable || false;
  783. descriptor.configurable = true;
  784. if ("value" in descriptor) descriptor.writable = true;
  785. Object.defineProperty(target, descriptor.key, descriptor);
  786. }
  787. }
  788. function _createClass(Constructor, protoProps, staticProps) {
  789. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  790. if (staticProps) _defineProperties(Constructor, staticProps);
  791. return Constructor;
  792. }
  793. function _inherits(subClass, superClass) {
  794. if (typeof superClass !== "function" && superClass !== null) {
  795. throw new TypeError("Super expression must either be null or a function");
  796. }
  797. subClass.prototype = Object.create(superClass && superClass.prototype, {
  798. constructor: {
  799. value: subClass,
  800. writable: true,
  801. configurable: true
  802. }
  803. });
  804. if (superClass) _setPrototypeOf(subClass, superClass);
  805. }
  806. function _getPrototypeOf(o) {
  807. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  808. return o.__proto__ || Object.getPrototypeOf(o);
  809. };
  810. return _getPrototypeOf(o);
  811. }
  812. function _setPrototypeOf(o, p) {
  813. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  814. o.__proto__ = p;
  815. return o;
  816. };
  817. return _setPrototypeOf(o, p);
  818. }
  819. function _assertThisInitialized(self) {
  820. if (self === void 0) {
  821. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  822. }
  823. return self;
  824. }
  825. function _possibleConstructorReturn(self, call) {
  826. if (call && (typeof call === "object" || typeof call === "function")) {
  827. return call;
  828. }
  829. return _assertThisInitialized(self);
  830. }
  831. function _superPropBase(object, property) {
  832. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  833. object = _getPrototypeOf(object);
  834. if (object === null) break;
  835. }
  836. return object;
  837. }
  838. function _get(target, property, receiver) {
  839. if (typeof Reflect !== "undefined" && Reflect.get) {
  840. _get = Reflect.get;
  841. } else {
  842. _get = function _get(target, property, receiver) {
  843. var base = _superPropBase(target, property);
  844. if (!base) return;
  845. var desc = Object.getOwnPropertyDescriptor(base, property);
  846. if (desc.get) {
  847. return desc.get.call(receiver);
  848. }
  849. return desc.value;
  850. };
  851. }
  852. return _get(target, property, receiver || target);
  853. }
  854. /**
  855. * @author: Dennis Hernández
  856. * @webSite: http://djhvscf.github.io/Blog
  857. * @update zhixin wen <wenzhixin2010@gmail.com>
  858. */
  859. var debounce = function debounce(func, wait) {
  860. var timeout = 0;
  861. return function () {
  862. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  863. args[_key] = arguments[_key];
  864. }
  865. var later = function later() {
  866. timeout = 0;
  867. func.apply(void 0, args);
  868. };
  869. clearTimeout(timeout);
  870. timeout = setTimeout(later, wait);
  871. };
  872. };
  873. $.extend($.fn.bootstrapTable.defaults, {
  874. mobileResponsive: false,
  875. minWidth: 562,
  876. minHeight: undefined,
  877. heightThreshold: 100,
  878. // just slightly larger than mobile chrome's auto-hiding toolbar
  879. checkOnInit: true,
  880. columnsHidden: []
  881. });
  882. $.BootstrapTable =
  883. /*#__PURE__*/
  884. function (_$$BootstrapTable) {
  885. _inherits(_class, _$$BootstrapTable);
  886. function _class() {
  887. _classCallCheck(this, _class);
  888. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  889. }
  890. _createClass(_class, [{
  891. key: "init",
  892. value: function init() {
  893. var _get2,
  894. _this = this;
  895. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  896. args[_key2] = arguments[_key2];
  897. }
  898. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  899. if (!this.options.mobileResponsive || !this.options.minWidth) {
  900. return;
  901. }
  902. if (this.options.minWidth < 100 && this.options.resizable) {
  903. console.info('The minWidth when the resizable extension is active should be greater or equal than 100');
  904. this.options.minWidth = 100;
  905. }
  906. var old = {
  907. width: $(window).width(),
  908. height: $(window).height()
  909. };
  910. $(window).on('resize orientationchange', debounce(function () {
  911. // reset view if height has only changed by at least the threshold.
  912. var width = $(window).width();
  913. var height = $(window).height();
  914. if (Math.abs(old.height - height) > _this.options.heightThreshold || old.width !== width) {
  915. _this.changeView(width, height);
  916. old = {
  917. width: width,
  918. height: height
  919. };
  920. }
  921. }, 200));
  922. if (this.options.checkOnInit) {
  923. var width = $(window).width();
  924. var height = $(window).height();
  925. this.changeView(width, height);
  926. old = {
  927. width: width,
  928. height: height
  929. };
  930. }
  931. }
  932. }, {
  933. key: "conditionCardView",
  934. value: function conditionCardView() {
  935. this.changeTableView(false);
  936. this.showHideColumns(false);
  937. }
  938. }, {
  939. key: "conditionFullView",
  940. value: function conditionFullView() {
  941. this.changeTableView(true);
  942. this.showHideColumns(true);
  943. }
  944. }, {
  945. key: "changeTableView",
  946. value: function changeTableView(cardViewState) {
  947. this.options.cardView = cardViewState;
  948. this.toggleView();
  949. }
  950. }, {
  951. key: "showHideColumns",
  952. value: function showHideColumns(checked) {
  953. var _this2 = this;
  954. if (this.options.columnsHidden.length > 0) {
  955. this.columns.forEach(function (column) {
  956. if (_this2.options.columnsHidden.includes(column.field)) {
  957. if (column.visible !== checked) {
  958. _this2._toggleColumn(_this2.fieldsColumnsIndex[column.field], checked, true);
  959. }
  960. }
  961. });
  962. }
  963. }
  964. }, {
  965. key: "changeView",
  966. value: function changeView(width, height) {
  967. if (this.options.minHeight) {
  968. if (width <= this.options.minWidth && height <= this.options.minHeight) {
  969. this.conditionCardView();
  970. } else if (width > this.options.minWidth && height > this.options.minHeight) {
  971. this.conditionFullView();
  972. }
  973. } else {
  974. if (width <= this.options.minWidth) {
  975. this.conditionCardView();
  976. } else if (width > this.options.minWidth) {
  977. this.conditionFullView();
  978. }
  979. }
  980. this.resetView();
  981. }
  982. }]);
  983. return _class;
  984. }($.BootstrapTable);
  985. }));