bootstrap-table-rails 1.15.5 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +143 -36
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +1012 -83
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +684 -208
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +686 -210
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +75 -12
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1617 -763
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +280 -93
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +200 -78
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1349 -258
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +216 -77
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1198 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1219 -208
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +458 -204
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +1420 -901
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2361 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +589 -423
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +552 -487
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +3 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +219 -74
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +143 -66
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +326 -462
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +137 -65
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +87 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +452 -155
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +643 -255
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +348 -136
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +84 -44
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +218 -76
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +558 -217
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +221 -115
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +777 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +120 -63
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +113 -57
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +102 -45
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +776 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1049 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.eot +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.svg +28 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.ttf +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +89 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +161 -63
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +88 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +166 -65
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +83 -11
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +164 -66
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +89 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +164 -66
- metadata +10 -5
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +0 -1757
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +0 -12
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +0 -2087
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js
DELETED
@@ -1,2087 +0,0 @@
|
|
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 nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
524
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
525
|
-
// eslint-disable-next-line no-undef
|
526
|
-
return !String(Symbol());
|
527
|
-
});
|
528
|
-
|
529
|
-
// `IsArray` abstract operation
|
530
|
-
// https://tc39.github.io/ecma262/#sec-isarray
|
531
|
-
var isArray = Array.isArray || function isArray(arg) {
|
532
|
-
return classofRaw(arg) == 'Array';
|
533
|
-
};
|
534
|
-
|
535
|
-
// `ToObject` abstract operation
|
536
|
-
// https://tc39.github.io/ecma262/#sec-toobject
|
537
|
-
var toObject = function (argument) {
|
538
|
-
return Object(requireObjectCoercible(argument));
|
539
|
-
};
|
540
|
-
|
541
|
-
// `Object.keys` method
|
542
|
-
// https://tc39.github.io/ecma262/#sec-object.keys
|
543
|
-
var objectKeys = Object.keys || function keys(O) {
|
544
|
-
return objectKeysInternal(O, enumBugKeys);
|
545
|
-
};
|
546
|
-
|
547
|
-
// `Object.defineProperties` method
|
548
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
549
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
550
|
-
anObject(O);
|
551
|
-
var keys = objectKeys(Properties);
|
552
|
-
var length = keys.length;
|
553
|
-
var index = 0;
|
554
|
-
var key;
|
555
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
556
|
-
return O;
|
557
|
-
};
|
558
|
-
|
559
|
-
var html = getBuiltIn('document', 'documentElement');
|
560
|
-
|
561
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
562
|
-
|
563
|
-
var PROTOTYPE = 'prototype';
|
564
|
-
var Empty = function () { /* empty */ };
|
565
|
-
|
566
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
567
|
-
var createDict = function () {
|
568
|
-
// Thrash, waste and sodomy: IE GC bug
|
569
|
-
var iframe = documentCreateElement('iframe');
|
570
|
-
var length = enumBugKeys.length;
|
571
|
-
var lt = '<';
|
572
|
-
var script = 'script';
|
573
|
-
var gt = '>';
|
574
|
-
var js = 'java' + script + ':';
|
575
|
-
var iframeDocument;
|
576
|
-
iframe.style.display = 'none';
|
577
|
-
html.appendChild(iframe);
|
578
|
-
iframe.src = String(js);
|
579
|
-
iframeDocument = iframe.contentWindow.document;
|
580
|
-
iframeDocument.open();
|
581
|
-
iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
|
582
|
-
iframeDocument.close();
|
583
|
-
createDict = iframeDocument.F;
|
584
|
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
585
|
-
return createDict();
|
586
|
-
};
|
587
|
-
|
588
|
-
// `Object.create` method
|
589
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
590
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
591
|
-
var result;
|
592
|
-
if (O !== null) {
|
593
|
-
Empty[PROTOTYPE] = anObject(O);
|
594
|
-
result = new Empty();
|
595
|
-
Empty[PROTOTYPE] = null;
|
596
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
597
|
-
result[IE_PROTO] = O;
|
598
|
-
} else result = createDict();
|
599
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
600
|
-
};
|
601
|
-
|
602
|
-
hiddenKeys[IE_PROTO] = true;
|
603
|
-
|
604
|
-
var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
|
605
|
-
|
606
|
-
var toString$1 = {}.toString;
|
607
|
-
|
608
|
-
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
609
|
-
? Object.getOwnPropertyNames(window) : [];
|
610
|
-
|
611
|
-
var getWindowNames = function (it) {
|
612
|
-
try {
|
613
|
-
return nativeGetOwnPropertyNames(it);
|
614
|
-
} catch (error) {
|
615
|
-
return windowNames.slice();
|
616
|
-
}
|
617
|
-
};
|
618
|
-
|
619
|
-
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
620
|
-
var f$5 = function getOwnPropertyNames(it) {
|
621
|
-
return windowNames && toString$1.call(it) == '[object Window]'
|
622
|
-
? getWindowNames(it)
|
623
|
-
: nativeGetOwnPropertyNames(toIndexedObject(it));
|
624
|
-
};
|
625
|
-
|
626
|
-
var objectGetOwnPropertyNamesExternal = {
|
627
|
-
f: f$5
|
628
|
-
};
|
629
|
-
|
630
|
-
var Symbol$1 = global_1.Symbol;
|
631
|
-
var store$1 = shared('wks');
|
632
|
-
|
633
|
-
var wellKnownSymbol = function (name) {
|
634
|
-
return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
|
635
|
-
|| (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
|
636
|
-
};
|
637
|
-
|
638
|
-
var f$6 = wellKnownSymbol;
|
639
|
-
|
640
|
-
var wrappedWellKnownSymbol = {
|
641
|
-
f: f$6
|
642
|
-
};
|
643
|
-
|
644
|
-
var defineProperty = objectDefineProperty.f;
|
645
|
-
|
646
|
-
var defineWellKnownSymbol = function (NAME) {
|
647
|
-
var Symbol = path.Symbol || (path.Symbol = {});
|
648
|
-
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
649
|
-
value: wrappedWellKnownSymbol.f(NAME)
|
650
|
-
});
|
651
|
-
};
|
652
|
-
|
653
|
-
var defineProperty$1 = objectDefineProperty.f;
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
658
|
-
|
659
|
-
var setToStringTag = function (it, TAG, STATIC) {
|
660
|
-
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
661
|
-
defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
662
|
-
}
|
663
|
-
};
|
664
|
-
|
665
|
-
var aFunction$1 = function (it) {
|
666
|
-
if (typeof it != 'function') {
|
667
|
-
throw TypeError(String(it) + ' is not a function');
|
668
|
-
} return it;
|
669
|
-
};
|
670
|
-
|
671
|
-
// optional / simple context binding
|
672
|
-
var bindContext = function (fn, that, length) {
|
673
|
-
aFunction$1(fn);
|
674
|
-
if (that === undefined) return fn;
|
675
|
-
switch (length) {
|
676
|
-
case 0: return function () {
|
677
|
-
return fn.call(that);
|
678
|
-
};
|
679
|
-
case 1: return function (a) {
|
680
|
-
return fn.call(that, a);
|
681
|
-
};
|
682
|
-
case 2: return function (a, b) {
|
683
|
-
return fn.call(that, a, b);
|
684
|
-
};
|
685
|
-
case 3: return function (a, b, c) {
|
686
|
-
return fn.call(that, a, b, c);
|
687
|
-
};
|
688
|
-
}
|
689
|
-
return function (/* ...args */) {
|
690
|
-
return fn.apply(that, arguments);
|
691
|
-
};
|
692
|
-
};
|
693
|
-
|
694
|
-
var SPECIES = wellKnownSymbol('species');
|
695
|
-
|
696
|
-
// `ArraySpeciesCreate` abstract operation
|
697
|
-
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
698
|
-
var arraySpeciesCreate = function (originalArray, length) {
|
699
|
-
var C;
|
700
|
-
if (isArray(originalArray)) {
|
701
|
-
C = originalArray.constructor;
|
702
|
-
// cross-realm fallback
|
703
|
-
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
704
|
-
else if (isObject(C)) {
|
705
|
-
C = C[SPECIES];
|
706
|
-
if (C === null) C = undefined;
|
707
|
-
}
|
708
|
-
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
709
|
-
};
|
710
|
-
|
711
|
-
var push = [].push;
|
712
|
-
|
713
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
714
|
-
var createMethod$1 = function (TYPE) {
|
715
|
-
var IS_MAP = TYPE == 1;
|
716
|
-
var IS_FILTER = TYPE == 2;
|
717
|
-
var IS_SOME = TYPE == 3;
|
718
|
-
var IS_EVERY = TYPE == 4;
|
719
|
-
var IS_FIND_INDEX = TYPE == 6;
|
720
|
-
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
721
|
-
return function ($this, callbackfn, that, specificCreate) {
|
722
|
-
var O = toObject($this);
|
723
|
-
var self = indexedObject(O);
|
724
|
-
var boundFunction = bindContext(callbackfn, that, 3);
|
725
|
-
var length = toLength(self.length);
|
726
|
-
var index = 0;
|
727
|
-
var create = specificCreate || arraySpeciesCreate;
|
728
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
729
|
-
var value, result;
|
730
|
-
for (;length > index; index++) if (NO_HOLES || index in self) {
|
731
|
-
value = self[index];
|
732
|
-
result = boundFunction(value, index, O);
|
733
|
-
if (TYPE) {
|
734
|
-
if (IS_MAP) target[index] = result; // map
|
735
|
-
else if (result) switch (TYPE) {
|
736
|
-
case 3: return true; // some
|
737
|
-
case 5: return value; // find
|
738
|
-
case 6: return index; // findIndex
|
739
|
-
case 2: push.call(target, value); // filter
|
740
|
-
} else if (IS_EVERY) return false; // every
|
741
|
-
}
|
742
|
-
}
|
743
|
-
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
744
|
-
};
|
745
|
-
};
|
746
|
-
|
747
|
-
var arrayIteration = {
|
748
|
-
// `Array.prototype.forEach` method
|
749
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
750
|
-
forEach: createMethod$1(0),
|
751
|
-
// `Array.prototype.map` method
|
752
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
753
|
-
map: createMethod$1(1),
|
754
|
-
// `Array.prototype.filter` method
|
755
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
756
|
-
filter: createMethod$1(2),
|
757
|
-
// `Array.prototype.some` method
|
758
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
759
|
-
some: createMethod$1(3),
|
760
|
-
// `Array.prototype.every` method
|
761
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
762
|
-
every: createMethod$1(4),
|
763
|
-
// `Array.prototype.find` method
|
764
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
765
|
-
find: createMethod$1(5),
|
766
|
-
// `Array.prototype.findIndex` method
|
767
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
768
|
-
findIndex: createMethod$1(6)
|
769
|
-
};
|
770
|
-
|
771
|
-
var $forEach = arrayIteration.forEach;
|
772
|
-
|
773
|
-
var HIDDEN = sharedKey('hidden');
|
774
|
-
var SYMBOL = 'Symbol';
|
775
|
-
var PROTOTYPE$1 = 'prototype';
|
776
|
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
777
|
-
var setInternalState = internalState.set;
|
778
|
-
var getInternalState = internalState.getterFor(SYMBOL);
|
779
|
-
var ObjectPrototype = Object[PROTOTYPE$1];
|
780
|
-
var $Symbol = global_1.Symbol;
|
781
|
-
var JSON = global_1.JSON;
|
782
|
-
var nativeJSONStringify = JSON && JSON.stringify;
|
783
|
-
var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
784
|
-
var nativeDefineProperty$1 = objectDefineProperty.f;
|
785
|
-
var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
|
786
|
-
var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
|
787
|
-
var AllSymbols = shared('symbols');
|
788
|
-
var ObjectPrototypeSymbols = shared('op-symbols');
|
789
|
-
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
790
|
-
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
791
|
-
var WellKnownSymbolsStore = shared('wks');
|
792
|
-
var QObject = global_1.QObject;
|
793
|
-
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
794
|
-
var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
|
795
|
-
|
796
|
-
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
797
|
-
var setSymbolDescriptor = descriptors && fails(function () {
|
798
|
-
return objectCreate(nativeDefineProperty$1({}, 'a', {
|
799
|
-
get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
|
800
|
-
})).a != 7;
|
801
|
-
}) ? function (O, P, Attributes) {
|
802
|
-
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
|
803
|
-
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
804
|
-
nativeDefineProperty$1(O, P, Attributes);
|
805
|
-
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
806
|
-
nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
807
|
-
}
|
808
|
-
} : nativeDefineProperty$1;
|
809
|
-
|
810
|
-
var wrap = function (tag, description) {
|
811
|
-
var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
|
812
|
-
setInternalState(symbol, {
|
813
|
-
type: SYMBOL,
|
814
|
-
tag: tag,
|
815
|
-
description: description
|
816
|
-
});
|
817
|
-
if (!descriptors) symbol.description = description;
|
818
|
-
return symbol;
|
819
|
-
};
|
820
|
-
|
821
|
-
var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
822
|
-
return typeof it == 'symbol';
|
823
|
-
} : function (it) {
|
824
|
-
return Object(it) instanceof $Symbol;
|
825
|
-
};
|
826
|
-
|
827
|
-
var $defineProperty = function defineProperty(O, P, Attributes) {
|
828
|
-
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
829
|
-
anObject(O);
|
830
|
-
var key = toPrimitive(P, true);
|
831
|
-
anObject(Attributes);
|
832
|
-
if (has(AllSymbols, key)) {
|
833
|
-
if (!Attributes.enumerable) {
|
834
|
-
if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
|
835
|
-
O[HIDDEN][key] = true;
|
836
|
-
} else {
|
837
|
-
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
838
|
-
Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
839
|
-
} return setSymbolDescriptor(O, key, Attributes);
|
840
|
-
} return nativeDefineProperty$1(O, key, Attributes);
|
841
|
-
};
|
842
|
-
|
843
|
-
var $defineProperties = function defineProperties(O, Properties) {
|
844
|
-
anObject(O);
|
845
|
-
var properties = toIndexedObject(Properties);
|
846
|
-
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
847
|
-
$forEach(keys, function (key) {
|
848
|
-
if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
|
849
|
-
});
|
850
|
-
return O;
|
851
|
-
};
|
852
|
-
|
853
|
-
var $create = function create(O, Properties) {
|
854
|
-
return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
|
855
|
-
};
|
856
|
-
|
857
|
-
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
858
|
-
var P = toPrimitive(V, true);
|
859
|
-
var enumerable = nativePropertyIsEnumerable$1.call(this, P);
|
860
|
-
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
|
861
|
-
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
|
862
|
-
};
|
863
|
-
|
864
|
-
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
865
|
-
var it = toIndexedObject(O);
|
866
|
-
var key = toPrimitive(P, true);
|
867
|
-
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
|
868
|
-
var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
|
869
|
-
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
|
870
|
-
descriptor.enumerable = true;
|
871
|
-
}
|
872
|
-
return descriptor;
|
873
|
-
};
|
874
|
-
|
875
|
-
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
876
|
-
var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
|
877
|
-
var result = [];
|
878
|
-
$forEach(names, function (key) {
|
879
|
-
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
|
880
|
-
});
|
881
|
-
return result;
|
882
|
-
};
|
883
|
-
|
884
|
-
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
|
885
|
-
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
886
|
-
var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
887
|
-
var result = [];
|
888
|
-
$forEach(names, function (key) {
|
889
|
-
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
|
890
|
-
result.push(AllSymbols[key]);
|
891
|
-
}
|
892
|
-
});
|
893
|
-
return result;
|
894
|
-
};
|
895
|
-
|
896
|
-
// `Symbol` constructor
|
897
|
-
// https://tc39.github.io/ecma262/#sec-symbol-constructor
|
898
|
-
if (!nativeSymbol) {
|
899
|
-
$Symbol = function Symbol() {
|
900
|
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
901
|
-
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
|
902
|
-
var tag = uid(description);
|
903
|
-
var setter = function (value) {
|
904
|
-
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
|
905
|
-
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
906
|
-
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
907
|
-
};
|
908
|
-
if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
909
|
-
return wrap(tag, description);
|
910
|
-
};
|
911
|
-
|
912
|
-
redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
|
913
|
-
return getInternalState(this).tag;
|
914
|
-
});
|
915
|
-
|
916
|
-
objectPropertyIsEnumerable.f = $propertyIsEnumerable;
|
917
|
-
objectDefineProperty.f = $defineProperty;
|
918
|
-
objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
|
919
|
-
objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
920
|
-
objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
|
921
|
-
|
922
|
-
if (descriptors) {
|
923
|
-
// https://github.com/tc39/proposal-Symbol-description
|
924
|
-
nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
|
925
|
-
configurable: true,
|
926
|
-
get: function description() {
|
927
|
-
return getInternalState(this).description;
|
928
|
-
}
|
929
|
-
});
|
930
|
-
{
|
931
|
-
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
932
|
-
}
|
933
|
-
}
|
934
|
-
|
935
|
-
wrappedWellKnownSymbol.f = function (name) {
|
936
|
-
return wrap(wellKnownSymbol(name), name);
|
937
|
-
};
|
938
|
-
}
|
939
|
-
|
940
|
-
_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
|
941
|
-
Symbol: $Symbol
|
942
|
-
});
|
943
|
-
|
944
|
-
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
|
945
|
-
defineWellKnownSymbol(name);
|
946
|
-
});
|
947
|
-
|
948
|
-
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
949
|
-
// `Symbol.for` method
|
950
|
-
// https://tc39.github.io/ecma262/#sec-symbol.for
|
951
|
-
'for': function (key) {
|
952
|
-
var string = String(key);
|
953
|
-
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
954
|
-
var symbol = $Symbol(string);
|
955
|
-
StringToSymbolRegistry[string] = symbol;
|
956
|
-
SymbolToStringRegistry[symbol] = string;
|
957
|
-
return symbol;
|
958
|
-
},
|
959
|
-
// `Symbol.keyFor` method
|
960
|
-
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
|
961
|
-
keyFor: function keyFor(sym) {
|
962
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
963
|
-
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
964
|
-
},
|
965
|
-
useSetter: function () { USE_SETTER = true; },
|
966
|
-
useSimple: function () { USE_SETTER = false; }
|
967
|
-
});
|
968
|
-
|
969
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
970
|
-
// `Object.create` method
|
971
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
972
|
-
create: $create,
|
973
|
-
// `Object.defineProperty` method
|
974
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
975
|
-
defineProperty: $defineProperty,
|
976
|
-
// `Object.defineProperties` method
|
977
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
978
|
-
defineProperties: $defineProperties,
|
979
|
-
// `Object.getOwnPropertyDescriptor` method
|
980
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
|
981
|
-
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
982
|
-
});
|
983
|
-
|
984
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
985
|
-
// `Object.getOwnPropertyNames` method
|
986
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
987
|
-
getOwnPropertyNames: $getOwnPropertyNames,
|
988
|
-
// `Object.getOwnPropertySymbols` method
|
989
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
|
990
|
-
getOwnPropertySymbols: $getOwnPropertySymbols
|
991
|
-
});
|
992
|
-
|
993
|
-
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
994
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
995
|
-
_export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
|
996
|
-
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
997
|
-
return objectGetOwnPropertySymbols.f(toObject(it));
|
998
|
-
}
|
999
|
-
});
|
1000
|
-
|
1001
|
-
// `JSON.stringify` method behavior with symbols
|
1002
|
-
// https://tc39.github.io/ecma262/#sec-json.stringify
|
1003
|
-
JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
|
1004
|
-
var symbol = $Symbol();
|
1005
|
-
// MS Edge converts symbol values to JSON as {}
|
1006
|
-
return nativeJSONStringify([symbol]) != '[null]'
|
1007
|
-
// WebKit converts symbol values to JSON as null
|
1008
|
-
|| nativeJSONStringify({ a: symbol }) != '{}'
|
1009
|
-
// V8 throws on boxed symbols
|
1010
|
-
|| nativeJSONStringify(Object(symbol)) != '{}';
|
1011
|
-
}) }, {
|
1012
|
-
stringify: function stringify(it) {
|
1013
|
-
var args = [it];
|
1014
|
-
var index = 1;
|
1015
|
-
var replacer, $replacer;
|
1016
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
1017
|
-
$replacer = replacer = args[1];
|
1018
|
-
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
1019
|
-
if (!isArray(replacer)) replacer = function (key, value) {
|
1020
|
-
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
1021
|
-
if (!isSymbol(value)) return value;
|
1022
|
-
};
|
1023
|
-
args[1] = replacer;
|
1024
|
-
return nativeJSONStringify.apply(JSON, args);
|
1025
|
-
}
|
1026
|
-
});
|
1027
|
-
|
1028
|
-
// `Symbol.prototype[@@toPrimitive]` method
|
1029
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
1030
|
-
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
1031
|
-
// `Symbol.prototype[@@toStringTag]` property
|
1032
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
1033
|
-
setToStringTag($Symbol, SYMBOL);
|
1034
|
-
|
1035
|
-
hiddenKeys[HIDDEN] = true;
|
1036
|
-
|
1037
|
-
var defineProperty$2 = objectDefineProperty.f;
|
1038
|
-
|
1039
|
-
|
1040
|
-
var NativeSymbol = global_1.Symbol;
|
1041
|
-
|
1042
|
-
if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
|
1043
|
-
// Safari 12 bug
|
1044
|
-
NativeSymbol().description !== undefined
|
1045
|
-
)) {
|
1046
|
-
var EmptyStringDescriptionStore = {};
|
1047
|
-
// wrap Symbol constructor for correct work with undefined description
|
1048
|
-
var SymbolWrapper = function Symbol() {
|
1049
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
|
1050
|
-
var result = this instanceof SymbolWrapper
|
1051
|
-
? new NativeSymbol(description)
|
1052
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
1053
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
1054
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
1055
|
-
return result;
|
1056
|
-
};
|
1057
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
1058
|
-
var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
|
1059
|
-
symbolPrototype.constructor = SymbolWrapper;
|
1060
|
-
|
1061
|
-
var symbolToString = symbolPrototype.toString;
|
1062
|
-
var native = String(NativeSymbol('test')) == 'Symbol(test)';
|
1063
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
1064
|
-
defineProperty$2(symbolPrototype, 'description', {
|
1065
|
-
configurable: true,
|
1066
|
-
get: function description() {
|
1067
|
-
var symbol = isObject(this) ? this.valueOf() : this;
|
1068
|
-
var string = symbolToString.call(symbol);
|
1069
|
-
if (has(EmptyStringDescriptionStore, symbol)) return '';
|
1070
|
-
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
|
1071
|
-
return desc === '' ? undefined : desc;
|
1072
|
-
}
|
1073
|
-
});
|
1074
|
-
|
1075
|
-
_export({ global: true, forced: true }, {
|
1076
|
-
Symbol: SymbolWrapper
|
1077
|
-
});
|
1078
|
-
}
|
1079
|
-
|
1080
|
-
// `Symbol.iterator` well-known symbol
|
1081
|
-
// https://tc39.github.io/ecma262/#sec-symbol.iterator
|
1082
|
-
defineWellKnownSymbol('iterator');
|
1083
|
-
|
1084
|
-
var createProperty = function (object, key, value) {
|
1085
|
-
var propertyKey = toPrimitive(key);
|
1086
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1087
|
-
else object[propertyKey] = value;
|
1088
|
-
};
|
1089
|
-
|
1090
|
-
var SPECIES$1 = wellKnownSymbol('species');
|
1091
|
-
|
1092
|
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
1093
|
-
return !fails(function () {
|
1094
|
-
var array = [];
|
1095
|
-
var constructor = array.constructor = {};
|
1096
|
-
constructor[SPECIES$1] = function () {
|
1097
|
-
return { foo: 1 };
|
1098
|
-
};
|
1099
|
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
1100
|
-
});
|
1101
|
-
};
|
1102
|
-
|
1103
|
-
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1104
|
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1105
|
-
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1106
|
-
|
1107
|
-
var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
|
1108
|
-
var array = [];
|
1109
|
-
array[IS_CONCAT_SPREADABLE] = false;
|
1110
|
-
return array.concat()[0] !== array;
|
1111
|
-
});
|
1112
|
-
|
1113
|
-
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
1114
|
-
|
1115
|
-
var isConcatSpreadable = function (O) {
|
1116
|
-
if (!isObject(O)) return false;
|
1117
|
-
var spreadable = O[IS_CONCAT_SPREADABLE];
|
1118
|
-
return spreadable !== undefined ? !!spreadable : isArray(O);
|
1119
|
-
};
|
1120
|
-
|
1121
|
-
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
1122
|
-
|
1123
|
-
// `Array.prototype.concat` method
|
1124
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
1125
|
-
// with adding support of @@isConcatSpreadable and @@species
|
1126
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
1127
|
-
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
1128
|
-
var O = toObject(this);
|
1129
|
-
var A = arraySpeciesCreate(O, 0);
|
1130
|
-
var n = 0;
|
1131
|
-
var i, k, length, len, E;
|
1132
|
-
for (i = -1, length = arguments.length; i < length; i++) {
|
1133
|
-
E = i === -1 ? O : arguments[i];
|
1134
|
-
if (isConcatSpreadable(E)) {
|
1135
|
-
len = toLength(E.length);
|
1136
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1137
|
-
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1138
|
-
} else {
|
1139
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1140
|
-
createProperty(A, n++, E);
|
1141
|
-
}
|
1142
|
-
}
|
1143
|
-
A.length = n;
|
1144
|
-
return A;
|
1145
|
-
}
|
1146
|
-
});
|
1147
|
-
|
1148
|
-
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
1149
|
-
var ArrayPrototype = Array.prototype;
|
1150
|
-
|
1151
|
-
// Array.prototype[@@unscopables]
|
1152
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1153
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
1154
|
-
hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
|
1155
|
-
}
|
1156
|
-
|
1157
|
-
// add a key to Array.prototype[@@unscopables]
|
1158
|
-
var addToUnscopables = function (key) {
|
1159
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
1160
|
-
};
|
1161
|
-
|
1162
|
-
var $find = arrayIteration.find;
|
1163
|
-
|
1164
|
-
|
1165
|
-
var FIND = 'find';
|
1166
|
-
var SKIPS_HOLES = true;
|
1167
|
-
|
1168
|
-
// Shouldn't skip holes
|
1169
|
-
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
1170
|
-
|
1171
|
-
// `Array.prototype.find` method
|
1172
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
1173
|
-
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
1174
|
-
find: function find(callbackfn /* , that = undefined */) {
|
1175
|
-
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1176
|
-
}
|
1177
|
-
});
|
1178
|
-
|
1179
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1180
|
-
addToUnscopables(FIND);
|
1181
|
-
|
1182
|
-
var correctPrototypeGetter = !fails(function () {
|
1183
|
-
function F() { /* empty */ }
|
1184
|
-
F.prototype.constructor = null;
|
1185
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
1186
|
-
});
|
1187
|
-
|
1188
|
-
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
1189
|
-
var ObjectPrototype$1 = Object.prototype;
|
1190
|
-
|
1191
|
-
// `Object.getPrototypeOf` method
|
1192
|
-
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
1193
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
1194
|
-
O = toObject(O);
|
1195
|
-
if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
|
1196
|
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
1197
|
-
return O.constructor.prototype;
|
1198
|
-
} return O instanceof Object ? ObjectPrototype$1 : null;
|
1199
|
-
};
|
1200
|
-
|
1201
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
1202
|
-
var BUGGY_SAFARI_ITERATORS = false;
|
1203
|
-
|
1204
|
-
var returnThis = function () { return this; };
|
1205
|
-
|
1206
|
-
// `%IteratorPrototype%` object
|
1207
|
-
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
1208
|
-
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
1209
|
-
|
1210
|
-
if ([].keys) {
|
1211
|
-
arrayIterator = [].keys();
|
1212
|
-
// Safari 8 has buggy iterators w/o `next`
|
1213
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
|
1214
|
-
else {
|
1215
|
-
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
1216
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
1217
|
-
}
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
if (IteratorPrototype == undefined) IteratorPrototype = {};
|
1221
|
-
|
1222
|
-
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
1223
|
-
if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
|
1224
|
-
|
1225
|
-
var iteratorsCore = {
|
1226
|
-
IteratorPrototype: IteratorPrototype,
|
1227
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
1228
|
-
};
|
1229
|
-
|
1230
|
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
1231
|
-
|
1232
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
1233
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
1234
|
-
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
|
1235
|
-
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
1236
|
-
return IteratorConstructor;
|
1237
|
-
};
|
1238
|
-
|
1239
|
-
var aPossiblePrototype = function (it) {
|
1240
|
-
if (!isObject(it) && it !== null) {
|
1241
|
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
1242
|
-
} return it;
|
1243
|
-
};
|
1244
|
-
|
1245
|
-
// `Object.setPrototypeOf` method
|
1246
|
-
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
1247
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
1248
|
-
/* eslint-disable no-proto */
|
1249
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
1250
|
-
var CORRECT_SETTER = false;
|
1251
|
-
var test = {};
|
1252
|
-
var setter;
|
1253
|
-
try {
|
1254
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
1255
|
-
setter.call(test, []);
|
1256
|
-
CORRECT_SETTER = test instanceof Array;
|
1257
|
-
} catch (error) { /* empty */ }
|
1258
|
-
return function setPrototypeOf(O, proto) {
|
1259
|
-
anObject(O);
|
1260
|
-
aPossiblePrototype(proto);
|
1261
|
-
if (CORRECT_SETTER) setter.call(O, proto);
|
1262
|
-
else O.__proto__ = proto;
|
1263
|
-
return O;
|
1264
|
-
};
|
1265
|
-
}() : undefined);
|
1266
|
-
|
1267
|
-
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
1268
|
-
var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
1269
|
-
var ITERATOR$1 = wellKnownSymbol('iterator');
|
1270
|
-
var KEYS = 'keys';
|
1271
|
-
var VALUES = 'values';
|
1272
|
-
var ENTRIES = 'entries';
|
1273
|
-
|
1274
|
-
var returnThis$1 = function () { return this; };
|
1275
|
-
|
1276
|
-
var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
1277
|
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
1278
|
-
|
1279
|
-
var getIterationMethod = function (KIND) {
|
1280
|
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
1281
|
-
if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
|
1282
|
-
switch (KIND) {
|
1283
|
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
1284
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
1285
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
1286
|
-
} return function () { return new IteratorConstructor(this); };
|
1287
|
-
};
|
1288
|
-
|
1289
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
1290
|
-
var INCORRECT_VALUES_NAME = false;
|
1291
|
-
var IterablePrototype = Iterable.prototype;
|
1292
|
-
var nativeIterator = IterablePrototype[ITERATOR$1]
|
1293
|
-
|| IterablePrototype['@@iterator']
|
1294
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
1295
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
|
1296
|
-
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
1297
|
-
var CurrentIteratorPrototype, methods, KEY;
|
1298
|
-
|
1299
|
-
// fix native
|
1300
|
-
if (anyNativeIterator) {
|
1301
|
-
CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
|
1302
|
-
if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
|
1303
|
-
if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
1304
|
-
if (objectSetPrototypeOf) {
|
1305
|
-
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
1306
|
-
} else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
|
1307
|
-
hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
1308
|
-
}
|
1309
|
-
}
|
1310
|
-
// Set @@toStringTag to native iterators
|
1311
|
-
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
1312
|
-
}
|
1313
|
-
}
|
1314
|
-
|
1315
|
-
// fix Array#{values, @@iterator}.name in V8 / FF
|
1316
|
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
1317
|
-
INCORRECT_VALUES_NAME = true;
|
1318
|
-
defaultIterator = function values() { return nativeIterator.call(this); };
|
1319
|
-
}
|
1320
|
-
|
1321
|
-
// define iterator
|
1322
|
-
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
1323
|
-
hide(IterablePrototype, ITERATOR$1, defaultIterator);
|
1324
|
-
}
|
1325
|
-
|
1326
|
-
// export additional methods
|
1327
|
-
if (DEFAULT) {
|
1328
|
-
methods = {
|
1329
|
-
values: getIterationMethod(VALUES),
|
1330
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
1331
|
-
entries: getIterationMethod(ENTRIES)
|
1332
|
-
};
|
1333
|
-
if (FORCED) for (KEY in methods) {
|
1334
|
-
if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
1335
|
-
redefine(IterablePrototype, KEY, methods[KEY]);
|
1336
|
-
}
|
1337
|
-
} else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
return methods;
|
1341
|
-
};
|
1342
|
-
|
1343
|
-
var ARRAY_ITERATOR = 'Array Iterator';
|
1344
|
-
var setInternalState$1 = internalState.set;
|
1345
|
-
var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
|
1346
|
-
|
1347
|
-
// `Array.prototype.entries` method
|
1348
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
1349
|
-
// `Array.prototype.keys` method
|
1350
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
1351
|
-
// `Array.prototype.values` method
|
1352
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.values
|
1353
|
-
// `Array.prototype[@@iterator]` method
|
1354
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
|
1355
|
-
// `CreateArrayIterator` internal method
|
1356
|
-
// https://tc39.github.io/ecma262/#sec-createarrayiterator
|
1357
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
1358
|
-
setInternalState$1(this, {
|
1359
|
-
type: ARRAY_ITERATOR,
|
1360
|
-
target: toIndexedObject(iterated), // target
|
1361
|
-
index: 0, // next index
|
1362
|
-
kind: kind // kind
|
1363
|
-
});
|
1364
|
-
// `%ArrayIteratorPrototype%.next` method
|
1365
|
-
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
|
1366
|
-
}, function () {
|
1367
|
-
var state = getInternalState$1(this);
|
1368
|
-
var target = state.target;
|
1369
|
-
var kind = state.kind;
|
1370
|
-
var index = state.index++;
|
1371
|
-
if (!target || index >= target.length) {
|
1372
|
-
state.target = undefined;
|
1373
|
-
return { value: undefined, done: true };
|
1374
|
-
}
|
1375
|
-
if (kind == 'keys') return { value: index, done: false };
|
1376
|
-
if (kind == 'values') return { value: target[index], done: false };
|
1377
|
-
return { value: [index, target[index]], done: false };
|
1378
|
-
}, 'values');
|
1379
|
-
|
1380
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1381
|
-
addToUnscopables('keys');
|
1382
|
-
addToUnscopables('values');
|
1383
|
-
addToUnscopables('entries');
|
1384
|
-
|
1385
|
-
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
1386
|
-
var method = [][METHOD_NAME];
|
1387
|
-
return !method || !fails(function () {
|
1388
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal
|
1389
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
1390
|
-
});
|
1391
|
-
};
|
1392
|
-
|
1393
|
-
var nativeJoin = [].join;
|
1394
|
-
|
1395
|
-
var ES3_STRINGS = indexedObject != Object;
|
1396
|
-
var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
|
1397
|
-
|
1398
|
-
// `Array.prototype.join` method
|
1399
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
1400
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
|
1401
|
-
join: function join(separator) {
|
1402
|
-
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
1403
|
-
}
|
1404
|
-
});
|
1405
|
-
|
1406
|
-
var SPECIES$2 = wellKnownSymbol('species');
|
1407
|
-
var nativeSlice = [].slice;
|
1408
|
-
var max$1 = Math.max;
|
1409
|
-
|
1410
|
-
// `Array.prototype.slice` method
|
1411
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
|
1412
|
-
// fallback for not array-like ES3 strings and DOM objects
|
1413
|
-
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
|
1414
|
-
slice: function slice(start, end) {
|
1415
|
-
var O = toIndexedObject(this);
|
1416
|
-
var length = toLength(O.length);
|
1417
|
-
var k = toAbsoluteIndex(start, length);
|
1418
|
-
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
1419
|
-
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
1420
|
-
var Constructor, result, n;
|
1421
|
-
if (isArray(O)) {
|
1422
|
-
Constructor = O.constructor;
|
1423
|
-
// cross-realm fallback
|
1424
|
-
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
|
1425
|
-
Constructor = undefined;
|
1426
|
-
} else if (isObject(Constructor)) {
|
1427
|
-
Constructor = Constructor[SPECIES$2];
|
1428
|
-
if (Constructor === null) Constructor = undefined;
|
1429
|
-
}
|
1430
|
-
if (Constructor === Array || Constructor === undefined) {
|
1431
|
-
return nativeSlice.call(O, k, fin);
|
1432
|
-
}
|
1433
|
-
}
|
1434
|
-
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
|
1435
|
-
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
1436
|
-
result.length = n;
|
1437
|
-
return result;
|
1438
|
-
}
|
1439
|
-
});
|
1440
|
-
|
1441
|
-
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1442
|
-
// ES3 wrong here
|
1443
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1444
|
-
|
1445
|
-
// fallback for IE11 Script Access Denied error
|
1446
|
-
var tryGet = function (it, key) {
|
1447
|
-
try {
|
1448
|
-
return it[key];
|
1449
|
-
} catch (error) { /* empty */ }
|
1450
|
-
};
|
1451
|
-
|
1452
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
1453
|
-
var classof = function (it) {
|
1454
|
-
var O, tag, result;
|
1455
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1456
|
-
// @@toStringTag case
|
1457
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
1458
|
-
// builtinTag case
|
1459
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1460
|
-
// ES3 arguments fallback
|
1461
|
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
1462
|
-
};
|
1463
|
-
|
1464
|
-
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
1465
|
-
var test = {};
|
1466
|
-
|
1467
|
-
test[TO_STRING_TAG$2] = 'z';
|
1468
|
-
|
1469
|
-
// `Object.prototype.toString` method implementation
|
1470
|
-
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1471
|
-
var objectToString = String(test) !== '[object z]' ? function toString() {
|
1472
|
-
return '[object ' + classof(this) + ']';
|
1473
|
-
} : test.toString;
|
1474
|
-
|
1475
|
-
var ObjectPrototype$2 = Object.prototype;
|
1476
|
-
|
1477
|
-
// `Object.prototype.toString` method
|
1478
|
-
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1479
|
-
if (objectToString !== ObjectPrototype$2.toString) {
|
1480
|
-
redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
|
1481
|
-
}
|
1482
|
-
|
1483
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1484
|
-
var createMethod$2 = function (CONVERT_TO_STRING) {
|
1485
|
-
return function ($this, pos) {
|
1486
|
-
var S = String(requireObjectCoercible($this));
|
1487
|
-
var position = toInteger(pos);
|
1488
|
-
var size = S.length;
|
1489
|
-
var first, second;
|
1490
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1491
|
-
first = S.charCodeAt(position);
|
1492
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1493
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1494
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1495
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1496
|
-
};
|
1497
|
-
};
|
1498
|
-
|
1499
|
-
var stringMultibyte = {
|
1500
|
-
// `String.prototype.codePointAt` method
|
1501
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1502
|
-
codeAt: createMethod$2(false),
|
1503
|
-
// `String.prototype.at` method
|
1504
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
1505
|
-
charAt: createMethod$2(true)
|
1506
|
-
};
|
1507
|
-
|
1508
|
-
var charAt = stringMultibyte.charAt;
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
var STRING_ITERATOR = 'String Iterator';
|
1513
|
-
var setInternalState$2 = internalState.set;
|
1514
|
-
var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
|
1515
|
-
|
1516
|
-
// `String.prototype[@@iterator]` method
|
1517
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
1518
|
-
defineIterator(String, 'String', function (iterated) {
|
1519
|
-
setInternalState$2(this, {
|
1520
|
-
type: STRING_ITERATOR,
|
1521
|
-
string: String(iterated),
|
1522
|
-
index: 0
|
1523
|
-
});
|
1524
|
-
// `%StringIteratorPrototype%.next` method
|
1525
|
-
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
1526
|
-
}, function next() {
|
1527
|
-
var state = getInternalState$2(this);
|
1528
|
-
var string = state.string;
|
1529
|
-
var index = state.index;
|
1530
|
-
var point;
|
1531
|
-
if (index >= string.length) return { value: undefined, done: true };
|
1532
|
-
point = charAt(string, index);
|
1533
|
-
state.index += point.length;
|
1534
|
-
return { value: point, done: false };
|
1535
|
-
});
|
1536
|
-
|
1537
|
-
// `RegExp.prototype.flags` getter implementation
|
1538
|
-
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
1539
|
-
var regexpFlags = function () {
|
1540
|
-
var that = anObject(this);
|
1541
|
-
var result = '';
|
1542
|
-
if (that.global) result += 'g';
|
1543
|
-
if (that.ignoreCase) result += 'i';
|
1544
|
-
if (that.multiline) result += 'm';
|
1545
|
-
if (that.dotAll) result += 's';
|
1546
|
-
if (that.unicode) result += 'u';
|
1547
|
-
if (that.sticky) result += 'y';
|
1548
|
-
return result;
|
1549
|
-
};
|
1550
|
-
|
1551
|
-
var nativeExec = RegExp.prototype.exec;
|
1552
|
-
// This always refers to the native implementation, because the
|
1553
|
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
1554
|
-
// which loads this file before patching the method.
|
1555
|
-
var nativeReplace = String.prototype.replace;
|
1556
|
-
|
1557
|
-
var patchedExec = nativeExec;
|
1558
|
-
|
1559
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
1560
|
-
var re1 = /a/;
|
1561
|
-
var re2 = /b*/g;
|
1562
|
-
nativeExec.call(re1, 'a');
|
1563
|
-
nativeExec.call(re2, 'a');
|
1564
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1565
|
-
})();
|
1566
|
-
|
1567
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
1568
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
1569
|
-
|
1570
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
1571
|
-
|
1572
|
-
if (PATCH) {
|
1573
|
-
patchedExec = function exec(str) {
|
1574
|
-
var re = this;
|
1575
|
-
var lastIndex, reCopy, match, i;
|
1576
|
-
|
1577
|
-
if (NPCG_INCLUDED) {
|
1578
|
-
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
1579
|
-
}
|
1580
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1581
|
-
|
1582
|
-
match = nativeExec.call(re, str);
|
1583
|
-
|
1584
|
-
if (UPDATES_LAST_INDEX_WRONG && match) {
|
1585
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
1586
|
-
}
|
1587
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
1588
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
1589
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
1590
|
-
nativeReplace.call(match[0], reCopy, function () {
|
1591
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
1592
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
1593
|
-
}
|
1594
|
-
});
|
1595
|
-
}
|
1596
|
-
|
1597
|
-
return match;
|
1598
|
-
};
|
1599
|
-
}
|
1600
|
-
|
1601
|
-
var regexpExec = patchedExec;
|
1602
|
-
|
1603
|
-
var SPECIES$3 = wellKnownSymbol('species');
|
1604
|
-
|
1605
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1606
|
-
// #replace needs built-in support for named groups.
|
1607
|
-
// #match works fine because it just return the exec results, even if it has
|
1608
|
-
// a "grops" property.
|
1609
|
-
var re = /./;
|
1610
|
-
re.exec = function () {
|
1611
|
-
var result = [];
|
1612
|
-
result.groups = { a: '7' };
|
1613
|
-
return result;
|
1614
|
-
};
|
1615
|
-
return ''.replace(re, '$<a>') !== '7';
|
1616
|
-
});
|
1617
|
-
|
1618
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1619
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1620
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1621
|
-
var re = /(?:)/;
|
1622
|
-
var originalExec = re.exec;
|
1623
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1624
|
-
var result = 'ab'.split(re);
|
1625
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1626
|
-
});
|
1627
|
-
|
1628
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
1629
|
-
var SYMBOL = wellKnownSymbol(KEY);
|
1630
|
-
|
1631
|
-
var DELEGATES_TO_SYMBOL = !fails(function () {
|
1632
|
-
// String methods call symbol-named RegEp methods
|
1633
|
-
var O = {};
|
1634
|
-
O[SYMBOL] = function () { return 7; };
|
1635
|
-
return ''[KEY](O) != 7;
|
1636
|
-
});
|
1637
|
-
|
1638
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
1639
|
-
// Symbol-named RegExp methods call .exec
|
1640
|
-
var execCalled = false;
|
1641
|
-
var re = /a/;
|
1642
|
-
re.exec = function () { execCalled = true; return null; };
|
1643
|
-
|
1644
|
-
if (KEY === 'split') {
|
1645
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
1646
|
-
// a new one. We need to return the patched regex when creating the new one.
|
1647
|
-
re.constructor = {};
|
1648
|
-
re.constructor[SPECIES$3] = function () { return re; };
|
1649
|
-
}
|
1650
|
-
|
1651
|
-
re[SYMBOL]('');
|
1652
|
-
return !execCalled;
|
1653
|
-
});
|
1654
|
-
|
1655
|
-
if (
|
1656
|
-
!DELEGATES_TO_SYMBOL ||
|
1657
|
-
!DELEGATES_TO_EXEC ||
|
1658
|
-
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
1659
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1660
|
-
) {
|
1661
|
-
var nativeRegExpMethod = /./[SYMBOL];
|
1662
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1663
|
-
if (regexp.exec === regexpExec) {
|
1664
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1665
|
-
// The native String method already delegates to @@method (this
|
1666
|
-
// polyfilled function), leasing to infinite recursion.
|
1667
|
-
// We avoid it by directly calling the native @@method method.
|
1668
|
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
1669
|
-
}
|
1670
|
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
1671
|
-
}
|
1672
|
-
return { done: false };
|
1673
|
-
});
|
1674
|
-
var stringMethod = methods[0];
|
1675
|
-
var regexMethod = methods[1];
|
1676
|
-
|
1677
|
-
redefine(String.prototype, KEY, stringMethod);
|
1678
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1679
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1680
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1681
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1682
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1683
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1684
|
-
: function (string) { return regexMethod.call(string, this); }
|
1685
|
-
);
|
1686
|
-
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
1687
|
-
}
|
1688
|
-
};
|
1689
|
-
|
1690
|
-
var charAt$1 = stringMultibyte.charAt;
|
1691
|
-
|
1692
|
-
// `AdvanceStringIndex` abstract operation
|
1693
|
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
1694
|
-
var advanceStringIndex = function (S, index, unicode) {
|
1695
|
-
return index + (unicode ? charAt$1(S, index).length : 1);
|
1696
|
-
};
|
1697
|
-
|
1698
|
-
// `RegExpExec` abstract operation
|
1699
|
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
1700
|
-
var regexpExecAbstract = function (R, S) {
|
1701
|
-
var exec = R.exec;
|
1702
|
-
if (typeof exec === 'function') {
|
1703
|
-
var result = exec.call(R, S);
|
1704
|
-
if (typeof result !== 'object') {
|
1705
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1706
|
-
}
|
1707
|
-
return result;
|
1708
|
-
}
|
1709
|
-
|
1710
|
-
if (classofRaw(R) !== 'RegExp') {
|
1711
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1712
|
-
}
|
1713
|
-
|
1714
|
-
return regexpExec.call(R, S);
|
1715
|
-
};
|
1716
|
-
|
1717
|
-
var max$2 = Math.max;
|
1718
|
-
var min$2 = Math.min;
|
1719
|
-
var floor$1 = Math.floor;
|
1720
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
1721
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
1722
|
-
|
1723
|
-
var maybeToString = function (it) {
|
1724
|
-
return it === undefined ? it : String(it);
|
1725
|
-
};
|
1726
|
-
|
1727
|
-
// @@replace logic
|
1728
|
-
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1729
|
-
return [
|
1730
|
-
// `String.prototype.replace` method
|
1731
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
1732
|
-
function replace(searchValue, replaceValue) {
|
1733
|
-
var O = requireObjectCoercible(this);
|
1734
|
-
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
1735
|
-
return replacer !== undefined
|
1736
|
-
? replacer.call(searchValue, O, replaceValue)
|
1737
|
-
: nativeReplace.call(String(O), searchValue, replaceValue);
|
1738
|
-
},
|
1739
|
-
// `RegExp.prototype[@@replace]` method
|
1740
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
1741
|
-
function (regexp, replaceValue) {
|
1742
|
-
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1743
|
-
if (res.done) return res.value;
|
1744
|
-
|
1745
|
-
var rx = anObject(regexp);
|
1746
|
-
var S = String(this);
|
1747
|
-
|
1748
|
-
var functionalReplace = typeof replaceValue === 'function';
|
1749
|
-
if (!functionalReplace) replaceValue = String(replaceValue);
|
1750
|
-
|
1751
|
-
var global = rx.global;
|
1752
|
-
if (global) {
|
1753
|
-
var fullUnicode = rx.unicode;
|
1754
|
-
rx.lastIndex = 0;
|
1755
|
-
}
|
1756
|
-
var results = [];
|
1757
|
-
while (true) {
|
1758
|
-
var result = regexpExecAbstract(rx, S);
|
1759
|
-
if (result === null) break;
|
1760
|
-
|
1761
|
-
results.push(result);
|
1762
|
-
if (!global) break;
|
1763
|
-
|
1764
|
-
var matchStr = String(result[0]);
|
1765
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1766
|
-
}
|
1767
|
-
|
1768
|
-
var accumulatedResult = '';
|
1769
|
-
var nextSourcePosition = 0;
|
1770
|
-
for (var i = 0; i < results.length; i++) {
|
1771
|
-
result = results[i];
|
1772
|
-
|
1773
|
-
var matched = String(result[0]);
|
1774
|
-
var position = max$2(min$2(toInteger(result.index), S.length), 0);
|
1775
|
-
var captures = [];
|
1776
|
-
// NOTE: This is equivalent to
|
1777
|
-
// captures = result.slice(1).map(maybeToString)
|
1778
|
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1779
|
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1780
|
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1781
|
-
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1782
|
-
var namedCaptures = result.groups;
|
1783
|
-
if (functionalReplace) {
|
1784
|
-
var replacerArgs = [matched].concat(captures, position, S);
|
1785
|
-
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1786
|
-
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1787
|
-
} else {
|
1788
|
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1789
|
-
}
|
1790
|
-
if (position >= nextSourcePosition) {
|
1791
|
-
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
1792
|
-
nextSourcePosition = position + matched.length;
|
1793
|
-
}
|
1794
|
-
}
|
1795
|
-
return accumulatedResult + S.slice(nextSourcePosition);
|
1796
|
-
}
|
1797
|
-
];
|
1798
|
-
|
1799
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
1800
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1801
|
-
var tailPos = position + matched.length;
|
1802
|
-
var m = captures.length;
|
1803
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1804
|
-
if (namedCaptures !== undefined) {
|
1805
|
-
namedCaptures = toObject(namedCaptures);
|
1806
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
1807
|
-
}
|
1808
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1809
|
-
var capture;
|
1810
|
-
switch (ch.charAt(0)) {
|
1811
|
-
case '$': return '$';
|
1812
|
-
case '&': return matched;
|
1813
|
-
case '`': return str.slice(0, position);
|
1814
|
-
case "'": return str.slice(tailPos);
|
1815
|
-
case '<':
|
1816
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
1817
|
-
break;
|
1818
|
-
default: // \d\d?
|
1819
|
-
var n = +ch;
|
1820
|
-
if (n === 0) return match;
|
1821
|
-
if (n > m) {
|
1822
|
-
var f = floor$1(n / 10);
|
1823
|
-
if (f === 0) return match;
|
1824
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1825
|
-
return match;
|
1826
|
-
}
|
1827
|
-
capture = captures[n - 1];
|
1828
|
-
}
|
1829
|
-
return capture === undefined ? '' : capture;
|
1830
|
-
});
|
1831
|
-
}
|
1832
|
-
});
|
1833
|
-
|
1834
|
-
// iterable DOM collections
|
1835
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
1836
|
-
var domIterables = {
|
1837
|
-
CSSRuleList: 0,
|
1838
|
-
CSSStyleDeclaration: 0,
|
1839
|
-
CSSValueList: 0,
|
1840
|
-
ClientRectList: 0,
|
1841
|
-
DOMRectList: 0,
|
1842
|
-
DOMStringList: 0,
|
1843
|
-
DOMTokenList: 1,
|
1844
|
-
DataTransferItemList: 0,
|
1845
|
-
FileList: 0,
|
1846
|
-
HTMLAllCollection: 0,
|
1847
|
-
HTMLCollection: 0,
|
1848
|
-
HTMLFormElement: 0,
|
1849
|
-
HTMLSelectElement: 0,
|
1850
|
-
MediaList: 0,
|
1851
|
-
MimeTypeArray: 0,
|
1852
|
-
NamedNodeMap: 0,
|
1853
|
-
NodeList: 1,
|
1854
|
-
PaintRequestList: 0,
|
1855
|
-
Plugin: 0,
|
1856
|
-
PluginArray: 0,
|
1857
|
-
SVGLengthList: 0,
|
1858
|
-
SVGNumberList: 0,
|
1859
|
-
SVGPathSegList: 0,
|
1860
|
-
SVGPointList: 0,
|
1861
|
-
SVGStringList: 0,
|
1862
|
-
SVGTransformList: 0,
|
1863
|
-
SourceBufferList: 0,
|
1864
|
-
StyleSheetList: 0,
|
1865
|
-
TextTrackCueList: 0,
|
1866
|
-
TextTrackList: 0,
|
1867
|
-
TouchList: 0
|
1868
|
-
};
|
1869
|
-
|
1870
|
-
var ITERATOR$2 = wellKnownSymbol('iterator');
|
1871
|
-
var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
|
1872
|
-
var ArrayValues = es_array_iterator.values;
|
1873
|
-
|
1874
|
-
for (var COLLECTION_NAME in domIterables) {
|
1875
|
-
var Collection = global_1[COLLECTION_NAME];
|
1876
|
-
var CollectionPrototype = Collection && Collection.prototype;
|
1877
|
-
if (CollectionPrototype) {
|
1878
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
1879
|
-
if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
|
1880
|
-
hide(CollectionPrototype, ITERATOR$2, ArrayValues);
|
1881
|
-
} catch (error) {
|
1882
|
-
CollectionPrototype[ITERATOR$2] = ArrayValues;
|
1883
|
-
}
|
1884
|
-
if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
|
1885
|
-
if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
|
1886
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
1887
|
-
if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
|
1888
|
-
hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
|
1889
|
-
} catch (error) {
|
1890
|
-
CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
|
1891
|
-
}
|
1892
|
-
}
|
1893
|
-
}
|
1894
|
-
}
|
1895
|
-
|
1896
|
-
/**
|
1897
|
-
* @author andrey matveev <aamatveef@gmail.com>
|
1898
|
-
* @version: v1.1.0
|
1899
|
-
* https://github.com/aamatveev/bootstrap-table
|
1900
|
-
* extensions:
|
1901
|
-
*/
|
1902
|
-
|
1903
|
-
$.extend($.fn.bootstrapTable.defaults, {
|
1904
|
-
cellInputEnabled: false,
|
1905
|
-
cellInputType: 'text',
|
1906
|
-
// text or select or textarea
|
1907
|
-
cellInputUniqueId: '',
|
1908
|
-
cellInputSelectOptinons: [],
|
1909
|
-
// [{ text: '', value: '', disabled: false, default: true },{}]
|
1910
|
-
cellInputIsDeciaml: false,
|
1911
|
-
onCellInputInit: function onCellInputInit() {
|
1912
|
-
return false;
|
1913
|
-
},
|
1914
|
-
onCellInputBlur: function onCellInputBlur(field, row, oldValue, $el) {
|
1915
|
-
return false;
|
1916
|
-
},
|
1917
|
-
onCellInputFocus: function onCellInputFocus(field, row, oldValue, $el) {
|
1918
|
-
return false;
|
1919
|
-
},
|
1920
|
-
onCellInputKeyup: function onCellInputKeyup(field, row, oldValue, $el) {
|
1921
|
-
return false;
|
1922
|
-
},
|
1923
|
-
onCellInputKeydown: function onCellInputKeydown(field, row, oldValue, $el) {
|
1924
|
-
return false;
|
1925
|
-
},
|
1926
|
-
onCellInputSelectChange: function onCellInputSelectChange(field, row, oldValue, $el) {
|
1927
|
-
return false;
|
1928
|
-
}
|
1929
|
-
});
|
1930
|
-
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
1931
|
-
'cellinput-init.bs.table': 'onCellInputInit',
|
1932
|
-
'cellinput-blur.bs.table': 'onCellInputBlur',
|
1933
|
-
'cellinput-focus.bs.table': 'onCellInputFocus',
|
1934
|
-
'cellinput-keyup.bs.table': 'onCellInputKeyup',
|
1935
|
-
'cellinput-keydown.bs.table': 'onCellInputKeydown',
|
1936
|
-
'cellinput-selectchange.bs.table': 'onCellInputSelectChange'
|
1937
|
-
});
|
1938
|
-
var BootstrapTable = $.fn.bootstrapTable.Constructor;
|
1939
|
-
var _initTable = BootstrapTable.prototype.initTable;
|
1940
|
-
var _initBody = BootstrapTable.prototype.initBody;
|
1941
|
-
|
1942
|
-
BootstrapTable.prototype.initTable = function () {
|
1943
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1944
|
-
args[_key] = arguments[_key];
|
1945
|
-
}
|
1946
|
-
|
1947
|
-
_initTable.apply(this, Array.prototype.slice.apply(args)); // exit if table.options.cellInputEnabled = false
|
1948
|
-
|
1949
|
-
|
1950
|
-
if (!this.options.cellInputEnabled) {
|
1951
|
-
return;
|
1952
|
-
}
|
1953
|
-
|
1954
|
-
$.each(this.columns, function (i, column) {
|
1955
|
-
// exit if column.cellInputEnabled = false
|
1956
|
-
if (!column.cellInputEnabled) {
|
1957
|
-
return;
|
1958
|
-
}
|
1959
|
-
|
1960
|
-
var _formatter = column.formatter;
|
1961
|
-
|
1962
|
-
if (column.cellInputType === 'text') {
|
1963
|
-
column.formatter = function (value, row, index) {
|
1964
|
-
var result = _formatter ? _formatter(value, row, index) : value; // Решает проблему невозможности ввода кавычек "
|
1965
|
-
|
1966
|
-
result = typeof result === 'string' ? result.replace(/"/g, '"') : result;
|
1967
|
-
var isSetDataUniqueIdAttr = column.cellInputUniqueId && column.cellInputUniqueId.length > 0;
|
1968
|
-
var disableCallbackFunc = column.cellInputDisableCallbackFunc;
|
1969
|
-
return ['<input type="text" class="table-td-textbox form-control"', // ' id="' + column.field + '"',
|
1970
|
-
isSetDataUniqueIdAttr ? " data-uniqueid=\"".concat(row[column.cellInputUniqueId], "\"") : '', " data-name=\"".concat(column.field, "\""), " data-value=\"".concat(result, "\""), " value=\"".concat(result, "\""), ' autofocus="autofocus"', typeof disableCallbackFunc !== 'undefined' && disableCallbackFunc(row) ? ' disabled="disabled"' : '', '>'].join('');
|
1971
|
-
};
|
1972
|
-
} else if (column.cellInputType === 'select') {
|
1973
|
-
column.formatter = function (value, row, index) {
|
1974
|
-
var result = _formatter ? _formatter(value, row, index) : value;
|
1975
|
-
var optionDatas = column.cellInputSelectOptinons !== null ? column.cellInputSelectOptinons : [];
|
1976
|
-
var selectoptions = [];
|
1977
|
-
var arrAllowedValues = [];
|
1978
|
-
|
1979
|
-
for (var k = 0; k < optionDatas.length; k++) {
|
1980
|
-
arrAllowedValues.push(optionDatas[k].value);
|
1981
|
-
}
|
1982
|
-
|
1983
|
-
var allowedVal = $.inArray(value, arrAllowedValues) >= 0;
|
1984
|
-
var _iteratorNormalCompletion = true;
|
1985
|
-
var _didIteratorError = false;
|
1986
|
-
var _iteratorError = undefined;
|
1987
|
-
|
1988
|
-
try {
|
1989
|
-
for (var _iterator = optionDatas[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
1990
|
-
var optionData = _step.value;
|
1991
|
-
var isSelected = optionData.value === value;
|
1992
|
-
|
1993
|
-
if (!allowedVal && optionData.disabled) {
|
1994
|
-
isSelected = true;
|
1995
|
-
result = optionData.value;
|
1996
|
-
}
|
1997
|
-
|
1998
|
-
selectoptions.push("<option value=\"".concat(optionData.value, "\" ").concat(isSelected ? ' selected="selected" ' : '').concat(optionData.disabled ? ' disabled' : '', ">").concat(optionData.text, "</option>"));
|
1999
|
-
}
|
2000
|
-
} catch (err) {
|
2001
|
-
_didIteratorError = true;
|
2002
|
-
_iteratorError = err;
|
2003
|
-
} finally {
|
2004
|
-
try {
|
2005
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
2006
|
-
_iterator.return();
|
2007
|
-
}
|
2008
|
-
} finally {
|
2009
|
-
if (_didIteratorError) {
|
2010
|
-
throw _iteratorError;
|
2011
|
-
}
|
2012
|
-
}
|
2013
|
-
}
|
2014
|
-
|
2015
|
-
var isSetDataUniqueIdAttr = column.cellInputUniqueId && column.cellInputUniqueId.length > 0;
|
2016
|
-
var disableCallbackFunc = column.disableCallbackFunc;
|
2017
|
-
return ['<select class="form-control" style="padding: 4px;"', isSetDataUniqueIdAttr ? " data-uniqueid=\"".concat(row[column.cellInputUniqueId], "\"") : '', " data-name=\"".concat(column.field, "\""), " data-value=\"".concat(result, "\""), typeof disableCallbackFunc !== 'undefined' && disableCallbackFunc(row) ? ' disabled="disabled"' : '', '>', selectoptions.join(''), '</select>'].join('');
|
2018
|
-
};
|
2019
|
-
}
|
2020
|
-
});
|
2021
|
-
};
|
2022
|
-
|
2023
|
-
BootstrapTable.prototype.initBody = function (fixedScroll) {
|
2024
|
-
var that = this;
|
2025
|
-
|
2026
|
-
_initBody.apply(this, Array.prototype.slice.apply(arguments));
|
2027
|
-
|
2028
|
-
if (!this.options.cellInputEnabled) {
|
2029
|
-
return;
|
2030
|
-
}
|
2031
|
-
|
2032
|
-
$.each(this.columns, function (i, column) {
|
2033
|
-
if (column.cellInputType === 'text') {
|
2034
|
-
that.$body.find("input[data-name=\"".concat(column.field, "\"]")).off('blur').on('blur', function (e) {
|
2035
|
-
var data = that.getData();
|
2036
|
-
var index = $(this).parents('tr[data-index]').data('index');
|
2037
|
-
var row = data[index];
|
2038
|
-
var newValue = $(this).val();
|
2039
|
-
row[column.field] = newValue;
|
2040
|
-
that.trigger('cellinput-blur', column.field, row, $(this));
|
2041
|
-
});
|
2042
|
-
that.$body.find("input[data-name=\"".concat(column.field, "\"]")).off('keyup').on('keyup', function (e) {
|
2043
|
-
var data = that.getData();
|
2044
|
-
var index = $(this).parents('tr[data-index]').data('index');
|
2045
|
-
var row = data[index];
|
2046
|
-
var oldValue = row[column.field];
|
2047
|
-
var newValue = $(this).val();
|
2048
|
-
row[column.field] = newValue;
|
2049
|
-
that.trigger('cellinput-keyup', column.field, row, oldValue, index, $(this));
|
2050
|
-
});
|
2051
|
-
that.$body.find("input[data-name=\"".concat(column.field, "\"]")).off('keydown').on('keydown', function (e) {
|
2052
|
-
var data = that.getData();
|
2053
|
-
var index = $(this).parents('tr[data-index]').data('index');
|
2054
|
-
var row = data[index];
|
2055
|
-
var oldValue = row[column.field];
|
2056
|
-
var newValue = $(this).val();
|
2057
|
-
|
2058
|
-
if (!column.tdtexboxIsDeciaml) {
|
2059
|
-
row[column.field] = newValue;
|
2060
|
-
}
|
2061
|
-
|
2062
|
-
that.trigger('cellinput-keydown', column.field, row, oldValue, index, $(this));
|
2063
|
-
});
|
2064
|
-
that.$body.find("input[data-name=\"".concat(column.field, "\"]")).off('focus').on('focus', function (e) {
|
2065
|
-
var data = that.getData();
|
2066
|
-
var index = $(this).parents('tr[data-index]').data('index');
|
2067
|
-
var row = data[index];
|
2068
|
-
that.trigger('cellinput-focus', column.field, row, $(this));
|
2069
|
-
});
|
2070
|
-
} else if (column.cellInputType === 'select') {
|
2071
|
-
that.$body.find("select[data-name=\"".concat(column.field, "\"]")).off('change').on('change', function (e) {
|
2072
|
-
var data = that.getData();
|
2073
|
-
var index = $(this).parents('tr[data-index]').data('index');
|
2074
|
-
var row = data[index];
|
2075
|
-
var oldValue = row[column.field];
|
2076
|
-
var newValue = $(this).val();
|
2077
|
-
var isBoolTrue = newValue.toLowerCase() === 'true';
|
2078
|
-
var isBoolFalse = newValue.toLowerCase() === 'false';
|
2079
|
-
row[column.field] = isBoolTrue ? true : isBoolFalse ? false : newValue;
|
2080
|
-
that.trigger('cellinput-selectchange', column.field, row, oldValue, index, $(this));
|
2081
|
-
});
|
2082
|
-
}
|
2083
|
-
});
|
2084
|
-
this.trigger('cellinput-init');
|
2085
|
-
};
|
2086
|
-
|
2087
|
-
}));
|