@beeq/tailwindcss 1.11.0-beta.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -13,245 +13,6 @@ const blendColor = ({
13
13
  [property]: `color-mix(in srgb, ${color}, ${base} ${percentage}%)`
14
14
  });
15
15
 
16
- const {
17
- default: flattenColorPalette$1
18
- } = require('tailwindcss/lib/util/flattenColorPalette');
19
- const ColorMix = plugin(function ({
20
- matchUtilities,
21
- theme
22
- }) {
23
- matchUtilities({
24
- 'bg-hover': value => blendColor({
25
- color: value,
26
- base: 'var(--bq-hover)'
27
- }),
28
- 'bg-active': value => blendColor({
29
- color: value,
30
- base: 'var(--bq-active)'
31
- }),
32
- 'border-hover': value => blendColor({
33
- color: value,
34
- base: 'var(--bq-hover)',
35
- property: 'border-color'
36
- }),
37
- 'border-active': value => blendColor({
38
- color: value,
39
- base: 'var(--bq-active)',
40
- property: 'border-color'
41
- }),
42
- 'text-hover': value => blendColor({
43
- color: value,
44
- base: 'var(--bq-hover)',
45
- property: 'color'
46
- }),
47
- 'text-active': value => blendColor({
48
- color: value,
49
- base: 'var(--bq-active)',
50
- property: 'color'
51
- })
52
- }, {
53
- values: flattenColorPalette$1(theme('colors'))
54
- });
55
- matchUtilities({
56
- 'bg-hover': value => blendColor({
57
- color: value,
58
- base: 'var(--bq-hover)'
59
- }),
60
- 'bg-active': value => blendColor({
61
- color: value,
62
- base: 'var(--bq-active)'
63
- })
64
- }, {
65
- values: flattenColorPalette$1(theme('backgroundColor'))
66
- });
67
- matchUtilities({
68
- 'border-hover': value => blendColor({
69
- color: value,
70
- base: 'var(--bq-hover)',
71
- property: 'border-color'
72
- }),
73
- 'border-active': value => blendColor({
74
- color: value,
75
- base: 'var(--bq-active)',
76
- property: 'border-color'
77
- })
78
- }, {
79
- values: flattenColorPalette$1(theme('borderColor'))
80
- });
81
- matchUtilities({
82
- 'text-hover': value => blendColor({
83
- color: value,
84
- base: 'var(--bq-hover)',
85
- property: 'color'
86
- }),
87
- 'text-active': value => blendColor({
88
- color: value,
89
- base: 'var(--bq-active)',
90
- property: 'color'
91
- })
92
- }, {
93
- values: flattenColorPalette$1(theme('textColor'))
94
- });
95
- matchUtilities({
96
- 'stroke-hover': value => blendColor({
97
- color: value,
98
- base: 'var(--bq-hover)',
99
- property: 'color'
100
- }),
101
- 'stroke-active': value => blendColor({
102
- color: value,
103
- base: 'var(--bq-active)',
104
- property: 'color'
105
- })
106
- }, {
107
- values: flattenColorPalette$1(theme('stroke'))
108
- });
109
- });
110
-
111
- const {
112
- default: flattenColorPalette
113
- } = require('tailwindcss/lib/util/flattenColorPalette');
114
- const LogicalProperties = plugin(function ({
115
- matchUtilities,
116
- theme
117
- }) {
118
- matchUtilities({
119
- 'border-bl': value => ({
120
- 'border-block-width': value
121
- }),
122
- 'border-bs': value => ({
123
- 'border-block-start-width': value
124
- }),
125
- 'border-be': value => ({
126
- 'border-block-end-width': value
127
- }),
128
- 'border-i': value => ({
129
- 'border-inline-width': value
130
- }),
131
- 'border-is': value => ({
132
- 'border-inline-start-width': value
133
- }),
134
- 'border-ie': value => ({
135
- 'border-inline-end-width': value
136
- })
137
- }, {
138
- values: theme('borderWidth')
139
- });
140
- matchUtilities({
141
- 'border-bl': value => ({
142
- 'border-block-color': value
143
- }),
144
- 'border-bs': value => ({
145
- 'border-block-start-color': value
146
- }),
147
- 'border-be': value => ({
148
- 'border-block-end-color': value
149
- }),
150
- 'border-i': value => ({
151
- 'border-inline-color': value
152
- }),
153
- 'border-is': value => ({
154
- 'border-inline-start-color': value
155
- }),
156
- 'border-ie': value => ({
157
- 'border-inline-end-color': value
158
- })
159
- }, {
160
- values: flattenColorPalette(theme('colors'))
161
- });
162
- matchUtilities({
163
- bs: value => ({
164
- 'block-size': value
165
- }),
166
- 'max-bs': value => ({
167
- 'max-block-size': value
168
- }),
169
- 'min-bs': value => ({
170
- 'min-block-size': value
171
- }),
172
- is: value => ({
173
- 'inline-size': value
174
- }),
175
- 'max-is': value => ({
176
- 'max-inline-size': value
177
- }),
178
- 'min-is': value => ({
179
- 'min-inline-size': value
180
- })
181
- }, {
182
- values: theme('width')
183
- });
184
- matchUtilities({
185
- 'border-bl': value => ({
186
- 'border-block': value
187
- }),
188
- 'border-bs': value => ({
189
- 'border-block-start': value
190
- }),
191
- 'border-be': value => ({
192
- 'border-block-end': value
193
- }),
194
- 'border-i': value => ({
195
- 'border-inline': value
196
- }),
197
- 'border-is': value => ({
198
- 'border-inline-start': value
199
- }),
200
- 'border-ie': value => ({
201
- 'border-inline-end': value
202
- }),
203
- 'p-b': value => ({
204
- 'padding-block': value
205
- }),
206
- 'p-bs': value => ({
207
- 'padding-block-start': value
208
- }),
209
- 'p-be': value => ({
210
- 'padding-block-end': value
211
- }),
212
- 'p-i': value => ({
213
- 'padding-inline': value
214
- })
215
- }, {
216
- values: theme('spacing')
217
- });
218
- matchUtilities({
219
- 'inset-b': value => ({
220
- 'inset-block': value
221
- }),
222
- 'inset-bs': value => ({
223
- 'inset-block-start': value
224
- }),
225
- 'inset-be': value => ({
226
- 'inset-block-end': value
227
- }),
228
- 'inset-i': value => ({
229
- 'inset-inline': value
230
- }),
231
- 'inset-is': value => ({
232
- 'inset-inline-start': value
233
- }),
234
- 'inset-ie': value => ({
235
- 'inset-inline-end': value
236
- }),
237
- 'm-b': value => ({
238
- 'margin-block': value
239
- }),
240
- 'm-bs': value => ({
241
- 'margin-block-start': value
242
- }),
243
- 'm-be': value => ({
244
- 'margin-block-end': value
245
- }),
246
- 'm-i': value => ({
247
- 'margin-inline': value
248
- })
249
- }, {
250
- values: theme('spacing'),
251
- supportsNegativeValues: true
252
- });
253
- });
254
-
255
16
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
256
17
 
257
18
  var check = function (it) {
@@ -1252,687 +1013,402 @@ var _export = function (options, source) {
1252
1013
  }
1253
1014
  };
1254
1015
 
1255
- var NATIVE_BIND$1 = functionBindNative;
1256
-
1257
- var FunctionPrototype = Function.prototype;
1258
- var apply$2 = FunctionPrototype.apply;
1259
- var call$9 = FunctionPrototype.call;
1260
-
1261
- // eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
1262
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$9.bind(apply$2) : function () {
1263
- return call$9.apply(apply$2, arguments);
1264
- });
1016
+ var isPrototypeOf$2 = objectIsPrototypeOf;
1265
1017
 
1266
- var uncurryThis$5 = functionUncurryThis;
1267
- var aCallable$6 = aCallable$8;
1018
+ var $TypeError$6 = TypeError;
1268
1019
 
1269
- var functionUncurryThisAccessor = function (object, key, method) {
1270
- try {
1271
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1272
- return uncurryThis$5(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
1273
- } catch (error) { /* empty */ }
1020
+ var anInstance$1 = function (it, Prototype) {
1021
+ if (isPrototypeOf$2(Prototype, it)) return it;
1022
+ throw new $TypeError$6('Incorrect invocation');
1274
1023
  };
1275
1024
 
1276
- var isObject$4 = isObject$a;
1277
-
1278
- var isPossiblePrototype$1 = function (argument) {
1279
- return isObject$4(argument) || argument === null;
1280
- };
1025
+ var fails$6 = fails$f;
1281
1026
 
1282
- var isPossiblePrototype = isPossiblePrototype$1;
1027
+ var correctPrototypeGetter = !fails$6(function () {
1028
+ function F() { /* empty */ }
1029
+ F.prototype.constructor = null;
1030
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1031
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1032
+ });
1283
1033
 
1284
- var $String$1 = String;
1285
- var $TypeError$6 = TypeError;
1034
+ var hasOwn$3 = hasOwnProperty_1;
1035
+ var isCallable$5 = isCallable$g;
1036
+ var toObject = toObject$2;
1037
+ var sharedKey$1 = sharedKey$3;
1038
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1286
1039
 
1287
- var aPossiblePrototype$1 = function (argument) {
1288
- if (isPossiblePrototype(argument)) return argument;
1289
- throw new $TypeError$6("Can't set " + $String$1(argument) + ' as a prototype');
1040
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1041
+ var $Object$1 = Object;
1042
+ var ObjectPrototype = $Object$1.prototype;
1043
+
1044
+ // `Object.getPrototypeOf` method
1045
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1046
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1047
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1048
+ var object = toObject(O);
1049
+ if (hasOwn$3(object, IE_PROTO$1)) return object[IE_PROTO$1];
1050
+ var constructor = object.constructor;
1051
+ if (isCallable$5(constructor) && object instanceof constructor) {
1052
+ return constructor.prototype;
1053
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1290
1054
  };
1291
1055
 
1292
- /* eslint-disable no-proto -- safe */
1293
- var uncurryThisAccessor$1 = functionUncurryThisAccessor;
1294
- var isObject$3 = isObject$a;
1295
- var requireObjectCoercible = requireObjectCoercible$3;
1296
- var aPossiblePrototype = aPossiblePrototype$1;
1056
+ var makeBuiltIn = makeBuiltInExports;
1057
+ var defineProperty$4 = objectDefineProperty;
1297
1058
 
1298
- // `Object.setPrototypeOf` method
1299
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1300
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1301
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1302
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1303
- var CORRECT_SETTER = false;
1304
- var test = {};
1305
- var setter;
1306
- try {
1307
- setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
1308
- setter(test, []);
1309
- CORRECT_SETTER = test instanceof Array;
1310
- } catch (error) { /* empty */ }
1311
- return function setPrototypeOf(O, proto) {
1312
- requireObjectCoercible(O);
1313
- aPossiblePrototype(proto);
1314
- if (!isObject$3(O)) return O;
1315
- if (CORRECT_SETTER) setter(O, proto);
1316
- else O.__proto__ = proto;
1317
- return O;
1318
- };
1319
- }() : undefined);
1059
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1060
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1061
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1062
+ return defineProperty$4.f(target, name, descriptor);
1063
+ };
1320
1064
 
1321
- var defineProperty$4 = objectDefineProperty.f;
1065
+ var DESCRIPTORS$4 = descriptors;
1066
+ var definePropertyModule$1 = objectDefineProperty;
1067
+ var createPropertyDescriptor$2 = createPropertyDescriptor$5;
1322
1068
 
1323
- var proxyAccessor$1 = function (Target, Source, key) {
1324
- key in Target || defineProperty$4(Target, key, {
1325
- configurable: true,
1326
- get: function () { return Source[key]; },
1327
- set: function (it) { Source[key] = it; }
1328
- });
1069
+ var createProperty$2 = function (object, key, value) {
1070
+ if (DESCRIPTORS$4) definePropertyModule$1.f(object, key, createPropertyDescriptor$2(0, value));
1071
+ else object[key] = value;
1329
1072
  };
1330
1073
 
1331
- var isCallable$5 = isCallable$g;
1332
- var isObject$2 = isObject$a;
1333
- var setPrototypeOf$2 = objectSetPrototypeOf;
1074
+ var objectDefineProperties = {};
1334
1075
 
1335
- // makes subclassing work correct for wrapped built-ins
1336
- var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
1337
- var NewTarget, NewTargetPrototype;
1338
- if (
1339
- // it can work only with native `setPrototypeOf`
1340
- setPrototypeOf$2 &&
1341
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
1342
- isCallable$5(NewTarget = dummy.constructor) &&
1343
- NewTarget !== Wrapper &&
1344
- isObject$2(NewTargetPrototype = NewTarget.prototype) &&
1345
- NewTargetPrototype !== Wrapper.prototype
1346
- ) setPrototypeOf$2($this, NewTargetPrototype);
1347
- return $this;
1076
+ var internalObjectKeys = objectKeysInternal;
1077
+ var enumBugKeys$1 = enumBugKeys$3;
1078
+
1079
+ // `Object.keys` method
1080
+ // https://tc39.es/ecma262/#sec-object.keys
1081
+ // eslint-disable-next-line es/no-object-keys -- safe
1082
+ var objectKeys$1 = Object.keys || function keys(O) {
1083
+ return internalObjectKeys(O, enumBugKeys$1);
1348
1084
  };
1349
1085
 
1350
- var wellKnownSymbol$a = wellKnownSymbol$c;
1086
+ var DESCRIPTORS$3 = descriptors;
1087
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1088
+ var definePropertyModule = objectDefineProperty;
1089
+ var anObject$a = anObject$d;
1090
+ var toIndexedObject$1 = toIndexedObject$5;
1091
+ var objectKeys = objectKeys$1;
1351
1092
 
1352
- var TO_STRING_TAG$4 = wellKnownSymbol$a('toStringTag');
1353
- var test = {};
1093
+ // `Object.defineProperties` method
1094
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1095
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1096
+ objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1097
+ anObject$a(O);
1098
+ var props = toIndexedObject$1(Properties);
1099
+ var keys = objectKeys(Properties);
1100
+ var length = keys.length;
1101
+ var index = 0;
1102
+ var key;
1103
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1104
+ return O;
1105
+ };
1354
1106
 
1355
- test[TO_STRING_TAG$4] = 'z';
1107
+ var getBuiltIn$2 = getBuiltIn$5;
1356
1108
 
1357
- var toStringTagSupport = String(test) === '[object z]';
1109
+ var html$1 = getBuiltIn$2('document', 'documentElement');
1358
1110
 
1359
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1360
- var isCallable$4 = isCallable$g;
1361
- var classofRaw$1 = classofRaw$2;
1362
- var wellKnownSymbol$9 = wellKnownSymbol$c;
1111
+ /* global ActiveXObject -- old IE, WSH */
1112
+ var anObject$9 = anObject$d;
1113
+ var definePropertiesModule = objectDefineProperties;
1114
+ var enumBugKeys = enumBugKeys$3;
1115
+ var hiddenKeys = hiddenKeys$4;
1116
+ var html = html$1;
1117
+ var documentCreateElement$1 = documentCreateElement$2;
1118
+ var sharedKey = sharedKey$3;
1363
1119
 
1364
- var TO_STRING_TAG$3 = wellKnownSymbol$9('toStringTag');
1365
- var $Object$1 = Object;
1120
+ var GT = '>';
1121
+ var LT = '<';
1122
+ var PROTOTYPE = 'prototype';
1123
+ var SCRIPT = 'script';
1124
+ var IE_PROTO = sharedKey('IE_PROTO');
1366
1125
 
1367
- // ES3 wrong here
1368
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1126
+ var EmptyConstructor = function () { /* empty */ };
1369
1127
 
