bootstrap-table-vue.js 49 KB

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