bootstrap-table-vue.esm.js 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930
  1. function ownKeys$1(object, enumerableOnly) {
  2. var keys = Object.keys(object);
  3. if (Object.getOwnPropertySymbols) {
  4. var symbols = Object.getOwnPropertySymbols(object);
  5. enumerableOnly && (symbols = symbols.filter(function (sym) {
  6. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  7. })), keys.push.apply(keys, symbols);
  8. }
  9. return keys;
  10. }
  11. function _objectSpread2(target) {
  12. for (var i = 1; i < arguments.length; i++) {
  13. var source = null != arguments[i] ? arguments[i] : {};
  14. i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
  15. _defineProperty(target, key, source[key]);
  16. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
  17. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  18. });
  19. }
  20. return target;
  21. }
  22. function _defineProperty(obj, key, value) {
  23. if (key in obj) {
  24. Object.defineProperty(obj, key, {
  25. value: value,
  26. enumerable: true,
  27. configurable: true,
  28. writable: true
  29. });
  30. } else {
  31. obj[key] = value;
  32. }
  33. return obj;
  34. }
  35. function _toConsumableArray(arr) {
  36. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  37. }
  38. function _arrayWithoutHoles(arr) {
  39. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  40. }
  41. function _iterableToArray(iter) {
  42. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  43. }
  44. function _unsupportedIterableToArray(o, minLen) {
  45. if (!o) return;
  46. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  47. var n = Object.prototype.toString.call(o).slice(8, -1);
  48. if (n === "Object" && o.constructor) n = o.constructor.name;
  49. if (n === "Map" || n === "Set") return Array.from(o);
  50. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  51. }
  52. function _arrayLikeToArray(arr, len) {
  53. if (len == null || len > arr.length) len = arr.length;
  54. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  55. return arr2;
  56. }
  57. function _nonIterableSpread() {
  58. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  59. }
  60. function _createForOfIteratorHelper(o, allowArrayLike) {
  61. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  62. if (!it) {
  63. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  64. if (it) o = it;
  65. var i = 0;
  66. var F = function () {};
  67. return {
  68. s: F,
  69. n: function () {
  70. if (i >= o.length) return {
  71. done: true
  72. };
  73. return {
  74. done: false,
  75. value: o[i++]
  76. };
  77. },
  78. e: function (e) {
  79. throw e;
  80. },
  81. f: F
  82. };
  83. }
  84. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  85. }
  86. var normalCompletion = true,
  87. didErr = false,
  88. err;
  89. return {
  90. s: function () {
  91. it = it.call(o);
  92. },
  93. n: function () {
  94. var step = it.next();
  95. normalCompletion = step.done;
  96. return step;
  97. },
  98. e: function (e) {
  99. didErr = true;
  100. err = e;
  101. },
  102. f: function () {
  103. try {
  104. if (!normalCompletion && it.return != null) it.return();
  105. } finally {
  106. if (didErr) throw err;
  107. }
  108. }
  109. };
  110. }
  111. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  112. function createCommonjsModule(fn, module) {
  113. return module = { exports: {} }, fn(module, module.exports), module.exports;
  114. }
  115. var check = function (it) {
  116. return it && it.Math == Math && it;
  117. };
  118. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  119. var global_1 =
  120. // eslint-disable-next-line es/no-global-this -- safe
  121. check(typeof globalThis == 'object' && globalThis) ||
  122. check(typeof window == 'object' && window) ||
  123. // eslint-disable-next-line no-restricted-globals -- safe
  124. check(typeof self == 'object' && self) ||
  125. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  126. // eslint-disable-next-line no-new-func -- fallback
  127. (function () { return this; })() || Function('return this')();
  128. var fails = function (exec) {
  129. try {
  130. return !!exec();
  131. } catch (error) {
  132. return true;
  133. }
  134. };
  135. // Detect IE8's incomplete defineProperty implementation
  136. var descriptors = !fails(function () {
  137. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  138. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  139. });
  140. var functionBindNative = !fails(function () {
  141. var test = (function () { /* empty */ }).bind();
  142. // eslint-disable-next-line no-prototype-builtins -- safe
  143. return typeof test != 'function' || test.hasOwnProperty('prototype');
  144. });
  145. var call$2 = Function.prototype.call;
  146. var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
  147. return call$2.apply(call$2, arguments);
  148. };
  149. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  150. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  151. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  152. // Nashorn ~ JDK8 bug
  153. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  154. // `Object.prototype.propertyIsEnumerable` method implementation
  155. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  156. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  157. var descriptor = getOwnPropertyDescriptor$1(this, V);
  158. return !!descriptor && descriptor.enumerable;
  159. } : $propertyIsEnumerable;
  160. var objectPropertyIsEnumerable = {
  161. f: f$5
  162. };
  163. var createPropertyDescriptor = function (bitmap, value) {
  164. return {
  165. enumerable: !(bitmap & 1),
  166. configurable: !(bitmap & 2),
  167. writable: !(bitmap & 4),
  168. value: value
  169. };
  170. };
  171. var FunctionPrototype$2 = Function.prototype;
  172. var bind = FunctionPrototype$2.bind;
  173. var call$1 = FunctionPrototype$2.call;
  174. var uncurryThis = functionBindNative && bind.bind(call$1, call$1);
  175. var functionUncurryThis = functionBindNative ? function (fn) {
  176. return fn && uncurryThis(fn);
  177. } : function (fn) {
  178. return fn && function () {
  179. return call$1.apply(fn, arguments);
  180. };
  181. };
  182. var toString$1 = functionUncurryThis({}.toString);
  183. var stringSlice$4 = functionUncurryThis(''.slice);
  184. var classofRaw = function (it) {
  185. return stringSlice$4(toString$1(it), 8, -1);
  186. };
  187. var Object$4 = global_1.Object;
  188. var split = functionUncurryThis(''.split);
  189. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  190. var indexedObject = fails(function () {
  191. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  192. // eslint-disable-next-line no-prototype-builtins -- safe
  193. return !Object$4('z').propertyIsEnumerable(0);
  194. }) ? function (it) {
  195. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  196. } : Object$4;
  197. var TypeError$9 = global_1.TypeError;
  198. // `RequireObjectCoercible` abstract operation
  199. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  200. var requireObjectCoercible = function (it) {
  201. if (it == undefined) throw TypeError$9("Can't call method on " + it);
  202. return it;
  203. };
  204. // toObject with fallback for non-array-like ES3 strings
  205. var toIndexedObject = function (it) {
  206. return indexedObject(requireObjectCoercible(it));
  207. };
  208. // `IsCallable` abstract operation
  209. // https://tc39.es/ecma262/#sec-iscallable
  210. var isCallable = function (argument) {
  211. return typeof argument == 'function';
  212. };
  213. var isObject = function (it) {
  214. return typeof it == 'object' ? it !== null : isCallable(it);
  215. };
  216. var aFunction = function (argument) {
  217. return isCallable(argument) ? argument : undefined;
  218. };
  219. var getBuiltIn = function (namespace, method) {
  220. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  221. };
  222. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  223. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  224. var process = global_1.process;
  225. var Deno = global_1.Deno;
  226. var versions = process && process.versions || Deno && Deno.version;
  227. var v8 = versions && versions.v8;
  228. var match, version;
  229. if (v8) {
  230. match = v8.split('.');
  231. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  232. // but their correct versions are not interesting for us
  233. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  234. }
  235. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  236. // so check `userAgent` even if `.v8` exists, but 0
  237. if (!version && engineUserAgent) {
  238. match = engineUserAgent.match(/Edge\/(\d+)/);
  239. if (!match || match[1] >= 74) {
  240. match = engineUserAgent.match(/Chrome\/(\d+)/);
  241. if (match) version = +match[1];
  242. }
  243. }
  244. var engineV8Version = version;
  245. /* eslint-disable es/no-symbol -- required for testing */
  246. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  247. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  248. var symbol = Symbol();
  249. // Chrome 38 Symbol has incorrect toString conversion
  250. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  251. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  252. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  253. !Symbol.sham && engineV8Version && engineV8Version < 41;
  254. });
  255. /* eslint-disable es/no-symbol -- required for testing */
  256. var useSymbolAsUid = nativeSymbol
  257. && !Symbol.sham
  258. && typeof Symbol.iterator == 'symbol';
  259. var Object$3 = global_1.Object;
  260. var isSymbol = useSymbolAsUid ? function (it) {
  261. return typeof it == 'symbol';
  262. } : function (it) {
  263. var $Symbol = getBuiltIn('Symbol');
  264. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  265. };
  266. var String$3 = global_1.String;
  267. var tryToString = function (argument) {
  268. try {
  269. return String$3(argument);
  270. } catch (error) {
  271. return 'Object';
  272. }
  273. };
  274. var TypeError$8 = global_1.TypeError;
  275. // `Assert: IsCallable(argument) is true`
  276. var aCallable = function (argument) {
  277. if (isCallable(argument)) return argument;
  278. throw TypeError$8(tryToString(argument) + ' is not a function');
  279. };
  280. // `GetMethod` abstract operation
  281. // https://tc39.es/ecma262/#sec-getmethod
  282. var getMethod = function (V, P) {
  283. var func = V[P];
  284. return func == null ? undefined : aCallable(func);
  285. };
  286. var TypeError$7 = global_1.TypeError;
  287. // `OrdinaryToPrimitive` abstract operation
  288. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  289. var ordinaryToPrimitive = function (input, pref) {
  290. var fn, val;
  291. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  292. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  293. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  294. throw TypeError$7("Can't convert object to primitive value");
  295. };
  296. // eslint-disable-next-line es/no-object-defineproperty -- safe
  297. var defineProperty = Object.defineProperty;
  298. var setGlobal = function (key, value) {
  299. try {
  300. defineProperty(global_1, key, { value: value, configurable: true, writable: true });
  301. } catch (error) {
  302. global_1[key] = value;
  303. } return value;
  304. };
  305. var SHARED = '__core-js_shared__';
  306. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  307. var sharedStore = store$1;
  308. var shared = createCommonjsModule(function (module) {
  309. (module.exports = function (key, value) {
  310. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  311. })('versions', []).push({
  312. version: '3.21.1',
  313. mode: 'global',
  314. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  315. license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
  316. source: 'https://github.com/zloirock/core-js'
  317. });
  318. });
  319. var Object$2 = global_1.Object;
  320. // `ToObject` abstract operation
  321. // https://tc39.es/ecma262/#sec-toobject
  322. var toObject = function (argument) {
  323. return Object$2(requireObjectCoercible(argument));
  324. };
  325. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  326. // `HasOwnProperty` abstract operation
  327. // https://tc39.es/ecma262/#sec-hasownproperty
  328. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  329. return hasOwnProperty(toObject(it), key);
  330. };
  331. var id = 0;
  332. var postfix = Math.random();
  333. var toString = functionUncurryThis(1.0.toString);
  334. var uid = function (key) {
  335. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  336. };
  337. var WellKnownSymbolsStore = shared('wks');
  338. var Symbol$1 = global_1.Symbol;
  339. var symbolFor = Symbol$1 && Symbol$1['for'];
  340. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  341. var wellKnownSymbol = function (name) {
  342. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  343. var description = 'Symbol.' + name;
  344. if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
  345. WellKnownSymbolsStore[name] = Symbol$1[name];
  346. } else if (useSymbolAsUid && symbolFor) {
  347. WellKnownSymbolsStore[name] = symbolFor(description);
  348. } else {
  349. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  350. }
  351. } return WellKnownSymbolsStore[name];
  352. };
  353. var TypeError$6 = global_1.TypeError;
  354. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  355. // `ToPrimitive` abstract operation
  356. // https://tc39.es/ecma262/#sec-toprimitive
  357. var toPrimitive = function (input, pref) {
  358. if (!isObject(input) || isSymbol(input)) return input;
  359. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  360. var result;
  361. if (exoticToPrim) {
  362. if (pref === undefined) pref = 'default';
  363. result = functionCall(exoticToPrim, input, pref);
  364. if (!isObject(result) || isSymbol(result)) return result;
  365. throw TypeError$6("Can't convert object to primitive value");
  366. }
  367. if (pref === undefined) pref = 'number';
  368. return ordinaryToPrimitive(input, pref);
  369. };
  370. // `ToPropertyKey` abstract operation
  371. // https://tc39.es/ecma262/#sec-topropertykey
  372. var toPropertyKey = function (argument) {
  373. var key = toPrimitive(argument, 'string');
  374. return isSymbol(key) ? key : key + '';
  375. };
  376. var document$1 = global_1.document;
  377. // typeof document.createElement is 'object' in old IE
  378. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  379. var documentCreateElement = function (it) {
  380. return EXISTS$1 ? document$1.createElement(it) : {};
  381. };
  382. // Thanks to IE8 for its funny defineProperty
  383. var ie8DomDefine = !descriptors && !fails(function () {
  384. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  385. return Object.defineProperty(documentCreateElement('div'), 'a', {
  386. get: function () { return 7; }
  387. }).a != 7;
  388. });
  389. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  390. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  391. // `Object.getOwnPropertyDescriptor` method
  392. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  393. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  394. O = toIndexedObject(O);
  395. P = toPropertyKey(P);
  396. if (ie8DomDefine) try {
  397. return $getOwnPropertyDescriptor$1(O, P);
  398. } catch (error) { /* empty */ }
  399. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  400. };
  401. var objectGetOwnPropertyDescriptor = {
  402. f: f$4
  403. };
  404. // V8 ~ Chrome 36-
  405. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  406. var v8PrototypeDefineBug = descriptors && fails(function () {
  407. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  408. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  409. value: 42,
  410. writable: false
  411. }).prototype != 42;
  412. });
  413. var String$2 = global_1.String;
  414. var TypeError$5 = global_1.TypeError;
  415. // `Assert: Type(argument) is Object`
  416. var anObject = function (argument) {
  417. if (isObject(argument)) return argument;
  418. throw TypeError$5(String$2(argument) + ' is not an object');
  419. };
  420. var TypeError$4 = global_1.TypeError;
  421. // eslint-disable-next-line es/no-object-defineproperty -- safe
  422. var $defineProperty = Object.defineProperty;
  423. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  424. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  425. var ENUMERABLE = 'enumerable';
  426. var CONFIGURABLE$1 = 'configurable';
  427. var WRITABLE = 'writable';
  428. // `Object.defineProperty` method
  429. // https://tc39.es/ecma262/#sec-object.defineproperty
  430. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  431. anObject(O);
  432. P = toPropertyKey(P);
  433. anObject(Attributes);
  434. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  435. var current = $getOwnPropertyDescriptor(O, P);
  436. if (current && current[WRITABLE]) {
  437. O[P] = Attributes.value;
  438. Attributes = {
  439. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  440. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  441. writable: false
  442. };
  443. }
  444. } return $defineProperty(O, P, Attributes);
  445. } : $defineProperty : function defineProperty(O, P, Attributes) {
  446. anObject(O);
  447. P = toPropertyKey(P);
  448. anObject(Attributes);
  449. if (ie8DomDefine) try {
  450. return $defineProperty(O, P, Attributes);
  451. } catch (error) { /* empty */ }
  452. if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
  453. if ('value' in Attributes) O[P] = Attributes.value;
  454. return O;
  455. };
  456. var objectDefineProperty = {
  457. f: f$3
  458. };
  459. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  460. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  461. } : function (object, key, value) {
  462. object[key] = value;
  463. return object;
  464. };
  465. var functionToString = functionUncurryThis(Function.toString);
  466. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  467. if (!isCallable(sharedStore.inspectSource)) {
  468. sharedStore.inspectSource = function (it) {
  469. return functionToString(it);
  470. };
  471. }
  472. var inspectSource = sharedStore.inspectSource;
  473. var WeakMap$1 = global_1.WeakMap;
  474. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  475. var keys = shared('keys');
  476. var sharedKey = function (key) {
  477. return keys[key] || (keys[key] = uid(key));
  478. };
  479. var hiddenKeys$1 = {};
  480. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  481. var TypeError$3 = global_1.TypeError;
  482. var WeakMap = global_1.WeakMap;
  483. var set, get, has;
  484. var enforce = function (it) {
  485. return has(it) ? get(it) : set(it, {});
  486. };
  487. var getterFor = function (TYPE) {
  488. return function (it) {
  489. var state;
  490. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  491. throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
  492. } return state;
  493. };
  494. };
  495. if (nativeWeakMap || sharedStore.state) {
  496. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  497. var wmget = functionUncurryThis(store.get);
  498. var wmhas = functionUncurryThis(store.has);
  499. var wmset = functionUncurryThis(store.set);
  500. set = function (it, metadata) {
  501. if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  502. metadata.facade = it;
  503. wmset(store, it, metadata);
  504. return metadata;
  505. };
  506. get = function (it) {
  507. return wmget(store, it) || {};
  508. };
  509. has = function (it) {
  510. return wmhas(store, it);
  511. };
  512. } else {
  513. var STATE = sharedKey('state');
  514. hiddenKeys$1[STATE] = true;
  515. set = function (it, metadata) {
  516. if (hasOwnProperty_1(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  517. metadata.facade = it;
  518. createNonEnumerableProperty(it, STATE, metadata);
  519. return metadata;
  520. };
  521. get = function (it) {
  522. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  523. };
  524. has = function (it) {
  525. return hasOwnProperty_1(it, STATE);
  526. };
  527. }
  528. var internalState = {
  529. set: set,
  530. get: get,
  531. has: has,
  532. enforce: enforce,
  533. getterFor: getterFor
  534. };
  535. var FunctionPrototype$1 = Function.prototype;
  536. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  537. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  538. var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
  539. // additional protection from minified / mangled / dropped function names
  540. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  541. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
  542. var functionName = {
  543. EXISTS: EXISTS,
  544. PROPER: PROPER,
  545. CONFIGURABLE: CONFIGURABLE
  546. };
  547. var redefine = createCommonjsModule(function (module) {
  548. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  549. var getInternalState = internalState.get;
  550. var enforceInternalState = internalState.enforce;
  551. var TEMPLATE = String(String).split('String');
  552. (module.exports = function (O, key, value, options) {
  553. var unsafe = options ? !!options.unsafe : false;
  554. var simple = options ? !!options.enumerable : false;
  555. var noTargetGet = options ? !!options.noTargetGet : false;
  556. var name = options && options.name !== undefined ? options.name : key;
  557. var state;
  558. if (isCallable(value)) {
  559. if (String(name).slice(0, 7) === 'Symbol(') {
  560. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  561. }
  562. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  563. createNonEnumerableProperty(value, 'name', name);
  564. }
  565. state = enforceInternalState(value);
  566. if (!state.source) {
  567. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  568. }
  569. }
  570. if (O === global_1) {
  571. if (simple) O[key] = value;
  572. else setGlobal(key, value);
  573. return;
  574. } else if (!unsafe) {
  575. delete O[key];
  576. } else if (!noTargetGet && O[key]) {
  577. simple = true;
  578. }
  579. if (simple) O[key] = value;
  580. else createNonEnumerableProperty(O, key, value);
  581. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  582. })(Function.prototype, 'toString', function toString() {
  583. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  584. });
  585. });
  586. var ceil = Math.ceil;
  587. var floor$1 = Math.floor;
  588. // `ToIntegerOrInfinity` abstract operation
  589. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  590. var toIntegerOrInfinity = function (argument) {
  591. var number = +argument;
  592. // eslint-disable-next-line no-self-compare -- safe
  593. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  594. };
  595. var max$1 = Math.max;
  596. var min$2 = Math.min;
  597. // Helper for a popular repeating case of the spec:
  598. // Let integer be ? ToInteger(index).
  599. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  600. var toAbsoluteIndex = function (index, length) {
  601. var integer = toIntegerOrInfinity(index);
  602. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  603. };
  604. var min$1 = Math.min;
  605. // `ToLength` abstract operation
  606. // https://tc39.es/ecma262/#sec-tolength
  607. var toLength = function (argument) {
  608. return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  609. };
  610. // `LengthOfArrayLike` abstract operation
  611. // https://tc39.es/ecma262/#sec-lengthofarraylike
  612. var lengthOfArrayLike = function (obj) {
  613. return toLength(obj.length);
  614. };
  615. // `Array.prototype.{ indexOf, includes }` methods implementation
  616. var createMethod$1 = function (IS_INCLUDES) {
  617. return function ($this, el, fromIndex) {
  618. var O = toIndexedObject($this);
  619. var length = lengthOfArrayLike(O);
  620. var index = toAbsoluteIndex(fromIndex, length);
  621. var value;
  622. // Array#includes uses SameValueZero equality algorithm
  623. // eslint-disable-next-line no-self-compare -- NaN check
  624. if (IS_INCLUDES && el != el) while (length > index) {
  625. value = O[index++];
  626. // eslint-disable-next-line no-self-compare -- NaN check
  627. if (value != value) return true;
  628. // Array#indexOf ignores holes, Array#includes - not
  629. } else for (;length > index; index++) {
  630. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  631. } return !IS_INCLUDES && -1;
  632. };
  633. };
  634. var arrayIncludes = {
  635. // `Array.prototype.includes` method
  636. // https://tc39.es/ecma262/#sec-array.prototype.includes
  637. includes: createMethod$1(true),
  638. // `Array.prototype.indexOf` method
  639. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  640. indexOf: createMethod$1(false)
  641. };
  642. var indexOf$1 = arrayIncludes.indexOf;
  643. var push$1 = functionUncurryThis([].push);
  644. var objectKeysInternal = function (object, names) {
  645. var O = toIndexedObject(object);
  646. var i = 0;
  647. var result = [];
  648. var key;
  649. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
  650. // Don't enum bug & hidden keys
  651. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  652. ~indexOf$1(result, key) || push$1(result, key);
  653. }
  654. return result;
  655. };
  656. // IE8- don't enum bug keys
  657. var enumBugKeys = [
  658. 'constructor',
  659. 'hasOwnProperty',
  660. 'isPrototypeOf',
  661. 'propertyIsEnumerable',
  662. 'toLocaleString',
  663. 'toString',
  664. 'valueOf'
  665. ];
  666. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  667. // `Object.getOwnPropertyNames` method
  668. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  669. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  670. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  671. return objectKeysInternal(O, hiddenKeys);
  672. };
  673. var objectGetOwnPropertyNames = {
  674. f: f$2
  675. };
  676. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  677. var f$1 = Object.getOwnPropertySymbols;
  678. var objectGetOwnPropertySymbols = {
  679. f: f$1
  680. };
  681. var concat$1 = functionUncurryThis([].concat);
  682. // all object keys, includes non-enumerable and symbols
  683. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  684. var keys = objectGetOwnPropertyNames.f(anObject(it));
  685. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  686. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  687. };
  688. var copyConstructorProperties = function (target, source, exceptions) {
  689. var keys = ownKeys(source);
  690. var defineProperty = objectDefineProperty.f;
  691. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  692. for (var i = 0; i < keys.length; i++) {
  693. var key = keys[i];
  694. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  695. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  696. }
  697. }
  698. };
  699. var replacement = /#|\.prototype\./;
  700. var isForced = function (feature, detection) {
  701. var value = data[normalize(feature)];
  702. return value == POLYFILL ? true
  703. : value == NATIVE ? false
  704. : isCallable(detection) ? fails(detection)
  705. : !!detection;
  706. };
  707. var normalize = isForced.normalize = function (string) {
  708. return String(string).replace(replacement, '.').toLowerCase();
  709. };
  710. var data = isForced.data = {};
  711. var NATIVE = isForced.NATIVE = 'N';
  712. var POLYFILL = isForced.POLYFILL = 'P';
  713. var isForced_1 = isForced;
  714. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  715. /*
  716. options.target - name of the target object
  717. options.global - target is the global object
  718. options.stat - export as static methods of target
  719. options.proto - export as prototype methods of target
  720. options.real - real prototype method for the `pure` version
  721. options.forced - export even if the native feature is available
  722. options.bind - bind methods to the target, required for the `pure` version
  723. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  724. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  725. options.sham - add a flag to not completely full polyfills
  726. options.enumerable - export as enumerable property
  727. options.noTargetGet - prevent calling a getter on target
  728. options.name - the .name of the function if it does not match the key
  729. */
  730. var _export = function (options, source) {
  731. var TARGET = options.target;
  732. var GLOBAL = options.global;
  733. var STATIC = options.stat;
  734. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  735. if (GLOBAL) {
  736. target = global_1;
  737. } else if (STATIC) {
  738. target = global_1[TARGET] || setGlobal(TARGET, {});
  739. } else {
  740. target = (global_1[TARGET] || {}).prototype;
  741. }
  742. if (target) for (key in source) {
  743. sourceProperty = source[key];
  744. if (options.noTargetGet) {
  745. descriptor = getOwnPropertyDescriptor(target, key);
  746. targetProperty = descriptor && descriptor.value;
  747. } else targetProperty = target[key];
  748. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  749. // contained in target
  750. if (!FORCED && targetProperty !== undefined) {
  751. if (typeof sourceProperty == typeof targetProperty) continue;
  752. copyConstructorProperties(sourceProperty, targetProperty);
  753. }
  754. // add a flag to not completely full polyfills
  755. if (options.sham || (targetProperty && targetProperty.sham)) {
  756. createNonEnumerableProperty(sourceProperty, 'sham', true);
  757. }
  758. // extend global
  759. redefine(target, key, sourceProperty, options);
  760. }
  761. };
  762. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  763. var test = {};
  764. test[TO_STRING_TAG$1] = 'z';
  765. var toStringTagSupport = String(test) === '[object z]';
  766. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  767. var Object$1 = global_1.Object;
  768. // ES3 wrong here
  769. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  770. // fallback for IE11 Script Access Denied error
  771. var tryGet = function (it, key) {
  772. try {
  773. return it[key];
  774. } catch (error) { /* empty */ }
  775. };
  776. // getting tag from ES6+ `Object.prototype.toString`
  777. var classof = toStringTagSupport ? classofRaw : function (it) {
  778. var O, tag, result;
  779. return it === undefined ? 'Undefined' : it === null ? 'Null'
  780. // @@toStringTag case
  781. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  782. // builtinTag case
  783. : CORRECT_ARGUMENTS ? classofRaw(O)
  784. // ES3 arguments fallback
  785. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  786. };
  787. var String$1 = global_1.String;
  788. var toString_1 = function (argument) {
  789. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  790. return String$1(argument);
  791. };
  792. // `RegExp.prototype.flags` getter implementation
  793. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  794. var regexpFlags = function () {
  795. var that = anObject(this);
  796. var result = '';
  797. if (that.global) result += 'g';
  798. if (that.ignoreCase) result += 'i';
  799. if (that.multiline) result += 'm';
  800. if (that.dotAll) result += 's';
  801. if (that.unicode) result += 'u';
  802. if (that.sticky) result += 'y';
  803. return result;
  804. };
  805. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  806. var $RegExp$2 = global_1.RegExp;
  807. var UNSUPPORTED_Y$1 = fails(function () {
  808. var re = $RegExp$2('a', 'y');
  809. re.lastIndex = 2;
  810. return re.exec('abcd') != null;
  811. });
  812. // UC Browser bug
  813. // https://github.com/zloirock/core-js/issues/1008
  814. var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
  815. return !$RegExp$2('a', 'y').sticky;
  816. });
  817. var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
  818. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  819. var re = $RegExp$2('^r', 'gy');
  820. re.lastIndex = 2;
  821. return re.exec('str') != null;
  822. });
  823. var regexpStickyHelpers = {
  824. BROKEN_CARET: BROKEN_CARET,
  825. MISSED_STICKY: MISSED_STICKY,
  826. UNSUPPORTED_Y: UNSUPPORTED_Y$1
  827. };
  828. // `Object.keys` method
  829. // https://tc39.es/ecma262/#sec-object.keys
  830. // eslint-disable-next-line es/no-object-keys -- safe
  831. var objectKeys = Object.keys || function keys(O) {
  832. return objectKeysInternal(O, enumBugKeys);
  833. };
  834. // `Object.defineProperties` method
  835. // https://tc39.es/ecma262/#sec-object.defineproperties
  836. // eslint-disable-next-line es/no-object-defineproperties -- safe
  837. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  838. anObject(O);
  839. var props = toIndexedObject(Properties);
  840. var keys = objectKeys(Properties);
  841. var length = keys.length;
  842. var index = 0;
  843. var key;
  844. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  845. return O;
  846. };
  847. var objectDefineProperties = {
  848. f: f
  849. };
  850. var html = getBuiltIn('document', 'documentElement');
  851. /* global ActiveXObject -- old IE, WSH */
  852. var GT = '>';
  853. var LT = '<';
  854. var PROTOTYPE = 'prototype';
  855. var SCRIPT = 'script';
  856. var IE_PROTO = sharedKey('IE_PROTO');
  857. var EmptyConstructor = function () { /* empty */ };
  858. var scriptTag = function (content) {
  859. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  860. };
  861. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  862. var NullProtoObjectViaActiveX = function (activeXDocument) {
  863. activeXDocument.write(scriptTag(''));
  864. activeXDocument.close();
  865. var temp = activeXDocument.parentWindow.Object;
  866. activeXDocument = null; // avoid memory leak
  867. return temp;
  868. };
  869. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  870. var NullProtoObjectViaIFrame = function () {
  871. // Thrash, waste and sodomy: IE GC bug
  872. var iframe = documentCreateElement('iframe');
  873. var JS = 'java' + SCRIPT + ':';
  874. var iframeDocument;
  875. iframe.style.display = 'none';
  876. html.appendChild(iframe);
  877. // https://github.com/zloirock/core-js/issues/475
  878. iframe.src = String(JS);
  879. iframeDocument = iframe.contentWindow.document;
  880. iframeDocument.open();
  881. iframeDocument.write(scriptTag('document.F=Object'));
  882. iframeDocument.close();
  883. return iframeDocument.F;
  884. };
  885. // Check for document.domain and active x support
  886. // No need to use active x approach when document.domain is not set
  887. // see https://github.com/es-shims/es5-shim/issues/150
  888. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  889. // avoid IE GC bug
  890. var activeXDocument;
  891. var NullProtoObject = function () {
  892. try {
  893. activeXDocument = new ActiveXObject('htmlfile');
  894. } catch (error) { /* ignore */ }
  895. NullProtoObject = typeof document != 'undefined'
  896. ? document.domain && activeXDocument
  897. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  898. : NullProtoObjectViaIFrame()
  899. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  900. var length = enumBugKeys.length;
  901. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  902. return NullProtoObject();
  903. };
  904. hiddenKeys$1[IE_PROTO] = true;
  905. // `Object.create` method
  906. // https://tc39.es/ecma262/#sec-object.create
  907. var objectCreate = Object.create || function create(O, Properties) {
  908. var result;
  909. if (O !== null) {
  910. EmptyConstructor[PROTOTYPE] = anObject(O);
  911. result = new EmptyConstructor();
  912. EmptyConstructor[PROTOTYPE] = null;
  913. // add "__proto__" for Object.getPrototypeOf polyfill
  914. result[IE_PROTO] = O;
  915. } else result = NullProtoObject();
  916. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  917. };
  918. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  919. var $RegExp$1 = global_1.RegExp;
  920. var regexpUnsupportedDotAll = fails(function () {
  921. var re = $RegExp$1('.', 's');
  922. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  923. });
  924. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  925. var $RegExp = global_1.RegExp;
  926. var regexpUnsupportedNcg = fails(function () {
  927. var re = $RegExp('(?<a>b)', 'g');
  928. return re.exec('b').groups.a !== 'b' ||
  929. 'b'.replace(re, '$<a>c') !== 'bc';
  930. });
  931. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  932. /* eslint-disable regexp/no-useless-quantifier -- testing */
  933. var getInternalState = internalState.get;
  934. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  935. var nativeExec = RegExp.prototype.exec;
  936. var patchedExec = nativeExec;
  937. var charAt$3 = functionUncurryThis(''.charAt);
  938. var indexOf = functionUncurryThis(''.indexOf);
  939. var replace$1 = functionUncurryThis(''.replace);
  940. var stringSlice$3 = functionUncurryThis(''.slice);
  941. var UPDATES_LAST_INDEX_WRONG = (function () {
  942. var re1 = /a/;
  943. var re2 = /b*/g;
  944. functionCall(nativeExec, re1, 'a');
  945. functionCall(nativeExec, re2, 'a');
  946. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  947. })();
  948. var UNSUPPORTED_Y = regexpStickyHelpers.BROKEN_CARET;
  949. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  950. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  951. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexpUnsupportedDotAll || regexpUnsupportedNcg;
  952. if (PATCH) {
  953. patchedExec = function exec(string) {
  954. var re = this;
  955. var state = getInternalState(re);
  956. var str = toString_1(string);
  957. var raw = state.raw;
  958. var result, reCopy, lastIndex, match, i, object, group;
  959. if (raw) {
  960. raw.lastIndex = re.lastIndex;
  961. result = functionCall(patchedExec, raw, str);
  962. re.lastIndex = raw.lastIndex;
  963. return result;
  964. }
  965. var groups = state.groups;
  966. var sticky = UNSUPPORTED_Y && re.sticky;
  967. var flags = functionCall(regexpFlags, re);
  968. var source = re.source;
  969. var charsAdded = 0;
  970. var strCopy = str;
  971. if (sticky) {
  972. flags = replace$1(flags, 'y', '');
  973. if (indexOf(flags, 'g') === -1) {
  974. flags += 'g';
  975. }
  976. strCopy = stringSlice$3(str, re.lastIndex);
  977. // Support anchored sticky behavior.
  978. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  979. source = '(?: ' + source + ')';
  980. strCopy = ' ' + strCopy;
  981. charsAdded++;
  982. }
  983. // ^(? + rx + ) is needed, in combination with some str slicing, to
  984. // simulate the 'y' flag.
  985. reCopy = new RegExp('^(?:' + source + ')', flags);
  986. }
  987. if (NPCG_INCLUDED) {
  988. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  989. }
  990. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  991. match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
  992. if (sticky) {
  993. if (match) {
  994. match.input = stringSlice$3(match.input, charsAdded);
  995. match[0] = stringSlice$3(match[0], charsAdded);
  996. match.index = re.lastIndex;
  997. re.lastIndex += match[0].length;
  998. } else re.lastIndex = 0;
  999. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1000. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1001. }
  1002. if (NPCG_INCLUDED && match && match.length > 1) {
  1003. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1004. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1005. functionCall(nativeReplace, match[0], reCopy, function () {
  1006. for (i = 1; i < arguments.length - 2; i++) {
  1007. if (arguments[i] === undefined) match[i] = undefined;
  1008. }
  1009. });
  1010. }
  1011. if (match && groups) {
  1012. match.groups = object = objectCreate(null);
  1013. for (i = 0; i < groups.length; i++) {
  1014. group = groups[i];
  1015. object[group[0]] = match[group[1]];
  1016. }
  1017. }
  1018. return match;
  1019. };
  1020. }
  1021. var regexpExec = patchedExec;
  1022. // `RegExp.prototype.exec` method
  1023. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1024. _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
  1025. exec: regexpExec
  1026. });
  1027. var FunctionPrototype = Function.prototype;
  1028. var apply = FunctionPrototype.apply;
  1029. var call = FunctionPrototype.call;
  1030. // eslint-disable-next-line es/no-reflect -- safe
  1031. var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
  1032. return call.apply(apply, arguments);
  1033. });
  1034. // TODO: Remove from `core-js@4` since it's moved to entry points
  1035. var SPECIES$2 = wellKnownSymbol('species');
  1036. var RegExpPrototype = RegExp.prototype;
  1037. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1038. var SYMBOL = wellKnownSymbol(KEY);
  1039. var DELEGATES_TO_SYMBOL = !fails(function () {
  1040. // String methods call symbol-named RegEp methods
  1041. var O = {};
  1042. O[SYMBOL] = function () { return 7; };
  1043. return ''[KEY](O) != 7;
  1044. });
  1045. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  1046. // Symbol-named RegExp methods call .exec
  1047. var execCalled = false;
  1048. var re = /a/;
  1049. if (KEY === 'split') {
  1050. // We can't use real regex here since it causes deoptimization
  1051. // and serious performance degradation in V8
  1052. // https://github.com/zloirock/core-js/issues/306
  1053. re = {};
  1054. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1055. // a new one. We need to return the patched regex when creating the new one.
  1056. re.constructor = {};
  1057. re.constructor[SPECIES$2] = function () { return re; };
  1058. re.flags = '';
  1059. re[SYMBOL] = /./[SYMBOL];
  1060. }
  1061. re.exec = function () { execCalled = true; return null; };
  1062. re[SYMBOL]('');
  1063. return !execCalled;
  1064. });
  1065. if (
  1066. !DELEGATES_TO_SYMBOL ||
  1067. !DELEGATES_TO_EXEC ||
  1068. FORCED
  1069. ) {
  1070. var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
  1071. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1072. var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
  1073. var $exec = regexp.exec;
  1074. if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
  1075. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1076. // The native String method already delegates to @@method (this
  1077. // polyfilled function), leasing to infinite recursion.
  1078. // We avoid it by directly calling the native @@method method.
  1079. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1080. }
  1081. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1082. }
  1083. return { done: false };
  1084. });
  1085. redefine(String.prototype, KEY, methods[0]);
  1086. redefine(RegExpPrototype, SYMBOL, methods[1]);
  1087. }
  1088. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  1089. };
  1090. var charAt$2 = functionUncurryThis(''.charAt);
  1091. var charCodeAt = functionUncurryThis(''.charCodeAt);
  1092. var stringSlice$2 = functionUncurryThis(''.slice);
  1093. var createMethod = function (CONVERT_TO_STRING) {
  1094. return function ($this, pos) {
  1095. var S = toString_1(requireObjectCoercible($this));
  1096. var position = toIntegerOrInfinity(pos);
  1097. var size = S.length;
  1098. var first, second;
  1099. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1100. first = charCodeAt(S, position);
  1101. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1102. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1103. ? CONVERT_TO_STRING
  1104. ? charAt$2(S, position)
  1105. : first
  1106. : CONVERT_TO_STRING
  1107. ? stringSlice$2(S, position, position + 2)
  1108. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1109. };
  1110. };
  1111. var stringMultibyte = {
  1112. // `String.prototype.codePointAt` method
  1113. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1114. codeAt: createMethod(false),
  1115. // `String.prototype.at` method
  1116. // https://github.com/mathiasbynens/String.prototype.at
  1117. charAt: createMethod(true)
  1118. };
  1119. var charAt$1 = stringMultibyte.charAt;
  1120. // `AdvanceStringIndex` abstract operation
  1121. // https://tc39.es/ecma262/#sec-advancestringindex
  1122. var advanceStringIndex = function (S, index, unicode) {
  1123. return index + (unicode ? charAt$1(S, index).length : 1);
  1124. };
  1125. var floor = Math.floor;
  1126. var charAt = functionUncurryThis(''.charAt);
  1127. var replace = functionUncurryThis(''.replace);
  1128. var stringSlice$1 = functionUncurryThis(''.slice);
  1129. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1130. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1131. // `GetSubstitution` abstract operation
  1132. // https://tc39.es/ecma262/#sec-getsubstitution
  1133. var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  1134. var tailPos = position + matched.length;
  1135. var m = captures.length;
  1136. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1137. if (namedCaptures !== undefined) {
  1138. namedCaptures = toObject(namedCaptures);
  1139. symbols = SUBSTITUTION_SYMBOLS;
  1140. }
  1141. return replace(replacement, symbols, function (match, ch) {
  1142. var capture;
  1143. switch (charAt(ch, 0)) {
  1144. case '$': return '$';
  1145. case '&': return matched;
  1146. case '`': return stringSlice$1(str, 0, position);
  1147. case "'": return stringSlice$1(str, tailPos);
  1148. case '<':
  1149. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  1150. break;
  1151. default: // \d\d?
  1152. var n = +ch;
  1153. if (n === 0) return match;
  1154. if (n > m) {
  1155. var f = floor(n / 10);
  1156. if (f === 0) return match;
  1157. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1158. return match;
  1159. }
  1160. capture = captures[n - 1];
  1161. }
  1162. return capture === undefined ? '' : capture;
  1163. });
  1164. };
  1165. var TypeError$2 = global_1.TypeError;
  1166. // `RegExpExec` abstract operation
  1167. // https://tc39.es/ecma262/#sec-regexpexec
  1168. var regexpExecAbstract = function (R, S) {
  1169. var exec = R.exec;
  1170. if (isCallable(exec)) {
  1171. var result = functionCall(exec, R, S);
  1172. if (result !== null) anObject(result);
  1173. return result;
  1174. }
  1175. if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
  1176. throw TypeError$2('RegExp#exec called on incompatible receiver');
  1177. };
  1178. var REPLACE = wellKnownSymbol('replace');
  1179. var max = Math.max;
  1180. var min = Math.min;
  1181. var concat = functionUncurryThis([].concat);
  1182. var push = functionUncurryThis([].push);
  1183. var stringIndexOf = functionUncurryThis(''.indexOf);
  1184. var stringSlice = functionUncurryThis(''.slice);
  1185. var maybeToString = function (it) {
  1186. return it === undefined ? it : String(it);
  1187. };
  1188. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1189. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1190. var REPLACE_KEEPS_$0 = (function () {
  1191. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  1192. return 'a'.replace(/./, '$0') === '$0';
  1193. })();
  1194. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1195. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1196. if (/./[REPLACE]) {
  1197. return /./[REPLACE]('a', '$0') === '';
  1198. }
  1199. return false;
  1200. })();
  1201. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  1202. var re = /./;
  1203. re.exec = function () {
  1204. var result = [];
  1205. result.groups = { a: '7' };
  1206. return result;
  1207. };
  1208. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  1209. return ''.replace(re, '$<a>') !== '7';
  1210. });
  1211. // @@replace logic
  1212. fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  1213. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  1214. return [
  1215. // `String.prototype.replace` method
  1216. // https://tc39.es/ecma262/#sec-string.prototype.replace
  1217. function replace(searchValue, replaceValue) {
  1218. var O = requireObjectCoercible(this);
  1219. var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
  1220. return replacer
  1221. ? functionCall(replacer, searchValue, O, replaceValue)
  1222. : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
  1223. },
  1224. // `RegExp.prototype[@@replace]` method
  1225. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  1226. function (string, replaceValue) {
  1227. var rx = anObject(this);
  1228. var S = toString_1(string);
  1229. if (
  1230. typeof replaceValue == 'string' &&
  1231. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  1232. stringIndexOf(replaceValue, '$<') === -1
  1233. ) {
  1234. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  1235. if (res.done) return res.value;
  1236. }
  1237. var functionalReplace = isCallable(replaceValue);
  1238. if (!functionalReplace) replaceValue = toString_1(replaceValue);
  1239. var global = rx.global;
  1240. if (global) {
  1241. var fullUnicode = rx.unicode;
  1242. rx.lastIndex = 0;
  1243. }
  1244. var results = [];
  1245. while (true) {
  1246. var result = regexpExecAbstract(rx, S);
  1247. if (result === null) break;
  1248. push(results, result);
  1249. if (!global) break;
  1250. var matchStr = toString_1(result[0]);
  1251. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1252. }
  1253. var accumulatedResult = '';
  1254. var nextSourcePosition = 0;
  1255. for (var i = 0; i < results.length; i++) {
  1256. result = results[i];
  1257. var matched = toString_1(result[0]);
  1258. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  1259. var captures = [];
  1260. // NOTE: This is equivalent to
  1261. // captures = result.slice(1).map(maybeToString)
  1262. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1263. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1264. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1265. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  1266. var namedCaptures = result.groups;
  1267. if (functionalReplace) {
  1268. var replacerArgs = concat([matched], captures, position, S);
  1269. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  1270. var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
  1271. } else {
  1272. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1273. }
  1274. if (position >= nextSourcePosition) {
  1275. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  1276. nextSourcePosition = position + matched.length;
  1277. }
  1278. }
  1279. return accumulatedResult + stringSlice(S, nextSourcePosition);
  1280. }
  1281. ];
  1282. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  1283. // `IsArray` abstract operation
  1284. // https://tc39.es/ecma262/#sec-isarray
  1285. // eslint-disable-next-line es/no-array-isarray -- safe
  1286. var isArray = Array.isArray || function isArray(argument) {
  1287. return classofRaw(argument) == 'Array';
  1288. };
  1289. var createProperty = function (object, key, value) {
  1290. var propertyKey = toPropertyKey(key);
  1291. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1292. else object[propertyKey] = value;
  1293. };
  1294. var noop = function () { /* empty */ };
  1295. var empty = [];
  1296. var construct = getBuiltIn('Reflect', 'construct');
  1297. var constructorRegExp = /^\s*(?:class|function)\b/;
  1298. var exec = functionUncurryThis(constructorRegExp.exec);
  1299. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1300. var isConstructorModern = function isConstructor(argument) {
  1301. if (!isCallable(argument)) return false;
  1302. try {
  1303. construct(noop, empty, argument);
  1304. return true;
  1305. } catch (error) {
  1306. return false;
  1307. }
  1308. };
  1309. var isConstructorLegacy = function isConstructor(argument) {
  1310. if (!isCallable(argument)) return false;
  1311. switch (classof(argument)) {
  1312. case 'AsyncFunction':
  1313. case 'GeneratorFunction':
  1314. case 'AsyncGeneratorFunction': return false;
  1315. }
  1316. try {
  1317. // we can't check .prototype since constructors produced by .bind haven't it
  1318. // `Function#toString` throws on some built-it function in some legacy engines
  1319. // (for example, `DOMQuad` and similar in FF41-)
  1320. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1321. } catch (error) {
  1322. return true;
  1323. }
  1324. };
  1325. isConstructorLegacy.sham = true;
  1326. // `IsConstructor` abstract operation
  1327. // https://tc39.es/ecma262/#sec-isconstructor
  1328. var isConstructor = !construct || fails(function () {
  1329. var called;
  1330. return isConstructorModern(isConstructorModern.call)
  1331. || !isConstructorModern(Object)
  1332. || !isConstructorModern(function () { called = true; })
  1333. || called;
  1334. }) ? isConstructorLegacy : isConstructorModern;
  1335. var SPECIES$1 = wellKnownSymbol('species');
  1336. var Array$1 = global_1.Array;
  1337. // a part of `ArraySpeciesCreate` abstract operation
  1338. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1339. var arraySpeciesConstructor = function (originalArray) {
  1340. var C;
  1341. if (isArray(originalArray)) {
  1342. C = originalArray.constructor;
  1343. // cross-realm fallback
  1344. if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
  1345. else if (isObject(C)) {
  1346. C = C[SPECIES$1];
  1347. if (C === null) C = undefined;
  1348. }
  1349. } return C === undefined ? Array$1 : C;
  1350. };
  1351. // `ArraySpeciesCreate` abstract operation
  1352. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1353. var arraySpeciesCreate = function (originalArray, length) {
  1354. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1355. };
  1356. var SPECIES = wellKnownSymbol('species');
  1357. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1358. // We can't use this feature detection in V8 since it causes
  1359. // deoptimization and serious performance degradation
  1360. // https://github.com/zloirock/core-js/issues/677
  1361. return engineV8Version >= 51 || !fails(function () {
  1362. var array = [];
  1363. var constructor = array.constructor = {};
  1364. constructor[SPECIES] = function () {
  1365. return { foo: 1 };
  1366. };
  1367. return array[METHOD_NAME](Boolean).foo !== 1;
  1368. });
  1369. };
  1370. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1371. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1372. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1373. var TypeError$1 = global_1.TypeError;
  1374. // We can't use this feature detection in V8 since it causes
  1375. // deoptimization and serious performance degradation
  1376. // https://github.com/zloirock/core-js/issues/679
  1377. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1378. var array = [];
  1379. array[IS_CONCAT_SPREADABLE] = false;
  1380. return array.concat()[0] !== array;
  1381. });
  1382. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1383. var isConcatSpreadable = function (O) {
  1384. if (!isObject(O)) return false;
  1385. var spreadable = O[IS_CONCAT_SPREADABLE];
  1386. return spreadable !== undefined ? !!spreadable : isArray(O);
  1387. };
  1388. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1389. // `Array.prototype.concat` method
  1390. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1391. // with adding support of @@isConcatSpreadable and @@species
  1392. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1393. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1394. concat: function concat(arg) {
  1395. var O = toObject(this);
  1396. var A = arraySpeciesCreate(O, 0);
  1397. var n = 0;
  1398. var i, k, length, len, E;
  1399. for (i = -1, length = arguments.length; i < length; i++) {
  1400. E = i === -1 ? O : arguments[i];
  1401. if (isConcatSpreadable(E)) {
  1402. len = lengthOfArrayLike(E);
  1403. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1404. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1405. } else {
  1406. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1407. createProperty(A, n++, E);
  1408. }
  1409. }
  1410. A.length = n;
  1411. return A;
  1412. }
  1413. });
  1414. //
  1415. //
  1416. //
  1417. //
  1418. var $ = window.jQuery;
  1419. var deepCopy = function deepCopy(arg) {
  1420. if (arg === undefined) {
  1421. return arg;
  1422. }
  1423. return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
  1424. };
  1425. var script = {
  1426. name: 'BootstrapTable',
  1427. props: {
  1428. columns: {
  1429. type: Array,
  1430. require: true
  1431. },
  1432. data: {
  1433. type: [Array, Object],
  1434. default: function _default() {
  1435. return undefined;
  1436. }
  1437. },
  1438. options: {
  1439. type: Object,
  1440. default: function _default() {
  1441. return {};
  1442. }
  1443. }
  1444. },
  1445. mounted: function mounted() {
  1446. var _this = this;
  1447. this.$table = $(this.$el);
  1448. this.$table.on('all.bs.table', function (e, name, args) {
  1449. var eventName = $.fn.bootstrapTable.events[name];
  1450. eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase();
  1451. _this.$emit.apply(_this, ['on-all'].concat(_toConsumableArray(args)));
  1452. _this.$emit.apply(_this, [eventName].concat(_toConsumableArray(args)));
  1453. });
  1454. this._initTable();
  1455. },
  1456. methods: _objectSpread2({
  1457. _initTable: function _initTable() {
  1458. var options = _objectSpread2(_objectSpread2({}, deepCopy(this.options)), {}, {
  1459. columns: deepCopy(this.columns),
  1460. data: deepCopy(this.data)
  1461. });
  1462. if (!this._hasInit) {
  1463. this.$table.bootstrapTable(options);
  1464. this._hasInit = true;
  1465. } else {
  1466. this.refreshOptions(options);
  1467. }
  1468. }
  1469. }, function () {
  1470. var res = {};
  1471. var _iterator = _createForOfIteratorHelper($.fn.bootstrapTable.methods),
  1472. _step;
  1473. try {
  1474. var _loop = function _loop() {
  1475. var method = _step.value;
  1476. res[method] = function () {
  1477. var _this$$table;
  1478. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1479. args[_key] = arguments[_key];
  1480. }
  1481. return (_this$$table = this.$table).bootstrapTable.apply(_this$$table, [method].concat(args));
  1482. };
  1483. };
  1484. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1485. _loop();
  1486. }
  1487. } catch (err) {
  1488. _iterator.e(err);
  1489. } finally {
  1490. _iterator.f();
  1491. }
  1492. return res;
  1493. }()),
  1494. watch: {
  1495. options: {
  1496. handler: function handler() {
  1497. this._initTable();
  1498. },
  1499. deep: true
  1500. },
  1501. columns: {
  1502. handler: function handler() {
  1503. this._initTable();
  1504. },
  1505. deep: true
  1506. },
  1507. data: {
  1508. handler: function handler() {
  1509. this.load(deepCopy(this.data));
  1510. },
  1511. deep: true
  1512. }
  1513. }
  1514. };
  1515. function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
  1516. if (typeof shadowMode !== 'boolean') {
  1517. createInjectorSSR = createInjector;
  1518. createInjector = shadowMode;
  1519. shadowMode = false;
  1520. }
  1521. // Vue.extend constructor export interop.
  1522. const options = typeof script === 'function' ? script.options : script;
  1523. // render functions
  1524. if (template && template.render) {
  1525. options.render = template.render;
  1526. options.staticRenderFns = template.staticRenderFns;
  1527. options._compiled = true;
  1528. // functional template
  1529. if (isFunctionalTemplate) {
  1530. options.functional = true;
  1531. }
  1532. }
  1533. // scopedId
  1534. if (scopeId) {
  1535. options._scopeId = scopeId;
  1536. }
  1537. let hook;
  1538. if (moduleIdentifier) {
  1539. // server build
  1540. hook = function (context) {
  1541. // 2.3 injection
  1542. context =
  1543. context || // cached call
  1544. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1545. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
  1546. // 2.2 with runInNewContext: true
  1547. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1548. context = __VUE_SSR_CONTEXT__;
  1549. }
  1550. // inject component styles
  1551. if (style) {
  1552. style.call(this, createInjectorSSR(context));
  1553. }
  1554. // register component module identifier for async chunk inference
  1555. if (context && context._registeredComponents) {
  1556. context._registeredComponents.add(moduleIdentifier);
  1557. }
  1558. };
  1559. // used by ssr in case component is cached and beforeCreate
  1560. // never gets called
  1561. options._ssrRegister = hook;
  1562. }
  1563. else if (style) {
  1564. hook = shadowMode
  1565. ? function (context) {
  1566. style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
  1567. }
  1568. : function (context) {
  1569. style.call(this, createInjector(context));
  1570. };
  1571. }
  1572. if (hook) {
  1573. if (options.functional) {
  1574. // register for functional component in vue file
  1575. const originalRender = options.render;
  1576. options.render = function renderWithStyleInjection(h, context) {
  1577. hook.call(context);
  1578. return originalRender(h, context);
  1579. };
  1580. }
  1581. else {
  1582. // inject component registration as beforeCreate hook
  1583. const existing = options.beforeCreate;
  1584. options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
  1585. }
  1586. }
  1587. return script;
  1588. }
  1589. /* script */
  1590. const __vue_script__ = script;
  1591. /* template */
  1592. var __vue_render__ = function () {
  1593. var _vm = this;
  1594. var _h = _vm.$createElement;
  1595. var _c = _vm._self._c || _h;
  1596. return _c("table")
  1597. };
  1598. var __vue_staticRenderFns__ = [];
  1599. __vue_render__._withStripped = true;
  1600. /* style */
  1601. const __vue_inject_styles__ = undefined;
  1602. /* scoped */
  1603. const __vue_scope_id__ = undefined;
  1604. /* module identifier */
  1605. const __vue_module_identifier__ = undefined;
  1606. /* functional template */
  1607. const __vue_is_functional_template__ = false;
  1608. /* style inject */
  1609. /* style inject SSR */
  1610. /* style inject shadow dom */
  1611. const __vue_component__ = /*#__PURE__*/normalizeComponent(
  1612. { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
  1613. __vue_inject_styles__,
  1614. __vue_script__,
  1615. __vue_scope_id__,
  1616. __vue_is_functional_template__,
  1617. __vue_module_identifier__,
  1618. false,
  1619. undefined,
  1620. undefined,
  1621. undefined
  1622. );
  1623. export { __vue_component__ as default };