bootstrap-table-rails 1.17.0 → 1.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +30 -132
  5. data/lib/bootstrap-table-rails/version.rb +1 -1
  6. data/vendor/.DS_Store +0 -0
  7. data/vendor/assets/.DS_Store +0 -0
  8. data/vendor/assets/javascripts/.DS_Store +0 -0
  9. data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
  10. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +596 -228
  11. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +183 -990
  12. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +184 -991
  13. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +26 -7
  14. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1420 -1423
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +152 -40
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +173 -48
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +495 -908
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +199 -57
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +177 -487
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +66 -24
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +435 -977
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +534 -971
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +372 -161
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +196 -95
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +136 -48
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +3 -2
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +330 -559
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +45 -11
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +137 -36
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +232 -148
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +239 -561
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +136 -37
  33. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +101 -58
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +529 -1045
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +155 -58
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +107 -33
  37. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +283 -87
  38. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +132 -43
  39. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +537 -1061
  40. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +278 -990
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +36 -20
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +36 -20
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +36 -20
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +36 -20
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +36 -20
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +36 -20
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +79 -24
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +36 -20
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +36 -20
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +36 -20
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +53 -37
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +36 -20
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +50 -34
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +36 -20
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +36 -20
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +36 -20
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +36 -20
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +36 -20
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +36 -20
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +36 -20
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +36 -20
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +36 -20
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +47 -31
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +36 -20
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +36 -20
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +36 -20
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +36 -20
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +36 -20
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +36 -20
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +36 -20
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +36 -20
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +36 -20
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +36 -20
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +36 -20
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +36 -20
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +36 -20
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +57 -40
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +36 -20
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +36 -20
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +36 -20
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +57 -41
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +53 -37
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +36 -20
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +36 -20
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +36 -20
  86. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +36 -20
  87. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +36 -20
  88. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +36 -20
  89. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +36 -20
  90. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +36 -20
  91. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +36 -20
  92. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +36 -20
  93. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +36 -20
  94. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +27 -6
  95. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +114 -35
  96. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +25 -6
  97. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +110 -31
  98. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +30 -6
  99. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +119 -34
  100. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +30 -6
  101. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +115 -30
  102. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +25 -6
  103. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +107 -28
  104. metadata +6 -2
  105. data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +0 -2668
@@ -1,10 +1,12 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3
3
  typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