1370
- // fallback for IE11 Script Access Denied error
1371
- var tryGet = function (it, key) {
1372
- try {
1373
- return it[key];
1374
- } catch (error) { /* empty */ }
1128
+ var scriptTag = function (content) {
1129
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1375
1130
  };
1376
1131
 
1377
- // getting tag from ES6+ `Object.prototype.toString`
1378
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1379
- var O, tag, result;
1380
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1381
- // @@toStringTag case
1382
- : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$3)) == 'string' ? tag
1383
- // builtinTag case
1384
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1385
- // ES3 arguments fallback
1386
- : (result = classofRaw$1(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1132
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1133
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1134
+ activeXDocument.write(scriptTag(''));
1135
+ activeXDocument.close();
1136
+ var temp = activeXDocument.parentWindow.Object;
1137
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
1138
+ activeXDocument = null;
1139
+ return temp;
1387
1140
  };
1388
1141
 
1389
- var classof$1 = classof$2;
1390
-
1391
- var $String = String;
1392
-
1393
- var toString$1 = function (argument) {
1394
- if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1395
- return $String(argument);
1142
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1143
+ var NullProtoObjectViaIFrame = function () {
1144
+ // Thrash, waste and sodomy: IE GC bug
1145
+ var iframe = documentCreateElement$1('iframe');
1146
+ var JS = 'java' + SCRIPT + ':';
1147
+ var iframeDocument;
1148
+ iframe.style.display = 'none';
1149
+ html.appendChild(iframe);
1150
+ // https://github.com/zloirock/core-js/issues/475
1151
+ iframe.src = String(JS);
1152
+ iframeDocument = iframe.contentWindow.document;
1153
+ iframeDocument.open();
1154
+ iframeDocument.write(scriptTag('document.F=Object'));
1155
+ iframeDocument.close();
1156
+ return iframeDocument.F;
1396
1157
  };
1397
1158
 
1398
- var toString = toString$1;
1399
-
1400
- var normalizeStringArgument$1 = function (argument, $default) {
1401
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
1159
+ // Check for document.domain and active x support
1160
+ // No need to use active x approach when document.domain is not set
1161
+ // see https://github.com/es-shims/es5-shim/issues/150
1162
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1163
+ // avoid IE GC bug
1164
+ var activeXDocument;
1165
+ var NullProtoObject = function () {
1166
+ try {
1167
+ activeXDocument = new ActiveXObject('htmlfile');
1168
+ } catch (error) { /* ignore */ }
1169
+ NullProtoObject = typeof document != 'undefined'
1170
+ ? document.domain && activeXDocument
1171
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1172
+ : NullProtoObjectViaIFrame()
1173
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1174
+ var length = enumBugKeys.length;
1175
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1176
+ return NullProtoObject();
1402
1177
  };
1403
1178
 
1404
- var isObject$1 = isObject$a;
1405
- var createNonEnumerableProperty$5 = createNonEnumerableProperty$8;
1179
+ hiddenKeys[IE_PROTO] = true;
1406
1180
 
1407
- // `InstallErrorCause` abstract operation
1408
- // https://tc39.es/ecma262/#sec-installerrorcause
1409
- var installErrorCause$1 = function (O, options) {
1410
- if (isObject$1(options) && 'cause' in options) {
1411
- createNonEnumerableProperty$5(O, 'cause', options.cause);
1412
- }
1181
+ // `Object.create` method
1182
+ // https://tc39.es/ecma262/#sec-object.create
1183
+ // eslint-disable-next-line es/no-object-create -- safe
1184
+ var objectCreate = Object.create || function create(O, Properties) {
1185
+ var result;
1186
+ if (O !== null) {
1187
+ EmptyConstructor[PROTOTYPE] = anObject$9(O);
1188
+ result = new EmptyConstructor();
1189
+ EmptyConstructor[PROTOTYPE] = null;
1190
+ // add "__proto__" for Object.getPrototypeOf polyfill
1191
+ result[IE_PROTO] = O;
1192
+ } else result = NullProtoObject();
1193
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1413
1194
  };
1414
1195
 
1415
- var uncurryThis$4 = functionUncurryThis;
1416
-
1417
- var $Error = Error;
1418
- var replace = uncurryThis$4(''.replace);
1196
+ var fails$5 = fails$f;
1197
+ var isCallable$4 = isCallable$g;
1198
+ var isObject$4 = isObject$a;
1199
+ var getPrototypeOf$2 = objectGetPrototypeOf;
1200
+ var defineBuiltIn$2 = defineBuiltIn$4;
1201
+ var wellKnownSymbol$a = wellKnownSymbol$c;
1419
1202
 
1420
- var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
1421
- // eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
1422
- var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
1423
- var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
1203
+ var ITERATOR$5 = wellKnownSymbol$a('iterator');
1204
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1424
1205
 
1425
- var errorStackClear = function (stack, dropEntries) {
1426
- if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
1427
- while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
1428
- } return stack;
1429
- };
1206
+ // `%IteratorPrototype%` object
1207
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1208
+ var IteratorPrototype$4, PrototypeOfArrayIteratorPrototype, arrayIterator;
1430
1209
 
1431
- var fails$6 = fails$f;
1432
- var createPropertyDescriptor$2 = createPropertyDescriptor$5;
1210
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1211
+ if ([].keys) {
1212
+ arrayIterator = [].keys();
1213
+ // Safari 8 has buggy iterators w/o `next`
1214
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1215
+ else {
1216
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
1217
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$4 = PrototypeOfArrayIteratorPrototype;
1218
+ }
1219
+ }
1433
1220
 
1434
- var errorStackInstallable = !fails$6(function () {
1435
- var error = new Error('a');
1436
- if (!('stack' in error)) return true;
1437
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1438
- Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
1439
- return error.stack !== 7;
1221
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$4) || fails$5(function () {
1222
+ var test = {};
1223
+ // FF44- legacy iterators case
1224
+ return IteratorPrototype$4[ITERATOR$5].call(test) !== test;
1440
1225
  });
1441
1226
 
1442
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$8;
1443
- var clearErrorStack = errorStackClear;
1444
- var ERROR_STACK_INSTALLABLE = errorStackInstallable;
1445
-
1446
- // non-standard V8
1447
- // eslint-disable-next-line es/no-nonstandard-error-properties -- safe
1448
- var captureStackTrace = Error.captureStackTrace;
1227
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
1449
1228
 
1450
- var errorStackInstall = function (error, C, stack, dropEntries) {
1451
- if (ERROR_STACK_INSTALLABLE) {
1452
- if (captureStackTrace) captureStackTrace(error, C);
1453
- else createNonEnumerableProperty$4(error, 'stack', clearErrorStack(stack, dropEntries));
1454
- }
1455
- };
1229
+ // `%IteratorPrototype%[@@iterator]()` method
1230
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1231
+ if (!isCallable$4(IteratorPrototype$4[ITERATOR$5])) {
1232
+ defineBuiltIn$2(IteratorPrototype$4, ITERATOR$5, function () {
1233
+ return this;
1234
+ });
1235
+ }
1456
1236
 
1457
- var getBuiltIn$2 = getBuiltIn$5;
1458
- var hasOwn$3 = hasOwnProperty_1;
1459
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
1460
- var isPrototypeOf$2 = objectIsPrototypeOf;
1461
- var setPrototypeOf$1 = objectSetPrototypeOf;
1462
- var copyConstructorProperties = copyConstructorProperties$2;
1463
- var proxyAccessor = proxyAccessor$1;
1464
- var inheritIfRequired = inheritIfRequired$1;
1465
- var normalizeStringArgument = normalizeStringArgument$1;
1466
- var installErrorCause = installErrorCause$1;
1467
- var installErrorStack = errorStackInstall;
1468
- var DESCRIPTORS$4 = descriptors;
1237
+ var iteratorsCore = {
1238
+ IteratorPrototype: IteratorPrototype$4,
1239
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1240
+ };
1469
1241
 
1470
- var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
1471
- var STACK_TRACE_LIMIT = 'stackTraceLimit';
1472
- var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
1473
- var path = FULL_NAME.split('.');
1474
- var ERROR_NAME = path[path.length - 1];
1475
- var OriginalError = getBuiltIn$2.apply(null, path);
1242
+ var $$d = _export;
1243
+ var globalThis$4 = globalThis_1;
1244
+ var anInstance = anInstance$1;
1245
+ var anObject$8 = anObject$d;
1246
+ var isCallable$3 = isCallable$g;
1247
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1248
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
1249
+ var createProperty$1 = createProperty$2;
1250
+ var fails$4 = fails$f;
1251
+ var hasOwn$2 = hasOwnProperty_1;
1252
+ var wellKnownSymbol$9 = wellKnownSymbol$c;
1253
+ var IteratorPrototype$3 = iteratorsCore.IteratorPrototype;
1254
+ var DESCRIPTORS$2 = descriptors;
1476
1255
 
1477
- if (!OriginalError) return;
1256
+ var CONSTRUCTOR = 'constructor';
1257
+ var ITERATOR$4 = 'Iterator';
1258
+ var TO_STRING_TAG$4 = wellKnownSymbol$9('toStringTag');
1478
1259
 
1479
- var OriginalErrorPrototype = OriginalError.prototype;
1260
+ var $TypeError$5 = TypeError;
1261
+ var NativeIterator = globalThis$4[ITERATOR$4];
1480
1262
 
1481
- // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
1482
- if (hasOwn$3(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
1263
+ // FF56- have non-standard global helper `Iterator`
1264
+ var FORCED$5 = !isCallable$3(NativeIterator)
1265
+ || NativeIterator.prototype !== IteratorPrototype$3
1266
+ // FF44- non-standard `Iterator` passes previous tests
1267
+ || !fails$4(function () { NativeIterator({}); });
1483
1268
 
1484
- if (!FORCED) return OriginalError;
1269
+ var IteratorConstructor = function Iterator() {
1270
+ anInstance(this, IteratorPrototype$3);
1271
+ if (getPrototypeOf$1(this) === IteratorPrototype$3) throw new $TypeError$5('Abstract class Iterator not directly constructable');
1272
+ };
1485
1273
 
1486
- var BaseError = getBuiltIn$2('Error');
1274
+ var defineIteratorPrototypeAccessor = function (key, value) {
1275
+ if (DESCRIPTORS$2) {
1276
+ defineBuiltInAccessor(IteratorPrototype$3, key, {
1277
+ configurable: true,
1278
+ get: function () {
1279
+ return value;
1280
+ },
1281
+ set: function (replacement) {
1282
+ anObject$8(this);
1283
+ if (this === IteratorPrototype$3) throw new $TypeError$5("You can't redefine this property");
1284
+ if (hasOwn$2(this, key)) this[key] = replacement;
1285
+ else createProperty$1(this, key, replacement);
1286
+ }
1287
+ });
1288
+ } else IteratorPrototype$3[key] = value;
1289
+ };
1487
1290
 
1488
- var WrappedError = wrapper(function (a, b) {
1489
- var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
1490
- var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
1491
- if (message !== undefined) createNonEnumerableProperty$3(result, 'message', message);
1492
- installErrorStack(result, WrappedError, result.stack, 2);
1493
- if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
1494
- if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
1495
- return result;
1496
- });
1291
+ if (!hasOwn$2(IteratorPrototype$3, TO_STRING_TAG$4)) defineIteratorPrototypeAccessor(TO_STRING_TAG$4, ITERATOR$4);
1497
1292
 
1498
- WrappedError.prototype = OriginalErrorPrototype;
1293
+ if (FORCED$5 || !hasOwn$2(IteratorPrototype$3, CONSTRUCTOR) || IteratorPrototype$3[CONSTRUCTOR] === Object) {
1294
+ defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
1295
+ }
1499
1296
 
1500
- if (ERROR_NAME !== 'Error') {
1501
- if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
1502
- else copyConstructorProperties(WrappedError, BaseError, { name: true });
1503
- } else if (DESCRIPTORS$4 && STACK_TRACE_LIMIT in OriginalError) {
1504
- proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
1505
- proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
1506
- }
1297
+ IteratorConstructor.prototype = IteratorPrototype$3;
1507
1298
 
1508
- copyConstructorProperties(WrappedError, OriginalError);
1299
+ // `Iterator` constructor
1300
+ // https://tc39.es/ecma262/#sec-iterator
1301
+ $$d({ global: true, constructor: true, forced: FORCED$5 }, {
1302
+ Iterator: IteratorConstructor
1303
+ });
1509
1304
 
1510
- try {
1511
- // Safari 13- bug: WebAssembly errors does not have a proper `.name`
1512
- if (OriginalErrorPrototype.name !== ERROR_NAME) {
1513
- createNonEnumerableProperty$3(OriginalErrorPrototype, 'name', ERROR_NAME);
1514
- }
1515
- OriginalErrorPrototype.constructor = WrappedError;
1516
- } catch (error) { /* empty */ }
1305
+ var classofRaw$1 = classofRaw$2;
1306
+ var uncurryThis$5 = functionUncurryThis;
1517
1307
 
1518
- return WrappedError;
1308
+ var functionUncurryThisClause = function (fn) {
1309
+ // Nashorn bug:
1310
+ // https://github.com/zloirock/core-js/issues/1128
1311
+ // https://github.com/zloirock/core-js/issues/1130
1312
+ if (classofRaw$1(fn) === 'Function') return uncurryThis$5(fn);
1519
1313
  };
1520
1314
 
1521
- /* eslint-disable no-unused-vars -- required for functions `.length` */
1522
- var $$d = _export;
1523
- var globalThis$4 = globalThis_1;
1524
- var apply$1 = functionApply;
1525
- var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
1526
-
1527
- var WEB_ASSEMBLY = 'WebAssembly';
1528
- var WebAssembly = globalThis$4[WEB_ASSEMBLY];
1529
-
1530
- // eslint-disable-next-line es/no-error-cause -- feature detection
1531
- var FORCED$5 = new Error('e', { cause: 7 }).cause !== 7;
1315
+ var uncurryThis$4 = functionUncurryThisClause;
1316
+ var aCallable$6 = aCallable$8;
1317
+ var NATIVE_BIND$1 = functionBindNative;
1532
1318
 
1533
- var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1534
- var O = {};
1535
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$5);
1536
- $$d({ global: true, constructor: true, arity: 1, forced: FORCED$5 }, O);
1537
- };
1319
+ var bind$1 = uncurryThis$4(uncurryThis$4.bind);
1538
1320
 
1539
- var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1540
- if (WebAssembly && WebAssembly[ERROR_NAME]) {
1541
- var O = {};
1542
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$5);
1543
- $$d({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$5 }, O);
1544
- }
1321
+ // optional / simple context binding
1322
+ var functionBindContext = function (fn, that) {
1323
+ aCallable$6(fn);
1324
+ return that === undefined ? fn : NATIVE_BIND$1 ? bind$1(fn, that) : function (/* ...args */) {
1325
+ return fn.apply(that, arguments);
1326
+ };
1545
1327
  };
1546
1328
 
1547
- // https://tc39.es/ecma262/#sec-nativeerror
1548
- exportGlobalErrorCauseWrapper('Error', function (init) {
1549
- return function Error(message) { return apply$1(init, this, arguments); };
1550
- });
1551
- exportGlobalErrorCauseWrapper('EvalError', function (init) {
1552
- return function EvalError(message) { return apply$1(init, this, arguments); };
1553
- });
1554
- exportGlobalErrorCauseWrapper('RangeError', function (init) {
1555
- return function RangeError(message) { return apply$1(init, this, arguments); };
1556
- });
1557
- exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
1558
- return function ReferenceError(message) { return apply$1(init, this, arguments); };
1559
- });
1560
- exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
1561
- return function SyntaxError(message) { return apply$1(init, this, arguments); };
1562
- });
1563
- exportGlobalErrorCauseWrapper('TypeError', function (init) {
1564
- return function TypeError(message) { return apply$1(init, this, arguments); };
1565
- });
1566
- exportGlobalErrorCauseWrapper('URIError', function (init) {
1567
- return function URIError(message) { return apply$1(init, this, arguments); };
1568
- });
1569
- exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
1570
- return function CompileError(message) { return apply$1(init, this, arguments); };
1571
- });
1572
- exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
1573
- return function LinkError(message) { return apply$1(init, this, arguments); };
1574
- });
1575
- exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
1576
- return function RuntimeError(message) { return apply$1(init, this, arguments); };
1577
- });
1329
+ var iterators = {};
1578
1330
 
1579
- var isPrototypeOf$1 = objectIsPrototypeOf;
1331
+ var wellKnownSymbol$8 = wellKnownSymbol$c;
1332
+ var Iterators$4 = iterators;
1580
1333
 
1581
- var $TypeError$5 = TypeError;
1334
+ var ITERATOR$3 = wellKnownSymbol$8('iterator');
1335
+ var ArrayPrototype$1 = Array.prototype;
1582
1336
 
1583
- var anInstance$1 = function (it, Prototype) {
1584
- if (isPrototypeOf$1(Prototype, it)) return it;
1585
- throw new $TypeError$5('Incorrect invocation');
1337
+ // check on default Array iterator
1338
+ var isArrayIteratorMethod$1 = function (it) {
1339
+ return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$3] === it);
1586
1340
  };
1587
1341
 
1588
- var fails$5 = fails$f;
1342
+ var wellKnownSymbol$7 = wellKnownSymbol$c;
1589
1343
 
1590
- var correctPrototypeGetter = !fails$5(function () {
1591
- function F() { /* empty */ }
1592
- F.prototype.constructor = null;
1593
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1594
- return Object.getPrototypeOf(new F()) !== F.prototype;
1595
- });
1344
+ var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag');
1345
+ var test = {};
1596
1346
 
1597
- var hasOwn$2 = hasOwnProperty_1;
1598
- var isCallable$3 = isCallable$g;
1599
- var toObject = toObject$2;
1600
- var sharedKey$1 = sharedKey$3;
1601
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1347
+ test[TO_STRING_TAG$3] = 'z';
1602
1348
 
1603
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1349
+ var toStringTagSupport = String(test) === '[object z]';
1350
+
1351
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1352
+ var isCallable$2 = isCallable$g;
1353
+ var classofRaw = classofRaw$2;
1354
+ var wellKnownSymbol$6 = wellKnownSymbol$c;
1355
+
1356
+ var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1604
1357
  var $Object = Object;
1605
- var ObjectPrototype = $Object.prototype;
1606
1358
 
1607
- // `Object.getPrototypeOf` method
1608
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1609
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
1610
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1611
- var object = toObject(O);
1612
- if (hasOwn$2(object, IE_PROTO$1)) return object[IE_PROTO$1];
1613
- var constructor = object.constructor;
1614
- if (isCallable$3(constructor) && object instanceof constructor) {
1615
- return constructor.prototype;
1616
- } return object instanceof $Object ? ObjectPrototype : null;
1617
- };
1359
+ // ES3 wrong here
1360
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1618
1361
 
1619
- var makeBuiltIn = makeBuiltInExports;
1620
- var defineProperty$3 = objectDefineProperty;
1362
+ // fallback for IE11 Script Access Denied error
1363
+ var tryGet = function (it, key) {
1364
+ try {
1365
+ return it[key];
1366
+ } catch (error) { /* empty */ }
1367
+ };
1621
1368
 
1622
- var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1623
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1624
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1625
- return defineProperty$3.f(target, name, descriptor);
1369
+ // getting tag from ES6+ `Object.prototype.toString`
1370
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1371
+ var O, tag, result;
1372
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1373
+ // @@toStringTag case
1374
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$2)) == 'string' ? tag
1375
+ // builtinTag case
1376
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1377
+ // ES3 arguments fallback
1378
+ : (result = classofRaw(O)) === 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1626
1379
  };
1627
1380
 
1628
- var DESCRIPTORS$3 = descriptors;
1629
- var definePropertyModule$1 = objectDefineProperty;
1630
- var createPropertyDescriptor$1 = createPropertyDescriptor$5;
1381
+ var classof$1 = classof$2;
1382
+ var getMethod$2 = getMethod$4;
1383
+ var isNullOrUndefined = isNullOrUndefined$3;
1384
+ var Iterators$3 = iterators;
1385
+ var wellKnownSymbol$5 = wellKnownSymbol$c;
1631
1386
 
