UNPKG

65.4 kBJavaScriptView Raw
1var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
3function createCommonjsModule(fn, module) {
4 return module = { exports: {} }, fn(module, module.exports), module.exports;
5}
6
7var O = 'object';
8var check = function (it) {
9 return it && it.Math == Math && it;
10};
11
12// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
13var global_1 =
14 // eslint-disable-next-line no-undef
15 check(typeof globalThis == O && globalThis) ||
16 check(typeof window == O && window) ||
17 check(typeof self == O && self) ||
18 check(typeof commonjsGlobal == O && commonjsGlobal) ||
19 // eslint-disable-next-line no-new-func
20 Function('return this')();
21
22var fails = function (exec) {
23 try {
24 return !!exec();
25 } catch (error) {
26 return true;
27 }
28};
29
30// Thank's IE8 for his funny defineProperty
31var descriptors = !fails(function () {
32 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
33});
34
35var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
36var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
37
38// Nashorn ~ JDK8 bug
39var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
40
41// `Object.prototype.propertyIsEnumerable` method implementation
42// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
43var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
44 var descriptor = getOwnPropertyDescriptor(this, V);
45 return !!descriptor && descriptor.enumerable;
46} : nativePropertyIsEnumerable;
47
48var objectPropertyIsEnumerable = {
49 f: f
50};
51
52var createPropertyDescriptor = function (bitmap, value) {
53 return {
54 enumerable: !(bitmap & 1),
55 configurable: !(bitmap & 2),
56 writable: !(bitmap & 4),
57 value: value
58 };
59};
60
61var toString = {}.toString;
62
63var classofRaw = function (it) {
64 return toString.call(it).slice(8, -1);
65};
66
67var split = ''.split;
68
69// fallback for non-array-like ES3 and non-enumerable old V8 strings
70var indexedObject = fails(function () {
71 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
72 // eslint-disable-next-line no-prototype-builtins
73 return !Object('z').propertyIsEnumerable(0);
74}) ? function (it) {
75 return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
76} : Object;
77
78// `RequireObjectCoercible` abstract operation
79// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
80var requireObjectCoercible = function (it) {
81 if (it == undefined) throw TypeError("Can't call method on " + it);
82 return it;
83};
84
85// toObject with fallback for non-array-like ES3 strings
86
87
88
89var toIndexedObject = function (it) {
90 return indexedObject(requireObjectCoercible(it));
91};
92
93var isObject = function (it) {
94 return typeof it === 'object' ? it !== null : typeof it === 'function';
95};
96
97// `ToPrimitive` abstract operation
98// https://tc39.github.io/ecma262/#sec-toprimitive
99// instead of the ES6 spec version, we didn't implement @@toPrimitive case
100// and the second argument - flag - preferred type is a string
101var toPrimitive = function (input, PREFERRED_STRING) {
102 if (!isObject(input)) return input;
103 var fn, val;
104 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
105 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
106 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
107 throw TypeError("Can't convert object to primitive value");
108};
109
110var hasOwnProperty = {}.hasOwnProperty;
111
112var has = function (it, key) {
113 return hasOwnProperty.call(it, key);
114};
115
116var document = global_1.document;
117// typeof document.createElement is 'object' in old IE
118var EXISTS = isObject(document) && isObject(document.createElement);
119
120var documentCreateElement = function (it) {
121 return EXISTS ? document.createElement(it) : {};
122};
123
124// Thank's IE8 for his funny defineProperty
125var ie8DomDefine = !descriptors && !fails(function () {
126 return Object.defineProperty(documentCreateElement('div'), 'a', {
127 get: function () { return 7; }
128 }).a != 7;
129});
130
131var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
132
133// `Object.getOwnPropertyDescriptor` method
134// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
135var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
136 O = toIndexedObject(O);
137 P = toPrimitive(P, true);
138 if (ie8DomDefine) try {
139 return nativeGetOwnPropertyDescriptor(O, P);
140 } catch (error) { /* empty */ }
141 if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
142};
143
144var objectGetOwnPropertyDescriptor = {
145 f: f$1
146};
147
148var anObject = function (it) {
149 if (!isObject(it)) {
150 throw TypeError(String(it) + ' is not an object');
151 } return it;
152};
153
154var nativeDefineProperty = Object.defineProperty;
155
156// `Object.defineProperty` method
157// https://tc39.github.io/ecma262/#sec-object.defineproperty
158var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
159 anObject(O);
160 P = toPrimitive(P, true);
161 anObject(Attributes);
162 if (ie8DomDefine) try {
163 return nativeDefineProperty(O, P, Attributes);
164 } catch (error) { /* empty */ }
165 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
166 if ('value' in Attributes) O[P] = Attributes.value;
167 return O;
168};
169
170var objectDefineProperty = {
171 f: f$2
172};
173
174var hide = descriptors ? function (object, key, value) {
175 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
176} : function (object, key, value) {
177 object[key] = value;
178 return object;
179};
180
181var setGlobal = function (key, value) {
182 try {
183 hide(global_1, key, value);
184 } catch (error) {
185 global_1[key] = value;
186 } return value;
187};
188
189var shared = createCommonjsModule(function (module) {
190var SHARED = '__core-js_shared__';
191var store = global_1[SHARED] || setGlobal(SHARED, {});
192
193(module.exports = function (key, value) {
194 return store[key] || (store[key] = value !== undefined ? value : {});
195})('versions', []).push({
196 version: '3.2.1',
197 mode: 'global',
198 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
199});
200});
201
202var functionToString = shared('native-function-to-string', Function.toString);
203
204var WeakMap = global_1.WeakMap;
205
206var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
207
208var id = 0;
209var postfix = Math.random();
210
211var uid = function (key) {
212 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
213};
214
215var keys = shared('keys');
216
217var sharedKey = function (key) {
218 return keys[key] || (keys[key] = uid(key));
219};
220
221var hiddenKeys = {};
222
223var WeakMap$1 = global_1.WeakMap;
224var set, get, has$1;
225
226var enforce = function (it) {
227 return has$1(it) ? get(it) : set(it, {});
228};
229
230var getterFor = function (TYPE) {
231 return function (it) {
232 var state;
233 if (!isObject(it) || (state = get(it)).type !== TYPE) {
234 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
235 } return state;
236 };
237};
238
239if (nativeWeakMap) {
240 var store = new WeakMap$1();
241 var wmget = store.get;
242 var wmhas = store.has;
243 var wmset = store.set;
244 set = function (it, metadata) {
245 wmset.call(store, it, metadata);
246 return metadata;
247 };
248 get = function (it) {
249 return wmget.call(store, it) || {};
250 };
251 has$1 = function (it) {
252 return wmhas.call(store, it);
253 };
254} else {
255 var STATE = sharedKey('state');
256 hiddenKeys[STATE] = true;
257 set = function (it, metadata) {
258 hide(it, STATE, metadata);
259 return metadata;
260 };
261 get = function (it) {
262 return has(it, STATE) ? it[STATE] : {};
263 };
264 has$1 = function (it) {
265 return has(it, STATE);
266 };
267}
268
269var internalState = {
270 set: set,
271 get: get,
272 has: has$1,
273 enforce: enforce,
274 getterFor: getterFor
275};
276
277var redefine = createCommonjsModule(function (module) {
278var getInternalState = internalState.get;
279var enforceInternalState = internalState.enforce;
280var TEMPLATE = String(functionToString).split('toString');
281
282shared('inspectSource', function (it) {
283 return functionToString.call(it);
284});
285
286(module.exports = function (O, key, value, options) {
287 var unsafe = options ? !!options.unsafe : false;
288 var simple = options ? !!options.enumerable : false;
289 var noTargetGet = options ? !!options.noTargetGet : false;
290 if (typeof value == 'function') {
291 if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
292 enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
293 }
294 if (O === global_1) {
295 if (simple) O[key] = value;
296 else setGlobal(key, value);
297 return;
298 } else if (!unsafe) {
299 delete O[key];
300 } else if (!noTargetGet && O[key]) {
301 simple = true;
302 }
303 if (simple) O[key] = value;
304 else hide(O, key, value);
305// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
306})(Function.prototype, 'toString', function toString() {
307 return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
308});
309});
310
311var path = global_1;
312
313var aFunction = function (variable) {
314 return typeof variable == 'function' ? variable : undefined;
315};
316
317var getBuiltIn = function (namespace, method) {
318 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
319 : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
320};
321
322var ceil = Math.ceil;
323var floor = Math.floor;
324
325// `ToInteger` abstract operation
326// https://tc39.github.io/ecma262/#sec-tointeger
327var toInteger = function (argument) {
328 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
329};
330
331var min = Math.min;
332
333// `ToLength` abstract operation
334// https://tc39.github.io/ecma262/#sec-tolength
335var toLength = function (argument) {
336 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
337};
338
339var max = Math.max;
340var min$1 = Math.min;
341
342// Helper for a popular repeating case of the spec:
343// Let integer be ? ToInteger(index).
344// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
345var toAbsoluteIndex = function (index, length) {
346 var integer = toInteger(index);
347 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
348};
349
350// `Array.prototype.{ indexOf, includes }` methods implementation
351var createMethod = function (IS_INCLUDES) {
352 return function ($this, el, fromIndex) {
353 var O = toIndexedObject($this);
354 var length = toLength(O.length);
355 var index = toAbsoluteIndex(fromIndex, length);
356 var value;
357 // Array#includes uses SameValueZero equality algorithm
358 // eslint-disable-next-line no-self-compare
359 if (IS_INCLUDES && el != el) while (length > index) {
360 value = O[index++];
361 // eslint-disable-next-line no-self-compare
362 if (value != value) return true;
363 // Array#indexOf ignores holes, Array#includes - not
364 } else for (;length > index; index++) {
365 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
366 } return !IS_INCLUDES && -1;
367 };
368};
369
370var arrayIncludes = {
371 // `Array.prototype.includes` method
372 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
373 includes: createMethod(true),
374 // `Array.prototype.indexOf` method
375 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
376 indexOf: createMethod(false)
377};
378
379var indexOf = arrayIncludes.indexOf;
380
381
382var objectKeysInternal = function (object, names) {
383 var O = toIndexedObject(object);
384 var i = 0;
385 var result = [];
386 var key;
387 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
388 // Don't enum bug & hidden keys
389 while (names.length > i) if (has(O, key = names[i++])) {
390 ~indexOf(result, key) || result.push(key);
391 }
392 return result;
393};
394
395// IE8- don't enum bug keys
396var enumBugKeys = [
397 'constructor',
398 'hasOwnProperty',
399 'isPrototypeOf',
400 'propertyIsEnumerable',
401 'toLocaleString',
402 'toString',
403 'valueOf'
404];
405
406var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
407
408// `Object.getOwnPropertyNames` method
409// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
410var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
411 return objectKeysInternal(O, hiddenKeys$1);
412};
413
414var objectGetOwnPropertyNames = {
415 f: f$3
416};
417
418var f$4 = Object.getOwnPropertySymbols;
419
420var objectGetOwnPropertySymbols = {
421 f: f$4
422};
423
424// all object keys, includes non-enumerable and symbols
425var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
426 var keys = objectGetOwnPropertyNames.f(anObject(it));
427 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
428 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
429};
430
431var copyConstructorProperties = function (target, source) {
432 var keys = ownKeys(source);
433 var defineProperty = objectDefineProperty.f;
434 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
435 for (var i = 0; i < keys.length; i++) {
436 var key = keys[i];
437 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
438 }
439};
440
441var replacement = /#|\.prototype\./;
442
443var isForced = function (feature, detection) {
444 var value = data[normalize(feature)];
445 return value == POLYFILL ? true
446 : value == NATIVE ? false
447 : typeof detection == 'function' ? fails(detection)
448 : !!detection;
449};
450
451var normalize = isForced.normalize = function (string) {
452 return String(string).replace(replacement, '.').toLowerCase();
453};
454
455var data = isForced.data = {};
456var NATIVE = isForced.NATIVE = 'N';
457var POLYFILL = isForced.POLYFILL = 'P';
458
459var isForced_1 = isForced;
460
461var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
462
463
464
465
466
467
468/*
469 options.target - name of the target object
470 options.global - target is the global object
471 options.stat - export as static methods of target
472 options.proto - export as prototype methods of target
473 options.real - real prototype method for the `pure` version
474 options.forced - export even if the native feature is available
475 options.bind - bind methods to the target, required for the `pure` version
476 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
477 options.unsafe - use the simple assignment of property instead of delete + defineProperty
478 options.sham - add a flag to not completely full polyfills
479 options.enumerable - export as enumerable property
480 options.noTargetGet - prevent calling a getter on target
481*/
482var _export = function (options, source) {
483 var TARGET = options.target;
484 var GLOBAL = options.global;
485 var STATIC = options.stat;
486 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
487 if (GLOBAL) {
488 target = global_1;
489 } else if (STATIC) {
490 target = global_1[TARGET] || setGlobal(TARGET, {});
491 } else {
492 target = (global_1[TARGET] || {}).prototype;
493 }
494 if (target) for (key in source) {
495 sourceProperty = source[key];
496 if (options.noTargetGet) {
497 descriptor = getOwnPropertyDescriptor$1(target, key);
498 targetProperty = descriptor && descriptor.value;
499 } else targetProperty = target[key];
500 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
501 // contained in target
502 if (!FORCED && targetProperty !== undefined) {
503 if (typeof sourceProperty === typeof targetProperty) continue;
504 copyConstructorProperties(sourceProperty, targetProperty);
505 }
506 // add a flag to not completely full polyfills
507 if (options.sham || (targetProperty && targetProperty.sham)) {
508 hide(sourceProperty, 'sham', true);
509 }
510 // extend global
511 redefine(target, key, sourceProperty, options);
512 }
513};
514
515var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
516 // Chrome 38 Symbol has incorrect toString conversion
517 // eslint-disable-next-line no-undef
518 return !String(Symbol());
519});
520
521// `IsArray` abstract operation
522// https://tc39.github.io/ecma262/#sec-isarray
523var isArray = Array.isArray || function isArray(arg) {
524 return classofRaw(arg) == 'Array';
525};
526
527// `ToObject` abstract operation
528// https://tc39.github.io/ecma262/#sec-toobject
529var toObject = function (argument) {
530 return Object(requireObjectCoercible(argument));
531};
532
533// `Object.keys` method
534// https://tc39.github.io/ecma262/#sec-object.keys
535var objectKeys = Object.keys || function keys(O) {
536 return objectKeysInternal(O, enumBugKeys);
537};
538
539// `Object.defineProperties` method
540// https://tc39.github.io/ecma262/#sec-object.defineproperties
541var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
542 anObject(O);
543 var keys = objectKeys(Properties);
544 var length = keys.length;
545 var index = 0;
546 var key;
547 while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
548 return O;
549};
550
551var html = getBuiltIn('document', 'documentElement');
552
553var IE_PROTO = sharedKey('IE_PROTO');
554
555var PROTOTYPE = 'prototype';
556var Empty = function () { /* empty */ };
557
558// Create object with fake `null` prototype: use iframe Object with cleared prototype
559var createDict = function () {
560 // Thrash, waste and sodomy: IE GC bug
561 var iframe = documentCreateElement('iframe');
562 var length = enumBugKeys.length;
563 var lt = '<';
564 var script = 'script';
565 var gt = '>';
566 var js = 'java' + script + ':';
567 var iframeDocument;
568 iframe.style.display = 'none';
569 html.appendChild(iframe);
570 iframe.src = String(js);
571 iframeDocument = iframe.contentWindow.document;
572 iframeDocument.open();
573 iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
574 iframeDocument.close();
575 createDict = iframeDocument.F;
576 while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
577 return createDict();
578};
579
580// `Object.create` method
581// https://tc39.github.io/ecma262/#sec-object.create
582var objectCreate = Object.create || function create(O, Properties) {
583 var result;
584 if (O !== null) {
585 Empty[PROTOTYPE] = anObject(O);
586 result = new Empty();
587 Empty[PROTOTYPE] = null;
588 // add "__proto__" for Object.getPrototypeOf polyfill
589 result[IE_PROTO] = O;
590 } else result = createDict();
591 return Properties === undefined ? result : objectDefineProperties(result, Properties);
592};
593
594hiddenKeys[IE_PROTO] = true;
595
596var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
597
598var toString$1 = {}.toString;
599
600var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
601 ? Object.getOwnPropertyNames(window) : [];
602
603var getWindowNames = function (it) {
604 try {
605 return nativeGetOwnPropertyNames(it);
606 } catch (error) {
607 return windowNames.slice();
608 }
609};
610
611// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
612var f$5 = function getOwnPropertyNames(it) {
613 return windowNames && toString$1.call(it) == '[object Window]'
614 ? getWindowNames(it)
615 : nativeGetOwnPropertyNames(toIndexedObject(it));
616};
617
618var objectGetOwnPropertyNamesExternal = {
619 f: f$5
620};
621
622var Symbol$1 = global_1.Symbol;
623var store$1 = shared('wks');
624
625var wellKnownSymbol = function (name) {
626 return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
627 || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
628};
629
630var f$6 = wellKnownSymbol;
631
632var wrappedWellKnownSymbol = {
633 f: f$6
634};
635
636var defineProperty = objectDefineProperty.f;
637
638var defineWellKnownSymbol = function (NAME) {
639 var Symbol = path.Symbol || (path.Symbol = {});
640 if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
641 value: wrappedWellKnownSymbol.f(NAME)
642 });
643};
644
645var defineProperty$1 = objectDefineProperty.f;
646
647
648
649var TO_STRING_TAG = wellKnownSymbol('toStringTag');
650
651var setToStringTag = function (it, TAG, STATIC) {
652 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
653 defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
654 }
655};
656
657var aFunction$1 = function (it) {
658 if (typeof it != 'function') {
659 throw TypeError(String(it) + ' is not a function');
660 } return it;
661};
662
663// optional / simple context binding
664var bindContext = function (fn, that, length) {
665 aFunction$1(fn);
666 if (that === undefined) return fn;
667 switch (length) {
668 case 0: return function () {
669 return fn.call(that);
670 };
671 case 1: return function (a) {
672 return fn.call(that, a);
673 };
674 case 2: return function (a, b) {
675 return fn.call(that, a, b);
676 };
677 case 3: return function (a, b, c) {
678 return fn.call(that, a, b, c);
679 };
680 }
681 return function (/* ...args */) {
682 return fn.apply(that, arguments);
683 };
684};
685
686var SPECIES = wellKnownSymbol('species');
687
688// `ArraySpeciesCreate` abstract operation
689// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
690var arraySpeciesCreate = function (originalArray, length) {
691 var C;
692 if (isArray(originalArray)) {
693 C = originalArray.constructor;
694 // cross-realm fallback
695 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
696 else if (isObject(C)) {
697 C = C[SPECIES];
698 if (C === null) C = undefined;
699 }
700 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
701};
702
703var push = [].push;
704
705// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
706var createMethod$1 = function (TYPE) {
707 var IS_MAP = TYPE == 1;
708 var IS_FILTER = TYPE == 2;
709 var IS_SOME = TYPE == 3;
710 var IS_EVERY = TYPE == 4;
711 var IS_FIND_INDEX = TYPE == 6;
712 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
713 return function ($this, callbackfn, that, specificCreate) {
714 var O = toObject($this);
715 var self = indexedObject(O);
716 var boundFunction = bindContext(callbackfn, that, 3);
717 var length = toLength(self.length);
718 var index = 0;
719 var create = specificCreate || arraySpeciesCreate;
720 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
721 var value, result;
722 for (;length > index; index++) if (NO_HOLES || index in self) {
723 value = self[index];
724 result = boundFunction(value, index, O);
725 if (TYPE) {
726 if (IS_MAP) target[index] = result; // map
727 else if (result) switch (TYPE) {
728 case 3: return true; // some
729 case 5: return value; // find
730 case 6: return index; // findIndex
731 case 2: push.call(target, value); // filter
732 } else if (IS_EVERY) return false; // every
733 }
734 }
735 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
736 };
737};
738
739var arrayIteration = {
740 // `Array.prototype.forEach` method
741 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
742 forEach: createMethod$1(0),
743 // `Array.prototype.map` method
744 // https://tc39.github.io/ecma262/#sec-array.prototype.map
745 map: createMethod$1(1),
746 // `Array.prototype.filter` method
747 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
748 filter: createMethod$1(2),
749 // `Array.prototype.some` method
750 // https://tc39.github.io/ecma262/#sec-array.prototype.some
751 some: createMethod$1(3),
752 // `Array.prototype.every` method
753 // https://tc39.github.io/ecma262/#sec-array.prototype.every
754 every: createMethod$1(4),
755 // `Array.prototype.find` method
756 // https://tc39.github.io/ecma262/#sec-array.prototype.find
757 find: createMethod$1(5),
758 // `Array.prototype.findIndex` method
759 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
760 findIndex: createMethod$1(6)
761};
762
763var $forEach = arrayIteration.forEach;
764
765var HIDDEN = sharedKey('hidden');
766var SYMBOL = 'Symbol';
767var PROTOTYPE$1 = 'prototype';
768var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
769var setInternalState = internalState.set;
770var getInternalState = internalState.getterFor(SYMBOL);
771var ObjectPrototype = Object[PROTOTYPE$1];
772var $Symbol = global_1.Symbol;
773var JSON = global_1.JSON;
774var nativeJSONStringify = JSON && JSON.stringify;
775var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
776var nativeDefineProperty$1 = objectDefineProperty.f;
777var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
778var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
779var AllSymbols = shared('symbols');
780var ObjectPrototypeSymbols = shared('op-symbols');
781var StringToSymbolRegistry = shared('string-to-symbol-registry');
782var SymbolToStringRegistry = shared('symbol-to-string-registry');
783var WellKnownSymbolsStore = shared('wks');
784var QObject = global_1.QObject;
785// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
786var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
787
788// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
789var setSymbolDescriptor = descriptors && fails(function () {
790 return objectCreate(nativeDefineProperty$1({}, 'a', {
791 get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
792 })).a != 7;
793}) ? function (O, P, Attributes) {
794 var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
795 if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
796 nativeDefineProperty$1(O, P, Attributes);
797 if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
798 nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
799 }
800} : nativeDefineProperty$1;
801
802var wrap = function (tag, description) {
803 var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
804 setInternalState(symbol, {
805 type: SYMBOL,
806 tag: tag,
807 description: description
808 });
809 if (!descriptors) symbol.description = description;
810 return symbol;
811};
812
813var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
814 return typeof it == 'symbol';
815} : function (it) {
816 return Object(it) instanceof $Symbol;
817};
818
819var $defineProperty = function defineProperty(O, P, Attributes) {
820 if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
821 anObject(O);
822 var key = toPrimitive(P, true);
823 anObject(Attributes);
824 if (has(AllSymbols, key)) {
825 if (!Attributes.enumerable) {
826 if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
827 O[HIDDEN][key] = true;
828 } else {
829 if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
830 Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
831 } return setSymbolDescriptor(O, key, Attributes);
832 } return nativeDefineProperty$1(O, key, Attributes);
833};
834
835var $defineProperties = function defineProperties(O, Properties) {
836 anObject(O);
837 var properties = toIndexedObject(Properties);
838 var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
839 $forEach(keys, function (key) {
840 if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
841 });
842 return O;
843};
844
845var $create = function create(O, Properties) {
846 return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
847};
848
849var $propertyIsEnumerable = function propertyIsEnumerable(V) {
850 var P = toPrimitive(V, true);
851 var enumerable = nativePropertyIsEnumerable$1.call(this, P);
852 if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
853 return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
854};
855
856var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
857 var it = toIndexedObject(O);
858 var key = toPrimitive(P, true);
859 if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
860 var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
861 if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
862 descriptor.enumerable = true;
863 }
864 return descriptor;
865};
866
867var $getOwnPropertyNames = function getOwnPropertyNames(O) {
868 var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
869 var result = [];
870 $forEach(names, function (key) {
871 if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
872 });
873 return result;
874};
875
876var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
877 var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
878 var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
879 var result = [];
880 $forEach(names, function (key) {
881 if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
882 result.push(AllSymbols[key]);
883 }
884 });
885 return result;
886};
887
888// `Symbol` constructor
889// https://tc39.github.io/ecma262/#sec-symbol-constructor
890if (!nativeSymbol) {
891 $Symbol = function Symbol() {
892 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
893 var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
894 var tag = uid(description);
895 var setter = function (value) {
896 if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
897 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
898 setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
899 };
900 if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
901 return wrap(tag, description);
902 };
903
904 redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
905 return getInternalState(this).tag;
906 });
907
908 objectPropertyIsEnumerable.f = $propertyIsEnumerable;
909 objectDefineProperty.f = $defineProperty;
910 objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
911 objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
912 objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
913
914 if (descriptors) {
915 // https://github.com/tc39/proposal-Symbol-description
916 nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
917 configurable: true,
918 get: function description() {
919 return getInternalState(this).description;
920 }
921 });
922 {
923 redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
924 }
925 }
926
927 wrappedWellKnownSymbol.f = function (name) {
928 return wrap(wellKnownSymbol(name), name);
929 };
930}
931
932_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
933 Symbol: $Symbol
934});
935
936$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
937 defineWellKnownSymbol(name);
938});
939
940_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
941 // `Symbol.for` method
942 // https://tc39.github.io/ecma262/#sec-symbol.for
943 'for': function (key) {
944 var string = String(key);
945 if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
946 var symbol = $Symbol(string);
947 StringToSymbolRegistry[string] = symbol;
948 SymbolToStringRegistry[symbol] = string;
949 return symbol;
950 },
951 // `Symbol.keyFor` method
952 // https://tc39.github.io/ecma262/#sec-symbol.keyfor
953 keyFor: function keyFor(sym) {
954 if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
955 if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
956 },
957 useSetter: function () { USE_SETTER = true; },
958 useSimple: function () { USE_SETTER = false; }
959});
960
961_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
962 // `Object.create` method
963 // https://tc39.github.io/ecma262/#sec-object.create
964 create: $create,
965 // `Object.defineProperty` method
966 // https://tc39.github.io/ecma262/#sec-object.defineproperty
967 defineProperty: $defineProperty,
968 // `Object.defineProperties` method
969 // https://tc39.github.io/ecma262/#sec-object.defineproperties
970 defineProperties: $defineProperties,
971 // `Object.getOwnPropertyDescriptor` method
972 // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
973 getOwnPropertyDescriptor: $getOwnPropertyDescriptor
974});
975
976_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
977 // `Object.getOwnPropertyNames` method
978 // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
979 getOwnPropertyNames: $getOwnPropertyNames,
980 // `Object.getOwnPropertySymbols` method
981 // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
982 getOwnPropertySymbols: $getOwnPropertySymbols
983});
984
985// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
986// https://bugs.chromium.org/p/v8/issues/detail?id=3443
987_export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
988 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
989 return objectGetOwnPropertySymbols.f(toObject(it));
990 }
991});
992
993// `JSON.stringify` method behavior with symbols
994// https://tc39.github.io/ecma262/#sec-json.stringify
995JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
996 var symbol = $Symbol();
997 // MS Edge converts symbol values to JSON as {}
998 return nativeJSONStringify([symbol]) != '[null]'
999 // WebKit converts symbol values to JSON as null
1000 || nativeJSONStringify({ a: symbol }) != '{}'
1001 // V8 throws on boxed symbols
1002 || nativeJSONStringify(Object(symbol)) != '{}';
1003}) }, {
1004 stringify: function stringify(it) {
1005 var args = [it];
1006 var index = 1;
1007 var replacer, $replacer;
1008 while (arguments.length > index) args.push(arguments[index++]);
1009 $replacer = replacer = args[1];
1010 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1011 if (!isArray(replacer)) replacer = function (key, value) {
1012 if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1013 if (!isSymbol(value)) return value;
1014 };
1015 args[1] = replacer;
1016 return nativeJSONStringify.apply(JSON, args);
1017 }
1018});
1019
1020// `Symbol.prototype[@@toPrimitive]` method
1021// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
1022if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1023// `Symbol.prototype[@@toStringTag]` property
1024// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
1025setToStringTag($Symbol, SYMBOL);
1026
1027hiddenKeys[HIDDEN] = true;
1028
1029var defineProperty$2 = objectDefineProperty.f;
1030
1031
1032var NativeSymbol = global_1.Symbol;
1033
1034if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
1035 // Safari 12 bug
1036 NativeSymbol().description !== undefined
1037)) {
1038 var EmptyStringDescriptionStore = {};
1039 // wrap Symbol constructor for correct work with undefined description
1040 var SymbolWrapper = function Symbol() {
1041 var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
1042 var result = this instanceof SymbolWrapper
1043 ? new NativeSymbol(description)
1044 // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1045 : description === undefined ? NativeSymbol() : NativeSymbol(description);
1046 if (description === '') EmptyStringDescriptionStore[result] = true;
1047 return result;
1048 };
1049 copyConstructorProperties(SymbolWrapper, NativeSymbol);
1050 var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
1051 symbolPrototype.constructor = SymbolWrapper;
1052
1053 var symbolToString = symbolPrototype.toString;
1054 var native = String(NativeSymbol('test')) == 'Symbol(test)';
1055 var regexp = /^Symbol\((.*)\)[^)]+$/;
1056 defineProperty$2(symbolPrototype, 'description', {
1057 configurable: true,
1058 get: function description() {
1059 var symbol = isObject(this) ? this.valueOf() : this;
1060 var string = symbolToString.call(symbol);
1061 if (has(EmptyStringDescriptionStore, symbol)) return '';
1062 var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
1063 return desc === '' ? undefined : desc;
1064 }
1065 });
1066
1067 _export({ global: true, forced: true }, {
1068 Symbol: SymbolWrapper
1069 });
1070}
1071
1072// `Symbol.iterator` well-known symbol
1073// https://tc39.github.io/ecma262/#sec-symbol.iterator
1074defineWellKnownSymbol('iterator');
1075
1076var createProperty = function (object, key, value) {
1077 var propertyKey = toPrimitive(key);
1078 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1079 else object[propertyKey] = value;
1080};
1081
1082var SPECIES$1 = wellKnownSymbol('species');
1083
1084var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1085 return !fails(function () {
1086 var array = [];
1087 var constructor = array.constructor = {};
1088 constructor[SPECIES$1] = function () {
1089 return { foo: 1 };
1090 };
1091 return array[METHOD_NAME](Boolean).foo !== 1;
1092 });
1093};
1094
1095var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1096var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1097var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1098
1099var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
1100 var array = [];
1101 array[IS_CONCAT_SPREADABLE] = false;
1102 return array.concat()[0] !== array;
1103});
1104
1105var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
1106
1107var isConcatSpreadable = function (O) {
1108 if (!isObject(O)) return false;
1109 var spreadable = O[IS_CONCAT_SPREADABLE];
1110 return spreadable !== undefined ? !!spreadable : isArray(O);
1111};
1112
1113var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1114
1115// `Array.prototype.concat` method
1116// https://tc39.github.io/ecma262/#sec-array.prototype.concat
1117// with adding support of @@isConcatSpreadable and @@species
1118_export({ target: 'Array', proto: true, forced: FORCED }, {
1119 concat: function concat(arg) { // eslint-disable-line no-unused-vars
1120 var O = toObject(this);
1121 var A = arraySpeciesCreate(O, 0);
1122 var n = 0;
1123 var i, k, length, len, E;
1124 for (i = -1, length = arguments.length; i < length; i++) {
1125 E = i === -1 ? O : arguments[i];
1126 if (isConcatSpreadable(E)) {
1127 len = toLength(E.length);
1128 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1129 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1130 } else {
1131 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1132 createProperty(A, n++, E);
1133 }
1134 }
1135 A.length = n;
1136 return A;
1137 }
1138});
1139
1140var UNSCOPABLES = wellKnownSymbol('unscopables');
1141var ArrayPrototype = Array.prototype;
1142
1143// Array.prototype[@@unscopables]
1144// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1145if (ArrayPrototype[UNSCOPABLES] == undefined) {
1146 hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
1147}
1148
1149// add a key to Array.prototype[@@unscopables]
1150var addToUnscopables = function (key) {
1151 ArrayPrototype[UNSCOPABLES][key] = true;
1152};
1153
1154var correctPrototypeGetter = !fails(function () {
1155 function F() { /* empty */ }
1156 F.prototype.constructor = null;
1157 return Object.getPrototypeOf(new F()) !== F.prototype;
1158});
1159
1160var IE_PROTO$1 = sharedKey('IE_PROTO');
1161var ObjectPrototype$1 = Object.prototype;
1162
1163// `Object.getPrototypeOf` method
1164// https://tc39.github.io/ecma262/#sec-object.getprototypeof
1165var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
1166 O = toObject(O);
1167 if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
1168 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
1169 return O.constructor.prototype;
1170 } return O instanceof Object ? ObjectPrototype$1 : null;
1171};
1172
1173var ITERATOR = wellKnownSymbol('iterator');
1174var BUGGY_SAFARI_ITERATORS = false;
1175
1176var returnThis = function () { return this; };
1177
1178// `%IteratorPrototype%` object
1179// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
1180var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1181
1182if ([].keys) {
1183 arrayIterator = [].keys();
1184 // Safari 8 has buggy iterators w/o `next`
1185 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1186 else {
1187 PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1188 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1189 }
1190}
1191
1192if (IteratorPrototype == undefined) IteratorPrototype = {};
1193
1194// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1195if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1196
1197var iteratorsCore = {
1198 IteratorPrototype: IteratorPrototype,
1199 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1200};
1201
1202var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1203
1204var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1205 var TO_STRING_TAG = NAME + ' Iterator';
1206 IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
1207 setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
1208 return IteratorConstructor;
1209};
1210
1211var aPossiblePrototype = function (it) {
1212 if (!isObject(it) && it !== null) {
1213 throw TypeError("Can't set " + String(it) + ' as a prototype');
1214 } return it;
1215};
1216
1217// `Object.setPrototypeOf` method
1218// https://tc39.github.io/ecma262/#sec-object.setprototypeof
1219// Works with __proto__ only. Old v8 can't work with null proto objects.
1220/* eslint-disable no-proto */
1221var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1222 var CORRECT_SETTER = false;
1223 var test = {};
1224 var setter;
1225 try {
1226 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
1227 setter.call(test, []);
1228 CORRECT_SETTER = test instanceof Array;
1229 } catch (error) { /* empty */ }
1230 return function setPrototypeOf(O, proto) {
1231 anObject(O);
1232 aPossiblePrototype(proto);
1233 if (CORRECT_SETTER) setter.call(O, proto);
1234 else O.__proto__ = proto;
1235 return O;
1236 };
1237}() : undefined);
1238
1239var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1240var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
1241var ITERATOR$1 = wellKnownSymbol('iterator');
1242var KEYS = 'keys';
1243var VALUES = 'values';
1244var ENTRIES = 'entries';
1245
1246var returnThis$1 = function () { return this; };
1247
1248var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1249 createIteratorConstructor(IteratorConstructor, NAME, next);
1250
1251 var getIterationMethod = function (KIND) {
1252 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1253 if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
1254 switch (KIND) {
1255 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1256 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1257 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1258 } return function () { return new IteratorConstructor(this); };
1259 };
1260
1261 var TO_STRING_TAG = NAME + ' Iterator';
1262 var INCORRECT_VALUES_NAME = false;
1263 var IterablePrototype = Iterable.prototype;
1264 var nativeIterator = IterablePrototype[ITERATOR$1]
1265 || IterablePrototype['@@iterator']
1266 || DEFAULT && IterablePrototype[DEFAULT];
1267 var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
1268 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1269 var CurrentIteratorPrototype, methods, KEY;
1270
1271 // fix native
1272 if (anyNativeIterator) {
1273 CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
1274 if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1275 if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1276 if (objectSetPrototypeOf) {
1277 objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1278 } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1279 hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1280 }
1281 }
1282 // Set @@toStringTag to native iterators
1283 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1284 }
1285 }
1286
1287 // fix Array#{values, @@iterator}.name in V8 / FF
1288 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1289 INCORRECT_VALUES_NAME = true;
1290 defaultIterator = function values() { return nativeIterator.call(this); };
1291 }
1292
1293 // define iterator
1294 if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1295 hide(IterablePrototype, ITERATOR$1, defaultIterator);
1296 }
1297
1298 // export additional methods
1299 if (DEFAULT) {
1300 methods = {
1301 values: getIterationMethod(VALUES),
1302 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1303 entries: getIterationMethod(ENTRIES)
1304 };
1305 if (FORCED) for (KEY in methods) {
1306 if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1307 redefine(IterablePrototype, KEY, methods[KEY]);
1308 }
1309 } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
1310 }
1311
1312 return methods;
1313};
1314
1315var ARRAY_ITERATOR = 'Array Iterator';
1316var setInternalState$1 = internalState.set;
1317var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
1318
1319// `Array.prototype.entries` method
1320// https://tc39.github.io/ecma262/#sec-array.prototype.entries
1321// `Array.prototype.keys` method
1322// https://tc39.github.io/ecma262/#sec-array.prototype.keys
1323// `Array.prototype.values` method
1324// https://tc39.github.io/ecma262/#sec-array.prototype.values
1325// `Array.prototype[@@iterator]` method
1326// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
1327// `CreateArrayIterator` internal method
1328// https://tc39.github.io/ecma262/#sec-createarrayiterator
1329var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1330 setInternalState$1(this, {
1331 type: ARRAY_ITERATOR,
1332 target: toIndexedObject(iterated), // target
1333 index: 0, // next index
1334 kind: kind // kind
1335 });
1336// `%ArrayIteratorPrototype%.next` method
1337// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
1338}, function () {
1339 var state = getInternalState$1(this);
1340 var target = state.target;
1341 var kind = state.kind;
1342 var index = state.index++;
1343 if (!target || index >= target.length) {
1344 state.target = undefined;
1345 return { value: undefined, done: true };
1346 }
1347 if (kind == 'keys') return { value: index, done: false };
1348 if (kind == 'values') return { value: target[index], done: false };
1349 return { value: [index, target[index]], done: false };
1350}, 'values');
1351
1352// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1353addToUnscopables('keys');
1354addToUnscopables('values');
1355addToUnscopables('entries');
1356
1357// makes subclassing work correct for wrapped built-ins
1358var inheritIfRequired = function ($this, dummy, Wrapper) {
1359 var NewTarget, NewTargetPrototype;
1360 if (
1361 // it can work only with native `setPrototypeOf`
1362 objectSetPrototypeOf &&
1363 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
1364 typeof (NewTarget = dummy.constructor) == 'function' &&
1365 NewTarget !== Wrapper &&
1366 isObject(NewTargetPrototype = NewTarget.prototype) &&
1367 NewTargetPrototype !== Wrapper.prototype
1368 ) objectSetPrototypeOf($this, NewTargetPrototype);
1369 return $this;
1370};
1371
1372// a string of all valid unicode whitespaces
1373// eslint-disable-next-line max-len
1374var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1375
1376var whitespace = '[' + whitespaces + ']';
1377var ltrim = RegExp('^' + whitespace + whitespace + '*');
1378var rtrim = RegExp(whitespace + whitespace + '*$');
1379
1380// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1381var createMethod$2 = function (TYPE) {
1382 return function ($this) {
1383 var string = String(requireObjectCoercible($this));
1384 if (TYPE & 1) string = string.replace(ltrim, '');
1385 if (TYPE & 2) string = string.replace(rtrim, '');
1386 return string;
1387 };
1388};
1389
1390var stringTrim = {
1391 // `String.prototype.{ trimLeft, trimStart }` methods
1392 // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
1393 start: createMethod$2(1),
1394 // `String.prototype.{ trimRight, trimEnd }` methods
1395 // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
1396 end: createMethod$2(2),
1397 // `String.prototype.trim` method
1398 // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1399 trim: createMethod$2(3)
1400};
1401
1402var getOwnPropertyNames = objectGetOwnPropertyNames.f;
1403var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
1404var defineProperty$3 = objectDefineProperty.f;
1405var trim = stringTrim.trim;
1406
1407var NUMBER = 'Number';
1408var NativeNumber = global_1[NUMBER];
1409var NumberPrototype = NativeNumber.prototype;
1410
1411// Opera ~12 has broken Object#toString
1412var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
1413
1414// `ToNumber` abstract operation
1415// https://tc39.github.io/ecma262/#sec-tonumber
1416var toNumber = function (argument) {
1417 var it = toPrimitive(argument, false);
1418 var first, third, radix, maxCode, digits, length, index, code;
1419 if (typeof it == 'string' && it.length > 2) {
1420 it = trim(it);
1421 first = it.charCodeAt(0);
1422 if (first === 43 || first === 45) {
1423 third = it.charCodeAt(2);
1424 if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
1425 } else if (first === 48) {
1426 switch (it.charCodeAt(1)) {
1427 case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
1428 case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
1429 default: return +it;
1430 }
1431 digits = it.slice(2);
1432 length = digits.length;
1433 for (index = 0; index < length; index++) {
1434 code = digits.charCodeAt(index);
1435 // parseInt parses a string to a first unavailable symbol
1436 // but ToNumber should return NaN if a string contains unavailable symbols
1437 if (code < 48 || code > maxCode) return NaN;
1438 } return parseInt(digits, radix);
1439 }
1440 } return +it;
1441};
1442
1443// `Number` constructor
1444// https://tc39.github.io/ecma262/#sec-number-constructor
1445if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
1446 var NumberWrapper = function Number(value) {
1447 var it = arguments.length < 1 ? 0 : value;
1448 var dummy = this;
1449 return dummy instanceof NumberWrapper
1450 // check on 1..constructor(foo) case
1451 && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER)
1452 ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
1453 };
1454 for (var keys$1 = descriptors ? getOwnPropertyNames(NativeNumber) : (
1455 // ES3:
1456 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
1457 // ES2015 (in case, if modules with ES2015 Number statics required before):
1458 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
1459 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
1460 ).split(','), j = 0, key; keys$1.length > j; j++) {
1461 if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
1462 defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
1463 }
1464 }
1465 NumberWrapper.prototype = NumberPrototype;
1466 NumberPrototype.constructor = NumberWrapper;
1467 redefine(global_1, NUMBER, NumberWrapper);
1468}
1469
1470var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1471// ES3 wrong here
1472var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1473
1474// fallback for IE11 Script Access Denied error
1475var tryGet = function (it, key) {
1476 try {
1477 return it[key];
1478 } catch (error) { /* empty */ }
1479};
1480
1481// getting tag from ES6+ `Object.prototype.toString`
1482var classof = function (it) {
1483 var O, tag, result;
1484 return it === undefined ? 'Undefined' : it === null ? 'Null'
1485 // @@toStringTag case
1486 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1487 // builtinTag case
1488 : CORRECT_ARGUMENTS ? classofRaw(O)
1489 // ES3 arguments fallback
1490 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1491};
1492
1493var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1494var test = {};
1495
1496test[TO_STRING_TAG$2] = 'z';
1497
1498// `Object.prototype.toString` method implementation
1499// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1500var objectToString = String(test) !== '[object z]' ? function toString() {
1501 return '[object ' + classof(this) + ']';
1502} : test.toString;
1503
1504var ObjectPrototype$2 = Object.prototype;
1505
1506// `Object.prototype.toString` method
1507// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1508if (objectToString !== ObjectPrototype$2.toString) {
1509 redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
1510}
1511
1512// `String.prototype.{ codePointAt, at }` methods implementation
1513var createMethod$3 = function (CONVERT_TO_STRING) {
1514 return function ($this, pos) {
1515 var S = String(requireObjectCoercible($this));
1516 var position = toInteger(pos);
1517 var size = S.length;
1518 var first, second;
1519 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1520 first = S.charCodeAt(position);
1521 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1522 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1523 ? CONVERT_TO_STRING ? S.charAt(position) : first
1524 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1525 };
1526};
1527
1528var stringMultibyte = {
1529 // `String.prototype.codePointAt` method
1530 // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1531 codeAt: createMethod$3(false),
1532 // `String.prototype.at` method
1533 // https://github.com/mathiasbynens/String.prototype.at
1534 charAt: createMethod$3(true)
1535};
1536
1537var charAt = stringMultibyte.charAt;
1538
1539
1540
1541var STRING_ITERATOR = 'String Iterator';
1542var setInternalState$2 = internalState.set;
1543var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
1544
1545// `String.prototype[@@iterator]` method
1546// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1547defineIterator(String, 'String', function (iterated) {
1548 setInternalState$2(this, {
1549 type: STRING_ITERATOR,
1550 string: String(iterated),
1551 index: 0
1552 });
1553// `%StringIteratorPrototype%.next` method
1554// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1555}, function next() {
1556 var state = getInternalState$2(this);
1557 var string = state.string;
1558 var index = state.index;
1559 var point;
1560 if (index >= string.length) return { value: undefined, done: true };
1561 point = charAt(string, index);
1562 state.index += point.length;
1563 return { value: point, done: false };
1564});
1565
1566// iterable DOM collections
1567// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1568var domIterables = {
1569 CSSRuleList: 0,
1570 CSSStyleDeclaration: 0,
1571 CSSValueList: 0,
1572 ClientRectList: 0,
1573 DOMRectList: 0,
1574 DOMStringList: 0,
1575 DOMTokenList: 1,
1576 DataTransferItemList: 0,
1577 FileList: 0,
1578 HTMLAllCollection: 0,
1579 HTMLCollection: 0,
1580 HTMLFormElement: 0,
1581 HTMLSelectElement: 0,
1582 MediaList: 0,
1583 MimeTypeArray: 0,
1584 NamedNodeMap: 0,
1585 NodeList: 1,
1586 PaintRequestList: 0,
1587 Plugin: 0,
1588 PluginArray: 0,
1589 SVGLengthList: 0,
1590 SVGNumberList: 0,
1591 SVGPathSegList: 0,
1592 SVGPointList: 0,
1593 SVGStringList: 0,
1594 SVGTransformList: 0,
1595 SourceBufferList: 0,
1596 StyleSheetList: 0,
1597 TextTrackCueList: 0,
1598 TextTrackList: 0,
1599 TouchList: 0
1600};
1601
1602var ITERATOR$2 = wellKnownSymbol('iterator');
1603var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
1604var ArrayValues = es_array_iterator.values;
1605
1606for (var COLLECTION_NAME in domIterables) {
1607 var Collection = global_1[COLLECTION_NAME];
1608 var CollectionPrototype = Collection && Collection.prototype;
1609 if (CollectionPrototype) {
1610 // some Chrome versions have non-configurable methods on DOMTokenList
1611 if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
1612 hide(CollectionPrototype, ITERATOR$2, ArrayValues);
1613 } catch (error) {
1614 CollectionPrototype[ITERATOR$2] = ArrayValues;
1615 }
1616 if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
1617 if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
1618 // some Chrome versions have non-configurable methods on DOMTokenList
1619 if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
1620 hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
1621 } catch (error) {
1622 CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
1623 }
1624 }
1625 }
1626}
1627
1628function _defineProperty(obj, key, value) {
1629 if (key in obj) {
1630 Object.defineProperty(obj, key, {
1631 value: value,
1632 enumerable: true,
1633 configurable: true,
1634 writable: true
1635 });
1636 } else {
1637 obj[key] = value;
1638 }
1639
1640 return obj;
1641}
1642
1643function ownKeys$1(object, enumerableOnly) {
1644 var keys = Object.keys(object);
1645
1646 if (Object.getOwnPropertySymbols) {
1647 var symbols = Object.getOwnPropertySymbols(object);
1648 if (enumerableOnly) symbols = symbols.filter(function (sym) {
1649 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1650 });
1651 keys.push.apply(keys, symbols);
1652 }
1653
1654 return keys;
1655}
1656
1657function _objectSpread2(target) {
1658 for (var i = 1; i < arguments.length; i++) {
1659 var source = arguments[i] != null ? arguments[i] : {};
1660
1661 if (i % 2) {
1662 ownKeys$1(source, true).forEach(function (key) {
1663 _defineProperty(target, key, source[key]);
1664 });
1665 } else if (Object.getOwnPropertyDescriptors) {
1666 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1667 } else {
1668 ownKeys$1(source).forEach(function (key) {
1669 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1670 });
1671 }
1672 }
1673
1674 return target;
1675}
1676
1677//
1678//
1679//
1680//
1681//
1682//
1683//
1684//
1685//
1686//
1687var $ = window.jQuery;
1688
1689var deepCopy = function deepCopy(arg) {
1690 if (!arg) {
1691 return arg;
1692 }
1693
1694 return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
1695};
1696
1697var script = {
1698 name: 'MultipleSelect',
1699 props: {
1700 value: {
1701 type: [String, Array],
1702 default: undefined
1703 },
1704 name: {
1705 type: String,
1706 default: undefined
1707 },
1708 single: {
1709 type: Boolean,
1710 default: false
1711 },
1712 width: {
1713 type: [Number, String],
1714 default: undefined
1715 },
1716 data: {
1717 type: Array,
1718 default: function _default() {
1719 return undefined;
1720 }
1721 },
1722 options: {
1723 type: Object,
1724 default: function _default() {
1725 return {};
1726 }
1727 }
1728 },
1729 data: function data() {
1730 return {
1731 currentValue: this.value
1732 };
1733 },
1734 watch: {
1735 options: {
1736 handler: function handler() {
1737 this._initSelect();
1738 },
1739 deep: true
1740 },
1741 data: {
1742 handler: function handler() {
1743 this.load(deepCopy(this.data));
1744 },
1745 deep: true
1746 }
1747 },
1748 mounted: function mounted() {
1749 var _this = this;
1750
1751 this.$select = $(this.$el).change(function () {
1752 var value = _this.$select.val();
1753
1754 _this.$emit('input', value);
1755
1756 _this.$emit('change', value);
1757 });
1758
1759 var _loop = function _loop(event) {
1760 if (/^on[A-Z]/.test(event)) {
1761 $.fn.multipleSelect.defaults[event] = function () {
1762 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1763 args[_key] = arguments[_key];
1764 }
1765
1766 _this.$emit.apply(_this, [event].concat(args));
1767 };
1768 }
1769 };
1770
1771 for (var event in $.fn.multipleSelect.defaults) {
1772 _loop(event);
1773 }
1774
1775 this._initSelect();
1776 },
1777 methods: _objectSpread2({
1778 _initSelect: function _initSelect() {
1779 var options = _objectSpread2({}, deepCopy(this.options), {
1780 single: this.single,
1781 width: this.width,
1782 data: deepCopy(this.data)
1783 });
1784
1785 if (!this._hasInit) {
1786 this.$select.multipleSelect(options);
1787 this._hasInit = true;
1788 } else {
1789 this.refreshOptions(options);
1790 }
1791 }
1792 }, function () {
1793 var res = {};
1794 var _iteratorNormalCompletion = true;
1795 var _didIteratorError = false;
1796 var _iteratorError = undefined;
1797
1798 try {
1799 var _loop2 = function _loop2() {
1800 var method = _step.value;
1801
1802 res[method] = function () {
1803 var _this$$select;
1804
1805 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1806 args[_key2] = arguments[_key2];
1807 }
1808
1809 return (_this$$select = this.$select).multipleSelect.apply(_this$$select, [method].concat(args));
1810 };
1811 };
1812
1813 for (var _iterator = $.fn.multipleSelect.methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1814 _loop2();
1815 }
1816 } catch (err) {
1817 _didIteratorError = true;
1818 _iteratorError = err;
1819 } finally {
1820 try {
1821 if (!_iteratorNormalCompletion && _iterator.return != null) {
1822 _iterator.return();
1823 }
1824 } finally {
1825 if (_didIteratorError) {
1826 throw _iteratorError;
1827 }
1828 }
1829 }
1830
1831 return res;
1832 }())
1833};
1834
1835function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
1836/* server only */
1837, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1838 if (typeof shadowMode !== 'boolean') {
1839 createInjectorSSR = createInjector;
1840 createInjector = shadowMode;
1841 shadowMode = false;
1842 } // Vue.extend constructor export interop.
1843
1844
1845 var options = typeof script === 'function' ? script.options : script; // render functions
1846
1847 if (template && template.render) {
1848 options.render = template.render;
1849 options.staticRenderFns = template.staticRenderFns;
1850 options._compiled = true; // functional template
1851
1852 if (isFunctionalTemplate) {
1853 options.functional = true;
1854 }
1855 } // scopedId
1856
1857
1858 if (scopeId) {
1859 options._scopeId = scopeId;
1860 }
1861
1862 var hook;
1863
1864 if (moduleIdentifier) {
1865 // server build
1866 hook = function hook(context) {
1867 // 2.3 injection
1868 context = context || // cached call
1869 this.$vnode && this.$vnode.ssrContext || // stateful
1870 this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
1871 // 2.2 with runInNewContext: true
1872
1873 if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1874 context = __VUE_SSR_CONTEXT__;
1875 } // inject component styles
1876
1877
1878 if (style) {
1879 style.call(this, createInjectorSSR(context));
1880 } // register component module identifier for async chunk inference
1881
1882
1883 if (context && context._registeredComponents) {
1884 context._registeredComponents.add(moduleIdentifier);
1885 }
1886 }; // used by ssr in case component is cached and beforeCreate
1887 // never gets called
1888
1889
1890 options._ssrRegister = hook;
1891 } else if (style) {
1892 hook = shadowMode ? function () {
1893 style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
1894 } : function (context) {
1895 style.call(this, createInjector(context));
1896 };
1897 }
1898
1899 if (hook) {
1900 if (options.functional) {
1901 // register for functional component in vue file
1902 var originalRender = options.render;
1903
1904 options.render = function renderWithStyleInjection(h, context) {
1905 hook.call(context);
1906 return originalRender(h, context);
1907 };
1908 } else {
1909 // inject component registration as beforeCreate hook
1910 var existing = options.beforeCreate;
1911 options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1912 }
1913 }
1914
1915 return script;
1916}
1917
1918var normalizeComponent_1 = normalizeComponent;
1919
1920/* script */
1921const __vue_script__ = script;
1922
1923/* template */
1924var __vue_render__ = function() {
1925 var _vm = this;
1926 var _h = _vm.$createElement;
1927 var _c = _vm._self._c || _h;
1928 return _c(
1929 "select",
1930 {
1931 directives: [
1932 {
1933 name: "model",
1934 rawName: "v-model",
1935 value: _vm.currentValue,
1936 expression: "currentValue"
1937 }
1938 ],
1939 attrs: { name: _vm.name, multiple: !_vm.single },
1940 on: {
1941 change: function($event) {
1942 var $$selectedVal = Array.prototype.filter
1943 .call($event.target.options, function(o) {
1944 return o.selected
1945 })
1946 .map(function(o) {
1947 var val = "_value" in o ? o._value : o.value;
1948 return val
1949 });
1950 _vm.currentValue = $event.target.multiple
1951 ? $$selectedVal
1952 : $$selectedVal[0];
1953 }
1954 }
1955 },
1956 [_vm._t("default")],
1957 2
1958 )
1959};
1960var __vue_staticRenderFns__ = [];
1961__vue_render__._withStripped = true;
1962
1963 /* style */
1964 const __vue_inject_styles__ = undefined;
1965 /* scoped */
1966 const __vue_scope_id__ = undefined;
1967 /* module identifier */
1968 const __vue_module_identifier__ = undefined;
1969 /* functional template */
1970 const __vue_is_functional_template__ = false;
1971 /* style inject */
1972
1973 /* style inject SSR */
1974
1975
1976
1977 var MultipleSelect = normalizeComponent_1(
1978 { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
1979 __vue_inject_styles__,
1980 __vue_script__,
1981 __vue_scope_id__,
1982 __vue_is_functional_template__,
1983 __vue_module_identifier__,
1984 undefined,
1985 undefined
1986 );
1987
1988export default MultipleSelect;