bootstrap-table-rails 1.11.1.1 → 1.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +152 -98
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +5196 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +1809 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +1817 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +296 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +6924 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +1757 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1485 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.css +3 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +1020 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +12 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +2087 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1934 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +1042 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +779 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1451 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +2494 -0
- data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/filter-control}/bootstrap-table-filter-control.css +3 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +2502 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +27 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +1378 -0
- data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/group-by}/bootstrap-table-group-by.css +0 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +257 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +7 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +1478 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +125 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +1243 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +1162 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +105 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +85 -0
- data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/multiple-selection-row}/bootstrap-table-multiple-selection-row.css +0 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +143 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +1905 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +1265 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.css +11 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +971 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +1128 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +1960 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +1015 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css +14 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +774 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +676 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +341 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +22 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +1019 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +2297 -0
- data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/tree-column}/bootstrap-table-tree-column.css +0 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +142 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +1817 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +723 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +723 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +723 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +723 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +722 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +721 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +352 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +943 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +329 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +950 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +326 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +946 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +336 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +920 -0
- metadata +112 -96
- data/vendor/assets/images/icon.png +0 -0
- data/vendor/assets/javascripts/bootstrap-table-locale-all.js +0 -1698
- data/vendor/assets/javascripts/bootstrap-table.js +0 -3094
- data/vendor/assets/javascripts/extensions/bootstrap-table-accent-neutralise.js +0 -182
- data/vendor/assets/javascripts/extensions/bootstrap-table-angular.js +0 -107
- data/vendor/assets/javascripts/extensions/bootstrap-table-auto-refresh.js +0 -84
- data/vendor/assets/javascripts/extensions/bootstrap-table-click-edit-row.js +0 -142
- data/vendor/assets/javascripts/extensions/bootstrap-table-cookie.js +0 -434
- data/vendor/assets/javascripts/extensions/bootstrap-table-copy-rows.js +0 -102
- data/vendor/assets/javascripts/extensions/bootstrap-table-editable.js +0 -146
- data/vendor/assets/javascripts/extensions/bootstrap-table-export.js +0 -131
- data/vendor/assets/javascripts/extensions/bootstrap-table-filter-control.js +0 -697
- data/vendor/assets/javascripts/extensions/bootstrap-table-filter.js +0 -67
- data/vendor/assets/javascripts/extensions/bootstrap-table-flat-json.js +0 -62
- data/vendor/assets/javascripts/extensions/bootstrap-table-group-by-v2.js +0 -226
- data/vendor/assets/javascripts/extensions/bootstrap-table-group-by.js +0 -243
- data/vendor/assets/javascripts/extensions/bootstrap-table-i18n-enhance.js +0 -34
- data/vendor/assets/javascripts/extensions/bootstrap-table-key-events.js +0 -80
- data/vendor/assets/javascripts/extensions/bootstrap-table-mobile.js +0 -136
- data/vendor/assets/javascripts/extensions/bootstrap-table-multi-toggle.js +0 -88
- data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-search.js +0 -71
- data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-selection-row.js +0 -127
- data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-sort.js +0 -393
- data/vendor/assets/javascripts/extensions/bootstrap-table-natural-sorting.js +0 -67
- data/vendor/assets/javascripts/extensions/bootstrap-table-print.js +0 -133
- data/vendor/assets/javascripts/extensions/bootstrap-table-reorder-columns.js +0 -181
- data/vendor/assets/javascripts/extensions/bootstrap-table-reorder-rows.js +0 -118
- data/vendor/assets/javascripts/extensions/bootstrap-table-resizable.js +0 -74
- data/vendor/assets/javascripts/extensions/bootstrap-table-select2-filter.js +0 -303
- data/vendor/assets/javascripts/extensions/bootstrap-table-sticky-header.js +0 -111
- data/vendor/assets/javascripts/extensions/bootstrap-table-toolbar.js +0 -211
- data/vendor/assets/javascripts/extensions/bootstrap-table-tree-column.js +0 -130
- data/vendor/assets/javascripts/locale/README.md +0 -179
- data/vendor/assets/javascripts/locale/bootstrap-table-af-ZA.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-ar-SA.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-ca-ES.js +0 -44
- data/vendor/assets/javascripts/locale/bootstrap-table-cs-CZ.js +0 -44
- data/vendor/assets/javascripts/locale/bootstrap-table-da-DK.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-de-DE.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-el-GR.js +0 -28
- data/vendor/assets/javascripts/locale/bootstrap-table-en-US.js +0 -49
- data/vendor/assets/javascripts/locale/bootstrap-table-en-US.js.template +0 -49
- data/vendor/assets/javascripts/locale/bootstrap-table-es-AR.js +0 -31
- data/vendor/assets/javascripts/locale/bootstrap-table-es-CL.js +0 -44
- data/vendor/assets/javascripts/locale/bootstrap-table-es-CR.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-es-ES.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-es-MX.js +0 -32
- data/vendor/assets/javascripts/locale/bootstrap-table-es-NI.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-es-SP.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-et-EE.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-fa-IR.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-fr-BE.js +0 -28
- data/vendor/assets/javascripts/locale/bootstrap-table-fr-FR.js +0 -41
- data/vendor/assets/javascripts/locale/bootstrap-table-he-IL.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-hr-HR.js +0 -44
- data/vendor/assets/javascripts/locale/bootstrap-table-hu-HU.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-id-ID.js +0 -49
- data/vendor/assets/javascripts/locale/bootstrap-table-it-IT.js +0 -52
- data/vendor/assets/javascripts/locale/bootstrap-table-ja-JP.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-ka-GE.js +0 -40
- data/vendor/assets/javascripts/locale/bootstrap-table-ko-KR.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-ms-MY.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-nb-NO.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-nl-NL.js +0 -52
- data/vendor/assets/javascripts/locale/bootstrap-table-pl-PL.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-pt-BR.js +0 -41
- data/vendor/assets/javascripts/locale/bootstrap-table-pt-PT.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-ro-RO.js +0 -43
- data/vendor/assets/javascripts/locale/bootstrap-table-ru-RU.js +0 -72
- data/vendor/assets/javascripts/locale/bootstrap-table-sk-SK.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-sv-SE.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-th-TH.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-tr-TR.js +0 -41
- data/vendor/assets/javascripts/locale/bootstrap-table-uk-UA.js +0 -73
- data/vendor/assets/javascripts/locale/bootstrap-table-ur-PK.js +0 -37
- data/vendor/assets/javascripts/locale/bootstrap-table-uz-Latn-UZ.js +0 -49
- data/vendor/assets/javascripts/locale/bootstrap-table-vi-VN.js +0 -28
- data/vendor/assets/javascripts/locale/bootstrap-table-zh-CN.js +0 -46
- data/vendor/assets/javascripts/locale/bootstrap-table-zh-TW.js +0 -40
- data/vendor/assets/stylesheets/bootstrap-table.css +0 -313
- data/vendor/assets/stylesheets/extensions/bootstrap-table-auto-refresh.css +0 -3
- data/vendor/assets/stylesheets/extensions/bootstrap-table-click-edit-row.css +0 -21
- data/vendor/assets/stylesheets/extensions/bootstrap-table-group-by-v2.css +0 -7
- data/vendor/assets/stylesheets/extensions/bootstrap-table-reorder-rows.css +0 -14
- data/vendor/assets/stylesheets/extensions/bootstrap-table-sticky-header.css +0 -22
|
@@ -0,0 +1,1757 @@
|
|
|
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 = global || self, factory(global.jQuery));
|
|
5
|
+
}(this, function ($) { 'use strict';
|
|
6
|
+
|
|
7
|
+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
|
8
|
+
|
|
9
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10
|
+
|
|
11
|
+
function createCommonjsModule(fn, module) {
|
|
12
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var O = 'object';
|
|
16
|
+
var check = function (it) {
|
|
17
|
+
return it && it.Math == Math && it;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
21
|
+
var global_1 =
|
|
22
|
+
// eslint-disable-next-line no-undef
|
|
23
|
+
check(typeof globalThis == O && globalThis) ||
|
|
24
|
+
check(typeof window == O && window) ||
|
|
25
|
+
check(typeof self == O && self) ||
|
|
26
|
+
check(typeof commonjsGlobal == O && commonjsGlobal) ||
|
|
27
|
+
// eslint-disable-next-line no-new-func
|
|
28
|
+
Function('return this')();
|
|
29
|
+
|
|
30
|
+
var fails = function (exec) {
|
|
31
|
+
try {
|
|
32
|
+
return !!exec();
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Thank's IE8 for his funny defineProperty
|
|
39
|
+
var descriptors = !fails(function () {
|
|
40
|
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
44
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
45
|
+
|
|
46
|
+
// Nashorn ~ JDK8 bug
|
|
47
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
48
|
+
|
|
49
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
50
|
+
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
|
51
|
+
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
52
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
53
|
+
return !!descriptor && descriptor.enumerable;
|
|
54
|
+
} : nativePropertyIsEnumerable;
|
|
55
|
+
|
|
56
|
+
var objectPropertyIsEnumerable = {
|
|
57
|
+
f: f
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var createPropertyDescriptor = function (bitmap, value) {
|
|
61
|
+
return {
|
|
62
|
+
enumerable: !(bitmap & 1),
|
|
63
|
+
configurable: !(bitmap & 2),
|
|
64
|
+
writable: !(bitmap & 4),
|
|
65
|
+
value: value
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var toString = {}.toString;
|
|
70
|
+
|
|
71
|
+
var classofRaw = function (it) {
|
|
72
|
+
return toString.call(it).slice(8, -1);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var split = ''.split;
|
|
76
|
+
|
|
77
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
78
|
+
var indexedObject = fails(function () {
|
|
79
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
80
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
81
|
+
return !Object('z').propertyIsEnumerable(0);
|
|
82
|
+
}) ? function (it) {
|
|
83
|
+
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
|
84
|
+
} : Object;
|
|
85
|
+
|
|
86
|
+
// `RequireObjectCoercible` abstract operation
|
|
87
|
+
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
88
|
+
var requireObjectCoercible = function (it) {
|
|
89
|
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
90
|
+
return it;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
var toIndexedObject = function (it) {
|
|
98
|
+
return indexedObject(requireObjectCoercible(it));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var isObject = function (it) {
|
|
102
|
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// `ToPrimitive` abstract operation
|
|
106
|
+
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
107
|
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
108
|
+
// and the second argument - flag - preferred type is a string
|
|
109
|
+
var toPrimitive = function (input, PREFERRED_STRING) {
|
|
110
|
+
if (!isObject(input)) return input;
|
|
111
|
+
var fn, val;
|
|
112
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
113
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
114
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
115
|
+
throw TypeError("Can't convert object to primitive value");
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
119
|
+
|
|
120
|
+
var has = function (it, key) {
|
|
121
|
+
return hasOwnProperty.call(it, key);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
var document = global_1.document;
|
|
125
|
+
// typeof document.createElement is 'object' in old IE
|
|
126
|
+
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
127
|
+
|
|
128
|
+
var documentCreateElement = function (it) {
|
|
129
|
+
return EXISTS ? document.createElement(it) : {};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Thank's IE8 for his funny defineProperty
|
|
133
|
+
var ie8DomDefine = !descriptors && !fails(function () {
|
|
134
|
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
135
|
+
get: function () { return 7; }
|
|
136
|
+
}).a != 7;
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
140
|
+
|
|
141
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
142
|
+
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
143
|
+
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
144
|
+
O = toIndexedObject(O);
|
|
145
|
+
P = toPrimitive(P, true);
|
|
146
|
+
if (ie8DomDefine) try {
|
|
147
|
+
return nativeGetOwnPropertyDescriptor(O, P);
|
|
148
|
+
} catch (error) { /* empty */ }
|
|
149
|
+
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var objectGetOwnPropertyDescriptor = {
|
|
153
|
+
f: f$1
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var anObject = function (it) {
|
|
157
|
+
if (!isObject(it)) {
|
|
158
|
+
throw TypeError(String(it) + ' is not an object');
|
|
159
|
+
} return it;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var nativeDefineProperty = Object.defineProperty;
|
|
163
|
+
|
|
164
|
+
// `Object.defineProperty` method
|
|
165
|
+
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
166
|
+
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
167
|
+
anObject(O);
|
|
168
|
+
P = toPrimitive(P, true);
|
|
169
|
+
anObject(Attributes);
|
|
170
|
+
if (ie8DomDefine) try {
|
|
171
|
+
return nativeDefineProperty(O, P, Attributes);
|
|
172
|
+
} catch (error) { /* empty */ }
|
|
173
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
174
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
175
|
+
return O;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
var objectDefineProperty = {
|
|
179
|
+
f: f$2
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var hide = descriptors ? function (object, key, value) {
|
|
183
|
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
184
|
+
} : function (object, key, value) {
|
|
185
|
+
object[key] = value;
|
|
186
|
+
return object;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
var setGlobal = function (key, value) {
|
|
190
|
+
try {
|
|
191
|
+
hide(global_1, key, value);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
global_1[key] = value;
|
|
194
|
+
} return value;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var shared = createCommonjsModule(function (module) {
|
|
198
|
+
var SHARED = '__core-js_shared__';
|
|
199
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
200
|
+
|
|
201
|
+
(module.exports = function (key, value) {
|
|
202
|
+
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
203
|
+
})('versions', []).push({
|
|
204
|
+
version: '3.1.3',
|
|
205
|
+
mode: 'global',
|
|
206
|
+
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
var functionToString = shared('native-function-to-string', Function.toString);
|
|
211
|
+
|
|
212
|
+
var WeakMap = global_1.WeakMap;
|
|
213
|
+
|
|
214
|
+
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
|
|
215
|
+
|
|
216
|
+
var id = 0;
|
|
217
|
+
var postfix = Math.random();
|
|
218
|
+
|
|
219
|
+
var uid = function (key) {
|
|
220
|
+
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var keys = shared('keys');
|
|
224
|
+
|
|
225
|
+
var sharedKey = function (key) {
|
|
226
|
+
return keys[key] || (keys[key] = uid(key));
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
var hiddenKeys = {};
|
|
230
|
+
|
|
231
|
+
var WeakMap$1 = global_1.WeakMap;
|
|
232
|
+
var set, get, has$1;
|
|
233
|
+
|
|
234
|
+
var enforce = function (it) {
|
|
235
|
+
return has$1(it) ? get(it) : set(it, {});
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
var getterFor = function (TYPE) {
|
|
239
|
+
return function (it) {
|
|
240
|
+
var state;
|
|
241
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
242
|
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
243
|
+
} return state;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
if (nativeWeakMap) {
|
|
248
|
+
var store = new WeakMap$1();
|
|
249
|
+
var wmget = store.get;
|
|
250
|
+
var wmhas = store.has;
|
|
251
|
+
var wmset = store.set;
|
|
252
|
+
set = function (it, metadata) {
|
|
253
|
+
wmset.call(store, it, metadata);
|
|
254
|
+
return metadata;
|
|
255
|
+
};
|
|
256
|
+
get = function (it) {
|
|
257
|
+
return wmget.call(store, it) || {};
|
|
258
|
+
};
|
|
259
|
+
has$1 = function (it) {
|
|
260
|
+
return wmhas.call(store, it);
|
|
261
|
+
};
|
|
262
|
+
} else {
|
|
263
|
+
var STATE = sharedKey('state');
|
|
264
|
+
hiddenKeys[STATE] = true;
|
|
265
|
+
set = function (it, metadata) {
|
|
266
|
+
hide(it, STATE, metadata);
|
|
267
|
+
return metadata;
|
|
268
|
+
};
|
|
269
|
+
get = function (it) {
|
|
270
|
+
return has(it, STATE) ? it[STATE] : {};
|
|
271
|
+
};
|
|
272
|
+
has$1 = function (it) {
|
|
273
|
+
return has(it, STATE);
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
var internalState = {
|
|
278
|
+
set: set,
|
|
279
|
+
get: get,
|
|
280
|
+
has: has$1,
|
|
281
|
+
enforce: enforce,
|
|
282
|
+
getterFor: getterFor
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
var redefine = createCommonjsModule(function (module) {
|
|
286
|
+
var getInternalState = internalState.get;
|
|
287
|
+
var enforceInternalState = internalState.enforce;
|
|
288
|
+
var TEMPLATE = String(functionToString).split('toString');
|
|
289
|
+
|
|
290
|
+
shared('inspectSource', function (it) {
|
|
291
|
+
return functionToString.call(it);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
(module.exports = function (O, key, value, options) {
|
|
295
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
296
|
+
var simple = options ? !!options.enumerable : false;
|
|
297
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
298
|
+
if (typeof value == 'function') {
|
|
299
|
+
if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
|
|
300
|
+
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
301
|
+
}
|
|
302
|
+
if (O === global_1) {
|
|
303
|
+
if (simple) O[key] = value;
|
|
304
|
+
else setGlobal(key, value);
|
|
305
|
+
return;
|
|
306
|
+
} else if (!unsafe) {
|
|
307
|
+
delete O[key];
|
|
308
|
+
} else if (!noTargetGet && O[key]) {
|
|
309
|
+
simple = true;
|
|
310
|
+
}
|
|
311
|
+
if (simple) O[key] = value;
|
|
312
|
+
else hide(O, key, value);
|
|
313
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
314
|
+
})(Function.prototype, 'toString', function toString() {
|
|
315
|
+
return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
var path = global_1;
|
|
320
|
+
|
|
321
|
+
var aFunction = function (variable) {
|
|
322
|
+
return typeof variable == 'function' ? variable : undefined;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
var getBuiltIn = function (namespace, method) {
|
|
326
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
|
327
|
+
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
var ceil = Math.ceil;
|
|
331
|
+
var floor = Math.floor;
|
|
332
|
+
|
|
333
|
+
// `ToInteger` abstract operation
|
|
334
|
+
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
335
|
+
var toInteger = function (argument) {
|
|
336
|
+
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
var min = Math.min;
|
|
340
|
+
|
|
341
|
+
// `ToLength` abstract operation
|
|
342
|
+
// https://tc39.github.io/ecma262/#sec-tolength
|
|
343
|
+
var toLength = function (argument) {
|
|
344
|
+
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
var max = Math.max;
|
|
348
|
+
var min$1 = Math.min;
|
|
349
|
+
|
|
350
|
+
// Helper for a popular repeating case of the spec:
|
|
351
|
+
// Let integer be ? ToInteger(index).
|
|
352
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
|
|
353
|
+
var toAbsoluteIndex = function (index, length) {
|
|
354
|
+
var integer = toInteger(index);
|
|
355
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
359
|
+
var createMethod = function (IS_INCLUDES) {
|
|
360
|
+
return function ($this, el, fromIndex) {
|
|
361
|
+
var O = toIndexedObject($this);
|
|
362
|
+
var length = toLength(O.length);
|
|
363
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
364
|
+
var value;
|
|
365
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
366
|
+
// eslint-disable-next-line no-self-compare
|
|
367
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
368
|
+
value = O[index++];
|
|
369
|
+
// eslint-disable-next-line no-self-compare
|
|
370
|
+
if (value != value) return true;
|
|
371
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
372
|
+
} else for (;length > index; index++) {
|
|
373
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
374
|
+
} return !IS_INCLUDES && -1;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
var arrayIncludes = {
|
|
379
|
+
// `Array.prototype.includes` method
|
|
380
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
|
381
|
+
includes: createMethod(true),
|
|
382
|
+
// `Array.prototype.indexOf` method
|
|
383
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
384
|
+
indexOf: createMethod(false)
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
var indexOf = arrayIncludes.indexOf;
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
var objectKeysInternal = function (object, names) {
|
|
391
|
+
var O = toIndexedObject(object);
|
|
392
|
+
var i = 0;
|
|
393
|
+
var result = [];
|
|
394
|
+
var key;
|
|
395
|
+
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
|
396
|
+
// Don't enum bug & hidden keys
|
|
397
|
+
while (names.length > i) if (has(O, key = names[i++])) {
|
|
398
|
+
~indexOf(result, key) || result.push(key);
|
|
399
|
+
}
|
|
400
|
+
return result;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
// IE8- don't enum bug keys
|
|
404
|
+
var enumBugKeys = [
|
|
405
|
+
'constructor',
|
|
406
|
+
'hasOwnProperty',
|
|
407
|
+
'isPrototypeOf',
|
|
408
|
+
'propertyIsEnumerable',
|
|
409
|
+
'toLocaleString',
|
|
410
|
+
'toString',
|
|
411
|
+
'valueOf'
|
|
412
|
+
];
|
|
413
|
+
|
|
414
|
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
415
|
+
|
|
416
|
+
// `Object.getOwnPropertyNames` method
|
|
417
|
+
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
418
|
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
419
|
+
return objectKeysInternal(O, hiddenKeys$1);
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
var objectGetOwnPropertyNames = {
|
|
423
|
+
f: f$3
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
var f$4 = Object.getOwnPropertySymbols;
|
|
427
|
+
|
|
428
|
+
var objectGetOwnPropertySymbols = {
|
|
429
|
+
f: f$4
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
// all object keys, includes non-enumerable and symbols
|
|
433
|
+
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
434
|
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
435
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
436
|
+
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
var copyConstructorProperties = function (target, source) {
|
|
440
|
+
var keys = ownKeys(source);
|
|
441
|
+
var defineProperty = objectDefineProperty.f;
|
|
442
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
443
|
+
for (var i = 0; i < keys.length; i++) {
|
|
444
|
+
var key = keys[i];
|
|
445
|
+
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
var replacement = /#|\.prototype\./;
|
|
450
|
+
|
|
451
|
+
var isForced = function (feature, detection) {
|
|
452
|
+
var value = data[normalize(feature)];
|
|
453
|
+
return value == POLYFILL ? true
|
|
454
|
+
: value == NATIVE ? false
|
|
455
|
+
: typeof detection == 'function' ? fails(detection)
|
|
456
|
+
: !!detection;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
var normalize = isForced.normalize = function (string) {
|
|
460
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
var data = isForced.data = {};
|
|
464
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
465
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
466
|
+
|
|
467
|
+
var isForced_1 = isForced;
|
|
468
|
+
|
|
469
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
/*
|
|
477
|
+
options.target - name of the target object
|
|
478
|
+
options.global - target is the global object
|
|
479
|
+
options.stat - export as static methods of target
|
|
480
|
+
options.proto - export as prototype methods of target
|
|
481
|
+
options.real - real prototype method for the `pure` version
|
|
482
|
+
options.forced - export even if the native feature is available
|
|
483
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
484
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
485
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
486
|
+
options.sham - add a flag to not completely full polyfills
|
|
487
|
+
options.enumerable - export as enumerable property
|
|
488
|
+
options.noTargetGet - prevent calling a getter on target
|
|
489
|
+
*/
|
|
490
|
+
var _export = function (options, source) {
|
|
491
|
+
var TARGET = options.target;
|
|
492
|
+
var GLOBAL = options.global;
|
|
493
|
+
var STATIC = options.stat;
|
|
494
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
495
|
+
if (GLOBAL) {
|
|
496
|
+
target = global_1;
|
|
497
|
+
} else if (STATIC) {
|
|
498
|
+
target = global_1[TARGET] || setGlobal(TARGET, {});
|
|
499
|
+
} else {
|
|
500
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
501
|
+
}
|
|
502
|
+
if (target) for (key in source) {
|
|
503
|
+
sourceProperty = source[key];
|
|
504
|
+
if (options.noTargetGet) {
|
|
505
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
506
|
+
targetProperty = descriptor && descriptor.value;
|
|
507
|
+
} else targetProperty = target[key];
|
|
508
|
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
509
|
+
// contained in target
|
|
510
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
511
|
+
if (typeof sourceProperty === typeof targetProperty) continue;
|
|
512
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
513
|
+
}
|
|
514
|
+
// add a flag to not completely full polyfills
|
|
515
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
516
|
+
hide(sourceProperty, 'sham', true);
|
|
517
|
+
}
|
|
518
|
+
// extend global
|
|
519
|
+
redefine(target, key, sourceProperty, options);
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
var aFunction$1 = function (it) {
|
|
524
|
+
if (typeof it != 'function') {
|
|
525
|
+
throw TypeError(String(it) + ' is not a function');
|
|
526
|
+
} return it;
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// optional / simple context binding
|
|
530
|
+
var bindContext = function (fn, that, length) {
|
|
531
|
+
aFunction$1(fn);
|
|
532
|
+
if (that === undefined) return fn;
|
|
533
|
+
switch (length) {
|
|
534
|
+
case 0: return function () {
|
|
535
|
+
return fn.call(that);
|
|
536
|
+
};
|
|
537
|
+
case 1: return function (a) {
|
|
538
|
+
return fn.call(that, a);
|
|
539
|
+
};
|
|
540
|
+
case 2: return function (a, b) {
|
|
541
|
+
return fn.call(that, a, b);
|
|
542
|
+
};
|
|
543
|
+
case 3: return function (a, b, c) {
|
|
544
|
+
return fn.call(that, a, b, c);
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
return function (/* ...args */) {
|
|
548
|
+
return fn.apply(that, arguments);
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// `ToObject` abstract operation
|
|
553
|
+
// https://tc39.github.io/ecma262/#sec-toobject
|
|
554
|
+
var toObject = function (argument) {
|
|
555
|
+
return Object(requireObjectCoercible(argument));
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
// `IsArray` abstract operation
|
|
559
|
+
// https://tc39.github.io/ecma262/#sec-isarray
|
|
560
|
+
var isArray = Array.isArray || function isArray(arg) {
|
|
561
|
+
return classofRaw(arg) == 'Array';
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
565
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
566
|
+
// eslint-disable-next-line no-undef
|
|
567
|
+
return !String(Symbol());
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
var Symbol$1 = global_1.Symbol;
|
|
571
|
+
var store$1 = shared('wks');
|
|
572
|
+
|
|
573
|
+
var wellKnownSymbol = function (name) {
|
|
574
|
+
return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
|
|
575
|
+
|| (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
var SPECIES = wellKnownSymbol('species');
|
|
579
|
+
|
|
580
|
+
// `ArraySpeciesCreate` abstract operation
|
|
581
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
582
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
|
583
|
+
var C;
|
|
584
|
+
if (isArray(originalArray)) {
|
|
585
|
+
C = originalArray.constructor;
|
|
586
|
+
// cross-realm fallback
|
|
587
|
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
588
|
+
else if (isObject(C)) {
|
|
589
|
+
C = C[SPECIES];
|
|
590
|
+
if (C === null) C = undefined;
|
|
591
|
+
}
|
|
592
|
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
var push = [].push;
|
|
596
|
+
|
|
597
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
598
|
+
var createMethod$1 = function (TYPE) {
|
|
599
|
+
var IS_MAP = TYPE == 1;
|
|
600
|
+
var IS_FILTER = TYPE == 2;
|
|
601
|
+
var IS_SOME = TYPE == 3;
|
|
602
|
+
var IS_EVERY = TYPE == 4;
|
|
603
|
+
var IS_FIND_INDEX = TYPE == 6;
|
|
604
|
+
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
605
|
+
return function ($this, callbackfn, that, specificCreate) {
|
|
606
|
+
var O = toObject($this);
|
|
607
|
+
var self = indexedObject(O);
|
|
608
|
+
var boundFunction = bindContext(callbackfn, that, 3);
|
|
609
|
+
var length = toLength(self.length);
|
|
610
|
+
var index = 0;
|
|
611
|
+
var create = specificCreate || arraySpeciesCreate;
|
|
612
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
613
|
+
var value, result;
|
|
614
|
+
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
615
|
+
value = self[index];
|
|
616
|
+
result = boundFunction(value, index, O);
|
|
617
|
+
if (TYPE) {
|
|
618
|
+
if (IS_MAP) target[index] = result; // map
|
|
619
|
+
else if (result) switch (TYPE) {
|
|
620
|
+
case 3: return true; // some
|
|
621
|
+
case 5: return value; // find
|
|
622
|
+
case 6: return index; // findIndex
|
|
623
|
+
case 2: push.call(target, value); // filter
|
|
624
|
+
} else if (IS_EVERY) return false; // every
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
var arrayIteration = {
|
|
632
|
+
// `Array.prototype.forEach` method
|
|
633
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
634
|
+
forEach: createMethod$1(0),
|
|
635
|
+
// `Array.prototype.map` method
|
|
636
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
|
637
|
+
map: createMethod$1(1),
|
|
638
|
+
// `Array.prototype.filter` method
|
|
639
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
|
640
|
+
filter: createMethod$1(2),
|
|
641
|
+
// `Array.prototype.some` method
|
|
642
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
|
643
|
+
some: createMethod$1(3),
|
|
644
|
+
// `Array.prototype.every` method
|
|
645
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
|
646
|
+
every: createMethod$1(4),
|
|
647
|
+
// `Array.prototype.find` method
|
|
648
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
|
649
|
+
find: createMethod$1(5),
|
|
650
|
+
// `Array.prototype.findIndex` method
|
|
651
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
|
652
|
+
findIndex: createMethod$1(6)
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
var SPECIES$1 = wellKnownSymbol('species');
|
|
656
|
+
|
|
657
|
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
658
|
+
return !fails(function () {
|
|
659
|
+
var array = [];
|
|
660
|
+
var constructor = array.constructor = {};
|
|
661
|
+
constructor[SPECIES$1] = function () {
|
|
662
|
+
return { foo: 1 };
|
|
663
|
+
};
|
|
664
|
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
665
|
+
});
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
var $filter = arrayIteration.filter;
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
// `Array.prototype.filter` method
|
|
672
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
|
673
|
+
// with adding support of @@species
|
|
674
|
+
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
|
|
675
|
+
filter: function filter(callbackfn /* , thisArg */) {
|
|
676
|
+
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
// `Object.keys` method
|
|
681
|
+
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
682
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
683
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
// `Object.defineProperties` method
|
|
687
|
+
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
688
|
+
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
689
|
+
anObject(O);
|
|
690
|
+
var keys = objectKeys(Properties);
|
|
691
|
+
var length = keys.length;
|
|
692
|
+
var index = 0;
|
|
693
|
+
var key;
|
|
694
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
|
695
|
+
return O;
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
699
|
+
|
|
700
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
701
|
+
|
|
702
|
+
var PROTOTYPE = 'prototype';
|
|
703
|
+
var Empty = function () { /* empty */ };
|
|
704
|
+
|
|
705
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
706
|
+
var createDict = function () {
|
|
707
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
708
|
+
var iframe = documentCreateElement('iframe');
|
|
709
|
+
var length = enumBugKeys.length;
|
|
710
|
+
var lt = '<';
|
|
711
|
+
var script = 'script';
|
|
712
|
+
var gt = '>';
|
|
713
|
+
var js = 'java' + script + ':';
|
|
714
|
+
var iframeDocument;
|
|
715
|
+
iframe.style.display = 'none';
|
|
716
|
+
html.appendChild(iframe);
|
|
717
|
+
iframe.src = String(js);
|
|
718
|
+
iframeDocument = iframe.contentWindow.document;
|
|
719
|
+
iframeDocument.open();
|
|
720
|
+
iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
|
|
721
|
+
iframeDocument.close();
|
|
722
|
+
createDict = iframeDocument.F;
|
|
723
|
+
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
|
724
|
+
return createDict();
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
// `Object.create` method
|
|
728
|
+
// https://tc39.github.io/ecma262/#sec-object.create
|
|
729
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
730
|
+
var result;
|
|
731
|
+
if (O !== null) {
|
|
732
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
733
|
+
result = new Empty();
|
|
734
|
+
Empty[PROTOTYPE] = null;
|
|
735
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
736
|
+
result[IE_PROTO] = O;
|
|
737
|
+
} else result = createDict();
|
|
738
|
+
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
hiddenKeys[IE_PROTO] = true;
|
|
742
|
+
|
|
743
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
744
|
+
var ArrayPrototype = Array.prototype;
|
|
745
|
+
|
|
746
|
+
// Array.prototype[@@unscopables]
|
|
747
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
748
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
749
|
+
hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// add a key to Array.prototype[@@unscopables]
|
|
753
|
+
var addToUnscopables = function (key) {
|
|
754
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
var $includes = arrayIncludes.includes;
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
// `Array.prototype.includes` method
|
|
761
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
|
762
|
+
_export({ target: 'Array', proto: true }, {
|
|
763
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
764
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
769
|
+
addToUnscopables('includes');
|
|
770
|
+
|
|
771
|
+
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
|
772
|
+
var method = [][METHOD_NAME];
|
|
773
|
+
return !method || !fails(function () {
|
|
774
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
775
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
|
776
|
+
});
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
var $indexOf = arrayIncludes.indexOf;
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
var nativeIndexOf = [].indexOf;
|
|
783
|
+
|
|
784
|
+
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
|
785
|
+
var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
|
|
786
|
+
|
|
787
|
+
// `Array.prototype.indexOf` method
|
|
788
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
789
|
+
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
|
|
790
|
+
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
791
|
+
return NEGATIVE_ZERO
|
|
792
|
+
// convert -0 to +0
|
|
793
|
+
? nativeIndexOf.apply(this, arguments) || 0
|
|
794
|
+
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
799
|
+
|
|
800
|
+
// `Object.{ entries, values }` methods implementation
|
|
801
|
+
var createMethod$2 = function (TO_ENTRIES) {
|
|
802
|
+
return function (it) {
|
|
803
|
+
var O = toIndexedObject(it);
|
|
804
|
+
var keys = objectKeys(O);
|
|
805
|
+
var length = keys.length;
|
|
806
|
+
var i = 0;
|
|
807
|
+
var result = [];
|
|
808
|
+
var key;
|
|
809
|
+
while (length > i) {
|
|
810
|
+
key = keys[i++];
|
|
811
|
+
if (!descriptors || propertyIsEnumerable.call(O, key)) {
|
|
812
|
+
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return result;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
var objectToArray = {
|
|
820
|
+
// `Object.entries` method
|
|
821
|
+
// https://tc39.github.io/ecma262/#sec-object.entries
|
|
822
|
+
entries: createMethod$2(true),
|
|
823
|
+
// `Object.values` method
|
|
824
|
+
// https://tc39.github.io/ecma262/#sec-object.values
|
|
825
|
+
values: createMethod$2(false)
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
var $entries = objectToArray.entries;
|
|
829
|
+
|
|
830
|
+
// `Object.entries` method
|
|
831
|
+
// https://tc39.github.io/ecma262/#sec-object.entries
|
|
832
|
+
_export({ target: 'Object', stat: true }, {
|
|
833
|
+
entries: function entries(O) {
|
|
834
|
+
return $entries(O);
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
// a string of all valid unicode whitespaces
|
|
839
|
+
// eslint-disable-next-line max-len
|
|
840
|
+
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
841
|
+
|
|
842
|
+
var whitespace = '[' + whitespaces + ']';
|
|
843
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
844
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
845
|
+
|
|
846
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
847
|
+
var createMethod$3 = function (TYPE) {
|
|
848
|
+
return function ($this) {
|
|
849
|
+
var string = String(requireObjectCoercible($this));
|
|
850
|
+
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
851
|
+
if (TYPE & 2) string = string.replace(rtrim, '');
|
|
852
|
+
return string;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
var stringTrim = {
|
|
857
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
858
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
|
859
|
+
start: createMethod$3(1),
|
|
860
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
861
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
|
862
|
+
end: createMethod$3(2),
|
|
863
|
+
// `String.prototype.trim` method
|
|
864
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
865
|
+
trim: createMethod$3(3)
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
var trim = stringTrim.trim;
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
var nativeParseInt = global_1.parseInt;
|
|
872
|
+
var hex = /^[+-]?0[Xx]/;
|
|
873
|
+
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
|
874
|
+
|
|
875
|
+
// `parseInt` method
|
|
876
|
+
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
877
|
+
var _parseInt = FORCED ? function parseInt(string, radix) {
|
|
878
|
+
var S = trim(String(string));
|
|
879
|
+
return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
|
880
|
+
} : nativeParseInt;
|
|
881
|
+
|
|
882
|
+
// `parseInt` method
|
|
883
|
+
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
884
|
+
_export({ global: true, forced: parseInt != _parseInt }, {
|
|
885
|
+
parseInt: _parseInt
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
var MATCH = wellKnownSymbol('match');
|
|
889
|
+
|
|
890
|
+
// `IsRegExp` abstract operation
|
|
891
|
+
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
892
|
+
var isRegexp = function (it) {
|
|
893
|
+
var isRegExp;
|
|
894
|
+
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
var notARegexp = function (it) {
|
|
898
|
+
if (isRegexp(it)) {
|
|
899
|
+
throw TypeError("The method doesn't accept regular expressions");
|
|
900
|
+
} return it;
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
var MATCH$1 = wellKnownSymbol('match');
|
|
904
|
+
|
|
905
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
906
|
+
var regexp = /./;
|
|
907
|
+
try {
|
|
908
|
+
'/./'[METHOD_NAME](regexp);
|
|
909
|
+
} catch (e) {
|
|
910
|
+
try {
|
|
911
|
+
regexp[MATCH$1] = false;
|
|
912
|
+
return '/./'[METHOD_NAME](regexp);
|
|
913
|
+
} catch (f) { /* empty */ }
|
|
914
|
+
} return false;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
// `String.prototype.includes` method
|
|
918
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
919
|
+
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
920
|
+
includes: function includes(searchString /* , position = 0 */) {
|
|
921
|
+
return !!~String(requireObjectCoercible(this))
|
|
922
|
+
.indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
|
|
926
|
+
// `RegExp.prototype.flags` getter implementation
|
|
927
|
+
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
928
|
+
var regexpFlags = function () {
|
|
929
|
+
var that = anObject(this);
|
|
930
|
+
var result = '';
|
|
931
|
+
if (that.global) result += 'g';
|
|
932
|
+
if (that.ignoreCase) result += 'i';
|
|
933
|
+
if (that.multiline) result += 'm';
|
|
934
|
+
if (that.dotAll) result += 's';
|
|
935
|
+
if (that.unicode) result += 'u';
|
|
936
|
+
if (that.sticky) result += 'y';
|
|
937
|
+
return result;
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
var nativeExec = RegExp.prototype.exec;
|
|
941
|
+
// This always refers to the native implementation, because the
|
|
942
|
+
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
|
943
|
+
// which loads this file before patching the method.
|
|
944
|
+
var nativeReplace = String.prototype.replace;
|
|
945
|
+
|
|
946
|
+
var patchedExec = nativeExec;
|
|
947
|
+
|
|
948
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
949
|
+
var re1 = /a/;
|
|
950
|
+
var re2 = /b*/g;
|
|
951
|
+
nativeExec.call(re1, 'a');
|
|
952
|
+
nativeExec.call(re2, 'a');
|
|
953
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
954
|
+
})();
|
|
955
|
+
|
|
956
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
957
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
958
|
+
|
|
959
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
|
960
|
+
|
|
961
|
+
if (PATCH) {
|
|
962
|
+
patchedExec = function exec(str) {
|
|
963
|
+
var re = this;
|
|
964
|
+
var lastIndex, reCopy, match, i;
|
|
965
|
+
|
|
966
|
+
if (NPCG_INCLUDED) {
|
|
967
|
+
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
|
968
|
+
}
|
|
969
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
970
|
+
|
|
971
|
+
match = nativeExec.call(re, str);
|
|
972
|
+
|
|
973
|
+
if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
974
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
975
|
+
}
|
|
976
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
977
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
978
|
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
979
|
+
nativeReplace.call(match[0], reCopy, function () {
|
|
980
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
981
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
return match;
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
var regexpExec = patchedExec;
|
|
991
|
+
|
|
992
|
+
var SPECIES$2 = wellKnownSymbol('species');
|
|
993
|
+
|
|
994
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
995
|
+
// #replace needs built-in support for named groups.
|
|
996
|
+
// #match works fine because it just return the exec results, even if it has
|
|
997
|
+
// a "grops" property.
|
|
998
|
+
var re = /./;
|
|
999
|
+
re.exec = function () {
|
|
1000
|
+
var result = [];
|
|
1001
|
+
result.groups = { a: '7' };
|
|
1002
|
+
return result;
|
|
1003
|
+
};
|
|
1004
|
+
return ''.replace(re, '$<a>') !== '7';
|
|
1005
|
+
});
|
|
1006
|
+
|
|
1007
|
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
1008
|
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
1009
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
1010
|
+
var re = /(?:)/;
|
|
1011
|
+
var originalExec = re.exec;
|
|
1012
|
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
1013
|
+
var result = 'ab'.split(re);
|
|
1014
|
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
1015
|
+
});
|
|
1016
|
+
|
|
1017
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
|
1018
|
+
var SYMBOL = wellKnownSymbol(KEY);
|
|
1019
|
+
|
|
1020
|
+
var DELEGATES_TO_SYMBOL = !fails(function () {
|
|
1021
|
+
// String methods call symbol-named RegEp methods
|
|
1022
|
+
var O = {};
|
|
1023
|
+
O[SYMBOL] = function () { return 7; };
|
|
1024
|
+
return ''[KEY](O) != 7;
|
|
1025
|
+
});
|
|
1026
|
+
|
|
1027
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
|
1028
|
+
// Symbol-named RegExp methods call .exec
|
|
1029
|
+
var execCalled = false;
|
|
1030
|
+
var re = /a/;
|
|
1031
|
+
re.exec = function () { execCalled = true; return null; };
|
|
1032
|
+
|
|
1033
|
+
if (KEY === 'split') {
|
|
1034
|
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
1035
|
+
// a new one. We need to return the patched regex when creating the new one.
|
|
1036
|
+
re.constructor = {};
|
|
1037
|
+
re.constructor[SPECIES$2] = function () { return re; };
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
re[SYMBOL]('');
|
|
1041
|
+
return !execCalled;
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
if (
|
|
1045
|
+
!DELEGATES_TO_SYMBOL ||
|
|
1046
|
+
!DELEGATES_TO_EXEC ||
|
|
1047
|
+
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
|
1048
|
+
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
|
1049
|
+
) {
|
|
1050
|
+
var nativeRegExpMethod = /./[SYMBOL];
|
|
1051
|
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
1052
|
+
if (regexp.exec === regexpExec) {
|
|
1053
|
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
1054
|
+
// The native String method already delegates to @@method (this
|
|
1055
|
+
// polyfilled function), leasing to infinite recursion.
|
|
1056
|
+
// We avoid it by directly calling the native @@method method.
|
|
1057
|
+
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
|
1058
|
+
}
|
|
1059
|
+
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
1060
|
+
}
|
|
1061
|
+
return { done: false };
|
|
1062
|
+
});
|
|
1063
|
+
var stringMethod = methods[0];
|
|
1064
|
+
var regexMethod = methods[1];
|
|
1065
|
+
|
|
1066
|
+
redefine(String.prototype, KEY, stringMethod);
|
|
1067
|
+
redefine(RegExp.prototype, SYMBOL, length == 2
|
|
1068
|
+
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
|
1069
|
+
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
1070
|
+
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
|
1071
|
+
// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
1072
|
+
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
1073
|
+
: function (string) { return regexMethod.call(string, this); }
|
|
1074
|
+
);
|
|
1075
|
+
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
1080
|
+
var createMethod$4 = function (CONVERT_TO_STRING) {
|
|
1081
|
+
return function ($this, pos) {
|
|
1082
|
+
var S = String(requireObjectCoercible($this));
|
|
1083
|
+
var position = toInteger(pos);
|
|
1084
|
+
var size = S.length;
|
|
1085
|
+
var first, second;
|
|
1086
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1087
|
+
first = S.charCodeAt(position);
|
|
1088
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1089
|
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1090
|
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
|
1091
|
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
var stringMultibyte = {
|
|
1096
|
+
// `String.prototype.codePointAt` method
|
|
1097
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
1098
|
+
codeAt: createMethod$4(false),
|
|
1099
|
+
// `String.prototype.at` method
|
|
1100
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
1101
|
+
charAt: createMethod$4(true)
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
var charAt = stringMultibyte.charAt;
|
|
1105
|
+
|
|
1106
|
+
// `AdvanceStringIndex` abstract operation
|
|
1107
|
+
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
1108
|
+
var advanceStringIndex = function (S, index, unicode) {
|
|
1109
|
+
return index + (unicode ? charAt(S, index).length : 1);
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
// `RegExpExec` abstract operation
|
|
1113
|
+
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
1114
|
+
var regexpExecAbstract = function (R, S) {
|
|
1115
|
+
var exec = R.exec;
|
|
1116
|
+
if (typeof exec === 'function') {
|
|
1117
|
+
var result = exec.call(R, S);
|
|
1118
|
+
if (typeof result !== 'object') {
|
|
1119
|
+
throw TypeError('RegExp exec method returned something other than an Object or null');
|
|
1120
|
+
}
|
|
1121
|
+
return result;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
if (classofRaw(R) !== 'RegExp') {
|
|
1125
|
+
throw TypeError('RegExp#exec called on incompatible receiver');
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
return regexpExec.call(R, S);
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
var max$1 = Math.max;
|
|
1132
|
+
var min$2 = Math.min;
|
|
1133
|
+
var floor$1 = Math.floor;
|
|
1134
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
|
1135
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
|
1136
|
+
|
|
1137
|
+
var maybeToString = function (it) {
|
|
1138
|
+
return it === undefined ? it : String(it);
|
|
1139
|
+
};
|
|
1140
|
+
|
|
1141
|
+
// @@replace logic
|
|
1142
|
+
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
|
1143
|
+
return [
|
|
1144
|
+
// `String.prototype.replace` method
|
|
1145
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
1146
|
+
function replace(searchValue, replaceValue) {
|
|
1147
|
+
var O = requireObjectCoercible(this);
|
|
1148
|
+
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
1149
|
+
return replacer !== undefined
|
|
1150
|
+
? replacer.call(searchValue, O, replaceValue)
|
|
1151
|
+
: nativeReplace.call(String(O), searchValue, replaceValue);
|
|
1152
|
+
},
|
|
1153
|
+
// `RegExp.prototype[@@replace]` method
|
|
1154
|
+
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
1155
|
+
function (regexp, replaceValue) {
|
|
1156
|
+
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
|
1157
|
+
if (res.done) return res.value;
|
|
1158
|
+
|
|
1159
|
+
var rx = anObject(regexp);
|
|
1160
|
+
var S = String(this);
|
|
1161
|
+
|
|
1162
|
+
var functionalReplace = typeof replaceValue === 'function';
|
|
1163
|
+
if (!functionalReplace) replaceValue = String(replaceValue);
|
|
1164
|
+
|
|
1165
|
+
var global = rx.global;
|
|
1166
|
+
if (global) {
|
|
1167
|
+
var fullUnicode = rx.unicode;
|
|
1168
|
+
rx.lastIndex = 0;
|
|
1169
|
+
}
|
|
1170
|
+
var results = [];
|
|
1171
|
+
while (true) {
|
|
1172
|
+
var result = regexpExecAbstract(rx, S);
|
|
1173
|
+
if (result === null) break;
|
|
1174
|
+
|
|
1175
|
+
results.push(result);
|
|
1176
|
+
if (!global) break;
|
|
1177
|
+
|
|
1178
|
+
var matchStr = String(result[0]);
|
|
1179
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
var accumulatedResult = '';
|
|
1183
|
+
var nextSourcePosition = 0;
|
|
1184
|
+
for (var i = 0; i < results.length; i++) {
|
|
1185
|
+
result = results[i];
|
|
1186
|
+
|
|
1187
|
+
var matched = String(result[0]);
|
|
1188
|
+
var position = max$1(min$2(toInteger(result.index), S.length), 0);
|
|
1189
|
+
var captures = [];
|
|
1190
|
+
// NOTE: This is equivalent to
|
|
1191
|
+
// captures = result.slice(1).map(maybeToString)
|
|
1192
|
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
1193
|
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
1194
|
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
1195
|
+
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
|
1196
|
+
var namedCaptures = result.groups;
|
|
1197
|
+
if (functionalReplace) {
|
|
1198
|
+
var replacerArgs = [matched].concat(captures, position, S);
|
|
1199
|
+
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
|
1200
|
+
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
|
1201
|
+
} else {
|
|
1202
|
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
1203
|
+
}
|
|
1204
|
+
if (position >= nextSourcePosition) {
|
|
1205
|
+
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
|
1206
|
+
nextSourcePosition = position + matched.length;
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
return accumulatedResult + S.slice(nextSourcePosition);
|
|
1210
|
+
}
|
|
1211
|
+
];
|
|
1212
|
+
|
|
1213
|
+
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
1214
|
+
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
1215
|
+
var tailPos = position + matched.length;
|
|
1216
|
+
var m = captures.length;
|
|
1217
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
1218
|
+
if (namedCaptures !== undefined) {
|
|
1219
|
+
namedCaptures = toObject(namedCaptures);
|
|
1220
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
1221
|
+
}
|
|
1222
|
+
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
|
1223
|
+
var capture;
|
|
1224
|
+
switch (ch.charAt(0)) {
|
|
1225
|
+
case '$': return '$';
|
|
1226
|
+
case '&': return matched;
|
|
1227
|
+
case '`': return str.slice(0, position);
|
|
1228
|
+
case "'": return str.slice(tailPos);
|
|
1229
|
+
case '<':
|
|
1230
|
+
capture = namedCaptures[ch.slice(1, -1)];
|
|
1231
|
+
break;
|
|
1232
|
+
default: // \d\d?
|
|
1233
|
+
var n = +ch;
|
|
1234
|
+
if (n === 0) return match;
|
|
1235
|
+
if (n > m) {
|
|
1236
|
+
var f = floor$1(n / 10);
|
|
1237
|
+
if (f === 0) return match;
|
|
1238
|
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
1239
|
+
return match;
|
|
1240
|
+
}
|
|
1241
|
+
capture = captures[n - 1];
|
|
1242
|
+
}
|
|
1243
|
+
return capture === undefined ? '' : capture;
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
function _classCallCheck(instance, Constructor) {
|
|
1249
|
+
if (!(instance instanceof Constructor)) {
|
|
1250
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
function _defineProperties(target, props) {
|
|
1255
|
+
for (var i = 0; i < props.length; i++) {
|
|
1256
|
+
var descriptor = props[i];
|
|
1257
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1258
|
+
descriptor.configurable = true;
|
|
1259
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1260
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1265
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1266
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1267
|
+
return Constructor;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
function _inherits(subClass, superClass) {
|
|
1271
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
1272
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1276
|
+
constructor: {
|
|
1277
|
+
value: subClass,
|
|
1278
|
+
writable: true,
|
|
1279
|
+
configurable: true
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
function _getPrototypeOf(o) {
|
|
1286
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
1287
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1288
|
+
};
|
|
1289
|
+
return _getPrototypeOf(o);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
function _setPrototypeOf(o, p) {
|
|
1293
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
1294
|
+
o.__proto__ = p;
|
|
1295
|
+
return o;
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
return _setPrototypeOf(o, p);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
function _assertThisInitialized(self) {
|
|
1302
|
+
if (self === void 0) {
|
|
1303
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
return self;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
function _possibleConstructorReturn(self, call) {
|
|
1310
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
1311
|
+
return call;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
return _assertThisInitialized(self);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function _superPropBase(object, property) {
|
|
1318
|
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
1319
|
+
object = _getPrototypeOf(object);
|
|
1320
|
+
if (object === null) break;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
return object;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
function _get(target, property, receiver) {
|
|
1327
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
1328
|
+
_get = Reflect.get;
|
|
1329
|
+
} else {
|
|
1330
|
+
_get = function _get(target, property, receiver) {
|
|
1331
|
+
var base = _superPropBase(target, property);
|
|
1332
|
+
|
|
1333
|
+
if (!base) return;
|
|
1334
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
1335
|
+
|
|
1336
|
+
if (desc.get) {
|
|
1337
|
+
return desc.get.call(receiver);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
return desc.value;
|
|
1341
|
+
};
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
return _get(target, property, receiver || target);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
function _slicedToArray(arr, i) {
|
|
1348
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
function _arrayWithHoles(arr) {
|
|
1352
|
+
if (Array.isArray(arr)) return arr;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
function _iterableToArrayLimit(arr, i) {
|
|
1356
|
+
var _arr = [];
|
|
1357
|
+
var _n = true;
|
|
1358
|
+
var _d = false;
|
|
1359
|
+
var _e = undefined;
|
|
1360
|
+
|
|
1361
|
+
try {
|
|
1362
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
1363
|
+
_arr.push(_s.value);
|
|
1364
|
+
|
|
1365
|
+
if (i && _arr.length === i) break;
|
|
1366
|
+
}
|
|
1367
|
+
} catch (err) {
|
|
1368
|
+
_d = true;
|
|
1369
|
+
_e = err;
|
|
1370
|
+
} finally {
|
|
1371
|
+
try {
|
|
1372
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1373
|
+
} finally {
|
|
1374
|
+
if (_d) throw _e;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return _arr;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
function _nonIterableRest() {
|
|
1382
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* @author: Dennis Hernández
|
|
1387
|
+
* @webSite: http://djhvscf.github.io/Blog
|
|
1388
|
+
* @update: zhixin wen <wenzhixin2010@gmail.com>
|
|
1389
|
+
*/
|
|
1390
|
+
|
|
1391
|
+
var diacriticsMap = {};
|
|
1392
|
+
var defaultAccentsDiacritics = [{
|
|
1393
|
+
base: 'A',
|
|
1394
|
+
letters: "A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"
|
|
1395
|
+
}, {
|
|
1396
|
+
base: 'AA',
|
|
1397
|
+
letters: "\uA732"
|
|
1398
|
+
}, {
|
|
1399
|
+
base: 'AE',
|
|
1400
|
+
letters: "\xC6\u01FC\u01E2"
|
|
1401
|
+
}, {
|
|
1402
|
+
base: 'AO',
|
|
1403
|
+
letters: "\uA734"
|
|
1404
|
+
}, {
|
|
1405
|
+
base: 'AU',
|
|
1406
|
+
letters: "\uA736"
|
|
1407
|
+
}, {
|
|
1408
|
+
base: 'AV',
|
|
1409
|
+
letters: "\uA738\uA73A"
|
|
1410
|
+
}, {
|
|
1411
|
+
base: 'AY',
|
|
1412
|
+
letters: "\uA73C"
|
|
1413
|
+
}, {
|
|
1414
|
+
base: 'B',
|
|
1415
|
+
letters: "B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"
|
|
1416
|
+
}, {
|
|
1417
|
+
base: 'C',
|
|
1418
|
+
letters: "C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"
|
|
1419
|
+
}, {
|
|
1420
|
+
base: 'D',
|
|
1421
|
+
letters: "D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"
|
|
1422
|
+
}, {
|
|
1423
|
+
base: 'DZ',
|
|
1424
|
+
letters: "\u01F1\u01C4"
|
|
1425
|
+
}, {
|
|
1426
|
+
base: 'Dz',
|
|
1427
|
+
letters: "\u01F2\u01C5"
|
|
1428
|
+
}, {
|
|
1429
|
+
base: 'E',
|
|
1430
|
+
letters: "E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"
|
|
1431
|
+
}, {
|
|
1432
|
+
base: 'F',
|
|
1433
|
+
letters: "F\u24BB\uFF26\u1E1E\u0191\uA77B"
|
|
1434
|
+
}, {
|
|
1435
|
+
base: 'G',
|
|
1436
|
+
letters: "G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"
|
|
1437
|
+
}, {
|
|
1438
|
+
base: 'H',
|
|
1439
|
+
letters: "H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"
|
|
1440
|
+
}, {
|
|
1441
|
+
base: 'I',
|
|
1442
|
+
letters: "I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"
|
|
1443
|
+
}, {
|
|
1444
|
+
base: 'J',
|
|
1445
|
+
letters: "J\u24BF\uFF2A\u0134\u0248"
|
|
1446
|
+
}, {
|
|
1447
|
+
base: 'K',
|
|
1448
|
+
letters: "K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"
|
|
1449
|
+
}, {
|
|
1450
|
+
base: 'L',
|
|
1451
|
+
letters: "L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"
|
|
1452
|
+
}, {
|
|
1453
|
+
base: 'LJ',
|
|
1454
|
+
letters: "\u01C7"
|
|
1455
|
+
}, {
|
|
1456
|
+
base: 'Lj',
|
|
1457
|
+
letters: "\u01C8"
|
|
1458
|
+
}, {
|
|
1459
|
+
base: 'M',
|
|
1460
|
+
letters: "M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"
|
|
1461
|
+
}, {
|
|
1462
|
+
base: 'N',
|
|
1463
|
+
letters: "N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"
|
|
1464
|
+
}, {
|
|
1465
|
+
base: 'NJ',
|
|
1466
|
+
letters: "\u01CA"
|
|
1467
|
+
}, {
|
|
1468
|
+
base: 'Nj',
|
|
1469
|
+
letters: "\u01CB"
|
|
1470
|
+
}, {
|
|
1471
|
+
base: 'O',
|
|
1472
|
+
letters: "O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"
|
|
1473
|
+
}, {
|
|
1474
|
+
base: 'OI',
|
|
1475
|
+
letters: "\u01A2"
|
|
1476
|
+
}, {
|
|
1477
|
+
base: 'OO',
|
|
1478
|
+
letters: "\uA74E"
|
|
1479
|
+
}, {
|
|
1480
|
+
base: 'OU',
|
|
1481
|
+
letters: "\u0222"
|
|
1482
|
+
}, {
|
|
1483
|
+
base: 'OE',
|
|
1484
|
+
letters: "\x8C\u0152"
|
|
1485
|
+
}, {
|
|
1486
|
+
base: 'oe',
|
|
1487
|
+
letters: "\x9C\u0153"
|
|
1488
|
+
}, {
|
|
1489
|
+
base: 'P',
|
|
1490
|
+
letters: "P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"
|
|
1491
|
+
}, {
|
|
1492
|
+
base: 'Q',
|
|
1493
|
+
letters: "Q\u24C6\uFF31\uA756\uA758\u024A"
|
|
1494
|
+
}, {
|
|
1495
|
+
base: 'R',
|
|
1496
|
+
letters: "R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"
|
|
1497
|
+
}, {
|
|
1498
|
+
base: 'S',
|
|
1499
|
+
letters: "S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"
|
|
1500
|
+
}, {
|
|
1501
|
+
base: 'T',
|
|
1502
|
+
letters: "T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"
|
|
1503
|
+
}, {
|
|
1504
|
+
base: 'TZ',
|
|
1505
|
+
letters: "\uA728"
|
|
1506
|
+
}, {
|
|
1507
|
+
base: 'U',
|
|
1508
|
+
letters: "U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"
|
|
1509
|
+
}, {
|
|
1510
|
+
base: 'V',
|
|
1511
|
+
letters: "V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"
|
|
1512
|
+
}, {
|
|
1513
|
+
base: 'VY',
|
|
1514
|
+
letters: "\uA760"
|
|
1515
|
+
}, {
|
|
1516
|
+
base: 'W',
|
|
1517
|
+
letters: "W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"
|
|
1518
|
+
}, {
|
|
1519
|
+
base: 'X',
|
|
1520
|
+
letters: "X\u24CD\uFF38\u1E8A\u1E8C"
|
|
1521
|
+
}, {
|
|
1522
|
+
base: 'Y',
|
|
1523
|
+
letters: "Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"
|
|
1524
|
+
}, {
|
|
1525
|
+
base: 'Z',
|
|
1526
|
+
letters: "Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"
|
|
1527
|
+
}, {
|
|
1528
|
+
base: 'a',
|
|
1529
|
+
letters: "a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"
|
|
1530
|
+
}, {
|
|
1531
|
+
base: 'aa',
|
|
1532
|
+
letters: "\uA733"
|
|
1533
|
+
}, {
|
|
1534
|
+
base: 'ae',
|
|
1535
|
+
letters: "\xE6\u01FD\u01E3"
|
|
1536
|
+
}, {
|
|
1537
|
+
base: 'ao',
|
|
1538
|
+
letters: "\uA735"
|
|
1539
|
+
}, {
|
|
1540
|
+
base: 'au',
|
|
1541
|
+
letters: "\uA737"
|
|
1542
|
+
}, {
|
|
1543
|
+
base: 'av',
|
|
1544
|
+
letters: "\uA739\uA73B"
|
|
1545
|
+
}, {
|
|
1546
|
+
base: 'ay',
|
|
1547
|
+
letters: "\uA73D"
|
|
1548
|
+
}, {
|
|
1549
|
+
base: 'b',
|
|
1550
|
+
letters: "b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"
|
|
1551
|
+
}, {
|
|
1552
|
+
base: 'c',
|
|
1553
|
+
letters: "c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"
|
|
1554
|
+
}, {
|
|
1555
|
+
base: 'd',
|
|
1556
|
+
letters: "d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"
|
|
1557
|
+
}, {
|
|
1558
|
+
base: 'dz',
|
|
1559
|
+
letters: "\u01F3\u01C6"
|
|
1560
|
+
}, {
|
|
1561
|
+
base: 'e',
|
|
1562
|
+
letters: "e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"
|
|
1563
|
+
}, {
|
|
1564
|
+
base: 'f',
|
|
1565
|
+
letters: "f\u24D5\uFF46\u1E1F\u0192\uA77C"
|
|
1566
|
+
}, {
|
|
1567
|
+
base: 'g',
|
|
1568
|
+
letters: "g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"
|
|
1569
|
+
}, {
|
|
1570
|
+
base: 'h',
|
|
1571
|
+
letters: "h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"
|
|
1572
|
+
}, {
|
|
1573
|
+
base: 'hv',
|
|
1574
|
+
letters: "\u0195"
|
|
1575
|
+
}, {
|
|
1576
|
+
base: 'i',
|
|
1577
|
+
letters: "i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"
|
|
1578
|
+
}, {
|
|
1579
|
+
base: 'j',
|
|
1580
|
+
letters: "j\u24D9\uFF4A\u0135\u01F0\u0249"
|
|
1581
|
+
}, {
|
|
1582
|
+
base: 'k',
|
|
1583
|
+
letters: "k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"
|
|
1584
|
+
}, {
|
|
1585
|
+
base: 'l',
|
|
1586
|
+
letters: "l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"
|
|
1587
|
+
}, {
|
|
1588
|
+
base: 'lj',
|
|
1589
|
+
letters: "\u01C9"
|
|
1590
|
+
}, {
|
|
1591
|
+
base: 'm',
|
|
1592
|
+
letters: "m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"
|
|
1593
|
+
}, {
|
|
1594
|
+
base: 'n',
|
|
1595
|
+
letters: "n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"
|
|
1596
|
+
}, {
|
|
1597
|
+
base: 'nj',
|
|
1598
|
+
letters: "\u01CC"
|
|
1599
|
+
}, {
|
|
1600
|
+
base: 'o',
|
|
1601
|
+
letters: "o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"
|
|
1602
|
+
}, {
|
|
1603
|
+
base: 'oi',
|
|
1604
|
+
letters: "\u01A3"
|
|
1605
|
+
}, {
|
|
1606
|
+
base: 'ou',
|
|
1607
|
+
letters: "\u0223"
|
|
1608
|
+
}, {
|
|
1609
|
+
base: 'oo',
|
|
1610
|
+
letters: "\uA74F"
|
|
1611
|
+
}, {
|
|
1612
|
+
base: 'p',
|
|
1613
|
+
letters: "p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"
|
|
1614
|
+
}, {
|
|
1615
|
+
base: 'q',
|
|
1616
|
+
letters: "q\u24E0\uFF51\u024B\uA757\uA759"
|
|
1617
|
+
}, {
|
|
1618
|
+
base: 'r',
|
|
1619
|
+
letters: "r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"
|
|
1620
|
+
}, {
|
|
1621
|
+
base: 's',
|
|
1622
|
+
letters: "s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"
|
|
1623
|
+
}, {
|
|
1624
|
+
base: 't',
|
|
1625
|
+
letters: "t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"
|
|
1626
|
+
}, {
|
|
1627
|
+
base: 'tz',
|
|
1628
|
+
letters: "\uA729"
|
|
1629
|
+
}, {
|
|
1630
|
+
base: 'u',
|
|
1631
|
+
letters: "u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"
|
|
1632
|
+
}, {
|
|
1633
|
+
base: 'v',
|
|
1634
|
+
letters: "v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"
|
|
1635
|
+
}, {
|
|
1636
|
+
base: 'vy',
|
|
1637
|
+
letters: "\uA761"
|
|
1638
|
+
}, {
|
|
1639
|
+
base: 'w',
|
|
1640
|
+
letters: "w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"
|
|
1641
|
+
}, {
|
|
1642
|
+
base: 'x',
|
|
1643
|
+
letters: "x\u24E7\uFF58\u1E8B\u1E8D"
|
|
1644
|
+
}, {
|
|
1645
|
+
base: 'y',
|
|
1646
|
+
letters: "y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"
|
|
1647
|
+
}, {
|
|
1648
|
+
base: 'z',
|
|
1649
|
+
letters: "z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"
|
|
1650
|
+
}];
|
|
1651
|
+
|
|
1652
|
+
var initNeutraliser = function initNeutraliser() {
|
|
1653
|
+
for (var _i = 0, _defaultAccentsDiacri = defaultAccentsDiacritics; _i < _defaultAccentsDiacri.length; _i++) {
|
|
1654
|
+
var diacritic = _defaultAccentsDiacri[_i];
|
|
1655
|
+
var letters = diacritic.letters;
|
|
1656
|
+
|
|
1657
|
+
for (var i = 0; i < letters.length; i++) {
|
|
1658
|
+
diacriticsMap[letters[i]] = diacritic.base;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
/* eslint-disable no-control-regex */
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
var removeDiacritics = function removeDiacritics(str) {
|
|
1666
|
+
return str.replace(/[^\u0000-\u007E]/g, function (a) {
|
|
1667
|
+
return diacriticsMap[a] || a;
|
|
1668
|
+
});
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
$.extend($.fn.bootstrapTable.defaults, {
|
|
1672
|
+
searchAccentNeutralise: false
|
|
1673
|
+
});
|
|
1674
|
+
|
|
1675
|
+
$.BootstrapTable =
|
|
1676
|
+
/*#__PURE__*/
|
|
1677
|
+
function (_$$BootstrapTable) {
|
|
1678
|
+
_inherits(_class, _$$BootstrapTable);
|
|
1679
|
+
|
|
1680
|
+
function _class() {
|
|
1681
|
+
_classCallCheck(this, _class);
|
|
1682
|
+
|
|
1683
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
_createClass(_class, [{
|
|
1687
|
+
key: "init",
|
|
1688
|
+
value: function init() {
|
|
1689
|
+
if (this.options.searchAccentNeutralise) {
|
|
1690
|
+
initNeutraliser();
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
_get(_getPrototypeOf(_class.prototype), "init", this).call(this);
|
|
1694
|
+
}
|
|
1695
|
+
}, {
|
|
1696
|
+
key: "initSearch",
|
|
1697
|
+
value: function initSearch() {
|
|
1698
|
+
var _this = this;
|
|
1699
|
+
|
|
1700
|
+
if (this.options.sidePagination !== 'server') {
|
|
1701
|
+
var s = this.searchText && this.searchText.toLowerCase();
|
|
1702
|
+
var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns; // Check filter
|
|
1703
|
+
|
|
1704
|
+
this.data = f ? this.options.data.filter(function (item, i) {
|
|
1705
|
+
for (var key in f) {
|
|
1706
|
+
if (item[key] !== f[key]) {
|
|
1707
|
+
return false;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
return true;
|
|
1712
|
+
}) : this.options.data;
|
|
1713
|
+
this.data = s ? this.options.data.filter(function (item, i) {
|
|
1714
|
+
for (var _i2 = 0, _Object$entries = Object.entries(item); _i2 < _Object$entries.length; _i2++) {
|
|
1715
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
|
|
1716
|
+
key = _Object$entries$_i[0],
|
|
1717
|
+
value = _Object$entries$_i[1];
|
|
1718
|
+
|
|
1719
|
+
key = $.isNumeric(key) ? parseInt(key, 10) : key;
|
|
1720
|
+
var column = _this.columns[_this.fieldsColumnsIndex[key]];
|
|
1721
|
+
|
|
1722
|
+
var j = _this.header.fields.indexOf(key);
|
|
1723
|
+
|
|
1724
|
+
if (column && column.searchFormatter) {
|
|
1725
|
+
value = $.fn.bootstrapTable.utils.calculateObjectValue(column, _this.header.formatters[j], [value, item, i], value);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
var index = _this.header.fields.indexOf(key);
|
|
1729
|
+
|
|
1730
|
+
if (index !== -1 && _this.header.searchables[index] && typeof value === 'string') {
|
|
1731
|
+
if (_this.options.searchAccentNeutralise) {
|
|
1732
|
+
value = removeDiacritics(value);
|
|
1733
|
+
s = removeDiacritics(s);
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
if (_this.options.strictSearch) {
|
|
1737
|
+
if ("".concat(value).toLowerCase() === s) {
|
|
1738
|
+
return true;
|
|
1739
|
+
}
|
|
1740
|
+
} else {
|
|
1741
|
+
if ("".concat(value).toLowerCase().includes(s)) {
|
|
1742
|
+
return true;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
return false;
|
|
1749
|
+
}) : this.data;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
}]);
|
|
1753
|
+
|
|
1754
|
+
return _class;
|
|
1755
|
+
}($.BootstrapTable);
|
|
1756
|
+
|
|
1757
|
+
}));
|