1632
- var createProperty$2 = function (object, key, value) {
1633
- if (DESCRIPTORS$3) definePropertyModule$1.f(object, key, createPropertyDescriptor$1(0, value));
1634
- else object[key] = value;
1387
+ var ITERATOR$2 = wellKnownSymbol$5('iterator');
1388
+
1389
+ var getIteratorMethod$2 = function (it) {
1390
+ if (!isNullOrUndefined(it)) return getMethod$2(it, ITERATOR$2)
1391
+ || getMethod$2(it, '@@iterator')
1392
+ || Iterators$3[classof$1(it)];
1635
1393
  };
1636
1394
 
1637
- var objectDefineProperties = {};
1395
+ var call$9 = functionCall;
1396
+ var aCallable$5 = aCallable$8;
1397
+ var anObject$7 = anObject$d;
1398
+ var tryToString$1 = tryToString$3;
1399
+ var getIteratorMethod$1 = getIteratorMethod$2;
1638
1400
 
1639
- var internalObjectKeys = objectKeysInternal;
1640
- var enumBugKeys$1 = enumBugKeys$3;
1401
+ var $TypeError$4 = TypeError;
1641
1402
 
1642
- // `Object.keys` method
1643
- // https://tc39.es/ecma262/#sec-object.keys
1644
- // eslint-disable-next-line es/no-object-keys -- safe
1645
- var objectKeys$1 = Object.keys || function keys(O) {
1646
- return internalObjectKeys(O, enumBugKeys$1);
1403
+ var getIterator$1 = function (argument, usingIterator) {
1404
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1405
+ if (aCallable$5(iteratorMethod)) return anObject$7(call$9(iteratorMethod, argument));
1406
+ throw new $TypeError$4(tryToString$1(argument) + ' is not iterable');
1647
1407
  };
1648
1408
 
1649
- var DESCRIPTORS$2 = descriptors;
1650
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1651
- var definePropertyModule = objectDefineProperty;
1652
- var anObject$a = anObject$d;
1653
- var toIndexedObject$1 = toIndexedObject$5;
1654
- var objectKeys = objectKeys$1;
1655
-
1656
- // `Object.defineProperties` method
1657
- // https://tc39.es/ecma262/#sec-object.defineproperties
1658
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1659
- objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1660
- anObject$a(O);
1661
- var props = toIndexedObject$1(Properties);
1662
- var keys = objectKeys(Properties);
1663
- var length = keys.length;
1664
- var index = 0;
1665
- var key;
1666
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1667
- return O;
1668
- };
1669
-
1670
- var getBuiltIn$1 = getBuiltIn$5;
1671
-
1672
- var html$1 = getBuiltIn$1('document', 'documentElement');
1673
-
1674
- /* global ActiveXObject -- old IE, WSH */
1675
- var anObject$9 = anObject$d;
1676
- var definePropertiesModule = objectDefineProperties;
1677
- var enumBugKeys = enumBugKeys$3;
1678
- var hiddenKeys = hiddenKeys$4;
1679
- var html = html$1;
1680
- var documentCreateElement$1 = documentCreateElement$2;
1681
- var sharedKey = sharedKey$3;
1682
-
1683
- var GT = '>';
1684
- var LT = '<';
1685
- var PROTOTYPE = 'prototype';
1686
- var SCRIPT = 'script';
1687
- var IE_PROTO = sharedKey('IE_PROTO');
1688
-
1689
- var EmptyConstructor = function () { /* empty */ };
1690
-
1691
- var scriptTag = function (content) {
1692
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1693
- };
1694
-
1695
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1696
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1697
- activeXDocument.write(scriptTag(''));
1698
- activeXDocument.close();
1699
- var temp = activeXDocument.parentWindow.Object;
1700
- // eslint-disable-next-line no-useless-assignment -- avoid memory leak
1701
- activeXDocument = null;
1702
- return temp;
1703
- };
1704
-
1705
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1706
- var NullProtoObjectViaIFrame = function () {
1707
- // Thrash, waste and sodomy: IE GC bug
1708
- var iframe = documentCreateElement$1('iframe');
1709
- var JS = 'java' + SCRIPT + ':';
1710
- var iframeDocument;
1711
- iframe.style.display = 'none';
1712
- html.appendChild(iframe);
1713
- // https://github.com/zloirock/core-js/issues/475
1714
- iframe.src = String(JS);
1715
- iframeDocument = iframe.contentWindow.document;
1716
- iframeDocument.open();
1717
- iframeDocument.write(scriptTag('document.F=Object'));
1718
- iframeDocument.close();
1719
- return iframeDocument.F;
1720
- };
1721
-
1722
- // Check for document.domain and active x support
1723
- // No need to use active x approach when document.domain is not set
1724
- // see https://github.com/es-shims/es5-shim/issues/150
1725
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1726
- // avoid IE GC bug
1727
- var activeXDocument;
1728
- var NullProtoObject = function () {
1729
- try {
1730
- activeXDocument = new ActiveXObject('htmlfile');
1731
- } catch (error) { /* ignore */ }
1732
- NullProtoObject = typeof document != 'undefined'
1733
- ? document.domain && activeXDocument
1734
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1735
- : NullProtoObjectViaIFrame()
1736
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1737
- var length = enumBugKeys.length;
1738
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1739
- return NullProtoObject();
1740
- };
1741
-
1742
- hiddenKeys[IE_PROTO] = true;
1743
-
1744
- // `Object.create` method
1745
- // https://tc39.es/ecma262/#sec-object.create
1746
- // eslint-disable-next-line es/no-object-create -- safe
1747
- var objectCreate = Object.create || function create(O, Properties) {
1748
- var result;
1749
- if (O !== null) {
1750
- EmptyConstructor[PROTOTYPE] = anObject$9(O);
1751
- result = new EmptyConstructor();
1752
- EmptyConstructor[PROTOTYPE] = null;
1753
- // add "__proto__" for Object.getPrototypeOf polyfill
1754
- result[IE_PROTO] = O;
1755
- } else result = NullProtoObject();
1756
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1757
- };
1758
-
1759
- var fails$4 = fails$f;
1760
- var isCallable$2 = isCallable$g;
1761
- var isObject = isObject$a;
1762
- var getPrototypeOf$2 = objectGetPrototypeOf;
1763
- var defineBuiltIn$2 = defineBuiltIn$4;
1764
- var wellKnownSymbol$8 = wellKnownSymbol$c;
1765
-
1766
- var ITERATOR$5 = wellKnownSymbol$8('iterator');
1767
- var BUGGY_SAFARI_ITERATORS$1 = false;
1768
-
1769
- // `%IteratorPrototype%` object
1770
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1771
- var IteratorPrototype$4, PrototypeOfArrayIteratorPrototype, arrayIterator;
1772
-
1773
- /* eslint-disable es/no-array-prototype-keys -- safe */
1774
- if ([].keys) {
1775
- arrayIterator = [].keys();
1776
- // Safari 8 has buggy iterators w/o `next`
1777
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1778
- else {
1779
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
1780
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$4 = PrototypeOfArrayIteratorPrototype;
1781
- }
1782
- }
1783
-
1784
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$4) || fails$4(function () {
1785
- var test = {};
1786
- // FF44- legacy iterators case
1787
- return IteratorPrototype$4[ITERATOR$5].call(test) !== test;
1788
- });
1789
-
1790
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
1791
-
1792
- // `%IteratorPrototype%[@@iterator]()` method
1793
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1794
- if (!isCallable$2(IteratorPrototype$4[ITERATOR$5])) {
1795
- defineBuiltIn$2(IteratorPrototype$4, ITERATOR$5, function () {
1796
- return this;
1797
- });
1798
- }
1799
-
1800
- var iteratorsCore = {
1801
- IteratorPrototype: IteratorPrototype$4,
1802
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1803
- };
1804
-
1805
- var $$c = _export;
1806
- var globalThis$3 = globalThis_1;
1807
- var anInstance = anInstance$1;
1808
- var anObject$8 = anObject$d;
1809
- var isCallable$1 = isCallable$g;
1810
- var getPrototypeOf$1 = objectGetPrototypeOf;
1811
- var defineBuiltInAccessor = defineBuiltInAccessor$1;
1812
- var createProperty$1 = createProperty$2;
1813
- var fails$3 = fails$f;
1814
- var hasOwn$1 = hasOwnProperty_1;
1815
- var wellKnownSymbol$7 = wellKnownSymbol$c;
1816
- var IteratorPrototype$3 = iteratorsCore.IteratorPrototype;
1817
- var DESCRIPTORS$1 = descriptors;
1818
-
1819
- var CONSTRUCTOR = 'constructor';
1820
- var ITERATOR$4 = 'Iterator';
1821
- var TO_STRING_TAG$2 = wellKnownSymbol$7('toStringTag');
1822
-
1823
- var $TypeError$4 = TypeError;
1824
- var NativeIterator = globalThis$3[ITERATOR$4];
1825
-
1826
- // FF56- have non-standard global helper `Iterator`
1827
- var FORCED$4 = !isCallable$1(NativeIterator)
1828
- || NativeIterator.prototype !== IteratorPrototype$3
1829
- // FF44- non-standard `Iterator` passes previous tests
1830
- || !fails$3(function () { NativeIterator({}); });
1831
-
1832
- var IteratorConstructor = function Iterator() {
1833
- anInstance(this, IteratorPrototype$3);
1834
- if (getPrototypeOf$1(this) === IteratorPrototype$3) throw new $TypeError$4('Abstract class Iterator not directly constructable');
1835
- };
1836
-
1837
- var defineIteratorPrototypeAccessor = function (key, value) {
1838
- if (DESCRIPTORS$1) {
1839
- defineBuiltInAccessor(IteratorPrototype$3, key, {
1840
- configurable: true,
1841
- get: function () {
1842
- return value;
1843
- },
1844
- set: function (replacement) {
1845
- anObject$8(this);
1846
- if (this === IteratorPrototype$3) throw new $TypeError$4("You can't redefine this property");
1847
- if (hasOwn$1(this, key)) this[key] = replacement;
1848
- else createProperty$1(this, key, replacement);
1849
- }
1850
- });
1851
- } else IteratorPrototype$3[key] = value;
1852
- };
1853
-
1854
- if (!hasOwn$1(IteratorPrototype$3, TO_STRING_TAG$2)) defineIteratorPrototypeAccessor(TO_STRING_TAG$2, ITERATOR$4);
1855
-
1856
- if (FORCED$4 || !hasOwn$1(IteratorPrototype$3, CONSTRUCTOR) || IteratorPrototype$3[CONSTRUCTOR] === Object) {
1857
- defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
1858
- }
1859
-
1860
- IteratorConstructor.prototype = IteratorPrototype$3;
1861
-
1862
- // `Iterator` constructor
1863
- // https://tc39.es/ecma262/#sec-iterator
1864
- $$c({ global: true, constructor: true, forced: FORCED$4 }, {
1865
- Iterator: IteratorConstructor
1866
- });
1867
-
1868
- var classofRaw = classofRaw$2;
1869
- var uncurryThis$3 = functionUncurryThis;
1870
-
1871
- var functionUncurryThisClause = function (fn) {
1872
- // Nashorn bug:
1873
- // https://github.com/zloirock/core-js/issues/1128
1874
- // https://github.com/zloirock/core-js/issues/1130
1875
- if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
1876
- };
1877
-
1878
- var uncurryThis$2 = functionUncurryThisClause;
1879
- var aCallable$5 = aCallable$8;
1880
- var NATIVE_BIND = functionBindNative;
1881
-
1882
- var bind$1 = uncurryThis$2(uncurryThis$2.bind);
1883
-
1884
- // optional / simple context binding
1885
- var functionBindContext = function (fn, that) {
1886
- aCallable$5(fn);
1887
- return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1888
- return fn.apply(that, arguments);
1889
- };
1890
- };
1891
-
1892
- var iterators = {};
1893
-
1894
- var wellKnownSymbol$6 = wellKnownSymbol$c;
1895
- var Iterators$4 = iterators;
1896
-
1897
- var ITERATOR$3 = wellKnownSymbol$6('iterator');
1898
- var ArrayPrototype$1 = Array.prototype;
1899
-
1900
- // check on default Array iterator
1901
- var isArrayIteratorMethod$1 = function (it) {
1902
- return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$3] === it);
1903
- };
1904
-
1905
- var classof = classof$2;
1906
- var getMethod$2 = getMethod$4;
1907
- var isNullOrUndefined = isNullOrUndefined$3;
1908
- var Iterators$3 = iterators;
1909
- var wellKnownSymbol$5 = wellKnownSymbol$c;
1910
-
1911
- var ITERATOR$2 = wellKnownSymbol$5('iterator');
1912
-
1913
- var getIteratorMethod$2 = function (it) {
1914
- if (!isNullOrUndefined(it)) return getMethod$2(it, ITERATOR$2)
1915
- || getMethod$2(it, '@@iterator')
1916
- || Iterators$3[classof(it)];
1917
- };
1918
-
1919
- var call$8 = functionCall;
1920
- var aCallable$4 = aCallable$8;
1921
- var anObject$7 = anObject$d;
1922
- var tryToString$1 = tryToString$3;
1923
- var getIteratorMethod$1 = getIteratorMethod$2;
1924
-
1925
- var $TypeError$3 = TypeError;
1926
-
1927
- var getIterator$1 = function (argument, usingIterator) {
1928
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1929
- if (aCallable$4(iteratorMethod)) return anObject$7(call$8(iteratorMethod, argument));
1930
- throw new $TypeError$3(tryToString$1(argument) + ' is not iterable');
1931
- };
1932
-
1933
- var call$7 = functionCall;
1934
- var anObject$6 = anObject$d;
1935
- var getMethod$1 = getMethod$4;
1409
+ var call$8 = functionCall;
1410
+ var anObject$6 = anObject$d;
1411
+ var getMethod$1 = getMethod$4;
1936
1412
 
1937
1413
  var iteratorClose$9 = function (iterator, kind, value) {
1938
1414
  var innerResult, innerError;
@@ -1943,7 +1419,7 @@ var iteratorClose$9 = function (iterator, kind, value) {
1943
1419
  if (kind === 'throw') throw value;
1944
1420
  return value;
1945
1421
  }
1946
- innerResult = call$7(innerResult, iterator);
1422
+ innerResult = call$8(innerResult, iterator);
1947
1423
  } catch (error) {
1948
1424
  innerError = true;
1949
1425
  innerResult = error;
@@ -1955,17 +1431,17 @@ var iteratorClose$9 = function (iterator, kind, value) {
1955
1431
  };
1956
1432
 
1957
1433
  var bind = functionBindContext;
1958
- var call$6 = functionCall;
1434
+ var call$7 = functionCall;
1959
1435
  var anObject$5 = anObject$d;
1960
1436
  var tryToString = tryToString$3;
1961
1437
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
1962
1438
  var lengthOfArrayLike = lengthOfArrayLike$2;
1963
- var isPrototypeOf = objectIsPrototypeOf;
1439
+ var isPrototypeOf$1 = objectIsPrototypeOf;
1964
1440
  var getIterator = getIterator$1;
1965
1441
  var getIteratorMethod = getIteratorMethod$2;
1966
1442
  var iteratorClose$8 = iteratorClose$9;
1967
1443
 
1968
- var $TypeError$2 = TypeError;
1444
+ var $TypeError$3 = TypeError;
1969
1445
 
1970
1446
  var Result = function (stopped, result) {
1971
1447
  this.stopped = stopped;
@@ -2001,25 +1477,25 @@ var iterate$5 = function (iterable, unboundFunction, options) {
2001
1477
  iterator = iterable;
2002
1478
  } else {
2003
1479
  iterFn = getIteratorMethod(iterable);
2004
- if (!iterFn) throw new $TypeError$2(tryToString(iterable) + ' is not iterable');
1480
+ if (!iterFn) throw new $TypeError$3(tryToString(iterable) + ' is not iterable');
2005
1481
  // optimisation for array iterators
2006
1482
  if (isArrayIteratorMethod(iterFn)) {
2007
1483
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2008
1484
  result = callFn(iterable[index]);
2009
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
1485
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
2010
1486
  } return new Result(false);
2011
1487
  }
2012
1488
  iterator = getIterator(iterable, iterFn);
2013
1489
  }
2014
1490
 
2015
1491
  next = IS_RECORD ? iterable.next : iterator.next;
2016
- while (!(step = call$6(next, iterator)).done) {
1492
+ while (!(step = call$7(next, iterator)).done) {
2017
1493
  try {
2018
1494
  result = callFn(step.value);
2019
1495
  } catch (error) {
2020
1496
  iteratorClose$8(iterator, 'throw', error);
2021
1497
  }
2022
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
1498
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
2023
1499
  } return new Result(false);
2024
1500
  };
2025
1501
 
@@ -2033,11 +1509,11 @@ var getIteratorDirect$4 = function (obj) {
2033
1509
  };
2034
1510
  };
2035
1511
 
2036
- var globalThis$2 = globalThis_1;
1512
+ var globalThis$3 = globalThis_1;
2037
1513
 
2038
1514
  // https://github.com/tc39/ecma262/pull/3467