- (global = global || self, factory(global.jQuery));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
5
5
  }(this, (function ($) { 'use strict';
6
6
 
7
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var $__default = /*#__PURE__*/_interopDefaultLegacy($);
8
10
 
9
11
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
12
 
@@ -24,7 +26,7 @@
24
26
  check(typeof self == 'object' && self) ||
25
27
  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
28
  // eslint-disable-next-line no-new-func
27
- Function('return this')();
29
+ (function () { return this; })() || Function('return this')();
28
30
 
29
31
  var fails = function (exec) {
30
32
  try {
@@ -36,7 +38,7 @@
36
38
 
37
39
  // Thank's IE8 for his funny defineProperty
38
40
  var descriptors = !fails(function () {
39
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
41
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
40
42
  });
41
43
 
42
44
  var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
@@ -217,9 +219,9 @@
217
219
  (module.exports = function (key, value) {
218
220
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
219
221
  })('versions', []).push({
220
- version: '3.6.0',
222
+ version: '3.8.1',
221
223
  mode: 'global',
222
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
224
+ copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
223
225
  });
224
226
  });
225
227
 
@@ -255,11 +257,12 @@
255
257
  };
256
258
 
257
259
  if (nativeWeakMap) {
258
- var store$1 = new WeakMap$1();
260
+ var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
259
261
  var wmget = store$1.get;
260
262
  var wmhas = store$1.has;
261
263
  var wmset = store$1.set;
262
264
  set = function (it, metadata) {
265
+ metadata.facade = it;
263
266
  wmset.call(store$1, it, metadata);
264
267
  return metadata;
265
268
  };
@@ -273,6 +276,7 @@
273
276
  var STATE = sharedKey('state');
274
277
  hiddenKeys[STATE] = true;
275
278
  set = function (it, metadata) {
279
+ metadata.facade = it;
276
280
  createNonEnumerableProperty(it, STATE, metadata);
277
281
  return metadata;
278
282
  };
@@ -301,9 +305,15 @@
301
305
  var unsafe = options ? !!options.unsafe : false;
302
306
  var simple = options ? !!options.enumerable : false;
303
307
  var noTargetGet = options ? !!options.noTargetGet : false;
308
+ var state;
304
309
  if (typeof value == 'function') {
305
- if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
306
- enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
310
+ if (typeof key == 'string' && !has(value, 'name')) {
311
+ createNonEnumerableProperty(value, 'name', key);
312
+ }
313
+ state = enforceInternalState(value);
314
+ if (!state.source) {
315
+ state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
316
+ }
307
317
  }
308
318
  if (O === global_1) {
309
319
  if (simple) O[key] = value;
@@ -526,33 +536,10 @@
526
536
  }
527
537
  };
528
538
 
529
- var aFunction$1 = function (it) {
530
- if (typeof it != 'function') {
531
- throw TypeError(String(it) + ' is not a function');
532
- } return it;
533
- };
534
-
535
- // optional / simple context binding
536
- var bindContext = function (fn, that, length) {
537
- aFunction$1(fn);
538
- if (that === undefined) return fn;
539
- switch (length) {
540
- case 0: return function () {
541
- return fn.call(that);
542
- };
543
- case 1: return function (a) {
544
- return fn.call(that, a);
545
- };
546
- case 2: return function (a, b) {
547
- return fn.call(that, a, b);
548
- };
549
- case 3: return function (a, b, c) {
550
- return fn.call(that, a, b, c);
551
- };
552
- }
553
- return function (/* ...args */) {
554
- return fn.apply(that, arguments);
555
- };
539
+ // `IsArray` abstract operation
540
+ // https://tc39.github.io/ecma262/#sec-isarray
541
+ var isArray = Array.isArray || function isArray(arg) {
542
+ return classofRaw(arg) == 'Array';
556
543
  };
557
544
 
558
545
  // `ToObject` abstract operation
@@ -561,10 +548,10 @@
561
548
  return Object(requireObjectCoercible(argument));
562
549
  };
563
550
 
564
- // `IsArray` abstract operation
565
- // https://tc39.github.io/ecma262/#sec-isarray
566
- var isArray = Array.isArray || function isArray(arg) {
567
- return classofRaw(arg) == 'Array';
551
+ var createProperty = function (object, key, value) {
552
+ var propertyKey = toPrimitive(key);
553
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
554
+ else object[propertyKey] = value;
568
555
  };
569
556
 
570
557
  var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
@@ -577,11 +564,11 @@
577
564
  // eslint-disable-next-line no-undef
578
565
  && !Symbol.sham
579
566
  // eslint-disable-next-line no-undef
580
- && typeof Symbol() == 'symbol';
567
+ && typeof Symbol.iterator == 'symbol';
581
568
 
582
569
  var WellKnownSymbolsStore = shared('wks');
583
570
  var Symbol$1 = global_1.Symbol;
584
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
571
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
585
572
 
586
573
  var wellKnownSymbol = function (name) {
587
574
  if (!has(WellKnownSymbolsStore, name)) {
@@ -607,24 +594,138 @@
607
594
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
608
595
  };
609
596
 
597
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
598
+
599
+ var process = global_1.process;
600
+ var versions = process && process.versions;
601
+ var v8 = versions && versions.v8;
602
+ var match, version;
603
+
604
+ if (v8) {
605
+ match = v8.split('.');
606
+ version = match[0] + match[1];
607
+ } else if (engineUserAgent) {
608
+ match = engineUserAgent.match(/Edge\/(\d+)/);
609
+ if (!match || match[1] >= 74) {
610
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
611
+ if (match) version = match[1];
612
+ }
613
+ }
614
+
615
+ var engineV8Version = version && +version;
616
+
617
+ var SPECIES$1 = wellKnownSymbol('species');
618
+
619
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
620
+ // We can't use this feature detection in V8 since it causes
621
+ // deoptimization and serious performance degradation
622
+ // https://github.com/zloirock/core-js/issues/677
623
+ return engineV8Version >= 51 || !fails(function () {
624
+ var array = [];
625
+ var constructor = array.constructor = {};
626
+ constructor[SPECIES$1] = function () {
627
+ return { foo: 1 };
628
+ };
629
+ return array[METHOD_NAME](Boolean).foo !== 1;
630
+ });
631
+ };
632
+
633
+ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
634
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
635
+ var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
636
+
637
+ // We can't use this feature detection in V8 since it causes
638
+ // deoptimization and serious performance degradation
639
+ // https://github.com/zloirock/core-js/issues/679
640
+ var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
641
+ var array = [];
642
+ array[IS_CONCAT_SPREADABLE] = false;
643
+ return array.concat()[0] !== array;
644
+ });
645
+
646
+ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
647
+
648
+ var isConcatSpreadable = function (O) {
649
+ if (!isObject(O)) return false;
650
+ var spreadable = O[IS_CONCAT_SPREADABLE];
651
+ return spreadable !== undefined ? !!spreadable : isArray(O);
652
+ };
653
+
654
+ var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
655
+
656
+ // `Array.prototype.concat` method
657
+ // https://tc39.github.io/ecma262/#sec-array.prototype.concat
658
+ // with adding support of @@isConcatSpreadable and @@species
659
+ _export({ target: 'Array', proto: true, forced: FORCED }, {
660
+ concat: function concat(arg) { // eslint-disable-line no-unused-vars
661
+ var O = toObject(this);
662
+ var A = arraySpeciesCreate(O, 0);
663
+ var n = 0;
664
+ var i, k, length, len, E;
665
+ for (i = -1, length = arguments.length; i < length; i++) {
666
+ E = i === -1 ? O : arguments[i];
667
+ if (isConcatSpreadable(E)) {
668
+ len = toLength(E.length);
669
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
670
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
671
+ } else {
672
+ if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
673
+ createProperty(A, n++, E);
674
+ }
675
+ }
676
+ A.length = n;
677
+ return A;
678
+ }
679
+ });
680
+
681
+ var aFunction$1 = function (it) {
682
+ if (typeof it != 'function') {
683
+ throw TypeError(String(it) + ' is not a function');
684
+ } return it;
685
+ };
686
+
687
+ // optional / simple context binding
688
+ var functionBindContext = function (fn, that, length) {
689
+ aFunction$1(fn);
690
+ if (that === undefined) return fn;
691
+ switch (length) {
692
+ case 0: return function () {
693
+ return fn.call(that);
694
+ };
695
+ case 1: return function (a) {
696
+ return fn.call(that, a);
697
+ };
698
+ case 2: return function (a, b) {
699
+ return fn.call(that, a, b);
700
+ };
701
+ case 3: return function (a, b, c) {
702
+ return fn.call(that, a, b, c);
703
+ };
704
+ }
705
+ return function (/* ...args */) {
706
+ return fn.apply(that, arguments);
707
+ };
708
+ };
709
+
610
710
  var push = [].push;
611
711
 
612
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
712
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
613
713
  var createMethod$1 = function (TYPE) {
614
714
  var IS_MAP = TYPE == 1;
615
715
  var IS_FILTER = TYPE == 2;
616
716
  var IS_SOME = TYPE == 3;
617
717
  var IS_EVERY = TYPE == 4;
618
718
  var IS_FIND_INDEX = TYPE == 6;
719
+ var IS_FILTER_OUT = TYPE == 7;
619
720
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
620
721
  return function ($this, callbackfn, that, specificCreate) {
621
722
  var O = toObject($this);
622
723
  var self = indexedObject(O);
623
- var boundFunction = bindContext(callbackfn, that, 3);
724
+ var boundFunction = functionBindContext(callbackfn, that, 3);
624
725
  var length = toLength(self.length);
625
726
  var index = 0;
626
727
  var create = specificCreate || arraySpeciesCreate;
627
- var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
728
+ var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
628
729
  var value, result;
629
730
  for (;length > index; index++) if (NO_HOLES || index in self) {
630
731
  value = self[index];
@@ -636,7 +737,10 @@
636
737
  case 5: return value; // find
637
738
  case 6: return index; // findIndex
638
739
  case 2: push.call(target, value); // filter
639
- } else if (IS_EVERY) return false; // every
740
+ } else switch (TYPE) {
741
+ case 4: return false; // every
742
+ case 7: push.call(target, value); // filterOut
743
+ }
640
744
  }
641
745
  }
