bootstrap-table-group-by.js 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  11. return typeof obj;
  12. } : function (obj) {
  13. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14. }, _typeof(obj);
  15. }
  16. function _classCallCheck(instance, Constructor) {
  17. if (!(instance instanceof Constructor)) {
  18. throw new TypeError("Cannot call a class as a function");
  19. }
  20. }
  21. function _defineProperties(target, props) {
  22. for (var i = 0; i < props.length; i++) {
  23. var descriptor = props[i];
  24. descriptor.enumerable = descriptor.enumerable || false;
  25. descriptor.configurable = true;
  26. if ("value" in descriptor) descriptor.writable = true;
  27. Object.defineProperty(target, descriptor.key, descriptor);
  28. }
  29. }
  30. function _createClass(Constructor, protoProps, staticProps) {
  31. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  32. if (staticProps) _defineProperties(Constructor, staticProps);
  33. Object.defineProperty(Constructor, "prototype", {
  34. writable: false
  35. });
  36. return Constructor;
  37. }
  38. function _inherits(subClass, superClass) {
  39. if (typeof superClass !== "function" && superClass !== null) {
  40. throw new TypeError("Super expression must either be null or a function");
  41. }
  42. subClass.prototype = Object.create(superClass && superClass.prototype, {
  43. constructor: {
  44. value: subClass,
  45. writable: true,
  46. configurable: true
  47. }
  48. });
  49. Object.defineProperty(subClass, "prototype", {
  50. writable: false
  51. });
  52. if (superClass) _setPrototypeOf(subClass, superClass);
  53. }
  54. function _getPrototypeOf(o) {
  55. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  56. return o.__proto__ || Object.getPrototypeOf(o);
  57. };
  58. return _getPrototypeOf(o);
  59. }
  60. function _setPrototypeOf(o, p) {
  61. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  62. o.__proto__ = p;
  63. return o;
  64. };
  65. return _setPrototypeOf(o, p);
  66. }
  67. function _isNativeReflectConstruct() {
  68. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  69. if (Reflect.construct.sham) return false;
  70. if (typeof Proxy === "function") return true;
  71. try {
  72. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  73. return true;
  74. } catch (e) {
  75. return false;
  76. }
  77. }
  78. function _assertThisInitialized(self) {
  79. if (self === void 0) {
  80. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  81. }
  82. return self;
  83. }
  84. function _possibleConstructorReturn(self, call) {
  85. if (call && (typeof call === "object" || typeof call === "function")) {
  86. return call;
  87. } else if (call !== void 0) {
  88. throw new TypeError("Derived constructors may only return object or undefined");
  89. }
  90. return _assertThisInitialized(self);
  91. }
  92. function _createSuper(Derived) {
  93. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  94. return function _createSuperInternal() {
  95. var Super = _getPrototypeOf(Derived),
  96. result;
  97. if (hasNativeReflectConstruct) {
  98. var NewTarget = _getPrototypeOf(this).constructor;
  99. result = Reflect.construct(Super, arguments, NewTarget);
  100. } else {
  101. result = Super.apply(this, arguments);
  102. }
  103. return _possibleConstructorReturn(this, result);
  104. };
  105. }
  106. function _superPropBase(object, property) {
  107. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  108. object = _getPrototypeOf(object);
  109. if (object === null) break;
  110. }
  111. return object;
  112. }
  113. function _get() {
  114. if (typeof Reflect !== "undefined" && Reflect.get) {
  115. _get = Reflect.get;
  116. } else {
  117. _get = function _get(target, property, receiver) {
  118. var base = _superPropBase(target, property);
  119. if (!base) return;
  120. var desc = Object.getOwnPropertyDescriptor(base, property);
  121. if (desc.get) {
  122. return desc.get.call(arguments.length < 3 ? target : receiver);
  123. }
  124. return desc.value;
  125. };
  126. }
  127. return _get.apply(this, arguments);
  128. }
  129. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  130. function createCommonjsModule(fn, module) {
  131. return module = { exports: {} }, fn(module, module.exports), module.exports;
  132. }
  133. var check = function (it) {
  134. return it && it.Math == Math && it;
  135. };
  136. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  137. var global_1 =
  138. // eslint-disable-next-line es/no-global-this -- safe
  139. check(typeof globalThis == 'object' && globalThis) ||
  140. check(typeof window == 'object' && window) ||
  141. // eslint-disable-next-line no-restricted-globals -- safe
  142. check(typeof self == 'object' && self) ||
  143. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  144. // eslint-disable-next-line no-new-func -- fallback
  145. (function () { return this; })() || Function('return this')();
  146. // eslint-disable-next-line es/no-object-defineproperty -- safe
  147. var defineProperty$2 = Object.defineProperty;
  148. var setGlobal = function (key, value) {
  149. try {
  150. defineProperty$2(global_1, key, { value: value, configurable: true, writable: true });
  151. } catch (error) {
  152. global_1[key] = value;
  153. } return value;
  154. };
  155. var SHARED = '__core-js_shared__';
  156. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  157. var sharedStore = store$1;
  158. var shared = createCommonjsModule(function (module) {
  159. (module.exports = function (key, value) {
  160. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  161. })('versions', []).push({
  162. version: '3.21.1',
  163. mode: 'global',
  164. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  165. license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
  166. source: 'https://github.com/zloirock/core-js'
  167. });
  168. });
  169. var fails = function (exec) {
  170. try {
  171. return !!exec();
  172. } catch (error) {
  173. return true;
  174. }
  175. };
  176. var functionBindNative = !fails(function () {
  177. var test = (function () { /* empty */ }).bind();
  178. // eslint-disable-next-line no-prototype-builtins -- safe
  179. return typeof test != 'function' || test.hasOwnProperty('prototype');
  180. });
  181. var FunctionPrototype$2 = Function.prototype;
  182. var bind$1 = FunctionPrototype$2.bind;
  183. var call$1 = FunctionPrototype$2.call;
  184. var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
  185. var functionUncurryThis = functionBindNative ? function (fn) {
  186. return fn && uncurryThis(fn);
  187. } : function (fn) {
  188. return fn && function () {
  189. return call$1.apply(fn, arguments);
  190. };
  191. };
  192. var TypeError$8 = global_1.TypeError;
  193. // `RequireObjectCoercible` abstract operation
  194. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  195. var requireObjectCoercible = function (it) {
  196. if (it == undefined) throw TypeError$8("Can't call method on " + it);
  197. return it;
  198. };
  199. var Object$4 = global_1.Object;
  200. // `ToObject` abstract operation
  201. // https://tc39.es/ecma262/#sec-toobject
  202. var toObject = function (argument) {
  203. return Object$4(requireObjectCoercible(argument));
  204. };
  205. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  206. // `HasOwnProperty` abstract operation
  207. // https://tc39.es/ecma262/#sec-hasownproperty
  208. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  209. return hasOwnProperty(toObject(it), key);
  210. };
  211. var id = 0;
  212. var postfix = Math.random();
  213. var toString$1 = functionUncurryThis(1.0.toString);
  214. var uid = function (key) {
  215. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
  216. };
  217. // `IsCallable` abstract operation
  218. // https://tc39.es/ecma262/#sec-iscallable
  219. var isCallable = function (argument) {
  220. return typeof argument == 'function';
  221. };
  222. var aFunction = function (argument) {
  223. return isCallable(argument) ? argument : undefined;
  224. };
  225. var getBuiltIn = function (namespace, method) {
  226. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  227. };
  228. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  229. var process = global_1.process;
  230. var Deno = global_1.Deno;
  231. var versions = process && process.versions || Deno && Deno.version;
  232. var v8 = versions && versions.v8;
  233. var match, version;
  234. if (v8) {
  235. match = v8.split('.');
  236. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  237. // but their correct versions are not interesting for us
  238. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  239. }
  240. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  241. // so check `userAgent` even if `.v8` exists, but 0
  242. if (!version && engineUserAgent) {
  243. match = engineUserAgent.match(/Edge\/(\d+)/);
  244. if (!match || match[1] >= 74) {
  245. match = engineUserAgent.match(/Chrome\/(\d+)/);
  246. if (match) version = +match[1];
  247. }
  248. }
  249. var engineV8Version = version;
  250. /* eslint-disable es/no-symbol -- required for testing */
  251. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  252. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  253. var symbol = Symbol();
  254. // Chrome 38 Symbol has incorrect toString conversion
  255. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  256. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  257. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  258. !Symbol.sham && engineV8Version && engineV8Version < 41;
  259. });
  260. /* eslint-disable es/no-symbol -- required for testing */
  261. var useSymbolAsUid = nativeSymbol
  262. && !Symbol.sham
  263. && typeof Symbol.iterator == 'symbol';
  264. var WellKnownSymbolsStore = shared('wks');
  265. var Symbol$1 = global_1.Symbol;
  266. var symbolFor = Symbol$1 && Symbol$1['for'];
  267. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  268. var wellKnownSymbol = function (name) {
  269. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  270. var description = 'Symbol.' + name;
  271. if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
  272. WellKnownSymbolsStore[name] = Symbol$1[name];
  273. } else if (useSymbolAsUid && symbolFor) {
  274. WellKnownSymbolsStore[name] = symbolFor(description);
  275. } else {
  276. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  277. }
  278. } return WellKnownSymbolsStore[name];
  279. };
  280. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  281. var test$1 = {};
  282. test$1[TO_STRING_TAG$1] = 'z';
  283. var toStringTagSupport = String(test$1) === '[object z]';
  284. // Detect IE8's incomplete defineProperty implementation
  285. var descriptors = !fails(function () {
  286. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  287. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  288. });
  289. var isObject = function (it) {
  290. return typeof it == 'object' ? it !== null : isCallable(it);
  291. };
  292. var document$1 = global_1.document;
  293. // typeof document.createElement is 'object' in old IE
  294. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  295. var documentCreateElement = function (it) {
  296. return EXISTS$1 ? document$1.createElement(it) : {};
  297. };
  298. // Thanks to IE8 for its funny defineProperty
  299. var ie8DomDefine = !descriptors && !fails(function () {
  300. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  301. return Object.defineProperty(documentCreateElement('div'), 'a', {
  302. get: function () { return 7; }
  303. }).a != 7;
  304. });
  305. // V8 ~ Chrome 36-
  306. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  307. var v8PrototypeDefineBug = descriptors && fails(function () {
  308. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  309. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  310. value: 42,
  311. writable: false
  312. }).prototype != 42;
  313. });
  314. var String$3 = global_1.String;
  315. var TypeError$7 = global_1.TypeError;
  316. // `Assert: Type(argument) is Object`
  317. var anObject = function (argument) {
  318. if (isObject(argument)) return argument;
  319. throw TypeError$7(String$3(argument) + ' is not an object');
  320. };
  321. var call = Function.prototype.call;
  322. var functionCall = functionBindNative ? call.bind(call) : function () {
  323. return call.apply(call, arguments);
  324. };
  325. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  326. var Object$3 = global_1.Object;
  327. var isSymbol = useSymbolAsUid ? function (it) {
  328. return typeof it == 'symbol';
  329. } : function (it) {
  330. var $Symbol = getBuiltIn('Symbol');
  331. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  332. };
  333. var String$2 = global_1.String;
  334. var tryToString = function (argument) {
  335. try {
  336. return String$2(argument);
  337. } catch (error) {
  338. return 'Object';
  339. }
  340. };
  341. var TypeError$6 = global_1.TypeError;
  342. // `Assert: IsCallable(argument) is true`
  343. var aCallable = function (argument) {
  344. if (isCallable(argument)) return argument;
  345. throw TypeError$6(tryToString(argument) + ' is not a function');
  346. };
  347. // `GetMethod` abstract operation
  348. // https://tc39.es/ecma262/#sec-getmethod
  349. var getMethod = function (V, P) {
  350. var func = V[P];
  351. return func == null ? undefined : aCallable(func);
  352. };
  353. var TypeError$5 = global_1.TypeError;
  354. // `OrdinaryToPrimitive` abstract operation
  355. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  356. var ordinaryToPrimitive = function (input, pref) {
  357. var fn, val;
  358. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  359. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  360. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  361. throw TypeError$5("Can't convert object to primitive value");
  362. };
  363. var TypeError$4 = global_1.TypeError;
  364. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  365. // `ToPrimitive` abstract operation
  366. // https://tc39.es/ecma262/#sec-toprimitive
  367. var toPrimitive = function (input, pref) {
  368. if (!isObject(input) || isSymbol(input)) return input;
  369. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  370. var result;
  371. if (exoticToPrim) {
  372. if (pref === undefined) pref = 'default';
  373. result = functionCall(exoticToPrim, input, pref);
  374. if (!isObject(result) || isSymbol(result)) return result;
  375. throw TypeError$4("Can't convert object to primitive value");
  376. }
  377. if (pref === undefined) pref = 'number';
  378. return ordinaryToPrimitive(input, pref);
  379. };
  380. // `ToPropertyKey` abstract operation
  381. // https://tc39.es/ecma262/#sec-topropertykey
  382. var toPropertyKey = function (argument) {
  383. var key = toPrimitive(argument, 'string');
  384. return isSymbol(key) ? key : key + '';
  385. };
  386. var TypeError$3 = global_1.TypeError;
  387. // eslint-disable-next-line es/no-object-defineproperty -- safe
  388. var $defineProperty = Object.defineProperty;
  389. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  390. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  391. var ENUMERABLE = 'enumerable';
  392. var CONFIGURABLE$1 = 'configurable';
  393. var WRITABLE = 'writable';
  394. // `Object.defineProperty` method
  395. // https://tc39.es/ecma262/#sec-object.defineproperty
  396. var f$5 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  397. anObject(O);
  398. P = toPropertyKey(P);
  399. anObject(Attributes);
  400. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  401. var current = $getOwnPropertyDescriptor$1(O, P);
  402. if (current && current[WRITABLE]) {
  403. O[P] = Attributes.value;
  404. Attributes = {
  405. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  406. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  407. writable: false
  408. };
  409. }
  410. } return $defineProperty(O, P, Attributes);
  411. } : $defineProperty : function defineProperty(O, P, Attributes) {
  412. anObject(O);
  413. P = toPropertyKey(P);
  414. anObject(Attributes);
  415. if (ie8DomDefine) try {
  416. return $defineProperty(O, P, Attributes);
  417. } catch (error) { /* empty */ }
  418. if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
  419. if ('value' in Attributes) O[P] = Attributes.value;
  420. return O;
  421. };
  422. var objectDefineProperty = {
  423. f: f$5
  424. };
  425. var createPropertyDescriptor = function (bitmap, value) {
  426. return {
  427. enumerable: !(bitmap & 1),
  428. configurable: !(bitmap & 2),
  429. writable: !(bitmap & 4),
  430. value: value
  431. };
  432. };
  433. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  434. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  435. } : function (object, key, value) {
  436. object[key] = value;
  437. return object;
  438. };
  439. var functionToString$1 = functionUncurryThis(Function.toString);
  440. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  441. if (!isCallable(sharedStore.inspectSource)) {
  442. sharedStore.inspectSource = function (it) {
  443. return functionToString$1(it);
  444. };
  445. }
  446. var inspectSource = sharedStore.inspectSource;
  447. var WeakMap$1 = global_1.WeakMap;
  448. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  449. var keys = shared('keys');
  450. var sharedKey = function (key) {
  451. return keys[key] || (keys[key] = uid(key));
  452. };
  453. var hiddenKeys$1 = {};
  454. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  455. var TypeError$2 = global_1.TypeError;
  456. var WeakMap = global_1.WeakMap;
  457. var set, get, has;
  458. var enforce = function (it) {
  459. return has(it) ? get(it) : set(it, {});
  460. };
  461. var getterFor = function (TYPE) {
  462. return function (it) {
  463. var state;
  464. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  465. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  466. } return state;
  467. };
  468. };
  469. if (nativeWeakMap || sharedStore.state) {
  470. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  471. var wmget = functionUncurryThis(store.get);
  472. var wmhas = functionUncurryThis(store.has);
  473. var wmset = functionUncurryThis(store.set);
  474. set = function (it, metadata) {
  475. if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  476. metadata.facade = it;
  477. wmset(store, it, metadata);
  478. return metadata;
  479. };
  480. get = function (it) {
  481. return wmget(store, it) || {};
  482. };
  483. has = function (it) {
  484. return wmhas(store, it);
  485. };
  486. } else {
  487. var STATE = sharedKey('state');
  488. hiddenKeys$1[STATE] = true;
  489. set = function (it, metadata) {
  490. if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  491. metadata.facade = it;
  492. createNonEnumerableProperty(it, STATE, metadata);
  493. return metadata;
  494. };
  495. get = function (it) {
  496. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  497. };
  498. has = function (it) {
  499. return hasOwnProperty_1(it, STATE);
  500. };
  501. }
  502. var internalState = {
  503. set: set,
  504. get: get,
  505. has: has,
  506. enforce: enforce,
  507. getterFor: getterFor
  508. };
  509. var FunctionPrototype$1 = Function.prototype;
  510. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  511. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  512. var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
  513. // additional protection from minified / mangled / dropped function names
  514. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  515. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
  516. var functionName = {
  517. EXISTS: EXISTS,
  518. PROPER: PROPER,
  519. CONFIGURABLE: CONFIGURABLE
  520. };
  521. var redefine = createCommonjsModule(function (module) {
  522. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  523. var getInternalState = internalState.get;
  524. var enforceInternalState = internalState.enforce;
  525. var TEMPLATE = String(String).split('String');
  526. (module.exports = function (O, key, value, options) {
  527. var unsafe = options ? !!options.unsafe : false;
  528. var simple = options ? !!options.enumerable : false;
  529. var noTargetGet = options ? !!options.noTargetGet : false;
  530. var name = options && options.name !== undefined ? options.name : key;
  531. var state;
  532. if (isCallable(value)) {
  533. if (String(name).slice(0, 7) === 'Symbol(') {
  534. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  535. }
  536. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  537. createNonEnumerableProperty(value, 'name', name);
  538. }
  539. state = enforceInternalState(value);
  540. if (!state.source) {
  541. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  542. }
  543. }
  544. if (O === global_1) {
  545. if (simple) O[key] = value;
  546. else setGlobal(key, value);
  547. return;
  548. } else if (!unsafe) {
  549. delete O[key];
  550. } else if (!noTargetGet && O[key]) {
  551. simple = true;
  552. }
  553. if (simple) O[key] = value;
  554. else createNonEnumerableProperty(O, key, value);
  555. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  556. })(Function.prototype, 'toString', function toString() {
  557. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  558. });
  559. });
  560. var toString = functionUncurryThis({}.toString);
  561. var stringSlice = functionUncurryThis(''.slice);
  562. var classofRaw = function (it) {
  563. return stringSlice(toString(it), 8, -1);
  564. };
  565. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  566. var Object$2 = global_1.Object;
  567. // ES3 wrong here
  568. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  569. // fallback for IE11 Script Access Denied error
  570. var tryGet = function (it, key) {
  571. try {
  572. return it[key];
  573. } catch (error) { /* empty */ }
  574. };
  575. // getting tag from ES6+ `Object.prototype.toString`
  576. var classof = toStringTagSupport ? classofRaw : function (it) {
  577. var O, tag, result;
  578. return it === undefined ? 'Undefined' : it === null ? 'Null'
  579. // @@toStringTag case
  580. : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG)) == 'string' ? tag
  581. // builtinTag case
  582. : CORRECT_ARGUMENTS ? classofRaw(O)
  583. // ES3 arguments fallback
  584. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  585. };
  586. // `Object.prototype.toString` method implementation
  587. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  588. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  589. return '[object ' + classof(this) + ']';
  590. };
  591. // `Object.prototype.toString` method
  592. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  593. if (!toStringTagSupport) {
  594. redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
  595. }
  596. // iterable DOM collections
  597. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  598. var domIterables = {
  599. CSSRuleList: 0,
  600. CSSStyleDeclaration: 0,
  601. CSSValueList: 0,
  602. ClientRectList: 0,
  603. DOMRectList: 0,
  604. DOMStringList: 0,
  605. DOMTokenList: 1,
  606. DataTransferItemList: 0,
  607. FileList: 0,
  608. HTMLAllCollection: 0,
  609. HTMLCollection: 0,
  610. HTMLFormElement: 0,
  611. HTMLSelectElement: 0,
  612. MediaList: 0,
  613. MimeTypeArray: 0,
  614. NamedNodeMap: 0,
  615. NodeList: 1,
  616. PaintRequestList: 0,
  617. Plugin: 0,
  618. PluginArray: 0,
  619. SVGLengthList: 0,
  620. SVGNumberList: 0,
  621. SVGPathSegList: 0,
  622. SVGPointList: 0,
  623. SVGStringList: 0,
  624. SVGTransformList: 0,
  625. SourceBufferList: 0,
  626. StyleSheetList: 0,
  627. TextTrackCueList: 0,
  628. TextTrackList: 0,
  629. TouchList: 0
  630. };
  631. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  632. var classList = documentCreateElement('span').classList;
  633. var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
  634. var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
  635. var bind = functionUncurryThis(functionUncurryThis.bind);
  636. // optional / simple context binding
  637. var functionBindContext = function (fn, that) {
  638. aCallable(fn);
  639. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  640. return fn.apply(that, arguments);
  641. };
  642. };
  643. var Object$1 = global_1.Object;
  644. var split = functionUncurryThis(''.split);
  645. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  646. var indexedObject = fails(function () {
  647. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  648. // eslint-disable-next-line no-prototype-builtins -- safe
  649. return !Object$1('z').propertyIsEnumerable(0);
  650. }) ? function (it) {
  651. return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
  652. } : Object$1;
  653. var ceil = Math.ceil;
  654. var floor$1 = Math.floor;
  655. // `ToIntegerOrInfinity` abstract operation
  656. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  657. var toIntegerOrInfinity = function (argument) {
  658. var number = +argument;
  659. // eslint-disable-next-line no-self-compare -- safe
  660. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  661. };
  662. var min$1 = Math.min;
  663. // `ToLength` abstract operation
  664. // https://tc39.es/ecma262/#sec-tolength
  665. var toLength = function (argument) {
  666. return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  667. };
  668. // `LengthOfArrayLike` abstract operation
  669. // https://tc39.es/ecma262/#sec-lengthofarraylike
  670. var lengthOfArrayLike = function (obj) {
  671. return toLength(obj.length);
  672. };
  673. // `IsArray` abstract operation
  674. // https://tc39.es/ecma262/#sec-isarray
  675. // eslint-disable-next-line es/no-array-isarray -- safe
  676. var isArray = Array.isArray || function isArray(argument) {
  677. return classofRaw(argument) == 'Array';
  678. };
  679. var noop = function () { /* empty */ };
  680. var empty = [];
  681. var construct = getBuiltIn('Reflect', 'construct');
  682. var constructorRegExp = /^\s*(?:class|function)\b/;
  683. var exec = functionUncurryThis(constructorRegExp.exec);
  684. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  685. var isConstructorModern = function isConstructor(argument) {
  686. if (!isCallable(argument)) return false;
  687. try {
  688. construct(noop, empty, argument);
  689. return true;
  690. } catch (error) {
  691. return false;
  692. }
  693. };
  694. var isConstructorLegacy = function isConstructor(argument) {
  695. if (!isCallable(argument)) return false;
  696. switch (classof(argument)) {
  697. case 'AsyncFunction':
  698. case 'GeneratorFunction':
  699. case 'AsyncGeneratorFunction': return false;
  700. }
  701. try {
  702. // we can't check .prototype since constructors produced by .bind haven't it
  703. // `Function#toString` throws on some built-it function in some legacy engines
  704. // (for example, `DOMQuad` and similar in FF41-)
  705. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  706. } catch (error) {
  707. return true;
  708. }
  709. };
  710. isConstructorLegacy.sham = true;
  711. // `IsConstructor` abstract operation
  712. // https://tc39.es/ecma262/#sec-isconstructor
  713. var isConstructor = !construct || fails(function () {
  714. var called;
  715. return isConstructorModern(isConstructorModern.call)
  716. || !isConstructorModern(Object)
  717. || !isConstructorModern(function () { called = true; })
  718. || called;
  719. }) ? isConstructorLegacy : isConstructorModern;
  720. var SPECIES$2 = wellKnownSymbol('species');
  721. var Array$3 = global_1.Array;
  722. // a part of `ArraySpeciesCreate` abstract operation
  723. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  724. var arraySpeciesConstructor = function (originalArray) {
  725. var C;
  726. if (isArray(originalArray)) {
  727. C = originalArray.constructor;
  728. // cross-realm fallback
  729. if (isConstructor(C) && (C === Array$3 || isArray(C.prototype))) C = undefined;
  730. else if (isObject(C)) {
  731. C = C[SPECIES$2];
  732. if (C === null) C = undefined;
  733. }
  734. } return C === undefined ? Array$3 : C;
  735. };
  736. // `ArraySpeciesCreate` abstract operation
  737. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  738. var arraySpeciesCreate = function (originalArray, length) {
  739. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  740. };
  741. var push$2 = functionUncurryThis([].push);
  742. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  743. var createMethod$1 = function (TYPE) {
  744. var IS_MAP = TYPE == 1;
  745. var IS_FILTER = TYPE == 2;
  746. var IS_SOME = TYPE == 3;
  747. var IS_EVERY = TYPE == 4;
  748. var IS_FIND_INDEX = TYPE == 6;
  749. var IS_FILTER_REJECT = TYPE == 7;
  750. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  751. return function ($this, callbackfn, that, specificCreate) {
  752. var O = toObject($this);
  753. var self = indexedObject(O);
  754. var boundFunction = functionBindContext(callbackfn, that);
  755. var length = lengthOfArrayLike(self);
  756. var index = 0;
  757. var create = specificCreate || arraySpeciesCreate;
  758. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  759. var value, result;
  760. for (;length > index; index++) if (NO_HOLES || index in self) {
  761. value = self[index];
  762. result = boundFunction(value, index, O);
  763. if (TYPE) {
  764. if (IS_MAP) target[index] = result; // map
  765. else if (result) switch (TYPE) {
  766. case 3: return true; // some
  767. case 5: return value; // find
  768. case 6: return index; // findIndex
  769. case 2: push$2(target, value); // filter
  770. } else switch (TYPE) {
  771. case 4: return false; // every
  772. case 7: push$2(target, value); // filterReject
  773. }
  774. }
  775. }
  776. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  777. };
  778. };
  779. var arrayIteration = {
  780. // `Array.prototype.forEach` method
  781. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  782. forEach: createMethod$1(0),
  783. // `Array.prototype.map` method
  784. // https://tc39.es/ecma262/#sec-array.prototype.map
  785. map: createMethod$1(1),
  786. // `Array.prototype.filter` method
  787. // https://tc39.es/ecma262/#sec-array.prototype.filter
  788. filter: createMethod$1(2),
  789. // `Array.prototype.some` method
  790. // https://tc39.es/ecma262/#sec-array.prototype.some
  791. some: createMethod$1(3),
  792. // `Array.prototype.every` method
  793. // https://tc39.es/ecma262/#sec-array.prototype.every
  794. every: createMethod$1(4),
  795. // `Array.prototype.find` method
  796. // https://tc39.es/ecma262/#sec-array.prototype.find
  797. find: createMethod$1(5),
  798. // `Array.prototype.findIndex` method
  799. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  800. findIndex: createMethod$1(6),
  801. // `Array.prototype.filterReject` method
  802. // https://github.com/tc39/proposal-array-filtering
  803. filterReject: createMethod$1(7)
  804. };
  805. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  806. var method = [][METHOD_NAME];
  807. return !!method && fails(function () {
  808. // eslint-disable-next-line no-useless-call -- required for testing
  809. method.call(null, argument || function () { return 1; }, 1);
  810. });
  811. };
  812. var $forEach = arrayIteration.forEach;
  813. var STRICT_METHOD$2 = arrayMethodIsStrict('forEach');
  814. // `Array.prototype.forEach` method implementation
  815. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  816. var arrayForEach = !STRICT_METHOD$2 ? function forEach(callbackfn /* , thisArg */) {
  817. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  818. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  819. } : [].forEach;
  820. var handlePrototype = function (CollectionPrototype) {
  821. // some Chrome versions have non-configurable methods on DOMTokenList
  822. if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
  823. createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
  824. } catch (error) {
  825. CollectionPrototype.forEach = arrayForEach;
  826. }
  827. };
  828. for (var COLLECTION_NAME in domIterables) {
  829. if (domIterables[COLLECTION_NAME]) {
  830. handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
  831. }
  832. }
  833. handlePrototype(domTokenListPrototype);
  834. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  835. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  836. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  837. // Nashorn ~ JDK8 bug
  838. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  839. // `Object.prototype.propertyIsEnumerable` method implementation
  840. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  841. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  842. var descriptor = getOwnPropertyDescriptor$1(this, V);
  843. return !!descriptor && descriptor.enumerable;
  844. } : $propertyIsEnumerable;
  845. var objectPropertyIsEnumerable = {
  846. f: f$4
  847. };
  848. // toObject with fallback for non-array-like ES3 strings
  849. var toIndexedObject = function (it) {
  850. return indexedObject(requireObjectCoercible(it));
  851. };
  852. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  853. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  854. // `Object.getOwnPropertyDescriptor` method
  855. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  856. var f$3 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  857. O = toIndexedObject(O);
  858. P = toPropertyKey(P);
  859. if (ie8DomDefine) try {
  860. return $getOwnPropertyDescriptor(O, P);
  861. } catch (error) { /* empty */ }
  862. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  863. };
  864. var objectGetOwnPropertyDescriptor = {
  865. f: f$3
  866. };
  867. var max$2 = Math.max;
  868. var min = Math.min;
  869. // Helper for a popular repeating case of the spec:
  870. // Let integer be ? ToInteger(index).
  871. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  872. var toAbsoluteIndex = function (index, length) {
  873. var integer = toIntegerOrInfinity(index);
  874. return integer < 0 ? max$2(integer + length, 0) : min(integer, length);
  875. };
  876. // `Array.prototype.{ indexOf, includes }` methods implementation
  877. var createMethod = function (IS_INCLUDES) {
  878. return function ($this, el, fromIndex) {
  879. var O = toIndexedObject($this);
  880. var length = lengthOfArrayLike(O);
  881. var index = toAbsoluteIndex(fromIndex, length);
  882. var value;
  883. // Array#includes uses SameValueZero equality algorithm
  884. // eslint-disable-next-line no-self-compare -- NaN check
  885. if (IS_INCLUDES && el != el) while (length > index) {
  886. value = O[index++];
  887. // eslint-disable-next-line no-self-compare -- NaN check
  888. if (value != value) return true;
  889. // Array#indexOf ignores holes, Array#includes - not
  890. } else for (;length > index; index++) {
  891. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  892. } return !IS_INCLUDES && -1;
  893. };
  894. };
  895. var arrayIncludes = {
  896. // `Array.prototype.includes` method
  897. // https://tc39.es/ecma262/#sec-array.prototype.includes
  898. includes: createMethod(true),
  899. // `Array.prototype.indexOf` method
  900. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  901. indexOf: createMethod(false)
  902. };
  903. var indexOf = arrayIncludes.indexOf;
  904. var push$1 = functionUncurryThis([].push);
  905. var objectKeysInternal = function (object, names) {
  906. var O = toIndexedObject(object);
  907. var i = 0;
  908. var result = [];
  909. var key;
  910. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
  911. // Don't enum bug & hidden keys
  912. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  913. ~indexOf(result, key) || push$1(result, key);
  914. }
  915. return result;
  916. };
  917. // IE8- don't enum bug keys
  918. var enumBugKeys = [
  919. 'constructor',
  920. 'hasOwnProperty',
  921. 'isPrototypeOf',
  922. 'propertyIsEnumerable',
  923. 'toLocaleString',
  924. 'toString',
  925. 'valueOf'
  926. ];
  927. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  928. // `Object.getOwnPropertyNames` method
  929. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  930. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  931. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  932. return objectKeysInternal(O, hiddenKeys);
  933. };
  934. var objectGetOwnPropertyNames = {
  935. f: f$2
  936. };
  937. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  938. var f$1 = Object.getOwnPropertySymbols;
  939. var objectGetOwnPropertySymbols = {
  940. f: f$1
  941. };
  942. var concat$1 = functionUncurryThis([].concat);
  943. // all object keys, includes non-enumerable and symbols
  944. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  945. var keys = objectGetOwnPropertyNames.f(anObject(it));
  946. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  947. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  948. };
  949. var copyConstructorProperties = function (target, source, exceptions) {
  950. var keys = ownKeys(source);
  951. var defineProperty = objectDefineProperty.f;
  952. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  953. for (var i = 0; i < keys.length; i++) {
  954. var key = keys[i];
  955. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  956. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  957. }
  958. }
  959. };
  960. var replacement = /#|\.prototype\./;
  961. var isForced = function (feature, detection) {
  962. var value = data[normalize(feature)];
  963. return value == POLYFILL ? true
  964. : value == NATIVE ? false
  965. : isCallable(detection) ? fails(detection)
  966. : !!detection;
  967. };
  968. var normalize = isForced.normalize = function (string) {
  969. return String(string).replace(replacement, '.').toLowerCase();
  970. };
  971. var data = isForced.data = {};
  972. var NATIVE = isForced.NATIVE = 'N';
  973. var POLYFILL = isForced.POLYFILL = 'P';
  974. var isForced_1 = isForced;
  975. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  976. /*
  977. options.target - name of the target object
  978. options.global - target is the global object
  979. options.stat - export as static methods of target
  980. options.proto - export as prototype methods of target
  981. options.real - real prototype method for the `pure` version
  982. options.forced - export even if the native feature is available
  983. options.bind - bind methods to the target, required for the `pure` version
  984. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  985. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  986. options.sham - add a flag to not completely full polyfills
  987. options.enumerable - export as enumerable property
  988. options.noTargetGet - prevent calling a getter on target
  989. options.name - the .name of the function if it does not match the key
  990. */
  991. var _export = function (options, source) {
  992. var TARGET = options.target;
  993. var GLOBAL = options.global;
  994. var STATIC = options.stat;
  995. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  996. if (GLOBAL) {
  997. target = global_1;
  998. } else if (STATIC) {
  999. target = global_1[TARGET] || setGlobal(TARGET, {});
  1000. } else {
  1001. target = (global_1[TARGET] || {}).prototype;
  1002. }
  1003. if (target) for (key in source) {
  1004. sourceProperty = source[key];
  1005. if (options.noTargetGet) {
  1006. descriptor = getOwnPropertyDescriptor(target, key);
  1007. targetProperty = descriptor && descriptor.value;
  1008. } else targetProperty = target[key];
  1009. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1010. // contained in target
  1011. if (!FORCED && targetProperty !== undefined) {
  1012. if (typeof sourceProperty == typeof targetProperty) continue;
  1013. copyConstructorProperties(sourceProperty, targetProperty);
  1014. }
  1015. // add a flag to not completely full polyfills
  1016. if (options.sham || (targetProperty && targetProperty.sham)) {
  1017. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1018. }
  1019. // extend global
  1020. redefine(target, key, sourceProperty, options);
  1021. }
  1022. };
  1023. var createProperty = function (object, key, value) {
  1024. var propertyKey = toPropertyKey(key);
  1025. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1026. else object[propertyKey] = value;
  1027. };
  1028. var SPECIES$1 = wellKnownSymbol('species');
  1029. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1030. // We can't use this feature detection in V8 since it causes
  1031. // deoptimization and serious performance degradation
  1032. // https://github.com/zloirock/core-js/issues/677
  1033. return engineV8Version >= 51 || !fails(function () {
  1034. var array = [];
  1035. var constructor = array.constructor = {};
  1036. constructor[SPECIES$1] = function () {
  1037. return { foo: 1 };
  1038. };
  1039. return array[METHOD_NAME](Boolean).foo !== 1;
  1040. });
  1041. };
  1042. var arraySlice = functionUncurryThis([].slice);
  1043. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
  1044. var SPECIES = wellKnownSymbol('species');
  1045. var Array$2 = global_1.Array;
  1046. var max$1 = Math.max;
  1047. // `Array.prototype.slice` method
  1048. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1049. // fallback for not array-like ES3 strings and DOM objects
  1050. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1051. slice: function slice(start, end) {
  1052. var O = toIndexedObject(this);
  1053. var length = lengthOfArrayLike(O);
  1054. var k = toAbsoluteIndex(start, length);
  1055. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1056. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1057. var Constructor, result, n;
  1058. if (isArray(O)) {
  1059. Constructor = O.constructor;
  1060. // cross-realm fallback
  1061. if (isConstructor(Constructor) && (Constructor === Array$2 || isArray(Constructor.prototype))) {
  1062. Constructor = undefined;
  1063. } else if (isObject(Constructor)) {
  1064. Constructor = Constructor[SPECIES];
  1065. if (Constructor === null) Constructor = undefined;
  1066. }
  1067. if (Constructor === Array$2 || Constructor === undefined) {
  1068. return arraySlice(O, k, fin);
  1069. }
  1070. }
  1071. result = new (Constructor === undefined ? Array$2 : Constructor)(max$1(fin - k, 0));
  1072. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  1073. result.length = n;
  1074. return result;
  1075. }
  1076. });
  1077. var String$1 = global_1.String;
  1078. var toString_1 = function (argument) {
  1079. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1080. return String$1(argument);
  1081. };
  1082. var Array$1 = global_1.Array;
  1083. var max = Math.max;
  1084. var arraySliceSimple = function (O, start, end) {
  1085. var length = lengthOfArrayLike(O);
  1086. var k = toAbsoluteIndex(start, length);
  1087. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1088. var result = Array$1(max(fin - k, 0));
  1089. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  1090. result.length = n;
  1091. return result;
  1092. };
  1093. var floor = Math.floor;
  1094. var mergeSort = function (array, comparefn) {
  1095. var length = array.length;
  1096. var middle = floor(length / 2);
  1097. return length < 8 ? insertionSort(array, comparefn) : merge(
  1098. array,
  1099. mergeSort(arraySliceSimple(array, 0, middle), comparefn),
  1100. mergeSort(arraySliceSimple(array, middle), comparefn),
  1101. comparefn
  1102. );
  1103. };
  1104. var insertionSort = function (array, comparefn) {
  1105. var length = array.length;
  1106. var i = 1;
  1107. var element, j;
  1108. while (i < length) {
  1109. j = i;
  1110. element = array[i];
  1111. while (j && comparefn(array[j - 1], element) > 0) {
  1112. array[j] = array[--j];
  1113. }
  1114. if (j !== i++) array[j] = element;
  1115. } return array;
  1116. };
  1117. var merge = function (array, left, right, comparefn) {
  1118. var llength = left.length;
  1119. var rlength = right.length;
  1120. var lindex = 0;
  1121. var rindex = 0;
  1122. while (lindex < llength || rindex < rlength) {
  1123. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1124. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1125. : lindex < llength ? left[lindex++] : right[rindex++];
  1126. } return array;
  1127. };
  1128. var arraySort = mergeSort;
  1129. var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
  1130. var engineFfVersion = !!firefox && +firefox[1];
  1131. var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent);
  1132. var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
  1133. var engineWebkitVersion = !!webkit && +webkit[1];
  1134. var test = [];
  1135. var un$Sort = functionUncurryThis(test.sort);
  1136. var push = functionUncurryThis(test.push);
  1137. // IE8-
  1138. var FAILS_ON_UNDEFINED = fails(function () {
  1139. test.sort(undefined);
  1140. });
  1141. // V8 bug
  1142. var FAILS_ON_NULL = fails(function () {
  1143. test.sort(null);
  1144. });
  1145. // Old WebKit
  1146. var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
  1147. var STABLE_SORT = !fails(function () {
  1148. // feature detection can be too slow, so check engines versions
  1149. if (engineV8Version) return engineV8Version < 70;
  1150. if (engineFfVersion && engineFfVersion > 3) return;
  1151. if (engineIsIeOrEdge) return true;
  1152. if (engineWebkitVersion) return engineWebkitVersion < 603;
  1153. var result = '';
  1154. var code, chr, value, index;
  1155. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1156. for (code = 65; code < 76; code++) {
  1157. chr = String.fromCharCode(code);
  1158. switch (code) {
  1159. case 66: case 69: case 70: case 72: value = 3; break;
  1160. case 68: case 71: value = 4; break;
  1161. default: value = 2;
  1162. }
  1163. for (index = 0; index < 47; index++) {
  1164. test.push({ k: chr + index, v: value });
  1165. }
  1166. }
  1167. test.sort(function (a, b) { return b.v - a.v; });
  1168. for (index = 0; index < test.length; index++) {
  1169. chr = test[index].k.charAt(0);
  1170. if (result.charAt(result.length - 1) !== chr) result += chr;
  1171. }
  1172. return result !== 'DGBEFHACIJK';
  1173. });
  1174. var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1175. var getSortCompare = function (comparefn) {
  1176. return function (x, y) {
  1177. if (y === undefined) return -1;
  1178. if (x === undefined) return 1;
  1179. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1180. return toString_1(x) > toString_1(y) ? 1 : -1;
  1181. };
  1182. };
  1183. // `Array.prototype.sort` method
  1184. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1185. _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1186. sort: function sort(comparefn) {
  1187. if (comparefn !== undefined) aCallable(comparefn);
  1188. var array = toObject(this);
  1189. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  1190. var items = [];
  1191. var arrayLength = lengthOfArrayLike(array);
  1192. var itemsLength, index;
  1193. for (index = 0; index < arrayLength; index++) {
  1194. if (index in array) push(items, array[index]);
  1195. }
  1196. arraySort(items, getSortCompare(comparefn));
  1197. itemsLength = items.length;
  1198. index = 0;
  1199. while (index < itemsLength) array[index] = items[index++];
  1200. while (index < arrayLength) delete array[index++];
  1201. return array;
  1202. }
  1203. });
  1204. var un$Join = functionUncurryThis([].join);
  1205. var ES3_STRINGS = indexedObject != Object;
  1206. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1207. // `Array.prototype.join` method
  1208. // https://tc39.es/ecma262/#sec-array.prototype.join
  1209. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1210. join: function join(separator) {
  1211. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  1212. }
  1213. });
  1214. var FUNCTION_NAME_EXISTS = functionName.EXISTS;
  1215. var defineProperty$1 = objectDefineProperty.f;
  1216. var FunctionPrototype = Function.prototype;
  1217. var functionToString = functionUncurryThis(FunctionPrototype.toString);
  1218. var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
  1219. var regExpExec = functionUncurryThis(nameRE.exec);
  1220. var NAME = 'name';
  1221. // Function instances `.name` property
  1222. // https://tc39.es/ecma262/#sec-function-instances-name
  1223. if (descriptors && !FUNCTION_NAME_EXISTS) {
  1224. defineProperty$1(FunctionPrototype, NAME, {
  1225. configurable: true,
  1226. get: function () {
  1227. try {
  1228. return regExpExec(nameRE, functionToString(this))[1];
  1229. } catch (error) {
  1230. return '';
  1231. }
  1232. }
  1233. });
  1234. }
  1235. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1236. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1237. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1238. var TypeError$1 = global_1.TypeError;
  1239. // We can't use this feature detection in V8 since it causes
  1240. // deoptimization and serious performance degradation
  1241. // https://github.com/zloirock/core-js/issues/679
  1242. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1243. var array = [];
  1244. array[IS_CONCAT_SPREADABLE] = false;
  1245. return array.concat()[0] !== array;
  1246. });
  1247. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1248. var isConcatSpreadable = function (O) {
  1249. if (!isObject(O)) return false;
  1250. var spreadable = O[IS_CONCAT_SPREADABLE];
  1251. return spreadable !== undefined ? !!spreadable : isArray(O);
  1252. };
  1253. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1254. // `Array.prototype.concat` method
  1255. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1256. // with adding support of @@isConcatSpreadable and @@species
  1257. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1258. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1259. concat: function concat(arg) {
  1260. var O = toObject(this);
  1261. var A = arraySpeciesCreate(O, 0);
  1262. var n = 0;
  1263. var i, k, length, len, E;
  1264. for (i = -1, length = arguments.length; i < length; i++) {
  1265. E = i === -1 ? O : arguments[i];
  1266. if (isConcatSpreadable(E)) {
  1267. len = lengthOfArrayLike(E);
  1268. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1269. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1270. } else {
  1271. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1272. createProperty(A, n++, E);
  1273. }
  1274. }
  1275. A.length = n;
  1276. return A;
  1277. }
  1278. });
  1279. // `Object.keys` method
  1280. // https://tc39.es/ecma262/#sec-object.keys
  1281. // eslint-disable-next-line es/no-object-keys -- safe
  1282. var objectKeys = Object.keys || function keys(O) {
  1283. return objectKeysInternal(O, enumBugKeys);
  1284. };
  1285. // `Object.defineProperties` method
  1286. // https://tc39.es/ecma262/#sec-object.defineproperties
  1287. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1288. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  1289. anObject(O);
  1290. var props = toIndexedObject(Properties);
  1291. var keys = objectKeys(Properties);
  1292. var length = keys.length;
  1293. var index = 0;
  1294. var key;
  1295. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  1296. return O;
  1297. };
  1298. var objectDefineProperties = {
  1299. f: f
  1300. };
  1301. var html = getBuiltIn('document', 'documentElement');
  1302. /* global ActiveXObject -- old IE, WSH */
  1303. var GT = '>';
  1304. var LT = '<';
  1305. var PROTOTYPE = 'prototype';
  1306. var SCRIPT = 'script';
  1307. var IE_PROTO = sharedKey('IE_PROTO');
  1308. var EmptyConstructor = function () { /* empty */ };
  1309. var scriptTag = function (content) {
  1310. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1311. };
  1312. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1313. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1314. activeXDocument.write(scriptTag(''));
  1315. activeXDocument.close();
  1316. var temp = activeXDocument.parentWindow.Object;
  1317. activeXDocument = null; // avoid memory leak
  1318. return temp;
  1319. };
  1320. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1321. var NullProtoObjectViaIFrame = function () {
  1322. // Thrash, waste and sodomy: IE GC bug
  1323. var iframe = documentCreateElement('iframe');
  1324. var JS = 'java' + SCRIPT + ':';
  1325. var iframeDocument;
  1326. iframe.style.display = 'none';
  1327. html.appendChild(iframe);
  1328. // https://github.com/zloirock/core-js/issues/475
  1329. iframe.src = String(JS);
  1330. iframeDocument = iframe.contentWindow.document;
  1331. iframeDocument.open();
  1332. iframeDocument.write(scriptTag('document.F=Object'));
  1333. iframeDocument.close();
  1334. return iframeDocument.F;
  1335. };
  1336. // Check for document.domain and active x support
  1337. // No need to use active x approach when document.domain is not set
  1338. // see https://github.com/es-shims/es5-shim/issues/150
  1339. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1340. // avoid IE GC bug
  1341. var activeXDocument;
  1342. var NullProtoObject = function () {
  1343. try {
  1344. activeXDocument = new ActiveXObject('htmlfile');
  1345. } catch (error) { /* ignore */ }
  1346. NullProtoObject = typeof document != 'undefined'
  1347. ? document.domain && activeXDocument
  1348. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1349. : NullProtoObjectViaIFrame()
  1350. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1351. var length = enumBugKeys.length;
  1352. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1353. return NullProtoObject();
  1354. };
  1355. hiddenKeys$1[IE_PROTO] = true;
  1356. // `Object.create` method
  1357. // https://tc39.es/ecma262/#sec-object.create
  1358. var objectCreate = Object.create || function create(O, Properties) {
  1359. var result;
  1360. if (O !== null) {
  1361. EmptyConstructor[PROTOTYPE] = anObject(O);
  1362. result = new EmptyConstructor();
  1363. EmptyConstructor[PROTOTYPE] = null;
  1364. // add "__proto__" for Object.getPrototypeOf polyfill
  1365. result[IE_PROTO] = O;
  1366. } else result = NullProtoObject();
  1367. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  1368. };
  1369. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1370. var ArrayPrototype = Array.prototype;
  1371. // Array.prototype[@@unscopables]
  1372. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1373. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1374. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1375. configurable: true,
  1376. value: objectCreate(null)
  1377. });
  1378. }
  1379. // add a key to Array.prototype[@@unscopables]
  1380. var addToUnscopables = function (key) {
  1381. ArrayPrototype[UNSCOPABLES][key] = true;
  1382. };
  1383. var $find = arrayIteration.find;
  1384. var FIND = 'find';
  1385. var SKIPS_HOLES = true;
  1386. // Shouldn't skip holes
  1387. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1388. // `Array.prototype.find` method
  1389. // https://tc39.es/ecma262/#sec-array.prototype.find
  1390. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1391. find: function find(callbackfn /* , that = undefined */) {
  1392. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1393. }
  1394. });
  1395. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1396. addToUnscopables(FIND);
  1397. var $filter = arrayIteration.filter;
  1398. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1399. // `Array.prototype.filter` method
  1400. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1401. // with adding support of @@species
  1402. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1403. filter: function filter(callbackfn /* , thisArg */) {
  1404. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1405. }
  1406. });
  1407. // eslint-disable-next-line es/no-object-assign -- safe
  1408. var $assign = Object.assign;
  1409. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1410. var defineProperty = Object.defineProperty;
  1411. var concat = functionUncurryThis([].concat);
  1412. // `Object.assign` method
  1413. // https://tc39.es/ecma262/#sec-object.assign
  1414. var objectAssign = !$assign || fails(function () {
  1415. // should have correct order of operations (Edge bug)
  1416. if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1417. enumerable: true,
  1418. get: function () {
  1419. defineProperty(this, 'b', {
  1420. value: 3,
  1421. enumerable: false
  1422. });
  1423. }
  1424. }), { b: 2 })).b !== 1) return true;
  1425. // should work with symbols and should have deterministic property order (V8 bug)
  1426. var A = {};
  1427. var B = {};
  1428. // eslint-disable-next-line es/no-symbol -- safe
  1429. var symbol = Symbol();
  1430. var alphabet = 'abcdefghijklmnopqrst';
  1431. A[symbol] = 7;
  1432. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1433. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1434. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1435. var T = toObject(target);
  1436. var argumentsLength = arguments.length;
  1437. var index = 1;
  1438. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  1439. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1440. while (argumentsLength > index) {
  1441. var S = indexedObject(arguments[index++]);
  1442. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1443. var length = keys.length;
  1444. var j = 0;
  1445. var key;
  1446. while (length > j) {
  1447. key = keys[j++];
  1448. if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
  1449. }
  1450. } return T;
  1451. } : $assign;
  1452. // `Object.assign` method
  1453. // https://tc39.es/ecma262/#sec-object.assign
  1454. // eslint-disable-next-line es/no-object-assign -- required for testing
  1455. _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
  1456. assign: objectAssign
  1457. });
  1458. /**
  1459. * @author: Yura Knoxville
  1460. * @version: v1.1.0
  1461. */
  1462. var initBodyCaller;
  1463. var groupBy = function groupBy(array, f) {
  1464. var tmpGroups = {};
  1465. array.forEach(function (o) {
  1466. var groups = f(o);
  1467. tmpGroups[groups] = tmpGroups[groups] || [];
  1468. tmpGroups[groups].push(o);
  1469. });
  1470. return tmpGroups;
  1471. };
  1472. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1473. collapseGroup: {
  1474. bootstrap3: 'glyphicon-chevron-up',
  1475. bootstrap5: 'bi-chevron-up',
  1476. materialize: 'arrow_drop_down'
  1477. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-angle-up',
  1478. expandGroup: {
  1479. bootstrap3: 'glyphicon-chevron-down',
  1480. bootstrap5: 'bi-chevron-down',
  1481. materialize: 'arrow_drop_up'
  1482. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-angle-down'
  1483. });
  1484. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1485. groupBy: false,
  1486. groupByField: '',
  1487. groupByFormatter: undefined,
  1488. groupByToggle: false,
  1489. groupByShowToggleIcon: false,
  1490. groupByCollapsedGroups: []
  1491. });
  1492. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1493. var BootstrapTable = $__default["default"].fn.bootstrapTable.Constructor;
  1494. var _initSort = BootstrapTable.prototype.initSort;
  1495. var _initBody = BootstrapTable.prototype.initBody;
  1496. var _updateSelected = BootstrapTable.prototype.updateSelected;
  1497. BootstrapTable.prototype.initSort = function () {
  1498. var _this = this;
  1499. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1500. args[_key] = arguments[_key];
  1501. }
  1502. _initSort.apply(this, Array.prototype.slice.apply(args));
  1503. var that = this;
  1504. this.tableGroups = [];
  1505. if (this.options.groupBy && this.options.groupByField !== '') {
  1506. if (this.options.sortName !== this.options.groupByField) {
  1507. if (this.options.customSort) {
  1508. Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
  1509. } else {
  1510. this.options.data.sort(function (a, b) {
  1511. var groupByFields = _this.getGroupByFields();
  1512. var fieldValuesA = [];
  1513. var fieldValuesB = [];
  1514. $__default["default"].each(groupByFields, function (i, field) {
  1515. fieldValuesA.push(a[field]);
  1516. fieldValuesB.push(b[field]);
  1517. });
  1518. a = fieldValuesA.join();
  1519. b = fieldValuesB.join();
  1520. return a.localeCompare(b, undefined, {
  1521. numeric: true
  1522. });
  1523. });
  1524. }
  1525. }
  1526. var groups = groupBy(that.data, function (item) {
  1527. var groupByFields = _this.getGroupByFields();
  1528. var groupValues = [];
  1529. $__default["default"].each(groupByFields, function (i, field) {
  1530. groupValues.push(item[field]);
  1531. });
  1532. return groupValues.join(', ');
  1533. });
  1534. var index = 0;
  1535. $__default["default"].each(groups, function (key, value) {
  1536. _this.tableGroups.push({
  1537. id: index,
  1538. name: key,
  1539. data: value
  1540. });
  1541. value.forEach(function (item) {
  1542. if (!item._data) {
  1543. item._data = {};
  1544. }
  1545. if (_this.isCollapsed(key, value)) {
  1546. item._class += ' hidden';
  1547. }
  1548. item._data['parent-index'] = index;
  1549. });
  1550. index++;
  1551. });
  1552. }
  1553. };
  1554. BootstrapTable.prototype.initBody = function () {
  1555. var _this2 = this;
  1556. initBodyCaller = true;
  1557. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1558. args[_key2] = arguments[_key2];
  1559. }
  1560. _initBody.apply(this, Array.prototype.slice.apply(args));
  1561. if (this.options.groupBy && this.options.groupByField !== '') {
  1562. var that = this;
  1563. var checkBox = false;
  1564. var visibleColumns = 0;
  1565. this.columns.forEach(function (column) {
  1566. if (column.checkbox) {
  1567. checkBox = true;
  1568. } else if (column.visible) {
  1569. visibleColumns += 1;
  1570. }
  1571. });
  1572. if (this.options.detailView && !this.options.cardView) {
  1573. visibleColumns += 1;
  1574. }
  1575. this.tableGroups.forEach(function (item) {
  1576. var html = [];
  1577. html.push(Utils.sprintf('<tr class="info groupBy %s" data-group-index="%s">', _this2.options.groupByToggle ? 'expanded' : '', item.id));
  1578. if (that.options.detailView && !that.options.cardView) {
  1579. html.push('<td class="detail"></td>');
  1580. }
  1581. if (checkBox) {
  1582. html.push('<td class="bs-checkbox">', '<input name="btSelectGroup" type="checkbox" />', '</td>');
  1583. }
  1584. var formattedValue = item.name;
  1585. if (that.options.groupByFormatter !== undefined) {
  1586. formattedValue = Utils.calculateObjectValue(that.options, that.options.groupByFormatter, [item.name, item.id, item.data]);
  1587. }
  1588. html.push('<td', Utils.sprintf(' colspan="%s"', visibleColumns), '>', formattedValue);
  1589. var icon = _this2.options.icons.collapseGroup;
  1590. if (_this2.isCollapsed(item.name, item.data)) {
  1591. icon = _this2.options.icons.expandGroup;
  1592. }
  1593. if (_this2.options.groupByToggle && _this2.options.groupByShowToggleIcon) {
  1594. html.push("<span class=\"float-right ".concat(_this2.options.iconsPrefix, " ").concat(icon, "\"></span>"));
  1595. }
  1596. html.push('</td></tr>');
  1597. that.$body.find("tr[data-parent-index=".concat(item.id, "]:first")).before($__default["default"](html.join('')));
  1598. });
  1599. this.$selectGroup = [];
  1600. this.$body.find('[name="btSelectGroup"]').each(function () {
  1601. var self = $__default["default"](this);
  1602. that.$selectGroup.push({
  1603. group: self,
  1604. item: that.$selectItem.filter(function () {
  1605. return $__default["default"](this).closest('tr').data('parent-index') === self.closest('tr').data('group-index');
  1606. })
  1607. });
  1608. });
  1609. if (this.options.groupByToggle) {
  1610. this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
  1611. var $this = $__default["default"](this);
  1612. var groupIndex = $this.closest('tr').data('group-index');
  1613. var $groupRows = that.$body.find("tr[data-parent-index=".concat(groupIndex, "]"));
  1614. $this.toggleClass('expanded collapsed');
  1615. $this.find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
  1616. $groupRows.toggleClass('hidden');
  1617. $groupRows.each(function (i, element) {
  1618. return that.collapseRow($__default["default"](element).data('index'));
  1619. });
  1620. });
  1621. }
  1622. this.$container.off('click', '[name="btSelectGroup"]').on('click', '[name="btSelectGroup"]', function (event) {
  1623. event.stopImmediatePropagation();
  1624. var self = $__default["default"](this);
  1625. var checked = self.prop('checked');
  1626. that[checked ? 'checkGroup' : 'uncheckGroup']($__default["default"](this).closest('tr').data('group-index'));
  1627. });
  1628. }
  1629. initBodyCaller = false;
  1630. this.updateSelected();
  1631. };
  1632. BootstrapTable.prototype.updateSelected = function () {
  1633. if (!initBodyCaller) {
  1634. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1635. args[_key3] = arguments[_key3];
  1636. }
  1637. _updateSelected.apply(this, Array.prototype.slice.apply(args));
  1638. if (this.options.groupBy && this.options.groupByField !== '') {
  1639. this.$selectGroup.forEach(function (item) {
  1640. var checkGroup = item.item.filter(':enabled').length === item.item.filter(':enabled').filter(':checked').length;
  1641. item.group.prop('checked', checkGroup);
  1642. });
  1643. }
  1644. }
  1645. };
  1646. BootstrapTable.prototype.checkGroup = function (index) {
  1647. this.checkGroup_(index, true);
  1648. };
  1649. BootstrapTable.prototype.uncheckGroup = function (index) {
  1650. this.checkGroup_(index, false);
  1651. };
  1652. BootstrapTable.prototype.isCollapsed = function (groupKey, items) {
  1653. if (this.options.groupByCollapsedGroups) {
  1654. var collapsedGroups = Utils.calculateObjectValue(this, this.options.groupByCollapsedGroups, [groupKey, items], true);
  1655. if ($__default["default"].inArray(groupKey, collapsedGroups) > -1) {
  1656. return true;
  1657. }
  1658. }
  1659. return false;
  1660. };
  1661. BootstrapTable.prototype.checkGroup_ = function (index, checked) {
  1662. var rowsBefore = this.getSelections();
  1663. var filter = function filter() {
  1664. return $__default["default"](this).closest('tr').data('parent-index') === index;
  1665. };
  1666. this.$selectItem.filter(filter).prop('checked', checked);
  1667. this.updateRows();
  1668. this.updateSelected();
  1669. var rowsAfter = this.getSelections();
  1670. if (checked) {
  1671. this.trigger('check-all', rowsAfter, rowsBefore);
  1672. return;
  1673. }
  1674. this.trigger('uncheck-all', rowsAfter, rowsBefore);
  1675. };
  1676. BootstrapTable.prototype.getGroupByFields = function () {
  1677. var groupByFields = this.options.groupByField;
  1678. if (!$__default["default"].isArray(this.options.groupByField)) {
  1679. groupByFields = [this.options.groupByField];
  1680. }
  1681. return groupByFields;
  1682. };
  1683. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1684. _inherits(_class, _$$BootstrapTable);
  1685. var _super = _createSuper(_class);
  1686. function _class() {
  1687. _classCallCheck(this, _class);
  1688. return _super.apply(this, arguments);
  1689. }
  1690. _createClass(_class, [{
  1691. key: "scrollTo",
  1692. value: function scrollTo(params) {
  1693. if (this.options.groupBy) {
  1694. var options = {
  1695. unit: 'px',
  1696. value: 0
  1697. };
  1698. if (_typeof(params) === 'object') {
  1699. options = Object.assign(options, params);
  1700. }
  1701. if (options.unit === 'rows') {
  1702. var scrollTo = 0;
  1703. this.$body.find("> tr:not(.groupBy):lt(".concat(options.value, ")")).each(function (i, el) {
  1704. scrollTo += $__default["default"](el).outerHeight(true);
  1705. });
  1706. var $targetColumn = this.$body.find("> tr:not(.groupBy):eq(".concat(options.value, ")"));
  1707. $targetColumn.prevAll('.groupBy').each(function (i, el) {
  1708. scrollTo += $__default["default"](el).outerHeight(true);
  1709. });
  1710. this.$tableBody.scrollTop(scrollTo);
  1711. return;
  1712. }
  1713. }
  1714. _get(_getPrototypeOf(_class.prototype), "scrollTo", this).call(this, params);
  1715. }
  1716. }]);
  1717. return _class;
  1718. }($__default["default"].BootstrapTable);
  1719. }));