2039
1515
  var iteratorHelperWithoutClosingOnEarlyError$3 = function (METHOD_NAME, ExpectedError) {
2040
- var Iterator = globalThis$2.Iterator;
1516
+ var Iterator = globalThis$3.Iterator;
2041
1517
  var IteratorPrototype = Iterator && Iterator.prototype;
2042
1518
  var method = IteratorPrototype && IteratorPrototype[METHOD_NAME];
2043
1519
 
@@ -2056,10 +1532,10 @@ var iteratorHelperWithoutClosingOnEarlyError$3 = function (METHOD_NAME, Expected
2056
1532
  if (!CLOSED) return method;
2057
1533
  };
2058
1534
 
2059
- var $$b = _export;
2060
- var call$5 = functionCall;
1535
+ var $$c = _export;
1536
+ var call$6 = functionCall;
2061
1537
  var iterate$4 = iterate$5;
2062
- var aCallable$3 = aCallable$8;
1538
+ var aCallable$4 = aCallable$8;
2063
1539
  var anObject$4 = anObject$d;
2064
1540
  var getIteratorDirect$3 = getIteratorDirect$4;
2065
1541
  var iteratorClose$7 = iteratorClose$9;
@@ -2069,16 +1545,16 @@ var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError
2069
1545
 
2070
1546
  // `Iterator.prototype.forEach` method
2071
1547
  // https://tc39.es/ecma262/#sec-iterator.prototype.foreach
2072
- $$b({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
1548
+ $$c({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
2073
1549
  forEach: function forEach(fn) {
2074
1550
  anObject$4(this);
2075
1551
  try {
2076
- aCallable$3(fn);
1552
+ aCallable$4(fn);
2077
1553
  } catch (error) {
2078
1554
  iteratorClose$7(this, 'throw', error);
2079
1555
  }
2080
1556
 
2081
- if (forEachWithoutClosingOnEarlyError) return call$5(forEachWithoutClosingOnEarlyError, this, fn);
1557
+ if (forEachWithoutClosingOnEarlyError) return call$6(forEachWithoutClosingOnEarlyError, this, fn);
2082
1558
 
2083
1559
  var record = getIteratorDirect$3(this);
2084
1560
  var counter = 0;
@@ -2088,349 +1564,1197 @@ $$b({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosing
2088
1564
  }
2089
1565
  });
2090
1566
 
2091
- var defineBuiltIn$1 = defineBuiltIn$4;
2092
-
2093
- var defineBuiltIns$1 = function (target, src, options) {
2094
- for (var key in src) defineBuiltIn$1(target, key, src[key], options);
2095
- return target;
1567
+ // iterable DOM collections
1568
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1569
+ var domIterables = {
1570
+ CSSRuleList: 0,
1571
+ CSSStyleDeclaration: 0,
1572
+ CSSValueList: 0,
1573
+ ClientRectList: 0,
1574
+ DOMRectList: 0,
1575
+ DOMStringList: 0,
1576
+ DOMTokenList: 1,
1577
+ DataTransferItemList: 0,
1578
+ FileList: 0,
1579
+ HTMLAllCollection: 0,
1580
+ HTMLCollection: 0,
1581
+ HTMLFormElement: 0,
1582
+ HTMLSelectElement: 0,
1583
+ MediaList: 0,
1584
+ MimeTypeArray: 0,
1585
+ NamedNodeMap: 0,
1586
+ NodeList: 1,
1587
+ PaintRequestList: 0,
1588
+ Plugin: 0,
1589
+ PluginArray: 0,
1590
+ SVGLengthList: 0,
1591
+ SVGNumberList: 0,
1592
+ SVGPathSegList: 0,
1593
+ SVGPointList: 0,
1594
+ SVGStringList: 0,
1595
+ SVGTransformList: 0,
1596
+ SourceBufferList: 0,
1597
+ StyleSheetList: 0,
1598
+ TextTrackCueList: 0,
1599
+ TextTrackList: 0,
1600
+ TouchList: 0
2096
1601
  };
2097
1602
 
2098
- // `CreateIterResultObject` abstract operation
2099
- // https://tc39.es/ecma262/#sec-createiterresultobject
2100
- var createIterResultObject$2 = function (value, done) {
2101
- return { value: value, done: done };
2102
- };
1603
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1604
+ var documentCreateElement = documentCreateElement$2;
2103
1605
 
2104
- var iteratorClose$6 = iteratorClose$9;
1606
+ var classList = documentCreateElement('span').classList;
1607
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2105
1608
 
2106
- var iteratorCloseAll$1 = function (iters, kind, value) {
2107
- for (var i = iters.length - 1; i >= 0; i--) {
2108
- if (iters[i] === undefined) continue;
2109
- try {
2110
- value = iteratorClose$6(iters[i].iterator, kind, value);
2111
- } catch (error) {
2112
- kind = 'throw';
2113
- value = error;
2114
- }
2115
- }
2116
- if (kind === 'throw') throw value;
2117
- return value;
2118
- };
1609
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2119
1610
 
2120
- var call$4 = functionCall;
2121
- var create$2 = objectCreate;
2122
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
2123
- var defineBuiltIns = defineBuiltIns$1;
2124
1611
  var wellKnownSymbol$4 = wellKnownSymbol$c;
2125
- var InternalStateModule$1 = internalState;
2126
- var getMethod = getMethod$4;
2127
- var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
2128
- var createIterResultObject$1 = createIterResultObject$2;
2129
- var iteratorClose$5 = iteratorClose$9;
2130
- var iteratorCloseAll = iteratorCloseAll$1;
2131
-
2132
- var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
2133
- var ITERATOR_HELPER = 'IteratorHelper';
2134
- var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
2135
- var NORMAL = 'normal';
2136
- var THROW = 'throw';
2137
- var setInternalState$1 = InternalStateModule$1.set;
1612
+ var create$2 = objectCreate;
1613
+ var defineProperty$3 = objectDefineProperty.f;
2138
1614
 
2139
- var createIteratorProxyPrototype = function (IS_ITERATOR) {
2140
- var getInternalState = InternalStateModule$1.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
1615
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1616
+ var ArrayPrototype = Array.prototype;
2141
1617
 
2142
- return defineBuiltIns(create$2(IteratorPrototype$2), {
2143
- next: function next() {
2144
- var state = getInternalState(this);
2145
- // for simplification:
2146
- // for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
2147
- // for `%IteratorHelperPrototype%.next` - just a value
2148
- if (IS_ITERATOR) return state.nextHandler();
2149
- if (state.done) return createIterResultObject$1(undefined, true);
2150
- try {
2151
- var result = state.nextHandler();
2152
- return state.returnHandlerResult ? result : createIterResultObject$1(result, state.done);
2153
- } catch (error) {
2154
- state.done = true;
2155
- throw error;
2156
- }
2157
- },
2158
- 'return': function () {
2159
- var state = getInternalState(this);
2160
- var iterator = state.iterator;
2161
- state.done = true;
2162
- if (IS_ITERATOR) {
2163
- var returnMethod = getMethod(iterator, 'return');
2164
- return returnMethod ? call$4(returnMethod, iterator) : createIterResultObject$1(undefined, true);
2165
- }
2166
- if (state.inner) try {
2167
- iteratorClose$5(state.inner.iterator, NORMAL);
2168
- } catch (error) {
2169
- return iteratorClose$5(iterator, THROW, error);
2170
- }
2171
- if (state.openIters) try {
2172
- iteratorCloseAll(state.openIters, NORMAL);
2173
- } catch (error) {
2174
- return iteratorClose$5(iterator, THROW, error);
2175
- }
2176
- if (iterator) iteratorClose$5(iterator, NORMAL);
2177
- return createIterResultObject$1(undefined, true);
2178
- }
1618
+ // Array.prototype[@@unscopables]
1619
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1620
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
1621
+ defineProperty$3(ArrayPrototype, UNSCOPABLES, {
1622
+ configurable: true,
1623
+ value: create$2(null)
2179
1624
  });
2180
- };
2181
-
2182
- var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
2183
- var IteratorHelperPrototype = createIteratorProxyPrototype(false);
2184
-
2185
- createNonEnumerableProperty$2(IteratorHelperPrototype, TO_STRING_TAG$1, 'Iterator Helper');
2186
-
2187
- var iteratorCreateProxy = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
2188
- var IteratorProxy = function Iterator(record, state) {
2189
- if (state) {
2190
- state.iterator = record.iterator;
2191
- state.next = record.next;
2192
- } else state = record;
2193
- state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
2194
- state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
2195
- state.nextHandler = nextHandler;
2196
- state.counter = 0;
2197
- state.done = false;
2198
- setInternalState$1(this, state);
2199
- };
2200
-
2201
- IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
1625
+ }
2202
1626
 
2203
- return IteratorProxy;
1627
+ // add a key to Array.prototype[@@unscopables]
1628
+ var addToUnscopables$1 = function (key) {
1629
+ ArrayPrototype[UNSCOPABLES][key] = true;
2204
1630
  };
2205
1631
 
2206
- var anObject$3 = anObject$d;
2207
- var iteratorClose$4 = iteratorClose$9;
1632
+ var defineProperty$2 = objectDefineProperty.f;
1633
+ var hasOwn$1 = hasOwnProperty_1;
1634
+ var wellKnownSymbol$3 = wellKnownSymbol$c;
2208
1635
 
2209
- // call something on iterator step with safe closing on error
2210
- var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
2211
- try {
2212
- return ENTRIES ? fn(anObject$3(value)[0], value[1]) : fn(value);
2213
- } catch (error) {
2214
- iteratorClose$4(iterator, 'throw', error);
2215
- }
2216
- };
1636
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
2217
1637
 
2218
- // Should throw an error on invalid iterator
2219
- // https://issues.chromium.org/issues/336839115
2220
- var iteratorHelperThrowsOnInvalidIterator$1 = function (methodName, argument) {
2221
- // eslint-disable-next-line es/no-iterator -- required for testing
2222
- var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
2223
- if (method) try {
2224
- method.call({ next: null }, argument).next();
2225
- } catch (error) {
2226
- return true;
1638
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1639
+ if (target && !STATIC) target = target.prototype;
1640
+ if (target && !hasOwn$1(target, TO_STRING_TAG$1)) {
1641
+ defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
2227
1642
  }
2228
1643
  };
2229
1644
 
2230
- var $$a = _export;
2231
- var call$3 = functionCall;
2232
- var aCallable$2 = aCallable$8;
2233
- var anObject$2 = anObject$d;
2234
- var getIteratorDirect$2 = getIteratorDirect$4;
2235
- var createIteratorProxy = iteratorCreateProxy;
2236
- var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
2237
- var iteratorClose$3 = iteratorClose$9;
2238
- var iteratorHelperThrowsOnInvalidIterator = iteratorHelperThrowsOnInvalidIterator$1;
2239
- var iteratorHelperWithoutClosingOnEarlyError$1 = iteratorHelperWithoutClosingOnEarlyError$3;
1645
+ var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1646
+ var create$1 = objectCreate;
1647
+ var createPropertyDescriptor$1 = createPropertyDescriptor$5;
1648
+ var setToStringTag$2 = setToStringTag$3;
1649
+ var Iterators$2 = iterators;
2240
1650
 
2241
- var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
2242
- var mapWithoutClosingOnEarlyError = !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
2243
- && iteratorHelperWithoutClosingOnEarlyError$1('map', TypeError);
1651
+ var returnThis$1 = function () { return this; };
2244
1652
 
2245
- var FORCED$3 = MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
1653
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1654
+ var TO_STRING_TAG = NAME + ' Iterator';
1655
+ IteratorConstructor.prototype = create$1(IteratorPrototype$2, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1656
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1657
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1658
+ return IteratorConstructor;
1659
+ };
2246
1660
 
2247
- var IteratorProxy = createIteratorProxy(function () {
2248
- var iterator = this.iterator;
2249
- var result = anObject$2(call$3(this.next, iterator));
2250
- var done = this.done = !!result.done;
2251
- if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
2252
- });
1661
+ var uncurryThis$3 = functionUncurryThis;
1662
+ var aCallable$3 = aCallable$8;
2253
1663
 
2254
- // `Iterator.prototype.map` method
2255
- // https://tc39.es/ecma262/#sec-iterator.prototype.map
2256
- $$a({ target: 'Iterator', proto: true, real: true, forced: FORCED$3 }, {
2257
- map: function map(mapper) {
2258
- anObject$2(this);
2259
- try {
2260
- aCallable$2(mapper);
2261
- } catch (error) {
2262
- iteratorClose$3(this, 'throw', error);
2263
- }
1664
+ var functionUncurryThisAccessor = function (object, key, method) {
1665
+ try {
1666
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1667
+ return uncurryThis$3(aCallable$3(Object.getOwnPropertyDescriptor(object, key)[method]));
1668
+ } catch (error) { /* empty */ }
1669
+ };
2264
1670
 
2265
- if (mapWithoutClosingOnEarlyError) return call$3(mapWithoutClosingOnEarlyError, this, mapper);
1671
+ var isObject$3 = isObject$a;
2266
1672
 
2267
- return new IteratorProxy(getIteratorDirect$2(this), {
2268
- mapper: mapper
2269
- });
2270
- }
2271
- });
1673
+ var isPossiblePrototype$1 = function (argument) {
1674
+ return isObject$3(argument) || argument === null;
1675
+ };
2272
1676
 
2273
- var $$9 = _export;
2274
- var iterate$3 = iterate$5;
2275
- var aCallable$1 = aCallable$8;
2276
- var anObject$1 = anObject$d;
2277
- var getIteratorDirect$1 = getIteratorDirect$4;
2278
- var iteratorClose$2 = iteratorClose$9;
2279
- var iteratorHelperWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$3;
2280
- var apply = functionApply;
2281
- var fails$2 = fails$f;
1677
+ var isPossiblePrototype = isPossiblePrototype$1;
2282
1678
 
2283
- var $TypeError$1 = TypeError;
1679
+ var $String$1 = String;
1680
+ var $TypeError$2 = TypeError;
2284
1681
 
2285
- // https://bugs.webkit.org/show_bug.cgi?id=291651
2286
- var FAILS_ON_INITIAL_UNDEFINED = fails$2(function () {
2287
- // eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing
2288
- [].keys().reduce(function () { /* empty */ }, undefined);
2289
- });
1682
+ var aPossiblePrototype$1 = function (argument) {
1683
+ if (isPossiblePrototype(argument)) return argument;
1684
+ throw new $TypeError$2("Can't set " + $String$1(argument) + ' as a prototype');
1685
+ };
2290
1686
 
2291
- var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError$1);
1687
+ /* eslint-disable no-proto -- safe */
1688
+ var uncurryThisAccessor$1 = functionUncurryThisAccessor;
1689
+ var isObject$2 = isObject$a;
1690
+ var requireObjectCoercible = requireObjectCoercible$3;
1691
+ var aPossiblePrototype = aPossiblePrototype$1;
2292
1692
 
2293
- // `Iterator.prototype.reduce` method
2294
- // https://tc39.es/ecma262/#sec-iterator.prototype.reduce
2295
- $$9({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {
2296
- reduce: function reduce(reducer /* , initialValue */) {
2297
- anObject$1(this);
2298
- try {
2299
- aCallable$1(reducer);
2300
- } catch (error) {
2301
- iteratorClose$2(this, 'throw', error);
2302
- }
1693
+ // `Object.setPrototypeOf` method
1694
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1695
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1696
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1697
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1698
+ var CORRECT_SETTER = false;
1699
+ var test = {};
1700
+ var setter;
1701
+ try {
1702
+ setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
1703
+ setter(test, []);
1704
+ CORRECT_SETTER = test instanceof Array;
1705
+ } catch (error) { /* empty */ }
1706
+ return function setPrototypeOf(O, proto) {
1707
+ requireObjectCoercible(O);
1708
+ aPossiblePrototype(proto);
1709
+ if (!isObject$2(O)) return O;
1710
+ if (CORRECT_SETTER) setter(O, proto);
1711
+ else O.__proto__ = proto;
1712
+ return O;
1713
+ };
1714
+ }() : undefined);
2303
1715
 
2304
- var noInitial = arguments.length < 2;
2305
- var accumulator = noInitial ? undefined : arguments[1];
2306
- if (reduceWithoutClosingOnEarlyError) {
2307
- return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
2308
- }
2309
- var record = getIteratorDirect$1(this);
2310
- var counter = 0;
2311
- iterate$3(record, function (value) {
2312
- if (noInitial) {
2313
- noInitial = false;
2314
- accumulator = value;
2315
- } else {
2316
- accumulator = reducer(accumulator, value, counter);
2317
- }
2318
- counter++;
2319
- }, { IS_RECORD: true });
2320
- if (noInitial) throw new $TypeError$1('Reduce of empty iterator with no initial value');
2321
- return accumulator;
2322
- }
2323
- });
1716
+ var $$b = _export;
1717
+ var call$5 = functionCall;
1718
+ var FunctionName = functionName;
1719
+ var isCallable$1 = isCallable$g;
1720
+ var createIteratorConstructor = iteratorCreateConstructor;
1721
+ var getPrototypeOf = objectGetPrototypeOf;
1722
+ var setPrototypeOf$2 = objectSetPrototypeOf;
1723
+ var setToStringTag$1 = setToStringTag$3;
1724
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$8;
1725
+ var defineBuiltIn$1 = defineBuiltIn$4;
1726
+ var wellKnownSymbol$2 = wellKnownSymbol$c;
1727
+ var Iterators$1 = iterators;
1728
+ var IteratorsCore = iteratorsCore;
2324
1729
 
2325
- var $$8 = _export;
2326
- var iterate$2 = iterate$5;
2327
- var createProperty = createProperty$2;
1730
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1731
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1732
+ var IteratorPrototype$1 = IteratorsCore.IteratorPrototype;
1733
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1734
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
1735
+ var KEYS = 'keys';
1736
+ var VALUES = 'values';
1737
+ var ENTRIES = 'entries';
2328
1738
 
2329
- // `Object.fromEntries` method
2330
- // https://tc39.es/ecma262/#sec-object.fromentries
2331
- $$8({ target: 'Object', stat: true }, {
2332
- fromEntries: function fromEntries(iterable) {
2333
- var obj = {};
2334
- iterate$2(iterable, function (k, v) {
2335
- createProperty(obj, k, v);
2336
- }, { AS_ENTRIES: true });
2337
- return obj;
2338
- }
2339
- });
1739
+ var returnThis = function () { return this; };
2340
1740
 
2341
- var uncurryThis$1 = functionUncurryThis;
1741
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1742
+ createIteratorConstructor(IteratorConstructor, NAME, next);
2342
1743
 
2343
- // eslint-disable-next-line es/no-set -- safe
2344
- var SetPrototype$1 = Set.prototype;
1744
+ var getIterationMethod = function (KIND) {
1745
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1746
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
2345
1747
 
2346
- var setHelpers = {
2347
- // eslint-disable-next-line es/no-set -- safe
2348
- Set: Set,
2349
- add: uncurryThis$1(SetPrototype$1.add),
2350
- has: uncurryThis$1(SetPrototype$1.has),
2351
- remove: uncurryThis$1(SetPrototype$1['delete']),
2352
- proto: SetPrototype$1
2353
- };
1748
+ switch (KIND) {
1749
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1750
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1751
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1752
+ }
2354
1753
 
2355
- var has$5 = setHelpers.has;
1754
+ return function () { return new IteratorConstructor(this); };
1755
+ };
2356
1756
 
2357
- // Perform ? RequireInternalSlot(M, [[SetData]])
2358
- var aSet$7 = function (it) {
2359
- has$5(it);
2360
- return it;
2361
- };
1757
+ var TO_STRING_TAG = NAME + ' Iterator';
1758
+ var INCORRECT_VALUES_NAME = false;
1759
+ var IterablePrototype = Iterable.prototype;
1760
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1761
+ || IterablePrototype['@@iterator']
1762
+ || DEFAULT && IterablePrototype[DEFAULT];
1763
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1764
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1765
+ var CurrentIteratorPrototype, methods, KEY;
2362
1766
 
2363
- var call$2 = functionCall;
1767
+ // fix native
1768
+ if (anyNativeIterator) {
1769
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1770
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1771
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$1) {
1772
+ if (setPrototypeOf$2) {
1773
+ setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype$1);
1774
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
1775
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1776
+ }
1777
+ }
1778
+ // Set @@toStringTag to native iterators
1779
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1780
+ }
1781
+ }
2364
1782
 
2365
- var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
2366
- var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
2367
- var next = record.next;
2368
- var step, result;
2369
- while (!(step = call$2(next, iterator)).done) {
2370
- result = fn(step.value);
2371
- if (result !== undefined) return result;
1783
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1784
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1785
+ if (CONFIGURABLE_FUNCTION_NAME) {
1786
+ createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
1787
+ } else {
1788
+ INCORRECT_VALUES_NAME = true;
1789
+ defaultIterator = function values() { return call$5(nativeIterator, this); };
1790
+ }
2372
1791
  }
2373
- };
2374
1792
 
2375
- var uncurryThis = functionUncurryThis;
2376
- var iterateSimple$6 = iterateSimple$7;
2377
- var SetHelpers$5 = setHelpers;
1793
+ // export additional methods
1794
+ if (DEFAULT) {
1795
+ methods = {
1796
+ values: getIterationMethod(VALUES),
1797
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1798
+ entries: getIterationMethod(ENTRIES)
1799
+ };
1800
+ if (FORCED) for (KEY in methods) {
1801
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1802
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1803
+ }
1804
+ } else $$b({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1805
+ }
2378
1806
 
2379
- var Set$3 = SetHelpers$5.Set;
2380
- var SetPrototype = SetHelpers$5.proto;
2381
- var forEach = uncurryThis(SetPrototype.forEach);
2382
- var keys = uncurryThis(SetPrototype.keys);
2383
- var next = keys(new Set$3()).next;
1807
+ // define iterator
1808
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1809
+ defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1810
+ }
1811
+ Iterators$1[NAME] = defaultIterator;
2384
1812
 
2385
- var setIterate = function (set, fn, interruptible) {
2386
- return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
1813
+ return methods;
2387
1814
  };
2388
1815
 
2389
- var SetHelpers$4 = setHelpers;
2390
- var iterate$1 = setIterate;
1816
+ // `CreateIterResultObject` abstract operation
1817
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1818
+ var createIterResultObject$2 = function (value, done) {
1819
+ return { value: value, done: done };
1820
+ };
2391
1821
 
2392
- var Set$2 = SetHelpers$4.Set;
2393
- var add$3 = SetHelpers$4.add;
1822
+ var toIndexedObject = toIndexedObject$5;
1823
+ var addToUnscopables = addToUnscopables$1;
1824
+ var Iterators = iterators;
1825
+ var InternalStateModule$1 = internalState;
1826
+ var defineProperty$1 = objectDefineProperty.f;
1827
+ var defineIterator = iteratorDefine;
1828
+ var createIterResultObject$1 = createIterResultObject$2;
1829
+ var DESCRIPTORS$1 = descriptors;
2394
1830
 
2395
- var setClone = function (set) {
2396
- var result = new Set$2();
2397
- iterate$1(set, function (it) {
2398
- add$3(result, it);
1831
+ var ARRAY_ITERATOR = 'Array Iterator';
1832
+ var setInternalState$1 = InternalStateModule$1.set;
1833
+ var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1834
+
1835
+ // `Array.prototype.entries` method
1836
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1837
+ // `Array.prototype.keys` method
1838
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1839
+ // `Array.prototype.values` method
1840
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1841
+ // `Array.prototype[@@iterator]` method
1842
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1843
+ // `CreateArrayIterator` internal method
1844
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1845
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1846
+ setInternalState$1(this, {
1847
+ type: ARRAY_ITERATOR,
1848
+ target: toIndexedObject(iterated), // target
1849
+ index: 0, // next index
1850
+ kind: kind // kind
2399
1851
  });
2400
- return result;
2401
- };
1852
+ // `%ArrayIteratorPrototype%.next` method
1853
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1854
+ }, function () {
1855
+ var state = getInternalState(this);
1856
+ var target = state.target;
1857
+ var index = state.index++;
1858
+ if (!target || index >= target.length) {
1859
+ state.target = null;
1860
+ return createIterResultObject$1(undefined, true);
1861
+ }
1862
+ switch (state.kind) {
1863
+ case 'keys': return createIterResultObject$1(index, false);
1864
+ case 'values': return createIterResultObject$1(target[index], false);
1865
+ } return createIterResultObject$1([index, target[index]], false);
1866
+ }, 'values');
2402
1867
 
2403
- var uncurryThisAccessor = functionUncurryThisAccessor;
2404
- var SetHelpers$3 = setHelpers;
1868
+ // argumentsList[@@iterator] is %ArrayProto_values%
1869
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1870
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1871
+ var values = Iterators.Arguments = Iterators.Array;
2405
1872
 
2406
- var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
2407
- return set.size;
2408
- };
1873
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1874
+ addToUnscopables('keys');
1875
+ addToUnscopables('values');
1876
+ addToUnscopables('entries');
2409
1877
 
