bootstrap-table-vue.esm.js 45 KB

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