642
746
  return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
@@ -664,42 +768,33 @@
664
768
  find: createMethod$1(5),
665
769
  // `Array.prototype.findIndex` method
666
770
  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
667
- findIndex: createMethod$1(6)
771
+ findIndex: createMethod$1(6),
772
+ // `Array.prototype.filterOut` method
773
+ // https://github.com/tc39/proposal-array-filtering
774
+ filterOut: createMethod$1(7)
668
775
  };
669
776
 
670
- var userAgent = getBuiltIn('navigator', 'userAgent') || '';
777
+ var defineProperty = Object.defineProperty;
778
+ var cache = {};
671
779
 
672
- var process = global_1.process;
673
- var versions = process && process.versions;
674
- var v8 = versions && versions.v8;
675
- var match, version;
780
+ var thrower = function (it) { throw it; };
676
781
 
677
- if (v8) {
678
- match = v8.split('.');
679
- version = match[0] + match[1];
680
- } else if (userAgent) {
681
- match = userAgent.match(/Edge\/(\d+)/);
682
- if (!match || match[1] >= 74) {
683
- match = userAgent.match(/Chrome\/(\d+)/);
684
- if (match) version = match[1];
685
- }
686
- }
782
+ var arrayMethodUsesToLength = function (METHOD_NAME, options) {
783
+ if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
784
+ if (!options) options = {};
785
+ var method = [][METHOD_NAME];
786
+ var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
787
+ var argument0 = has(options, 0) ? options[0] : thrower;
788
+ var argument1 = has(options, 1) ? options[1] : undefined;
687
789
 
688
- var v8Version = version && +version;
790
+ return cache[METHOD_NAME] = !!method && !fails(function () {
791
+ if (ACCESSORS && !descriptors) return true;
792
+ var O = { length: -1 };
689
793
 
690
- var SPECIES$1 = wellKnownSymbol('species');
794
+ if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
795
+ else O[1] = 1;
691
796
 
692
- var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
693
- // We can't use this feature detection in V8 since it causes
694
- // deoptimization and serious performance degradation
695
- // https://github.com/zloirock/core-js/issues/677
696
- return v8Version >= 51 || !fails(function () {
697
- var array = [];
698
- var constructor = array.constructor = {};
699
- constructor[SPECIES$1] = function () {
700
- return { foo: 1 };
701
- };
702
- return array[METHOD_NAME](Boolean).foo !== 1;
797
+ method.call(O, argument0, argument1);
703
798
  });
704
799
  };
705
800
 
@@ -709,9 +804,7 @@
709
804
 
710
805
  var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
711
806
  // Edge 14- issue
712
- var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
713
- [].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
714
- });
807
+ var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
715
808
 
716
809
  // `Array.prototype.filter` method
717
810
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
@@ -833,15 +926,18 @@
833
926
  var $find = arrayIteration.find;
834
927
 
835
928
 
929
+
836
930
  var FIND = 'find';
837
931
  var SKIPS_HOLES = true;
838
932
 
933
+ var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND);
934
+
839
935
  // Shouldn't skip holes
840
936
  if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
841
937
 
842
938
  // `Array.prototype.find` method
843
939
  // https://tc39.github.io/ecma262/#sec-array.prototype.find
844
- _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
940
+ _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, {
845
941
  find: function find(callbackfn /* , that = undefined */) {
846
942
  return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
847
943
  }
@@ -850,32 +946,48 @@
850
946
  // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
851
947
  addToUnscopables(FIND);
852
948
 
853
- var sloppyArrayMethod = function (METHOD_NAME, argument) {
949
+ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
854
950
  var method = [][METHOD_NAME];
855
- return !method || !fails(function () {
951
+ return !!method && fails(function () {
856
952
  // eslint-disable-next-line no-useless-call,no-throw-literal
857
953
  method.call(null, argument || function () { throw 1; }, 1);
858
954
  });
859
955
  };
860
956
 
957
+ var $forEach = arrayIteration.forEach;
958
+
959
+
960
+
961
+ var STRICT_METHOD = arrayMethodIsStrict('forEach');
962
+ var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach');
963
+
964
+ // `Array.prototype.forEach` method implementation
965
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
966
+ var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) {
967
+ return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
968
+ } : [].forEach;
969
+
970
+ // `Array.prototype.forEach` method
971
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
972
+ _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
973
+ forEach: arrayForEach
974
+ });
975
+
861
976
  var nativeJoin = [].join;
862
977
 
863
978
  var ES3_STRINGS = indexedObject != Object;
864
- var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
979
+ var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
865
980
 
866
981
  // `Array.prototype.join` method
867
982
  // https://tc39.github.io/ecma262/#sec-array.prototype.join
868
- _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
983
+ _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
869
984
  join: function join(separator) {
870
985
  return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
871
986
  }
872
987
  });
873
988
 
874
- var createProperty = function (object, key, value) {
875
- var propertyKey = toPrimitive(key);
876
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
877
- else object[propertyKey] = value;
878
- };
989
+ var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
990
+ var USES_TO_LENGTH$3 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
879
991
 
880
992
  var SPECIES$2 = wellKnownSymbol('species');
881
993
  var nativeSlice = [].slice;
@@ -884,7 +996,7 @@
884
996
  // `Array.prototype.slice` method
885
997
  // https://tc39.github.io/ecma262/#sec-array.prototype.slice
886
998
  // fallback for not array-like ES3 strings and DOM objects
887
- _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
999
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, {
888
1000
  slice: function slice(start, end) {
889
1001
  var O = toIndexedObject(this);
890
1002
  var length = toLength(O.length);
@@ -924,13 +1036,13 @@
924
1036
  test.sort(null);
925
1037
  });
926
1038
  // Old WebKit
927
- var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
1039
+ var STRICT_METHOD$2 = arrayMethodIsStrict('sort');
928
1040
 