2410
- var aCallable = aCallable$8;
2411
- var anObject = anObject$d;
2412
- var call$1 = functionCall;
2413
- var toIntegerOrInfinity = toIntegerOrInfinity$3;
2414
- var getIteratorDirect = getIteratorDirect$4;
1878
+ // V8 ~ Chrome 45- bug
1879
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1880
+ defineProperty$1(values, 'name', { value: 'values' });
1881
+ } catch (error) { /* empty */ }
2415
1882
 
2416
- var INVALID_SIZE = 'Invalid size';
2417
- var $RangeError = RangeError;
2418
- var $TypeError = TypeError;
2419
- var max = Math.max;
1883
+ var globalThis$2 = globalThis_1;
1884
+ var DOMIterables = domIterables;
1885
+ var DOMTokenListPrototype = domTokenListPrototype;
1886
+ var ArrayIteratorMethods = es_array_iterator;
1887
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$8;
1888
+ var setToStringTag = setToStringTag$3;
1889
+ var wellKnownSymbol$1 = wellKnownSymbol$c;
2420
1890
 
2421
- var SetRecord = function (set, intSize) {
2422
- this.set = set;
2423
- this.size = max(intSize, 0);
2424
- this.has = aCallable(set.has);
1891
+ var ITERATOR = wellKnownSymbol$1('iterator');
1892
+ var ArrayValues = ArrayIteratorMethods.values;
1893
+
1894
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1895
+ if (CollectionPrototype) {
1896
+ // some Chrome versions have non-configurable methods on DOMTokenList
1897
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1898
+ createNonEnumerableProperty$4(CollectionPrototype, ITERATOR, ArrayValues);
1899
+ } catch (error) {
1900
+ CollectionPrototype[ITERATOR] = ArrayValues;
1901
+ }
1902
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1903
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1904
+ // some Chrome versions have non-configurable methods on DOMTokenList
1905
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1906
+ createNonEnumerableProperty$4(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1907
+ } catch (error) {
1908
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1909
+ }
1910
+ }
1911
+ }
1912
+ };
1913
+
1914
+ for (var COLLECTION_NAME in DOMIterables) {
1915
+ handlePrototype(globalThis$2[COLLECTION_NAME] && globalThis$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
1916
+ }
1917
+
1918
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1919
+
1920
+ function flattenObject(obj, prefix = '', result = {}) {
1921
+ Object.entries(obj).forEach(([key, value]) => {
1922
+ const newKey = prefix ? `${prefix}-${key}` : key;
1923
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
1924
+ flattenObject(value, newKey, result);
1925
+ } else if (typeof value === 'string') {
1926
+ result[newKey] = value;
1927
+ }
1928
+ });
1929
+ }
1930
+ function customFlattenColorPalette(colors) {
1931
+ if (!colors || typeof colors !== 'object') return {};
1932
+ const result = {};
1933
+ flattenObject(colors, '', result);
1934
+ return result;
1935
+ }
1936
+ function moduleExists(modulePath) {
1937
+ try {
1938
+ require.resolve(modulePath);
1939
+ return true;
1940
+ } catch (_unused) {
1941
+ return false;
1942
+ }
1943
+ }
1944
+ function flattenColorPalette(colors) {
1945
+ if (!moduleExists('tailwindcss/lib/util/flattenColorPalette')) {
1946
+ return customFlattenColorPalette(colors);
1947
+ }
1948
+ try {
1949
+ const {
1950
+ default: twFlattenColorPalette
1951
+ } = require('tailwindcss/lib/util/flattenColorPalette');
1952
+ return twFlattenColorPalette(colors);
1953
+ } catch (_unused2) {
1954
+ return customFlattenColorPalette(colors);
1955
+ }
1956
+ }
1957
+
1958
+ const ColorMix = plugin(function ({
1959
+ matchUtilities,
1960
+ theme
1961
+ }) {
1962
+ matchUtilities({
1963
+ 'bg-hover': value => blendColor({
1964
+ color: value,
1965
+ base: 'var(--bq-hover)'
1966
+ }),
1967
+ 'bg-active': value => blendColor({
1968
+ color: value,
1969
+ base: 'var(--bq-active)'
1970
+ }),
1971
+ 'border-hover': value => blendColor({
1972
+ color: value,
1973
+ base: 'var(--bq-hover)',
1974
+ property: 'border-color'
1975
+ }),
1976
+ 'border-active': value => blendColor({
1977
+ color: value,
1978
+ base: 'var(--bq-active)',
1979
+ property: 'border-color'
1980
+ }),
1981
+ 'text-hover': value => blendColor({
1982
+ color: value,
1983
+ base: 'var(--bq-hover)',
1984
+ property: 'color'
1985
+ }),
1986
+ 'text-active': value => blendColor({
1987
+ color: value,
1988
+ base: 'var(--bq-active)',
1989
+ property: 'color'
1990
+ })
1991
+ }, {
1992
+ values: flattenColorPalette(theme('colors'))
1993
+ });
1994
+ matchUtilities({
1995
+ 'bg-hover': value => blendColor({
1996
+ color: value,
1997
+ base: 'var(--bq-hover)'
1998
+ }),
1999
+ 'bg-active': value => blendColor({
2000
+ color: value,
2001
+ base: 'var(--bq-active)'
2002
+ })
2003
+ }, {
2004
+ values: flattenColorPalette(theme('backgroundColor'))
2005
+ });
2006
+ matchUtilities({
2007
+ 'border-hover': value => blendColor({
2008
+ color: value,
2009
+ base: 'var(--bq-hover)',
2010
+ property: 'border-color'
2011
+ }),
2012
+ 'border-active': value => blendColor({
2013
+ color: value,
2014
+ base: 'var(--bq-active)',
2015
+ property: 'border-color'
2016
+ })
2017
+ }, {
2018
+ values: flattenColorPalette(theme('borderColor'))
2019
+ });
2020
+ matchUtilities({
2021
+ 'text-hover': value => blendColor({
2022
+ color: value,
2023
+ base: 'var(--bq-hover)',
2024
+ property: 'color'
2025
+ }),
2026
+ 'text-active': value => blendColor({
2027
+ color: value,
2028
+ base: 'var(--bq-active)',
2029
+ property: 'color'
2030
+ })
2031
+ }, {
2032
+ values: flattenColorPalette(theme('textColor'))
2033
+ });
2034
+ matchUtilities({
2035
+ 'stroke-hover': value => blendColor({
2036
+ color: value,
2037
+ base: 'var(--bq-hover)',
2038
+ property: 'color'
2039
+ }),
2040
+ 'stroke-active': value => blendColor({
2041
+ color: value,
2042
+ base: 'var(--bq-active)',
2043
+ property: 'color'
2044
+ })
2045
+ }, {
2046
+ values: flattenColorPalette(theme('stroke'))
2047
+ });
2048
+ });
2049
+
2050
+ const LogicalProperties = plugin(function ({
2051
+ matchUtilities,
2052
+ theme
2053
+ }) {
2054
+ matchUtilities({
2055
+ 'border-bl': value => ({
2056
+ 'border-block-width': value
2057
+ }),
2058
+ 'border-bs': value => ({
2059
+ 'border-block-start-width': value
2060
+ }),
2061
+ 'border-be': value => ({
2062
+ 'border-block-end-width': value
2063
+ }),
2064
+ 'border-i': value => ({
2065
+ 'border-inline-width': value
2066
+ }),
2067
+ 'border-is': value => ({
2068
+ 'border-inline-start-width': value
2069
+ }),
2070
+ 'border-ie': value => ({
2071
+ 'border-inline-end-width': value
2072
+ })
2073
+ }, {
2074
+ values: theme('borderWidth')
2075
+ });
2076
+ matchUtilities({
2077
+ 'border-bl': value => ({
2078
+ 'border-block-color': value
2079
+ }),
2080
+ 'border-bs': value => ({
2081
+ 'border-block-start-color': value
2082
+ }),
2083
+ 'border-be': value => ({
2084
+ 'border-block-end-color': value
2085
+ }),
2086
+ 'border-i': value => ({
2087
+ 'border-inline-color': value
2088
+ }),
2089
+ 'border-is': value => ({
2090
+ 'border-inline-start-color': value
2091
+ }),
2092
+ 'border-ie': value => ({
2093
+ 'border-inline-end-color': value
2094
+ })
2095
+ }, {
2096
+ values: flattenColorPalette(theme('colors'))
2097
+ });
2098
+ matchUtilities({
2099
+ bs: value => ({
2100
+ 'block-size': value
2101
+ }),
2102
+ 'max-bs': value => ({
2103
+ 'max-block-size': value
2104
+ }),
2105
+ 'min-bs': value => ({
2106
+ 'min-block-size': value
2107
+ }),
2108
+ is: value => ({
2109
+ 'inline-size': value
2110
+ }),
2111
+ 'max-is': value => ({
2112
+ 'max-inline-size': value
2113
+ }),
2114
+ 'min-is': value => ({
2115
+ 'min-inline-size': value
2116
+ })
2117
+ }, {
2118
+ values: theme('width')
2119
+ });
2120
+ matchUtilities({
2121
+ 'border-bl': value => ({
2122
+ 'border-block': value
2123
+ }),
2124
+ 'border-bs': value => ({
2125
+ 'border-block-start': value
2126
+ }),
2127
+ 'border-be': value => ({
2128
+ 'border-block-end': value
2129
+ }),
2130
+ 'border-i': value => ({
2131
+ 'border-inline': value
2132
+ }),
2133
+ 'border-is': value => ({
2134
+ 'border-inline-start': value
2135
+ }),
2136
+ 'border-ie': value => ({
2137
+ 'border-inline-end': value
2138
+ }),
2139
+ 'p-b': value => ({
2140
+ 'padding-block': value
2141
+ }),
2142
+ 'p-bs': value => ({
2143
+ 'padding-block-start': value
2144
+ }),
2145
+ 'p-be': value => ({
2146
+ 'padding-block-end': value
2147
+ }),
2148
+ 'p-i': value => ({
2149
+ 'padding-inline': value
2150
+ })
2151
+ }, {
2152
+ values: theme('spacing')
2153
+ });
2154
+ matchUtilities({
2155
+ 'inset-b': value => ({
2156
+ 'inset-block': value
2157
+ }),
2158
+ 'inset-bs': value => ({
2159
+ 'inset-block-start': value
2160
+ }),
2161
+ 'inset-be': value => ({
2162
+ 'inset-block-end': value
2163
+ }),
2164
+ 'inset-i': value => ({
2165
+ 'inset-inline': value
2166
+ }),
2167
+ 'inset-is': value => ({
2168
+ 'inset-inline-start': value
2169
+ }),
2170
+ 'inset-ie': value => ({
2171
+ 'inset-inline-end': value
2172
+ }),
2173
+ 'm-b': value => ({
2174
+ 'margin-block': value
2175
+ }),
2176
+ 'm-bs': value => ({
2177
+ 'margin-block-start': value
2178
+ }),
2179
+ 'm-be': value => ({
2180
+ 'margin-block-end': value
2181
+ }),
2182
+ 'm-i': value => ({
2183
+ 'margin-inline': value
2184
+ })
2185
+ }, {
2186
+ values: theme('spacing'),
2187
+ supportsNegativeValues: true
2188
+ });
2189
+ });
2190
+
2191
+ var NATIVE_BIND = functionBindNative;
2192
+
2193
+ var FunctionPrototype = Function.prototype;
2194
+ var apply$2 = FunctionPrototype.apply;
2195
+ var call$4 = FunctionPrototype.call;
2196
+
2197
+ // eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
2198
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$2) : function () {
2199
+ return call$4.apply(apply$2, arguments);
2200
+ });
2201
+
2202
+ var defineProperty = objectDefineProperty.f;
2203
+
2204
+ var proxyAccessor$1 = function (Target, Source, key) {
2205
+ key in Target || defineProperty(Target, key, {
2206
+ configurable: true,
2207
+ get: function () { return Source[key]; },
2208
+ set: function (it) { Source[key] = it; }
2209
+ });
2210
+ };
2211
+
2212
+ var isCallable = isCallable$g;
2213
+ var isObject$1 = isObject$a;
2214
+ var setPrototypeOf$1 = objectSetPrototypeOf;
2215
+
2216
+ // makes subclassing work correct for wrapped built-ins
2217
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
2218
+ var NewTarget, NewTargetPrototype;
2219
+ if (
2220
+ // it can work only with native `setPrototypeOf`
2221
+ setPrototypeOf$1 &&
2222
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
2223
+ isCallable(NewTarget = dummy.constructor) &&
2224
+ NewTarget !== Wrapper &&
2225
+ isObject$1(NewTargetPrototype = NewTarget.prototype) &&
2226
+ NewTargetPrototype !== Wrapper.prototype
2227
+ ) setPrototypeOf$1($this, NewTargetPrototype);
2228
+ return $this;
2229
+ };
2230
+
2231
+ var classof = classof$2;
2232
+
2233
+ var $String = String;
2234
+
2235
+ var toString$1 = function (argument) {
2236
+ if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2237
+ return $String(argument);
2238
+ };
2239
+
2240
+ var toString = toString$1;
2241
+
2242
+ var normalizeStringArgument$1 = function (argument, $default) {
2243
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
2244
+ };
2245
+
2246
+ var isObject = isObject$a;
2247
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
2248
+
2249
+ // `InstallErrorCause` abstract operation
2250
+ // https://tc39.es/ecma262/#sec-installerrorcause
2251
+ var installErrorCause$1 = function (O, options) {
2252
+ if (isObject(options) && 'cause' in options) {
2253
+ createNonEnumerableProperty$3(O, 'cause', options.cause);
2254
+ }
2255
+ };
2256
+
2257
+ var uncurryThis$2 = functionUncurryThis;
2258
+
2259
+ var $Error = Error;
2260
+ var replace = uncurryThis$2(''.replace);
2261
+
2262
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
2263
+ // eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
2264
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
2265
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
2266
+
2267
+ var errorStackClear = function (stack, dropEntries) {
2268
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
2269
+ while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
2270
+ } return stack;
2271
+ };
2272
+
2273
+ var fails$3 = fails$f;
2274
+ var createPropertyDescriptor = createPropertyDescriptor$5;
2275
+
2276
+ var errorStackInstallable = !fails$3(function () {
2277
+ var error = new Error('a');
2278
+ if (!('stack' in error)) return true;
2279
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
2280
+ Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
2281
+ return error.stack !== 7;
2282
+ });
2283
+
2284
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
2285
+ var clearErrorStack = errorStackClear;
2286
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
2287
+
2288
+ // non-standard V8
2289
+ // eslint-disable-next-line es/no-nonstandard-error-properties -- safe
2290
+ var captureStackTrace = Error.captureStackTrace;
2291
+
2292
+ var errorStackInstall = function (error, C, stack, dropEntries) {
2293
+ if (ERROR_STACK_INSTALLABLE) {
2294
+ if (captureStackTrace) captureStackTrace(error, C);
2295
+ else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
2296
+ }
2297
+ };
2298
+
2299
+ var getBuiltIn$1 = getBuiltIn$5;
2300
+ var hasOwn = hasOwnProperty_1;
2301
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
2302
+ var isPrototypeOf = objectIsPrototypeOf;
2303
+ var setPrototypeOf = objectSetPrototypeOf;
2304
+ var copyConstructorProperties = copyConstructorProperties$2;
2305
+ var proxyAccessor = proxyAccessor$1;
2306
+ var inheritIfRequired = inheritIfRequired$1;
2307
+ var normalizeStringArgument = normalizeStringArgument$1;
2308
+ var installErrorCause = installErrorCause$1;
2309
+ var installErrorStack = errorStackInstall;
2310
+ var DESCRIPTORS = descriptors;
2311
+
2312
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
2313
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
2314
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
2315
+ var path = FULL_NAME.split('.');
2316
+ var ERROR_NAME = path[path.length - 1];
2317
+ var OriginalError = getBuiltIn$1.apply(null, path);
2318
+
2319
+ if (!OriginalError) return;
2320
+
2321
+ var OriginalErrorPrototype = OriginalError.prototype;
2322
+
2323
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
2324
+ if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
2325
+
2326
+ if (!FORCED) return OriginalError;
2327
+
2328
+ var BaseError = getBuiltIn$1('Error');
2329
+
2330
+ var WrappedError = wrapper(function (a, b) {
2331
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
2332
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
2333
+ if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
2334
+ installErrorStack(result, WrappedError, result.stack, 2);
2335
+ if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
2336
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
2337
+ return result;
2338
+ });
2339
+
2340
+ WrappedError.prototype = OriginalErrorPrototype;
2341
+
2342
+ if (ERROR_NAME !== 'Error') {
2343
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
2344
+ else copyConstructorProperties(WrappedError, BaseError, { name: true });
2345
+ } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
2346
+ proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
2347
+ proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
2348
+ }
2349
+
2350
+ copyConstructorProperties(WrappedError, OriginalError);
2351
+
2352
+ try {
2353
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
2354
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
2355
+ createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
2356
+ }
2357
+ OriginalErrorPrototype.constructor = WrappedError;
2358
+ } catch (error) { /* empty */ }
2359
+
2360
+ return WrappedError;
2361
+ };
2362
+
2363
+ /* eslint-disable no-unused-vars -- required for functions `.length` */
2364
+ var $$a = _export;
2365
+ var globalThis$1 = globalThis_1;
2366
+ var apply$1 = functionApply;
2367
+ var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
2368
+
2369
+ var WEB_ASSEMBLY = 'WebAssembly';
2370
+ var WebAssembly = globalThis$1[WEB_ASSEMBLY];
2371
+
2372
+ // eslint-disable-next-line es/no-error-cause -- feature detection
2373
+ var FORCED$4 = new Error('e', { cause: 7 }).cause !== 7;
2374
+
2375
+ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
2376
+ var O = {};
2377
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$4);
2378
+ $$a({ global: true, constructor: true, arity: 1, forced: FORCED$4 }, O);
2379
+ };
2380
+
2381
+ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
2382
+ if (WebAssembly && WebAssembly[ERROR_NAME]) {
2383
+ var O = {};
2384
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$4);
2385
+ $$a({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$4 }, O);
2386
+ }
2387
+ };
2388
+
2389
+ // https://tc39.es/ecma262/#sec-nativeerror
2390
+ exportGlobalErrorCauseWrapper('Error', function (init) {
2391
+ return function Error(message) { return apply$1(init, this, arguments); };
2392
+ });
2393
+ exportGlobalErrorCauseWrapper('EvalError', function (init) {
2394
+ return function EvalError(message) { return apply$1(init, this, arguments); };
2395
+ });
2396
+ exportGlobalErrorCauseWrapper('RangeError', function (init) {
2397
+ return function RangeError(message) { return apply$1(init, this, arguments); };
2398
+ });
2399
+ exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
2400
+ return function ReferenceError(message) { return apply$1(init, this, arguments); };
2401
+ });
2402
+ exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
2403
+ return function SyntaxError(message) { return apply$1(init, this, arguments); };
2404
+ });
2405
+ exportGlobalErrorCauseWrapper('TypeError', function (init) {
2406
+ return function TypeError(message) { return apply$1(init, this, arguments); };
2407
+ });
2408
+ exportGlobalErrorCauseWrapper('URIError', function (init) {
2409
+ return function URIError(message) { return apply$1(init, this, arguments); };
2410
+ });
2411
+ exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
2412
+ return function CompileError(message) { return apply$1(init, this, arguments); };
2413
+ });
2414
+ exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
2415
+ return function LinkError(message) { return apply$1(init, this, arguments); };
2416
+ });
2417
+ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
2418
+ return function RuntimeError(message) { return apply$1(init, this, arguments); };
2419
+ });
2420
+
2421
+ var defineBuiltIn = defineBuiltIn$4;
2422
+
2423
+ var defineBuiltIns$1 = function (target, src, options) {
2424
+ for (var key in src) defineBuiltIn(target, key, src[key], options);
2425
+ return target;
2426
+ };
2427
+
2428
+ var iteratorClose$6 = iteratorClose$9;
2429
+
2430
+ var iteratorCloseAll$1 = function (iters, kind, value) {
2431
+ for (var i = iters.length - 1; i >= 0; i--) {
2432
+ if (iters[i] === undefined) continue;
2433
+ try {
2434
+ value = iteratorClose$6(iters[i].iterator, kind, value);
2435
+ } catch (error) {
2436
+ kind = 'throw';
2437
+ value = error;
2438
+ }
2439
+ }
2440
+ if (kind === 'throw') throw value;
2441
+ return value;
2442
+ };
2443
+
2444
+ var call$3 = functionCall;
2445
+ var create = objectCreate;
2446
+ var createNonEnumerableProperty = createNonEnumerableProperty$8;
2447
+ var defineBuiltIns = defineBuiltIns$1;
2448
+ var wellKnownSymbol = wellKnownSymbol$c;
2449
+ var InternalStateModule = internalState;
2450
+ var getMethod = getMethod$4;
2451
+ var IteratorPrototype = iteratorsCore.IteratorPrototype;
2452
+ var createIterResultObject = createIterResultObject$2;
2453
+ var iteratorClose$5 = iteratorClose$9;
2454
+ var iteratorCloseAll = iteratorCloseAll$1;
2455
+
2456
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2457
+ var ITERATOR_HELPER = 'IteratorHelper';
2458
+ var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
2459
+ var NORMAL = 'normal';
2460
+ var THROW = 'throw';
2461
+ var setInternalState = InternalStateModule.set;
2462
+
2463
+ var createIteratorProxyPrototype = function (IS_ITERATOR) {
2464
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
2465
+
2466
+ return defineBuiltIns(create(IteratorPrototype), {
2467
+ next: function next() {
2468
+ var state = getInternalState(this);
2469
+ // for simplification:
2470
+ // for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
2471
+ // for `%IteratorHelperPrototype%.next` - just a value
2472
+ if (IS_ITERATOR) return state.nextHandler();
2473
+ if (state.done) return createIterResultObject(undefined, true);
2474
+ try {
2475
+ var result = state.nextHandler();
2476
+ return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
2477
+ } catch (error) {
2478
+ state.done = true;
2479
+ throw error;
2480
+ }
2481
+ },
2482
+ 'return': function () {
2483
+ var state = getInternalState(this);
2484
+ var iterator = state.iterator;
2485
+ state.done = true;
2486
+ if (IS_ITERATOR) {
2487
+ var returnMethod = getMethod(iterator, 'return');
2488
+ return returnMethod ? call$3(returnMethod, iterator) : createIterResultObject(undefined, true);
2489
+ }
2490
+ if (state.inner) try {
2491
+ iteratorClose$5(state.inner.iterator, NORMAL);
2492
+ } catch (error) {
2493
+ return iteratorClose$5(iterator, THROW, error);
2494
+ }
2495
+ if (state.openIters) try {
2496
+ iteratorCloseAll(state.openIters, NORMAL);
2497
+ } catch (error) {
2498
+ return iteratorClose$5(iterator, THROW, error);
2499
+ }
2500
+ if (iterator) iteratorClose$5(iterator, NORMAL);
2501
+ return createIterResultObject(undefined, true);
2502
+ }
2503
+ });
2504
+ };
2505
+
2506
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
2507
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
2508
+
2509
+ createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
2510
+
2511
+ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
2512
+ var IteratorProxy = function Iterator(record, state) {
2513
+ if (state) {
2514
+ state.iterator = record.iterator;
2515
+ state.next = record.next;
2516
+ } else state = record;
2517
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
2518
+ state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
2519
+ state.nextHandler = nextHandler;
2520
+ state.counter = 0;
2521
+ state.done = false;
2522
+ setInternalState(this, state);
2523
+ };
2524
+
2525
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
2526
+
2527
+ return IteratorProxy;
2528
+ };
2529
+
2530
+ var anObject$3 = anObject$d;
2531
+ var iteratorClose$4 = iteratorClose$9;
2532
+
2533
+ // call something on iterator step with safe closing on error
2534
+ var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
2535
+ try {
2536
+ return ENTRIES ? fn(anObject$3(value)[0], value[1]) : fn(value);
2537
+ } catch (error) {
2538
+ iteratorClose$4(iterator, 'throw', error);
2539
+ }
2540
+ };
2541
+
2542
+ // Should throw an error on invalid iterator
2543
+ // https://issues.chromium.org/issues/336839115
2544
+ var iteratorHelperThrowsOnInvalidIterator$1 = function (methodName, argument) {
2545
+ // eslint-disable-next-line es/no-iterator -- required for testing
2546
+ var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
2547
+ if (method) try {
2548
+ method.call({ next: null }, argument).next();
2549
+ } catch (error) {
2550
+ return true;
2551
+ }
2552
+ };
2553
+
2554
+ var $$9 = _export;
2555
+ var call$2 = functionCall;
2556
+ var aCallable$2 = aCallable$8;
2557
+ var anObject$2 = anObject$d;
2558
+ var getIteratorDirect$2 = getIteratorDirect$4;
2559
+ var createIteratorProxy = iteratorCreateProxy;
2560
+ var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
2561
+ var iteratorClose$3 = iteratorClose$9;
2562
+ var iteratorHelperThrowsOnInvalidIterator = iteratorHelperThrowsOnInvalidIterator$1;
2563
+ var iteratorHelperWithoutClosingOnEarlyError$1 = iteratorHelperWithoutClosingOnEarlyError$3;
2564
+
2565
+ var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
2566
+ var mapWithoutClosingOnEarlyError = !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
2567
+ && iteratorHelperWithoutClosingOnEarlyError$1('map', TypeError);
2568
+
2569
+ var FORCED$3 = MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
2570
+
2571
+ var IteratorProxy = createIteratorProxy(function () {
2572
+ var iterator = this.iterator;
2573
+ var result = anObject$2(call$2(this.next, iterator));
2574
+ var done = this.done = !!result.done;
2575
+ if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
2576
+ });
2577
+
2578
+ // `Iterator.prototype.map` method
2579
+ // https://tc39.es/ecma262/#sec-iterator.prototype.map
2580
+ $$9({ target: 'Iterator', proto: true, real: true, forced: FORCED$3 }, {
2581
+ map: function map(mapper) {
2582
+ anObject$2(this);
2583
+ try {
2584
+ aCallable$2(mapper);
2585
+ } catch (error) {
2586
+ iteratorClose$3(this, 'throw', error);
2587
+ }
2588
+
2589
+ if (mapWithoutClosingOnEarlyError) return call$2(mapWithoutClosingOnEarlyError, this, mapper);
2590
+
2591
+ return new IteratorProxy(getIteratorDirect$2(this), {
2592
+ mapper: mapper
2593
+ });
2594
+ }
2595
+ });
2596
+
2597
+ var $$8 = _export;
2598
+ var iterate$3 = iterate$5;
2599
+ var aCallable$1 = aCallable$8;
2600
+ var anObject$1 = anObject$d;
2601
+ var getIteratorDirect$1 = getIteratorDirect$4;
2602
+ var iteratorClose$2 = iteratorClose$9;
2603
+ var iteratorHelperWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError$3;
2604
+ var apply = functionApply;
2605
+ var fails$2 = fails$f;
2606
+
2607
+ var $TypeError$1 = TypeError;
2608
+
2609
+ // https://bugs.webkit.org/show_bug.cgi?id=291651
2610
+ var FAILS_ON_INITIAL_UNDEFINED = fails$2(function () {
2611
+ // eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing
2612
+ [].keys().reduce(function () { /* empty */ }, undefined);
2613
+ });
2614
+
2615
+ var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError$1);
2616
+
2617
+ // `Iterator.prototype.reduce` method
2618
+ // https://tc39.es/ecma262/#sec-iterator.prototype.reduce
2619
+ $$8({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {
2620
+ reduce: function reduce(reducer /* , initialValue */) {
2621
+ anObject$1(this);
2622
+ try {
2623
+ aCallable$1(reducer);
2624
+ } catch (error) {
2625
+ iteratorClose$2(this, 'throw', error);
2626
+ }
2627
+
2628
+ var noInitial = arguments.length < 2;
2629
+ var accumulator = noInitial ? undefined : arguments[1];
2630
+ if (reduceWithoutClosingOnEarlyError) {
2631
+ return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
2632
+ }
2633
+ var record = getIteratorDirect$1(this);
2634
+ var counter = 0;
2635
+ iterate$3(record, function (value) {
2636
+ if (noInitial) {
2637
+ noInitial = false;
2638
+ accumulator = value;
2639
+ } else {
2640
+ accumulator = reducer(accumulator, value, counter);
2641
+ }
2642
+ counter++;
2643
+ }, { IS_RECORD: true });
2644
+ if (noInitial) throw new $TypeError$1('Reduce of empty iterator with no initial value');
2645
+ return accumulator;
2646
+ }
2647
+ });
2648
+
2649
+ var $$7 = _export;
2650
+ var iterate$2 = iterate$5;
2651
+ var createProperty = createProperty$2;
2652
+
2653
+ // `Object.fromEntries` method
2654
+ // https://tc39.es/ecma262/#sec-object.fromentries
2655
+ $$7({ target: 'Object', stat: true }, {
2656
+ fromEntries: function fromEntries(iterable) {
2657
+ var obj = {};
2658
+ iterate$2(iterable, function (k, v) {
2659
+ createProperty(obj, k, v);
2660
+ }, { AS_ENTRIES: true });
2661
+ return obj;
2662
+ }
2663
+ });
2664
+
2665
+ var uncurryThis$1 = functionUncurryThis;
2666
+
2667
+ // eslint-disable-next-line es/no-set -- safe
2668
+ var SetPrototype$1 = Set.prototype;
2669
+
2670
+ var setHelpers = {
2671
+ // eslint-disable-next-line es/no-set -- safe
2672
+ Set: Set,
2673
+ add: uncurryThis$1(SetPrototype$1.add),
2674
+ has: uncurryThis$1(SetPrototype$1.has),
2675
+ remove: uncurryThis$1(SetPrototype$1['delete']),
2676
+ proto: SetPrototype$1
2677
+ };
2678
+
2679
+ var has$5 = setHelpers.has;
2680
+
2681
+ // Perform ? RequireInternalSlot(M, [[SetData]])
2682
+ var aSet$7 = function (it) {
2683
+ has$5(it);
2684
+ return it;
2685
+ };
2686
+
2687
+ var call$1 = functionCall;
2688
+
2689
+ var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
2690
+ var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
2691
+ var next = record.next;
2692
+ var step, result;
2693
+ while (!(step = call$1(next, iterator)).done) {
2694
+ result = fn(step.value);
2695
+ if (result !== undefined) return result;
2696
+ }
2697
+ };
2698
+
2699
+ var uncurryThis = functionUncurryThis;
2700
+ var iterateSimple$6 = iterateSimple$7;
2701
+ var SetHelpers$5 = setHelpers;
2702
+
2703
+ var Set$3 = SetHelpers$5.Set;
2704
+ var SetPrototype = SetHelpers$5.proto;
2705
+ var forEach = uncurryThis(SetPrototype.forEach);
2706
+ var keys = uncurryThis(SetPrototype.keys);
2707
+ var next = keys(new Set$3()).next;
2708
+
2709
+ var setIterate = function (set, fn, interruptible) {
2710
+ return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
2711
+ };
2712
+
2713
+ var SetHelpers$4 = setHelpers;
2714
+ var iterate$1 = setIterate;
2715
+
2716
+ var Set$2 = SetHelpers$4.Set;
2717
+ var add$3 = SetHelpers$4.add;
2718
+
2719
+ var setClone = function (set) {
2720
+ var result = new Set$2();
2721
+ iterate$1(set, function (it) {
2722
+ add$3(result, it);
2723
+ });
2724
+ return result;
2725
+ };
2726
+
2727
+ var uncurryThisAccessor = functionUncurryThisAccessor;
2728
+ var SetHelpers$3 = setHelpers;
2729
+
2730
+ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
2731
+ return set.size;
2732
+ };
2733
+
2734
+ var aCallable = aCallable$8;
2735
+ var anObject = anObject$d;
2736
+ var call = functionCall;
2737
+ var toIntegerOrInfinity = toIntegerOrInfinity$3;
2738
+ var getIteratorDirect = getIteratorDirect$4;
2739
+
2740
+ var INVALID_SIZE = 'Invalid size';
2741
+ var $RangeError = RangeError;
2742
+ var $TypeError = TypeError;
2743
+ var max = Math.max;
2744
+
2745
+ var SetRecord = function (set, intSize) {
2746
+ this.set = set;
2747
+ this.size = max(intSize, 0);
2748
+ this.has = aCallable(set.has);
2425
2749
  this.keys = aCallable(set.keys);
2426
2750
  };
