bootstrap-table-vue.js 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :
  3. typeof define === 'function' && define.amd ? define(['vue'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.vue));
  5. }(this, (function (vue) { 'use strict';
  6. function _defineProperty(obj, key, value) {
  7. if (key in obj) {
  8. Object.defineProperty(obj, key, {
  9. value: value,
  10. enumerable: true,
  11. configurable: true,
  12. writable: true
  13. });
  14. } else {
  15. obj[key] = value;
  16. }
  17. return obj;
  18. }
  19. function ownKeys$1(object, enumerableOnly) {
  20. var keys = Object.keys(object);
  21. if (Object.getOwnPropertySymbols) {
  22. var symbols = Object.getOwnPropertySymbols(object);
  23. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  24. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  25. });
  26. keys.push.apply(keys, symbols);
  27. }
  28. return keys;
  29. }
  30. function _objectSpread2(target) {
  31. for (var i = 1; i < arguments.length; i++) {
  32. var source = arguments[i] != null ? arguments[i] : {};
  33. if (i % 2) {
  34. ownKeys$1(Object(source), true).forEach(function (key) {
  35. _defineProperty(target, key, source[key]);
  36. });
  37. } else if (Object.getOwnPropertyDescriptors) {
  38. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  39. } else {
  40. ownKeys$1(Object(source)).forEach(function (key) {
  41. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  42. });
  43. }
  44. }
  45. return target;
  46. }
  47. function _toConsumableArray(arr) {
  48. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  49. }
  50. function _arrayWithoutHoles(arr) {
  51. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  52. }
  53. function _iterableToArray(iter) {
  54. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  55. }
  56. function _unsupportedIterableToArray(o, minLen) {
  57. if (!o) return;
  58. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  59. var n = Object.prototype.toString.call(o).slice(8, -1);
  60. if (n === "Object" && o.constructor) n = o.constructor.name;
  61. if (n === "Map" || n === "Set") return Array.from(o);
  62. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  63. }
  64. function _arrayLikeToArray(arr, len) {
  65. if (len == null || len > arr.length) len = arr.length;
  66. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  67. return arr2;
  68. }
  69. function _nonIterableSpread() {
  70. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  71. }
  72. function _createForOfIteratorHelper(o, allowArrayLike) {
  73. var it;
  74. if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
  75. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  76. if (it) o = it;
  77. var i = 0;
  78. var F = function () {};
  79. return {
  80. s: F,
  81. n: function () {
  82. if (i >= o.length) return {
  83. done: true
  84. };
  85. return {
  86. done: false,
  87. value: o[i++]
  88. };
  89. },
  90. e: function (e) {
  91. throw e;
  92. },
  93. f: F
  94. };
  95. }
  96. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  97. }
  98. var normalCompletion = true,
  99. didErr = false,
  100. err;
  101. return {
  102. s: function () {
  103. it = o[Symbol.iterator]();
  104. },
  105. n: function () {
  106. var step = it.next();
  107. normalCompletion = step.done;
  108. return step;
  109. },
  110. e: function (e) {
  111. didErr = true;
  112. err = e;
  113. },
  114. f: function () {
  115. try {
  116. if (!normalCompletion && it.return != null) it.return();
  117. } finally {
  118. if (didErr) throw err;
  119. }
  120. }
  121. };
  122. }
  123. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  124. function createCommonjsModule(fn, module) {
  125. return module = { exports: {} }, fn(module, module.exports), module.exports;
  126. }
  127. var check = function (it) {
  128. return it && it.Math == Math && it;
  129. };
  130. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  131. var global_1 =
  132. /* global globalThis -- safe */
  133. check(typeof globalThis == 'object' && globalThis) ||
  134. check(typeof window == 'object' && window) ||
  135. check(typeof self == 'object' && self) ||
  136. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  137. // eslint-disable-next-line no-new-func -- fallback
  138. (function () { return this; })() || Function('return this')();
  139. var fails = function (exec) {
  140. try {
  141. return !!exec();
  142. } catch (error) {
  143. return true;
  144. }
  145. };
  146. // Detect IE8's incomplete defineProperty implementation
  147. var descriptors = !fails(function () {
  148. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  149. });
  150. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  151. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  152. // Nashorn ~ JDK8 bug
  153. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  154. // `Object.prototype.propertyIsEnumerable` method implementation
  155. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  156. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  157. var descriptor = getOwnPropertyDescriptor$1(this, V);
  158. return !!descriptor && descriptor.enumerable;
  159. } : nativePropertyIsEnumerable;
  160. var objectPropertyIsEnumerable = {
  161. f: f$4
  162. };
  163. var createPropertyDescriptor = function (bitmap, value) {
  164. return {
  165. enumerable: !(bitmap & 1),
  166. configurable: !(bitmap & 2),
  167. writable: !(bitmap & 4),
  168. value: value
  169. };
  170. };
  171. var toString = {}.toString;
  172. var classofRaw = function (it) {
  173. return toString.call(it).slice(8, -1);
  174. };
  175. var split = ''.split;
  176. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  177. var indexedObject = fails(function () {
  178. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  179. // eslint-disable-next-line no-prototype-builtins -- safe
  180. return !Object('z').propertyIsEnumerable(0);
  181. }) ? function (it) {
  182. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  183. } : Object;
  184. // `RequireObjectCoercible` abstract operation
  185. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  186. var requireObjectCoercible = function (it) {
  187. if (it == undefined) throw TypeError("Can't call method on " + it);
  188. return it;
  189. };
  190. // toObject with fallback for non-array-like ES3 strings
  191. var toIndexedObject = function (it) {
  192. return indexedObject(requireObjectCoercible(it));
  193. };
  194. var isObject = function (it) {
  195. return typeof it === 'object' ? it !== null : typeof it === 'function';
  196. };
  197. // `ToPrimitive` abstract operation
  198. // https://tc39.es/ecma262/#sec-toprimitive
  199. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  200. // and the second argument - flag - preferred type is a string
  201. var toPrimitive = function (input, PREFERRED_STRING) {
  202. if (!isObject(input)) return input;
  203. var fn, val;
  204. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  205. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  206. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  207. throw TypeError("Can't convert object to primitive value");
  208. };
  209. var hasOwnProperty = {}.hasOwnProperty;
  210. var has$1 = function (it, key) {
  211. return hasOwnProperty.call(it, key);
  212. };
  213. var document = global_1.document;
  214. // typeof document.createElement is 'object' in old IE
  215. var EXISTS = isObject(document) && isObject(document.createElement);
  216. var documentCreateElement = function (it) {
  217. return EXISTS ? document.createElement(it) : {};
  218. };
  219. // Thank's IE8 for his funny defineProperty
  220. var ie8DomDefine = !descriptors && !fails(function () {
  221. return Object.defineProperty(documentCreateElement('div'), 'a', {
  222. get: function () { return 7; }
  223. }).a != 7;
  224. });
  225. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  226. // `Object.getOwnPropertyDescriptor` method
  227. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  228. var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  229. O = toIndexedObject(O);
  230. P = toPrimitive(P, true);
  231. if (ie8DomDefine) try {
  232. return nativeGetOwnPropertyDescriptor(O, P);
  233. } catch (error) { /* empty */ }
  234. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  235. };
  236. var objectGetOwnPropertyDescriptor = {
  237. f: f$3
  238. };
  239. var anObject = function (it) {
  240. if (!isObject(it)) {
  241. throw TypeError(String(it) + ' is not an object');
  242. } return it;
  243. };
  244. var nativeDefineProperty = Object.defineProperty;
  245. // `Object.defineProperty` method
  246. // https://tc39.es/ecma262/#sec-object.defineproperty
  247. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  248. anObject(O);
  249. P = toPrimitive(P, true);
  250. anObject(Attributes);
  251. if (ie8DomDefine) try {
  252. return nativeDefineProperty(O, P, Attributes);
  253. } catch (error) { /* empty */ }
  254. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  255. if ('value' in Attributes) O[P] = Attributes.value;
  256. return O;
  257. };
  258. var objectDefineProperty = {
  259. f: f$2
  260. };
  261. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  262. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  263. } : function (object, key, value) {
  264. object[key] = value;
  265. return object;
  266. };
  267. var setGlobal = function (key, value) {
  268. try {
  269. createNonEnumerableProperty(global_1, key, value);
  270. } catch (error) {
  271. global_1[key] = value;
  272. } return value;
  273. };
  274. var SHARED = '__core-js_shared__';
  275. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  276. var sharedStore = store$1;
  277. var functionToString = Function.toString;
  278. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  279. if (typeof sharedStore.inspectSource != 'function') {
  280. sharedStore.inspectSource = function (it) {
  281. return functionToString.call(it);
  282. };
  283. }
  284. var inspectSource = sharedStore.inspectSource;
  285. var WeakMap$1 = global_1.WeakMap;
  286. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  287. var shared = createCommonjsModule(function (module) {
  288. (module.exports = function (key, value) {
  289. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  290. })('versions', []).push({
  291. version: '3.9.1',
  292. mode: 'global',
  293. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  294. });
  295. });
  296. var id = 0;
  297. var postfix = Math.random();
  298. var uid = function (key) {
  299. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  300. };
  301. var keys = shared('keys');
  302. var sharedKey = function (key) {
  303. return keys[key] || (keys[key] = uid(key));
  304. };
  305. var hiddenKeys$1 = {};
  306. var WeakMap = global_1.WeakMap;
  307. var set, get, has;
  308. var enforce = function (it) {
  309. return has(it) ? get(it) : set(it, {});
  310. };
  311. var getterFor = function (TYPE) {
  312. return function (it) {
  313. var state;
  314. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  315. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  316. } return state;
  317. };
  318. };
  319. if (nativeWeakMap) {
  320. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  321. var wmget = store.get;
  322. var wmhas = store.has;
  323. var wmset = store.set;
  324. set = function (it, metadata) {
  325. metadata.facade = it;
  326. wmset.call(store, it, metadata);
  327. return metadata;
  328. };
  329. get = function (it) {
  330. return wmget.call(store, it) || {};
  331. };
  332. has = function (it) {
  333. return wmhas.call(store, it);
  334. };
  335. } else {
  336. var STATE = sharedKey('state');
  337. hiddenKeys$1[STATE] = true;
  338. set = function (it, metadata) {
  339. metadata.facade = it;
  340. createNonEnumerableProperty(it, STATE, metadata);
  341. return metadata;
  342. };
  343. get = function (it) {
  344. return has$1(it, STATE) ? it[STATE] : {};
  345. };
  346. has = function (it) {
  347. return has$1(it, STATE);
  348. };
  349. }
  350. var internalState = {
  351. set: set,
  352. get: get,
  353. has: has,
  354. enforce: enforce,
  355. getterFor: getterFor
  356. };
  357. var redefine = createCommonjsModule(function (module) {
  358. var getInternalState = internalState.get;
  359. var enforceInternalState = internalState.enforce;
  360. var TEMPLATE = String(String).split('String');
  361. (module.exports = function (O, key, value, options) {
  362. var unsafe = options ? !!options.unsafe : false;
  363. var simple = options ? !!options.enumerable : false;
  364. var noTargetGet = options ? !!options.noTargetGet : false;
  365. var state;
  366. if (typeof value == 'function') {
  367. if (typeof key == 'string' && !has$1(value, 'name')) {
  368. createNonEnumerableProperty(value, 'name', key);
  369. }
  370. state = enforceInternalState(value);
  371. if (!state.source) {
  372. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  373. }
  374. }
  375. if (O === global_1) {
  376. if (simple) O[key] = value;
  377. else setGlobal(key, value);
  378. return;
  379. } else if (!unsafe) {
  380. delete O[key];
  381. } else if (!noTargetGet && O[key]) {
  382. simple = true;
  383. }
  384. if (simple) O[key] = value;
  385. else createNonEnumerableProperty(O, key, value);
  386. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  387. })(Function.prototype, 'toString', function toString() {
  388. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  389. });
  390. });
  391. var path = global_1;
  392. var aFunction = function (variable) {
  393. return typeof variable == 'function' ? variable : undefined;
  394. };
  395. var getBuiltIn = function (namespace, method) {
  396. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
  397. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  398. };
  399. var ceil = Math.ceil;
  400. var floor$1 = Math.floor;
  401. // `ToInteger` abstract operation
  402. // https://tc39.es/ecma262/#sec-tointeger
  403. var toInteger = function (argument) {
  404. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$1 : ceil)(argument);
  405. };
  406. var min$2 = Math.min;
  407. // `ToLength` abstract operation
  408. // https://tc39.es/ecma262/#sec-tolength
  409. var toLength = function (argument) {
  410. return argument > 0 ? min$2(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  411. };
  412. var max$1 = Math.max;
  413. var min$1 = Math.min;
  414. // Helper for a popular repeating case of the spec:
  415. // Let integer be ? ToInteger(index).
  416. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  417. var toAbsoluteIndex = function (index, length) {
  418. var integer = toInteger(index);
  419. return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
  420. };
  421. // `Array.prototype.{ indexOf, includes }` methods implementation
  422. var createMethod$1 = function (IS_INCLUDES) {
  423. return function ($this, el, fromIndex) {
  424. var O = toIndexedObject($this);
  425. var length = toLength(O.length);
  426. var index = toAbsoluteIndex(fromIndex, length);
  427. var value;
  428. // Array#includes uses SameValueZero equality algorithm
  429. // eslint-disable-next-line no-self-compare -- NaN check
  430. if (IS_INCLUDES && el != el) while (length > index) {
  431. value = O[index++];
  432. // eslint-disable-next-line no-self-compare -- NaN check
  433. if (value != value) return true;
  434. // Array#indexOf ignores holes, Array#includes - not
  435. } else for (;length > index; index++) {
  436. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  437. } return !IS_INCLUDES && -1;
  438. };
  439. };
  440. var arrayIncludes = {
  441. // `Array.prototype.includes` method
  442. // https://tc39.es/ecma262/#sec-array.prototype.includes
  443. includes: createMethod$1(true),
  444. // `Array.prototype.indexOf` method
  445. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  446. indexOf: createMethod$1(false)
  447. };
  448. var indexOf = arrayIncludes.indexOf;
  449. var objectKeysInternal = function (object, names) {
  450. var O = toIndexedObject(object);
  451. var i = 0;
  452. var result = [];
  453. var key;
  454. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  455. // Don't enum bug & hidden keys
  456. while (names.length > i) if (has$1(O, key = names[i++])) {
  457. ~indexOf(result, key) || result.push(key);
  458. }
  459. return result;
  460. };
  461. // IE8- don't enum bug keys
  462. var enumBugKeys = [
  463. 'constructor',
  464. 'hasOwnProperty',
  465. 'isPrototypeOf',
  466. 'propertyIsEnumerable',
  467. 'toLocaleString',
  468. 'toString',
  469. 'valueOf'
  470. ];
  471. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  472. // `Object.getOwnPropertyNames` method
  473. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  474. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  475. return objectKeysInternal(O, hiddenKeys);
  476. };
  477. var objectGetOwnPropertyNames = {
  478. f: f$1
  479. };
  480. var f = Object.getOwnPropertySymbols;
  481. var objectGetOwnPropertySymbols = {
  482. f: f
  483. };
  484. // all object keys, includes non-enumerable and symbols
  485. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  486. var keys = objectGetOwnPropertyNames.f(anObject(it));
  487. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  488. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  489. };
  490. var copyConstructorProperties = function (target, source) {
  491. var keys = ownKeys(source);
  492. var defineProperty = objectDefineProperty.f;
  493. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  494. for (var i = 0; i < keys.length; i++) {
  495. var key = keys[i];
  496. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  497. }
  498. };
  499. var replacement = /#|\.prototype\./;
  500. var isForced = function (feature, detection) {
  501. var value = data[normalize(feature)];
  502. return value == POLYFILL ? true
  503. : value == NATIVE ? false
  504. : typeof detection == 'function' ? fails(detection)
  505. : !!detection;
  506. };
  507. var normalize = isForced.normalize = function (string) {
  508. return String(string).replace(replacement, '.').toLowerCase();
  509. };
  510. var data = isForced.data = {};
  511. var NATIVE = isForced.NATIVE = 'N';
  512. var POLYFILL = isForced.POLYFILL = 'P';
  513. var isForced_1 = isForced;
  514. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  515. /*
  516. options.target - name of the target object
  517. options.global - target is the global object
  518. options.stat - export as static methods of target
  519. options.proto - export as prototype methods of target
  520. options.real - real prototype method for the `pure` version
  521. options.forced - export even if the native feature is available
  522. options.bind - bind methods to the target, required for the `pure` version
  523. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  524. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  525. options.sham - add a flag to not completely full polyfills
  526. options.enumerable - export as enumerable property
  527. options.noTargetGet - prevent calling a getter on target
  528. */
  529. var _export = function (options, source) {
  530. var TARGET = options.target;
  531. var GLOBAL = options.global;
  532. var STATIC = options.stat;
  533. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  534. if (GLOBAL) {
  535. target = global_1;
  536. } else if (STATIC) {
  537. target = global_1[TARGET] || setGlobal(TARGET, {});
  538. } else {
  539. target = (global_1[TARGET] || {}).prototype;
  540. }
  541. if (target) for (key in source) {
  542. sourceProperty = source[key];
  543. if (options.noTargetGet) {
  544. descriptor = getOwnPropertyDescriptor(target, key);
  545. targetProperty = descriptor && descriptor.value;
  546. } else targetProperty = target[key];
  547. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  548. // contained in target
  549. if (!FORCED && targetProperty !== undefined) {
  550. if (typeof sourceProperty === typeof targetProperty) continue;
  551. copyConstructorProperties(sourceProperty, targetProperty);
  552. }
  553. // add a flag to not completely full polyfills
  554. if (options.sham || (targetProperty && targetProperty.sham)) {
  555. createNonEnumerableProperty(sourceProperty, 'sham', true);
  556. }
  557. // extend global
  558. redefine(target, key, sourceProperty, options);
  559. }
  560. };
  561. // `RegExp.prototype.flags` getter implementation
  562. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  563. var regexpFlags = function () {
  564. var that = anObject(this);
  565. var result = '';
  566. if (that.global) result += 'g';
  567. if (that.ignoreCase) result += 'i';
  568. if (that.multiline) result += 'm';
  569. if (that.dotAll) result += 's';
  570. if (that.unicode) result += 'u';
  571. if (that.sticky) result += 'y';
  572. return result;
  573. };
  574. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  575. // so we use an intermediate function.
  576. function RE(s, f) {
  577. return RegExp(s, f);
  578. }
  579. var UNSUPPORTED_Y$1 = fails(function () {
  580. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  581. var re = RE('a', 'y');
  582. re.lastIndex = 2;
  583. return re.exec('abcd') != null;
  584. });
  585. var BROKEN_CARET = fails(function () {
  586. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  587. var re = RE('^r', 'gy');
  588. re.lastIndex = 2;
  589. return re.exec('str') != null;
  590. });
  591. var regexpStickyHelpers = {
  592. UNSUPPORTED_Y: UNSUPPORTED_Y$1,
  593. BROKEN_CARET: BROKEN_CARET
  594. };
  595. var nativeExec = RegExp.prototype.exec;
  596. // This always refers to the native implementation, because the
  597. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  598. // which loads this file before patching the method.
  599. var nativeReplace = String.prototype.replace;
  600. var patchedExec = nativeExec;
  601. var UPDATES_LAST_INDEX_WRONG = (function () {
  602. var re1 = /a/;
  603. var re2 = /b*/g;
  604. nativeExec.call(re1, 'a');
  605. nativeExec.call(re2, 'a');
  606. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  607. })();
  608. var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
  609. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  610. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  611. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  612. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  613. if (PATCH) {
  614. patchedExec = function exec(str) {
  615. var re = this;
  616. var lastIndex, reCopy, match, i;
  617. var sticky = UNSUPPORTED_Y && re.sticky;
  618. var flags = regexpFlags.call(re);
  619. var source = re.source;
  620. var charsAdded = 0;
  621. var strCopy = str;
  622. if (sticky) {
  623. flags = flags.replace('y', '');
  624. if (flags.indexOf('g') === -1) {
  625. flags += 'g';
  626. }
  627. strCopy = String(str).slice(re.lastIndex);
  628. // Support anchored sticky behavior.
  629. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  630. source = '(?: ' + source + ')';
  631. strCopy = ' ' + strCopy;
  632. charsAdded++;
  633. }
  634. // ^(? + rx + ) is needed, in combination with some str slicing, to
  635. // simulate the 'y' flag.
  636. reCopy = new RegExp('^(?:' + source + ')', flags);
  637. }
  638. if (NPCG_INCLUDED) {
  639. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  640. }
  641. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  642. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  643. if (sticky) {
  644. if (match) {
  645. match.input = match.input.slice(charsAdded);
  646. match[0] = match[0].slice(charsAdded);
  647. match.index = re.lastIndex;
  648. re.lastIndex += match[0].length;
  649. } else re.lastIndex = 0;
  650. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  651. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  652. }
  653. if (NPCG_INCLUDED && match && match.length > 1) {
  654. // Fix browsers whose `exec` methods don't consistently return `undefined`
  655. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  656. nativeReplace.call(match[0], reCopy, function () {
  657. for (i = 1; i < arguments.length - 2; i++) {
  658. if (arguments[i] === undefined) match[i] = undefined;
  659. }
  660. });
  661. }
  662. return match;
  663. };
  664. }
  665. var regexpExec = patchedExec;
  666. // `RegExp.prototype.exec` method
  667. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  668. _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
  669. exec: regexpExec
  670. });
  671. var engineIsNode = classofRaw(global_1.process) == 'process';
  672. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  673. var process = global_1.process;
  674. var versions = process && process.versions;
  675. var v8 = versions && versions.v8;
  676. var match, version;
  677. if (v8) {
  678. match = v8.split('.');
  679. version = match[0] + match[1];
  680. } else if (engineUserAgent) {
  681. match = engineUserAgent.match(/Edge\/(\d+)/);
  682. if (!match || match[1] >= 74) {
  683. match = engineUserAgent.match(/Chrome\/(\d+)/);
  684. if (match) version = match[1];
  685. }
  686. }
  687. var engineV8Version = version && +version;
  688. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  689. /* global Symbol -- required for testing */
  690. return !Symbol.sham &&
  691. // Chrome 38 Symbol has incorrect toString conversion
  692. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  693. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  694. });
  695. var useSymbolAsUid = nativeSymbol
  696. /* global Symbol -- safe */
  697. && !Symbol.sham
  698. && typeof Symbol.iterator == 'symbol';
  699. var WellKnownSymbolsStore = shared('wks');
  700. var Symbol$1 = global_1.Symbol;
  701. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  702. var wellKnownSymbol = function (name) {
  703. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  704. if (nativeSymbol && has$1(Symbol$1, name)) {
  705. WellKnownSymbolsStore[name] = Symbol$1[name];
  706. } else {
  707. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  708. }
  709. } return WellKnownSymbolsStore[name];
  710. };
  711. // TODO: Remove from `core-js@4` since it's moved to entry points
  712. var SPECIES$2 = wellKnownSymbol('species');
  713. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  714. // #replace needs built-in support for named groups.
  715. // #match works fine because it just return the exec results, even if it has
  716. // a "grops" property.
  717. var re = /./;
  718. re.exec = function () {
  719. var result = [];
  720. result.groups = { a: '7' };
  721. return result;
  722. };
  723. return ''.replace(re, '$<a>') !== '7';
  724. });
  725. // IE <= 11 replaces $0 with the whole match, as if it was $&
  726. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  727. var REPLACE_KEEPS_$0 = (function () {
  728. return 'a'.replace(/./, '$0') === '$0';
  729. })();
  730. var REPLACE = wellKnownSymbol('replace');
  731. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  732. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  733. if (/./[REPLACE]) {
  734. return /./[REPLACE]('a', '$0') === '';
  735. }
  736. return false;
  737. })();
  738. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  739. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  740. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  741. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  742. var re = /(?:)/;
  743. var originalExec = re.exec;
  744. re.exec = function () { return originalExec.apply(this, arguments); };
  745. var result = 'ab'.split(re);
  746. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  747. });
  748. var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
  749. var SYMBOL = wellKnownSymbol(KEY);
  750. var DELEGATES_TO_SYMBOL = !fails(function () {
  751. // String methods call symbol-named RegEp methods
  752. var O = {};
  753. O[SYMBOL] = function () { return 7; };
  754. return ''[KEY](O) != 7;
  755. });
  756. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  757. // Symbol-named RegExp methods call .exec
  758. var execCalled = false;
  759. var re = /a/;
  760. if (KEY === 'split') {
  761. // We can't use real regex here since it causes deoptimization
  762. // and serious performance degradation in V8
  763. // https://github.com/zloirock/core-js/issues/306
  764. re = {};
  765. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  766. // a new one. We need to return the patched regex when creating the new one.
  767. re.constructor = {};
  768. re.constructor[SPECIES$2] = function () { return re; };
  769. re.flags = '';
  770. re[SYMBOL] = /./[SYMBOL];
  771. }
  772. re.exec = function () { execCalled = true; return null; };
  773. re[SYMBOL]('');
  774. return !execCalled;
  775. });
  776. if (
  777. !DELEGATES_TO_SYMBOL ||
  778. !DELEGATES_TO_EXEC ||
  779. (KEY === 'replace' && !(
  780. REPLACE_SUPPORTS_NAMED_GROUPS &&
  781. REPLACE_KEEPS_$0 &&
  782. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  783. )) ||
  784. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  785. ) {
  786. var nativeRegExpMethod = /./[SYMBOL];
  787. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  788. if (regexp.exec === regexpExec) {
  789. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  790. // The native String method already delegates to @@method (this
  791. // polyfilled function), leasing to infinite recursion.
  792. // We avoid it by directly calling the native @@method method.
  793. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  794. }
  795. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  796. }
  797. return { done: false };
  798. }, {
  799. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  800. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  801. });
  802. var stringMethod = methods[0];
  803. var regexMethod = methods[1];
  804. redefine(String.prototype, KEY, stringMethod);
  805. redefine(RegExp.prototype, SYMBOL, length == 2
  806. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  807. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  808. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  809. // 21.2.5.6 RegExp.prototype[@@match](string)
  810. // 21.2.5.9 RegExp.prototype[@@search](string)
  811. : function (string) { return regexMethod.call(string, this); }
  812. );
  813. }
  814. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  815. };
  816. // `String.prototype.{ codePointAt, at }` methods implementation
  817. var createMethod = function (CONVERT_TO_STRING) {
  818. return function ($this, pos) {
  819. var S = String(requireObjectCoercible($this));
  820. var position = toInteger(pos);
  821. var size = S.length;
  822. var first, second;
  823. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  824. first = S.charCodeAt(position);
  825. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  826. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  827. ? CONVERT_TO_STRING ? S.charAt(position) : first
  828. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  829. };
  830. };
  831. var stringMultibyte = {
  832. // `String.prototype.codePointAt` method
  833. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  834. codeAt: createMethod(false),
  835. // `String.prototype.at` method
  836. // https://github.com/mathiasbynens/String.prototype.at
  837. charAt: createMethod(true)
  838. };
  839. var charAt = stringMultibyte.charAt;
  840. // `AdvanceStringIndex` abstract operation
  841. // https://tc39.es/ecma262/#sec-advancestringindex
  842. var advanceStringIndex = function (S, index, unicode) {
  843. return index + (unicode ? charAt(S, index).length : 1);
  844. };
  845. // `ToObject` abstract operation
  846. // https://tc39.es/ecma262/#sec-toobject
  847. var toObject = function (argument) {
  848. return Object(requireObjectCoercible(argument));
  849. };
  850. var floor = Math.floor;
  851. var replace = ''.replace;
  852. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  853. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  854. // https://tc39.es/ecma262/#sec-getsubstitution
  855. var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  856. var tailPos = position + matched.length;
  857. var m = captures.length;
  858. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  859. if (namedCaptures !== undefined) {
  860. namedCaptures = toObject(namedCaptures);
  861. symbols = SUBSTITUTION_SYMBOLS;
  862. }
  863. return replace.call(replacement, symbols, function (match, ch) {
  864. var capture;
  865. switch (ch.charAt(0)) {
  866. case '$': return '$';
  867. case '&': return matched;
  868. case '`': return str.slice(0, position);
  869. case "'": return str.slice(tailPos);
  870. case '<':
  871. capture = namedCaptures[ch.slice(1, -1)];
  872. break;
  873. default: // \d\d?
  874. var n = +ch;
  875. if (n === 0) return match;
  876. if (n > m) {
  877. var f = floor(n / 10);
  878. if (f === 0) return match;
  879. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  880. return match;
  881. }
  882. capture = captures[n - 1];
  883. }
  884. return capture === undefined ? '' : capture;
  885. });
  886. };
  887. // `RegExpExec` abstract operation
  888. // https://tc39.es/ecma262/#sec-regexpexec
  889. var regexpExecAbstract = function (R, S) {
  890. var exec = R.exec;
  891. if (typeof exec === 'function') {
  892. var result = exec.call(R, S);
  893. if (typeof result !== 'object') {
  894. throw TypeError('RegExp exec method returned something other than an Object or null');
  895. }
  896. return result;
  897. }
  898. if (classofRaw(R) !== 'RegExp') {
  899. throw TypeError('RegExp#exec called on incompatible receiver');
  900. }
  901. return regexpExec.call(R, S);
  902. };
  903. var max = Math.max;
  904. var min = Math.min;
  905. var maybeToString = function (it) {
  906. return it === undefined ? it : String(it);
  907. };
  908. // @@replace logic
  909. fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  910. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  911. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  912. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  913. return [
  914. // `String.prototype.replace` method
  915. // https://tc39.es/ecma262/#sec-string.prototype.replace
  916. function replace(searchValue, replaceValue) {
  917. var O = requireObjectCoercible(this);
  918. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  919. return replacer !== undefined
  920. ? replacer.call(searchValue, O, replaceValue)
  921. : nativeReplace.call(String(O), searchValue, replaceValue);
  922. },
  923. // `RegExp.prototype[@@replace]` method
  924. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  925. function (regexp, replaceValue) {
  926. if (
  927. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  928. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  929. ) {
  930. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  931. if (res.done) return res.value;
  932. }
  933. var rx = anObject(regexp);
  934. var S = String(this);
  935. var functionalReplace = typeof replaceValue === 'function';
  936. if (!functionalReplace) replaceValue = String(replaceValue);
  937. var global = rx.global;
  938. if (global) {
  939. var fullUnicode = rx.unicode;
  940. rx.lastIndex = 0;
  941. }
  942. var results = [];
  943. while (true) {
  944. var result = regexpExecAbstract(rx, S);
  945. if (result === null) break;
  946. results.push(result);
  947. if (!global) break;
  948. var matchStr = String(result[0]);
  949. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  950. }
  951. var accumulatedResult = '';
  952. var nextSourcePosition = 0;
  953. for (var i = 0; i < results.length; i++) {
  954. result = results[i];
  955. var matched = String(result[0]);
  956. var position = max(min(toInteger(result.index), S.length), 0);
  957. var captures = [];
  958. // NOTE: This is equivalent to
  959. // captures = result.slice(1).map(maybeToString)
  960. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  961. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  962. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  963. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  964. var namedCaptures = result.groups;
  965. if (functionalReplace) {
  966. var replacerArgs = [matched].concat(captures, position, S);
  967. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  968. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  969. } else {
  970. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  971. }
  972. if (position >= nextSourcePosition) {
  973. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  974. nextSourcePosition = position + matched.length;
  975. }
  976. }
  977. return accumulatedResult + S.slice(nextSourcePosition);
  978. }
  979. ];
  980. });
  981. // `IsArray` abstract operation
  982. // https://tc39.es/ecma262/#sec-isarray
  983. var isArray = Array.isArray || function isArray(arg) {
  984. return classofRaw(arg) == 'Array';
  985. };
  986. var createProperty = function (object, key, value) {
  987. var propertyKey = toPrimitive(key);
  988. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  989. else object[propertyKey] = value;
  990. };
  991. var SPECIES$1 = wellKnownSymbol('species');
  992. // `ArraySpeciesCreate` abstract operation
  993. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  994. var arraySpeciesCreate = function (originalArray, length) {
  995. var C;
  996. if (isArray(originalArray)) {
  997. C = originalArray.constructor;
  998. // cross-realm fallback
  999. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  1000. else if (isObject(C)) {
  1001. C = C[SPECIES$1];
  1002. if (C === null) C = undefined;
  1003. }
  1004. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  1005. };
  1006. var SPECIES = wellKnownSymbol('species');
  1007. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1008. // We can't use this feature detection in V8 since it causes
  1009. // deoptimization and serious performance degradation
  1010. // https://github.com/zloirock/core-js/issues/677
  1011. return engineV8Version >= 51 || !fails(function () {
  1012. var array = [];
  1013. var constructor = array.constructor = {};
  1014. constructor[SPECIES] = function () {
  1015. return { foo: 1 };
  1016. };
  1017. return array[METHOD_NAME](Boolean).foo !== 1;
  1018. });
  1019. };
  1020. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1021. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1022. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1023. // We can't use this feature detection in V8 since it causes
  1024. // deoptimization and serious performance degradation
  1025. // https://github.com/zloirock/core-js/issues/679
  1026. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1027. var array = [];
  1028. array[IS_CONCAT_SPREADABLE] = false;
  1029. return array.concat()[0] !== array;
  1030. });
  1031. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1032. var isConcatSpreadable = function (O) {
  1033. if (!isObject(O)) return false;
  1034. var spreadable = O[IS_CONCAT_SPREADABLE];
  1035. return spreadable !== undefined ? !!spreadable : isArray(O);
  1036. };
  1037. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1038. // `Array.prototype.concat` method
  1039. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1040. // with adding support of @@isConcatSpreadable and @@species
  1041. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1042. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1043. concat: function concat(arg) {
  1044. var O = toObject(this);
  1045. var A = arraySpeciesCreate(O, 0);
  1046. var n = 0;
  1047. var i, k, length, len, E;
  1048. for (i = -1, length = arguments.length; i < length; i++) {
  1049. E = i === -1 ? O : arguments[i];
  1050. if (isConcatSpreadable(E)) {
  1051. len = toLength(E.length);
  1052. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1053. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1054. } else {
  1055. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1056. createProperty(A, n++, E);
  1057. }
  1058. }
  1059. A.length = n;
  1060. return A;
  1061. }
  1062. });
  1063. var $ = window.jQuery;
  1064. var deepCopy = function deepCopy(arg) {
  1065. if (arg === undefined) {
  1066. return arg;
  1067. }
  1068. return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
  1069. };
  1070. var script = {
  1071. name: 'BootstrapTable',
  1072. props: {
  1073. columns: {
  1074. type: Array,
  1075. require: true
  1076. },
  1077. data: {
  1078. type: [Array, Object],
  1079. default: function _default() {
  1080. return undefined;
  1081. }
  1082. },
  1083. options: {
  1084. type: Object,
  1085. default: function _default() {
  1086. return {};
  1087. }
  1088. }
  1089. },
  1090. mounted: function mounted() {
  1091. var _this = this;
  1092. this.$table = $(this.$el);
  1093. this.$table.on('all.bs.table', function (e, name, args) {
  1094. var eventName = $.fn.bootstrapTable.events[name];
  1095. eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase();
  1096. _this.$emit.apply(_this, ['on-all'].concat(_toConsumableArray(args)));
  1097. _this.$emit.apply(_this, [eventName].concat(_toConsumableArray(args)));
  1098. });
  1099. this._initTable();
  1100. },
  1101. methods: _objectSpread2({
  1102. _initTable: function _initTable() {
  1103. var options = _objectSpread2(_objectSpread2({}, deepCopy(this.options)), {}, {
  1104. columns: deepCopy(this.columns),
  1105. data: deepCopy(this.data)
  1106. });
  1107. if (!this._hasInit) {
  1108. this.$table.bootstrapTable(options);
  1109. this._hasInit = true;
  1110. } else {
  1111. this.refreshOptions(options);
  1112. }
  1113. }
  1114. }, function () {
  1115. var res = {};
  1116. var _iterator = _createForOfIteratorHelper($.fn.bootstrapTable.methods),
  1117. _step;
  1118. try {
  1119. var _loop = function _loop() {
  1120. var method = _step.value;
  1121. res[method] = function () {
  1122. var _this$$table;
  1123. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1124. args[_key] = arguments[_key];
  1125. }
  1126. return (_this$$table = this.$table).bootstrapTable.apply(_this$$table, [method].concat(args));
  1127. };
  1128. };
  1129. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1130. _loop();
  1131. }
  1132. } catch (err) {
  1133. _iterator.e(err);
  1134. } finally {
  1135. _iterator.f();
  1136. }
  1137. return res;
  1138. }()),
  1139. watch: {
  1140. options: {
  1141. handler: function handler() {
  1142. this._initTable();
  1143. },
  1144. deep: true
  1145. },
  1146. columns: {
  1147. handler: function handler() {
  1148. this._initTable();
  1149. },
  1150. deep: true
  1151. },
  1152. data: {
  1153. handler: function handler() {
  1154. this.load(deepCopy(this.data));
  1155. },
  1156. deep: true
  1157. }
  1158. }
  1159. };
  1160. function render(_ctx, _cache, $props, $setup, $data, $options) {
  1161. return vue.openBlock(), vue.createBlock("table");
  1162. }
  1163. script.render = render;
  1164. script.__file = "src/vue/BootstrapTable.vue";
  1165. return script;
  1166. })));