929
- var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
1041
+ var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$2;
930
1042
 
931
1043
  // `Array.prototype.sort` method
932
1044
  // https://tc39.github.io/ecma262/#sec-array.prototype.sort
933
- _export({ target: 'Array', proto: true, forced: FORCED }, {
1045
+ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
934
1046
  sort: function sort(comparefn) {
935
1047
  return comparefn === undefined
936
1048
  ? nativeSort.call(toObject(this))
@@ -938,7 +1050,7 @@
938
1050
  }
939
1051
  });
940
1052
 
941
- var defineProperty = objectDefineProperty.f;
1053
+ var defineProperty$1 = objectDefineProperty.f;
942
1054
 
943
1055
  var FunctionPrototype = Function.prototype;
944
1056
  var FunctionPrototypeToString = FunctionPrototype.toString;
@@ -948,7 +1060,7 @@
948
1060
  // Function instances `.name` property
949
1061
  // https://tc39.github.io/ecma262/#sec-function-instances-name
950
1062
  if (descriptors && !(NAME in FunctionPrototype)) {
951
- defineProperty(FunctionPrototype, NAME, {
1063
+ defineProperty$1(FunctionPrototype, NAME, {
952
1064
  configurable: true,
953
1065
  get: function () {
954
1066
  try {
@@ -961,16 +1073,16 @@
961
1073
  }
962
1074
 
963
1075
  var nativeAssign = Object.assign;
964
- var defineProperty$1 = Object.defineProperty;
1076
+ var defineProperty$2 = Object.defineProperty;
965
1077
 
966
1078
  // `Object.assign` method
967
1079
  // https://tc39.github.io/ecma262/#sec-object.assign
968
1080
  var objectAssign = !nativeAssign || fails(function () {
969
1081
  // should have correct order of operations (Edge bug)
970
- if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
1082
+ if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$2({}, 'a', {
971
1083
  enumerable: true,
972
1084
  get: function () {
973
- defineProperty$1(this, 'b', {
1085
+ defineProperty$2(this, 'b', {
974
1086
  value: 3,
975
1087
  enumerable: false
976
1088
  });
@@ -1010,405 +1122,6 @@
1010
1122
  assign: objectAssign
1011
1123
  });
1012
1124
 
1013
- // `RegExp.prototype.flags` getter implementation
1014
- // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
1015
- var regexpFlags = function () {
1016
- var that = anObject(this);
1017
- var result = '';
1018
- if (that.global) result += 'g';
1019
- if (that.ignoreCase) result += 'i';
1020
- if (that.multiline) result += 'm';
1021
- if (that.dotAll) result += 's';
1022
- if (that.unicode) result += 'u';
1023
- if (that.sticky) result += 'y';
1024
- return result;
1025
- };
1026
-
1027
- // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
1028
- // so we use an intermediate function.
1029
- function RE(s, f) {
1030
- return RegExp(s, f);
1031
- }
1032
-
1033
- var UNSUPPORTED_Y = fails(function () {
1034
- // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1035
- var re = RE('a', 'y');
1036
- re.lastIndex = 2;
1037
- return re.exec('abcd') != null;
1038
- });
1039
-
1040
- var BROKEN_CARET = fails(function () {
1041
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1042
- var re = RE('^r', 'gy');
1043
- re.lastIndex = 2;
1044
- return re.exec('str') != null;
1045
- });
1046
-
1047
- var regexpStickyHelpers = {
1048
- UNSUPPORTED_Y: UNSUPPORTED_Y,
1049
- BROKEN_CARET: BROKEN_CARET
1050
- };
1051
-
1052
- var nativeExec = RegExp.prototype.exec;
1053
- // This always refers to the native implementation, because the
1054
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1055
- // which loads this file before patching the method.
1056
- var nativeReplace = String.prototype.replace;
1057
-
1058
- var patchedExec = nativeExec;
1059
-
1060
- var UPDATES_LAST_INDEX_WRONG = (function () {
1061
- var re1 = /a/;
1062
- var re2 = /b*/g;
1063
- nativeExec.call(re1, 'a');
1064
- nativeExec.call(re2, 'a');
1065
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1066
- })();
1067
-
1068
- var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1069
-
1070
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
1071
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1072
-
1073
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
1074
-
1075
- if (PATCH) {
1076
- patchedExec = function exec(str) {
1077
- var re = this;
1078
- var lastIndex, reCopy, match, i;
1079
- var sticky = UNSUPPORTED_Y$1 && re.sticky;
1080
- var flags = regexpFlags.call(re);
1081
- var source = re.source;
1082
- var charsAdded = 0;
1083
- var strCopy = str;
1084
-
1085
- if (sticky) {
1086
- flags = flags.replace('y', '');
1087
- if (flags.indexOf('g') === -1) {
1088
- flags += 'g';
1089
- }
1090
-
1091
- strCopy = String(str).slice(re.lastIndex);
1092
- // Support anchored sticky behavior.
1093
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
1094
- source = '(?: ' + source + ')';
1095
- strCopy = ' ' + strCopy;
1096
- charsAdded++;
1097
- }
1098
- // ^(? + rx + ) is needed, in combination with some str slicing, to
1099
- // simulate the 'y' flag.
1100
- reCopy = new RegExp('^(?:' + source + ')', flags);
1101
- }
1102
-
1103
- if (NPCG_INCLUDED) {
1104
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1105
- }
1106
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1107
-
1108
- match = nativeExec.call(sticky ? reCopy : re, strCopy);
1109
-
1110
- if (sticky) {
1111
- if (match) {
1112
- match.input = match.input.slice(charsAdded);
1113
- match[0] = match[0].slice(charsAdded);
1114
- match.index = re.lastIndex;
1115
- re.lastIndex += match[0].length;
1116
- } else re.lastIndex = 0;
1117
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
1118
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1119
- }
1120
- if (NPCG_INCLUDED && match && match.length > 1) {
1121
- // Fix browsers whose `exec` methods don't consistently return `undefined`
1122
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1123
- nativeReplace.call(match[0], reCopy, function () {
1124
- for (i = 1; i < arguments.length - 2; i++) {
1125
- if (arguments[i] === undefined) match[i] = undefined;
1126
- }
1127
- });
1128
- }
1129
-
1130
- return match;
1131
- };
1132
- }
1133
-
1134
- var regexpExec = patchedExec;
1135
-
1136
- _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
1137
- exec: regexpExec
1138
- });
1139
-
1140
- var SPECIES$3 = wellKnownSymbol('species');
1141
-
1142
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1143
- // #replace needs built-in support for named groups.
1144
- // #match works fine because it just return the exec results, even if it has
1145
- // a "grops" property.
1146
- var re = /./;
1147
- re.exec = function () {
1148
- var result = [];
1149
- result.groups = { a: '7' };
1150
- return result;
1151
- };
1152
- return ''.replace(re, '$<a>') !== '7';
1153
- });
1154
-
1155
- // IE <= 11 replaces $0 with the whole match, as if it was $&
1156
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1157
- var REPLACE_KEEPS_$0 = (function () {
1158
- return 'a'.replace(/./, '$0') === '$0';
1159
- })();
1160
-
1161
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1162
- // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1163
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
1164
- var re = /(?:)/;
1165
- var originalExec = re.exec;
1166
- re.exec = function () { return originalExec.apply(this, arguments); };
1167
- var result = 'ab'.split(re);
1168
- return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
1169
- });
1170
-
1171
- var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
1172
- var SYMBOL = wellKnownSymbol(KEY);
1173
-
1174
- var DELEGATES_TO_SYMBOL = !fails(function () {
1175
- // String methods call symbol-named RegEp methods
1176
- var O = {};
1177
- O[SYMBOL] = function () { return 7; };
1178
- return ''[KEY](O) != 7;
1179
- });
1180
-
1181
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1182
- // Symbol-named RegExp methods call .exec
1183
- var execCalled = false;
1184
- var re = /a/;
1185
-
1186
- if (KEY === 'split') {
1187
- // We can't use real regex here since it causes deoptimization
1188
- // and serious performance degradation in V8
1189
- // https://github.com/zloirock/core-js/issues/306
1190
- re = {};
1191
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
1192
- // a new one. We need to return the patched regex when creating the new one.
1193
- re.constructor = {};
1194
- re.constructor[SPECIES$3] = function () { return re; };
1195
- re.flags = '';
1196
- re[SYMBOL] = /./[SYMBOL];
1197
- }
1198
-
1199
- re.exec = function () { execCalled = true; return null; };
1200
-
1201
- re[SYMBOL]('');
1202
- return !execCalled;
1203
- });
1204
-
1205
- if (
1206
- !DELEGATES_TO_SYMBOL ||
1207
- !DELEGATES_TO_EXEC ||
1208
- (KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
1209
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1210
- ) {
1211
- var nativeRegExpMethod = /./[SYMBOL];
1212
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1213
- if (regexp.exec === regexpExec) {
1214
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1215
- // The native String method already delegates to @@method (this
1216
- // polyfilled function), leasing to infinite recursion.
1217
- // We avoid it by directly calling the native @@method method.
1218
- return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
1219
- }
1220
- return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1221
- }
1222
- return { done: false };
1223
- }, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
1224
- var stringMethod = methods[0];
1225
- var regexMethod = methods[1];
1226
-
1227
- redefine(String.prototype, KEY, stringMethod);
1228
- redefine(RegExp.prototype, SYMBOL, length == 2
1229
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
1230
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
1231
- ? function (string, arg) { return regexMethod.call(string, this, arg); }
1232
- // 21.2.5.6 RegExp.prototype[@@match](string)
1233
- // 21.2.5.9 RegExp.prototype[@@search](string)
1234
- : function (string) { return regexMethod.call(string, this); }
1235
- );
1236
- }
1237
-
1238
- if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
1239
- };
1240
-
1241
- // `String.prototype.{ codePointAt, at }` methods implementation
1242
- var createMethod$2 = function (CONVERT_TO_STRING) {
1243
- return function ($this, pos) {
1244
- var S = String(requireObjectCoercible($this));
1245
- var position = toInteger(pos);
1246
- var size = S.length;
1247
- var first, second;
1248
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1249
- first = S.charCodeAt(position);
1250
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
1251
- || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1252
- ? CONVERT_TO_STRING ? S.charAt(position) : first
1253
- : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1254
- };
1255
- };
1256
-
1257
- var stringMultibyte = {
1258
- // `String.prototype.codePointAt` method
1259
- // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1260
- codeAt: createMethod$2(false),
1261
- // `String.prototype.at` method
1262
- // https://github.com/mathiasbynens/String.prototype.at
1263
- charAt: createMethod$2(true)
1264
- };
1265
-
1266
- var charAt = stringMultibyte.charAt;
1267
-
1268
- // `AdvanceStringIndex` abstract operation
1269
- // https://tc39.github.io/ecma262/#sec-advancestringindex
1270
- var advanceStringIndex = function (S, index, unicode) {
1271
- return index + (unicode ? charAt(S, index).length : 1);
1272
- };
1273
-
1274
- // `RegExpExec` abstract operation
1275
- // https://tc39.github.io/ecma262/#sec-regexpexec
1276
- var regexpExecAbstract = function (R, S) {
1277
- var exec = R.exec;
1278
- if (typeof exec === 'function') {
1279
- var result = exec.call(R, S);
1280
- if (typeof result !== 'object') {
1281
- throw TypeError('RegExp exec method returned something other than an Object or null');
1282
- }
1283
- return result;
1284
- }
1285
-
1286
- if (classofRaw(R) !== 'RegExp') {
1287
- throw TypeError('RegExp#exec called on incompatible receiver');
1288
- }
1289
-
1290
- return regexpExec.call(R, S);
1291
- };
1292
-
1293
- var max$2 = Math.max;
1294
- var min$2 = Math.min;
1295
- var floor$1 = Math.floor;
1296
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
1297
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
1298
-
1299
- var maybeToString = function (it) {
1300
- return it === undefined ? it : String(it);
1301
- };
1302
-
1303
- // @@replace logic
1304
- fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
1305
- return [
1306
- // `String.prototype.replace` method
1307
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
1308
- function replace(searchValue, replaceValue) {
1309
- var O = requireObjectCoercible(this);
1310
- var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
1311
- return replacer !== undefined
1312
- ? replacer.call(searchValue, O, replaceValue)
1313
- : nativeReplace.call(String(O), searchValue, replaceValue);
1314
- },
1315
- // `RegExp.prototype[@@replace]` method
1316
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
1317
- function (regexp, replaceValue) {
1318
- if (reason.REPLACE_KEEPS_$0 || (typeof replaceValue === 'string' && replaceValue.indexOf('$0') === -1)) {
1319
- var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
1320
- if (res.done) return res.value;
1321
- }
1322
-
1323
- var rx = anObject(regexp);
1324
- var S = String(this);
1325
-
1326
- var functionalReplace = typeof replaceValue === 'function';
1327
- if (!functionalReplace) replaceValue = String(replaceValue);
1328
-
1329
- var global = rx.global;
1330
- if (global) {
1331
- var fullUnicode = rx.unicode;
1332
- rx.lastIndex = 0;
1333
- }
1334
- var results = [];
1335
- while (true) {
1336
- var result = regexpExecAbstract(rx, S);
1337
- if (result === null) break;
1338
-
1339
- results.push(result);
1340
- if (!global) break;
1341
-
1342
- var matchStr = String(result[0]);
1343
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1344
- }
1345
-
1346
- var accumulatedResult = '';
1347
- var nextSourcePosition = 0;
1348
- for (var i = 0; i < results.length; i++) {
1349
- result = results[i];
1350
-
1351
- var matched = String(result[0]);
1352
- var position = max$2(min$2(toInteger(result.index), S.length), 0);
1353
- var captures = [];
1354
- // NOTE: This is equivalent to
1355
- // captures = result.slice(1).map(maybeToString)
1356
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1357
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1358
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1359
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
1360
- var namedCaptures = result.groups;
1361
- if (functionalReplace) {
1362
- var replacerArgs = [matched].concat(captures, position, S);
1363
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
1364
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
1365
- } else {
1366
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1367
- }
1368
- if (position >= nextSourcePosition) {
1369
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
1370
- nextSourcePosition = position + matched.length;
1371
- }
1372
- }
1373
- return accumulatedResult + S.slice(nextSourcePosition);
1374
- }
1375
- ];
1376
-
1377
- // https://tc39.github.io/ecma262/#sec-getsubstitution
1378
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
1379
- var tailPos = position + matched.length;
1380
- var m = captures.length;
1381
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1382
- if (namedCaptures !== undefined) {
1383
- namedCaptures = toObject(namedCaptures);
1384
- symbols = SUBSTITUTION_SYMBOLS;
1385
- }
1386
- return nativeReplace.call(replacement, symbols, function (match, ch) {
1387
- var capture;
1388
- switch (ch.charAt(0)) {
1389
- case '$': return '$';
1390
- case '&': return matched;
1391
- case '`': return str.slice(0, position);
1392
- case "'": return str.slice(tailPos);
1393
- case '<':
1394
- capture = namedCaptures[ch.slice(1, -1)];
1395
- break;
1396
- default: // \d\d?
1397
- var n = +ch;
1398
- if (n === 0) return match;
1399
- if (n > m) {
1400
- var f = floor$1(n / 10);
1401
- if (f === 0) return match;
1402
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
1403
- return match;
1404
- }
1405
- capture = captures[n - 1];
1406
- }
1407
- return capture === undefined ? '' : capture;
1408
- });
1409
- }
1410
- });
1411
-
1412
1125
  // iterable DOM collections