2427
2751
 
2428
2752
  SetRecord.prototype = {
2429
2753
  getIterator: function () {
2430
- return getIteratorDirect(anObject(call$1(this.keys, this.set)));
2754
+ return getIteratorDirect(anObject(call(this.keys, this.set)));
2431
2755
  },
2432
2756
  includes: function (it) {
2433
- return call$1(this.has, this.set, it);
2757
+ return call(this.has, this.set, it);
2434
2758
  }
2435
2759
  };
2436
2760
 
@@ -2506,606 +2830,314 @@ var createSetLikeWithInfinitySize = function (size) {
2506
2830
  var setMethodAcceptSetLike$7 = function (name, callback) {
2507
2831
  var Set = getBuiltIn('Set');
2508
2832
  try {
2509
- new Set()[name](createSetLike(0));
2510
- try {
2511
- // late spec change, early WebKit ~ Safari 17 implementation does not pass it
2512
- // https://github.com/tc39/proposal-set-methods/pull/88
2513
- // also covered engines with
2514
- // https://bugs.webkit.org/show_bug.cgi?id=272679
2515
- new Set()[name](createSetLike(-1));
2516
- return false;
2517
- } catch (error2) {
2518
- if (!callback) return true;
2519
- // early V8 implementation bug
2520
- // https://issues.chromium.org/issues/351332634
2521
- try {
2522
- new Set()[name](createSetLikeWithInfinitySize(-Infinity));
2523
- return false;
2524
- } catch (error) {
2525
- var set = new Set();
2526
- set.add(1);
2527
- set.add(2);
2528
- return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
2529
- }
2530
- }
2531
- } catch (error) {
2532
- return false;
2533
- }
2534
- };
2535
-
2536
- var $$7 = _export;
2537
- var difference = setDifference;
2538
- var fails$1 = fails$f;
2539
- var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
2540
-
2541
- var SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike$6('difference', function (result) {
2542
- return result.size === 0;
2543
- });
2544
-
2545
- var FORCED$2 = SET_LIKE_INCORRECT_BEHAVIOR || fails$1(function () {
2546
- // https://bugs.webkit.org/show_bug.cgi?id=288595
2547
- var setLike = {
2548
- size: 1,
2549
- has: function () { return true; },
2550
- keys: function () {
2551
- var index = 0;
2552
- return {
2553
- next: function () {
2554
- var done = index++ > 1;
2555
- if (baseSet.has(1)) baseSet.clear();
2556
- return { done: done, value: 2 };
2557
- }
2558
- };
2559
- }
2560
- };
2561
- // eslint-disable-next-line es/no-set -- testing
2562
- var baseSet = new Set([1, 2, 3, 4]);
2563
- // eslint-disable-next-line es/no-set-prototype-difference -- testing
2564
- return baseSet.difference(setLike).size !== 3;
2565
- });
2566
-
2567
- // `Set.prototype.difference` method
2568
- // https://tc39.es/ecma262/#sec-set.prototype.difference
2569
- $$7({ target: 'Set', proto: true, real: true, forced: FORCED$2 }, {
2570
- difference: difference
2571
- });
2572
-
2573
- var aSet$5 = aSet$7;
2574
- var SetHelpers$1 = setHelpers;
2575
- var size$3 = setSize;
2576
- var getSetRecord$5 = getSetRecord$7;
2577
- var iterateSet$1 = setIterate;
2578
- var iterateSimple$4 = iterateSimple$7;
2579
-
2580
- var Set$1 = SetHelpers$1.Set;
2581
- var add$2 = SetHelpers$1.add;
2582
- var has$3 = SetHelpers$1.has;
2583
-
2584
- // `Set.prototype.intersection` method
2585
- // https://tc39.es/ecma262/#sec-set.prototype.intersection
2586
- var setIntersection = function intersection(other) {
2587
- var O = aSet$5(this);
2588
- var otherRec = getSetRecord$5(other);
2589
- var result = new Set$1();
2590
-
2591
- if (size$3(O) > otherRec.size) {
2592
- iterateSimple$4(otherRec.getIterator(), function (e) {
2593
- if (has$3(O, e)) add$2(result, e);
2594
- });
2595
- } else {
2596
- iterateSet$1(O, function (e) {
2597
- if (otherRec.includes(e)) add$2(result, e);
2598
- });
2599
- }
2600
-
2601
- return result;
2602
- };
2603
-
2604
- var $$6 = _export;
2605
- var fails = fails$f;
2606
- var intersection = setIntersection;
2607
- var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
2608
-
2609
- var INCORRECT$3 = !setMethodAcceptSetLike$5('intersection', function (result) {
2610
- return result.size === 2 && result.has(1) && result.has(2);
2611
- }) || fails(function () {
2612
- // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
2613
- return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
2614
- });
2615
-
2616
- // `Set.prototype.intersection` method
2617
- // https://tc39.es/ecma262/#sec-set.prototype.intersection
2618
- $$6({ target: 'Set', proto: true, real: true, forced: INCORRECT$3 }, {
2619
- intersection: intersection
2620
- });
2621
-
2622
- var aSet$4 = aSet$7;
2623
- var has$2 = setHelpers.has;
2624
- var size$2 = setSize;
2625
- var getSetRecord$4 = getSetRecord$7;
2626
- var iterateSet = setIterate;
2627
- var iterateSimple$3 = iterateSimple$7;
2628
- var iteratorClose$1 = iteratorClose$9;
2629
-
2630
- // `Set.prototype.isDisjointFrom` method
2631
- // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
2632
- var setIsDisjointFrom = function isDisjointFrom(other) {
2633
- var O = aSet$4(this);
2634
- var otherRec = getSetRecord$4(other);
2635
- if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
2636
- if (otherRec.includes(e)) return false;
2637
- }, true) !== false;
2638
- var iterator = otherRec.getIterator();
2639
- return iterateSimple$3(iterator, function (e) {
2640
- if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
2641
- }) !== false;
2642
- };
2643
-
2644
- var $$5 = _export;
2645
- var isDisjointFrom = setIsDisjointFrom;
2646
- var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
2647
-
2648
- var INCORRECT$2 = !setMethodAcceptSetLike$4('isDisjointFrom', function (result) {
2649
- return !result;
2650
- });
2651
-
2652
- // `Set.prototype.isDisjointFrom` method
2653
- // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
2654
- $$5({ target: 'Set', proto: true, real: true, forced: INCORRECT$2 }, {
2655
- isDisjointFrom: isDisjointFrom
2656
- });
2657
-
2658
- var aSet$3 = aSet$7;
2659
- var size$1 = setSize;
2660
- var iterate = setIterate;
2661
- var getSetRecord$3 = getSetRecord$7;
2662
-
2663
- // `Set.prototype.isSubsetOf` method
2664
- // https://tc39.es/ecma262/#sec-set.prototype.issubsetof
2665
- var setIsSubsetOf = function isSubsetOf(other) {
2666
- var O = aSet$3(this);
2667
- var otherRec = getSetRecord$3(other);
2668
- if (size$1(O) > otherRec.size) return false;
2669
- return iterate(O, function (e) {
2670
- if (!otherRec.includes(e)) return false;
2671
- }, true) !== false;
2672
- };
2673
-
2674
- var $$4 = _export;
2675
- var isSubsetOf = setIsSubsetOf;
2676
- var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
2677
-
2678
- var INCORRECT$1 = !setMethodAcceptSetLike$3('isSubsetOf', function (result) {
2679
- return result;
2680
- });
2681
-
2682
- // `Set.prototype.isSubsetOf` method
2683
- // https://tc39.es/ecma262/#sec-set.prototype.issubsetof
2684
- $$4({ target: 'Set', proto: true, real: true, forced: INCORRECT$1 }, {
2685
- isSubsetOf: isSubsetOf
2686
- });
2687
-
2688
- var aSet$2 = aSet$7;
2689
- var has$1 = setHelpers.has;
2690
- var size = setSize;
2691
- var getSetRecord$2 = getSetRecord$7;
2692
- var iterateSimple$2 = iterateSimple$7;
2693
- var iteratorClose = iteratorClose$9;
2694
-
2695
- // `Set.prototype.isSupersetOf` method
2696
- // https://tc39.es/ecma262/#sec-set.prototype.issupersetof
2697
- var setIsSupersetOf = function isSupersetOf(other) {
2698
- var O = aSet$2(this);
2699
- var otherRec = getSetRecord$2(other);
2700
- if (size(O) < otherRec.size) return false;
2701
- var iterator = otherRec.getIterator();
2702
- return iterateSimple$2(iterator, function (e) {
2703
- if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
2704
- }) !== false;
2705
- };
2706
-
2707
- var $$3 = _export;
2708
- var isSupersetOf = setIsSupersetOf;
2709
- var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
2710
-
2711
- var INCORRECT = !setMethodAcceptSetLike$2('isSupersetOf', function (result) {
2712
- return !result;
2713
- });
2714
-
2715
- // `Set.prototype.isSupersetOf` method
2716
- // https://tc39.es/ecma262/#sec-set.prototype.issupersetof
2717
- $$3({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
2718
- isSupersetOf: isSupersetOf
2719
- });
2720
-
2721
- var aSet$1 = aSet$7;
2722
- var SetHelpers = setHelpers;
2723
- var clone$1 = setClone;
2724
- var getSetRecord$1 = getSetRecord$7;
2725
- var iterateSimple$1 = iterateSimple$7;
2726
-
2727
- var add$1 = SetHelpers.add;
2728
- var has = SetHelpers.has;
2729
- var remove = SetHelpers.remove;
2730
-
2731
- // `Set.prototype.symmetricDifference` method
2732
- // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
2733
- var setSymmetricDifference = function symmetricDifference(other) {
2734
- var O = aSet$1(this);
2735
- var keysIter = getSetRecord$1(other).getIterator();
2736
- var result = clone$1(O);
2737
- iterateSimple$1(keysIter, function (e) {
2738
- if (has(O, e)) remove(result, e);
2739
- else add$1(result, e);
2740
- });
2741
- return result;
2742
- };
2743
-
2744
- // Should get iterator record of a set-like object before cloning this
2745
- // https://bugs.webkit.org/show_bug.cgi?id=289430
2746
- var setMethodGetKeysBeforeCloningDetection = function (METHOD_NAME) {
2747
- try {
2748
- // eslint-disable-next-line es/no-set -- needed for test
2749
- var baseSet = new Set();
2750
- var setLike = {
2751
- size: 0,
2752
- has: function () { return true; },
2753
- keys: function () {
2754
- // eslint-disable-next-line es/no-object-defineproperty -- needed for test
2755
- return Object.defineProperty({}, 'next', {
2756
- get: function () {
2757
- baseSet.clear();
2758
- baseSet.add(4);
2759
- return function () {
2760
- return { done: true };
2761
- };
2762
- }
2763
- });
2833
+ new Set()[name](createSetLike(0));
2834
+ try {
2835
+ // late spec change, early WebKit ~ Safari 17 implementation does not pass it
2836
+ // https://github.com/tc39/proposal-set-methods/pull/88
2837
+ // also covered engines with
2838
+ // https://bugs.webkit.org/show_bug.cgi?id=272679
2839
+ new Set()[name](createSetLike(-1));
2840
+ return false;
2841
+ } catch (error2) {
2842
+ if (!callback) return true;
2843
+ // early V8 implementation bug
2844
+ // https://issues.chromium.org/issues/351332634
2845
+ try {
2846
+ new Set()[name](createSetLikeWithInfinitySize(-Infinity));
2847
+ return false;
2848
+ } catch (error) {
2849
+ var set = new Set();
2850
+ set.add(1);
2851
+ set.add(2);
2852
+ return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
2764
2853
  }
2765
- };
2766
- var result = baseSet[METHOD_NAME](setLike);
2767
-
2768
- return result.size === 1 && result.values().next().value === 4;
2854
+ }
2769
2855
  } catch (error) {
2770
2856
  return false;
2771
2857
  }
2772
2858
  };
2773
2859
 
2774
- var $$2 = _export;
2775
- var symmetricDifference = setSymmetricDifference;
2776
- var setMethodGetKeysBeforeCloning$1 = setMethodGetKeysBeforeCloningDetection;
2777
- var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
2778
-
2779
- var FORCED$1 = !setMethodAcceptSetLike$1('symmetricDifference') || !setMethodGetKeysBeforeCloning$1('symmetricDifference');
2860
+ var $$6 = _export;
2861
+ var difference = setDifference;
2862
+ var fails$1 = fails$f;
2863
+ var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
2780
2864
 
2781
- // `Set.prototype.symmetricDifference` method
2782
- // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
2783
- $$2({ target: 'Set', proto: true, real: true, forced: FORCED$1 }, {
2784
- symmetricDifference: symmetricDifference
2865
+ var SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike$6('difference', function (result) {
2866
+ return result.size === 0;
2785
2867
  });
2786
2868
 
2787
- var aSet = aSet$7;
2788
- var add = setHelpers.add;
2789
- var clone = setClone;
2790
- var getSetRecord = getSetRecord$7;
2791
- var iterateSimple = iterateSimple$7;
2792
-
2793
- // `Set.prototype.union` method
2794
- // https://tc39.es/ecma262/#sec-set.prototype.union
2795
- var setUnion = function union(other) {
2796
- var O = aSet(this);
2797
- var keysIter = getSetRecord(other).getIterator();
2798
- var result = clone(O);
2799
- iterateSimple(keysIter, function (it) {
2800
- add(result, it);
2801
- });
2802
- return result;
2803
- };
2804
-
2805
- var $$1 = _export;
2806
- var union = setUnion;
2807
- var setMethodGetKeysBeforeCloning = setMethodGetKeysBeforeCloningDetection;
2808
- var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
2809
-
2810
- var FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union');
2811
-
2812
- // `Set.prototype.union` method
2813
- // https://tc39.es/ecma262/#sec-set.prototype.union
2814
- $$1({ target: 'Set', proto: true, real: true, forced: FORCED }, {
2815
- union: union
2869
+ var FORCED$2 = SET_LIKE_INCORRECT_BEHAVIOR || fails$1(function () {
2870
+ // https://bugs.webkit.org/show_bug.cgi?id=288595
2871
+ var setLike = {
2872
+ size: 1,
2873
+ has: function () { return true; },
2874
+ keys: function () {
2875
+ var index = 0;
2876
+ return {
2877
+ next: function () {
2878
+ var done = index++ > 1;
2879
+ if (baseSet.has(1)) baseSet.clear();
2880
+ return { done: done, value: 2 };
2881
+ }
2882
+ };
2883
+ }
2884
+ };
2885
+ // eslint-disable-next-line es/no-set -- testing
2886
+ var baseSet = new Set([1, 2, 3, 4]);
2887
+ // eslint-disable-next-line es/no-set-prototype-difference -- testing
2888
+ return baseSet.difference(setLike).size !== 3;
2816
2889
  });
2817
2890
 
2818
- // iterable DOM collections
2819
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2820
- var domIterables = {
2821
- CSSRuleList: 0,
2822
- CSSStyleDeclaration: 0,
2823
- CSSValueList: 0,
2824
- ClientRectList: 0,
2825
- DOMRectList: 0,
2826
- DOMStringList: 0,
2827
- DOMTokenList: 1,
2828
- DataTransferItemList: 0,
2829
- FileList: 0,
2830
- HTMLAllCollection: 0,
2831
- HTMLCollection: 0,
2832
- HTMLFormElement: 0,
2833
- HTMLSelectElement: 0,
2834
- MediaList: 0,
2835
- MimeTypeArray: 0,
2836
- NamedNodeMap: 0,
2837
- NodeList: 1,
2838
- PaintRequestList: 0,
2839
- Plugin: 0,
2840
- PluginArray: 0,
2841
- SVGLengthList: 0,
2842
- SVGNumberList: 0,
2843
- SVGPathSegList: 0,
2844
- SVGPointList: 0,
2845
- SVGStringList: 0,
2846
- SVGTransformList: 0,
2847
- SourceBufferList: 0,
2848
- StyleSheetList: 0,
2849
- TextTrackCueList: 0,
2850
- TextTrackList: 0,
2851
- TouchList: 0
2852
- };
2891
+ // `Set.prototype.difference` method
2892
+ // https://tc39.es/ecma262/#sec-set.prototype.difference
2893
+ $$6({ target: 'Set', proto: true, real: true, forced: FORCED$2 }, {
2894
+ difference: difference
2895
+ });
2853
2896
 
2854
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2855
- var documentCreateElement = documentCreateElement$2;
2897
+ var aSet$5 = aSet$7;
2898
+ var SetHelpers$1 = setHelpers;
2899
+ var size$3 = setSize;
2900
+ var getSetRecord$5 = getSetRecord$7;
2901
+ var iterateSet$1 = setIterate;
2902
+ var iterateSimple$4 = iterateSimple$7;
2856
2903
 
2857
- var classList = documentCreateElement('span').classList;
2858
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2904
+ var Set$1 = SetHelpers$1.Set;
2905
+ var add$2 = SetHelpers$1.add;
2906
+ var has$3 = SetHelpers$1.has;
2859
2907
 
2860
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2908
+ // `Set.prototype.intersection` method
2909
+ // https://tc39.es/ecma262/#sec-set.prototype.intersection
2910
+ var setIntersection = function intersection(other) {
2911
+ var O = aSet$5(this);
2912
+ var otherRec = getSetRecord$5(other);
2913
+ var result = new Set$1();
2861
2914
 
2862
- var wellKnownSymbol$3 = wellKnownSymbol$c;
2863
- var create$1 = objectCreate;
2864
- var defineProperty$2 = objectDefineProperty.f;
2915
+ if (size$3(O) > otherRec.size) {
2916
+ iterateSimple$4(otherRec.getIterator(), function (e) {
2917
+ if (has$3(O, e)) add$2(result, e);
2918
+ });
2919
+ } else {
2920
+ iterateSet$1(O, function (e) {
2921
+ if (otherRec.includes(e)) add$2(result, e);
2922
+ });
2923
+ }
2865
2924
 
2866
- var UNSCOPABLES = wellKnownSymbol$3('unscopables');
2867
- var ArrayPrototype = Array.prototype;
2925
+ return result;
2926
+ };
2868
2927
 
2869
- // Array.prototype[@@unscopables]
2870
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2871
- if (ArrayPrototype[UNSCOPABLES] === undefined) {
2872
- defineProperty$2(ArrayPrototype, UNSCOPABLES, {
2873
- configurable: true,
2874
- value: create$1(null)
2875
- });
2876
- }
2928
+ var $$5 = _export;
2929
+ var fails = fails$f;
2930
+ var intersection = setIntersection;
2931
+ var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
2877
2932
 
2878
- // add a key to Array.prototype[@@unscopables]
2879
- var addToUnscopables$1 = function (key) {
2880
- ArrayPrototype[UNSCOPABLES][key] = true;
2881
- };
2933
+ var INCORRECT$3 = !setMethodAcceptSetLike$5('intersection', function (result) {
2934
+ return result.size === 2 && result.has(1) && result.has(2);
2935
+ }) || fails(function () {
2936
+ // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
2937
+ return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
2938
+ });
2882
2939
 
2883
- var defineProperty$1 = objectDefineProperty.f;
2884
- var hasOwn = hasOwnProperty_1;
2885
- var wellKnownSymbol$2 = wellKnownSymbol$c;
2940
+ // `Set.prototype.intersection` method
2941
+ // https://tc39.es/ecma262/#sec-set.prototype.intersection
2942
+ $$5({ target: 'Set', proto: true, real: true, forced: INCORRECT$3 }, {
2943
+ intersection: intersection
2944
+ });
2886
2945
 
2887
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
2946
+ var aSet$4 = aSet$7;
2947
+ var has$2 = setHelpers.has;
2948
+ var size$2 = setSize;
2949
+ var getSetRecord$4 = getSetRecord$7;
2950
+ var iterateSet = setIterate;
2951
+ var iterateSimple$3 = iterateSimple$7;
2952
+ var iteratorClose$1 = iteratorClose$9;
2888
2953
 
2889
- var setToStringTag$3 = function (target, TAG, STATIC) {
2890
- if (target && !STATIC) target = target.prototype;
2891
- if (target && !hasOwn(target, TO_STRING_TAG)) {
2892
- defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
2893
- }
2954
+ // `Set.prototype.isDisjointFrom` method
2955
+ // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
2956
+ var setIsDisjointFrom = function isDisjointFrom(other) {
2957
+ var O = aSet$4(this);
2958
+ var otherRec = getSetRecord$4(other);
2959
+ if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
2960
+ if (otherRec.includes(e)) return false;
2961
+ }, true) !== false;
2962
+ var iterator = otherRec.getIterator();
2963
+ return iterateSimple$3(iterator, function (e) {
2964
+ if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
2965
+ }) !== false;
2894
2966
  };
2895
2967
 
2896
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
2897
- var create = objectCreate;
2898
- var createPropertyDescriptor = createPropertyDescriptor$5;
2899
- var setToStringTag$2 = setToStringTag$3;
2900
- var Iterators$2 = iterators;
2968
+ var $$4 = _export;
2969
+ var isDisjointFrom = setIsDisjointFrom;
2970
+ var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
2901
2971
 
2902
- var returnThis$1 = function () { return this; };
2972
+ var INCORRECT$2 = !setMethodAcceptSetLike$4('isDisjointFrom', function (result) {
2973
+ return !result;
2974
+ });
2903
2975
 
2904
- var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
2905
- var TO_STRING_TAG = NAME + ' Iterator';
2906
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
2907
- setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
2908
- Iterators$2[TO_STRING_TAG] = returnThis$1;
2909
- return IteratorConstructor;
2910
- };
2976
+ // `Set.prototype.isDisjointFrom` method
2977
+ // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
2978
+ $$4({ target: 'Set', proto: true, real: true, forced: INCORRECT$2 }, {
2979
+ isDisjointFrom: isDisjointFrom
2980
+ });
2911
2981
 
2912
- var $ = _export;
2913
- var call = functionCall;
2914
- var FunctionName = functionName;
2915
- var isCallable = isCallable$g;
2916
- var createIteratorConstructor = iteratorCreateConstructor;
2917
- var getPrototypeOf = objectGetPrototypeOf;
2918
- var setPrototypeOf = objectSetPrototypeOf;
2919
- var setToStringTag$1 = setToStringTag$3;
2920
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
2921
- var defineBuiltIn = defineBuiltIn$4;
2922
- var wellKnownSymbol$1 = wellKnownSymbol$c;
2923
- var Iterators$1 = iterators;
2924
- var IteratorsCore = iteratorsCore;
2982
+ var aSet$3 = aSet$7;
2983
+ var size$1 = setSize;
2984
+ var iterate = setIterate;
2985
+ var getSetRecord$3 = getSetRecord$7;
2925
2986
 
2926
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2927
- var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2928
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
2929
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2930
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
2931
- var KEYS = 'keys';
2932
- var VALUES = 'values';
2933
- var ENTRIES = 'entries';
2987
+ // `Set.prototype.isSubsetOf` method
2988
+ // https://tc39.es/ecma262/#sec-set.prototype.issubsetof
2989
+ var setIsSubsetOf = function isSubsetOf(other) {
2990
+ var O = aSet$3(this);
2991
+ var otherRec = getSetRecord$3(other);
2992
+ if (size$1(O) > otherRec.size) return false;
2993
+ return iterate(O, function (e) {
2994
+ if (!otherRec.includes(e)) return false;
2995
+ }, true) !== false;
2996
+ };
2934
2997
 
2935
- var returnThis = function () { return this; };
2998
+ var $$3 = _export;
2999
+ var isSubsetOf = setIsSubsetOf;
3000
+ var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
2936
3001
 
2937
- var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
2938
- createIteratorConstructor(IteratorConstructor, NAME, next);
3002
+ var INCORRECT$1 = !setMethodAcceptSetLike$3('isSubsetOf', function (result) {
3003
+ return result;
3004
+ });
2939
3005
 
2940
- var getIterationMethod = function (KIND) {
2941
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
2942
- if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
3006
+ // `Set.prototype.isSubsetOf` method
3007
+ // https://tc39.es/ecma262/#sec-set.prototype.issubsetof
3008
+ $$3({ target: 'Set', proto: true, real: true, forced: INCORRECT$1 }, {
3009
+ isSubsetOf: isSubsetOf
3010
+ });
2943
3011
 
2944
- switch (KIND) {
2945
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
2946
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
2947
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
2948
- }
3012
+ var aSet$2 = aSet$7;
3013
+ var has$1 = setHelpers.has;
3014
+ var size = setSize;
3015
+ var getSetRecord$2 = getSetRecord$7;
3016
+ var iterateSimple$2 = iterateSimple$7;
3017
+ var iteratorClose = iteratorClose$9;
2949
3018
 
2950
- return function () { return new IteratorConstructor(this); };
2951
- };
3019
+ // `Set.prototype.isSupersetOf` method
3020
+ // https://tc39.es/ecma262/#sec-set.prototype.issupersetof
3021
+ var setIsSupersetOf = function isSupersetOf(other) {
3022
+ var O = aSet$2(this);
3023
+ var otherRec = getSetRecord$2(other);
3024
+ if (size(O) < otherRec.size) return false;
3025
+ var iterator = otherRec.getIterator();
3026
+ return iterateSimple$2(iterator, function (e) {
3027
+ if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
3028
+ }) !== false;
3029
+ };
2952
3030
 
2953
- var TO_STRING_TAG = NAME + ' Iterator';
2954
- var INCORRECT_VALUES_NAME = false;
2955
- var IterablePrototype = Iterable.prototype;
2956
- var nativeIterator = IterablePrototype[ITERATOR$1]
2957
- || IterablePrototype['@@iterator']
2958
- || DEFAULT && IterablePrototype[DEFAULT];
2959
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
2960
- var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
2961
- var CurrentIteratorPrototype, methods, KEY;
3031
+ var $$2 = _export;
3032
+ var isSupersetOf = setIsSupersetOf;
3033
+ var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
2962
3034
 
2963
- // fix native
2964
- if (anyNativeIterator) {
2965
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
2966
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
2967
- if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
2968
- if (setPrototypeOf) {
2969
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
2970
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
2971
- defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
2972
- }
2973
- }
2974
- // Set @@toStringTag to native iterators
2975
- setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
2976
- }
2977
- }
3035
+ var INCORRECT = !setMethodAcceptSetLike$2('isSupersetOf', function (result) {
3036
+ return !result;
3037
+ });
2978
3038
 
2979
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
2980
- if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
2981
- if (CONFIGURABLE_FUNCTION_NAME) {
2982
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
2983
- } else {
2984
- INCORRECT_VALUES_NAME = true;
2985
- defaultIterator = function values() { return call(nativeIterator, this); };
2986
- }
2987
- }
3039
+ // `Set.prototype.isSupersetOf` method
3040
+ // https://tc39.es/ecma262/#sec-set.prototype.issupersetof
3041
+ $$2({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
3042
+ isSupersetOf: isSupersetOf
3043
+ });
2988
3044
 
2989
- // export additional methods
2990
- if (DEFAULT) {
2991
- methods = {
2992
- values: getIterationMethod(VALUES),
2993
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
2994
- entries: getIterationMethod(ENTRIES)
2995
- };
2996
- if (FORCED) for (KEY in methods) {
2997
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2998
- defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
2999
- }
3000
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3001
- }
3045
+ var aSet$1 = aSet$7;
3046
+ var SetHelpers = setHelpers;
3047
+ var clone$1 = setClone;
3048
+ var getSetRecord$1 = getSetRecord$7;
3049
+ var iterateSimple$1 = iterateSimple$7;
3002
3050
 
3003
- // define iterator
3004
- if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
3005
- defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
3006
- }
3007
- Iterators$1[NAME] = defaultIterator;
3051
+ var add$1 = SetHelpers.add;
3052
+ var has = SetHelpers.has;
3053
+ var remove = SetHelpers.remove;
3008
3054
 
3009
- return methods;
3055
+ // `Set.prototype.symmetricDifference` method
3056
+ // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
3057
+ var setSymmetricDifference = function symmetricDifference(other) {
3058
+ var O = aSet$1(this);
3059
+ var keysIter = getSetRecord$1(other).getIterator();
3060
+ var result = clone$1(O);
3061
+ iterateSimple$1(keysIter, function (e) {
3062
+ if (has(O, e)) remove(result, e);
3063
+ else add$1(result, e);
3064
+ });
3065
+ return result;
3010
3066
  };