1413
1126
  // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1414
1127
  var domIterables = {
@@ -1445,15 +1158,6 @@
1445
1158
  TouchList: 0
1446
1159
  };
1447
1160
 
1448
- var $forEach = arrayIteration.forEach;
1449
-
1450
-
1451
- // `Array.prototype.forEach` method implementation
1452
- // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
1453
- var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
1454
- return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1455
- } : [].forEach;
1456
-
1457
1161
  for (var COLLECTION_NAME in domIterables) {
1458
1162
  var Collection = global_1[COLLECTION_NAME];
1459
1163
  var CollectionPrototype = Collection && Collection.prototype;
@@ -1466,6 +1170,8 @@
1466
1170
  }
1467
1171
 
1468
1172
  function _typeof(obj) {
1173
+ "@babel/helpers - typeof";
1174
+
1469
1175
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1470
1176
  _typeof = function (obj) {
1471
1177
  return typeof obj;
@@ -1532,6 +1238,19 @@
1532
1238
  return _setPrototypeOf(o, p);
1533
1239
  }
1534
1240
 
1241
+ function _isNativeReflectConstruct() {
1242
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1243
+ if (Reflect.construct.sham) return false;
1244
+ if (typeof Proxy === "function") return true;
1245
+
1246
+ try {
1247
+ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
1248
+ return true;
1249
+ } catch (e) {
1250
+ return false;
1251
+ }
1252
+ }
1253
+
1535
1254
  function _assertThisInitialized(self) {
1536
1255
  if (self === void 0) {
1537
1256
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -1548,6 +1267,25 @@
1548
1267
  return _assertThisInitialized(self);
1549
1268
  }
1550
1269
 
1270
+ function _createSuper(Derived) {
1271
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
1272
+
1273
+ return function _createSuperInternal() {
1274
+ var Super = _getPrototypeOf(Derived),
1275
+ result;
1276
+
1277
+ if (hasNativeReflectConstruct) {
1278
+ var NewTarget = _getPrototypeOf(this).constructor;
1279
+
1280
+ result = Reflect.construct(Super, arguments, NewTarget);
1281
+ } else {
1282
+ result = Super.apply(this, arguments);
1283
+ }
1284
+
1285
+ return _possibleConstructorReturn(this, result);
1286
+ };
1287
+ }
1288
+
1551
1289
  function _superPropBase(object, property) {
1552
1290
  while (!Object.prototype.hasOwnProperty.call(object, property)) {
1553
1291
  object = _getPrototypeOf(object);
@@ -1583,24 +1321,7 @@
1583
1321
  * @version: v1.1.0
1584
1322
  */
1585
1323
 
1586
- var initBodyCaller; // it only does '%s', and return '' when arguments are undefined
1587
-
1588
- var sprintf = function sprintf(str) {
1589
- var args = arguments;
1590
- var flag = true;
1591
- var i = 1;
1592
- str = str.replace(/%s/g, function () {
1593
- var arg = args[i++];
1594
-
1595
- if (typeof arg === 'undefined') {
1596
- flag = false;
1597
- return '';
1598
- }
1599
-
1600
- return arg;
1601
- });
1602
- return flag ? str : '';
1603
- };
1324
+ var initBodyCaller;
1604
1325
 
1605
1326
  var groupBy = function groupBy(array, f) {
1606
1327
  var tmpGroups = {};
@@ -1612,13 +1333,26 @@
1612
1333
  return tmpGroups;
1613
1334
  };
1614
1335
 
1615
- $.extend($.fn.bootstrapTable.defaults, {
1336
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
1337
+ collapseGroup: {
1338
+ bootstrap3: 'glyphicon-chevron-up',
1339
+ materialize: 'arrow_drop_down'
1340
+ }[$__default['default'].fn.bootstrapTable.theme] || 'fa-angle-up',
1341
+ expandGroup: {
1342
+ bootstrap3: 'glyphicon-chevron-down',
1343
+ materialize: 'arrow_drop_up'
1344
+ }[$__default['default'].fn.bootstrapTable.theme] || 'fa-angle-down'
1345
+ });
1346
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
1616
1347
  groupBy: false,
1617
1348
  groupByField: '',
1618
- groupByFormatter: undefined
1349
+ groupByFormatter: undefined,
1350
+ groupByToggle: false,
1351
+ groupByShowToggleIcon: false,
1352
+ groupByCollapsedGroups: []
1619
1353
  });
1620
- var Utils = $.fn.bootstrapTable.utils;
1621
- var BootstrapTable = $.fn.bootstrapTable.Constructor;
1354
+ var Utils = $__default['default'].fn.bootstrapTable.utils;
1355
+ var BootstrapTable = $__default['default'].fn.bootstrapTable.Constructor;
1622
1356
  var _initSort = BootstrapTable.prototype.initSort;
1623
1357
  var _initBody = BootstrapTable.prototype.initBody;
1624
1358
  var _updateSelected = BootstrapTable.prototype.updateSelected;
@@ -1640,12 +1374,12 @@
1640
1374
  if (this.options.customSort) {
1641
1375
  Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
1642
1376
  } else {
1643
- this.data.sort(function (a, b) {
1377
+ this.options.data.sort(function (a, b) {
1644
1378
  var groupByFields = _this.getGroupByFields();
1645
1379
 
1646
1380
  var fieldValuesA = [];
1647
1381
  var fieldValuesB = [];
1648
- $.each(groupByFields, function (i, field) {
1382
+ $__default['default'].each(groupByFields, function (i, field) {
1649
1383
  fieldValuesA.push(a[field]);
1650
1384
  fieldValuesB.push(b[field]);
1651
1385
  });
@@ -1662,13 +1396,13 @@
1662
1396
  var groupByFields = _this.getGroupByFields();
1663
1397
 
1664
1398
  var groupValues = [];
1665
- $.each(groupByFields, function (i, field) {
1399
+ $__default['default'].each(groupByFields, function (i, field) {
1666
1400
  groupValues.push(item[field]);
1667
1401
  });
1668
1402
  return groupValues.join(', ');
1669
1403
  });
1670
1404
  var index = 0;
1671
- $.each(groups, function (key, value) {
1405
+ $__default['default'].each(groups, function (key, value) {
1672
1406
  _this.tableGroups.push({
1673
1407
  id: index,
1674
1408
  name: key,
@@ -1680,6 +1414,10 @@
1680
1414
  item._data = {};
1681
1415
  }
1682
1416
 
1417
+ if (_this.isCollapsed(key, value)) {
1418
+ item._class = 'hidden';
1419
+ }
1420
+
1683
1421
  item._data['parent-index'] = index;
1684
1422
  });
1685
1423
  index++;
@@ -1688,6 +1426,8 @@
1688
1426
  };
1689
1427
 
1690
1428
  BootstrapTable.prototype.initBody = function () {
1429
+ var _this2 = this;
1430
+
1691
1431
  initBodyCaller = true;
1692
1432
 
1693
1433
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
@@ -1703,10 +1443,8 @@
1703
1443
  this.columns.forEach(function (column) {
1704
1444
  if (column.checkbox) {
1705
1445
  checkBox = true;
1706
- } else {
1707
- if (column.visible) {
1708
- visibleColumns += 1;
1709
- }
1446
+ } else if (column.visible) {
1447
+ visibleColumns += 1;
1710
1448
  }
1711
1449
  });
1712
1450
 
@@ -1716,7 +1454,7 @@
1716
1454
 
1717
1455
  this.tableGroups.forEach(function (item) {
1718
1456
  var html = [];
1719
- html.push(sprintf('<tr class="info groupBy expanded" data-group-index="%s">', item.id));
1457
+ html.push(Utils.sprintf('<tr class="info groupBy %s" data-group-index="%s">', _this2.options.groupByToggle ? 'expanded' : '', item.id));
1720
1458
 
1721
1459
  if (that.options.detailView && !that.options.cardView) {
1722
1460
  html.push('<td class="detail"></td>');
@@ -1728,33 +1466,54 @@
1728
1466
 
1729
1467
  var formattedValue = item.name;
1730
1468
 
1731
- if (typeof that.options.groupByFormatter === 'function') {
1732
- formattedValue = that.options.groupByFormatter(item.name, item.id, item.data);
1469
+ if (that.options.groupByFormatter !== undefined) {
1470
+ formattedValue = Utils.calculateObjectValue(that.options, that.options.groupByFormatter, [item.name, item.id, item.data]);
1733
1471
  }
1734
1472
 
1735
- html.push('<td', sprintf(' colspan="%s"', visibleColumns), '>', formattedValue, '</td>');
1736
- html.push('</tr>');
1737
- that.$body.find("tr[data-parent-index=".concat(item.id, "]:first")).before($(html.join('')));
1473
+ html.push('<td', Utils.sprintf(' colspan="%s"', visibleColumns), '>', formattedValue);
1474
+ var icon = _this2.options.icons.collapseGroup;
1475
+
1476
+ if (_this2.isCollapsed(item.name, item.data)) {
1477
+ icon = _this2.options.icons.expandGroup;
1478
+ }
1479
+
1480
+ if (_this2.options.groupByToggle && _this2.options.groupByShowToggleIcon) {
1481
+ html.push("<span class=\"float-right ".concat(_this2.options.iconsPrefix, " ").concat(icon, "\"></span>"));
1482
+ }
1483
+
1484
+ html.push('</td></tr>');
1485
+ that.$body.find("tr[data-parent-index=".concat(item.id, "]:first")).before($__default['default'](html.join('')));
1738
1486
  });
1739
1487
  this.$selectGroup = [];
1740
1488
  this.$body.find('[name="btSelectGroup"]').each(function () {
1741
- var self = $(this);
1489
+ var self = $__default['default'](this);
1742
1490
  that.$selectGroup.push({
1743
1491
  group: self,
1744
1492
  item: that.$selectItem.filter(function () {
1745
- return $(this).closest('tr').data('parent-index') === self.closest('tr').data('group-index');
1493
+ return $__default['default'](this).closest('tr').data('parent-index') === self.closest('tr').data('group-index');
1746
1494
  })
1747
1495
  });
1748
1496
  });
1749
- this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
1750
- $(this).toggleClass('expanded');
1751
- that.$body.find("tr[data-parent-index=".concat($(this).closest('tr').data('group-index'), "]")).toggleClass('hidden');
1752
- });
1497
+
1498
+ if (this.options.groupByToggle) {
1499
+ this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
1500
+ var $this = $__default['default'](this);
1501
+ var groupIndex = $this.closest('tr').data('group-index');
1502
+ var $groupRows = that.$body.find("tr[data-parent-index=".concat(groupIndex, "]"));
1503
+ $this.toggleClass('expanded collapsed');
1504
+ $this.find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
1505
+ $groupRows.toggleClass('hidden');
1506
+ $groupRows.each(function (i, element) {
1507
+ return that.collapseRow($__default['default'](element).data('index'));
1508
+ });
1509
+ });
1510
+ }
1511
+
1753
1512
  this.$container.off('click', '[name="btSelectGroup"]').on('click', '[name="btSelectGroup"]', function (event) {
1754
1513
  event.stopImmediatePropagation();
1755
- var self = $(this);
1514
+ var self = $__default['default'](this);
1756
1515
  var checked = self.prop('checked');
1757
- that[checked ? 'checkGroup' : 'uncheckGroup']($(this).closest('tr').data('group-index'));
1516
+ that[checked ? 'checkGroup' : 'uncheckGroup']($__default['default'](this).closest('tr').data('group-index'));
1758
1517
  });
1759
1518
  }
1760
1519
 
@@ -1787,11 +1546,23 @@
1787
1546
  this.checkGroup_(index, false);
1788
1547
  };
1789
1548
 
1549
+ BootstrapTable.prototype.isCollapsed = function (groupKey, items) {
1550
+ if (this.options.groupByCollapsedGroups) {
1551
+ var collapsedGroups = Utils.calculateObjectValue(this, this.options.groupByCollapsedGroups, [groupKey, items], true);
1552
+
1553
+ if ($__default['default'].inArray(groupKey, collapsedGroups) > -1) {
1554
+ return true;
1555
+ }
1556
+ }
1557
+
1558
+ return false;
1559
+ };
1560
+
1790
1561
  BootstrapTable.prototype.checkGroup_ = function (index, checked) {
1791
1562
  var rowsBefore = this.getSelections();
1792
1563
 
1793
1564
  var filter = function filter() {
1794
- return $(this).closest('tr').data('parent-index') === index;
1565
+ return $__default['default'](this).closest('tr').data('parent-index') === index;
1795
1566
  };
1796
1567
 
1797
1568
  this.$selectItem.filter(filter).prop('checked', checked);
@@ -1810,22 +1581,22 @@
1810
1581
  BootstrapTable.prototype.getGroupByFields = function () {
1811
1582
  var groupByFields = this.options.groupByField;
1812
1583
 
1813
- if (!$.isArray(this.options.groupByField)) {
1584
+ if (!$__default['default'].isArray(this.options.groupByField)) {
1814
1585
  groupByFields = [this.options.groupByField];
1815
1586
  }
1816
1587
 
1817
1588
  return groupByFields;
1818
1589
  };
1819
1590
 
1820
- $.BootstrapTable =
1821
- /*#__PURE__*/
1822
- function (_$$BootstrapTable) {
1591
+ $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
1823
1592
  _inherits(_class, _$$BootstrapTable);
1824
1593
 
1594
+ var _super = _createSuper(_class);
1595
+
1825
1596
  function _class() {
1826
1597
  _classCallCheck(this, _class);
1827
1598
 
1828
- return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
1599
+ return _super.apply(this, arguments);
1829
1600
  }
1830
1601
 
1831
1602
  _createClass(_class, [{
@@ -1843,12 +1614,12 @@
1843
1614
 
1844
1615
  if (options.unit === 'rows') {
1845
1616
  var scrollTo = 0;
1846
- this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) {
1847
- scrollTo += $(el).outerHeight(true);
1617
+ this.$body.find("> tr:not(.groupBy):lt(".concat(options.value, ")")).each(function (i, el) {
1618
+ scrollTo += $__default['default'](el).outerHeight(true);
1848
1619
  });
1849
1620
  var $targetColumn = this.$body.find("> tr:not(.groupBy):eq(".concat(options.value, ")"));
1850
1621
  $targetColumn.prevAll('.groupBy').each(function (i, el) {
1851
- scrollTo += $(el).outerHeight(true);
1622
+ scrollTo += $__default['default'](el).outerHeight(true);
1852
1623
  });
1853
1624
  this.$tableBody.scrollTop(scrollTo);
1854
1625
  return;
@@ -1860,6 +1631,6 @@
1860
1631
  }]);
1861
1632
 
1862
1633
  return _class;
1863
- }($.BootstrapTable);
1634
+ }($__default['default'].BootstrapTable);
1864
1635
 
1865
1636
  })));