3011
3067
 
3012
- var toIndexedObject = toIndexedObject$5;
3013
- var addToUnscopables = addToUnscopables$1;
3014
- var Iterators = iterators;
3015
- var InternalStateModule = internalState;
3016
- var defineProperty = objectDefineProperty.f;
3017
- var defineIterator = iteratorDefine;
3018
- var createIterResultObject = createIterResultObject$2;
3019
- var DESCRIPTORS = descriptors;
3020
-
3021
- var ARRAY_ITERATOR = 'Array Iterator';
3022
- var setInternalState = InternalStateModule.set;
3023
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
3068
+ // Should get iterator record of a set-like object before cloning this
3069
+ // https://bugs.webkit.org/show_bug.cgi?id=289430
3070
+ var setMethodGetKeysBeforeCloningDetection = function (METHOD_NAME) {
3071
+ try {
3072
+ // eslint-disable-next-line es/no-set -- needed for test
3073
+ var baseSet = new Set();
3074
+ var setLike = {
3075
+ size: 0,
3076
+ has: function () { return true; },
3077
+ keys: function () {
3078
+ // eslint-disable-next-line es/no-object-defineproperty -- needed for test
3079
+ return Object.defineProperty({}, 'next', {
3080
+ get: function () {
3081
+ baseSet.clear();
3082
+ baseSet.add(4);
3083
+ return function () {
3084
+ return { done: true };
3085
+ };
3086
+ }
3087
+ });
3088
+ }
3089
+ };
3090
+ var result = baseSet[METHOD_NAME](setLike);
3024
3091
 
3025
- // `Array.prototype.entries` method
3026
- // https://tc39.es/ecma262/#sec-array.prototype.entries
3027
- // `Array.prototype.keys` method
3028
- // https://tc39.es/ecma262/#sec-array.prototype.keys
3029
- // `Array.prototype.values` method
3030
- // https://tc39.es/ecma262/#sec-array.prototype.values
3031
- // `Array.prototype[@@iterator]` method
3032
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
3033
- // `CreateArrayIterator` internal method
3034
- // https://tc39.es/ecma262/#sec-createarrayiterator
3035
- var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
3036
- setInternalState(this, {
3037
- type: ARRAY_ITERATOR,
3038
- target: toIndexedObject(iterated), // target
3039
- index: 0, // next index
3040
- kind: kind // kind
3041
- });
3042
- // `%ArrayIteratorPrototype%.next` method
3043
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
3044
- }, function () {
3045
- var state = getInternalState(this);
3046
- var target = state.target;
3047
- var index = state.index++;
3048
- if (!target || index >= target.length) {
3049
- state.target = null;
3050
- return createIterResultObject(undefined, true);
3092
+ return result.size === 1 && result.values().next().value === 4;
3093
+ } catch (error) {
3094
+ return false;
3051
3095
  }
3052
- switch (state.kind) {
3053
- case 'keys': return createIterResultObject(index, false);
3054
- case 'values': return createIterResultObject(target[index], false);
3055
- } return createIterResultObject([index, target[index]], false);
3056
- }, 'values');
3057
-
3058
- // argumentsList[@@iterator] is %ArrayProto_values%
3059
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
3060
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
3061
- var values = Iterators.Arguments = Iterators.Array;
3096
+ };
3062
3097
 
3063
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3064
- addToUnscopables('keys');
3065
- addToUnscopables('values');
3066
- addToUnscopables('entries');
3098
+ var $$1 = _export;
3099
+ var symmetricDifference = setSymmetricDifference;
3100
+ var setMethodGetKeysBeforeCloning$1 = setMethodGetKeysBeforeCloningDetection;
3101
+ var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
3067
3102
 
3068
- // V8 ~ Chrome 45- bug
3069
- if (DESCRIPTORS && values.name !== 'values') try {
3070
- defineProperty(values, 'name', { value: 'values' });
3071
- } catch (error) { /* empty */ }
3103
+ var FORCED$1 = !setMethodAcceptSetLike$1('symmetricDifference') || !setMethodGetKeysBeforeCloning$1('symmetricDifference');
3072
3104
 
3073
- var globalThis$1 = globalThis_1;
3074
- var DOMIterables = domIterables;
3075
- var DOMTokenListPrototype = domTokenListPrototype;
3076
- var ArrayIteratorMethods = es_array_iterator;
3077
- var createNonEnumerableProperty = createNonEnumerableProperty$8;
3078
- var setToStringTag = setToStringTag$3;
3079
- var wellKnownSymbol = wellKnownSymbol$c;
3105
+ // `Set.prototype.symmetricDifference` method
3106
+ // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
3107
+ $$1({ target: 'Set', proto: true, real: true, forced: FORCED$1 }, {
3108
+ symmetricDifference: symmetricDifference
3109
+ });
3080
3110
 
3081
- var ITERATOR = wellKnownSymbol('iterator');
3082
- var ArrayValues = ArrayIteratorMethods.values;
3111
+ var aSet = aSet$7;
3112
+ var add = setHelpers.add;
3113
+ var clone = setClone;
3114
+ var getSetRecord = getSetRecord$7;
3115
+ var iterateSimple = iterateSimple$7;
3083
3116
 
3084
- var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3085
- if (CollectionPrototype) {
3086
- // some Chrome versions have non-configurable methods on DOMTokenList
3087
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
3088
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
3089
- } catch (error) {
3090
- CollectionPrototype[ITERATOR] = ArrayValues;
3091
- }
3092
- setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
3093
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3094
- // some Chrome versions have non-configurable methods on DOMTokenList
3095
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3096
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3097
- } catch (error) {
3098
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3099
- }
3100
- }
3101
- }
3117
+ // `Set.prototype.union` method
3118
+ // https://tc39.es/ecma262/#sec-set.prototype.union
3119
+ var setUnion = function union(other) {
3120
+ var O = aSet(this);
3121
+ var keysIter = getSetRecord(other).getIterator();
3122
+ var result = clone(O);
3123
+ iterateSimple(keysIter, function (it) {
3124
+ add(result, it);
3125
+ });
3126
+ return result;
3102
3127
  };
3103
3128
 
3104
- for (var COLLECTION_NAME in DOMIterables) {
3105
- handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
3106
- }
3129
+ var $ = _export;
3130
+ var union = setUnion;
3131
+ var setMethodGetKeysBeforeCloning = setMethodGetKeysBeforeCloningDetection;
3132
+ var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
3107
3133
 
3108
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3134
+ var FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union');
3135
+
3136
+ // `Set.prototype.union` method
3137
+ // https://tc39.es/ecma262/#sec-set.prototype.union
3138
+ $({ target: 'Set', proto: true, real: true, forced: FORCED }, {
3139
+ union: union
3140
+ });
3109
3141
 
3110
3142
  const cache = new Map();
3111
3143
  const processVariables = (theme, prefix, cacheKey) => {