PageSourceSearch

https://www.kyotaru.co.jp/osechi/assets/js/script.js?20260925

js kyotaru.co.jp collected 2026-10-03 19:37:09 UTC 735,979 bytes, 16,334 lines download raw bytes

1/******/ (function() { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
vendor: 102,728 bytes, lines 4-3189
4/***/ "./node_modules/@splidejs/splide/dist/js/splide.esm.js":
5/*!*************************************************************!*\
6  !*** ./node_modules/@splidejs/splide/dist/js/splide.esm.js ***!
7  \*************************************************************/
8/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9
10"use strict";
11__webpack_require__.r(__webpack_exports__);
12/* harmony export */ __webpack_require__.d(__webpack_exports__, {
13/* harmony export */   CLASSES: function() { return /* binding */ CLASSES; },
14/* harmony export */   CLASS_ACTIVE: function() { return /* binding */ CLASS_ACTIVE; },
15/* harmony export */   CLASS_ARROW: function() { return /* binding */ CLASS_ARROW; },
16/* harmony export */   CLASS_ARROWS: function() { return /* binding */ CLASS_ARROWS; },
17/* harmony export */   CLASS_ARROW_NEXT: function() { return /* binding */ CLASS_ARROW_NEXT; },
18/* harmony export */   CLASS_ARROW_PREV: function() { return /* binding */ CLASS_ARROW_PREV; },
19/* harmony export */   CLASS_CLONE: function() { return /* binding */ CLASS_CLONE; },
20/* harmony export */   CLASS_CONTAINER: function() { return /* binding */ CLASS_CONTAINER; },
21/* harmony export */   CLASS_FOCUS_IN: function() { return /* binding */ CLASS_FOCUS_IN; },
22/* harmony export */   CLASS_INITIALIZED: function() { return /* binding */ CLASS_INITIALIZED; },
23/* harmony export */   CLASS_LIST: function() { return /* binding */ CLASS_LIST; },
24/* harmony export */   CLASS_LOADING: function() { return /* binding */ CLASS_LOADING; },
25/* harmony export */   CLASS_NEXT: function() { return /* binding */ CLASS_NEXT; },
26/* harmony export */   CLASS_OVERFLOW: function() { return /* binding */ CLASS_OVERFLOW; },
27/* harmony export */   CLASS_PAGINATION: function() { return /* binding */ CLASS_PAGINATION; },
28/* harmony export */   CLASS_PAGINATION_PAGE: function() { return /* binding */ CLASS_PAGINATION_PAGE; },
29/* harmony export */   CLASS_PREV: function() { return /* binding */ CLASS_PREV; },
30/* harmony export */   CLASS_PROGRESS: function() { return /* binding */ CLASS_PROGRESS; },
31/* harmony export */   CLASS_PROGRESS_BAR: function() { return /* binding */ CLASS_PROGRESS_BAR; },
32/* harmony export */   CLASS_ROOT: function() { return /* binding */ CLASS_ROOT; },
33/* harmony export */   CLASS_SLIDE: function() { return /* binding */ CLASS_SLIDE; },
34/* harmony export */   CLASS_SPINNER: function() { return /* binding */ CLASS_SPINNER; },
35/* harmony export */   CLASS_SR: function() { return /* binding */ CLASS_SR; },
36/* harmony export */   CLASS_TOGGLE: function() { return /* binding */ CLASS_TOGGLE; },
37/* harmony export */   CLASS_TOGGLE_PAUSE: function() { return /* binding */ CLASS_TOGGLE_PAUSE; },
38/* harmony export */   CLASS_TOGGLE_PLAY: function() { return /* binding */ CLASS_TOGGLE_PLAY; },
39/* harmony export */   CLASS_TRACK: function() { return /* binding */ CLASS_TRACK; },
40/* harmony export */   CLASS_VISIBLE: function() { return /* binding */ CLASS_VISIBLE; },
41/* harmony export */   DEFAULTS: function() { return /* binding */ DEFAULTS; },
42/* harmony export */   EVENT_ACTIVE: function() { return /* binding */ EVENT_ACTIVE; },
43/* harmony export */   EVENT_ARROWS_MOUNTED: function() { return /* binding */ EVENT_ARROWS_MOUNTED; },
44/* harmony export */   EVENT_ARROWS_UPDATED: function() { return /* binding */ EVENT_ARROWS_UPDATED; },
45/* harmony export */   EVENT_AUTOPLAY_PAUSE: function() { return /* binding */ EVENT_AUTOPLAY_PAUSE; },
46/* harmony export */   EVENT_AUTOPLAY_PLAY: function() { return /* binding */ EVENT_AUTOPLAY_PLAY; },
47/* harmony export */   EVENT_AUTOPLAY_PLAYING: function() { return /* binding */ EVENT_AUTOPLAY_PLAYING; },
48/* harmony export */   EVENT_CLICK: function() { return /* binding */ EVENT_CLICK; },
49/* harmony export */   EVENT_DESTROY: function() { return /* binding */ EVENT_DESTROY; },
50/* harmony export */   EVENT_DRAG: function() { return /* binding */ EVENT_DRAG; },
51/* harmony export */   EVENT_DRAGGED: function() { return /* binding */ EVENT_DRAGGED; },
52/* harmony export */   EVENT_DRAGGING: function() { return /* binding */ EVENT_DRAGGING; },
53/* harmony export */   EVENT_END_INDEX_CHANGED: function() { return /* binding */ EVENT_END_INDEX_CHANGED; },
54/* harmony export */   EVENT_HIDDEN: function() { return /* binding */ EVENT_HIDDEN; },
55/* harmony export */   EVENT_INACTIVE: function() { return /* binding */ EVENT_INACTIVE; },
56/* harmony export */   EVENT_LAZYLOAD_LOADED: function() { return /* binding */ EVENT_LAZYLOAD_LOADED; },
57/* harmony export */   EVENT_MOUNTED: function() { return /* binding */ EVENT_MOUNTED; },
58/* harmony export */   EVENT_MOVE: function() { return /* binding */ EVENT_MOVE; },
59/* harmony export */   EVENT_MOVED: function() { return /* binding */ EVENT_MOVED; },
60/* harmony export */   EVENT_NAVIGATION_MOUNTED: function() { return /* binding */ EVENT_NAVIGATION_MOUNTED; },
61/* harmony export */   EVENT_OVERFLOW: function() { return /* binding */ EVENT_OVERFLOW; },
62/* harmony export */   EVENT_PAGINATION_MOUNTED: function() { return /* binding */ EVENT_PAGINATION_MOUNTED; },
63/* harmony export */   EVENT_PAGINATION_UPDATED: function() { return /* binding */ EVENT_PAGINATION_UPDATED; },
64/* harmony export */   EVENT_READY: function() { return /* binding */ EVENT_READY; },
65/* harmony export */   EVENT_REFRESH: function() { return /* binding */ EVENT_REFRESH; },
66/* harmony export */   EVENT_RESIZE: function() { return /* binding */ EVENT_RESIZE; },
67/* harmony export */   EVENT_RESIZED: function() { return /* binding */ EVENT_RESIZED; },
68/* harmony export */   EVENT_SCROLL: function() { return /* binding */ EVENT_SCROLL; },
69/* harmony export */   EVENT_SCROLLED: function() { return /* binding */ EVENT_SCROLLED; },
70/* harmony export */   EVENT_SHIFTED: function() { return /* binding */ EVENT_SHIFTED; },
71/* harmony export */   EVENT_SLIDE_KEYDOWN: function() { return /* binding */ EVENT_SLIDE_KEYDOWN; },
72/* harmony export */   EVENT_UPDATED: function() { return /* binding */ EVENT_UPDATED; },
73/* harmony export */   EVENT_VISIBLE: function() { return /* binding */ EVENT_VISIBLE; },
74/* harmony export */   EventBinder: function() { return /* binding */ EventBinder; },
75/* harmony export */   EventInterface: function() { return /* binding */ EventInterface; },
76/* harmony export */   FADE: function() { return /* binding */ FADE; },
77/* harmony export */   LOOP: function() { return /* binding */ LOOP; },
78/* harmony export */   LTR: function() { return /* binding */ LTR; },
79/* harmony export */   RTL: function() { return /* binding */ RTL; },
80/* harmony export */   RequestInterval: function() { return /* binding */ RequestInterval; },
81/* harmony export */   SLIDE: function() { return /* binding */ SLIDE; },
82/* harmony export */   STATUS_CLASSES: function() { return /* binding */ STATUS_CLASSES; },
83/* harmony export */   Splide: function() { return /* binding */ Splide; },
84/* harmony export */   SplideRenderer: function() { return /* binding */ SplideRenderer; },
85/* harmony export */   State: function() { return /* binding */ State; },
86/* harmony export */   TTB: function() { return /* binding */ TTB; },
87/* harmony export */   Throttle: function() { return /* binding */ Throttle; },
88/* harmony export */   "default": function() { return /* binding */ Splide; }
89/* harmony export */ });
90function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
91function _defineProperties(target, props) {
92  for (var i = 0; i < props.length; i++) {
93    var descriptor = props[i];
94    descriptor.enumerable = descriptor.enumerable || false;
95    descriptor.configurable = true;
96    if ("value" in descriptor) descriptor.writable = true;
97    Object.defineProperty(target, descriptor.key, descriptor);
98  }
99}
100function _createClass(Constructor, protoProps, staticProps) {
101  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
102  if (staticProps) _defineProperties(Constructor, staticProps);
103  Object.defineProperty(Constructor, "prototype", {
104    writable: false
105  });
106  return Constructor;
107}
108
109/*!
110 * Splide.js
111 * Version  : 4.1.4
112 * License  : MIT
113 * Copyright: 2022 Naotoshi Fujita
114 */
115var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)";
116var CREATED = 1;
117var MOUNTED = 2;
118var IDLE = 3;
119var MOVING = 4;
120var SCROLLING = 5;
121var DRAGGING = 6;
122var DESTROYED = 7;
123var STATES = {
124  CREATED: CREATED,
125  MOUNTED: MOUNTED,
126  IDLE: IDLE,
127  MOVING: MOVING,
128  SCROLLING: SCROLLING,
129  DRAGGING: DRAGGING,
130  DESTROYED: DESTROYED
131};
132function empty(array) {
133  array.length = 0;
134}
135function slice(arrayLike, start, end) {
136  return Array.prototype.slice.call(arrayLike, start, end);
137}
138function apply(func) {
139  return func.bind.apply(func, [null].concat(slice(arguments, 1)));
140}
141var nextTick = setTimeout;
142var noop = function noop() {};
143function raf(func) {
144  return requestAnimationFrame(func);
145}
146function typeOf(type, subject) {
147  return _typeof(subject) === type;
148}
149function isObject(subject) {
150  return !isNull(subject) && typeOf("object", subject);
151}
152var isArray = Array.isArray;
153var isFunction = apply(typeOf, "function");
154var isString = apply(typeOf, "string");
155var isUndefined = apply(typeOf, "undefined");
156function isNull(subject) {
157  return subject === null;
158}
159function isHTMLElement(subject) {
160  try {
161    return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
162  } catch (e) {
163    return false;
164  }
165}
166function toArray(value) {
167  return isArray(value) ? value : [value];
168}
169function forEach(values, iteratee) {
170  toArray(values).forEach(iteratee);
171}
172function includes(array, value) {
173  return array.indexOf(value) > -1;
174}
175function push(array, items) {
176  array.push.apply(array, toArray(items));
177  return array;
178}
179function toggleClass(elm, classes, add) {
180  if (elm) {
181    forEach(classes, function (name) {
182      if (name) {
183        elm.classList[add ? "add" : "remove"](name);
184      }
185    });
186  }
187}
188function addClass(elm, classes) {
189  toggleClass(elm, isString(classes) ? classes.split(" ") : classes, true);
190}
191function append(parent, children) {
192  forEach(children, parent.appendChild.bind(parent));
193}
194function before(nodes, ref) {
195  forEach(nodes, function (node) {
196    var parent = (ref || node).parentNode;
197    if (parent) {
198      parent.insertBefore(node, ref);
199    }
200  });
201}
202function matches(elm, selector) {
203  return isHTMLElement(elm) && (elm["msMatchesSelector"] || elm.matches).call(elm, selector);
204}
205function children(parent, selector) {
206  var children2 = parent ? slice(parent.children) : [];
207  return selector ? children2.filter(function (child) {
208    return matches(child, selector);
209  }) : children2;
210}
211function child(parent, selector) {
212  return selector ? children(parent, selector)[0] : parent.firstElementChild;
213}
214var ownKeys = Object.keys;
215function forOwn(object, iteratee, right) {
216  if (object) {
217    (right ? ownKeys(object).reverse() : ownKeys(object)).forEach(function (key) {
218      key !== "__proto__" && iteratee(object[key], key);
219    });
220  }
221  return object;
222}
223function assign(object) {
224  slice(arguments, 1).forEach(function (source) {
225    forOwn(source, function (value, key) {
226      object[key] = source[key];
227    });
228  });
229  return object;
230}
231function merge(object) {
232  slice(arguments, 1).forEach(function (source) {
233    forOwn(source, function (value, key) {
234      if (isArray(value)) {
235        object[key] = value.slice();
236      } else if (isObject(value)) {
237        object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value);
238      } else {
239        object[key] = value;
240      }
241    });
242  });
243  return object;
244}
245function omit(object, keys) {
246  forEach(keys || ownKeys(object), function (key) {
247    delete object[key];
248  });
249}
250function removeAttribute(elms, attrs) {
251  forEach(elms, function (elm) {
252    forEach(attrs, function (attr) {
253      elm && elm.removeAttribute(attr);
254    });
255  });
256}
257function setAttribute(elms, attrs, value) {
258  if (isObject(attrs)) {
259    forOwn(attrs, function (value2, name) {
260      setAttribute(elms, name, value2);
261    });
262  } else {
263    forEach(elms, function (elm) {
264      isNull(value) || value === "" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value));
265    });
266  }
267}
268function create(tag, attrs, parent) {
269  var elm = document.createElement(tag);
270  if (attrs) {
271    isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs);
272  }
273  parent && append(parent, elm);
274  return elm;
275}
276function style(elm, prop, value) {
277  if (isUndefined(value)) {
278    return getComputedStyle(elm)[prop];
279  }
280  if (!isNull(value)) {
281    elm.style[prop] = "" + value;
282  }
283}
284function display(elm, display2) {
285  style(elm, "display", display2);
286}
287function focus(elm) {
288  elm["setActive"] && elm["setActive"]() || elm.focus({
289    preventScroll: true
290  });
291}
292function getAttribute(elm, attr) {
293  return elm.getAttribute(attr);
294}
295function hasClass(elm, className) {
296  return elm && elm.classList.contains(className);
297}
298function rect(target) {
299  return target.getBoundingClientRect();
300}
301function remove(nodes) {
302  forEach(nodes, function (node) {
303    if (node && node.parentNode) {
304      node.parentNode.removeChild(node);
305    }
306  });
307}
308function parseHtml(html) {
309  return child(new DOMParser().parseFromString(html, "text/html").body);
310}
311function prevent(e, stopPropagation) {
312  e.preventDefault();
313  if (stopPropagation) {
314    e.stopPropagation();
315    e.stopImmediatePropagation();
316  }
317}
318function query(parent, selector) {
319  return parent && parent.querySelector(selector);
320}
321function queryAll(parent, selector) {
322  return selector ? slice(parent.querySelectorAll(selector)) : [];
323}
324function removeClass(elm, classes) {
325  toggleClass(elm, classes, false);
326}
327function timeOf(e) {
328  return e.timeStamp;
329}
330function unit(value) {
331  return isString(value) ? value : value ? value + "px" : "";
332}
333var PROJECT_CODE = "splide";
334var DATA_ATTRIBUTE = "data-" + PROJECT_CODE;
335function assert(condition, message) {
336  if (!condition) {
337    throw new Error("[" + PROJECT_CODE + "] " + (message || ""));
338  }
339}
340var min = Math.min,
341  max = Math.max,
342  floor = Math.floor,
343  ceil = Math.ceil,
344  abs = Math.abs;
345function approximatelyEqual(x, y, epsilon) {
346  return abs(x - y) < epsilon;
347}
348function between(number, x, y, exclusive) {
349  var minimum = min(x, y);
350  var maximum = max(x, y);
351  return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum;
352}
353function clamp(number, x, y) {
354  var minimum = min(x, y);
355  var maximum = max(x, y);
356  return min(max(minimum, number), maximum);
357}
358function sign(x) {
359  return +(x > 0) - +(x < 0);
360}
361function camelToKebab(string) {
362  return string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
363}
364function format(string, replacements) {
365  forEach(replacements, function (replacement) {
366    string = string.replace("%s", "" + replacement);
367  });
368  return string;
369}
370function pad(number) {
371  return number < 10 ? "0" + number : "" + number;
372}
373var ids = {};
374function uniqueId(prefix) {
375  return "" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1);
376}
377function EventBinder() {
378  var listeners = [];
379  function bind(targets, events, callback, options) {
380    forEachEvent(targets, events, function (target, event, namespace) {
381      var isEventTarget = ("addEventListener" in target);
382      var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target["removeListener"].bind(target, callback);
383      isEventTarget ? target.addEventListener(event, callback, options) : target["addListener"](callback);
384      listeners.push([target, event, namespace, callback, remover]);
385    });
386  }
387  function unbind(targets, events, callback) {
388    forEachEvent(targets, events, function (target, event, namespace) {
389      listeners = listeners.filter(function (listener) {
390        if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) {
391          listener[4]();
392          return false;
393        }
394        return true;
395      });
396    });
397  }
398  function dispatch(target, type, detail) {
399    var e;
400    var bubbles = true;
401    if (typeof CustomEvent === "function") {
402      e = new CustomEvent(type, {
403        bubbles: bubbles,
404        detail: detail
405      });
406    } else {
407      e = document.createEvent("CustomEvent");
408      e.initCustomEvent(type, bubbles, false, detail);
409    }
410    target.dispatchEvent(e);
411    return e;
412  }
413  function forEachEvent(targets, events, iteratee) {
414    forEach(targets, function (target) {
415      target && forEach(events, function (events2) {
416        events2.split(" ").forEach(function (eventNS) {
417          var fragment = eventNS.split(".");
418          iteratee(target, fragment[0], fragment[1]);
419        });
420      });
421    });
422  }
423  function destroy() {
424    listeners.forEach(function (data) {
425      data[4]();
426    });
427    empty(listeners);
428  }
429  return {
430    bind: bind,
431    unbind: unbind,
432    dispatch: dispatch,
433    destroy: destroy
434  };
435}
436var EVENT_MOUNTED = "mounted";
437var EVENT_READY = "ready";
438var EVENT_MOVE = "move";
439var EVENT_MOVED = "moved";
440var EVENT_CLICK = "click";
441var EVENT_ACTIVE = "active";
442var EVENT_INACTIVE = "inactive";
443var EVENT_VISIBLE = "visible";
444var EVENT_HIDDEN = "hidden";
445var EVENT_REFRESH = "refresh";
446var EVENT_UPDATED = "updated";
447var EVENT_RESIZE = "resize";
448var EVENT_RESIZED = "resized";
449var EVENT_DRAG = "drag";
450var EVENT_DRAGGING = "dragging";
451var EVENT_DRAGGED = "dragged";
452var EVENT_SCROLL = "scroll";
453var EVENT_SCROLLED = "scrolled";
454var EVENT_OVERFLOW = "overflow";
455var EVENT_DESTROY = "destroy";
456var EVENT_ARROWS_MOUNTED = "arrows:mounted";
457var EVENT_ARROWS_UPDATED = "arrows:updated";
458var EVENT_PAGINATION_MOUNTED = "pagination:mounted";
459var EVENT_PAGINATION_UPDATED = "pagination:updated";
460var EVENT_NAVIGATION_MOUNTED = "navigation:mounted";
461var EVENT_AUTOPLAY_PLAY = "autoplay:play";
462var EVENT_AUTOPLAY_PLAYING = "autoplay:playing";
463var EVENT_AUTOPLAY_PAUSE = "autoplay:pause";
464var EVENT_LAZYLOAD_LOADED = "lazyload:loaded";
465var EVENT_SLIDE_KEYDOWN = "sk";
466var EVENT_SHIFTED = "sh";
467var EVENT_END_INDEX_CHANGED = "ei";
468function EventInterface(Splide2) {
469  var bus = Splide2 ? Splide2.event.bus : document.createDocumentFragment();
470  var binder = EventBinder();
471  function on(events, callback) {
472    binder.bind(bus, toArray(events).join(" "), function (e) {
473      callback.apply(callback, isArray(e.detail) ? e.detail : []);
474    });
475  }
476  function emit(event) {
477    binder.dispatch(bus, event, slice(arguments, 1));
478  }
479  if (Splide2) {
480    Splide2.event.on(EVENT_DESTROY, binder.destroy);
481  }
482  return assign(binder, {
483    bus: bus,
484    on: on,
485    off: apply(binder.unbind, bus),
486    emit: emit
487  });
488}
489function RequestInterval(interval, onInterval, onUpdate, limit) {
490  var now = Date.now;
491  var startTime;
492  var rate = 0;
493  var id;
494  var paused = true;
495  var count = 0;
496  function update() {
497    if (!paused) {
498      rate = interval ? min((now() - startTime) / interval, 1) : 1;
499      onUpdate && onUpdate(rate);
500      if (rate >= 1) {
501        onInterval();
502        startTime = now();
503        if (limit && ++count >= limit) {
504          return pause();
505        }
506      }
507      id = raf(update);
508    }
509  }
510  function start(resume) {
511    resume || cancel();
512    startTime = now() - (resume ? rate * interval : 0);
513    paused = false;
514    id = raf(update);
515  }
516  function pause() {
517    paused = true;
518  }
519  function rewind() {
520    startTime = now();
521    rate = 0;
522    if (onUpdate) {
523      onUpdate(rate);
524    }
525  }
526  function cancel() {
527    id && cancelAnimationFrame(id);
528    rate = 0;
529    id = 0;
530    paused = true;
531  }
532  function set(time) {
533    interval = time;
534  }
535  function isPaused() {
536    return paused;
537  }
538  return {
539    start: start,
540    rewind: rewind,
541    pause: pause,
542    cancel: cancel,
543    set: set,
544    isPaused: isPaused
545  };
546}
547function State(initialState) {
548  var state = initialState;
549  function set(value) {
550    state = value;
551  }
552  function is(states) {
553    return includes(toArray(states), state);
554  }
555  return {
556    set: set,
557    is: is
558  };
559}
560function Throttle(func, duration) {
561  var interval = RequestInterval(duration || 0, func, null, 1);
562  return function () {
563    interval.isPaused() && interval.start();
564  };
565}
566function Media(Splide2, Components2, options) {
567  var state = Splide2.state;
568  var breakpoints = options.breakpoints || {};
569  var reducedMotion = options.reducedMotion || {};
570  var binder = EventBinder();
571  var queries = [];
572  function setup() {
573    var isMin = options.mediaQuery === "min";
574    ownKeys(breakpoints).sort(function (n, m) {
575      return isMin ? +n - +m : +m - +n;
576    }).forEach(function (key) {
577      register(breakpoints[key], "(" + (isMin ? "min" : "max") + "-width:" + key + "px)");
578    });
579    register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION);
580    update();
581  }
582  function destroy(completely) {
583    if (completely) {
584      binder.destroy();
585    }
586  }
587  function register(options2, query) {
588    var queryList = matchMedia(query);
589    binder.bind(queryList, "change", update);
590    queries.push([options2, queryList]);
591  }
592  function update() {
593    var destroyed = state.is(DESTROYED);
594    var direction = options.direction;
595    var merged = queries.reduce(function (merged2, entry) {
596      return merge(merged2, entry[1].matches ? entry[0] : {});
597    }, {});
598    omit(options);
599    set(merged);
600    if (options.destroy) {
601      Splide2.destroy(options.destroy === "completely");
602    } else if (destroyed) {
603      destroy(true);
604      Splide2.mount();
605    } else {
606      direction !== options.direction && Splide2.refresh();
607    }
608  }
609  function reduce(enable) {
610    if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) {
611      enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion));
612    }
613  }
614  function set(opts, base, notify) {
615    merge(options, opts);
616    base && merge(Object.getPrototypeOf(options), opts);
617    if (notify || !state.is(CREATED)) {
618      Splide2.emit(EVENT_UPDATED, options);
619    }
620  }
621  return {
622    setup: setup,
623    destroy: destroy,
624    reduce: reduce,
625    set: set
626  };
627}
628var ARROW = "Arrow";
629var ARROW_LEFT = ARROW + "Left";
630var ARROW_RIGHT = ARROW + "Right";
631var ARROW_UP = ARROW + "Up";
632var ARROW_DOWN = ARROW + "Down";
633var LTR = "ltr";
634var RTL = "rtl";
635var TTB = "ttb";
636var ORIENTATION_MAP = {
637  width: ["height"],
638  left: ["top", "right"],
639  right: ["bottom", "left"],
640  x: ["y"],
641  X: ["Y"],
642  Y: ["X"],
643  ArrowLeft: [ARROW_UP, ARROW_RIGHT],
644  ArrowRight: [ARROW_DOWN, ARROW_LEFT]
645};
646function Direction(Splide2, Components2, options) {
647  function resolve(prop, axisOnly, direction) {
648    direction = direction || options.direction;
649    var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1;
650    return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function (match, offset) {
651      var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match;
652      return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement;
653    });
654  }
655  function orient(value) {
656    return value * (options.direction === RTL ? 1 : -1);
657  }
658  return {
659    resolve: resolve,
660    orient: orient
661  };
662}
663var ROLE = "role";
664var TAB_INDEX = "tabindex";
665var DISABLED = "disabled";
666var ARIA_PREFIX = "aria-";
667var ARIA_CONTROLS = ARIA_PREFIX + "controls";
668var ARIA_CURRENT = ARIA_PREFIX + "current";
669var ARIA_SELECTED = ARIA_PREFIX + "selected";
670var ARIA_LABEL = ARIA_PREFIX + "label";
671var ARIA_LABELLEDBY = ARIA_PREFIX + "labelledby";
672var ARIA_HIDDEN = ARIA_PREFIX + "hidden";
673var ARIA_ORIENTATION = ARIA_PREFIX + "orientation";
674var ARIA_ROLEDESCRIPTION = ARIA_PREFIX + "roledescription";
675var ARIA_LIVE = ARIA_PREFIX + "live";
676var ARIA_BUSY = ARIA_PREFIX + "busy";
677var ARIA_ATOMIC = ARIA_PREFIX + "atomic";
678var ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION];
679var CLASS_PREFIX = PROJECT_CODE + "__";
680var STATUS_CLASS_PREFIX = "is-";
681var CLASS_ROOT = PROJECT_CODE;
682var CLASS_TRACK = CLASS_PREFIX + "track";
683var CLASS_LIST = CLASS_PREFIX + "list";
684var CLASS_SLIDE = CLASS_PREFIX + "slide";
685var CLASS_CLONE = CLASS_SLIDE + "--clone";
686var CLASS_CONTAINER = CLASS_SLIDE + "__container";
687var CLASS_ARROWS = CLASS_PREFIX + "arrows";
688var CLASS_ARROW = CLASS_PREFIX + "arrow";
689var CLASS_ARROW_PREV = CLASS_ARROW + "--prev";
690var CLASS_ARROW_NEXT = CLASS_ARROW + "--next";
691var CLASS_PAGINATION = CLASS_PREFIX + "pagination";
692var CLASS_PAGINATION_PAGE = CLASS_PAGINATION + "__page";
693var CLASS_PROGRESS = CLASS_PREFIX + "progress";
694var CLASS_PROGRESS_BAR = CLASS_PROGRESS + "__bar";
695var CLASS_TOGGLE = CLASS_PREFIX + "toggle";
696var CLASS_TOGGLE_PLAY = CLASS_TOGGLE + "__play";
697var CLASS_TOGGLE_PAUSE = CLASS_TOGGLE + "__pause";
698var CLASS_SPINNER = CLASS_PREFIX + "spinner";
699var CLASS_SR = CLASS_PREFIX + "sr";
700var CLASS_INITIALIZED = STATUS_CLASS_PREFIX + "initialized";
701var CLASS_ACTIVE = STATUS_CLASS_PREFIX + "active";
702var CLASS_PREV = STATUS_CLASS_PREFIX + "prev";
703var CLASS_NEXT = STATUS_CLASS_PREFIX + "next";
704var CLASS_VISIBLE = STATUS_CLASS_PREFIX + "visible";
705var CLASS_LOADING = STATUS_CLASS_PREFIX + "loading";
706var CLASS_FOCUS_IN = STATUS_CLASS_PREFIX + "focus-in";
707var CLASS_OVERFLOW = STATUS_CLASS_PREFIX + "overflow";
708var STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN, CLASS_OVERFLOW];
709var CLASSES = {
710  slide: CLASS_SLIDE,
711  clone: CLASS_CLONE,
712  arrows: CLASS_ARROWS,
713  arrow: CLASS_ARROW,
714  prev: CLASS_ARROW_PREV,
715  next: CLASS_ARROW_NEXT,
716  pagination: CLASS_PAGINATION,
717  page: CLASS_PAGINATION_PAGE,
718  spinner: CLASS_SPINNER
719};
720function closest(from, selector) {
721  if (isFunction(from.closest)) {
722    return from.closest(selector);
723  }
724  var elm = from;
725  while (elm && elm.nodeType === 1) {
726    if (matches(elm, selector)) {
727      break;
728    }
729    elm = elm.parentElement;
730  }
731  return elm;
732}
733var FRICTION = 5;
734var LOG_INTERVAL = 200;
735var POINTER_DOWN_EVENTS = "touchstart mousedown";
736var POINTER_MOVE_EVENTS = "touchmove mousemove";
737var POINTER_UP_EVENTS = "touchend touchcancel mouseup click";
738function Elements(Splide2, Components2, options) {
739  var _EventInterface = EventInterface(Splide2),
740    on = _EventInterface.on,
741    bind = _EventInterface.bind;
742  var root = Splide2.root;
743  var i18n = options.i18n;
744  var elements = {};
745  var slides = [];
746  var rootClasses = [];
747  var trackClasses = [];
748  var track;
749  var list;
750  var isUsingKey;
751  function setup() {
752    collect();
753    init();
754    update();
755  }
756  function mount() {
757    on(EVENT_REFRESH, destroy);
758    on(EVENT_REFRESH, setup);
759    on(EVENT_UPDATED, update);
760    bind(document, POINTER_DOWN_EVENTS + " keydown", function (e) {
761      isUsingKey = e.type === "keydown";
762    }, {
763      capture: true
764    });
765    bind(root, "focusin", function () {
766      toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey);
767    });
768  }
769  function destroy(completely) {
770    var attrs = ALL_ATTRIBUTES.concat("style");
771    empty(slides);
772    removeClass(root, rootClasses);
773    removeClass(track, trackClasses);
774    removeAttribute([track, list], attrs);
775    removeAttribute(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]);
776  }
777  function update() {
778    removeClass(root, rootClasses);
779    removeClass(track, trackClasses);
780    rootClasses = getClasses(CLASS_ROOT);
781    trackClasses = getClasses(CLASS_TRACK);
782    addClass(root, rootClasses);
783    addClass(track, trackClasses);
784    setAttribute(root, ARIA_LABEL, options.label);
785    setAttribute(root, ARIA_LABELLEDBY, options.labelledby);
786  }
787  function collect() {
788    track = find("." + CLASS_TRACK);
789    list = child(track, "." + CLASS_LIST);
790    assert(track && list, "A track/list element is missing.");
791    push(slides, children(list, "." + CLASS_SLIDE + ":not(." + CLASS_CLONE + ")"));
792    forOwn({
793      arrows: CLASS_ARROWS,
794      pagination: CLASS_PAGINATION,
795      prev: CLASS_ARROW_PREV,
796      next: CLASS_ARROW_NEXT,
797      bar: CLASS_PROGRESS_BAR,
798      toggle: CLASS_TOGGLE
799    }, function (className, key) {
800      elements[key] = find("." + className);
801    });
802    assign(elements, {
803      root: root,
804      track: track,
805      list: list,
806      slides: slides
807    });
808  }
809  function init() {
810    var id = root.id || uniqueId(PROJECT_CODE);
811    var role = options.role;
812    root.id = id;
813    track.id = track.id || id + "-track";
814    list.id = list.id || id + "-list";
815    if (!getAttribute(root, ROLE) && root.tagName !== "SECTION" && role) {
816      setAttribute(root, ROLE, role);
817    }
818    setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel);
819    setAttribute(list, ROLE, "presentation");
820  }
821  function find(selector) {
822    var elm = query(root, selector);
823    return elm && closest(elm, "." + CLASS_ROOT) === root ? elm : void 0;
824  }
825  function getClasses(base) {
826    return [base + "--" + options.type, base + "--" + options.direction, options.drag && base + "--draggable", options.isNavigation && base + "--nav", base === CLASS_ROOT && CLASS_ACTIVE];
827  }
828  return assign(elements, {
829    setup: setup,
830    mount: mount,
831    destroy: destroy
832  });
833}
834var SLIDE = "slide";
835var LOOP = "loop";
836var FADE = "fade";
837function Slide$1(Splide2, index, slideIndex, slide) {
838  var event = EventInterface(Splide2);
839  var on = event.on,
840    emit = event.emit,
841    bind = event.bind;
842  var Components = Splide2.Components,
843    root = Splide2.root,
844    options = Splide2.options;
845  var isNavigation = options.isNavigation,
846    updateOnMove = options.updateOnMove,
847    i18n = options.i18n,
848    pagination = options.pagination,
849    slideFocus = options.slideFocus;
850  var resolve = Components.Direction.resolve;
851  var styles = getAttribute(slide, "style");
852  var label = getAttribute(slide, ARIA_LABEL);
853  var isClone = slideIndex > -1;
854  var container = child(slide, "." + CLASS_CONTAINER);
855  var destroyed;
856  function mount() {
857    if (!isClone) {
858      slide.id = root.id + "-slide" + pad(index + 1);
859      setAttribute(slide, ROLE, pagination ? "tabpanel" : "group");
860      setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide);
861      setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide2.length]));
862    }
863    listen();
864  }
865  function listen() {
866    bind(slide, "click", apply(emit, EVENT_CLICK, self));
867    bind(slide, "keydown", apply(emit, EVENT_SLIDE_KEYDOWN, self));
868    on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update);
869    on(EVENT_NAVIGATION_MOUNTED, initNavigation);
870    if (updateOnMove) {
871      on(EVENT_MOVE, onMove);
872    }
873  }
874  function destroy() {
875    destroyed = true;
876    event.destroy();
877    removeClass(slide, STATUS_CLASSES);
878    removeAttribute(slide, ALL_ATTRIBUTES);
879    setAttribute(slide, "style", styles);
880    setAttribute(slide, ARIA_LABEL, label || "");
881  }
882  function initNavigation() {
883    var controls = Splide2.splides.map(function (target) {
884      var Slide2 = target.splide.Components.Slides.getAt(index);
885      return Slide2 ? Slide2.slide.id : "";
886    }).join(" ");
887    setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1));
888    setAttribute(slide, ARIA_CONTROLS, controls);
889    setAttribute(slide, ROLE, slideFocus ? "button" : "");
890    slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION);
891  }
892  function onMove() {
893    if (!destroyed) {
894      update();
895    }
896  }
897  function update() {
898    if (!destroyed) {
899      var curr = Splide2.index;
900      updateActivity();
901      updateVisibility();
902      toggleClass(slide, CLASS_PREV, index === curr - 1);
903      toggleClass(slide, CLASS_NEXT, index === curr + 1);
904    }
905  }
906  function updateActivity() {
907    var active = isActive();
908    if (active !== hasClass(slide, CLASS_ACTIVE)) {
909      toggleClass(slide, CLASS_ACTIVE, active);
910      setAttribute(slide, ARIA_CURRENT, isNavigation && active || "");
911      emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self);
912    }
913  }
914  function updateVisibility() {
915    var visible = isVisible();
916    var hidden = !visible && (!isActive() || isClone);
917    if (!Splide2.state.is([MOVING, SCROLLING])) {
918      setAttribute(slide, ARIA_HIDDEN, hidden || "");
919    }
920    setAttribute(queryAll(slide, options.focusableNodes || ""), TAB_INDEX, hidden ? -1 : "");
921    if (slideFocus) {
922      setAttribute(slide, TAB_INDEX, hidden ? -1 : 0);
923    }
924    if (visible !== hasClass(slide, CLASS_VISIBLE)) {
925      toggleClass(slide, CLASS_VISIBLE, visible);
926      emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self);
927    }
928    if (!visible && document.activeElement === slide) {
929      var Slide2 = Components.Slides.getAt(Splide2.index);
930      Slide2 && focus(Slide2.slide);
931    }
932  }
933  function style$1(prop, value, useContainer) {
934    style(useContainer && container || slide, prop, value);
935  }
936  function isActive() {
937    var curr = Splide2.index;
938    return curr === index || options.cloneStatus && curr === slideIndex;
939  }
940  function isVisible() {
941    if (Splide2.is(FADE)) {
942      return isActive();
943    }
944    var trackRect = rect(Components.Elements.track);
945    var slideRect = rect(slide);
946    var left = resolve("left", true);
947    var right = resolve("right", true);
948    return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]);
949  }
950  function isWithin(from, distance) {
951    var diff = abs(from - index);
952    if (!isClone && (options.rewind || Splide2.is(LOOP))) {
953      diff = min(diff, Splide2.length - diff);
954    }
955    return diff <= distance;
956  }
957  var self = {
958    index: index,
959    slideIndex: slideIndex,
960    slide: slide,
961    container: container,
962    isClone: isClone,
963    mount: mount,
964    destroy: destroy,
965    update: update,
966    style: style$1,
967    isWithin: isWithin
968  };
969  return self;
970}
971function Slides(Splide2, Components2, options) {
972  var _EventInterface2 = EventInterface(Splide2),
973    on = _EventInterface2.on,
974    emit = _EventInterface2.emit,
975    bind = _EventInterface2.bind;
976  var _Components2$Elements = Components2.Elements,
977    slides = _Components2$Elements.slides,
978    list = _Components2$Elements.list;
979  var Slides2 = [];
980  function mount() {
981    init();
982    on(EVENT_REFRESH, destroy);
983    on(EVENT_REFRESH, init);
984  }
985  function init() {
986    slides.forEach(function (slide, index) {
987      register(slide, index, -1);
988    });
989  }
990  function destroy() {
991    forEach$1(function (Slide2) {
992      Slide2.destroy();
993    });
994    empty(Slides2);
995  }
996  function update() {
997    forEach$1(function (Slide2) {
998      Slide2.update();
999    });
1000  }
1001  function register(slide, index, slideIndex) {
1002    var object = Slide$1(Splide2, index, slideIndex, slide);
1003    object.mount();
1004    Slides2.push(object);
1005    Slides2.sort(function (Slide1, Slide2) {
1006      return Slide1.index - Slide2.index;
1007    });
1008  }
1009  function get(excludeClones) {
1010    return excludeClones ? filter(function (Slide2) {
1011      return !Slide2.isClone;
1012    }) : Slides2;
1013  }
1014  function getIn(page) {
1015    var Controller = Components2.Controller;
1016    var index = Controller.toIndex(page);
1017    var max = Controller.hasFocus() ? 1 : options.perPage;
1018    return filter(function (Slide2) {
1019      return between(Slide2.index, index, index + max - 1);
1020    });
1021  }
1022  function getAt(index) {
1023    return filter(index)[0];
1024  }
1025  function add(items, index) {
1026    forEach(items, function (slide) {
1027      if (isString(slide)) {
1028        slide = parseHtml(slide);
1029      }
1030      if (isHTMLElement(slide)) {
1031        var ref = slides[index];
1032        ref ? before(slide, ref) : append(list, slide);
1033        addClass(slide, options.classes.slide);
1034        observeImages(slide, apply(emit, EVENT_RESIZE));
1035      }
1036    });
1037    emit(EVENT_REFRESH);
1038  }
1039  function remove$1(matcher) {
1040    remove(filter(matcher).map(function (Slide2) {
1041      return Slide2.slide;
1042    }));
1043    emit(EVENT_REFRESH);
1044  }
1045  function forEach$1(iteratee, excludeClones) {
1046    get(excludeClones).forEach(iteratee);
1047  }
1048  function filter(matcher) {
1049    return Slides2.filter(isFunction(matcher) ? matcher : function (Slide2) {
1050      return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index);
1051    });
1052  }
1053  function style(prop, value, useContainer) {
1054    forEach$1(function (Slide2) {
1055      Slide2.style(prop, value, useContainer);
1056    });
1057  }
1058  function observeImages(elm, callback) {
1059    var images = queryAll(elm, "img");
1060    var length = images.length;
1061    if (length) {
1062      images.forEach(function (img) {
1063        bind(img, "load error", function () {
1064          if (! --length) {
1065            callback();
1066          }
1067        });
1068      });
1069    } else {
1070      callback();
1071    }
1072  }
1073  function getLength(excludeClones) {
1074    return excludeClones ? slides.length : Slides2.length;
1075  }
1076  function isEnough() {
1077    return Slides2.length > options.perPage;
1078  }
1079  return {
1080    mount: mount,
1081    destroy: destroy,
1082    update: update,
1083    register: register,
1084    get: get,
1085    getIn: getIn,
1086    getAt: getAt,
1087    add: add,
1088    remove: remove$1,
1089    forEach: forEach$1,
1090    filter: filter,
1091    style: style,
1092    getLength: getLength,
1093    isEnough: isEnough
1094  };
1095}
1096function Layout(Splide2, Components2, options) {
1097  var _EventInterface3 = EventInterface(Splide2),
1098    on = _EventInterface3.on,
1099    bind = _EventInterface3.bind,
1100    emit = _EventInterface3.emit;
1101  var Slides = Components2.Slides;
1102  var resolve = Components2.Direction.resolve;
1103  var _Components2$Elements2 = Components2.Elements,
1104    root = _Components2$Elements2.root,
1105    track = _Components2$Elements2.track,
1106    list = _Components2$Elements2.list;
1107  var getAt = Slides.getAt,
1108    styleSlides = Slides.style;
1109  var vertical;
1110  var rootRect;
1111  var overflow;
1112  function mount() {
1113    init();
1114    bind(window, "resize load", Throttle(apply(emit, EVENT_RESIZE)));
1115    on([EVENT_UPDATED, EVENT_REFRESH], init);
1116    on(EVENT_RESIZE, resize);
1117  }
1118  function init() {
1119    vertical = options.direction === TTB;
1120    style(root, "maxWidth", unit(options.width));
1121    style(track, resolve("paddingLeft"), cssPadding(false));
1122    style(track, resolve("paddingRight"), cssPadding(true));
1123    resize(true);
1124  }
1125  function resize(force) {
1126    var newRect = rect(root);
1127    if (force || rootRect.width !== newRect.width || rootRect.height !== newRect.height) {
1128      style(track, "height", cssTrackHeight());
1129      styleSlides(resolve("marginRight"), unit(options.gap));
1130      styleSlides("width", cssSlideWidth());
1131      styleSlides("height", cssSlideHeight(), true);
1132      rootRect = newRect;
1133      emit(EVENT_RESIZED);
1134      if (overflow !== (overflow = isOverflow())) {
1135        toggleClass(root, CLASS_OVERFLOW, overflow);
1136        emit(EVENT_OVERFLOW, overflow);
1137      }
1138    }
1139  }
1140  function cssPadding(right) {
1141    var padding = options.padding;
1142    var prop = resolve(right ? "right" : "left");
1143    return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px";
1144  }
1145  function cssTrackHeight() {
1146    var height = "";
1147    if (vertical) {
1148      height = cssHeight();
1149      assert(height, "height or heightRatio is missing.");
1150      height = "calc(" + height + " - " + cssPadding(false) + " - " + cssPadding(true) + ")";
1151    }
1152    return height;
1153  }
1154  function cssHeight() {
1155    return unit(options.height || rect(list).width * options.heightRatio);
1156  }
1157  function cssSlideWidth() {
1158    return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
1159  }
1160  function cssSlideHeight() {
1161    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
1162  }
1163  function cssSlideSize() {
1164    var gap = unit(options.gap);
1165    return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")";
1166  }
1167  function listSize() {
1168    return rect(list)[resolve("width")];
1169  }
1170  function slideSize(index, withoutGap) {
1171    var Slide = getAt(index || 0);
1172    return Slide ? rect(Slide.slide)[resolve("width")] + (withoutGap ? 0 : getGap()) : 0;
1173  }
1174  function totalSize(index, withoutGap) {
1175    var Slide = getAt(index);
1176    if (Slide) {
1177      var right = rect(Slide.slide)[resolve("right")];
1178      var left = rect(list)[resolve("left")];
1179      return abs(right - left) + (withoutGap ? 0 : getGap());
1180    }
1181    return 0;
1182  }
1183  function sliderSize(withoutGap) {
1184    return totalSize(Splide2.length - 1) - totalSize(0) + slideSize(0, withoutGap);
1185  }
1186  function getGap() {
1187    var Slide = getAt(0);
1188    return Slide && parseFloat(style(Slide.slide, resolve("marginRight"))) || 0;
1189  }
1190  function getPadding(right) {
1191    return parseFloat(style(track, resolve("padding" + (right ? "Right" : "Left")))) || 0;
1192  }
1193  function isOverflow() {
1194    return Splide2.is(FADE) || sliderSize(true) > listSize();
1195  }
1196  return {
1197    mount: mount,
1198    resize: resize,
1199    listSize: listSize,
1200    slideSize: slideSize,
1201    sliderSize: sliderSize,
1202    totalSize: totalSize,
1203    getPadding: getPadding,
1204    isOverflow: isOverflow
1205  };
1206}
1207var MULTIPLIER = 2;
1208function Clones(Splide2, Components2, options) {
1209  var event = EventInterface(Splide2);
1210  var on = event.on;
1211  var Elements = Components2.Elements,
1212    Slides = Components2.Slides;
1213  var resolve = Components2.Direction.resolve;
1214  var clones = [];
1215  var cloneCount;
1216  function mount() {
1217    on(EVENT_REFRESH, remount);
1218    on([EVENT_UPDATED, EVENT_RESIZE], observe);
1219    if (cloneCount = computeCloneCount()) {
1220      generate(cloneCount);
1221      Components2.Layout.resize(true);
1222    }
1223  }
1224  function remount() {
1225    destroy();
1226    mount();
1227  }
1228  function destroy() {
1229    remove(clones);
1230    empty(clones);
1231    event.destroy();
1232  }
1233  function observe() {
1234    var count = computeCloneCount();
1235    if (cloneCount !== count) {
1236      if (cloneCount < count || !count) {
1237        event.emit(EVENT_REFRESH);
1238      }
1239    }
1240  }
1241  function generate(count) {
1242    var slides = Slides.get().slice();
1243    var length = slides.length;
1244    if (length) {
1245      while (slides.length < count) {
1246        push(slides, slides);
1247      }
1248      push(slides.slice(-count), slides.slice(0, count)).forEach(function (Slide, index) {
1249        var isHead = index < count;
1250        var clone = cloneDeep(Slide.slide, index);
1251        isHead ? before(clone, slides[0].slide) : append(Elements.list, clone);
1252        push(clones, clone);
1253        Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index);
1254      });
1255    }
1256  }
1257  function cloneDeep(elm, index) {
1258    var clone = elm.cloneNode(true);
1259    addClass(clone, options.classes.clone);
1260    clone.id = Splide2.root.id + "-clone" + pad(index + 1);
1261    return clone;
1262  }
1263  function computeCloneCount() {
1264    var clones2 = options.clones;
1265    if (!Splide2.is(LOOP)) {
1266      clones2 = 0;
1267    } else if (isUndefined(clones2)) {
1268      var fixedSize = options[resolve("fixedWidth")] && Components2.Layout.slideSize(0);
1269      var fixedCount = fixedSize && ceil(rect(Elements.track)[resolve("width")] / fixedSize);
1270      clones2 = fixedCount || options[resolve("autoWidth")] && Splide2.length || options.perPage * MULTIPLIER;
1271    }
1272    return clones2;
1273  }
1274  return {
1275    mount: mount,
1276    destroy: destroy
1277  };
1278}
1279function Move(Splide2, Components2, options) {
1280  var _EventInterface4 = EventInterface(Splide2),
1281    on = _EventInterface4.on,
1282    emit = _EventInterface4.emit;
1283  var set = Splide2.state.set;
1284  var _Components2$Layout = Components2.Layout,
1285    slideSize = _Components2$Layout.slideSize,
1286    getPadding = _Components2$Layout.getPadding,
1287    totalSize = _Components2$Layout.totalSize,
1288    listSize = _Components2$Layout.listSize,
1289    sliderSize = _Components2$Layout.sliderSize;
1290  var _Components2$Directio = Components2.Direction,
1291    resolve = _Components2$Directio.resolve,
1292    orient = _Components2$Directio.orient;
1293  var _Components2$Elements3 = Components2.Elements,
1294    list = _Components2$Elements3.list,
1295    track = _Components2$Elements3.track;
1296  var Transition;
1297  function mount() {
1298    Transition = Components2.Transition;
1299    on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition);
1300  }
1301  function reposition() {
1302    if (!Components2.Controller.isBusy()) {
1303      Components2.Scroll.cancel();
1304      jump(Splide2.index);
1305      Components2.Slides.update();
1306    }
1307  }
1308  function move(dest, index, prev, callback) {
1309    if (dest !== index && canShift(dest > prev)) {
1310      cancel();
1311      translate(shift(getPosition(), dest > prev), true);
1312    }
1313    set(MOVING);
1314    emit(EVENT_MOVE, index, prev, dest);
1315    Transition.start(index, function () {
1316      set(IDLE);
1317      emit(EVENT_MOVED, index, prev, dest);
1318      callback && callback();
1319    });
1320  }
1321  function jump(index) {
1322    translate(toPosition(index, true));
1323  }
1324  function translate(position, preventLoop) {
1325    if (!Splide2.is(FADE)) {
1326      var destination = preventLoop ? position : loop(position);
1327      style(list, "transform", "translate" + resolve("X") + "(" + destination + "px)");
1328      position !== destination && emit(EVENT_SHIFTED);
1329    }
1330  }
1331  function loop(position) {
1332    if (Splide2.is(LOOP)) {
1333      var index = toIndex(position);
1334      var exceededMax = index > Components2.Controller.getEnd();
1335      var exceededMin = index < 0;
1336      if (exceededMin || exceededMax) {
1337        position = shift(position, exceededMax);
1338      }
1339    }
1340    return position;
1341  }
1342  function shift(position, backwards) {
1343    var excess = position - getLimit(backwards);
1344    var size = sliderSize();
1345    position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1);
1346    return position;
1347  }
1348  function cancel() {
1349    translate(getPosition(), true);
1350    Transition.cancel();
1351  }
1352  function toIndex(position) {
1353    var Slides = Components2.Slides.get();
1354    var index = 0;
1355    var minDistance = Infinity;
1356    for (var i = 0; i < Slides.length; i++) {
1357      var slideIndex = Slides[i].index;
1358      var distance = abs(toPosition(slideIndex, true) - position);
1359      if (distance <= minDistance) {
1360        minDistance = distance;
1361        index = slideIndex;
1362      } else {
1363        break;
1364      }
1365    }
1366    return index;
1367  }
1368  function toPosition(index, trimming) {
1369    var position = orient(totalSize(index - 1) - offset(index));
1370    return trimming ? trim(position) : position;
1371  }
1372  function getPosition() {
1373    var left = resolve("left");
1374    return rect(list)[left] - rect(track)[left] + orient(getPadding(false));
1375  }
1376  function trim(position) {
1377    if (options.trimSpace && Splide2.is(SLIDE)) {
1378      position = clamp(position, 0, orient(sliderSize(true) - listSize()));
1379    }
1380    return position;
1381  }
1382  function offset(index) {
1383    var focus = options.focus;
1384    return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0;
1385  }
1386  function getLimit(max) {
1387    return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace);
1388  }
1389  function canShift(backwards) {
1390    var shifted = orient(shift(getPosition(), backwards));
1391    return backwards ? shifted >= 0 : shifted <= list[resolve("scrollWidth")] - rect(track)[resolve("width")];
1392  }
1393  function exceededLimit(max, position) {
1394    position = isUndefined(position) ? getPosition() : position;
1395    var exceededMin = max !== true && orient(position) < orient(getLimit(false));
1396    var exceededMax = max !== false && orient(position) > orient(getLimit(true));
1397    return exceededMin || exceededMax;
1398  }
1399  return {
1400    mount: mount,
1401    move: move,
1402    jump: jump,
1403    translate: translate,
1404    shift: shift,
1405    cancel: cancel,
1406    toIndex: toIndex,
1407    toPosition: toPosition,
1408    getPosition: getPosition,
1409    getLimit: getLimit,
1410    exceededLimit: exceededLimit,
1411    reposition: reposition
1412  };
1413}
1414function Controller(Splide2, Components2, options) {
1415  var _EventInterface5 = EventInterface(Splide2),
1416    on = _EventInterface5.on,
1417    emit = _EventInterface5.emit;
1418  var Move = Components2.Move;
1419  var getPosition = Move.getPosition,
1420    getLimit = Move.getLimit,
1421    toPosition = Move.toPosition;
1422  var _Components2$Slides = Components2.Slides,
1423    isEnough = _Components2$Slides.isEnough,
1424    getLength = _Components2$Slides.getLength;
1425  var omitEnd = options.omitEnd;
1426  var isLoop = Splide2.is(LOOP);
1427  var isSlide = Splide2.is(SLIDE);
1428  var getNext = apply(getAdjacent, false);
1429  var getPrev = apply(getAdjacent, true);
1430  var currIndex = options.start || 0;
1431  var endIndex;
1432  var prevIndex = currIndex;
1433  var slideCount;
1434  var perMove;
1435  var perPage;
1436  function mount() {
1437    init();
1438    on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], init);
1439    on(EVENT_RESIZED, onResized);
1440  }
1441  function init() {
1442    slideCount = getLength(true);
1443    perMove = options.perMove;
1444    perPage = options.perPage;
1445    endIndex = getEnd();
1446    var index = clamp(currIndex, 0, omitEnd ? endIndex : slideCount - 1);
1447    if (index !== currIndex) {
1448      currIndex = index;
1449      Move.reposition();
1450    }
1451  }
1452  function onResized() {
1453    if (endIndex !== getEnd()) {
1454      emit(EVENT_END_INDEX_CHANGED);
1455    }
1456  }
1457  function go(control, allowSameIndex, callback) {
1458    if (!isBusy()) {
1459      var dest = parse(control);
1460      var index = loop(dest);
1461      if (index > -1 && (allowSameIndex || index !== currIndex)) {
1462        setIndex(index);
1463        Move.move(dest, index, prevIndex, callback);
1464      }
1465    }
1466  }
1467  function scroll(destination, duration, snap, callback) {
1468    Components2.Scroll.scroll(destination, duration, snap, function () {
1469      var index = loop(Move.toIndex(getPosition()));
1470      setIndex(omitEnd ? min(index, endIndex) : index);
1471      callback && callback();
1472    });
1473  }
1474  function parse(control) {
1475    var index = currIndex;
1476    if (isString(control)) {
1477      var _ref = control.match(/([+\-<>])(\d+)?/) || [],
1478        indicator = _ref[1],
1479        number = _ref[2];
1480      if (indicator === "+" || indicator === "-") {
1481        index = computeDestIndex(currIndex + +("" + indicator + (+number || 1)), currIndex);
1482      } else if (indicator === ">") {
1483        index = number ? toIndex(+number) : getNext(true);
1484      } else if (indicator === "<") {
1485        index = getPrev(true);
1486      }
1487    } else {
1488      index = isLoop ? control : clamp(control, 0, endIndex);
1489    }
1490    return index;
1491  }
1492  function getAdjacent(prev, destination) {
1493    var number = perMove || (hasFocus() ? 1 : perPage);
1494    var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus()));
1495    if (dest === -1 && isSlide) {
1496      if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) {
1497        return prev ? 0 : endIndex;
1498      }
1499    }
1500    return destination ? dest : loop(dest);
1501  }
1502  function computeDestIndex(dest, from, snapPage) {
1503    if (isEnough() || hasFocus()) {
1504      var index = computeMovableDestIndex(dest);
1505      if (index !== dest) {
1506        from = dest;
1507        dest = index;
1508        snapPage = false;
1509      }
1510      if (dest < 0 || dest > endIndex) {
1511        if (!perMove && (between(0, dest, from, true) || between(endIndex, from, dest, true))) {
1512          dest = toIndex(toPage(dest));
1513        } else {
1514          if (isLoop) {
1515            dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest;
1516          } else if (options.rewind) {
1517            dest = dest < 0 ? endIndex : 0;
1518          } else {
1519            dest = -1;
1520          }
1521        }
1522      } else {
1523        if (snapPage && dest !== from) {
1524          dest = toIndex(toPage(from) + (dest < from ? -1 : 1));
1525        }
1526      }
1527    } else {
1528      dest = -1;
1529    }
1530    return dest;
1531  }
1532  function computeMovableDestIndex(dest) {
1533    if (isSlide && options.trimSpace === "move" && dest !== currIndex) {
1534      var position = getPosition();
1535      while (position === toPosition(dest, true) && between(dest, 0, Splide2.length - 1, !options.rewind)) {
1536        dest < currIndex ? --dest : ++dest;
1537      }
1538    }
1539    return dest;
1540  }
1541  function loop(index) {
1542    return isLoop ? (index + slideCount) % slideCount || 0 : index;
1543  }
1544  function getEnd() {
1545    var end = slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage);
1546    while (omitEnd && end-- > 0) {
1547      if (toPosition(slideCount - 1, true) !== toPosition(end, true)) {
1548        end++;
1549        break;
1550      }
1551    }
1552    return clamp(end, 0, slideCount - 1);
1553  }
1554  function toIndex(page) {
1555    return clamp(hasFocus() ? page : perPage * page, 0, endIndex);
1556  }
1557  function toPage(index) {
1558    return hasFocus() ? min(index, endIndex) : floor((index >= endIndex ? slideCount - 1 : index) / perPage);
1559  }
1560  function toDest(destination) {
1561    var closest = Move.toIndex(destination);
1562    return isSlide ? clamp(closest, 0, endIndex) : closest;
1563  }
1564  function setIndex(index) {
1565    if (index !== currIndex) {
1566      prevIndex = currIndex;
1567      currIndex = index;
1568    }
1569  }
1570  function getIndex(prev) {
1571    return prev ? prevIndex : currIndex;
1572  }
1573  function hasFocus() {
1574    return !isUndefined(options.focus) || options.isNavigation;
1575  }
1576  function isBusy() {
1577    return Splide2.state.is([MOVING, SCROLLING]) && !!options.waitForTransition;
1578  }
1579  return {
1580    mount: mount,
1581    go: go,
1582    scroll: scroll,
1583    getNext: getNext,
1584    getPrev: getPrev,
1585    getAdjacent: getAdjacent,
1586    getEnd: getEnd,
1587    setIndex: setIndex,
1588    getIndex: getIndex,
1589    toIndex: toIndex,
1590    toPage: toPage,
1591    toDest: toDest,
1592    hasFocus: hasFocus,
1593    isBusy: isBusy
1594  };
1595}
1596var XML_NAME_SPACE = "http://www.w3.org/2000/svg";
1597var PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z";
1598var SIZE = 40;
1599function Arrows(Splide2, Components2, options) {
1600  var event = EventInterface(Splide2);
1601  var on = event.on,
1602    bind = event.bind,
1603    emit = event.emit;
1604  var classes = options.classes,
1605    i18n = options.i18n;
1606  var Elements = Components2.Elements,
1607    Controller = Components2.Controller;
1608  var placeholder = Elements.arrows,
1609    track = Elements.track;
1610  var wrapper = placeholder;
1611  var prev = Elements.prev;
1612  var next = Elements.next;
1613  var created;
1614  var wrapperClasses;
1615  var arrows = {};
1616  function mount() {
1617    init();
1618    on(EVENT_UPDATED, remount);
1619  }
1620  function remount() {
1621    destroy();
1622    mount();
1623  }
1624  function init() {
1625    var enabled = options.arrows;
1626    if (enabled && !(prev && next)) {
1627      createArrows();
1628    }
1629    if (prev && next) {
1630      assign(arrows, {
1631        prev: prev,
1632        next: next
1633      });
1634      display(wrapper, enabled ? "" : "none");
1635      addClass(wrapper, wrapperClasses = CLASS_ARROWS + "--" + options.direction);
1636      if (enabled) {
1637        listen();
1638        update();
1639        setAttribute([prev, next], ARIA_CONTROLS, track.id);
1640        emit(EVENT_ARROWS_MOUNTED, prev, next);
1641      }
1642    }
1643  }
1644  function destroy() {
1645    event.destroy();
1646    removeClass(wrapper, wrapperClasses);
1647    if (created) {
1648      remove(placeholder ? [prev, next] : wrapper);
1649      prev = next = null;
1650    } else {
1651      removeAttribute([prev, next], ALL_ATTRIBUTES);
1652    }
1653  }
1654  function listen() {
1655    on([EVENT_MOUNTED, EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED, EVENT_END_INDEX_CHANGED], update);
1656    bind(next, "click", apply(go, ">"));
1657    bind(prev, "click", apply(go, "<"));
1658  }
1659  function go(control) {
1660    Controller.go(control, true);
1661  }
1662  function createArrows() {
1663    wrapper = placeholder || create("div", classes.arrows);
1664    prev = createArrow(true);
1665    next = createArrow(false);
1666    created = true;
1667    append(wrapper, [prev, next]);
1668    !placeholder && before(wrapper, track);
1669  }
1670  function createArrow(prev2) {
1671    var arrow = "<button class=\"" + classes.arrow + " " + (prev2 ? classes.prev : classes.next) + "\" type=\"button\"><svg xmlns=\"" + XML_NAME_SPACE + "\" viewBox=\"0 0 " + SIZE + " " + SIZE + "\" width=\"" + SIZE + "\" height=\"" + SIZE + "\" focusable=\"false\"><path d=\"" + (options.arrowPath || PATH) + "\" />";
1672    return parseHtml(arrow);
1673  }
1674  function update() {
1675    if (prev && next) {
1676      var index = Splide2.index;
1677      var prevIndex = Controller.getPrev();
1678      var nextIndex = Controller.getNext();
1679      var prevLabel = prevIndex > -1 && index < prevIndex ? i18n.last : i18n.prev;
1680      var nextLabel = nextIndex > -1 && index > nextIndex ? i18n.first : i18n.next;
1681      prev.disabled = prevIndex < 0;
1682      next.disabled = nextIndex < 0;
1683      setAttribute(prev, ARIA_LABEL, prevLabel);
1684      setAttribute(next, ARIA_LABEL, nextLabel);
1685      emit(EVENT_ARROWS_UPDATED, prev, next, prevIndex, nextIndex);
1686    }
1687  }
1688  return {
1689    arrows: arrows,
1690    mount: mount,
1691    destroy: destroy,
1692    update: update
1693  };
1694}
1695var INTERVAL_DATA_ATTRIBUTE = DATA_ATTRIBUTE + "-interval";
1696function Autoplay(Splide2, Components2, options) {
1697  var _EventInterface6 = EventInterface(Splide2),
1698    on = _EventInterface6.on,
1699    bind = _EventInterface6.bind,
1700    emit = _EventInterface6.emit;
1701  var interval = RequestInterval(options.interval, Splide2.go.bind(Splide2, ">"), onAnimationFrame);
1702  var isPaused = interval.isPaused;
1703  var Elements = Components2.Elements,
1704    _Components2$Elements4 = Components2.Elements,
1705    root = _Components2$Elements4.root,
1706    toggle = _Components2$Elements4.toggle;
1707  var autoplay = options.autoplay;
1708  var hovered;
1709  var focused;
1710  var stopped = autoplay === "pause";
1711  function mount() {
1712    if (autoplay) {
1713      listen();
1714      toggle && setAttribute(toggle, ARIA_CONTROLS, Elements.track.id);
1715      stopped || play();
1716      update();
1717    }
1718  }
1719  function listen() {
1720    if (options.pauseOnHover) {
1721      bind(root, "mouseenter mouseleave", function (e) {
1722        hovered = e.type === "mouseenter";
1723        autoToggle();
1724      });
1725    }
1726    if (options.pauseOnFocus) {
1727      bind(root, "focusin focusout", function (e) {
1728        focused = e.type === "focusin";
1729        autoToggle();
1730      });
1731    }
1732    if (toggle) {
1733      bind(toggle, "click", function () {
1734        stopped ? play() : pause(true);
1735      });
1736    }
1737    on([EVENT_MOVE, EVENT_SCROLL, EVENT_REFRESH], interval.rewind);
1738    on(EVENT_MOVE, onMove);
1739  }
1740  function play() {
1741    if (isPaused() && Components2.Slides.isEnough()) {
1742      interval.start(!options.resetProgress);
1743      focused = hovered = stopped = false;
1744      update();
1745      emit(EVENT_AUTOPLAY_PLAY);
1746    }
1747  }
1748  function pause(stop) {
1749    if (stop === void 0) {
1750      stop = true;
1751    }
1752    stopped = !!stop;
1753    update();
1754    if (!isPaused()) {
1755      interval.pause();
1756      emit(EVENT_AUTOPLAY_PAUSE);
1757    }
1758  }
1759  function autoToggle() {
1760    if (!stopped) {
1761      hovered || focused ? pause(false) : play();
1762    }
1763  }
1764  function update() {
1765    if (toggle) {
1766      toggleClass(toggle, CLASS_ACTIVE, !stopped);
1767      setAttribute(toggle, ARIA_LABEL, options.i18n[stopped ? "play" : "pause"]);
1768    }
1769  }
1770  function onAnimationFrame(rate) {
1771    var bar = Elements.bar;
1772    bar && style(bar, "width", rate * 100 + "%");
1773    emit(EVENT_AUTOPLAY_PLAYING, rate);
1774  }
1775  function onMove(index) {
1776    var Slide = Components2.Slides.getAt(index);
1777    interval.set(Slide && +getAttribute(Slide.slide, INTERVAL_DATA_ATTRIBUTE) || options.interval);
1778  }
1779  return {
1780    mount: mount,
1781    destroy: interval.cancel,
1782    play: play,
1783    pause: pause,
1784    isPaused: isPaused
1785  };
1786}
1787function Cover(Splide2, Components2, options) {
1788  var _EventInterface7 = EventInterface(Splide2),
1789    on = _EventInterface7.on;
1790  function mount() {
1791    if (options.cover) {
1792      on(EVENT_LAZYLOAD_LOADED, apply(toggle, true));
1793      on([EVENT_MOUNTED, EVENT_UPDATED, EVENT_REFRESH], apply(cover, true));
1794    }
1795  }
1796  function cover(cover2) {
1797    Components2.Slides.forEach(function (Slide) {
1798      var img = child(Slide.container || Slide.slide, "img");
1799      if (img && img.src) {
1800        toggle(cover2, img, Slide);
1801      }
1802    });
1803  }
1804  function toggle(cover2, img, Slide) {
1805    Slide.style("background", cover2 ? "center/cover no-repeat url(\"" + img.src + "\")" : "", true);
1806    display(img, cover2 ? "none" : "");
1807  }
1808  return {
1809    mount: mount,
1810    destroy: apply(cover, false)
1811  };
1812}
1813var BOUNCE_DIFF_THRESHOLD = 10;
1814var BOUNCE_DURATION = 600;
1815var FRICTION_FACTOR = 0.6;
1816var BASE_VELOCITY = 1.5;
1817var MIN_DURATION = 800;
1818function Scroll(Splide2, Components2, options) {
1819  var _EventInterface8 = EventInterface(Splide2),
1820    on = _EventInterface8.on,
1821    emit = _EventInterface8.emit;
1822  var set = Splide2.state.set;
1823  var Move = Components2.Move;
1824  var getPosition = Move.getPosition,
1825    getLimit = Move.getLimit,
1826    exceededLimit = Move.exceededLimit,
1827    translate = Move.translate;
1828  var isSlide = Splide2.is(SLIDE);
1829  var interval;
1830  var callback;
1831  var friction = 1;
1832  function mount() {
1833    on(EVENT_MOVE, clear);
1834    on([EVENT_UPDATED, EVENT_REFRESH], cancel);
1835  }
1836  function scroll(destination, duration, snap, onScrolled, noConstrain) {
1837    var from = getPosition();
1838    clear();
1839    if (snap && (!isSlide || !exceededLimit())) {
1840      var size = Components2.Layout.sliderSize();
1841      var offset = sign(destination) * size * floor(abs(destination) / size) || 0;
1842      destination = Move.toPosition(Components2.Controller.toDest(destination % size)) + offset;
1843    }
1844    var noDistance = approximatelyEqual(from, destination, 1);
1845    friction = 1;
1846    duration = noDistance ? 0 : duration || max(abs(destination - from) / BASE_VELOCITY, MIN_DURATION);
1847    callback = onScrolled;
1848    interval = RequestInterval(duration, onEnd, apply(update, from, destination, noConstrain), 1);
1849    set(SCROLLING);
1850    emit(EVENT_SCROLL);
1851    interval.start();
1852  }
1853  function onEnd() {
1854    set(IDLE);
1855    callback && callback();
1856    emit(EVENT_SCROLLED);
1857  }
1858  function update(from, to, noConstrain, rate) {
1859    var position = getPosition();
1860    var target = from + (to - from) * easing(rate);
1861    var diff = (target - position) * friction;
1862    translate(position + diff);
1863    if (isSlide && !noConstrain && exceededLimit()) {
1864      friction *= FRICTION_FACTOR;
1865      if (abs(diff) < BOUNCE_DIFF_THRESHOLD) {
1866        scroll(getLimit(exceededLimit(true)), BOUNCE_DURATION, false, callback, true);
1867      }
1868    }
1869  }
1870  function clear() {
1871    if (interval) {
1872      interval.cancel();
1873    }
1874  }
1875  function cancel() {
1876    if (interval && !interval.isPaused()) {
1877      clear();
1878      onEnd();
1879    }
1880  }
1881  function easing(t) {
1882    var easingFunc = options.easingFunc;
1883    return easingFunc ? easingFunc(t) : 1 - Math.pow(1 - t, 4);
1884  }
1885  return {
1886    mount: mount,
1887    destroy: clear,
1888    scroll: scroll,
1889    cancel: cancel
1890  };
1891}
1892var SCROLL_LISTENER_OPTIONS = {
1893  passive: false,
1894  capture: true
1895};
1896function Drag(Splide2, Components2, options) {
1897  var _EventInterface9 = EventInterface(Splide2),
1898    on = _EventInterface9.on,
1899    emit = _EventInterface9.emit,
1900    bind = _EventInterface9.bind,
1901    unbind = _EventInterface9.unbind;
1902  var state = Splide2.state;
1903  var Move = Components2.Move,
1904    Scroll = Components2.Scroll,
1905    Controller = Components2.Controller,
1906    track = Components2.Elements.track,
1907    reduce = Components2.Media.reduce;
1908  var _Components2$Directio2 = Components2.Direction,
1909    resolve = _Components2$Directio2.resolve,
1910    orient = _Components2$Directio2.orient;
1911  var getPosition = Move.getPosition,
1912    exceededLimit = Move.exceededLimit;
1913  var basePosition;
1914  var baseEvent;
1915  var prevBaseEvent;
1916  var isFree;
1917  var dragging;
1918  var exceeded = false;
1919  var clickPrevented;
1920  var disabled;
1921  var target;
1922  function mount() {
1923    bind(track, POINTER_MOVE_EVENTS, noop, SCROLL_LISTENER_OPTIONS);
1924    bind(track, POINTER_UP_EVENTS, noop, SCROLL_LISTENER_OPTIONS);
1925    bind(track, POINTER_DOWN_EVENTS, onPointerDown, SCROLL_LISTENER_OPTIONS);
1926    bind(track, "click", onClick, {
1927      capture: true
1928    });
1929    bind(track, "dragstart", prevent);
1930    on([EVENT_MOUNTED, EVENT_UPDATED], init);
1931  }
1932  function init() {
1933    var drag = options.drag;
1934    disable(!drag);
1935    isFree = drag === "free";
1936  }
1937  function onPointerDown(e) {
1938    clickPrevented = false;
1939    if (!disabled) {
1940      var isTouch = isTouchEvent(e);
1941      if (isDraggable(e.target) && (isTouch || !e.button)) {
1942        if (!Controller.isBusy()) {
1943          target = isTouch ? track : window;
1944          dragging = state.is([MOVING, SCROLLING]);
1945          prevBaseEvent = null;
1946          bind(target, POINTER_MOVE_EVENTS, onPointerMove, SCROLL_LISTENER_OPTIONS);
1947          bind(target, POINTER_UP_EVENTS, onPointerUp, SCROLL_LISTENER_OPTIONS);
1948          Move.cancel();
1949          Scroll.cancel();
1950          save(e);
1951        } else {
1952          prevent(e, true);
1953        }
1954      }
1955    }
1956  }
1957  function onPointerMove(e) {
1958    if (!state.is(DRAGGING)) {
1959      state.set(DRAGGING);
1960      emit(EVENT_DRAG);
1961    }
1962    if (e.cancelable) {
1963      if (dragging) {
1964        Move.translate(basePosition + constrain(diffCoord(e)));
1965        var expired = diffTime(e) > LOG_INTERVAL;
1966        var hasExceeded = exceeded !== (exceeded = exceededLimit());
1967        if (expired || hasExceeded) {
1968          save(e);
1969        }
1970        clickPrevented = true;
1971        emit(EVENT_DRAGGING);
1972        prevent(e);
1973      } else if (isSliderDirection(e)) {
1974        dragging = shouldStart(e);
1975        prevent(e);
1976      }
1977    }
1978  }
1979  function onPointerUp(e) {
1980    if (state.is(DRAGGING)) {
1981      state.set(IDLE);
1982      emit(EVENT_DRAGGED);
1983    }
1984    if (dragging) {
1985      move(e);
1986      prevent(e);
1987    }
1988    unbind(target, POINTER_MOVE_EVENTS, onPointerMove);
1989    unbind(target, POINTER_UP_EVENTS, onPointerUp);
1990    dragging = false;
1991  }
1992  function onClick(e) {
1993    if (!disabled && clickPrevented) {
1994      prevent(e, true);
1995    }
1996  }
1997  function save(e) {
1998    prevBaseEvent = baseEvent;
1999    baseEvent = e;
2000    basePosition = getPosition();
2001  }
2002  function move(e) {
2003    var velocity = computeVelocity(e);
2004    var destination = computeDestination(velocity);
2005    var rewind = options.rewind && options.rewindByDrag;
2006    reduce(false);
2007    if (isFree) {
2008      Controller.scroll(destination, 0, options.snap);
2009    } else if (Splide2.is(FADE)) {
2010      Controller.go(orient(sign(velocity)) < 0 ? rewind ? "<" : "-" : rewind ? ">" : "+");
2011    } else if (Splide2.is(SLIDE) && exceeded && rewind) {
2012      Controller.go(exceededLimit(true) ? ">" : "<");
2013    } else {
2014      Controller.go(Controller.toDest(destination), true);
2015    }
2016    reduce(true);
2017  }
2018  function shouldStart(e) {
2019    var thresholds = options.dragMinThreshold;
2020    var isObj = isObject(thresholds);
2021    var mouse = isObj && thresholds.mouse || 0;
2022    var touch = (isObj ? thresholds.touch : +thresholds) || 10;
2023    return abs(diffCoord(e)) > (isTouchEvent(e) ? touch : mouse);
2024  }
2025  function isSliderDirection(e) {
2026    return abs(diffCoord(e)) > abs(diffCoord(e, true));
2027  }
2028  function computeVelocity(e) {
2029    if (Splide2.is(LOOP) || !exceeded) {
2030      var time = diffTime(e);
2031      if (time && time < LOG_INTERVAL) {
2032        return diffCoord(e) / time;
2033      }
2034    }
2035    return 0;
2036  }
2037  function computeDestination(velocity) {
2038    return getPosition() + sign(velocity) * min(abs(velocity) * (options.flickPower || 600), isFree ? Infinity : Components2.Layout.listSize() * (options.flickMaxPages || 1));
2039  }
2040  function diffCoord(e, orthogonal) {
2041    return coordOf(e, orthogonal) - coordOf(getBaseEvent(e), orthogonal);
2042  }
2043  function diffTime(e) {
2044    return timeOf(e) - timeOf(getBaseEvent(e));
2045  }
2046  function getBaseEvent(e) {
2047    return baseEvent === e && prevBaseEvent || baseEvent;
2048  }
2049  function coordOf(e, orthogonal) {
2050    return (isTouchEvent(e) ? e.changedTouches[0] : e)["page" + resolve(orthogonal ? "Y" : "X")];
2051  }
2052  function constrain(diff) {
2053    return diff / (exceeded && Splide2.is(SLIDE) ? FRICTION : 1);
2054  }
2055  function isDraggable(target2) {
2056    var noDrag = options.noDrag;
2057    return !matches(target2, "." + CLASS_PAGINATION_PAGE + ", ." + CLASS_ARROW) && (!noDrag || !matches(target2, noDrag));
2058  }
2059  function isTouchEvent(e) {
2060    return typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
2061  }
2062  function isDragging() {
2063    return dragging;
2064  }
2065  function disable(value) {
2066    disabled = value;
2067  }
2068  return {
2069    mount: mount,
2070    disable: disable,
2071    isDragging: isDragging
2072  };
2073}
2074var NORMALIZATION_MAP = {
2075  Spacebar: " ",
2076  Right: ARROW_RIGHT,
2077  Left: ARROW_LEFT,
2078  Up: ARROW_UP,
2079  Down: ARROW_DOWN
2080};
2081function normalizeKey(key) {
2082  key = isString(key) ? key : key.key;
2083  return NORMALIZATION_MAP[key] || key;
2084}
2085var KEYBOARD_EVENT = "keydown";
2086function Keyboard(Splide2, Components2, options) {
2087  var _EventInterface10 = EventInterface(Splide2),
2088    on = _EventInterface10.on,
2089    bind = _EventInterface10.bind,
2090    unbind = _EventInterface10.unbind;
2091  var root = Splide2.root;
2092  var resolve = Components2.Direction.resolve;
2093  var target;
2094  var disabled;
2095  function mount() {
2096    init();
2097    on(EVENT_UPDATED, destroy);
2098    on(EVENT_UPDATED, init);
2099    on(EVENT_MOVE, onMove);
2100  }
2101  function init() {
2102    var keyboard = options.keyboard;
2103    if (keyboard) {
2104      target = keyboard === "global" ? window : root;
2105      bind(target, KEYBOARD_EVENT, onKeydown);
2106    }
2107  }
2108  function destroy() {
2109    unbind(target, KEYBOARD_EVENT);
2110  }
2111  function disable(value) {
2112    disabled = value;
2113  }
2114  function onMove() {
2115    var _disabled = disabled;
2116    disabled = true;
2117    nextTick(function () {
2118      disabled = _disabled;
2119    });
2120  }
2121  function onKeydown(e) {
2122    if (!disabled) {
2123      var key = normalizeKey(e);
2124      if (key === resolve(ARROW_LEFT)) {
2125        Splide2.go("<");
2126      } else if (key === resolve(ARROW_RIGHT)) {
2127        Splide2.go(">");
2128      }
2129    }
2130  }
2131  return {
2132    mount: mount,
2133    destroy: destroy,
2134    disable: disable
2135  };
2136}
2137var SRC_DATA_ATTRIBUTE = DATA_ATTRIBUTE + "-lazy";
2138var SRCSET_DATA_ATTRIBUTE = SRC_DATA_ATTRIBUTE + "-srcset";
2139var IMAGE_SELECTOR = "[" + SRC_DATA_ATTRIBUTE + "], [" + SRCSET_DATA_ATTRIBUTE + "]";
2140function LazyLoad(Splide2, Components2, options) {
2141  var _EventInterface11 = EventInterface(Splide2),
2142    on = _EventInterface11.on,
2143    off = _EventInterface11.off,
2144    bind = _EventInterface11.bind,
2145    emit = _EventInterface11.emit;
2146  var isSequential = options.lazyLoad === "sequential";
2147  var events = [EVENT_MOVED, EVENT_SCROLLED];
2148  var entries = [];
2149  function mount() {
2150    if (options.lazyLoad) {
2151      init();
2152      on(EVENT_REFRESH, init);
2153    }
2154  }
2155  function init() {
2156    empty(entries);
2157    register();
2158    if (isSequential) {
2159      loadNext();
2160    } else {
2161      off(events);
2162      on(events, check);
2163      check();
2164    }
2165  }
2166  function register() {
2167    Components2.Slides.forEach(function (Slide) {
2168      queryAll(Slide.slide, IMAGE_SELECTOR).forEach(function (img) {
2169        var src = getAttribute(img, SRC_DATA_ATTRIBUTE);
2170        var srcset = getAttribute(img, SRCSET_DATA_ATTRIBUTE);
2171        if (src !== img.src || srcset !== img.srcset) {
2172          var className = options.classes.spinner;
2173          var parent = img.parentElement;
2174          var spinner = child(parent, "." + className) || create("span", className, parent);
2175          entries.push([img, Slide, spinner]);
2176          img.src || display(img, "none");
2177        }
2178      });
2179    });
2180  }
2181  function check() {
2182    entries = entries.filter(function (data) {
2183      var distance = options.perPage * ((options.preloadPages || 1) + 1) - 1;
2184      return data[1].isWithin(Splide2.index, distance) ? load(data) : true;
2185    });
2186    entries.length || off(events);
2187  }
2188  function load(data) {
2189    var img = data[0];
2190    addClass(data[1].slide, CLASS_LOADING);
2191    bind(img, "load error", apply(onLoad, data));
2192    setAttribute(img, "src", getAttribute(img, SRC_DATA_ATTRIBUTE));
2193    setAttribute(img, "srcset", getAttribute(img, SRCSET_DATA_ATTRIBUTE));
2194    removeAttribute(img, SRC_DATA_ATTRIBUTE);
2195    removeAttribute(img, SRCSET_DATA_ATTRIBUTE);
2196  }
2197  function onLoad(data, e) {
2198    var img = data[0],
2199      Slide = data[1];
2200    removeClass(Slide.slide, CLASS_LOADING);
2201    if (e.type !== "error") {
2202      remove(data[2]);
2203      display(img, "");
2204      emit(EVENT_LAZYLOAD_LOADED, img, Slide);
2205      emit(EVENT_RESIZE);
2206    }
2207    isSequential && loadNext();
2208  }
2209  function loadNext() {
2210    entries.length && load(entries.shift());
2211  }
2212  return {
2213    mount: mount,
2214    destroy: apply(empty, entries),
2215    check: check
2216  };
2217}
2218function Pagination(Splide2, Components2, options) {
2219  var event = EventInterface(Splide2);
2220  var on = event.on,
2221    emit = event.emit,
2222    bind = event.bind;
2223  var Slides = Components2.Slides,
2224    Elements = Components2.Elements,
2225    Controller = Components2.Controller;
2226  var hasFocus = Controller.hasFocus,
2227    getIndex = Controller.getIndex,
2228    go = Controller.go;
2229  var resolve = Components2.Direction.resolve;
2230  var placeholder = Elements.pagination;
2231  var items = [];
2232  var list;
2233  var paginationClasses;
2234  function mount() {
2235    destroy();
2236    on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], mount);
2237    var enabled = options.pagination;
2238    placeholder && display(placeholder, enabled ? "" : "none");
2239    if (enabled) {
2240      on([EVENT_MOVE, EVENT_SCROLL, EVENT_SCROLLED], update);
2241      createPagination();
2242      update();
2243      emit(EVENT_PAGINATION_MOUNTED, {
2244        list: list,
2245        items: items
2246      }, getAt(Splide2.index));
2247    }
2248  }
2249  function destroy() {
2250    if (list) {
2251      remove(placeholder ? slice(list.children) : list);
2252      removeClass(list, paginationClasses);
2253      empty(items);
2254      list = null;
2255    }
2256    event.destroy();
2257  }
2258  function createPagination() {
2259    var length = Splide2.length;
2260    var classes = options.classes,
2261      i18n = options.i18n,
2262      perPage = options.perPage;
2263    var max = hasFocus() ? Controller.getEnd() + 1 : ceil(length / perPage);
2264    list = placeholder || create("ul", classes.pagination, Elements.track.parentElement);
2265    addClass(list, paginationClasses = CLASS_PAGINATION + "--" + getDirection());
2266    setAttribute(list, ROLE, "tablist");
2267    setAttribute(list, ARIA_LABEL, i18n.select);
2268    setAttribute(list, ARIA_ORIENTATION, getDirection() === TTB ? "vertical" : "");
2269    for (var i = 0; i < max; i++) {
2270      var li = create("li", null, list);
2271      var button = create("button", {
2272        class: classes.page,
2273        type: "button"
2274      }, li);
2275      var controls = Slides.getIn(i).map(function (Slide) {
2276        return Slide.slide.id;
2277      });
2278      var text = !hasFocus() && perPage > 1 ? i18n.pageX : i18n.slideX;
2279      bind(button, "click", apply(onClick, i));
2280      if (options.paginationKeyboard) {
2281        bind(button, "keydown", apply(onKeydown, i));
2282      }
2283      setAttribute(li, ROLE, "presentation");
2284      setAttribute(button, ROLE, "tab");
2285      setAttribute(button, ARIA_CONTROLS, controls.join(" "));
2286      setAttribute(button, ARIA_LABEL, format(text, i + 1));
2287      setAttribute(button, TAB_INDEX, -1);
2288      items.push({
2289        li: li,
2290        button: button,
2291        page: i
2292      });
2293    }
2294  }
2295  function onClick(page) {
2296    go(">" + page, true);
2297  }
2298  function onKeydown(page, e) {
2299    var length = items.length;
2300    var key = normalizeKey(e);
2301    var dir = getDirection();
2302    var nextPage = -1;
2303    if (key === resolve(ARROW_RIGHT, false, dir)) {
2304      nextPage = ++page % length;
2305    } else if (key === resolve(ARROW_LEFT, false, dir)) {
2306      nextPage = (--page + length) % length;
2307    } else if (key === "Home") {
2308      nextPage = 0;
2309    } else if (key === "End") {
2310      nextPage = length - 1;
2311    }
2312    var item = items[nextPage];
2313    if (item) {
2314      focus(item.button);
2315      go(">" + nextPage);
2316      prevent(e, true);
2317    }
2318  }
2319  function getDirection() {
2320    return options.paginationDirection || options.direction;
2321  }
2322  function getAt(index) {
2323    return items[Controller.toPage(index)];
2324  }
2325  function update() {
2326    var prev = getAt(getIndex(true));
2327    var curr = getAt(getIndex());
2328    if (prev) {
2329      var button = prev.button;
2330      removeClass(button, CLASS_ACTIVE);
2331      removeAttribute(button, ARIA_SELECTED);
2332      setAttribute(button, TAB_INDEX, -1);
2333    }
2334    if (curr) {
2335      var _button = curr.button;
2336      addClass(_button, CLASS_ACTIVE);
2337      setAttribute(_button, ARIA_SELECTED, true);
2338      setAttribute(_button, TAB_INDEX, "");
2339    }
2340    emit(EVENT_PAGINATION_UPDATED, {
2341      list: list,
2342      items: items
2343    }, prev, curr);
2344  }
2345  return {
2346    items: items,
2347    mount: mount,
2348    destroy: destroy,
2349    getAt: getAt,
2350    update: update
2351  };
2352}
2353var TRIGGER_KEYS = [" ", "Enter"];
2354function Sync(Splide2, Components2, options) {
2355  var isNavigation = options.isNavigation,
2356    slideFocus = options.slideFocus;
2357  var events = [];
2358  function mount() {
2359    Splide2.splides.forEach(function (target) {
2360      if (!target.isParent) {
2361        sync(Splide2, target.splide);
2362        sync(target.splide, Splide2);
2363      }
2364    });
2365    if (isNavigation) {
2366      navigate();
2367    }
2368  }
2369  function destroy() {
2370    events.forEach(function (event) {
2371      event.destroy();
2372    });
2373    empty(events);
2374  }
2375  function remount() {
2376    destroy();
2377    mount();
2378  }
2379  function sync(splide, target) {
2380    var event = EventInterface(splide);
2381    event.on(EVENT_MOVE, function (index, prev, dest) {
2382      target.go(target.is(LOOP) ? dest : index);
2383    });
2384    events.push(event);
2385  }
2386  function navigate() {
2387    var event = EventInterface(Splide2);
2388    var on = event.on;
2389    on(EVENT_CLICK, onClick);
2390    on(EVENT_SLIDE_KEYDOWN, onKeydown);
2391    on([EVENT_MOUNTED, EVENT_UPDATED], update);
2392    events.push(event);
2393    event.emit(EVENT_NAVIGATION_MOUNTED, Splide2.splides);
2394  }
2395  function update() {
2396    setAttribute(Components2.Elements.list, ARIA_ORIENTATION, options.direction === TTB ? "vertical" : "");
2397  }
2398  function onClick(Slide) {
2399    Splide2.go(Slide.index);
2400  }
2401  function onKeydown(Slide, e) {
2402    if (includes(TRIGGER_KEYS, normalizeKey(e))) {
2403      onClick(Slide);
2404      prevent(e);
2405    }
2406  }
2407  return {
2408    setup: apply(Components2.Media.set, {
2409      slideFocus: isUndefined(slideFocus) ? isNavigation : slideFocus
2410    }, true),
2411    mount: mount,
2412    destroy: destroy,
2413    remount: remount
2414  };
2415}
2416function Wheel(Splide2, Components2, options) {
2417  var _EventInterface12 = EventInterface(Splide2),
2418    bind = _EventInterface12.bind;
2419  var lastTime = 0;
2420  function mount() {
2421    if (options.wheel) {
2422      bind(Components2.Elements.track, "wheel", onWheel, SCROLL_LISTENER_OPTIONS);
2423    }
2424  }
2425  function onWheel(e) {
2426    if (e.cancelable) {
2427      var deltaY = e.deltaY;
2428      var backwards = deltaY < 0;
2429      var timeStamp = timeOf(e);
2430      var _min = options.wheelMinThreshold || 0;
2431      var sleep = options.wheelSleep || 0;
2432      if (abs(deltaY) > _min && timeStamp - lastTime > sleep) {
2433        Splide2.go(backwards ? "<" : ">");
2434        lastTime = timeStamp;
2435      }
2436      shouldPrevent(backwards) && prevent(e);
2437    }
2438  }
2439  function shouldPrevent(backwards) {
2440    return !options.releaseWheel || Splide2.state.is(MOVING) || Components2.Controller.getAdjacent(backwards) !== -1;
2441  }
2442  return {
2443    mount: mount
2444  };
2445}
2446var SR_REMOVAL_DELAY = 90;
2447function Live(Splide2, Components2, options) {
2448  var _EventInterface13 = EventInterface(Splide2),
2449    on = _EventInterface13.on;
2450  var track = Components2.Elements.track;
2451  var enabled = options.live && !options.isNavigation;
2452  var sr = create("span", CLASS_SR);
2453  var interval = RequestInterval(SR_REMOVAL_DELAY, apply(toggle, false));
2454  function mount() {
2455    if (enabled) {
2456      disable(!Components2.Autoplay.isPaused());
2457      setAttribute(track, ARIA_ATOMIC, true);
2458      sr.textContent = "\u2026";
2459      on(EVENT_AUTOPLAY_PLAY, apply(disable, true));
2460      on(EVENT_AUTOPLAY_PAUSE, apply(disable, false));
2461      on([EVENT_MOVED, EVENT_SCROLLED], apply(toggle, true));
2462    }
2463  }
2464  function toggle(active) {
2465    setAttribute(track, ARIA_BUSY, active);
2466    if (active) {
2467      append(track, sr);
2468      interval.start();
2469    } else {
2470      remove(sr);
2471      interval.cancel();
2472    }
2473  }
2474  function destroy() {
2475    removeAttribute(track, [ARIA_LIVE, ARIA_ATOMIC, ARIA_BUSY]);
2476    remove(sr);
2477  }
2478  function disable(disabled) {
2479    if (enabled) {
2480      setAttribute(track, ARIA_LIVE, disabled ? "off" : "polite");
2481    }
2482  }
2483  return {
2484    mount: mount,
2485    disable: disable,
2486    destroy: destroy
2487  };
2488}
2489var ComponentConstructors = /*#__PURE__*/Object.freeze({
2490  __proto__: null,
2491  Media: Media,
2492  Direction: Direction,
2493  Elements: Elements,
2494  Slides: Slides,
2495  Layout: Layout,
2496  Clones: Clones,
2497  Move: Move,
2498  Controller: Controller,
2499  Arrows: Arrows,
2500  Autoplay: Autoplay,
2501  Cover: Cover,
2502  Scroll: Scroll,
2503  Drag: Drag,
2504  Keyboard: Keyboard,
2505  LazyLoad: LazyLoad,
2506  Pagination: Pagination,
2507  Sync: Sync,
2508  Wheel: Wheel,
2509  Live: Live
2510});
2511var I18N = {
2512  prev: "Previous slide",
2513  next: "Next slide",
2514  first: "Go to first slide",
2515  last: "Go to last slide",
2516  slideX: "Go to slide %s",
2517  pageX: "Go to page %s",
2518  play: "Start autoplay",
2519  pause: "Pause autoplay",
2520  carousel: "carousel",
2521  slide: "slide",
2522  select: "Select a slide to show",
2523  slideLabel: "%s of %s"
2524};
2525var DEFAULTS = {
2526  type: "slide",
2527  role: "region",
2528  speed: 400,
2529  perPage: 1,
2530  cloneStatus: true,
2531  arrows: true,
2532  pagination: true,
2533  paginationKeyboard: true,
2534  interval: 5e3,
2535  pauseOnHover: true,
2536  pauseOnFocus: true,
2537  resetProgress: true,
2538  easing: "cubic-bezier(0.25, 1, 0.5, 1)",
2539  drag: true,
2540  direction: "ltr",
2541  trimSpace: true,
2542  focusableNodes: "a, button, textarea, input, select, iframe",
2543  live: true,
2544  classes: CLASSES,
2545  i18n: I18N,
2546  reducedMotion: {
2547    speed: 0,
2548    rewindSpeed: 0,
2549    autoplay: "pause"
2550  }
2551};
2552function Fade(Splide2, Components2, options) {
2553  var Slides = Components2.Slides;
2554  function mount() {
2555    EventInterface(Splide2).on([EVENT_MOUNTED, EVENT_REFRESH], init);
2556  }
2557  function init() {
2558    Slides.forEach(function (Slide) {
2559      Slide.style("transform", "translateX(-" + 100 * Slide.index + "%)");
2560    });
2561  }
2562  function start(index, done) {
2563    Slides.style("transition", "opacity " + options.speed + "ms " + options.easing);
2564    nextTick(done);
2565  }
2566  return {
2567    mount: mount,
2568    start: start,
2569    cancel: noop
2570  };
2571}
2572function Slide(Splide2, Components2, options) {
2573  var Move = Components2.Move,
2574    Controller = Components2.Controller,
2575    Scroll = Components2.Scroll;
2576  var list = Components2.Elements.list;
2577  var transition = apply(style, list, "transition");
2578  var endCallback;
2579  function mount() {
2580    EventInterface(Splide2).bind(list, "transitionend", function (e) {
2581      if (e.target === list && endCallback) {
2582        cancel();
2583        endCallback();
2584      }
2585    });
2586  }
2587  function start(index, done) {
2588    var destination = Move.toPosition(index, true);
2589    var position = Move.getPosition();
2590    var speed = getSpeed(index);
2591    if (abs(destination - position) >= 1 && speed >= 1) {
2592      if (options.useScroll) {
2593        Scroll.scroll(destination, speed, false, done);
2594      } else {
2595        transition("transform " + speed + "ms " + options.easing);
2596        Move.translate(destination, true);
2597        endCallback = done;
2598      }
2599    } else {
2600      Move.jump(index);
2601      done();
2602    }
2603  }
2604  function cancel() {
2605    transition("");
2606    Scroll.cancel();
2607  }
2608  function getSpeed(index) {
2609    var rewindSpeed = options.rewindSpeed;
2610    if (Splide2.is(SLIDE) && rewindSpeed) {
2611      var prev = Controller.getIndex(true);
2612      var end = Controller.getEnd();
2613      if (prev === 0 && index >= end || prev >= end && index === 0) {
2614        return rewindSpeed;
2615      }
2616    }
2617    return options.speed;
2618  }
2619  return {
2620    mount: mount,
2621    start: start,
2622    cancel: cancel
2623  };
2624}
2625var _Splide = /*#__PURE__*/function () {
2626  function _Splide(target, options) {
2627    this.event = EventInterface();
2628    this.Components = {};
2629    this.state = State(CREATED);
2630    this.splides = [];
2631    this._o = {};
2632    this._E = {};
2633    var root = isString(target) ? query(document, target) : target;
2634    assert(root, root + " is invalid.");
2635    this.root = root;
2636    options = merge({
2637      label: getAttribute(root, ARIA_LABEL) || "",
2638      labelledby: getAttribute(root, ARIA_LABELLEDBY) || ""
2639    }, DEFAULTS, _Splide.defaults, options || {});
2640    try {
2641      merge(options, JSON.parse(getAttribute(root, DATA_ATTRIBUTE)));
2642    } catch (e) {
2643      assert(false, "Invalid JSON");
2644    }
2645    this._o = Object.create(merge({}, options));
2646  }
2647  var _proto = _Splide.prototype;
2648  _proto.mount = function mount(Extensions, Transition) {
2649    var _this = this;
2650    var state = this.state,
2651      Components2 = this.Components;
2652    assert(state.is([CREATED, DESTROYED]), "Already mounted!");
2653    state.set(CREATED);
2654    this._C = Components2;
2655    this._T = Transition || this._T || (this.is(FADE) ? Fade : Slide);
2656    this._E = Extensions || this._E;
2657    var Constructors = assign({}, ComponentConstructors, this._E, {
2658      Transition: this._T
2659    });
2660    forOwn(Constructors, function (Component, key) {
2661      var component = Component(_this, Components2, _this._o);
2662      Components2[key] = component;
2663      component.setup && component.setup();
2664    });
2665    forOwn(Components2, function (component) {
2666      component.mount && component.mount();
2667    });
2668    this.emit(EVENT_MOUNTED);
2669    addClass(this.root, CLASS_INITIALIZED);
2670    state.set(IDLE);
2671    this.emit(EVENT_READY);
2672    return this;
2673  };
2674  _proto.sync = function sync(splide) {
2675    this.splides.push({
2676      splide: splide
2677    });
2678    splide.splides.push({
2679      splide: this,
2680      isParent: true
2681    });
2682    if (this.state.is(IDLE)) {
2683      this._C.Sync.remount();
2684      splide.Components.Sync.remount();
2685    }
2686    return this;
2687  };
2688  _proto.go = function go(control) {
2689    this._C.Controller.go(control);
2690    return this;
2691  };
2692  _proto.on = function on(events, callback) {
2693    this.event.on(events, callback);
2694    return this;
2695  };
2696  _proto.off = function off(events) {
2697    this.event.off(events);
2698    return this;
2699  };
2700  _proto.emit = function emit(event) {
2701    var _this$event;
2702    (_this$event = this.event).emit.apply(_this$event, [event].concat(slice(arguments, 1)));
2703    return this;
2704  };
2705  _proto.add = function add(slides, index) {
2706    this._C.Slides.add(slides, index);
2707    return this;
2708  };
2709  _proto.remove = function remove(matcher) {
2710    this._C.Slides.remove(matcher);
2711    return this;
2712  };
2713  _proto.is = function is(type) {
2714    return this._o.type === type;
2715  };
2716  _proto.refresh = function refresh() {
2717    this.emit(EVENT_REFRESH);
2718    return this;
2719  };
2720  _proto.destroy = function destroy(completely) {
2721    if (completely === void 0) {
2722      completely = true;
2723    }
2724    var event = this.event,
2725      state = this.state;
2726    if (state.is(CREATED)) {
2727      EventInterface(this).on(EVENT_READY, this.destroy.bind(this, completely));
2728    } else {
2729      forOwn(this._C, function (component) {
2730        component.destroy && component.destroy(completely);
2731      }, true);
2732      event.emit(EVENT_DESTROY);
2733      event.destroy();
2734      completely && empty(this.splides);
2735      state.set(DESTROYED);
2736    }
2737    return this;
2738  };
2739  _createClass(_Splide, [{
2740    key: "options",
2741    get: function get() {
2742      return this._o;
2743    },
2744    set: function set(options) {
2745      this._C.Media.set(options, true, true);
2746    }
2747  }, {
2748    key: "length",
2749    get: function get() {
2750      return this._C.Slides.getLength(true);
2751    }
2752  }, {
2753    key: "index",
2754    get: function get() {
2755      return this._C.Controller.getIndex();
2756    }
2757  }]);
2758  return _Splide;
2759}();
2760var Splide = _Splide;
2761Splide.defaults = {};
2762Splide.STATES = STATES;
2763var CLASS_RENDERED = "is-rendered";
2764var RENDERER_DEFAULT_CONFIG = {
2765  listTag: "ul",
2766  slideTag: "li"
2767};
2768var Style = /*#__PURE__*/function () {
2769  function Style(id, options) {
2770    this.styles = {};
2771    this.id = id;
2772    this.options = options;
2773  }
2774  var _proto2 = Style.prototype;
2775  _proto2.rule = function rule(selector, prop, value, breakpoint) {
2776    breakpoint = breakpoint || "default";
2777    var selectors = this.styles[breakpoint] = this.styles[breakpoint] || {};
2778    var styles = selectors[selector] = selectors[selector] || {};
2779    styles[prop] = value;
2780  };
2781  _proto2.build = function build() {
2782    var _this2 = this;
2783    var css = "";
2784    if (this.styles.default) {
2785      css += this.buildSelectors(this.styles.default);
2786    }
2787    Object.keys(this.styles).sort(function (n, m) {
2788      return _this2.options.mediaQuery === "min" ? +n - +m : +m - +n;
2789    }).forEach(function (breakpoint) {
2790      if (breakpoint !== "default") {
2791        css += "@media screen and (max-width: " + breakpoint + "px) {";
2792        css += _this2.buildSelectors(_this2.styles[breakpoint]);
2793        css += "}";
2794      }
2795    });
2796    return css;
2797  };
2798  _proto2.buildSelectors = function buildSelectors(selectors) {
2799    var _this3 = this;
2800    var css = "";
2801    forOwn(selectors, function (styles, selector) {
2802      selector = ("#" + _this3.id + " " + selector).trim();
2803      css += selector + " {";
2804      forOwn(styles, function (value, prop) {
2805        if (value || value === 0) {
2806          css += prop + ": " + value + ";";
2807        }
2808      });
2809      css += "}";
2810    });
2811    return css;
2812  };
2813  return Style;
2814}();
2815var SplideRenderer = /*#__PURE__*/function () {
2816  function SplideRenderer(contents, options, config, defaults) {
2817    this.slides = [];
2818    this.options = {};
2819    this.breakpoints = [];
2820    merge(DEFAULTS, defaults || {});
2821    merge(merge(this.options, DEFAULTS), options || {});
2822    this.contents = contents;
2823    this.config = assign({}, RENDERER_DEFAULT_CONFIG, config || {});
2824    this.id = this.config.id || uniqueId("splide");
2825    this.Style = new Style(this.id, this.options);
2826    this.Direction = Direction(null, null, this.options);
2827    assert(this.contents.length, "Provide at least 1 content.");
2828    this.init();
2829  }
2830  SplideRenderer.clean = function clean(splide) {
2831    var _EventInterface14 = EventInterface(splide),
2832      on = _EventInterface14.on;
2833    var root = splide.root;
2834    var clones = queryAll(root, "." + CLASS_CLONE);
2835    on(EVENT_MOUNTED, function () {
2836      remove(child(root, "style"));
2837    });
2838    remove(clones);
2839  };
2840  var _proto3 = SplideRenderer.prototype;
2841  _proto3.init = function init() {
2842    this.parseBreakpoints();
2843    this.initSlides();
2844    this.registerRootStyles();
2845    this.registerTrackStyles();
2846    this.registerSlideStyles();
2847    this.registerListStyles();
2848  };
2849  _proto3.initSlides = function initSlides() {
2850    var _this4 = this;
2851    push(this.slides, this.contents.map(function (content, index) {
2852      content = isString(content) ? {
2853        html: content
2854      } : content;
2855      content.styles = content.styles || {};
2856      content.attrs = content.attrs || {};
2857      _this4.cover(content);
2858      var classes = _this4.options.classes.slide + " " + (index === 0 ? CLASS_ACTIVE : "");
2859      assign(content.attrs, {
2860        class: (classes + " " + (content.attrs.class || "")).trim(),
2861        style: _this4.buildStyles(content.styles)
2862      });
2863      return content;
2864    }));
2865    if (this.isLoop()) {
2866      this.generateClones(this.slides);
2867    }
2868  };
2869  _proto3.registerRootStyles = function registerRootStyles() {
2870    var _this5 = this;
2871    this.breakpoints.forEach(function (_ref2) {
2872      var width = _ref2[0],
2873        options = _ref2[1];
2874      _this5.Style.rule(" ", "max-width", unit(options.width), width);
2875    });
2876  };
2877  _proto3.registerTrackStyles = function registerTrackStyles() {
2878    var _this6 = this;
2879    var Style2 = this.Style;
2880    var selector = "." + CLASS_TRACK;
2881    this.breakpoints.forEach(function (_ref3) {
2882      var width = _ref3[0],
2883        options = _ref3[1];
2884      Style2.rule(selector, _this6.resolve("paddingLeft"), _this6.cssPadding(options, false), width);
2885      Style2.rule(selector, _this6.resolve("paddingRight"), _this6.cssPadding(options, true), width);
2886      Style2.rule(selector, "height", _this6.cssTrackHeight(options), width);
2887    });
2888  };
2889  _proto3.registerListStyles = function registerListStyles() {
2890    var _this7 = this;
2891    var Style2 = this.Style;
2892    var selector = "." + CLASS_LIST;
2893    this.breakpoints.forEach(function (_ref4) {
2894      var width = _ref4[0],
2895        options = _ref4[1];
2896      Style2.rule(selector, "transform", _this7.buildTranslate(options), width);
2897      if (!_this7.cssSlideHeight(options)) {
2898        Style2.rule(selector, "aspect-ratio", _this7.cssAspectRatio(options), width);
2899      }
2900    });
2901  };
2902  _proto3.registerSlideStyles = function registerSlideStyles() {
2903    var _this8 = this;
2904    var Style2 = this.Style;
2905    var selector = "." + CLASS_SLIDE;
2906    this.breakpoints.forEach(function (_ref5) {
2907      var width = _ref5[0],
2908        options = _ref5[1];
2909      Style2.rule(selector, "width", _this8.cssSlideWidth(options), width);
2910      Style2.rule(selector, "height", _this8.cssSlideHeight(options) || "100%", width);
2911      Style2.rule(selector, _this8.resolve("marginRight"), unit(options.gap) || "0px", width);
2912      Style2.rule(selector + " > img", "display", options.cover ? "none" : "inline", width);
2913    });
2914  };
2915  _proto3.buildTranslate = function buildTranslate(options) {
2916    var _this$Direction = this.Direction,
2917      resolve = _this$Direction.resolve,
2918      orient = _this$Direction.orient;
2919    var values = [];
2920    values.push(this.cssOffsetClones(options));
2921    values.push(this.cssOffsetGaps(options));
2922    if (this.isCenter(options)) {
2923      values.push(this.buildCssValue(orient(-50), "%"));
2924      values.push.apply(values, this.cssOffsetCenter(options));
2925    }
2926    return values.filter(Boolean).map(function (value) {
2927      return "translate" + resolve("X") + "(" + value + ")";
2928    }).join(" ");
2929  };
2930  _proto3.cssOffsetClones = function cssOffsetClones(options) {
2931    var _this$Direction2 = this.Direction,
2932      resolve = _this$Direction2.resolve,
2933      orient = _this$Direction2.orient;
2934    var cloneCount = this.getCloneCount();
2935    if (this.isFixedWidth(options)) {
2936      var _this$parseCssValue = this.parseCssValue(options[resolve("fixedWidth")]),
2937        value = _this$parseCssValue.value,
2938        unit2 = _this$parseCssValue.unit;
2939      return this.buildCssValue(orient(value) * cloneCount, unit2);
2940    }
2941    var percent = 100 * cloneCount / options.perPage;
2942    return orient(percent) + "%";
2943  };
2944  _proto3.cssOffsetCenter = function cssOffsetCenter(options) {
2945    var _this$Direction3 = this.Direction,
2946      resolve = _this$Direction3.resolve,
2947      orient = _this$Direction3.orient;
2948    if (this.isFixedWidth(options)) {
2949      var _this$parseCssValue2 = this.parseCssValue(options[resolve("fixedWidth")]),
2950        value = _this$parseCssValue2.value,
2951        unit2 = _this$parseCssValue2.unit;
2952      return [this.buildCssValue(orient(value / 2), unit2)];
2953    }
2954    var values = [];
2955    var perPage = options.perPage,
2956      gap = options.gap;
2957    values.push(orient(50 / perPage) + "%");
2958    if (gap) {
2959      var _this$parseCssValue3 = this.parseCssValue(gap),
2960        _value = _this$parseCssValue3.value,
2961        _unit = _this$parseCssValue3.unit;
2962      var gapOffset = (_value / perPage - _value) / 2;
2963      values.push(this.buildCssValue(orient(gapOffset), _unit));
2964    }
2965    return values;
2966  };
2967  _proto3.cssOffsetGaps = function cssOffsetGaps(options) {
2968    var cloneCount = this.getCloneCount();
2969    if (cloneCount && options.gap) {
2970      var orient = this.Direction.orient;
2971      var _this$parseCssValue4 = this.parseCssValue(options.gap),
2972        value = _this$parseCssValue4.value,
2973        unit2 = _this$parseCssValue4.unit;
2974      if (this.isFixedWidth(options)) {
2975        return this.buildCssValue(orient(value * cloneCount), unit2);
2976      }
2977      var perPage = options.perPage;
2978      var gaps = cloneCount / perPage;
2979      return this.buildCssValue(orient(gaps * value), unit2);
2980    }
2981    return "";
2982  };
2983  _proto3.resolve = function resolve(prop) {
2984    return camelToKebab(this.Direction.resolve(prop));
2985  };
2986  _proto3.cssPadding = function cssPadding(options, right) {
2987    var padding = options.padding;
2988    var prop = this.Direction.resolve(right ? "right" : "left", true);
2989    return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px";
2990  };
2991  _proto3.cssTrackHeight = function cssTrackHeight(options) {
2992    var height = "";
2993    if (this.isVertical()) {
2994      height = this.cssHeight(options);
2995      assert(height, '"height" is missing.');
2996      height = "calc(" + height + " - " + this.cssPadding(options, false) + " - " + this.cssPadding(options, true) + ")";
2997    }
2998    return height;
2999  };
3000  _proto3.cssHeight = function cssHeight(options) {
3001    return unit(options.height);
3002  };
3003  _proto3.cssSlideWidth = function cssSlideWidth(options) {
3004    return options.autoWidth ? "" : unit(options.fixedWidth) || (this.isVertical() ? "" : this.cssSlideSize(options));
3005  };
3006  _proto3.cssSlideHeight = function cssSlideHeight(options) {
3007    return unit(options.fixedHeight) || (this.isVertical() ? options.autoHeight ? "" : this.cssSlideSize(options) : this.cssHeight(options));
3008  };
3009  _proto3.cssSlideSize = function cssSlideSize(options) {
3010    var gap = unit(options.gap);
3011    return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")";
3012  };
3013  _proto3.cssAspectRatio = function cssAspectRatio(options) {
3014    var heightRatio = options.heightRatio;
3015    return heightRatio ? "" + 1 / heightRatio : "";
3016  };
3017  _proto3.buildCssValue = function buildCssValue(value, unit2) {
3018    return "" + value + unit2;
3019  };
3020  _proto3.parseCssValue = function parseCssValue(value) {
3021    if (isString(value)) {
3022      var number = parseFloat(value) || 0;
3023      var unit2 = value.replace(/\d*(\.\d*)?/, "") || "px";
3024      return {
3025        value: number,
3026        unit: unit2
3027      };
3028    }
3029    return {
3030      value: value,
3031      unit: "px"
3032    };
3033  };
3034  _proto3.parseBreakpoints = function parseBreakpoints() {
3035    var _this9 = this;
3036    var breakpoints = this.options.breakpoints;
3037    this.breakpoints.push(["default", this.options]);
3038    if (breakpoints) {
3039      forOwn(breakpoints, function (options, width) {
3040        _this9.breakpoints.push([width, merge(merge({}, _this9.options), options)]);
3041      });
3042    }
3043  };
3044  _proto3.isFixedWidth = function isFixedWidth(options) {
3045    return !!options[this.Direction.resolve("fixedWidth")];
3046  };
3047  _proto3.isLoop = function isLoop() {
3048    return this.options.type === LOOP;
3049  };
3050  _proto3.isCenter = function isCenter(options) {
3051    if (options.focus === "center") {
3052      if (this.isLoop()) {
3053        return true;
3054      }
3055      if (this.options.type === SLIDE) {
3056        return !this.options.trimSpace;
3057      }
3058    }
3059    return false;
3060  };
3061  _proto3.isVertical = function isVertical() {
3062    return this.options.direction === TTB;
3063  };
3064  _proto3.buildClasses = function buildClasses() {
3065    var options = this.options;
3066    return [CLASS_ROOT, CLASS_ROOT + "--" + options.type, CLASS_ROOT + "--" + options.direction, options.drag && CLASS_ROOT + "--draggable", options.isNavigation && CLASS_ROOT + "--nav", CLASS_ACTIVE, !this.config.hidden && CLASS_RENDERED].filter(Boolean).join(" ");
3067  };
3068  _proto3.buildAttrs = function buildAttrs(attrs) {
3069    var attr = "";
3070    forOwn(attrs, function (value, key) {
3071      attr += value ? " " + camelToKebab(key) + "=\"" + value + "\"" : "";
3072    });
3073    return attr.trim();
3074  };
3075  _proto3.buildStyles = function buildStyles(styles) {
3076    var style = "";
3077    forOwn(styles, function (value, key) {
3078      style += " " + camelToKebab(key) + ":" + value + ";";
3079    });
3080    return style.trim();
3081  };
3082  _proto3.renderSlides = function renderSlides() {
3083    var _this10 = this;
3084    var tag = this.config.slideTag;
3085    return this.slides.map(function (content) {
3086      return "<" + tag + " " + _this10.buildAttrs(content.attrs) + ">" + (content.html || "") + "</" + tag + ">";
3087    }).join("");
3088  };
3089  _proto3.cover = function cover(content) {
3090    var styles = content.styles,
3091      _content$html = content.html,
3092      html = _content$html === void 0 ? "" : _content$html;
3093    if (this.options.cover && !this.options.lazyLoad) {
3094      var src = html.match(/<img.*?src\s*=\s*(['"])(.+?)\1.*?>/);
3095      if (src && src[2]) {
3096        styles.background = "center/cover no-repeat url('" + src[2] + "')";
3097      }
3098    }
3099  };
3100  _proto3.generateClones = function generateClones(contents) {
3101    var classes = this.options.classes;
3102    var count = this.getCloneCount();
3103    var slides = contents.slice();
3104    while (slides.length < count) {
3105      push(slides, slides);
3106    }
3107    push(slides.slice(-count).reverse(), slides.slice(0, count)).forEach(function (content, index) {
3108      var attrs = assign({}, content.attrs, {
3109        class: content.attrs.class + " " + classes.clone
3110      });
3111      var clone = assign({}, content, {
3112        attrs: attrs
3113      });
3114      index < count ? contents.unshift(clone) : contents.push(clone);
3115    });
3116  };
3117  _proto3.getCloneCount = function getCloneCount() {
3118    if (this.isLoop()) {
3119      var options = this.options;
3120      if (options.clones) {
3121        return options.clones;
3122      }
3123      var perPage = max.apply(void 0, this.breakpoints.map(function (_ref6) {
3124        var options2 = _ref6[1];
3125        return options2.perPage;
3126      }));
3127      return perPage * ((options.flickMaxPages || 1) + 1);
3128    }
3129    return 0;
3130  };
3131  _proto3.renderArrows = function renderArrows() {
3132    var html = "";
3133    html += "<div class=\"" + this.options.classes.arrows + "\">";
3134    html += this.renderArrow(true);
3135    html += this.renderArrow(false);
3136    html += "</div>";
3137    return html;
3138  };
3139  _proto3.renderArrow = function renderArrow(prev) {
3140    var _this$options = this.options,
3141      classes = _this$options.classes,
3142      i18n = _this$options.i18n;
3143    var attrs = {
3144      class: classes.arrow + " " + (prev ? classes.prev : classes.next),
3145      type: "button",
3146      ariaLabel: prev ? i18n.prev : i18n.next
3147    };
3148    return "<button " + this.buildAttrs(attrs) + "><svg xmlns=\"" + XML_NAME_SPACE + "\" viewBox=\"0 0 " + SIZE + " " + SIZE + "\" width=\"" + SIZE + "\" height=\"" + SIZE + "\"><path d=\"" + (this.options.arrowPath || PATH) + "\" /></svg></button>";
3149  };
3150  _proto3.html = function html() {
3151    var _this$config = this.config,
3152      rootClass = _this$config.rootClass,
3153      listTag = _this$config.listTag,
3154      arrows = _this$config.arrows,
3155      beforeTrack = _this$config.beforeTrack,
3156      afterTrack = _this$config.afterTrack,
3157      slider = _this$config.slider,
3158      beforeSlider = _this$config.beforeSlider,
3159      afterSlider = _this$config.afterSlider;
3160    var html = "";
3161    html += "<div id=\"" + this.id + "\" class=\"" + this.buildClasses() + " " + (rootClass || "") + "\">";
3162    html += "<style>" + this.Style.build() + "</style>";
3163    if (slider) {
3164      html += beforeSlider || "";
3165      html += "<div class=\"splide__slider\">";
3166    }
3167    html += beforeTrack || "";
3168    if (arrows) {
3169      html += this.renderArrows();
3170    }
3171    html += "<div class=\"splide__track\">";
3172    html += "<" + listTag + " class=\"splide__list\">";
3173    html += this.renderSlides();
3174    html += "</" + listTag + ">";
3175    html += "</div>";
3176    html += afterTrack || "";
3177    if (slider) {
3178      html += "</div>";
3179      html += afterSlider || "";
3180    }
3181    html += "</div>";
3182    return html;
3183  };
3184  return SplideRenderer;
3185}();
3186
3187
3188/***/ }),
3189
vendor: 481,848 bytes, lines 3190-12677
3190/***/ "./node_modules/lodash/lodash.js":
3191/*!***************************************!*\
3192  !*** ./node_modules/lodash/lodash.js ***!
3193  \***************************************/
3194/***/ (function(module, exports, __webpack_require__) {
3195
3196/* module decorator */ module = __webpack_require__.nmd(module);
3197var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}/**
3198 * @license
3199 * Lodash <https://lodash.com/>
3200 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
3201 * Released under MIT license <https://lodash.com/license>
3202 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
3203 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3204 */;(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined;/** Used as the semantic version number. */var VERSION='4.17.21';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/** Used to match empty string literals in compiled template source. */var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;/**
3205   * Used to match `RegExp`
3206   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
3207   */var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);/** Used to match leading whitespace. */var reTrimStart=/^\s+/;/** Used to match a single whitespace character. */var reWhitespace=/\s/;/** Used to match wrap detail comments. */var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;/** Used to match words composed of alphanumeric characters. */var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;/**
3208   * Used to validate the `validate` option in `_.template` variable.
3209   *
3210   * Forbids characters which could potentially change the meaning of the function argument definition:
3211   * - "()," (modification of function parameters)
3212   * - "=" (default value)
3213   * - "[]{}" (destructuring of function parameters)
3214   * - "/" (beginning of a comment)
3215   * - whitespace
3216   */var reForbiddenIdentifierChars=/[()=,{}\[\]\/\s]/;/** Used to match backslashes in property paths. */var reEscapeChar=/\\(\\)?/g;/**
3217   * Used to match
3218   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
3219   */var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;/** Used to match `RegExp` flags from their coerced string values. */var reFlags=/\w*$/;/** Used to detect bad signed hexadecimal string values. */var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;/** Used to detect binary string values. */var reIsBinary=/^0b[01]+$/i;/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\[object .+?Constructor\]$/;/** Used to detect octal string values. */var reIsOctal=/^0o[0-7]+$/i;/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\d*)$/;/** Used to match Latin Unicode letters (excluding mathematical operators). */var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;/** Used to ensure capturing order of template delimiters. */var reNoMatch=/($^)/;/** Used to match unescaped characters in compiled string literals. */var reUnescapedString=/['\n\r\u2028\u2029\\]/g;/** Used to compose unicode character classes. */var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange='a-z\\xdf-\\xf6\\xf8-\\xff',rsMathOpRange='\\xac\\xb1\\xd7\\xf7',rsNonCharRange='\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange='A-Z\\xc0-\\xd6\\xd8-\\xde',rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange;/** Used to compose unicode capture groups. */var rsApos="['\u2019]",rsAstral='['+rsAstralRange+']',rsBreak='['+rsBreakRange+']',rsCombo='['+rsComboRange+']',rsDigits='\\d+',rsDingbat='['+rsDingbatRange+']',rsLower='['+rsLowerRange+']',rsMisc='[^'+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+']',rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier='(?:'+rsCombo+'|'+rsFitz+')',rsNonAstral='[^'+rsAstralRange+']',rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper='['+rsUpperRange+']',rsZWJ="\\u200d";/** Used to compose unicode regexes. */var rsMiscLower='(?:'+rsLower+'|'+rsMisc+')',rsMiscUpper='(?:'+rsUpper+'|'+rsMisc+')',rsOptContrLower='(?:'+rsApos+'(?:d|ll|m|re|s|t|ve))?',rsOptContrUpper='(?:'+rsApos+'(?:D|LL|M|RE|S|T|VE))?',reOptMod=rsModifier+'?',rsOptVar='['+rsVarRange+']?',rsOptJoin='(?:'+rsZWJ+'(?:'+[rsNonAstral,rsRegional,rsSurrPair].join('|')+')'+rsOptVar+reOptMod+')*',rsOrdLower='\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',rsOrdUpper='\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji='(?:'+[rsDingbat,rsRegional,rsSurrPair].join('|')+')'+rsSeq,rsSymbol='(?:'+[rsNonAstral+rsCombo+'?',rsCombo,rsRegional,rsSurrPair,rsAstral].join('|')+')';/** Used to match apostrophes. */var reApos=RegExp(rsApos,'g');/**
3220   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
3221   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
3222   */var reComboMark=RegExp(rsCombo,'g');/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */var reUnicode=RegExp(rsFitz+'(?='+rsFitz+')|'+rsSymbol+rsSeq,'g');/** Used to match complex or compound words. */var reUnicodeWord=RegExp([rsUpper+'?'+rsLower+'+'+rsOptContrLower+'(?='+[rsBreak,rsUpper,'$'].join('|')+')',rsMiscUpper+'+'+rsOptContrUpper+'(?='+[rsBreak,rsUpper+rsMiscLower,'$'].join('|')+')',rsUpper+'?'+rsMiscLower+'+'+rsOptContrLower,rsUpper+'+'+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join('|'),'g');/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */var reHasUnicode=RegExp('['+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+']');/** Used to detect strings that need a more robust regexp to match words. */var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;/** Used to assign default `context` object properties. */var contextProps=['Array','Buffer','DataView','Date','Error','Float32Array','Float64Array','Function','Int8Array','Int16Array','Int32Array','Map','Math','Object','Promise','RegExp','Set','String','Symbol','TypeError','Uint8Array','Uint8ClampedArray','Uint16Array','Uint32Array','WeakMap','_','clearTimeout','isFinite','parseInt','setTimeout'];/** Used to make template sourceURLs easier to identify. */var templateCounter=-1;/** Used to identify `toStringTag` values of typed arrays. */var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;/** Used to map Latin Unicode letters to basic Latin letters. */var deburredLetters={// Latin-1 Supplement block.
3223'\xc0':'A','\xc1':'A','\xc2':'A','\xc3':'A','\xc4':'A','\xc5':'A','\xe0':'a','\xe1':'a','\xe2':'a','\xe3':'a','\xe4':'a','\xe5':'a','\xc7':'C','\xe7':'c','\xd0':'D','\xf0':'d','\xc8':'E','\xc9':'E','\xca':'E','\xcb':'E','\xe8':'e','\xe9':'e','\xea':'e','\xeb':'e','\xcc':'I','\xcd':'I','\xce':'I','\xcf':'I','\xec':'i','\xed':'i','\xee':'i','\xef':'i','\xd1':'N','\xf1':'n','\xd2':'O','\xd3':'O','\xd4':'O','\xd5':'O','\xd6':'O','\xd8':'O','\xf2':'o','\xf3':'o','\xf4':'o','\xf5':'o','\xf6':'o','\xf8':'o','\xd9':'U','\xda':'U','\xdb':'U','\xdc':'U','\xf9':'u','\xfa':'u','\xfb':'u','\xfc':'u','\xdd':'Y','\xfd':'y','\xff':'y','\xc6':'Ae','\xe6':'ae','\xde':'Th','\xfe':'th','\xdf':'ss',// Latin Extended-A block.
3224"\u0100":'A',"\u0102":'A',"\u0104":'A',"\u0101":'a',"\u0103":'a',"\u0105":'a',"\u0106":'C',"\u0108":'C',"\u010A":'C',"\u010C":'C',"\u0107":'c',"\u0109":'c',"\u010B":'c',"\u010D":'c',"\u010E":'D',"\u0110":'D',"\u010F":'d',"\u0111":'d',"\u0112":'E',"\u0114":'E',"\u0116":'E',"\u0118":'E',"\u011A":'E',"\u0113":'e',"\u0115":'e',"\u0117":'e',"\u0119":'e',"\u011B":'e',"\u011C":'G',"\u011E":'G',"\u0120":'G',"\u0122":'G',"\u011D":'g',"\u011F":'g',"\u0121":'g',"\u0123":'g',"\u0124":'H',"\u0126":'H',"\u0125":'h',"\u0127":'h',"\u0128":'I',"\u012A":'I',"\u012C":'I',"\u012E":'I',"\u0130":'I',"\u0129":'i',"\u012B":'i',"\u012D":'i',"\u012F":'i',"\u0131":'i',"\u0134":'J',"\u0135":'j',"\u0136":'K',"\u0137":'k',"\u0138":'k',"\u0139":'L',"\u013B":'L',"\u013D":'L',"\u013F":'L',"\u0141":'L',"\u013A":'l',"\u013C":'l',"\u013E":'l',"\u0140":'l',"\u0142":'l',"\u0143":'N',"\u0145":'N',"\u0147":'N',"\u014A":'N',"\u0144":'n',"\u0146":'n',"\u0148":'n',"\u014B":'n',"\u014C":'O',"\u014E":'O',"\u0150":'O',"\u014D":'o',"\u014F":'o',"\u0151":'o',"\u0154":'R',"\u0156":'R',"\u0158":'R',"\u0155":'r',"\u0157":'r',"\u0159":'r',"\u015A":'S',"\u015C":'S',"\u015E":'S',"\u0160":'S',"\u015B":'s',"\u015D":'s',"\u015F":'s',"\u0161":'s',"\u0162":'T',"\u0164":'T',"\u0166":'T',"\u0163":'t',"\u0165":'t',"\u0167":'t',"\u0168":'U',"\u016A":'U',"\u016C":'U',"\u016E":'U',"\u0170":'U',"\u0172":'U',"\u0169":'u',"\u016B":'u',"\u016D":'u',"\u016F":'u',"\u0171":'u',"\u0173":'u',"\u0174":'W',"\u0175":'w',"\u0176":'Y',"\u0177":'y',"\u0178":'Y',"\u0179":'Z',"\u017B":'Z',"\u017D":'Z',"\u017A":'z',"\u017C":'z',"\u017E":'z',"\u0132":'IJ',"\u0133":'ij',"\u0152":'Oe',"\u0153":'oe',"\u0149":"'n","\u017F":'s'};/** Used to map characters to HTML entities. */var htmlEscapes={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'};/** Used to map HTML entities to characters. */var htmlUnescapes={'&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"','&#39;':"'"};/** Used to escape characters for inclusion in compiled string literals. */var stringEscapes={'\\':'\\',"'":"'",'\n':'n','\r':'r',"\u2028":'u2028',"\u2029":'u2029'};/** Built-in method references without a dependency on `root`. */var freeParseFloat=parseFloat,freeParseInt=parseInt;/** Detect free variable `global` from Node.js. */var freeGlobal=(typeof __webpack_require__.g==="undefined"?"undefined":_typeof(__webpack_require__.g))=='object'&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g;/** Detect free variable `self`. */var freeSelf=(typeof self==="undefined"?"undefined":_typeof(self))=='object'&&self&&self.Object===Object&&self;/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function('return this')();/** Detect free variable `exports`. */var freeExports=( false?0:_typeof(exports))=='object'&&exports&&!exports.nodeType&&exports;/** Detect free variable `module`. */var freeModule=freeExports&&( false?0:_typeof(module))=='object'&&module&&!module.nodeType&&module;/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;/** Detect free variable `process` from Node.js. */var freeProcess=moduleExports&&freeGlobal.process;/** Used to access faster Node.js helpers. */var nodeUtil=function(){try{// Use `util.types` for Node.js 10+.
3225var types=freeModule&&freeModule.require&&freeModule.require('util').types;if(types){return types;}// Legacy `process.binding('util')` for Node.js < 10.
3226return freeProcess&&freeProcess.binding&&freeProcess.binding('util');}catch(e){}}();/* Node.js helper references. */var nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;/*--------------------------------------------------------------------------*/ /**
3227   * A faster alternative to `Function#apply`, this function invokes `func`
3228   * with the `this` binding of `thisArg` and the arguments of `args`.
3229   *
3230   * @private
3231   * @param {Function} func The function to invoke.
3232   * @param {*} thisArg The `this` binding of `func`.
3233   * @param {Array} args The arguments to invoke `func` with.
3234   * @returns {*} Returns the result of `func`.
3235   */function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2]);}return func.apply(thisArg,args);}/**
3236   * A specialized version of `baseAggregator` for arrays.
3237   *
3238   * @private
3239   * @param {Array} [array] The array to iterate over.
3240   * @param {Function} setter The function to set `accumulator` values.
3241   * @param {Function} iteratee The iteratee to transform keys.
3242   * @param {Object} accumulator The initial aggregated object.
3243   * @returns {Function} Returns `accumulator`.
3244   */function arrayAggregator(array,setter,iteratee,accumulator){var index=-1,length=array==null?0:array.length;while(++index<length){var value=array[index];setter(accumulator,value,iteratee(value),array);}return accumulator;}/**
3245   * A specialized version of `_.forEach` for arrays without support for
3246   * iteratee shorthands.
3247   *
3248   * @private
3249   * @param {Array} [array] The array to iterate over.
3250   * @param {Function} iteratee The function invoked per iteration.
3251   * @returns {Array} Returns `array`.
3252   */function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break;}}return array;}/**
3253   * A specialized version of `_.forEachRight` for arrays without support for
3254   * iteratee shorthands.
3255   *
3256   * @private
3257   * @param {Array} [array] The array to iterate over.
3258   * @param {Function} iteratee The function invoked per iteration.
3259   * @returns {Array} Returns `array`.
3260   */function arrayEachRight(array,iteratee){var length=array==null?0:array.length;while(length--){if(iteratee(array[length],length,array)===false){break;}}return array;}/**
3261   * A specialized version of `_.every` for arrays without support for
3262   * iteratee shorthands.
3263   *
3264   * @private
3265   * @param {Array} [array] The array to iterate over.
3266   * @param {Function} predicate The function invoked per iteration.
3267   * @returns {boolean} Returns `true` if all elements pass the predicate check,
3268   *  else `false`.
3269   */function arrayEvery(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(!predicate(array[index],index,array)){return false;}}return true;}/**
3270   * A specialized version of `_.filter` for arrays without support for
3271   * iteratee shorthands.
3272   *
3273   * @private
3274   * @param {Array} [array] The array to iterate over.
3275   * @param {Function} predicate The function invoked per iteration.
3276   * @returns {Array} Returns the new filtered array.
3277   */function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value;}}return result;}/**
3278   * A specialized version of `_.includes` for arrays without support for
3279   * specifying an index to search from.
3280   *
3281   * @private
3282   * @param {Array} [array] The array to inspect.
3283   * @param {*} target The value to search for.
3284   * @returns {boolean} Returns `true` if `target` is found, else `false`.
3285   */function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1;}/**
3286   * This function is like `arrayIncludes` except that it accepts a comparator.
3287   *
3288   * @private
3289   * @param {Array} [array] The array to inspect.
3290   * @param {*} target The value to search for.
3291   * @param {Function} comparator The comparator invoked per element.
3292   * @returns {boolean} Returns `true` if `target` is found, else `false`.
3293   */function arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index<length){if(comparator(value,array[index])){return true;}}return false;}/**
3294   * A specialized version of `_.map` for arrays without support for iteratee
3295   * shorthands.
3296   *
3297   * @private
3298   * @param {Array} [array] The array to iterate over.
3299   * @param {Function} iteratee The function invoked per iteration.
3300   * @returns {Array} Returns the new mapped array.
3301   */function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array);}return result;}/**
3302   * Appends the elements of `values` to `array`.
3303   *
3304   * @private
3305   * @param {Array} array The array to modify.
3306   * @param {Array} values The values to append.
3307   * @returns {Array} Returns `array`.
3308   */function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index];}return array;}/**
3309   * A specialized version of `_.reduce` for arrays without support for
3310   * iteratee shorthands.
3311   *
3312   * @private
3313   * @param {Array} [array] The array to iterate over.
3314   * @param {Function} iteratee The function invoked per iteration.
3315   * @param {*} [accumulator] The initial value.
3316   * @param {boolean} [initAccum] Specify using the first element of `array` as
3317   *  the initial value.
3318   * @returns {*} Returns the accumulated value.
3319   */function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array==null?0:array.length;if(initAccum&&length){accumulator=array[++index];}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array);}return accumulator;}/**
3320   * A specialized version of `_.reduceRight` for arrays without support for
3321   * iteratee shorthands.
3322   *
3323   * @private
3324   * @param {Array} [array] The array to iterate over.
3325   * @param {Function} iteratee The function invoked per iteration.
3326   * @param {*} [accumulator] The initial value.
3327   * @param {boolean} [initAccum] Specify using the last element of `array` as
3328   *  the initial value.
3329   * @returns {*} Returns the accumulated value.
3330   */function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=array==null?0:array.length;if(initAccum&&length){accumulator=array[--length];}while(length--){accumulator=iteratee(accumulator,array[length],length,array);}return accumulator;}/**
3331   * A specialized version of `_.some` for arrays without support for iteratee
3332   * shorthands.
3333   *
3334   * @private
3335   * @param {Array} [array] The array to iterate over.
3336   * @param {Function} predicate The function invoked per iteration.
3337   * @returns {boolean} Returns `true` if any element passes the predicate check,
3338   *  else `false`.
3339   */function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true;}}return false;}/**
3340   * Gets the size of an ASCII `string`.
3341   *
3342   * @private
3343   * @param {string} string The string inspect.
3344   * @returns {number} Returns the string size.
3345   */var asciiSize=baseProperty('length');/**
3346   * Converts an ASCII `string` to an array.
3347   *
3348   * @private
3349   * @param {string} string The string to convert.
3350   * @returns {Array} Returns the converted array.
3351   */function asciiToArray(string){return string.split('');}/**
3352   * Splits an ASCII `string` into an array of its words.
3353   *
3354   * @private
3355   * @param {string} The string to inspect.
3356   * @returns {Array} Returns the words of `string`.
3357   */function asciiWords(string){return string.match(reAsciiWord)||[];}/**
3358   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
3359   * without support for iteratee shorthands, which iterates over `collection`
3360   * using `eachFunc`.
3361   *
3362   * @private
3363   * @param {Array|Object} collection The collection to inspect.
3364   * @param {Function} predicate The function invoked per iteration.
3365   * @param {Function} eachFunc The function to iterate over `collection`.
3366   * @returns {*} Returns the found element or its key, else `undefined`.
3367   */function baseFindKey(collection,predicate,eachFunc){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=key;return false;}});return result;}/**
3368   * The base implementation of `_.findIndex` and `_.findLastIndex` without
3369   * support for iteratee shorthands.
3370   *
3371   * @private
3372   * @param {Array} array The array to inspect.
3373   * @param {Function} predicate The function invoked per iteration.
3374   * @param {number} fromIndex The index to search from.
3375   * @param {boolean} [fromRight] Specify iterating from right to left.
3376   * @returns {number} Returns the index of the matched value, else `-1`.
3377   */function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?1:-1);while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index;}}return-1;}/**
3378   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
3379   *
3380   * @private
3381   * @param {Array} array The array to inspect.
3382   * @param {*} value The value to search for.
3383   * @param {number} fromIndex The index to search from.
3384   * @returns {number} Returns the index of the matched value, else `-1`.
3385   */function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex);}/**
3386   * This function is like `baseIndexOf` except that it accepts a comparator.
3387   *
3388   * @private
3389   * @param {Array} array The array to inspect.
3390   * @param {*} value The value to search for.
3391   * @param {number} fromIndex The index to search from.
3392   * @param {Function} comparator The comparator invoked per element.
3393   * @returns {number} Returns the index of the matched value, else `-1`.
3394   */function baseIndexOfWith(array,value,fromIndex,comparator){var index=fromIndex-1,length=array.length;while(++index<length){if(comparator(array[index],value)){return index;}}return-1;}/**
3395   * The base implementation of `_.isNaN` without support for number objects.
3396   *
3397   * @private
3398   * @param {*} value The value to check.
3399   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
3400   */function baseIsNaN(value){return value!==value;}/**
3401   * The base implementation of `_.mean` and `_.meanBy` without support for
3402   * iteratee shorthands.
3403   *
3404   * @private
3405   * @param {Array} array The array to iterate over.
3406   * @param {Function} iteratee The function invoked per iteration.
3407   * @returns {number} Returns the mean.
3408   */function baseMean(array,iteratee){var length=array==null?0:array.length;return length?baseSum(array,iteratee)/length:NAN;}/**
3409   * The base implementation of `_.property` without support for deep paths.
3410   *
3411   * @private
3412   * @param {string} key The key of the property to get.
3413   * @returns {Function} Returns the new accessor function.
3414   */function baseProperty(key){return function(object){return object==null?undefined:object[key];};}/**
3415   * The base implementation of `_.propertyOf` without support for deep paths.
3416   *
3417   * @private
3418   * @param {Object} object The object to query.
3419   * @returns {Function} Returns the new accessor function.
3420   */function basePropertyOf(object){return function(key){return object==null?undefined:object[key];};}/**
3421   * The base implementation of `_.reduce` and `_.reduceRight`, without support
3422   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
3423   *
3424   * @private
3425   * @param {Array|Object} collection The collection to iterate over.
3426   * @param {Function} iteratee The function invoked per iteration.
3427   * @param {*} accumulator The initial value.
3428   * @param {boolean} initAccum Specify using the first or last element of
3429   *  `collection` as the initial value.
3430   * @param {Function} eachFunc The function to iterate over `collection`.
3431   * @returns {*} Returns the accumulated value.
3432   */function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index,collection);});return accumulator;}/**
3433   * The base implementation of `_.sortBy` which uses `comparer` to define the
3434   * sort order of `array` and replaces criteria objects with their corresponding
3435   * values.
3436   *
3437   * @private
3438   * @param {Array} array The array to sort.
3439   * @param {Function} comparer The function to define sort order.
3440   * @returns {Array} Returns `array`.
3441   */function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value;}return array;}/**
3442   * The base implementation of `_.sum` and `_.sumBy` without support for
3443   * iteratee shorthands.
3444   *
3445   * @private
3446   * @param {Array} array The array to iterate over.
3447   * @param {Function} iteratee The function invoked per iteration.
3448   * @returns {number} Returns the sum.
3449   */function baseSum(array,iteratee){var result,index=-1,length=array.length;while(++index<length){var current=iteratee(array[index]);if(current!==undefined){result=result===undefined?current:result+current;}}return result;}/**
3450   * The base implementation of `_.times` without support for iteratee shorthands
3451   * or max array length checks.
3452   *
3453   * @private
3454   * @param {number} n The number of times to invoke `iteratee`.
3455   * @param {Function} iteratee The function invoked per iteration.
3456   * @returns {Array} Returns the array of results.
3457   */function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index);}return result;}/**
3458   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
3459   * of key-value pairs for `object` corresponding to the property names of `props`.
3460   *
3461   * @private
3462   * @param {Object} object The object to query.
3463   * @param {Array} props The property names to get values for.
3464   * @returns {Object} Returns the key-value pairs.
3465   */function baseToPairs(object,props){return arrayMap(props,function(key){return[key,object[key]];});}/**
3466   * The base implementation of `_.trim`.
3467   *
3468   * @private
3469   * @param {string} string The string to trim.
3470   * @returns {string} Returns the trimmed string.
3471   */function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,''):string;}/**
3472   * The base implementation of `_.unary` without support for storing metadata.
3473   *
3474   * @private
3475   * @param {Function} func The function to cap arguments for.
3476   * @returns {Function} Returns the new capped function.
3477   */function baseUnary(func){return function(value){return func(value);};}/**
3478   * The base implementation of `_.values` and `_.valuesIn` which creates an
3479   * array of `object` property values corresponding to the property names
3480   * of `props`.
3481   *
3482   * @private
3483   * @param {Object} object The object to query.
3484   * @param {Array} props The property names to get values for.
3485   * @returns {Object} Returns the array of property values.
3486   */function baseValues(object,props){return arrayMap(props,function(key){return object[key];});}/**
3487   * Checks if a `cache` value for `key` exists.
3488   *
3489   * @private
3490   * @param {Object} cache The cache to query.
3491   * @param {string} key The key of the entry to check.
3492   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3493   */function cacheHas(cache,key){return cache.has(key);}/**
3494   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
3495   * that is not found in the character symbols.
3496   *
3497   * @private
3498   * @param {Array} strSymbols The string symbols to inspect.
3499   * @param {Array} chrSymbols The character symbols to find.
3500   * @returns {number} Returns the index of the first unmatched string symbol.
3501   */function charsStartIndex(strSymbols,chrSymbols){var index=-1,length=strSymbols.length;while(++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index;}/**
3502   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
3503   * that is not found in the character symbols.
3504   *
3505   * @private
3506   * @param {Array} strSymbols The string symbols to inspect.
3507   * @param {Array} chrSymbols The character symbols to find.
3508   * @returns {number} Returns the index of the last unmatched string symbol.
3509   */function charsEndIndex(strSymbols,chrSymbols){var index=strSymbols.length;while(index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index;}/**
3510   * Gets the number of `placeholder` occurrences in `array`.
3511   *
3512   * @private
3513   * @param {Array} array The array to inspect.
3514   * @param {*} placeholder The placeholder to search for.
3515   * @returns {number} Returns the placeholder count.
3516   */function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result;}}return result;}/**
3517   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
3518   * letters to basic Latin letters.
3519   *
3520   * @private
3521   * @param {string} letter The matched letter to deburr.
3522   * @returns {string} Returns the deburred letter.
3523   */var deburrLetter=basePropertyOf(deburredLetters);/**
3524   * Used by `_.escape` to convert characters to HTML entities.
3525   *
3526   * @private
3527   * @param {string} chr The matched character to escape.
3528   * @returns {string} Returns the escaped character.
3529   */var escapeHtmlChar=basePropertyOf(htmlEscapes);/**
3530   * Used by `_.template` to escape characters for inclusion in compiled string literals.
3531   *
3532   * @private
3533   * @param {string} chr The matched character to escape.
3534   * @returns {string} Returns the escaped character.
3535   */function escapeStringChar(chr){return'\\'+stringEscapes[chr];}/**
3536   * Gets the value at `key` of `object`.
3537   *
3538   * @private
3539   * @param {Object} [object] The object to query.
3540   * @param {string} key The key of the property to get.
3541   * @returns {*} Returns the property value.
3542   */function getValue(object,key){return object==null?undefined:object[key];}/**
3543   * Checks if `string` contains Unicode symbols.
3544   *
3545   * @private
3546   * @param {string} string The string to inspect.
3547   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
3548   */function hasUnicode(string){return reHasUnicode.test(string);}/**
3549   * Checks if `string` contains a word composed of Unicode symbols.
3550   *
3551   * @private
3552   * @param {string} string The string to inspect.
3553   * @returns {boolean} Returns `true` if a word is found, else `false`.
3554   */function hasUnicodeWord(string){return reHasUnicodeWord.test(string);}/**
3555   * Converts `iterator` to an array.
3556   *
3557   * @private
3558   * @param {Object} iterator The iterator to convert.
3559   * @returns {Array} Returns the converted array.
3560   */function iteratorToArray(iterator){var data,result=[];while(!(data=iterator.next()).done){result.push(data.value);}return result;}/**
3561   * Converts `map` to its key-value pairs.
3562   *
3563   * @private
3564   * @param {Object} map The map to convert.
3565   * @returns {Array} Returns the key-value pairs.
3566   */function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value];});return result;}/**
3567   * Creates a unary function that invokes `func` with its argument transformed.
3568   *
3569   * @private
3570   * @param {Function} func The function to wrap.
3571   * @param {Function} transform The argument transform.
3572   * @returns {Function} Returns the new function.
3573   */function overArg(func,transform){return function(arg){return func(transform(arg));};}/**
3574   * Replaces all `placeholder` elements in `array` with an internal placeholder
3575   * and returns an array of their indexes.
3576   *
3577   * @private
3578   * @param {Array} array The array to modify.
3579   * @param {*} placeholder The placeholder to replace.
3580   * @returns {Array} Returns the new array of placeholder indexes.
3581   */function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value===placeholder||value===PLACEHOLDER){array[index]=PLACEHOLDER;result[resIndex++]=index;}}return result;}/**
3582   * Converts `set` to an array of its values.
3583   *
3584   * @private
3585   * @param {Object} set The set to convert.
3586   * @returns {Array} Returns the values.
3587   */function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value;});return result;}/**
3588   * Converts `set` to its value-value pairs.
3589   *
3590   * @private
3591   * @param {Object} set The set to convert.
3592   * @returns {Array} Returns the value-value pairs.
3593   */function setToPairs(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=[value,value];});return result;}/**
3594   * A specialized version of `_.indexOf` which performs strict equality
3595   * comparisons of values, i.e. `===`.
3596   *
3597   * @private
3598   * @param {Array} array The array to inspect.
3599   * @param {*} value The value to search for.
3600   * @param {number} fromIndex The index to search from.
3601   * @returns {number} Returns the index of the matched value, else `-1`.
3602   */function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index;}}return-1;}/**
3603   * A specialized version of `_.lastIndexOf` which performs strict equality
3604   * comparisons of values, i.e. `===`.
3605   *
3606   * @private
3607   * @param {Array} array The array to inspect.
3608   * @param {*} value The value to search for.
3609   * @param {number} fromIndex The index to search from.
3610   * @returns {number} Returns the index of the matched value, else `-1`.
3611   */function strictLastIndexOf(array,value,fromIndex){var index=fromIndex+1;while(index--){if(array[index]===value){return index;}}return index;}/**
3612   * Gets the number of symbols in `string`.
3613   *
3614   * @private
3615   * @param {string} string The string to inspect.
3616   * @returns {number} Returns the string size.
3617   */function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string);}/**
3618   * Converts `string` to an array.
3619   *
3620   * @private
3621   * @param {string} string The string to convert.
3622   * @returns {Array} Returns the converted array.
3623   */function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string);}/**
3624   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3625   * character of `string`.
3626   *
3627   * @private
3628   * @param {string} string The string to inspect.
3629   * @returns {number} Returns the index of the last non-whitespace character.
3630   */function trimmedEndIndex(string){var index=string.length;while(index--&&reWhitespace.test(string.charAt(index))){}return index;}/**
3631   * Used by `_.unescape` to convert HTML entities to characters.
3632   *
3633   * @private
3634   * @param {string} chr The matched character to unescape.
3635   * @returns {string} Returns the unescaped character.
3636   */var unescapeHtmlChar=basePropertyOf(htmlUnescapes);/**
3637   * Gets the size of a Unicode `string`.
3638   *
3639   * @private
3640   * @param {string} string The string inspect.
3641   * @returns {number} Returns the string size.
3642   */function unicodeSize(string){var result=reUnicode.lastIndex=0;while(reUnicode.test(string)){++result;}return result;}/**
3643   * Converts a Unicode `string` to an array.
3644   *
3645   * @private
3646   * @param {string} string The string to convert.
3647   * @returns {Array} Returns the converted array.
3648   */function unicodeToArray(string){return string.match(reUnicode)||[];}/**
3649   * Splits a Unicode `string` into an array of its words.
3650   *
3651   * @private
3652   * @param {string} The string to inspect.
3653   * @returns {Array} Returns the words of `string`.
3654   */function unicodeWords(string){return string.match(reUnicodeWord)||[];}/*--------------------------------------------------------------------------*/ /**
3655   * Create a new pristine `lodash` function using the `context` object.
3656   *
3657   * @static
3658   * @memberOf _
3659   * @since 1.1.0
3660   * @category Util
3661   * @param {Object} [context=root] The context object.
3662   * @returns {Function} Returns a new `lodash` function.
3663   * @example
3664   *
3665   * _.mixin({ 'foo': _.constant('foo') });
3666   *
3667   * var lodash = _.runInContext();
3668   * lodash.mixin({ 'bar': lodash.constant('bar') });
3669   *
3670   * _.isFunction(_.foo);
3671   * // => true
3672   * _.isFunction(_.bar);
3673   * // => false
3674   *
3675   * lodash.isFunction(lodash.foo);
3676   * // => false
3677   * lodash.isFunction(lodash.bar);
3678   * // => true
3679   *
3680   * // Create a suped-up `defer` in Node.js.
3681   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
3682   */var runInContext=function runInContext(context){context=context==null?root:_.defaults(root.Object(),context,_.pick(root,contextProps));/** Built-in constructor references. */var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;/** Used for built-in method references. */var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;/** Used to detect overreaching core-js shims. */var coreJsData=context['__core-js_shared__'];/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;/** Used to generate unique IDs. */var idCounter=0;/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||'');return uid?'Symbol(src)_1.'+uid:'';}();/**
3683     * Used to resolve the
3684     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3685     * of values.
3686     */var nativeObjectToString=objectProto.toString;/** Used to infer the `Object` constructor. */var objectCtorString=funcToString.call(Object);/** Used to restore the original `_` reference in `_.noConflict`. */var oldDash=root._;/** Used to detect if a method is native. */var reIsNative=RegExp('^'+funcToString.call(hasOwnProperty).replace(reRegExpChar,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');/** Built-in value references. */var Buffer=moduleExports?context.Buffer:undefined,_Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=_Symbol?_Symbol.isConcatSpreadable:undefined,symIterator=_Symbol?_Symbol.iterator:undefined,symToStringTag=_Symbol?_Symbol.toStringTag:undefined;var defineProperty=function(){try{var func=getNative(Object,'defineProperty');func({},'',{});return func;}catch(e){}}();/** Mocked built-ins. */var ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout;/* Built-in method references for those with the same name as other `lodash` methods. */var nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse;/* Built-in method references that are verified to be native. */var DataView=getNative(context,'DataView'),Map=getNative(context,'Map'),Promise=getNative(context,'Promise'),Set=getNative(context,'Set'),WeakMap=getNative(context,'WeakMap'),nativeCreate=getNative(Object,'create');/** Used to store function metadata. */var metaMap=WeakMap&&new WeakMap();/** Used to lookup unminified function names. */var realNames={};/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);/** Used to convert symbols to primitives and strings. */var symbolProto=_Symbol?_Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;/*------------------------------------------------------------------------*/ /**
3687     * Creates a `lodash` object which wraps `value` to enable implicit method
3688     * chain sequences. Methods that operate on and return arrays, collections,
3689     * and functions can be chained together. Methods that retrieve a single value
3690     * or may return a primitive value will automatically end the chain sequence
3691     * and return the unwrapped value. Otherwise, the value must be unwrapped
3692     * with `_#value`.
3693     *
3694     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
3695     * enabled using `_.chain`.
3696     *
3697     * The execution of chained methods is lazy, that is, it's deferred until
3698     * `_#value` is implicitly or explicitly called.
3699     *
3700     * Lazy evaluation allows several methods to support shortcut fusion.
3701     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
3702     * the creation of intermediate arrays and can greatly reduce the number of
3703     * iteratee executions. Sections of a chain sequence qualify for shortcut
3704     * fusion if the section is applied to an array and iteratees accept only
3705     * one argument. The heuristic for whether a section qualifies for shortcut
3706     * fusion is subject to change.
3707     *
3708     * Chaining is supported in custom builds as long as the `_#value` method is
3709     * directly or indirectly included in the build.
3710     *
3711     * In addition to lodash methods, wrappers have `Array` and `String` methods.
3712     *
3713     * The wrapper `Array` methods are:
3714     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
3715     *
3716     * The wrapper `String` methods are:
3717     * `replace` and `split`
3718     *
3719     * The wrapper methods that support shortcut fusion are:
3720     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
3721     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
3722     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
3723     *
3724     * The chainable wrapper methods are:
3725     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
3726     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
3727     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
3728     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
3729     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
3730     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
3731     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
3732     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
3733     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
3734     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
3735     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
3736     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
3737     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
3738     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
3739     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
3740     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
3741     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
3742     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
3743     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
3744     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
3745     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
3746     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
3747     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
3748     * `zipObject`, `zipObjectDeep`, and `zipWith`
3749     *
3750     * The wrapper methods that are **not** chainable by default are:
3751     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
3752     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
3753     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
3754     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
3755     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
3756     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
3757     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
3758     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
3759     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
3760     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
3761     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
3762     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
3763     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
3764     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
3765     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
3766     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
3767     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
3768     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
3769     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
3770     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
3771     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
3772     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
3773     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
3774     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
3775     * `upperFirst`, `value`, and `words`
3776     *
3777     * @name _
3778     * @constructor
3779     * @category Seq
3780     * @param {*} value The value to wrap in a `lodash` instance.
3781     * @returns {Object} Returns the new `lodash` wrapper instance.
3782     * @example
3783     *
3784     * function square(n) {
3785     *   return n * n;
3786     * }
3787     *
3788     * var wrapped = _([1, 2, 3]);
3789     *
3790     * // Returns an unwrapped value.
3791     * wrapped.reduce(_.add);
3792     * // => 6
3793     *
3794     * // Returns a wrapped value.
3795     * var squares = wrapped.map(square);
3796     *
3797     * _.isArray(squares);
3798     * // => false
3799     *
3800     * _.isArray(squares.value());
3801     * // => true
3802     */function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value;}if(hasOwnProperty.call(value,'__wrapped__')){return wrapperClone(value);}}return new LodashWrapper(value);}/**
3803     * The base implementation of `_.create` without support for assigning
3804     * properties to the created object.
3805     *
3806     * @private
3807     * @param {Object} proto The object to inherit from.
3808     * @returns {Object} Returns the new object.
3809     */var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{};}if(objectCreate){return objectCreate(proto);}object.prototype=proto;var result=new object();object.prototype=undefined;return result;};}();/**
3810     * The function whose prototype chain sequence wrappers inherit from.
3811     *
3812     * @private
3813     */function baseLodash(){// No operation performed.
3814}/**
3815     * The base constructor for creating `lodash` wrapper objects.
3816     *
3817     * @private
3818     * @param {*} value The value to wrap.
3819     * @param {boolean} [chainAll] Enable explicit method chain sequences.
3820     */function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=undefined;}/**
3821     * By default, the template delimiters used by lodash are like those in
3822     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
3823     * following template settings to use alternative delimiters.
3824     *
3825     * @static
3826     * @memberOf _
3827     * @type {Object}
3828     */lodash.templateSettings={/**
3829       * Used to detect `data` property values to be HTML-escaped.
3830       *
3831       * @memberOf _.templateSettings
3832       * @type {RegExp}
3833       */'escape':reEscape,/**
3834       * Used to detect code to be evaluated.
3835       *
3836       * @memberOf _.templateSettings
3837       * @type {RegExp}
3838       */'evaluate':reEvaluate,/**
3839       * Used to detect `data` property values to inject.
3840       *
3841       * @memberOf _.templateSettings
3842       * @type {RegExp}
3843       */'interpolate':reInterpolate,/**
3844       * Used to reference the data object in the template text.
3845       *
3846       * @memberOf _.templateSettings
3847       * @type {string}
3848       */'variable':'',/**
3849       * Used to import variables into the compiled template.
3850       *
3851       * @memberOf _.templateSettings
3852       * @type {Object}
3853       */'imports':{/**
3854         * A reference to the `lodash` function.
3855         *
3856         * @memberOf _.templateSettings.imports
3857         * @type {Function}
3858         */'_':lodash}};// Ensure wrappers are instances of `baseLodash`.
3859lodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;/*------------------------------------------------------------------------*/ /**
3860     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
3861     *
3862     * @private
3863     * @constructor
3864     * @param {*} value The value to wrap.
3865     */function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[];}/**
3866     * Creates a clone of the lazy wrapper object.
3867     *
3868     * @private
3869     * @name clone
3870     * @memberOf LazyWrapper
3871     * @returns {Object} Returns the cloned `LazyWrapper` object.
3872     */function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=copyArray(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=copyArray(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=copyArray(this.__views__);return result;}/**
3873     * Reverses the direction of lazy iteration.
3874     *
3875     * @private
3876     * @name reverse
3877     * @memberOf LazyWrapper
3878     * @returns {Object} Returns the new reversed `LazyWrapper` object.
3879     */function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true;}else{result=this.clone();result.__dir__*=-1;}return result;}/**
3880     * Extracts the unwrapped value from its lazy wrapper.
3881     *
3882     * @private
3883     * @name value
3884     * @memberOf LazyWrapper
3885     * @returns {*} Returns the unwrapped value.
3886     */function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length){return baseWrapperValue(array,this.__actions__);}var result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed;}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer;}else{break outer;}}}result[resIndex++]=value;}return result;}// Ensure `LazyWrapper` is an instance of `baseLodash`.
3887LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;/*------------------------------------------------------------------------*/ /**
3888     * Creates a hash object.
3889     *
3890     * @private
3891     * @constructor
3892     * @param {Array} [entries] The key-value pairs to cache.
3893     */function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
3894     * Removes all key-value entries from the hash.
3895     *
3896     * @private
3897     * @name clear
3898     * @memberOf Hash
3899     */function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;}/**
3900     * Removes `key` and its value from the hash.
3901     *
3902     * @private
3903     * @name delete
3904     * @memberOf Hash
3905     * @param {Object} hash The hash to modify.
3906     * @param {string} key The key of the value to remove.
3907     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3908     */function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result;}/**
3909     * Gets the hash value for `key`.
3910     *
3911     * @private
3912     * @name get
3913     * @memberOf Hash
3914     * @param {string} key The key of the value to get.
3915     * @returns {*} Returns the entry value.
3916     */function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result;}return hasOwnProperty.call(data,key)?data[key]:undefined;}/**
3917     * Checks if a hash value for `key` exists.
3918     *
3919     * @private
3920     * @name has
3921     * @memberOf Hash
3922     * @param {string} key The key of the entry to check.
3923     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3924     */function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key);}/**
3925     * Sets the hash `key` to `value`.
3926     *
3927     * @private
3928     * @name set
3929     * @memberOf Hash
3930     * @param {string} key The key of the value to set.
3931     * @param {*} value The value to set.
3932     * @returns {Object} Returns the hash instance.
3933     */function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this;}// Add methods to `Hash`.
3934Hash.prototype.clear=hashClear;Hash.prototype['delete']=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;/*------------------------------------------------------------------------*/ /**
3935     * Creates an list cache object.
3936     *
3937     * @private
3938     * @constructor
3939     * @param {Array} [entries] The key-value pairs to cache.
3940     */function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
3941     * Removes all key-value entries from the list cache.
3942     *
3943     * @private
3944     * @name clear
3945     * @memberOf ListCache
3946     */function listCacheClear(){this.__data__=[];this.size=0;}/**
3947     * Removes `key` and its value from the list cache.
3948     *
3949     * @private
3950     * @name delete
3951     * @memberOf ListCache
3952     * @param {string} key The key of the value to remove.
3953     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3954     */function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false;}var lastIndex=data.length-1;if(index==lastIndex){data.pop();}else{splice.call(data,index,1);}--this.size;return true;}/**
3955     * Gets the list cache value for `key`.
3956     *
3957     * @private
3958     * @name get
3959     * @memberOf ListCache
3960     * @param {string} key The key of the value to get.
3961     * @returns {*} Returns the entry value.
3962     */function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1];}/**
3963     * Checks if a list cache value for `key` exists.
3964     *
3965     * @private
3966     * @name has
3967     * @memberOf ListCache
3968     * @param {string} key The key of the entry to check.
3969     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3970     */function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1;}/**
3971     * Sets the list cache `key` to `value`.
3972     *
3973     * @private
3974     * @name set
3975     * @memberOf ListCache
3976     * @param {string} key The key of the value to set.
3977     * @param {*} value The value to set.
3978     * @returns {Object} Returns the list cache instance.
3979     */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value]);}else{data[index][1]=value;}return this;}// Add methods to `ListCache`.
3980ListCache.prototype.clear=listCacheClear;ListCache.prototype['delete']=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;/*------------------------------------------------------------------------*/ /**
3981     * Creates a map cache object to store key-value pairs.
3982     *
3983     * @private
3984     * @constructor
3985     * @param {Array} [entries] The key-value pairs to cache.
3986     */function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
3987     * Removes all key-value entries from the map.
3988     *
3989     * @private
3990     * @name clear
3991     * @memberOf MapCache
3992     */function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}/**
3993     * Removes `key` and its value from the map.
3994     *
3995     * @private
3996     * @name delete
3997     * @memberOf MapCache
3998     * @param {string} key The key of the value to remove.
3999     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4000     */function mapCacheDelete(key){var result=getMapData(this,key)['delete'](key);this.size-=result?1:0;return result;}/**
4001     * Gets the map value for `key`.
4002     *
4003     * @private
4004     * @name get
4005     * @memberOf MapCache
4006     * @param {string} key The key of the value to get.
4007     * @returns {*} Returns the entry value.
4008     */function mapCacheGet(key){return getMapData(this,key).get(key);}/**
4009     * Checks if a map value for `key` exists.
4010     *
4011     * @private
4012     * @name has
4013     * @memberOf MapCache
4014     * @param {string} key The key of the entry to check.
4015     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4016     */function mapCacheHas(key){return getMapData(this,key).has(key);}/**
4017     * Sets the map `key` to `value`.
4018     *
4019     * @private
4020     * @name set
4021     * @memberOf MapCache
4022     * @param {string} key The key of the value to set.
4023     * @param {*} value The value to set.
4024     * @returns {Object} Returns the map cache instance.
4025     */function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this;}// Add methods to `MapCache`.
4026MapCache.prototype.clear=mapCacheClear;MapCache.prototype['delete']=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;/*------------------------------------------------------------------------*/ /**
4027     *
4028     * Creates an array cache object to store unique values.
4029     *
4030     * @private
4031     * @constructor
4032     * @param {Array} [values] The values to cache.
4033     */function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache();while(++index<length){this.add(values[index]);}}/**
4034     * Adds `value` to the array cache.
4035     *
4036     * @private
4037     * @name add
4038     * @memberOf SetCache
4039     * @alias push
4040     * @param {*} value The value to cache.
4041     * @returns {Object} Returns the cache instance.
4042     */function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this;}/**
4043     * Checks if `value` is in the array cache.
4044     *
4045     * @private
4046     * @name has
4047     * @memberOf SetCache
4048     * @param {*} value The value to search for.
4049     * @returns {number} Returns `true` if `value` is found, else `false`.
4050     */function setCacheHas(value){return this.__data__.has(value);}// Add methods to `SetCache`.
4051SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;/*------------------------------------------------------------------------*/ /**
4052     * Creates a stack cache object to store key-value pairs.
4053     *
4054     * @private
4055     * @constructor
4056     * @param {Array} [entries] The key-value pairs to cache.
4057     */function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size;}/**
4058     * Removes all key-value entries from the stack.
4059     *
4060     * @private
4061     * @name clear
4062     * @memberOf Stack
4063     */function stackClear(){this.__data__=new ListCache();this.size=0;}/**
4064     * Removes `key` and its value from the stack.
4065     *
4066     * @private
4067     * @name delete
4068     * @memberOf Stack
4069     * @param {string} key The key of the value to remove.
4070     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4071     */function stackDelete(key){var data=this.__data__,result=data['delete'](key);this.size=data.size;return result;}/**
4072     * Gets the stack value for `key`.
4073     *
4074     * @private
4075     * @name get
4076     * @memberOf Stack
4077     * @param {string} key The key of the value to get.
4078     * @returns {*} Returns the entry value.
4079     */function stackGet(key){return this.__data__.get(key);}/**
4080     * Checks if a stack value for `key` exists.
4081     *
4082     * @private
4083     * @name has
4084     * @memberOf Stack
4085     * @param {string} key The key of the entry to check.
4086     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4087     */function stackHas(key){return this.__data__.has(key);}/**
4088     * Sets the stack `key` to `value`.
4089     *
4090     * @private
4091     * @name set
4092     * @memberOf Stack
4093     * @param {string} key The key of the value to set.
4094     * @param {*} value The value to set.
4095     * @returns {Object} Returns the stack cache instance.
4096     */function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this;}data=this.__data__=new MapCache(pairs);}data.set(key,value);this.size=data.size;return this;}// Add methods to `Stack`.
4097Stack.prototype.clear=stackClear;Stack.prototype['delete']=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;/*------------------------------------------------------------------------*/ /**
4098     * Creates an array of the enumerable property names of the array-like `value`.
4099     *
4100     * @private
4101     * @param {*} value The value to query.
4102     * @param {boolean} inherited Specify returning inherited property names.
4103     * @returns {Array} Returns the array of property names.
4104     */function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(// Safari 9 has enumerable `arguments.length` in strict mode.
4105key=='length'||// Node.js 0.10 has enumerable non-index properties on buffers.
4106isBuff&&(key=='offset'||key=='parent')||// PhantomJS 2 has enumerable non-index properties on typed arrays.
4107isType&&(key=='buffer'||key=='byteLength'||key=='byteOffset')||// Skip index properties.
4108isIndex(key,length)))){result.push(key);}}return result;}/**
4109     * A specialized version of `_.sample` for arrays.
4110     *
4111     * @private
4112     * @param {Array} array The array to sample.
4113     * @returns {*} Returns the random element.
4114     */function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined;}/**
4115     * A specialized version of `_.sampleSize` for arrays.
4116     *
4117     * @private
4118     * @param {Array} array The array to sample.
4119     * @param {number} n The number of elements to sample.
4120     * @returns {Array} Returns the random elements.
4121     */function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length));}/**
4122     * A specialized version of `_.shuffle` for arrays.
4123     *
4124     * @private
4125     * @param {Array} array The array to shuffle.
4126     * @returns {Array} Returns the new shuffled array.
4127     */function arrayShuffle(array){return shuffleSelf(copyArray(array));}/**
4128     * This function is like `assignValue` except that it doesn't assign
4129     * `undefined` values.
4130     *
4131     * @private
4132     * @param {Object} object The object to modify.
4133     * @param {string} key The key of the property to assign.
4134     * @param {*} value The value to assign.
4135     */function assignMergeValue(object,key,value){if(value!==undefined&&!eq(object[key],value)||value===undefined&&!(key in object)){baseAssignValue(object,key,value);}}/**
4136     * Assigns `value` to `key` of `object` if the existing value is not equivalent
4137     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4138     * for equality comparisons.
4139     *
4140     * @private
4141     * @param {Object} object The object to modify.
4142     * @param {string} key The key of the property to assign.
4143     * @param {*} value The value to assign.
4144     */function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){baseAssignValue(object,key,value);}}/**
4145     * Gets the index at which the `key` is found in `array` of key-value pairs.
4146     *
4147     * @private
4148     * @param {Array} array The array to inspect.
4149     * @param {*} key The key to search for.
4150     * @returns {number} Returns the index of the matched value, else `-1`.
4151     */function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length;}}return-1;}/**
4152     * Aggregates elements of `collection` on `accumulator` with keys transformed
4153     * by `iteratee` and values set by `setter`.
4154     *
4155     * @private
4156     * @param {Array|Object} collection The collection to iterate over.
4157     * @param {Function} setter The function to set `accumulator` values.
4158     * @param {Function} iteratee The iteratee to transform keys.
4159     * @param {Object} accumulator The initial aggregated object.
4160     * @returns {Function} Returns `accumulator`.
4161     */function baseAggregator(collection,setter,iteratee,accumulator){baseEach(collection,function(value,key,collection){setter(accumulator,value,iteratee(value),collection);});return accumulator;}/**
4162     * The base implementation of `_.assign` without support for multiple sources
4163     * or `customizer` functions.
4164     *
4165     * @private
4166     * @param {Object} object The destination object.
4167     * @param {Object} source The source object.
4168     * @returns {Object} Returns `object`.
4169     */function baseAssign(object,source){return object&&copyObject(source,keys(source),object);}/**
4170     * The base implementation of `_.assignIn` without support for multiple sources
4171     * or `customizer` functions.
4172     *
4173     * @private
4174     * @param {Object} object The destination object.
4175     * @param {Object} source The source object.
4176     * @returns {Object} Returns `object`.
4177     */function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object);}/**
4178     * The base implementation of `assignValue` and `assignMergeValue` without
4179     * value checks.
4180     *
4181     * @private
4182     * @param {Object} object The object to modify.
4183     * @param {string} key The key of the property to assign.
4184     * @param {*} value The value to assign.
4185     */function baseAssignValue(object,key,value){if(key=='__proto__'&&defineProperty){defineProperty(object,key,{'configurable':true,'enumerable':true,'value':value,'writable':true});}else{object[key]=value;}}/**
4186     * The base implementation of `_.at` without support for individual paths.
4187     *
4188     * @private
4189     * @param {Object} object The object to iterate over.
4190     * @param {string[]} paths The property paths to pick.
4191     * @returns {Array} Returns the picked elements.
4192     */function baseAt(object,paths){var index=-1,length=paths.length,result=Array(length),skip=object==null;while(++index<length){result[index]=skip?undefined:get(object,paths[index]);}return result;}/**
4193     * The base implementation of `_.clamp` which doesn't coerce arguments.
4194     *
4195     * @private
4196     * @param {number} number The number to clamp.
4197     * @param {number} [lower] The lower bound.
4198     * @param {number} upper The upper bound.
4199     * @returns {number} Returns the clamped number.
4200     */function baseClamp(number,lower,upper){if(number===number){if(upper!==undefined){number=number<=upper?number:upper;}if(lower!==undefined){number=number>=lower?number:lower;}}return number;}/**
4201     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4202     * traversed objects.
4203     *
4204     * @private
4205     * @param {*} value The value to clone.
4206     * @param {boolean} bitmask The bitmask flags.
4207     *  1 - Deep clone
4208     *  2 - Flatten inherited properties
4209     *  4 - Clone symbols
4210     * @param {Function} [customizer] The function to customize cloning.
4211     * @param {string} [key] The key of `value`.
4212     * @param {Object} [object] The parent object of `value`.
4213     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4214     * @returns {*} Returns the cloned value.
4215     */function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value);}if(result!==undefined){return result;}if(!isObject(value)){return value;}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result);}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep);}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value));}}else{if(!cloneableTags[tag]){return object?value:{};}result=initCloneByTag(value,tag,isDeep);}}// Check for circular references and return its corresponding clone.
4216stack||(stack=new Stack());var stacked=stack.get(value);if(stacked){return stacked;}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack));});}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack));});}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key];}// Recursively populate clone (susceptible to call stack limits).
4217assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack));});return result;}/**
4218     * The base implementation of `_.conforms` which doesn't clone `source`.
4219     *
4220     * @private
4221     * @param {Object} source The object of property predicates to conform to.
4222     * @returns {Function} Returns the new spec function.
4223     */function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props);};}/**
4224     * The base implementation of `_.conformsTo` which accepts `props` to check.
4225     *
4226     * @private
4227     * @param {Object} object The object to inspect.
4228     * @param {Object} source The object of property predicates to conform to.
4229     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
4230     */function baseConformsTo(object,source,props){var length=props.length;if(object==null){return!length;}object=Object(object);while(length--){var key=props[length],predicate=source[key],value=object[key];if(value===undefined&&!(key in object)||!predicate(value)){return false;}}return true;}/**
4231     * The base implementation of `_.delay` and `_.defer` which accepts `args`
4232     * to provide to `func`.
4233     *
4234     * @private
4235     * @param {Function} func The function to delay.
4236     * @param {number} wait The number of milliseconds to delay invocation.
4237     * @param {Array} args The arguments to provide to `func`.
4238     * @returns {number|Object} Returns the timer id or timeout object.
4239     */function baseDelay(func,wait,args){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return setTimeout(function(){func.apply(undefined,args);},wait);}/**
4240     * The base implementation of methods like `_.difference` without support
4241     * for excluding multiple arrays or iteratee shorthands.
4242     *
4243     * @private
4244     * @param {Array} array The array to inspect.
4245     * @param {Array} values The values to exclude.
4246     * @param {Function} [iteratee] The iteratee invoked per element.
4247     * @param {Function} [comparator] The comparator invoked per element.
4248     * @returns {Array} Returns the new array of filtered values.
4249     */function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=true,length=array.length,result=[],valuesLength=values.length;if(!length){return result;}if(iteratee){values=arrayMap(values,baseUnary(iteratee));}if(comparator){includes=arrayIncludesWith;isCommon=false;}else if(values.length>=LARGE_ARRAY_SIZE){includes=cacheHas;isCommon=false;values=new SetCache(values);}outer:while(++index<length){var value=array[index],computed=iteratee==null?value:iteratee(value);value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===computed){continue outer;}}result.push(value);}else if(!includes(values,computed,comparator)){result.push(value);}}return result;}/**
4250     * The base implementation of `_.forEach` without support for iteratee shorthands.
4251     *
4252     * @private
4253     * @param {Array|Object} collection The collection to iterate over.
4254     * @param {Function} iteratee The function invoked per iteration.
4255     * @returns {Array|Object} Returns `collection`.
4256     */var baseEach=createBaseEach(baseForOwn);/**
4257     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
4258     *
4259     * @private
4260     * @param {Array|Object} collection The collection to iterate over.
4261     * @param {Function} iteratee The function invoked per iteration.
4262     * @returns {Array|Object} Returns `collection`.
4263     */var baseEachRight=createBaseEach(baseForOwnRight,true);/**
4264     * The base implementation of `_.every` without support for iteratee shorthands.
4265     *
4266     * @private
4267     * @param {Array|Object} collection The collection to iterate over.
4268     * @param {Function} predicate The function invoked per iteration.
4269     * @returns {boolean} Returns `true` if all elements pass the predicate check,
4270     *  else `false`
4271     */function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result;});return result;}/**
4272     * The base implementation of methods like `_.max` and `_.min` which accepts a
4273     * `comparator` to determine the extremum value.
4274     *
4275     * @private
4276     * @param {Array} array The array to iterate over.
4277     * @param {Function} iteratee The iteratee invoked per iteration.
4278     * @param {Function} comparator The comparator used to compare values.
4279     * @returns {*} Returns the extremum value.
4280     */function baseExtremum(array,iteratee,comparator){var index=-1,length=array.length;while(++index<length){var value=array[index],current=iteratee(value);if(current!=null&&(computed===undefined?current===current&&!isSymbol(current):comparator(current,computed))){var computed=current,result=value;}}return result;}/**
4281     * The base implementation of `_.fill` without an iteratee call guard.
4282     *
4283     * @private
4284     * @param {Array} array The array to fill.
4285     * @param {*} value The value to fill `array` with.
4286     * @param {number} [start=0] The start position.
4287     * @param {number} [end=array.length] The end position.
4288     * @returns {Array} Returns `array`.
4289     */function baseFill(array,value,start,end){var length=array.length;start=toInteger(start);if(start<0){start=-start>length?0:length+start;}end=end===undefined||end>length?length:toInteger(end);if(end<0){end+=length;}end=start>end?0:toLength(end);while(start<end){array[start++]=value;}return array;}/**
4290     * The base implementation of `_.filter` without support for iteratee shorthands.
4291     *
4292     * @private
4293     * @param {Array|Object} collection The collection to iterate over.
4294     * @param {Function} predicate The function invoked per iteration.
4295     * @returns {Array} Returns the new filtered array.
4296     */function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value);}});return result;}/**
4297     * The base implementation of `_.flatten` with support for restricting flattening.
4298     *
4299     * @private
4300     * @param {Array} array The array to flatten.
4301     * @param {number} depth The maximum recursion depth.
4302     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
4303     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
4304     * @param {Array} [result=[]] The initial result value.
4305     * @returns {Array} Returns the new flattened array.
4306     */function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(depth>0&&predicate(value)){if(depth>1){// Recursively flatten arrays (susceptible to call stack limits).
4307baseFlatten(value,depth-1,predicate,isStrict,result);}else{arrayPush(result,value);}}else if(!isStrict){result[result.length]=value;}}return result;}/**
4308     * The base implementation of `baseForOwn` which iterates over `object`
4309     * properties returned by `keysFunc` and invokes `iteratee` for each property.
4310     * Iteratee functions may exit iteration early by explicitly returning `false`.
4311     *
4312     * @private
4313     * @param {Object} object The object to iterate over.
4314     * @param {Function} iteratee The function invoked per iteration.
4315     * @param {Function} keysFunc The function to get the keys of `object`.
4316     * @returns {Object} Returns `object`.
4317     */var baseFor=createBaseFor();/**
4318     * This function is like `baseFor` except that it iterates over properties
4319     * in the opposite order.
4320     *
4321     * @private
4322     * @param {Object} object The object to iterate over.
4323     * @param {Function} iteratee The function invoked per iteration.
4324     * @param {Function} keysFunc The function to get the keys of `object`.
4325     * @returns {Object} Returns `object`.
4326     */var baseForRight=createBaseFor(true);/**
4327     * The base implementation of `_.forOwn` without support for iteratee shorthands.
4328     *
4329     * @private
4330     * @param {Object} object The object to iterate over.
4331     * @param {Function} iteratee The function invoked per iteration.
4332     * @returns {Object} Returns `object`.
4333     */function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys);}/**
4334     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
4335     *
4336     * @private
4337     * @param {Object} object The object to iterate over.
4338     * @param {Function} iteratee The function invoked per iteration.
4339     * @returns {Object} Returns `object`.
4340     */function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys);}/**
4341     * The base implementation of `_.functions` which creates an array of
4342     * `object` function property names filtered from `props`.
4343     *
4344     * @private
4345     * @param {Object} object The object to inspect.
4346     * @param {Array} props The property names to filter.
4347     * @returns {Array} Returns the function names.
4348     */function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key]);});}/**
4349     * The base implementation of `_.get` without support for default values.
4350     *
4351     * @private
4352     * @param {Object} object The object to query.
4353     * @param {Array|string} path The path of the property to get.
4354     * @returns {*} Returns the resolved value.
4355     */function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])];}return index&&index==length?object:undefined;}/**
4356     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4357     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4358     * symbols of `object`.
4359     *
4360     * @private
4361     * @param {Object} object The object to query.
4362     * @param {Function} keysFunc The function to get the keys of `object`.
4363     * @param {Function} symbolsFunc The function to get the symbols of `object`.
4364     * @returns {Array} Returns the array of property names and symbols.
4365     */function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object));}/**
4366     * The base implementation of `getTag` without fallbacks for buggy environments.
4367     *
4368     * @private
4369     * @param {*} value The value to query.
4370     * @returns {string} Returns the `toStringTag`.
4371     */function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag;}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value);}/**
4372     * The base implementation of `_.gt` which doesn't coerce arguments.
4373     *
4374     * @private
4375     * @param {*} value The value to compare.
4376     * @param {*} other The other value to compare.
4377     * @returns {boolean} Returns `true` if `value` is greater than `other`,
4378     *  else `false`.
4379     */function baseGt(value,other){return value>other;}/**
4380     * The base implementation of `_.has` without support for deep paths.
4381     *
4382     * @private
4383     * @param {Object} [object] The object to query.
4384     * @param {Array|string} key The key to check.
4385     * @returns {boolean} Returns `true` if `key` exists, else `false`.
4386     */function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key);}/**
4387     * The base implementation of `_.hasIn` without support for deep paths.
4388     *
4389     * @private
4390     * @param {Object} [object] The object to query.
4391     * @param {Array|string} key The key to check.
4392     * @returns {boolean} Returns `true` if `key` exists, else `false`.
4393     */function baseHasIn(object,key){return object!=null&&key in Object(object);}/**
4394     * The base implementation of `_.inRange` which doesn't coerce arguments.
4395     *
4396     * @private
4397     * @param {number} number The number to check.
4398     * @param {number} start The start of the range.
4399     * @param {number} end The end of the range.
4400     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
4401     */function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end);}/**
4402     * The base implementation of methods like `_.intersection`, without support
4403     * for iteratee shorthands, that accepts an array of arrays to inspect.
4404     *
4405     * @private
4406     * @param {Array} arrays The arrays to inspect.
4407     * @param {Function} [iteratee] The iteratee invoked per element.
4408     * @param {Function} [comparator] The comparator invoked per element.
4409     * @returns {Array} Returns the new array of shared values.
4410     */function baseIntersection(arrays,iteratee,comparator){var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=Infinity,result=[];while(othIndex--){var array=arrays[othIndex];if(othIndex&&iteratee){array=arrayMap(array,baseUnary(iteratee));}maxLength=nativeMin(array.length,maxLength);caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined;}array=arrays[0];var index=-1,seen=caches[0];outer:while(++index<length&&result.length<maxLength){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){othIndex=othLength;while(--othIndex){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator))){continue outer;}}if(seen){seen.push(computed);}result.push(value);}}return result;}/**
4411     * The base implementation of `_.invert` and `_.invertBy` which inverts
4412     * `object` with values transformed by `iteratee` and set by `setter`.
4413     *
4414     * @private
4415     * @param {Object} object The object to iterate over.
4416     * @param {Function} setter The function to set `accumulator` values.
4417     * @param {Function} iteratee The iteratee to transform values.
4418     * @param {Object} accumulator The initial inverted object.
4419     * @returns {Function} Returns `accumulator`.
4420     */function baseInverter(object,setter,iteratee,accumulator){baseForOwn(object,function(value,key,object){setter(accumulator,iteratee(value),key,object);});return accumulator;}/**
4421     * The base implementation of `_.invoke` without support for individual
4422     * method arguments.
4423     *
4424     * @private
4425     * @param {Object} object The object to query.
4426     * @param {Array|string} path The path of the method to invoke.
4427     * @param {Array} args The arguments to invoke the method with.
4428     * @returns {*} Returns the result of the invoked method.
4429     */function baseInvoke(object,path,args){path=castPath(path,object);object=parent(object,path);var func=object==null?object:object[toKey(last(path))];return func==null?undefined:apply(func,object,args);}/**
4430     * The base implementation of `_.isArguments`.
4431     *
4432     * @private
4433     * @param {*} value The value to check.
4434     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4435     */function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag;}/**
4436     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
4437     *
4438     * @private
4439     * @param {*} value The value to check.
4440     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
4441     */function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag;}/**
4442     * The base implementation of `_.isDate` without Node.js optimizations.
4443     *
4444     * @private
4445     * @param {*} value The value to check.
4446     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
4447     */function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag;}/**
4448     * The base implementation of `_.isEqual` which supports partial comparisons
4449     * and tracks traversed objects.
4450     *
4451     * @private
4452     * @param {*} value The value to compare.
4453     * @param {*} other The other value to compare.
4454     * @param {boolean} bitmask The bitmask flags.
4455     *  1 - Unordered comparison
4456     *  2 - Partial comparison
4457     * @param {Function} [customizer] The function to customize comparisons.
4458     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
4459     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4460     */function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true;}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other;}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack);}/**
4461     * A specialized version of `baseIsEqual` for arrays and objects which performs
4462     * deep comparisons and tracks traversed objects enabling objects with circular
4463     * references to be compared.
4464     *
4465     * @private
4466     * @param {Object} object The object to compare.
4467     * @param {Object} other The other object to compare.
4468     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4469     * @param {Function} customizer The function to customize comparisons.
4470     * @param {Function} equalFunc The function to determine equivalents of values.
4471     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4472     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4473     */function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false;}objIsArr=true;objIsObj=false;}if(isSameTag&&!objIsObj){stack||(stack=new Stack());return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack);}if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,'__wrapped__'),othIsWrapped=othIsObj&&hasOwnProperty.call(other,'__wrapped__');if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack());return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack);}}if(!isSameTag){return false;}stack||(stack=new Stack());return equalObjects(object,other,bitmask,customizer,equalFunc,stack);}/**
4474     * The base implementation of `_.isMap` without Node.js optimizations.
4475     *
4476     * @private
4477     * @param {*} value The value to check.
4478     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
4479     */function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag;}/**
4480     * The base implementation of `_.isMatch` without support for iteratee shorthands.
4481     *
4482     * @private
4483     * @param {Object} object The object to inspect.
4484     * @param {Object} source The object of property values to match.
4485     * @param {Array} matchData The property names, values, and compare flags to match.
4486     * @param {Function} [customizer] The function to customize comparisons.
4487     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
4488     */function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length;}object=Object(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false;}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false;}}else{var stack=new Stack();if(customizer){var result=customizer(objValue,srcValue,key,object,source,stack);}if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result)){return false;}}}return true;}/**
4489     * The base implementation of `_.isNative` without bad shim checks.
4490     *
4491     * @private
4492     * @param {*} value The value to check.
4493     * @returns {boolean} Returns `true` if `value` is a native function,
4494     *  else `false`.
4495     */function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false;}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value));}/**
4496     * The base implementation of `_.isRegExp` without Node.js optimizations.
4497     *
4498     * @private
4499     * @param {*} value The value to check.
4500     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
4501     */function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag;}/**
4502     * The base implementation of `_.isSet` without Node.js optimizations.
4503     *
4504     * @private
4505     * @param {*} value The value to check.
4506     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
4507     */function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag;}/**
4508     * The base implementation of `_.isTypedArray` without Node.js optimizations.
4509     *
4510     * @private
4511     * @param {*} value The value to check.
4512     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4513     */function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)];}/**
4514     * The base implementation of `_.iteratee`.
4515     *
4516     * @private
4517     * @param {*} [value=_.identity] The value to convert to an iteratee.
4518     * @returns {Function} Returns the iteratee.
4519     */function baseIteratee(value){// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
4520// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
4521if(typeof value=='function'){return value;}if(value==null){return identity;}if(_typeof(value)=='object'){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value);}return property(value);}/**
4522     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4523     *
4524     * @private
4525     * @param {Object} object The object to query.
4526     * @returns {Array} Returns the array of property names.
4527     */function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object);}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!='constructor'){result.push(key);}}return result;}/**
4528     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
4529     *
4530     * @private
4531     * @param {Object} object The object to query.
4532     * @returns {Array} Returns the array of property names.
4533     */function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object);}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=='constructor'&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key);}}return result;}/**
4534     * The base implementation of `_.lt` which doesn't coerce arguments.
4535     *
4536     * @private
4537     * @param {*} value The value to compare.
4538     * @param {*} other The other value to compare.
4539     * @returns {boolean} Returns `true` if `value` is less than `other`,
4540     *  else `false`.
4541     */function baseLt(value,other){return value<other;}/**
4542     * The base implementation of `_.map` without support for iteratee shorthands.
4543     *
4544     * @private
4545     * @param {Array|Object} collection The collection to iterate over.
4546     * @param {Function} iteratee The function invoked per iteration.
4547     * @returns {Array} Returns the new mapped array.
4548     */function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection);});return result;}/**
4549     * The base implementation of `_.matches` which doesn't clone `source`.
4550     *
4551     * @private
4552     * @param {Object} source The object of property values to match.
4553     * @returns {Function} Returns the new spec function.
4554     */function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1]);}return function(object){return object===source||baseIsMatch(object,source,matchData);};}/**
4555     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
4556     *
4557     * @private
4558     * @param {string} path The path of the property to get.
4559     * @param {*} srcValue The value to match.
4560     * @returns {Function} Returns the new spec function.
4561     */function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue);}return function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG);};}/**
4562     * The base implementation of `_.merge` without support for multiple sources.
4563     *
4564     * @private
4565     * @param {Object} object The destination object.
4566     * @param {Object} source The source object.
4567     * @param {number} srcIndex The index of `source`.
4568     * @param {Function} [customizer] The function to customize merged values.
4569     * @param {Object} [stack] Tracks traversed source values and their merged
4570     *  counterparts.
4571     */function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return;}baseFor(source,function(srcValue,key){stack||(stack=new Stack());if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);}else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+'',object,source,stack):undefined;if(newValue===undefined){newValue=srcValue;}assignMergeValue(object,key,newValue);}},keysIn);}/**
4572     * A specialized version of `baseMerge` for arrays and objects which performs
4573     * deep merges and tracks traversed objects enabling objects with circular
4574     * references to be merged.
4575     *
4576     * @private
4577     * @param {Object} object The destination object.
4578     * @param {Object} source The source object.
4579     * @param {string} key The key of the value to merge.
4580     * @param {number} srcIndex The index of `source`.
4581     * @param {Function} mergeFunc The function to merge values.
4582     * @param {Function} [customizer] The function to customize assigned values.
4583     * @param {Object} [stack] Tracks traversed source values and their merged
4584     *  counterparts.
4585     */function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return;}var newValue=customizer?customizer(objValue,srcValue,key+'',object,source,stack):undefined;var isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue;}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue);}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true);}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true);}else{newValue=[];}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue);}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue);}}else{isCommon=false;}}if(isCommon){// Recursively merge objects and arrays (susceptible to call stack limits).
4586stack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack['delete'](srcValue);}assignMergeValue(object,key,newValue);}/**
4587     * The base implementation of `_.nth` which doesn't coerce arguments.
4588     *
4589     * @private
4590     * @param {Array} array The array to query.
4591     * @param {number} n The index of the element to return.
4592     * @returns {*} Returns the nth element of `array`.
4593     */function baseNth(array,n){var length=array.length;if(!length){return;}n+=n<0?length:0;return isIndex(n,length)?array[n]:undefined;}/**
4594     * The base implementation of `_.orderBy` without param guards.
4595     *
4596     * @private
4597     * @param {Array|Object} collection The collection to iterate over.
4598     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
4599     * @param {string[]} orders The sort orders of `iteratees`.
4600     * @returns {Array} Returns the new sorted array.
4601     */function baseOrderBy(collection,iteratees,orders){if(iteratees.length){iteratees=arrayMap(iteratees,function(iteratee){if(isArray(iteratee)){return function(value){return baseGet(value,iteratee.length===1?iteratee[0]:iteratee);};}return iteratee;});}else{iteratees=[identity];}var index=-1;iteratees=arrayMap(iteratees,baseUnary(getIteratee()));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value);});return{'criteria':criteria,'index':++index,'value':value};});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders);});}/**
4602     * The base implementation of `_.pick` without support for individual
4603     * property identifiers.
4604     *
4605     * @private
4606     * @param {Object} object The source object.
4607     * @param {string[]} paths The property paths to pick.
4608     * @returns {Object} Returns the new object.
4609     */function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path);});}/**
4610     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
4611     *
4612     * @private
4613     * @param {Object} object The source object.
4614     * @param {string[]} paths The property paths to pick.
4615     * @param {Function} predicate The function invoked per property.
4616     * @returns {Object} Returns the new object.
4617     */function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value);}}return result;}/**
4618     * A specialized version of `baseProperty` which supports deep paths.
4619     *
4620     * @private
4621     * @param {Array|string} path The path of the property to get.
4622     * @returns {Function} Returns the new accessor function.
4623     */function basePropertyDeep(path){return function(object){return baseGet(object,path);};}/**
4624     * The base implementation of `_.pullAllBy` without support for iteratee
4625     * shorthands.
4626     *
4627     * @private
4628     * @param {Array} array The array to modify.
4629     * @param {Array} values The values to remove.
4630     * @param {Function} [iteratee] The iteratee invoked per element.
4631     * @param {Function} [comparator] The comparator invoked per element.
4632     * @returns {Array} Returns `array`.
4633     */function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;if(array===values){values=copyArray(values);}if(iteratee){seen=arrayMap(array,baseUnary(iteratee));}while(++index<length){var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;while((fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1){if(seen!==array){splice.call(seen,fromIndex,1);}splice.call(array,fromIndex,1);}}return array;}/**
4634     * The base implementation of `_.pullAt` without support for individual
4635     * indexes or capturing the removed elements.
4636     *
4637     * @private
4638     * @param {Array} array The array to modify.
4639     * @param {number[]} indexes The indexes of elements to remove.
4640     * @returns {Array} Returns `array`.
4641     */function basePullAt(array,indexes){var length=array?indexes.length:0,lastIndex=length-1;while(length--){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;if(isIndex(index)){splice.call(array,index,1);}else{baseUnset(array,index);}}}return array;}/**
4642     * The base implementation of `_.random` without support for returning
4643     * floating-point numbers.
4644     *
4645     * @private
4646     * @param {number} lower The lower bound.
4647     * @param {number} upper The upper bound.
4648     * @returns {number} Returns the random number.
4649     */function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1));}/**
4650     * The base implementation of `_.range` and `_.rangeRight` which doesn't
4651     * coerce arguments.
4652     *
4653     * @private
4654     * @param {number} start The start of the range.
4655     * @param {number} end The end of the range.
4656     * @param {number} step The value to increment or decrement by.
4657     * @param {boolean} [fromRight] Specify iterating from right to left.
4658     * @returns {Array} Returns the range of numbers.
4659     */function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(length--){result[fromRight?length:++index]=start;start+=step;}return result;}/**
4660     * The base implementation of `_.repeat` which doesn't coerce arguments.
4661     *
4662     * @private
4663     * @param {string} string The string to repeat.
4664     * @param {number} n The number of times to repeat the string.
4665     * @returns {string} Returns the repeated string.
4666     */function baseRepeat(string,n){var result='';if(!string||n<1||n>MAX_SAFE_INTEGER){return result;}// Leverage the exponentiation by squaring algorithm for a faster repeat.
4667// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
4668do{if(n%2){result+=string;}n=nativeFloor(n/2);if(n){string+=string;}}while(n);return result;}/**
4669     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
4670     *
4671     * @private
4672     * @param {Function} func The function to apply a rest parameter to.
4673     * @param {number} [start=func.length-1] The start position of the rest parameter.
4674     * @returns {Function} Returns the new function.
4675     */function baseRest(func,start){return setToString(overRest(func,start,identity),func+'');}/**
4676     * The base implementation of `_.sample`.
4677     *
4678     * @private
4679     * @param {Array|Object} collection The collection to sample.
4680     * @returns {*} Returns the random element.
4681     */function baseSample(collection){return arraySample(values(collection));}/**
4682     * The base implementation of `_.sampleSize` without param guards.
4683     *
4684     * @private
4685     * @param {Array|Object} collection The collection to sample.
4686     * @param {number} n The number of elements to sample.
4687     * @returns {Array} Returns the random elements.
4688     */function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length));}/**
4689     * The base implementation of `_.set`.
4690     *
4691     * @private
4692     * @param {Object} object The object to modify.
4693     * @param {Array|string} path The path of the property to set.
4694     * @param {*} value The value to set.
4695     * @param {Function} [customizer] The function to customize path creation.
4696     * @returns {Object} Returns `object`.
4697     */function baseSet(object,path,value,customizer){if(!isObject(object)){return object;}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key==='__proto__'||key==='constructor'||key==='prototype'){return object;}if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined;if(newValue===undefined){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{};}}assignValue(nested,key,newValue);nested=nested[key];}return object;}/**
4698     * The base implementation of `setData` without support for hot loop shorting.
4699     *
4700     * @private
4701     * @param {Function} func The function to associate metadata with.
4702     * @param {*} data The metadata.
4703     * @returns {Function} Returns `func`.
4704     */var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func;};/**
4705     * The base implementation of `setToString` without support for hot loop shorting.
4706     *
4707     * @private
4708     * @param {Function} func The function to modify.
4709     * @param {Function} string The `toString` result.
4710     * @returns {Function} Returns `func`.
4711     */var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,'toString',{'configurable':true,'enumerable':false,'value':constant(string),'writable':true});};/**
4712     * The base implementation of `_.shuffle`.
4713     *
4714     * @private
4715     * @param {Array|Object} collection The collection to shuffle.
4716     * @returns {Array} Returns the new shuffled array.
4717     */function baseShuffle(collection){return shuffleSelf(values(collection));}/**
4718     * The base implementation of `_.slice` without an iteratee call guard.
4719     *
4720     * @private
4721     * @param {Array} array The array to slice.
4722     * @param {number} [start=0] The start position.
4723     * @param {number} [end=array.length] The end position.
4724     * @returns {Array} Returns the slice of `array`.
4725     */function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start;}end=end>length?length:end;if(end<0){end+=length;}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start];}return result;}/**
4726     * The base implementation of `_.some` without support for iteratee shorthands.
4727     *
4728     * @private
4729     * @param {Array|Object} collection The collection to iterate over.
4730     * @param {Function} predicate The function invoked per iteration.
4731     * @returns {boolean} Returns `true` if any element passes the predicate check,
4732     *  else `false`.
4733     */function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result;});return!!result;}/**
4734     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
4735     * performs a binary search of `array` to determine the index at which `value`
4736     * should be inserted into `array` in order to maintain its sort order.
4737     *
4738     * @private
4739     * @param {Array} array The sorted array to inspect.
4740     * @param {*} value The value to evaluate.
4741     * @param {boolean} [retHighest] Specify returning the highest qualified index.
4742     * @returns {number} Returns the index at which `value` should be inserted
4743     *  into `array`.
4744     */function baseSortedIndex(array,value,retHighest){var low=0,high=array==null?low:array.length;if(typeof value=='number'&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if(computed!==null&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)){low=mid+1;}else{high=mid;}}return high;}return baseSortedIndexBy(array,value,identity,retHighest);}/**
4745     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
4746     * which invokes `iteratee` for `value` and each element of `array` to compute
4747     * their sort ranking. The iteratee is invoked with one argument; (value).
4748     *
4749     * @private
4750     * @param {Array} array The sorted array to inspect.
4751     * @param {*} value The value to evaluate.
4752     * @param {Function} iteratee The iteratee invoked per element.
4753     * @param {boolean} [retHighest] Specify returning the highest qualified index.
4754     * @returns {number} Returns the index at which `value` should be inserted
4755     *  into `array`.
4756     */function baseSortedIndexBy(array,value,iteratee,retHighest){var low=0,high=array==null?0:array.length;if(high===0){return 0;}value=iteratee(value);var valIsNaN=value!==value,valIsNull=value===null,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined,othIsNull=computed===null,othIsReflexive=computed===computed,othIsSymbol=isSymbol(computed);if(valIsNaN){var setLow=retHighest||othIsReflexive;}else if(valIsUndefined){setLow=othIsReflexive&&(retHighest||othIsDefined);}else if(valIsNull){setLow=othIsReflexive&&othIsDefined&&(retHighest||!othIsNull);}else if(valIsSymbol){setLow=othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol);}else if(othIsNull||othIsSymbol){setLow=false;}else{setLow=retHighest?computed<=value:computed<value;}if(setLow){low=mid+1;}else{high=mid;}}return nativeMin(high,MAX_ARRAY_INDEX);}/**
4757     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
4758     * support for iteratee shorthands.
4759     *
4760     * @private
4761     * @param {Array} array The array to inspect.
4762     * @param {Function} [iteratee] The iteratee invoked per element.
4763     * @returns {Array} Returns the new duplicate free array.
4764     */function baseSortedUniq(array,iteratee){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=value===0?0:value;}}return result;}/**
4765     * The base implementation of `_.toNumber` which doesn't ensure correct
4766     * conversions of binary, hexadecimal, or octal string values.
4767     *
4768     * @private
4769     * @param {*} value The value to process.
4770     * @returns {number} Returns the number.
4771     */function baseToNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}return+value;}/**
4772     * The base implementation of `_.toString` which doesn't convert nullish
4773     * values to empty strings.
4774     *
4775     * @private
4776     * @param {*} value The value to process.
4777     * @returns {string} Returns the string.
4778     */function baseToString(value){// Exit early for strings to avoid a performance hit in some environments.
4779if(typeof value=='string'){return value;}if(isArray(value)){// Recursively convert values (susceptible to call stack limits).
4780return arrayMap(value,baseToString)+'';}if(isSymbol(value)){return symbolToString?symbolToString.call(value):'';}var result=value+'';return result=='0'&&1/value==-INFINITY?'-0':result;}/**
4781     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
4782     *
4783     * @private
4784     * @param {Array} array The array to inspect.
4785     * @param {Function} [iteratee] The iteratee invoked per element.
4786     * @param {Function} [comparator] The comparator invoked per element.
4787     * @returns {Array} Returns the new duplicate free array.
4788     */function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=true,result=[],seen=result;if(comparator){isCommon=false;includes=arrayIncludesWith;}else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set);}isCommon=false;includes=cacheHas;seen=new SetCache();}else{seen=iteratee?[]:result;}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer;}}if(iteratee){seen.push(computed);}result.push(value);}else if(!includes(seen,computed,comparator)){if(seen!==result){seen.push(computed);}result.push(value);}}return result;}/**
4789     * The base implementation of `_.unset`.
4790     *
4791     * @private
4792     * @param {Object} object The object to modify.
4793     * @param {Array|string} path The property path to unset.
4794     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
4795     */function baseUnset(object,path){path=castPath(path,object);object=parent(object,path);return object==null||delete object[toKey(last(path))];}/**
4796     * The base implementation of `_.update`.
4797     *
4798     * @private
4799     * @param {Object} object The object to modify.
4800     * @param {Array|string} path The path of the property to update.
4801     * @param {Function} updater The function to produce the updated value.
4802     * @param {Function} [customizer] The function to customize path creation.
4803     * @returns {Object} Returns `object`.
4804     */function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer);}/**
4805     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
4806     * without support for iteratee shorthands.
4807     *
4808     * @private
4809     * @param {Array} array The array to query.
4810     * @param {Function} predicate The function invoked per iteration.
4811     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
4812     * @param {boolean} [fromRight] Specify iterating from right to left.
4813     * @returns {Array} Returns the slice of `array`.
4814     */function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index);}/**
4815     * The base implementation of `wrapperValue` which returns the result of
4816     * performing a sequence of actions on the unwrapped `value`, where each
4817     * successive action is supplied the return value of the previous.
4818     *
4819     * @private
4820     * @param {*} value The unwrapped value.
4821     * @param {Array} actions Actions to perform to resolve the unwrapped value.
4822     * @returns {*} Returns the resolved value.
4823     */function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value();}return arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args));},result);}/**
4824     * The base implementation of methods like `_.xor`, without support for
4825     * iteratee shorthands, that accepts an array of arrays to inspect.
4826     *
4827     * @private
4828     * @param {Array} arrays The arrays to inspect.
4829     * @param {Function} [iteratee] The iteratee invoked per element.
4830     * @param {Function} [comparator] The comparator invoked per element.
4831     * @returns {Array} Returns the new array of values.
4832     */function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2){return length?baseUniq(arrays[0]):[];}var index=-1,result=Array(length);while(++index<length){var array=arrays[index],othIndex=-1;while(++othIndex<length){if(othIndex!=index){result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator);}}}return baseUniq(baseFlatten(result,1),iteratee,comparator);}/**
4833     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
4834     *
4835     * @private
4836     * @param {Array} props The property identifiers.
4837     * @param {Array} values The property values.
4838     * @param {Function} assignFunc The function to assign values.
4839     * @returns {Object} Returns the new object.
4840     */function baseZipObject(props,values,assignFunc){var index=-1,length=props.length,valsLength=values.length,result={};while(++index<length){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value);}return result;}/**
4841     * Casts `value` to an empty array if it's not an array like object.
4842     *
4843     * @private
4844     * @param {*} value The value to inspect.
4845     * @returns {Array|Object} Returns the cast array-like object.
4846     */function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[];}/**
4847     * Casts `value` to `identity` if it's not a function.
4848     *
4849     * @private
4850     * @param {*} value The value to inspect.
4851     * @returns {Function} Returns cast function.
4852     */function castFunction(value){return typeof value=='function'?value:identity;}/**
4853     * Casts `value` to a path array if it's not one.
4854     *
4855     * @private
4856     * @param {*} value The value to inspect.
4857     * @param {Object} [object] The object to query keys on.
4858     * @returns {Array} Returns the cast property path array.
4859     */function castPath(value,object){if(isArray(value)){return value;}return isKey(value,object)?[value]:stringToPath(toString(value));}/**
4860     * A `baseRest` alias which can be replaced with `identity` by module
4861     * replacement plugins.
4862     *
4863     * @private
4864     * @type {Function}
4865     * @param {Function} func The function to apply a rest parameter to.
4866     * @returns {Function} Returns the new function.
4867     */var castRest=baseRest;/**
4868     * Casts `array` to a slice if it's needed.
4869     *
4870     * @private
4871     * @param {Array} array The array to inspect.
4872     * @param {number} start The start position.
4873     * @param {number} [end=array.length] The end position.
4874     * @returns {Array} Returns the cast slice.
4875     */function castSlice(array,start,end){var length=array.length;end=end===undefined?length:end;return!start&&end>=length?array:baseSlice(array,start,end);}/**
4876     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
4877     *
4878     * @private
4879     * @param {number|Object} id The timer id or timeout object of the timer to clear.
4880     */var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id);};/**
4881     * Creates a clone of  `buffer`.
4882     *
4883     * @private
4884     * @param {Buffer} buffer The buffer to clone.
4885     * @param {boolean} [isDeep] Specify a deep clone.
4886     * @returns {Buffer} Returns the cloned buffer.
4887     */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice();}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result;}/**
4888     * Creates a clone of `arrayBuffer`.
4889     *
4890     * @private
4891     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
4892     * @returns {ArrayBuffer} Returns the cloned array buffer.
4893     */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result;}/**
4894     * Creates a clone of `dataView`.
4895     *
4896     * @private
4897     * @param {Object} dataView The data view to clone.
4898     * @param {boolean} [isDeep] Specify a deep clone.
4899     * @returns {Object} Returns the cloned data view.
4900     */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength);}/**
4901     * Creates a clone of `regexp`.
4902     *
4903     * @private
4904     * @param {Object} regexp The regexp to clone.
4905     * @returns {Object} Returns the cloned regexp.
4906     */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result;}/**
4907     * Creates a clone of the `symbol` object.
4908     *
4909     * @private
4910     * @param {Object} symbol The symbol object to clone.
4911     * @returns {Object} Returns the cloned symbol object.
4912     */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{};}/**
4913     * Creates a clone of `typedArray`.
4914     *
4915     * @private
4916     * @param {Object} typedArray The typed array to clone.
4917     * @param {boolean} [isDeep] Specify a deep clone.
4918     * @returns {Object} Returns the cloned typed array.
4919     */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length);}/**
4920     * Compares values to sort them in ascending order.
4921     *
4922     * @private
4923     * @param {*} value The value to compare.
4924     * @param {*} other The other value to compare.
4925     * @returns {number} Returns the sort order indicator for `value`.
4926     */function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=value===null,valIsReflexive=value===value,valIsSymbol=isSymbol(value);var othIsDefined=other!==undefined,othIsNull=other===null,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive){return 1;}if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive){return-1;}}return 0;}/**
4927     * Used by `_.orderBy` to compare multiple properties of a value to another
4928     * and stable sort them.
4929     *
4930     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
4931     * specify an order of "desc" for descending or "asc" for ascending sort order
4932     * of corresponding values.
4933     *
4934     * @private
4935     * @param {Object} object The object to compare.
4936     * @param {Object} other The other object to compare.
4937     * @param {boolean[]|string[]} orders The order to sort by for each property.
4938     * @returns {number} Returns the sort order indicator for `object`.
4939     */function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result;}var order=orders[index];return result*(order=='desc'?-1:1);}}// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
4940// that causes it, under certain circumstances, to provide the same value for
4941// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
4942// for more details.
4943//
4944// This also ensures a stable sort in V8 and other engines.
4945// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
4946return object.index-other.index;}/**
4947     * Creates an array that is the composition of partially applied arguments,
4948     * placeholders, and provided arguments into a single array of arguments.
4949     *
4950     * @private
4951     * @param {Array} args The provided arguments.
4952     * @param {Array} partials The arguments to prepend to those provided.
4953     * @param {Array} holders The `partials` placeholder indexes.
4954     * @params {boolean} [isCurried] Specify composing for a curried function.
4955     * @returns {Array} Returns the new array of composed arguments.
4956     */function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex];}while(++argsIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[holders[argsIndex]]=args[argsIndex];}}while(rangeLength--){result[leftIndex++]=args[argsIndex++];}return result;}/**
4957     * This function is like `composeArgs` except that the arguments composition
4958     * is tailored for `_.partialRight`.
4959     *
4960     * @private
4961     * @param {Array} args The provided arguments.
4962     * @param {Array} partials The arguments to append to those provided.
4963     * @param {Array} holders The `partials` placeholder indexes.
4964     * @params {boolean} [isCurried] Specify composing for a curried function.
4965     * @returns {Array} Returns the new array of composed arguments.
4966     */function composeArgsRight(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;while(++argsIndex<rangeLength){result[argsIndex]=args[argsIndex];}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex];}while(++holdersIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[offset+holders[holdersIndex]]=args[argsIndex++];}}return result;}/**
4967     * Copies the values of `source` to `array`.
4968     *
4969     * @private
4970     * @param {Array} source The array to copy values from.
4971     * @param {Array} [array=[]] The array to copy values to.
4972     * @returns {Array} Returns `array`.
4973     */function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index];}return array;}/**
4974     * Copies properties of `source` to `object`.
4975     *
4976     * @private
4977     * @param {Object} source The object to copy properties from.
4978     * @param {Array} props The property identifiers to copy.
4979     * @param {Object} [object={}] The object to copy properties to.
4980     * @param {Function} [customizer] The function to customize copied values.
4981     * @returns {Object} Returns `object`.
4982     */function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;if(newValue===undefined){newValue=source[key];}if(isNew){baseAssignValue(object,key,newValue);}else{assignValue(object,key,newValue);}}return object;}/**
4983     * Copies own symbols of `source` to `object`.
4984     *
4985     * @private
4986     * @param {Object} source The object to copy symbols from.
4987     * @param {Object} [object={}] The object to copy symbols to.
4988     * @returns {Object} Returns `object`.
4989     */function copySymbols(source,object){return copyObject(source,getSymbols(source),object);}/**
4990     * Copies own and inherited symbols of `source` to `object`.
4991     *
4992     * @private
4993     * @param {Object} source The object to copy symbols from.
4994     * @param {Object} [object={}] The object to copy symbols to.
4995     * @returns {Object} Returns `object`.
4996     */function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object);}/**
4997     * Creates a function like `_.groupBy`.
4998     *
4999     * @private
5000     * @param {Function} setter The function to set accumulator values.
5001     * @param {Function} [initializer] The accumulator object initializer.
5002     * @returns {Function} Returns the new aggregator function.
5003     */function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator);};}/**
5004     * Creates a function like `_.assign`.
5005     *
5006     * @private
5007     * @param {Function} assigner The function to assign values.
5008     * @returns {Function} Returns the new assigner function.
5009     */function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;customizer=assigner.length>3&&typeof customizer=='function'?(length--,customizer):undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1;}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer);}}return object;});}/**
5010     * Creates a `baseEach` or `baseEachRight` function.
5011     *
5012     * @private
5013     * @param {Function} eachFunc The function to iterate over a collection.
5014     * @param {boolean} [fromRight] Specify iterating from right to left.
5015     * @returns {Function} Returns the new base function.
5016     */function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection;}if(!isArrayLike(collection)){return eachFunc(collection,iteratee);}var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break;}}return collection;};}/**
5017     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
5018     *
5019     * @private
5020     * @param {boolean} [fromRight] Specify iterating from right to left.
5021     * @returns {Function} Returns the new base function.
5022     */function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===false){break;}}return object;};}/**
5023     * Creates a function that wraps `func` to invoke it with the optional `this`
5024     * binding of `thisArg`.
5025     *
5026     * @private
5027     * @param {Function} func The function to wrap.
5028     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5029     * @param {*} [thisArg] The `this` binding of `func`.
5030     * @returns {Function} Returns the new wrapped function.
5031     */function createBind(func,bitmask,thisArg){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,arguments);}return wrapper;}/**
5032     * Creates a function like `_.lowerFirst`.
5033     *
5034     * @private
5035     * @param {string} methodName The name of the `String` case method to use.
5036     * @returns {Function} Returns the new case function.
5037     */function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined;var chr=strSymbols?strSymbols[0]:string.charAt(0);var trailing=strSymbols?castSlice(strSymbols,1).join(''):string.slice(1);return chr[methodName]()+trailing;};}/**
5038     * Creates a function like `_.camelCase`.
5039     *
5040     * @private
5041     * @param {Function} callback The function to combine each word.
5042     * @returns {Function} Returns the new compounder function.
5043     */function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,'')),callback,'');};}/**
5044     * Creates a function that produces an instance of `Ctor` regardless of
5045     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
5046     *
5047     * @private
5048     * @param {Function} Ctor The constructor to wrap.
5049     * @returns {Function} Returns the new wrapped function.
5050     */function createCtor(Ctor){return function(){// Use a `switch` statement to work with class constructors. See
5051// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
5052// for more details.
5053var args=arguments;switch(args.length){case 0:return new Ctor();case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);// Mimic the constructor's `return` behavior.
5054// See https://es5.github.io/#x13.2.2 for more details.
5055return isObject(result)?result:thisBinding;};}/**
5056     * Creates a function that wraps `func` to enable currying.
5057     *
5058     * @private
5059     * @param {Function} func The function to wrap.
5060     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5061     * @param {number} arity The arity of `func`.
5062     * @returns {Function} Returns the new wrapped function.
5063     */function createCurry(func,bitmask,arity){var Ctor=createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);while(index--){args[index]=arguments[index];}var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);length-=holders.length;if(length<arity){return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined,args,holders,undefined,undefined,arity-length);}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn,this,args);}return wrapper;}/**
5064     * Creates a `_.find` or `_.findLast` function.
5065     *
5066     * @private
5067     * @param {Function} findIndexFunc The function to find the collection index.
5068     * @returns {Function} Returns the new find function.
5069     */function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection);predicate=function predicate(key){return iteratee(iterable[key],key,iterable);};}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined;};}/**
5070     * Creates a `_.flow` or `_.flowRight` function.
5071     *
5072     * @private
5073     * @param {boolean} [fromRight] Specify iterating from right to left.
5074     * @returns {Function} Returns the new flow function.
5075     */function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;if(fromRight){funcs.reverse();}while(index--){var func=funcs[index];if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(prereq&&!wrapper&&getFuncName(func)=='wrapper'){var wrapper=new LodashWrapper([],true);}}index=wrapper?index:length;while(++index<length){func=funcs[index];var funcName=getFuncName(func),data=funcName=='wrapper'?getData(func):undefined;if(data&&isLaziable(data[0])&&data[1]==(WRAP_ARY_FLAG|WRAP_CURRY_FLAG|WRAP_PARTIAL_FLAG|WRAP_REARG_FLAG)&&!data[4].length&&data[9]==1){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3]);}else{wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func);}}return function(){var args=arguments,value=args[0];if(wrapper&&args.length==1&&isArray(value)){return wrapper.plant(value).value();}var index=0,result=length?funcs[index].apply(this,args):value;while(++index<length){result=funcs[index].call(this,result);}return result;};});}/**
5076     * Creates a function that wraps `func` to invoke it with optional `this`
5077     * binding of `thisArg`, partial application, and currying.
5078     *
5079     * @private
5080     * @param {Function|string} func The function or method name to wrap.
5081     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5082     * @param {*} [thisArg] The `this` binding of `func`.
5083     * @param {Array} [partials] The arguments to prepend to those provided to
5084     *  the new function.
5085     * @param {Array} [holders] The `partials` placeholder indexes.
5086     * @param {Array} [partialsRight] The arguments to append to those provided
5087     *  to the new function.
5088     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
5089     * @param {Array} [argPos] The argument positions of the new function.
5090     * @param {number} [ary] The arity cap of `func`.
5091     * @param {number} [arity] The arity of `func`.
5092     * @returns {Function} Returns the new wrapped function.
5093     */function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&WRAP_ARY_FLAG,isBind=bitmask&WRAP_BIND_FLAG,isBindKey=bitmask&WRAP_BIND_KEY_FLAG,isCurried=bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?undefined:createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length;while(index--){args[index]=arguments[index];}if(isCurried){var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder);}if(partials){args=composeArgs(args,partials,holders,isCurried);}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight,isCurried);}length-=holdersCount;if(isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length);}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;length=args.length;if(argPos){args=reorder(args,argPos);}else if(isFlip&&length>1){args.reverse();}if(isAry&&ary<length){args.length=ary;}if(this&&this!==root&&this instanceof wrapper){fn=Ctor||createCtor(fn);}return fn.apply(thisBinding,args);}return wrapper;}/**
5094     * Creates a function like `_.invertBy`.
5095     *
5096     * @private
5097     * @param {Function} setter The function to set accumulator values.
5098     * @param {Function} toIteratee The function to resolve iteratees.
5099     * @returns {Function} Returns the new inverter function.
5100     */function createInverter(setter,toIteratee){return function(object,iteratee){return baseInverter(object,setter,toIteratee(iteratee),{});};}/**
5101     * Creates a function that performs a mathematical operation on two values.
5102     *
5103     * @private
5104     * @param {Function} operator The function to perform the operation.
5105     * @param {number} [defaultValue] The value used for `undefined` arguments.
5106     * @returns {Function} Returns the new mathematical operation function.
5107     */function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined&&other===undefined){return defaultValue;}if(value!==undefined){result=value;}if(other!==undefined){if(result===undefined){return other;}if(typeof value=='string'||typeof other=='string'){value=baseToString(value);other=baseToString(other);}else{value=baseToNumber(value);other=baseToNumber(other);}result=operator(value,other);}return result;};}/**
5108     * Creates a function like `_.over`.
5109     *
5110     * @private
5111     * @param {Function} arrayFunc The function to iterate over iteratees.
5112     * @returns {Function} Returns the new over function.
5113     */function createOver(arrayFunc){return flatRest(function(iteratees){iteratees=arrayMap(iteratees,baseUnary(getIteratee()));return baseRest(function(args){var thisArg=this;return arrayFunc(iteratees,function(iteratee){return apply(iteratee,thisArg,args);});});});}/**
5114     * Creates the padding for `string` based on `length`. The `chars` string
5115     * is truncated if the number of characters exceeds `length`.
5116     *
5117     * @private
5118     * @param {number} length The padding length.
5119     * @param {string} [chars=' '] The string used as padding.
5120     * @returns {string} Returns the padding for `string`.
5121     */function createPadding(length,chars){chars=chars===undefined?' ':baseToString(chars);var charsLength=chars.length;if(charsLength<2){return charsLength?baseRepeat(chars,length):chars;}var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(''):result.slice(0,length);}/**
5122     * Creates a function that wraps `func` to invoke it with the `this` binding
5123     * of `thisArg` and `partials` prepended to the arguments it receives.
5124     *
5125     * @private
5126     * @param {Function} func The function to wrap.
5127     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5128     * @param {*} thisArg The `this` binding of `func`.
5129     * @param {Array} partials The arguments to prepend to those provided to
5130     *  the new function.
5131     * @returns {Function} Returns the new wrapped function.
5132     */function createPartial(func,bitmask,thisArg,partials){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex];}while(argsLength--){args[leftIndex++]=arguments[++argsIndex];}return apply(fn,isBind?thisArg:this,args);}return wrapper;}/**
5133     * Creates a `_.range` or `_.rangeRight` function.
5134     *
5135     * @private
5136     * @param {boolean} [fromRight] Specify iterating from right to left.
5137     * @returns {Function} Returns the new range function.
5138     */function createRange(fromRight){return function(start,end,step){if(step&&typeof step!='number'&&isIterateeCall(start,end,step)){end=step=undefined;}// Ensure the sign of `-0` is preserved.
5139start=toFinite(start);if(end===undefined){end=start;start=0;}else{end=toFinite(end);}step=step===undefined?start<end?1:-1:toFinite(step);return baseRange(start,end,step,fromRight);};}/**
5140     * Creates a function that performs a relational operation on two values.
5141     *
5142     * @private
5143     * @param {Function} operator The function to perform the operation.
5144     * @returns {Function} Returns the new relational operation function.
5145     */function createRelationalOperation(operator){return function(value,other){if(!(typeof value=='string'&&typeof other=='string')){value=toNumber(value);other=toNumber(other);}return operator(value,other);};}/**
5146     * Creates a function that wraps `func` to continue currying.
5147     *
5148     * @private
5149     * @param {Function} func The function to wrap.
5150     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5151     * @param {Function} wrapFunc The function to create the `func` wrapper.
5152     * @param {*} placeholder The placeholder value.
5153     * @param {*} [thisArg] The `this` binding of `func`.
5154     * @param {Array} [partials] The arguments to prepend to those provided to
5155     *  the new function.
5156     * @param {Array} [holders] The `partials` placeholder indexes.
5157     * @param {Array} [argPos] The argument positions of the new function.
5158     * @param {number} [ary] The arity cap of `func`.
5159     * @param {number} [arity] The arity of `func`.
5160     * @returns {Function} Returns the new wrapped function.
5161     */function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG,newHolders=isCurry?holders:undefined,newHoldersRight=isCurry?undefined:holders,newPartials=isCurry?partials:undefined,newPartialsRight=isCurry?undefined:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG:WRAP_PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG:WRAP_PARTIAL_FLAG);if(!(bitmask&WRAP_CURRY_BOUND_FLAG)){bitmask&=~(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG);}var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity];var result=wrapFunc.apply(undefined,newData);if(isLaziable(func)){setData(result,newData);}result.placeholder=placeholder;return setWrapToString(result,func,bitmask);}/**
5162     * Creates a function like `_.round`.
5163     *
5164     * @private
5165     * @param {string} methodName The name of the `Math` method to use when rounding.
5166     * @returns {Function} Returns the new round function.
5167     */function createRound(methodName){var func=Math[methodName];return function(number,precision){number=toNumber(number);precision=precision==null?0:nativeMin(toInteger(precision),292);if(precision&&nativeIsFinite(number)){// Shift with exponential notation to avoid floating-point issues.
5168// See [MDN](https://mdn.io/round#Examples) for more details.
5169var pair=(toString(number)+'e').split('e'),value=func(pair[0]+'e'+(+pair[1]+precision));pair=(toString(value)+'e').split('e');return+(pair[0]+'e'+(+pair[1]-precision));}return func(number);};}/**
5170     * Creates a set object of `values`.
5171     *
5172     * @private
5173     * @param {Array} values The values to add to the set.
5174     * @returns {Object} Returns the new set.
5175     */var createSet=!(Set&&1/setToArray(new Set([,-0]))[1]==INFINITY)?noop:function(values){return new Set(values);};/**
5176     * Creates a `_.toPairs` or `_.toPairsIn` function.
5177     *
5178     * @private
5179     * @param {Function} keysFunc The function to get the keys of a given object.
5180     * @returns {Function} Returns the new pairs function.
5181     */function createToPairs(keysFunc){return function(object){var tag=getTag(object);if(tag==mapTag){return mapToArray(object);}if(tag==setTag){return setToPairs(object);}return baseToPairs(object,keysFunc(object));};}/**
5182     * Creates a function that either curries or invokes `func` with optional
5183     * `this` binding and partially applied arguments.
5184     *
5185     * @private
5186     * @param {Function|string} func The function or method name to wrap.
5187     * @param {number} bitmask The bitmask flags.
5188     *    1 - `_.bind`
5189     *    2 - `_.bindKey`
5190     *    4 - `_.curry` or `_.curryRight` of a bound function
5191     *    8 - `_.curry`
5192     *   16 - `_.curryRight`
5193     *   32 - `_.partial`
5194     *   64 - `_.partialRight`
5195     *  128 - `_.rearg`
5196     *  256 - `_.ary`
5197     *  512 - `_.flip`
5198     * @param {*} [thisArg] The `this` binding of `func`.
5199     * @param {Array} [partials] The arguments to be partially applied.
5200     * @param {Array} [holders] The `partials` placeholder indexes.
5201     * @param {Array} [argPos] The argument positions of the new function.
5202     * @param {number} [ary] The arity cap of `func`.
5203     * @param {number} [arity] The arity of `func`.
5204     * @returns {Function} Returns the new wrapped function.
5205     */function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}var length=partials?partials.length:0;if(!length){bitmask&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG);partials=holders=undefined;}ary=ary===undefined?ary:nativeMax(toInteger(ary),0);arity=arity===undefined?arity:toInteger(arity);length-=holders?holders.length:0;if(bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined;}var data=isBindKey?undefined:getData(func);var newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data);}func=newData[0];bitmask=newData[1];thisArg=newData[2];partials=newData[3];holders=newData[4];arity=newData[9]=newData[9]===undefined?isBindKey?0:func.length:nativeMax(newData[9]-length,0);if(!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)){bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG);}if(!bitmask||bitmask==WRAP_BIND_FLAG){var result=createBind(func,bitmask,thisArg);}else if(bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG){result=createCurry(func,bitmask,arity);}else if((bitmask==WRAP_PARTIAL_FLAG||bitmask==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG))&&!holders.length){result=createPartial(func,bitmask,thisArg,partials);}else{result=createHybrid.apply(undefined,newData);}var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask);}/**
5206     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
5207     * of source objects to the destination object for all destination properties
5208     * that resolve to `undefined`.
5209     *
5210     * @private
5211     * @param {*} objValue The destination value.
5212     * @param {*} srcValue The source value.
5213     * @param {string} key The key of the property to assign.
5214     * @param {Object} object The parent object of `objValue`.
5215     * @returns {*} Returns the value to assign.
5216     */function customDefaultsAssignIn(objValue,srcValue,key,object){if(objValue===undefined||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)){return srcValue;}return objValue;}/**
5217     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
5218     * objects into destination objects that are passed thru.
5219     *
5220     * @private
5221     * @param {*} objValue The destination value.
5222     * @param {*} srcValue The source value.
5223     * @param {string} key The key of the property to merge.
5224     * @param {Object} object The parent object of `objValue`.
5225     * @param {Object} source The parent object of `srcValue`.
5226     * @param {Object} [stack] Tracks traversed source values and their merged
5227     *  counterparts.
5228     * @returns {*} Returns the value to assign.
5229     */function customDefaultsMerge(objValue,srcValue,key,object,source,stack){if(isObject(objValue)&&isObject(srcValue)){// Recursively merge objects and arrays (susceptible to call stack limits).
5230stack.set(srcValue,objValue);baseMerge(objValue,srcValue,undefined,customDefaultsMerge,stack);stack['delete'](srcValue);}return objValue;}/**
5231     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
5232     * objects.
5233     *
5234     * @private
5235     * @param {*} value The value to inspect.
5236     * @param {string} key The key of the property to inspect.
5237     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
5238     */function customOmitClone(value){return isPlainObject(value)?undefined:value;}/**
5239     * A specialized version of `baseIsEqualDeep` for arrays with support for
5240     * partial deep comparisons.
5241     *
5242     * @private
5243     * @param {Array} array The array to compare.
5244     * @param {Array} other The other array to compare.
5245     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
5246     * @param {Function} customizer The function to customize comparisons.
5247     * @param {Function} equalFunc The function to determine equivalents of values.
5248     * @param {Object} stack Tracks traversed `array` and `other` objects.
5249     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
5250     */function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false;}// Check that cyclic values are equal.
5251var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array;}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache():undefined;stack.set(array,other);stack.set(other,array);// Ignore non-index properties.
5252while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);}if(compared!==undefined){if(compared){continue;}result=false;break;}// Recursively compare arrays (susceptible to call stack limits).
5253if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){return seen.push(othIndex);}})){result=false;break;}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break;}}stack['delete'](array);stack['delete'](other);return result;}/**
5254     * A specialized version of `baseIsEqualDeep` for comparing objects of
5255     * the same `toStringTag`.
5256     *
5257     * **Note:** This function only supports comparing values with tags of
5258     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
5259     *
5260     * @private
5261     * @param {Object} object The object to compare.
5262     * @param {Object} other The other object to compare.
5263     * @param {string} tag The `toStringTag` of the objects to compare.
5264     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
5265     * @param {Function} customizer The function to customize comparisons.
5266     * @param {Function} equalFunc The function to determine equivalents of values.
5267     * @param {Object} stack Tracks traversed `object` and `other` objects.
5268     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
5269     */function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false;}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false;}return true;case boolTag:case dateTag:case numberTag:// Coerce booleans to `1` or `0` and dates to milliseconds.
5270// Invalid dates are coerced to `NaN`.
5271return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:// Coerce regexes to strings and treat strings, primitives and objects,
5272// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
5273// for more details.
5274return object==other+'';case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false;}// Assume cyclic values are equal.
5275var stacked=stack.get(object);if(stacked){return stacked==other;}bitmask|=COMPARE_UNORDERED_FLAG;// Recursively compare objects (susceptible to call stack limits).
5276stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack['delete'](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other);}}return false;}/**
5277     * A specialized version of `baseIsEqualDeep` for objects with support for
5278     * partial deep comparisons.
5279     *
5280     * @private
5281     * @param {Object} object The object to compare.
5282     * @param {Object} other The other object to compare.
5283     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
5284     * @param {Function} customizer The function to customize comparisons.
5285     * @param {Function} equalFunc The function to determine equivalents of values.
5286     * @param {Object} stack Tracks traversed `object` and `other` objects.
5287     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
5288     */function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false;}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key))){return false;}}// Check that cyclic values are equal.
5289var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object;}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);}// Recursively compare objects (susceptible to call stack limits).
5290if(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break;}skipCtor||(skipCtor=key=='constructor');}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;// Non `Object` object instances with different constructors are not equal.
5291if(objCtor!=othCtor&&'constructor'in object&&'constructor'in other&&!(typeof objCtor=='function'&&objCtor instanceof objCtor&&typeof othCtor=='function'&&othCtor instanceof othCtor)){result=false;}}stack['delete'](object);stack['delete'](other);return result;}/**
5292     * A specialized version of `baseRest` which flattens the rest array.
5293     *
5294     * @private
5295     * @param {Function} func The function to apply a rest parameter to.
5296     * @returns {Function} Returns the new function.
5297     */function flatRest(func){return setToString(overRest(func,undefined,flatten),func+'');}/**
5298     * Creates an array of own enumerable property names and symbols of `object`.
5299     *
5300     * @private
5301     * @param {Object} object The object to query.
5302     * @returns {Array} Returns the array of property names and symbols.
5303     */function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols);}/**
5304     * Creates an array of own and inherited enumerable property names and
5305     * symbols of `object`.
5306     *
5307     * @private
5308     * @param {Object} object The object to query.
5309     * @returns {Array} Returns the array of property names and symbols.
5310     */function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn);}/**
5311     * Gets metadata for `func`.
5312     *
5313     * @private
5314     * @param {Function} func The function to query.
5315     * @returns {*} Returns the metadata for `func`.
5316     */var getData=!metaMap?noop:function(func){return metaMap.get(func);};/**
5317     * Gets the name of `func`.
5318     *
5319     * @private
5320     * @param {Function} func The function to query.
5321     * @returns {string} Returns the function name.
5322     */function getFuncName(func){var result=func.name+'',array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name;}}return result;}/**
5323     * Gets the argument placeholder value for `func`.
5324     *
5325     * @private
5326     * @param {Function} func The function to inspect.
5327     * @returns {*} Returns the placeholder value.
5328     */function getHolder(func){var object=hasOwnProperty.call(lodash,'placeholder')?lodash:func;return object.placeholder;}/**
5329     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
5330     * this function returns the custom method, otherwise it returns `baseIteratee`.
5331     * If arguments are provided, the chosen function is invoked with them and
5332     * its result is returned.
5333     *
5334     * @private
5335     * @param {*} [value] The value to convert to an iteratee.
5336     * @param {number} [arity] The arity of the created iteratee.
5337     * @returns {Function} Returns the chosen function or its result.
5338     */function getIteratee(){var result=lodash.iteratee||iteratee;result=result===iteratee?baseIteratee:result;return arguments.length?result(arguments[0],arguments[1]):result;}/**
5339     * Gets the data for `map`.
5340     *
5341     * @private
5342     * @param {Object} map The map to query.
5343     * @param {string} key The reference key.
5344     * @returns {*} Returns the map data.
5345     */function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=='string'?'string':'hash']:data.map;}/**
5346     * Gets the property names, values, and compare flags of `object`.
5347     *
5348     * @private
5349     * @param {Object} object The object to query.
5350     * @returns {Array} Returns the match data of `object`.
5351     */function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)];}return result;}/**
5352     * Gets the native function at `key` of `object`.
5353     *
5354     * @private
5355     * @param {Object} object The object to query.
5356     * @param {string} key The key of the method to get.
5357     * @returns {*} Returns the function if it's native, else `undefined`.
5358     */function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined;}/**
5359     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
5360     *
5361     * @private
5362     * @param {*} value The value to query.
5363     * @returns {string} Returns the raw `toStringTag`.
5364     */function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true;}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag;}else{delete value[symToStringTag];}}return result;}/**
5365     * Creates an array of the own enumerable symbols of `object`.
5366     *
5367     * @private
5368     * @param {Object} object The object to query.
5369     * @returns {Array} Returns the array of symbols.
5370     */var getSymbols=!nativeGetSymbols?stubArray:function(object){if(object==null){return[];}object=Object(object);return arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol);});};/**
5371     * Creates an array of the own and inherited enumerable symbols of `object`.
5372     *
5373     * @private
5374     * @param {Object} object The object to query.
5375     * @returns {Array} Returns the array of symbols.
5376     */var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object);}return result;};/**
5377     * Gets the `toStringTag` of `value`.
5378     *
5379     * @private
5380     * @param {*} value The value to query.
5381     * @returns {string} Returns the `toStringTag`.
5382     */var getTag=baseGetTag;// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
5383if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map())!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set())!=setTag||WeakMap&&getTag(new WeakMap())!=weakMapTag){getTag=function getTag(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):'';if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag;}}return result;};}/**
5384     * Gets the view, applying any `transforms` to the `start` and `end` positions.
5385     *
5386     * @private
5387     * @param {number} start The start of the view.
5388     * @param {number} end The end of the view.
5389     * @param {Array} transforms The transformations to apply to the view.
5390     * @returns {Object} Returns an object containing the `start` and `end`
5391     *  positions of the view.
5392     */function getView(start,end,transforms){var index=-1,length=transforms.length;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case'drop':start+=size;break;case'dropRight':end-=size;break;case'take':end=nativeMin(end,start+size);break;case'takeRight':start=nativeMax(start,end-size);break;}}return{'start':start,'end':end};}/**
5393     * Extracts wrapper details from the `source` body comment.
5394     *
5395     * @private
5396     * @param {string} source The source to inspect.
5397     * @returns {Array} Returns the wrapper details.
5398     */function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[];}/**
5399     * Checks if `path` exists on `object`.
5400     *
5401     * @private
5402     * @param {Object} object The object to query.
5403     * @param {Array|string} path The path to check.
5404     * @param {Function} hasFunc The function to check properties.
5405     * @returns {boolean} Returns `true` if `path` exists, else `false`.
5406     */function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break;}object=object[key];}if(result||++index!=length){return result;}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object));}/**
5407     * Initializes an array clone.
5408     *
5409     * @private
5410     * @param {Array} array The array to clone.
5411     * @returns {Array} Returns the initialized clone.
5412     */function initCloneArray(array){var length=array.length,result=new array.constructor(length);// Add properties assigned by `RegExp#exec`.
5413if(length&&typeof array[0]=='string'&&hasOwnProperty.call(array,'index')){result.index=array.index;result.input=array.input;}return result;}/**
5414     * Initializes an object clone.
5415     *
5416     * @private
5417     * @param {Object} object The object to clone.
5418     * @returns {Object} Returns the initialized clone.
5419     */function initCloneObject(object){return typeof object.constructor=='function'&&!isPrototype(object)?baseCreate(getPrototype(object)):{};}/**
5420     * Initializes an object clone based on its `toStringTag`.
5421     *
5422     * **Note:** This function only supports cloning values with tags of
5423     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
5424     *
5425     * @private
5426     * @param {Object} object The object to clone.
5427     * @param {string} tag The `toStringTag` of the object to clone.
5428     * @param {boolean} [isDeep] Specify a deep clone.
5429     * @returns {Object} Returns the initialized clone.
5430     */function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor();case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return new Ctor();case symbolTag:return cloneSymbol(object);}}/**
5431     * Inserts wrapper `details` in a comment at the top of the `source` body.
5432     *
5433     * @private
5434     * @param {string} source The source to modify.
5435     * @returns {Array} details The details to insert.
5436     * @returns {string} Returns the modified source.
5437     */function insertWrapDetails(source,details){var length=details.length;if(!length){return source;}var lastIndex=length-1;details[lastIndex]=(length>1?'& ':'')+details[lastIndex];details=details.join(length>2?', ':' ');return source.replace(reWrapComment,'{\n/* [wrapped with '+details+'] */\n');}/**
5438     * Checks if `value` is a flattenable `arguments` object or array.
5439     *
5440     * @private
5441     * @param {*} value The value to check.
5442     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
5443     */function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol]);}/**
5444     * Checks if `value` is a valid array-like index.
5445     *
5446     * @private
5447     * @param {*} value The value to check.
5448     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
5449     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
5450     */function isIndex(value,length){var type=_typeof(value);length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=='number'||type!='symbol'&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length;}/**
5451     * Checks if the given arguments are from an iteratee call.
5452     *
5453     * @private
5454     * @param {*} value The potential iteratee value argument.
5455     * @param {*} index The potential iteratee index or key argument.
5456     * @param {*} object The potential iteratee object argument.
5457     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
5458     *  else `false`.
5459     */function isIterateeCall(value,index,object){if(!isObject(object)){return false;}var type=_typeof(index);if(type=='number'?isArrayLike(object)&&isIndex(index,object.length):type=='string'&&index in object){return eq(object[index],value);}return false;}/**
5460     * Checks if `value` is a property name and not a property path.
5461     *
5462     * @private
5463     * @param {*} value The value to check.
5464     * @param {Object} [object] The object to query keys on.
5465     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
5466     */function isKey(value,object){if(isArray(value)){return false;}var type=_typeof(value);if(type=='number'||type=='symbol'||type=='boolean'||value==null||isSymbol(value)){return true;}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object);}/**
5467     * Checks if `value` is suitable for use as unique object key.
5468     *
5469     * @private
5470     * @param {*} value The value to check.
5471     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
5472     */function isKeyable(value){var type=_typeof(value);return type=='string'||type=='number'||type=='symbol'||type=='boolean'?value!=='__proto__':value===null;}/**
5473     * Checks if `func` has a lazy counterpart.
5474     *
5475     * @private
5476     * @param {Function} func The function to check.
5477     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
5478     *  else `false`.
5479     */function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if(typeof other!='function'||!(funcName in LazyWrapper.prototype)){return false;}if(func===other){return true;}var data=getData(other);return!!data&&func===data[0];}/**
5480     * Checks if `func` has its source masked.
5481     *
5482     * @private
5483     * @param {Function} func The function to check.
5484     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
5485     */function isMasked(func){return!!maskSrcKey&&maskSrcKey in func;}/**
5486     * Checks if `func` is capable of being masked.
5487     *
5488     * @private
5489     * @param {*} value The value to check.
5490     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
5491     */var isMaskable=coreJsData?isFunction:stubFalse;/**
5492     * Checks if `value` is likely a prototype object.
5493     *
5494     * @private
5495     * @param {*} value The value to check.
5496     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
5497     */function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=='function'&&Ctor.prototype||objectProto;return value===proto;}/**
5498     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
5499     *
5500     * @private
5501     * @param {*} value The value to check.
5502     * @returns {boolean} Returns `true` if `value` if suitable for strict
5503     *  equality comparisons, else `false`.
5504     */function isStrictComparable(value){return value===value&&!isObject(value);}/**
5505     * A specialized version of `matchesProperty` for source values suitable
5506     * for strict equality comparisons, i.e. `===`.
5507     *
5508     * @private
5509     * @param {string} key The key of the property to get.
5510     * @param {*} srcValue The value to match.
5511     * @returns {Function} Returns the new spec function.
5512     */function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false;}return object[key]===srcValue&&(srcValue!==undefined||key in Object(object));};}/**
5513     * A specialized version of `_.memoize` which clears the memoized function's
5514     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
5515     *
5516     * @private
5517     * @param {Function} func The function to have its output memoized.
5518     * @returns {Function} Returns the new memoized function.
5519     */function memoizeCapped(func){var result=memoize(func,function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear();}return key;});var cache=result.cache;return result;}/**
5520     * Merges the function metadata of `source` into `data`.
5521     *
5522     * Merging metadata reduces the number of wrappers used to invoke a function.
5523     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
5524     * may be applied regardless of execution order. Methods like `_.ary` and
5525     * `_.rearg` modify function arguments, making the order in which they are
5526     * executed important, preventing the merging of metadata. However, we make
5527     * an exception for a safe combined case where curried functions have `_.ary`
5528     * and or `_.rearg` applied.
5529     *
5530     * @private
5531     * @param {Array} data The destination metadata.
5532     * @param {Array} source The source metadata.
5533     * @returns {Array} Returns `data`.
5534     */function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG|WRAP_ARY_FLAG);var isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG;// Exit early if metadata can't be merged.
5535if(!(isCommon||isCombo)){return data;}// Use source `thisArg` if available.
5536if(srcBitmask&WRAP_BIND_FLAG){data[2]=source[2];// Set when currying a bound function.
5537newBitmask|=bitmask&WRAP_BIND_FLAG?0:WRAP_CURRY_BOUND_FLAG;}// Compose partial arguments.
5538var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value;data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4];}// Compose partial right arguments.
5539value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):value;data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6];}// Use source `argPos` if available.
5540value=source[7];if(value){data[7]=value;}// Use source `ary` if it's smaller.
5541if(srcBitmask&WRAP_ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8]);}// Use source `arity` if one is not provided.
5542if(data[9]==null){data[9]=source[9];}// Use source `func` and merge bitmasks.
5543data[0]=source[0];data[1]=newBitmask;return data;}/**
5544     * This function is like
5545     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
5546     * except that it includes inherited enumerable properties.
5547     *
5548     * @private
5549     * @param {Object} object The object to query.
5550     * @returns {Array} Returns the array of property names.
5551     */function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key);}}return result;}/**
5552     * Converts `value` to a string using `Object.prototype.toString`.
5553     *
5554     * @private
5555     * @param {*} value The value to convert.
5556     * @returns {string} Returns the converted string.
5557     */function objectToString(value){return nativeObjectToString.call(value);}/**
5558     * A specialized version of `baseRest` which transforms the rest array.
5559     *
5560     * @private
5561     * @param {Function} func The function to apply a rest parameter to.
5562     * @param {number} [start=func.length-1] The start position of the rest parameter.
5563     * @param {Function} transform The rest array transform.
5564     * @returns {Function} Returns the new function.
5565     */function overRest(func,start,transform){start=nativeMax(start===undefined?func.length-1:start,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);while(++index<length){array[index]=args[start+index];}index=-1;var otherArgs=Array(start+1);while(++index<start){otherArgs[index]=args[index];}otherArgs[start]=transform(array);return apply(func,this,otherArgs);};}/**
5566     * Gets the parent value at `path` of `object`.
5567     *
5568     * @private
5569     * @param {Object} object The object to query.
5570     * @param {Array} path The path to get the parent value of.
5571     * @returns {*} Returns the parent value.
5572     */function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1));}/**
5573     * Reorder `array` according to the specified indexes where the element at
5574     * the first index is assigned as the first element, the element at
5575     * the second index is assigned as the second element, and so on.
5576     *
5577     * @private
5578     * @param {Array} array The array to reorder.
5579     * @param {Array} indexes The arranged array indexes.
5580     * @returns {Array} Returns `array`.
5581     */function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined;}return array;}/**
5582     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
5583     *
5584     * @private
5585     * @param {Object} object The object to query.
5586     * @param {string} key The key of the property to get.
5587     * @returns {*} Returns the property value.
5588     */function safeGet(object,key){if(key==='constructor'&&typeof object[key]==='function'){return;}if(key=='__proto__'){return;}return object[key];}/**
5589     * Sets metadata for `func`.
5590     *
5591     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
5592     * period of time, it will trip its breaker and transition to an identity
5593     * function to avoid garbage collection pauses in V8. See
5594     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
5595     * for more details.
5596     *
5597     * @private
5598     * @param {Function} func The function to associate metadata with.
5599     * @param {*} data The metadata.
5600     * @returns {Function} Returns `func`.
5601     */var setData=shortOut(baseSetData);/**
5602     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
5603     *
5604     * @private
5605     * @param {Function} func The function to delay.
5606     * @param {number} wait The number of milliseconds to delay invocation.
5607     * @returns {number|Object} Returns the timer id or timeout object.
5608     */var setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait);};/**
5609     * Sets the `toString` method of `func` to return `string`.
5610     *
5611     * @private
5612     * @param {Function} func The function to modify.
5613     * @param {Function} string The `toString` result.
5614     * @returns {Function} Returns `func`.
5615     */var setToString=shortOut(baseSetToString);/**
5616     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
5617     * with wrapper details in a comment at the top of the source body.
5618     *
5619     * @private
5620     * @param {Function} wrapper The function to modify.
5621     * @param {Function} reference The reference function.
5622     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5623     * @returns {Function} Returns `wrapper`.
5624     */function setWrapToString(wrapper,reference,bitmask){var source=reference+'';return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)));}/**
5625     * Creates a function that'll short out and invoke `identity` instead
5626     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
5627     * milliseconds.
5628     *
5629     * @private
5630     * @param {Function} func The function to restrict.
5631     * @returns {Function} Returns the new shortable function.
5632     */function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0];}}else{count=0;}return func.apply(undefined,arguments);};}/**
5633     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
5634     *
5635     * @private
5636     * @param {Array} array The array to shuffle.
5637     * @param {number} [size=array.length] The size of `array`.
5638     * @returns {Array} Returns `array`.
5639     */function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;size=size===undefined?length:size;while(++index<size){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index];array[index]=value;}array.length=size;return array;}/**
5640     * Converts `string` to a property path array.
5641     *
5642     * @private
5643     * @param {string} string The string to convert.
5644     * @returns {Array} Returns the property path array.
5645     */var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46/* . */){result.push('');}string.replace(rePropName,function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,'$1'):number||match);});return result;});/**
5646     * Converts `value` to a string key if it's not a string or symbol.
5647     *
5648     * @private
5649     * @param {*} value The value to inspect.
5650     * @returns {string|symbol} Returns the key.
5651     */function toKey(value){if(typeof value=='string'||isSymbol(value)){return value;}var result=value+'';return result=='0'&&1/value==-INFINITY?'-0':result;}/**
5652     * Converts `func` to its source code.
5653     *
5654     * @private
5655     * @param {Function} func The function to convert.
5656     * @returns {string} Returns the source code.
5657     */function toSource(func){if(func!=null){try{return funcToString.call(func);}catch(e){}try{return func+'';}catch(e){}}return'';}/**
5658     * Updates wrapper `details` based on `bitmask` flags.
5659     *
5660     * @private
5661     * @returns {Array} details The details to modify.
5662     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
5663     * @returns {Array} Returns `details`.
5664     */function updateWrapDetails(details,bitmask){arrayEach(wrapFlags,function(pair){var value='_.'+pair[0];if(bitmask&pair[1]&&!arrayIncludes(details,value)){details.push(value);}});return details.sort();}/**
5665     * Creates a clone of `wrapper`.
5666     *
5667     * @private
5668     * @param {Object} wrapper The wrapper to clone.
5669     * @returns {Object} Returns the cloned wrapper.
5670     */function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper){return wrapper.clone();}var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);result.__actions__=copyArray(wrapper.__actions__);result.__index__=wrapper.__index__;result.__values__=wrapper.__values__;return result;}/*------------------------------------------------------------------------*/ /**
5671     * Creates an array of elements split into groups the length of `size`.
5672     * If `array` can't be split evenly, the final chunk will be the remaining
5673     * elements.
5674     *
5675     * @static
5676     * @memberOf _
5677     * @since 3.0.0
5678     * @category Array
5679     * @param {Array} array The array to process.
5680     * @param {number} [size=1] The length of each chunk
5681     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
5682     * @returns {Array} Returns the new array of chunks.
5683     * @example
5684     *
5685     * _.chunk(['a', 'b', 'c', 'd'], 2);
5686     * // => [['a', 'b'], ['c', 'd']]
5687     *
5688     * _.chunk(['a', 'b', 'c', 'd'], 3);
5689     * // => [['a', 'b', 'c'], ['d']]
5690     */function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size===undefined){size=1;}else{size=nativeMax(toInteger(size),0);}var length=array==null?0:array.length;if(!length||size<1){return[];}var index=0,resIndex=0,result=Array(nativeCeil(length/size));while(index<length){result[resIndex++]=baseSlice(array,index,index+=size);}return result;}/**
5691     * Creates an array with all falsey values removed. The values `false`, `null`,
5692     * `0`, `""`, `undefined`, and `NaN` are falsey.
5693     *
5694     * @static
5695     * @memberOf _
5696     * @since 0.1.0
5697     * @category Array
5698     * @param {Array} array The array to compact.
5699     * @returns {Array} Returns the new array of filtered values.
5700     * @example
5701     *
5702     * _.compact([0, 1, false, 2, '', 3]);
5703     * // => [1, 2, 3]
5704     */function compact(array){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value){result[resIndex++]=value;}}return result;}/**
5705     * Creates a new array concatenating `array` with any additional arrays
5706     * and/or values.
5707     *
5708     * @static
5709     * @memberOf _
5710     * @since 4.0.0
5711     * @category Array
5712     * @param {Array} array The array to concatenate.
5713     * @param {...*} [values] The values to concatenate.
5714     * @returns {Array} Returns the new concatenated array.
5715     * @example
5716     *
5717     * var array = [1];
5718     * var other = _.concat(array, 2, [3], [[4]]);
5719     *
5720     * console.log(other);
5721     * // => [1, 2, 3, [4]]
5722     *
5723     * console.log(array);
5724     * // => [1]
5725     */function concat(){var length=arguments.length;if(!length){return[];}var args=Array(length-1),array=arguments[0],index=length;while(index--){args[index-1]=arguments[index];}return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1));}/**
5726     * Creates an array of `array` values not included in the other given arrays
5727     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
5728     * for equality comparisons. The order and references of result values are
5729     * determined by the first array.
5730     *
5731     * **Note:** Unlike `_.pullAll`, this method returns a new array.
5732     *
5733     * @static
5734     * @memberOf _
5735     * @since 0.1.0
5736     * @category Array
5737     * @param {Array} array The array to inspect.
5738     * @param {...Array} [values] The values to exclude.
5739     * @returns {Array} Returns the new array of filtered values.
5740     * @see _.without, _.xor
5741     * @example
5742     *
5743     * _.difference([2, 1], [2, 3]);
5744     * // => [1]
5745     */var difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true)):[];});/**
5746     * This method is like `_.difference` except that it accepts `iteratee` which
5747     * is invoked for each element of `array` and `values` to generate the criterion
5748     * by which they're compared. The order and references of result values are
5749     * determined by the first array. The iteratee is invoked with one argument:
5750     * (value).
5751     *
5752     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
5753     *
5754     * @static
5755     * @memberOf _
5756     * @since 4.0.0
5757     * @category Array
5758     * @param {Array} array The array to inspect.
5759     * @param {...Array} [values] The values to exclude.
5760     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
5761     * @returns {Array} Returns the new array of filtered values.
5762     * @example
5763     *
5764     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
5765     * // => [1.2]
5766     *
5767     * // The `_.property` iteratee shorthand.
5768     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
5769     * // => [{ 'x': 2 }]
5770     */var differenceBy=baseRest(function(array,values){var iteratee=last(values);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),getIteratee(iteratee,2)):[];});/**
5771     * This method is like `_.difference` except that it accepts `comparator`
5772     * which is invoked to compare elements of `array` to `values`. The order and
5773     * references of result values are determined by the first array. The comparator
5774     * is invoked with two arguments: (arrVal, othVal).
5775     *
5776     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
5777     *
5778     * @static
5779     * @memberOf _
5780     * @since 4.0.0
5781     * @category Array
5782     * @param {Array} array The array to inspect.
5783     * @param {...Array} [values] The values to exclude.
5784     * @param {Function} [comparator] The comparator invoked per element.
5785     * @returns {Array} Returns the new array of filtered values.
5786     * @example
5787     *
5788     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
5789     *
5790     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
5791     * // => [{ 'x': 2, 'y': 1 }]
5792     */var differenceWith=baseRest(function(array,values){var comparator=last(values);if(isArrayLikeObject(comparator)){comparator=undefined;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),undefined,comparator):[];});/**
5793     * Creates a slice of `array` with `n` elements dropped from the beginning.
5794     *
5795     * @static
5796     * @memberOf _
5797     * @since 0.5.0
5798     * @category Array
5799     * @param {Array} array The array to query.
5800     * @param {number} [n=1] The number of elements to drop.
5801     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
5802     * @returns {Array} Returns the slice of `array`.
5803     * @example
5804     *
5805     * _.drop([1, 2, 3]);
5806     * // => [2, 3]
5807     *
5808     * _.drop([1, 2, 3], 2);
5809     * // => [3]
5810     *
5811     * _.drop([1, 2, 3], 5);
5812     * // => []
5813     *
5814     * _.drop([1, 2, 3], 0);
5815     * // => [1, 2, 3]
5816     */function drop(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);return baseSlice(array,n<0?0:n,length);}/**
5817     * Creates a slice of `array` with `n` elements dropped from the end.
5818     *
5819     * @static
5820     * @memberOf _
5821     * @since 3.0.0
5822     * @category Array
5823     * @param {Array} array The array to query.
5824     * @param {number} [n=1] The number of elements to drop.
5825     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
5826     * @returns {Array} Returns the slice of `array`.
5827     * @example
5828     *
5829     * _.dropRight([1, 2, 3]);
5830     * // => [1, 2]
5831     *
5832     * _.dropRight([1, 2, 3], 2);
5833     * // => [1]
5834     *
5835     * _.dropRight([1, 2, 3], 5);
5836     * // => []
5837     *
5838     * _.dropRight([1, 2, 3], 0);
5839     * // => [1, 2, 3]
5840     */function dropRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);n=length-n;return baseSlice(array,0,n<0?0:n);}/**
5841     * Creates a slice of `array` excluding elements dropped from the end.
5842     * Elements are dropped until `predicate` returns falsey. The predicate is
5843     * invoked with three arguments: (value, index, array).
5844     *
5845     * @static
5846     * @memberOf _
5847     * @since 3.0.0
5848     * @category Array
5849     * @param {Array} array The array to query.
5850     * @param {Function} [predicate=_.identity] The function invoked per iteration.
5851     * @returns {Array} Returns the slice of `array`.
5852     * @example
5853     *
5854     * var users = [
5855     *   { 'user': 'barney',  'active': true },
5856     *   { 'user': 'fred',    'active': false },
5857     *   { 'user': 'pebbles', 'active': false }
5858     * ];
5859     *
5860     * _.dropRightWhile(users, function(o) { return !o.active; });
5861     * // => objects for ['barney']
5862     *
5863     * // The `_.matches` iteratee shorthand.
5864     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
5865     * // => objects for ['barney', 'fred']
5866     *
5867     * // The `_.matchesProperty` iteratee shorthand.
5868     * _.dropRightWhile(users, ['active', false]);
5869     * // => objects for ['barney']
5870     *
5871     * // The `_.property` iteratee shorthand.
5872     * _.dropRightWhile(users, 'active');
5873     * // => objects for ['barney', 'fred', 'pebbles']
5874     */function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true,true):[];}/**
5875     * Creates a slice of `array` excluding elements dropped from the beginning.
5876     * Elements are dropped until `predicate` returns falsey. The predicate is
5877     * invoked with three arguments: (value, index, array).
5878     *
5879     * @static
5880     * @memberOf _
5881     * @since 3.0.0
5882     * @category Array
5883     * @param {Array} array The array to query.
5884     * @param {Function} [predicate=_.identity] The function invoked per iteration.
5885     * @returns {Array} Returns the slice of `array`.
5886     * @example
5887     *
5888     * var users = [
5889     *   { 'user': 'barney',  'active': false },
5890     *   { 'user': 'fred',    'active': false },
5891     *   { 'user': 'pebbles', 'active': true }
5892     * ];
5893     *
5894     * _.dropWhile(users, function(o) { return !o.active; });
5895     * // => objects for ['pebbles']
5896     *
5897     * // The `_.matches` iteratee shorthand.
5898     * _.dropWhile(users, { 'user': 'barney', 'active': false });
5899     * // => objects for ['fred', 'pebbles']
5900     *
5901     * // The `_.matchesProperty` iteratee shorthand.
5902     * _.dropWhile(users, ['active', false]);
5903     * // => objects for ['pebbles']
5904     *
5905     * // The `_.property` iteratee shorthand.
5906     * _.dropWhile(users, 'active');
5907     * // => objects for ['barney', 'fred', 'pebbles']
5908     */function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true):[];}/**
5909     * Fills elements of `array` with `value` from `start` up to, but not
5910     * including, `end`.
5911     *
5912     * **Note:** This method mutates `array`.
5913     *
5914     * @static
5915     * @memberOf _
5916     * @since 3.2.0
5917     * @category Array
5918     * @param {Array} array The array to fill.
5919     * @param {*} value The value to fill `array` with.
5920     * @param {number} [start=0] The start position.
5921     * @param {number} [end=array.length] The end position.
5922     * @returns {Array} Returns `array`.
5923     * @example
5924     *
5925     * var array = [1, 2, 3];
5926     *
5927     * _.fill(array, 'a');
5928     * console.log(array);
5929     * // => ['a', 'a', 'a']
5930     *
5931     * _.fill(Array(3), 2);
5932     * // => [2, 2, 2]
5933     *
5934     * _.fill([4, 6, 8, 10], '*', 1, 3);
5935     * // => [4, '*', '*', 10]
5936     */function fill(array,value,start,end){var length=array==null?0:array.length;if(!length){return[];}if(start&&typeof start!='number'&&isIterateeCall(array,value,start)){start=0;end=length;}return baseFill(array,value,start,end);}/**
5937     * This method is like `_.find` except that it returns the index of the first
5938     * element `predicate` returns truthy for instead of the element itself.
5939     *
5940     * @static
5941     * @memberOf _
5942     * @since 1.1.0
5943     * @category Array
5944     * @param {Array} array The array to inspect.
5945     * @param {Function} [predicate=_.identity] The function invoked per iteration.
5946     * @param {number} [fromIndex=0] The index to search from.
5947     * @returns {number} Returns the index of the found element, else `-1`.
5948     * @example
5949     *
5950     * var users = [
5951     *   { 'user': 'barney',  'active': false },
5952     *   { 'user': 'fred',    'active': false },
5953     *   { 'user': 'pebbles', 'active': true }
5954     * ];
5955     *
5956     * _.findIndex(users, function(o) { return o.user == 'barney'; });
5957     * // => 0
5958     *
5959     * // The `_.matches` iteratee shorthand.
5960     * _.findIndex(users, { 'user': 'fred', 'active': false });
5961     * // => 1
5962     *
5963     * // The `_.matchesProperty` iteratee shorthand.
5964     * _.findIndex(users, ['active', false]);
5965     * // => 0
5966     *
5967     * // The `_.property` iteratee shorthand.
5968     * _.findIndex(users, 'active');
5969     * // => 2
5970     */function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseFindIndex(array,getIteratee(predicate,3),index);}/**
5971     * This method is like `_.findIndex` except that it iterates over elements
5972     * of `collection` from right to left.
5973     *
5974     * @static
5975     * @memberOf _
5976     * @since 2.0.0
5977     * @category Array
5978     * @param {Array} array The array to inspect.
5979     * @param {Function} [predicate=_.identity] The function invoked per iteration.
5980     * @param {number} [fromIndex=array.length-1] The index to search from.
5981     * @returns {number} Returns the index of the found element, else `-1`.
5982     * @example
5983     *
5984     * var users = [
5985     *   { 'user': 'barney',  'active': true },
5986     *   { 'user': 'fred',    'active': false },
5987     *   { 'user': 'pebbles', 'active': false }
5988     * ];
5989     *
5990     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
5991     * // => 2
5992     *
5993     * // The `_.matches` iteratee shorthand.
5994     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
5995     * // => 0
5996     *
5997     * // The `_.matchesProperty` iteratee shorthand.
5998     * _.findLastIndex(users, ['active', false]);
5999     * // => 2
6000     *
6001     * // The `_.property` iteratee shorthand.
6002     * _.findLastIndex(users, 'active');
6003     * // => 0
6004     */function findLastIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=length-1;if(fromIndex!==undefined){index=toInteger(fromIndex);index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1);}return baseFindIndex(array,getIteratee(predicate,3),index,true);}/**
6005     * Flattens `array` a single level deep.
6006     *
6007     * @static
6008     * @memberOf _
6009     * @since 0.1.0
6010     * @category Array
6011     * @param {Array} array The array to flatten.
6012     * @returns {Array} Returns the new flattened array.
6013     * @example
6014     *
6015     * _.flatten([1, [2, [3, [4]], 5]]);
6016     * // => [1, 2, [3, [4]], 5]
6017     */function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[];}/**
6018     * Recursively flattens `array`.
6019     *
6020     * @static
6021     * @memberOf _
6022     * @since 3.0.0
6023     * @category Array
6024     * @param {Array} array The array to flatten.
6025     * @returns {Array} Returns the new flattened array.
6026     * @example
6027     *
6028     * _.flattenDeep([1, [2, [3, [4]], 5]]);
6029     * // => [1, 2, 3, 4, 5]
6030     */function flattenDeep(array){var length=array==null?0:array.length;return length?baseFlatten(array,INFINITY):[];}/**
6031     * Recursively flatten `array` up to `depth` times.
6032     *
6033     * @static
6034     * @memberOf _
6035     * @since 4.4.0
6036     * @category Array
6037     * @param {Array} array The array to flatten.
6038     * @param {number} [depth=1] The maximum recursion depth.
6039     * @returns {Array} Returns the new flattened array.
6040     * @example
6041     *
6042     * var array = [1, [2, [3, [4]], 5]];
6043     *
6044     * _.flattenDepth(array, 1);
6045     * // => [1, 2, [3, [4]], 5]
6046     *
6047     * _.flattenDepth(array, 2);
6048     * // => [1, 2, 3, [4], 5]
6049     */function flattenDepth(array,depth){var length=array==null?0:array.length;if(!length){return[];}depth=depth===undefined?1:toInteger(depth);return baseFlatten(array,depth);}/**
6050     * The inverse of `_.toPairs`; this method returns an object composed
6051     * from key-value `pairs`.
6052     *
6053     * @static
6054     * @memberOf _
6055     * @since 4.0.0
6056     * @category Array
6057     * @param {Array} pairs The key-value pairs.
6058     * @returns {Object} Returns the new object.
6059     * @example
6060     *
6061     * _.fromPairs([['a', 1], ['b', 2]]);
6062     * // => { 'a': 1, 'b': 2 }
6063     */function fromPairs(pairs){var index=-1,length=pairs==null?0:pairs.length,result={};while(++index<length){var pair=pairs[index];result[pair[0]]=pair[1];}return result;}/**
6064     * Gets the first element of `array`.
6065     *
6066     * @static
6067     * @memberOf _
6068     * @since 0.1.0
6069     * @alias first
6070     * @category Array
6071     * @param {Array} array The array to query.
6072     * @returns {*} Returns the first element of `array`.
6073     * @example
6074     *
6075     * _.head([1, 2, 3]);
6076     * // => 1
6077     *
6078     * _.head([]);
6079     * // => undefined
6080     */function head(array){return array&&array.length?array[0]:undefined;}/**
6081     * Gets the index at which the first occurrence of `value` is found in `array`
6082     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6083     * for equality comparisons. If `fromIndex` is negative, it's used as the
6084     * offset from the end of `array`.
6085     *
6086     * @static
6087     * @memberOf _
6088     * @since 0.1.0
6089     * @category Array
6090     * @param {Array} array The array to inspect.
6091     * @param {*} value The value to search for.
6092     * @param {number} [fromIndex=0] The index to search from.
6093     * @returns {number} Returns the index of the matched value, else `-1`.
6094     * @example
6095     *
6096     * _.indexOf([1, 2, 1, 2], 2);
6097     * // => 1
6098     *
6099     * // Search from the `fromIndex`.
6100     * _.indexOf([1, 2, 1, 2], 2, 2);
6101     * // => 3
6102     */function indexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseIndexOf(array,value,index);}/**
6103     * Gets all but the last element of `array`.
6104     *
6105     * @static
6106     * @memberOf _
6107     * @since 0.1.0
6108     * @category Array
6109     * @param {Array} array The array to query.
6110     * @returns {Array} Returns the slice of `array`.
6111     * @example
6112     *
6113     * _.initial([1, 2, 3]);
6114     * // => [1, 2]
6115     */function initial(array){var length=array==null?0:array.length;return length?baseSlice(array,0,-1):[];}/**
6116     * Creates an array of unique values that are included in all given arrays
6117     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6118     * for equality comparisons. The order and references of result values are
6119     * determined by the first array.
6120     *
6121     * @static
6122     * @memberOf _
6123     * @since 0.1.0
6124     * @category Array
6125     * @param {...Array} [arrays] The arrays to inspect.
6126     * @returns {Array} Returns the new array of intersecting values.
6127     * @example
6128     *
6129     * _.intersection([2, 1], [2, 3]);
6130     * // => [2]
6131     */var intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[];});/**
6132     * This method is like `_.intersection` except that it accepts `iteratee`
6133     * which is invoked for each element of each `arrays` to generate the criterion
6134     * by which they're compared. The order and references of result values are
6135     * determined by the first array. The iteratee is invoked with one argument:
6136     * (value).
6137     *
6138     * @static
6139     * @memberOf _
6140     * @since 4.0.0
6141     * @category Array
6142     * @param {...Array} [arrays] The arrays to inspect.
6143     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6144     * @returns {Array} Returns the new array of intersecting values.
6145     * @example
6146     *
6147     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
6148     * // => [2.1]
6149     *
6150     * // The `_.property` iteratee shorthand.
6151     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
6152     * // => [{ 'x': 1 }]
6153     */var intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);if(iteratee===last(mapped)){iteratee=undefined;}else{mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[];});/**
6154     * This method is like `_.intersection` except that it accepts `comparator`
6155     * which is invoked to compare elements of `arrays`. The order and references
6156     * of result values are determined by the first array. The comparator is
6157     * invoked with two arguments: (arrVal, othVal).
6158     *
6159     * @static
6160     * @memberOf _
6161     * @since 4.0.0
6162     * @category Array
6163     * @param {...Array} [arrays] The arrays to inspect.
6164     * @param {Function} [comparator] The comparator invoked per element.
6165     * @returns {Array} Returns the new array of intersecting values.
6166     * @example
6167     *
6168     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
6169     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
6170     *
6171     * _.intersectionWith(objects, others, _.isEqual);
6172     * // => [{ 'x': 1, 'y': 2 }]
6173     */var intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);comparator=typeof comparator=='function'?comparator:undefined;if(comparator){mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined,comparator):[];});/**
6174     * Converts all elements in `array` into a string separated by `separator`.
6175     *
6176     * @static
6177     * @memberOf _
6178     * @since 4.0.0
6179     * @category Array
6180     * @param {Array} array The array to convert.
6181     * @param {string} [separator=','] The element separator.
6182     * @returns {string} Returns the joined string.
6183     * @example
6184     *
6185     * _.join(['a', 'b', 'c'], '~');
6186     * // => 'a~b~c'
6187     */function join(array,separator){return array==null?'':nativeJoin.call(array,separator);}/**
6188     * Gets the last element of `array`.
6189     *
6190     * @static
6191     * @memberOf _
6192     * @since 0.1.0
6193     * @category Array
6194     * @param {Array} array The array to query.
6195     * @returns {*} Returns the last element of `array`.
6196     * @example
6197     *
6198     * _.last([1, 2, 3]);
6199     * // => 3
6200     */function last(array){var length=array==null?0:array.length;return length?array[length-1]:undefined;}/**
6201     * This method is like `_.indexOf` except that it iterates over elements of
6202     * `array` from right to left.
6203     *
6204     * @static
6205     * @memberOf _
6206     * @since 0.1.0
6207     * @category Array
6208     * @param {Array} array The array to inspect.
6209     * @param {*} value The value to search for.
6210     * @param {number} [fromIndex=array.length-1] The index to search from.
6211     * @returns {number} Returns the index of the matched value, else `-1`.
6212     * @example
6213     *
6214     * _.lastIndexOf([1, 2, 1, 2], 2);
6215     * // => 3
6216     *
6217     * // Search from the `fromIndex`.
6218     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
6219     * // => 1
6220     */function lastIndexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=length;if(fromIndex!==undefined){index=toInteger(fromIndex);index=index<0?nativeMax(length+index,0):nativeMin(index,length-1);}return value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,true);}/**
6221     * Gets the element at index `n` of `array`. If `n` is negative, the nth
6222     * element from the end is returned.
6223     *
6224     * @static
6225     * @memberOf _
6226     * @since 4.11.0
6227     * @category Array
6228     * @param {Array} array The array to query.
6229     * @param {number} [n=0] The index of the element to return.
6230     * @returns {*} Returns the nth element of `array`.
6231     * @example
6232     *
6233     * var array = ['a', 'b', 'c', 'd'];
6234     *
6235     * _.nth(array, 1);
6236     * // => 'b'
6237     *
6238     * _.nth(array, -2);
6239     * // => 'c';
6240     */function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined;}/**
6241     * Removes all given values from `array` using
6242     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6243     * for equality comparisons.
6244     *
6245     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
6246     * to remove elements from an array by predicate.
6247     *
6248     * @static
6249     * @memberOf _
6250     * @since 2.0.0
6251     * @category Array
6252     * @param {Array} array The array to modify.
6253     * @param {...*} [values] The values to remove.
6254     * @returns {Array} Returns `array`.
6255     * @example
6256     *
6257     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
6258     *
6259     * _.pull(array, 'a', 'c');
6260     * console.log(array);
6261     * // => ['b', 'b']
6262     */var pull=baseRest(pullAll);/**
6263     * This method is like `_.pull` except that it accepts an array of values to remove.
6264     *
6265     * **Note:** Unlike `_.difference`, this method mutates `array`.
6266     *
6267     * @static
6268     * @memberOf _
6269     * @since 4.0.0
6270     * @category Array
6271     * @param {Array} array The array to modify.
6272     * @param {Array} values The values to remove.
6273     * @returns {Array} Returns `array`.
6274     * @example
6275     *
6276     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
6277     *
6278     * _.pullAll(array, ['a', 'c']);
6279     * console.log(array);
6280     * // => ['b', 'b']
6281     */function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array;}/**
6282     * This method is like `_.pullAll` except that it accepts `iteratee` which is
6283     * invoked for each element of `array` and `values` to generate the criterion
6284     * by which they're compared. The iteratee is invoked with one argument: (value).
6285     *
6286     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
6287     *
6288     * @static
6289     * @memberOf _
6290     * @since 4.0.0
6291     * @category Array
6292     * @param {Array} array The array to modify.
6293     * @param {Array} values The values to remove.
6294     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6295     * @returns {Array} Returns `array`.
6296     * @example
6297     *
6298     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
6299     *
6300     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
6301     * console.log(array);
6302     * // => [{ 'x': 2 }]
6303     */function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array;}/**
6304     * This method is like `_.pullAll` except that it accepts `comparator` which
6305     * is invoked to compare elements of `array` to `values`. The comparator is
6306     * invoked with two arguments: (arrVal, othVal).
6307     *
6308     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
6309     *
6310     * @static
6311     * @memberOf _
6312     * @since 4.6.0
6313     * @category Array
6314     * @param {Array} array The array to modify.
6315     * @param {Array} values The values to remove.
6316     * @param {Function} [comparator] The comparator invoked per element.
6317     * @returns {Array} Returns `array`.
6318     * @example
6319     *
6320     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
6321     *
6322     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
6323     * console.log(array);
6324     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
6325     */function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined,comparator):array;}/**
6326     * Removes elements from `array` corresponding to `indexes` and returns an
6327     * array of removed elements.
6328     *
6329     * **Note:** Unlike `_.at`, this method mutates `array`.
6330     *
6331     * @static
6332     * @memberOf _
6333     * @since 3.0.0
6334     * @category Array
6335     * @param {Array} array The array to modify.
6336     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
6337     * @returns {Array} Returns the new array of removed elements.
6338     * @example
6339     *
6340     * var array = ['a', 'b', 'c', 'd'];
6341     * var pulled = _.pullAt(array, [1, 3]);
6342     *
6343     * console.log(array);
6344     * // => ['a', 'c']
6345     *
6346     * console.log(pulled);
6347     * // => ['b', 'd']
6348     */var pullAt=flatRest(function(array,indexes){var length=array==null?0:array.length,result=baseAt(array,indexes);basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index;}).sort(compareAscending));return result;});/**
6349     * Removes all elements from `array` that `predicate` returns truthy for
6350     * and returns an array of the removed elements. The predicate is invoked
6351     * with three arguments: (value, index, array).
6352     *
6353     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
6354     * to pull elements from an array by value.
6355     *
6356     * @static
6357     * @memberOf _
6358     * @since 2.0.0
6359     * @category Array
6360     * @param {Array} array The array to modify.
6361     * @param {Function} [predicate=_.identity] The function invoked per iteration.
6362     * @returns {Array} Returns the new array of removed elements.
6363     * @example
6364     *
6365     * var array = [1, 2, 3, 4];
6366     * var evens = _.remove(array, function(n) {
6367     *   return n % 2 == 0;
6368     * });
6369     *
6370     * console.log(array);
6371     * // => [1, 3]
6372     *
6373     * console.log(evens);
6374     * // => [2, 4]
6375     */function remove(array,predicate){var result=[];if(!(array&&array.length)){return result;}var index=-1,indexes=[],length=array.length;predicate=getIteratee(predicate,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index);}}basePullAt(array,indexes);return result;}/**
6376     * Reverses `array` so that the first element becomes the last, the second
6377     * element becomes the second to last, and so on.
6378     *
6379     * **Note:** This method mutates `array` and is based on
6380     * [`Array#reverse`](https://mdn.io/Array/reverse).
6381     *
6382     * @static
6383     * @memberOf _
6384     * @since 4.0.0
6385     * @category Array
6386     * @param {Array} array The array to modify.
6387     * @returns {Array} Returns `array`.
6388     * @example
6389     *
6390     * var array = [1, 2, 3];
6391     *
6392     * _.reverse(array);
6393     * // => [3, 2, 1]
6394     *
6395     * console.log(array);
6396     * // => [3, 2, 1]
6397     */function reverse(array){return array==null?array:nativeReverse.call(array);}/**
6398     * Creates a slice of `array` from `start` up to, but not including, `end`.
6399     *
6400     * **Note:** This method is used instead of
6401     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
6402     * returned.
6403     *
6404     * @static
6405     * @memberOf _
6406     * @since 3.0.0
6407     * @category Array
6408     * @param {Array} array The array to slice.
6409     * @param {number} [start=0] The start position.
6410     * @param {number} [end=array.length] The end position.
6411     * @returns {Array} Returns the slice of `array`.
6412     */function slice(array,start,end){var length=array==null?0:array.length;if(!length){return[];}if(end&&typeof end!='number'&&isIterateeCall(array,start,end)){start=0;end=length;}else{start=start==null?0:toInteger(start);end=end===undefined?length:toInteger(end);}return baseSlice(array,start,end);}/**
6413     * Uses a binary search to determine the lowest index at which `value`
6414     * should be inserted into `array` in order to maintain its sort order.
6415     *
6416     * @static
6417     * @memberOf _
6418     * @since 0.1.0
6419     * @category Array
6420     * @param {Array} array The sorted array to inspect.
6421     * @param {*} value The value to evaluate.
6422     * @returns {number} Returns the index at which `value` should be inserted
6423     *  into `array`.
6424     * @example
6425     *
6426     * _.sortedIndex([30, 50], 40);
6427     * // => 1
6428     */function sortedIndex(array,value){return baseSortedIndex(array,value);}/**
6429     * This method is like `_.sortedIndex` except that it accepts `iteratee`
6430     * which is invoked for `value` and each element of `array` to compute their
6431     * sort ranking. The iteratee is invoked with one argument: (value).
6432     *
6433     * @static
6434     * @memberOf _
6435     * @since 4.0.0
6436     * @category Array
6437     * @param {Array} array The sorted array to inspect.
6438     * @param {*} value The value to evaluate.
6439     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6440     * @returns {number} Returns the index at which `value` should be inserted
6441     *  into `array`.
6442     * @example
6443     *
6444     * var objects = [{ 'x': 4 }, { 'x': 5 }];
6445     *
6446     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
6447     * // => 0
6448     *
6449     * // The `_.property` iteratee shorthand.
6450     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
6451     * // => 0
6452     */function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2));}/**
6453     * This method is like `_.indexOf` except that it performs a binary
6454     * search on a sorted `array`.
6455     *
6456     * @static
6457     * @memberOf _
6458     * @since 4.0.0
6459     * @category Array
6460     * @param {Array} array The array to inspect.
6461     * @param {*} value The value to search for.
6462     * @returns {number} Returns the index of the matched value, else `-1`.
6463     * @example
6464     *
6465     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
6466     * // => 1
6467     */function sortedIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value)){return index;}}return-1;}/**
6468     * This method is like `_.sortedIndex` except that it returns the highest
6469     * index at which `value` should be inserted into `array` in order to
6470     * maintain its sort order.
6471     *
6472     * @static
6473     * @memberOf _
6474     * @since 3.0.0
6475     * @category Array
6476     * @param {Array} array The sorted array to inspect.
6477     * @param {*} value The value to evaluate.
6478     * @returns {number} Returns the index at which `value` should be inserted
6479     *  into `array`.
6480     * @example
6481     *
6482     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
6483     * // => 4
6484     */function sortedLastIndex(array,value){return baseSortedIndex(array,value,true);}/**
6485     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
6486     * which is invoked for `value` and each element of `array` to compute their
6487     * sort ranking. The iteratee is invoked with one argument: (value).
6488     *
6489     * @static
6490     * @memberOf _
6491     * @since 4.0.0
6492     * @category Array
6493     * @param {Array} array The sorted array to inspect.
6494     * @param {*} value The value to evaluate.
6495     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6496     * @returns {number} Returns the index at which `value` should be inserted
6497     *  into `array`.
6498     * @example
6499     *
6500     * var objects = [{ 'x': 4 }, { 'x': 5 }];
6501     *
6502     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
6503     * // => 1
6504     *
6505     * // The `_.property` iteratee shorthand.
6506     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
6507     * // => 1
6508     */function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),true);}/**
6509     * This method is like `_.lastIndexOf` except that it performs a binary
6510     * search on a sorted `array`.
6511     *
6512     * @static
6513     * @memberOf _
6514     * @since 4.0.0
6515     * @category Array
6516     * @param {Array} array The array to inspect.
6517     * @param {*} value The value to search for.
6518     * @returns {number} Returns the index of the matched value, else `-1`.
6519     * @example
6520     *
6521     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
6522     * // => 3
6523     */function sortedLastIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value,true)-1;if(eq(array[index],value)){return index;}}return-1;}/**
6524     * This method is like `_.uniq` except that it's designed and optimized
6525     * for sorted arrays.
6526     *
6527     * @static
6528     * @memberOf _
6529     * @since 4.0.0
6530     * @category Array
6531     * @param {Array} array The array to inspect.
6532     * @returns {Array} Returns the new duplicate free array.
6533     * @example
6534     *
6535     * _.sortedUniq([1, 1, 2]);
6536     * // => [1, 2]
6537     */function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[];}/**
6538     * This method is like `_.uniqBy` except that it's designed and optimized
6539     * for sorted arrays.
6540     *
6541     * @static
6542     * @memberOf _
6543     * @since 4.0.0
6544     * @category Array
6545     * @param {Array} array The array to inspect.
6546     * @param {Function} [iteratee] The iteratee invoked per element.
6547     * @returns {Array} Returns the new duplicate free array.
6548     * @example
6549     *
6550     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
6551     * // => [1.1, 2.3]
6552     */function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[];}/**
6553     * Gets all but the first element of `array`.
6554     *
6555     * @static
6556     * @memberOf _
6557     * @since 4.0.0
6558     * @category Array
6559     * @param {Array} array The array to query.
6560     * @returns {Array} Returns the slice of `array`.
6561     * @example
6562     *
6563     * _.tail([1, 2, 3]);
6564     * // => [2, 3]
6565     */function tail(array){var length=array==null?0:array.length;return length?baseSlice(array,1,length):[];}/**
6566     * Creates a slice of `array` with `n` elements taken from the beginning.
6567     *
6568     * @static
6569     * @memberOf _
6570     * @since 0.1.0
6571     * @category Array
6572     * @param {Array} array The array to query.
6573     * @param {number} [n=1] The number of elements to take.
6574     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
6575     * @returns {Array} Returns the slice of `array`.
6576     * @example
6577     *
6578     * _.take([1, 2, 3]);
6579     * // => [1]
6580     *
6581     * _.take([1, 2, 3], 2);
6582     * // => [1, 2]
6583     *
6584     * _.take([1, 2, 3], 5);
6585     * // => [1, 2, 3]
6586     *
6587     * _.take([1, 2, 3], 0);
6588     * // => []
6589     */function take(array,n,guard){if(!(array&&array.length)){return[];}n=guard||n===undefined?1:toInteger(n);return baseSlice(array,0,n<0?0:n);}/**
6590     * Creates a slice of `array` with `n` elements taken from the end.
6591     *
6592     * @static
6593     * @memberOf _
6594     * @since 3.0.0
6595     * @category Array
6596     * @param {Array} array The array to query.
6597     * @param {number} [n=1] The number of elements to take.
6598     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
6599     * @returns {Array} Returns the slice of `array`.
6600     * @example
6601     *
6602     * _.takeRight([1, 2, 3]);
6603     * // => [3]
6604     *
6605     * _.takeRight([1, 2, 3], 2);
6606     * // => [2, 3]
6607     *
6608     * _.takeRight([1, 2, 3], 5);
6609     * // => [1, 2, 3]
6610     *
6611     * _.takeRight([1, 2, 3], 0);
6612     * // => []
6613     */function takeRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);n=length-n;return baseSlice(array,n<0?0:n,length);}/**
6614     * Creates a slice of `array` with elements taken from the end. Elements are
6615     * taken until `predicate` returns falsey. The predicate is invoked with
6616     * three arguments: (value, index, array).
6617     *
6618     * @static
6619     * @memberOf _
6620     * @since 3.0.0
6621     * @category Array
6622     * @param {Array} array The array to query.
6623     * @param {Function} [predicate=_.identity] The function invoked per iteration.
6624     * @returns {Array} Returns the slice of `array`.
6625     * @example
6626     *
6627     * var users = [
6628     *   { 'user': 'barney',  'active': true },
6629     *   { 'user': 'fred',    'active': false },
6630     *   { 'user': 'pebbles', 'active': false }
6631     * ];
6632     *
6633     * _.takeRightWhile(users, function(o) { return !o.active; });
6634     * // => objects for ['fred', 'pebbles']
6635     *
6636     * // The `_.matches` iteratee shorthand.
6637     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
6638     * // => objects for ['pebbles']
6639     *
6640     * // The `_.matchesProperty` iteratee shorthand.
6641     * _.takeRightWhile(users, ['active', false]);
6642     * // => objects for ['fred', 'pebbles']
6643     *
6644     * // The `_.property` iteratee shorthand.
6645     * _.takeRightWhile(users, 'active');
6646     * // => []
6647     */function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),false,true):[];}/**
6648     * Creates a slice of `array` with elements taken from the beginning. Elements
6649     * are taken until `predicate` returns falsey. The predicate is invoked with
6650     * three arguments: (value, index, array).
6651     *
6652     * @static
6653     * @memberOf _
6654     * @since 3.0.0
6655     * @category Array
6656     * @param {Array} array The array to query.
6657     * @param {Function} [predicate=_.identity] The function invoked per iteration.
6658     * @returns {Array} Returns the slice of `array`.
6659     * @example
6660     *
6661     * var users = [
6662     *   { 'user': 'barney',  'active': false },
6663     *   { 'user': 'fred',    'active': false },
6664     *   { 'user': 'pebbles', 'active': true }
6665     * ];
6666     *
6667     * _.takeWhile(users, function(o) { return !o.active; });
6668     * // => objects for ['barney', 'fred']
6669     *
6670     * // The `_.matches` iteratee shorthand.
6671     * _.takeWhile(users, { 'user': 'barney', 'active': false });
6672     * // => objects for ['barney']
6673     *
6674     * // The `_.matchesProperty` iteratee shorthand.
6675     * _.takeWhile(users, ['active', false]);
6676     * // => objects for ['barney', 'fred']
6677     *
6678     * // The `_.property` iteratee shorthand.
6679     * _.takeWhile(users, 'active');
6680     * // => []
6681     */function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[];}/**
6682     * Creates an array of unique values, in order, from all given arrays using
6683     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6684     * for equality comparisons.
6685     *
6686     * @static
6687     * @memberOf _
6688     * @since 0.1.0
6689     * @category Array
6690     * @param {...Array} [arrays] The arrays to inspect.
6691     * @returns {Array} Returns the new array of combined values.
6692     * @example
6693     *
6694     * _.union([2], [1, 2]);
6695     * // => [2, 1]
6696     */var union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true));});/**
6697     * This method is like `_.union` except that it accepts `iteratee` which is
6698     * invoked for each element of each `arrays` to generate the criterion by
6699     * which uniqueness is computed. Result values are chosen from the first
6700     * array in which the value occurs. The iteratee is invoked with one argument:
6701     * (value).
6702     *
6703     * @static
6704     * @memberOf _
6705     * @since 4.0.0
6706     * @category Array
6707     * @param {...Array} [arrays] The arrays to inspect.
6708     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6709     * @returns {Array} Returns the new array of combined values.
6710     * @example
6711     *
6712     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
6713     * // => [2.1, 1.2]
6714     *
6715     * // The `_.property` iteratee shorthand.
6716     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
6717     * // => [{ 'x': 1 }, { 'x': 2 }]
6718     */var unionBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),getIteratee(iteratee,2));});/**
6719     * This method is like `_.union` except that it accepts `comparator` which
6720     * is invoked to compare elements of `arrays`. Result values are chosen from
6721     * the first array in which the value occurs. The comparator is invoked
6722     * with two arguments: (arrVal, othVal).
6723     *
6724     * @static
6725     * @memberOf _
6726     * @since 4.0.0
6727     * @category Array
6728     * @param {...Array} [arrays] The arrays to inspect.
6729     * @param {Function} [comparator] The comparator invoked per element.
6730     * @returns {Array} Returns the new array of combined values.
6731     * @example
6732     *
6733     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
6734     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
6735     *
6736     * _.unionWith(objects, others, _.isEqual);
6737     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
6738     */var unionWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined;return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),undefined,comparator);});/**
6739     * Creates a duplicate-free version of an array, using
6740     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6741     * for equality comparisons, in which only the first occurrence of each element
6742     * is kept. The order of result values is determined by the order they occur
6743     * in the array.
6744     *
6745     * @static
6746     * @memberOf _
6747     * @since 0.1.0
6748     * @category Array
6749     * @param {Array} array The array to inspect.
6750     * @returns {Array} Returns the new duplicate free array.
6751     * @example
6752     *
6753     * _.uniq([2, 1, 2]);
6754     * // => [2, 1]
6755     */function uniq(array){return array&&array.length?baseUniq(array):[];}/**
6756     * This method is like `_.uniq` except that it accepts `iteratee` which is
6757     * invoked for each element in `array` to generate the criterion by which
6758     * uniqueness is computed. The order of result values is determined by the
6759     * order they occur in the array. The iteratee is invoked with one argument:
6760     * (value).
6761     *
6762     * @static
6763     * @memberOf _
6764     * @since 4.0.0
6765     * @category Array
6766     * @param {Array} array The array to inspect.
6767     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6768     * @returns {Array} Returns the new duplicate free array.
6769     * @example
6770     *
6771     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
6772     * // => [2.1, 1.2]
6773     *
6774     * // The `_.property` iteratee shorthand.
6775     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
6776     * // => [{ 'x': 1 }, { 'x': 2 }]
6777     */function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[];}/**
6778     * This method is like `_.uniq` except that it accepts `comparator` which
6779     * is invoked to compare elements of `array`. The order of result values is
6780     * determined by the order they occur in the array.The comparator is invoked
6781     * with two arguments: (arrVal, othVal).
6782     *
6783     * @static
6784     * @memberOf _
6785     * @since 4.0.0
6786     * @category Array
6787     * @param {Array} array The array to inspect.
6788     * @param {Function} [comparator] The comparator invoked per element.
6789     * @returns {Array} Returns the new duplicate free array.
6790     * @example
6791     *
6792     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
6793     *
6794     * _.uniqWith(objects, _.isEqual);
6795     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
6796     */function uniqWith(array,comparator){comparator=typeof comparator=='function'?comparator:undefined;return array&&array.length?baseUniq(array,undefined,comparator):[];}/**
6797     * This method is like `_.zip` except that it accepts an array of grouped
6798     * elements and creates an array regrouping the elements to their pre-zip
6799     * configuration.
6800     *
6801     * @static
6802     * @memberOf _
6803     * @since 1.2.0
6804     * @category Array
6805     * @param {Array} array The array of grouped elements to process.
6806     * @returns {Array} Returns the new array of regrouped elements.
6807     * @example
6808     *
6809     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
6810     * // => [['a', 1, true], ['b', 2, false]]
6811     *
6812     * _.unzip(zipped);
6813     * // => [['a', 'b'], [1, 2], [true, false]]
6814     */function unzip(array){if(!(array&&array.length)){return[];}var length=0;array=arrayFilter(array,function(group){if(isArrayLikeObject(group)){length=nativeMax(group.length,length);return true;}});return baseTimes(length,function(index){return arrayMap(array,baseProperty(index));});}/**
6815     * This method is like `_.unzip` except that it accepts `iteratee` to specify
6816     * how regrouped values should be combined. The iteratee is invoked with the
6817     * elements of each group: (...group).
6818     *
6819     * @static
6820     * @memberOf _
6821     * @since 3.8.0
6822     * @category Array
6823     * @param {Array} array The array of grouped elements to process.
6824     * @param {Function} [iteratee=_.identity] The function to combine
6825     *  regrouped values.
6826     * @returns {Array} Returns the new array of regrouped elements.
6827     * @example
6828     *
6829     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
6830     * // => [[1, 10, 100], [2, 20, 200]]
6831     *
6832     * _.unzipWith(zipped, _.add);
6833     * // => [3, 30, 300]
6834     */function unzipWith(array,iteratee){if(!(array&&array.length)){return[];}var result=unzip(array);if(iteratee==null){return result;}return arrayMap(result,function(group){return apply(iteratee,undefined,group);});}/**
6835     * Creates an array excluding all given values using
6836     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6837     * for equality comparisons.
6838     *
6839     * **Note:** Unlike `_.pull`, this method returns a new array.
6840     *
6841     * @static
6842     * @memberOf _
6843     * @since 0.1.0
6844     * @category Array
6845     * @param {Array} array The array to inspect.
6846     * @param {...*} [values] The values to exclude.
6847     * @returns {Array} Returns the new array of filtered values.
6848     * @see _.difference, _.xor
6849     * @example
6850     *
6851     * _.without([2, 1, 2, 3], 1, 2);
6852     * // => [3]
6853     */var without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[];});/**
6854     * Creates an array of unique values that is the
6855     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
6856     * of the given arrays. The order of result values is determined by the order
6857     * they occur in the arrays.
6858     *
6859     * @static
6860     * @memberOf _
6861     * @since 2.4.0
6862     * @category Array
6863     * @param {...Array} [arrays] The arrays to inspect.
6864     * @returns {Array} Returns the new array of filtered values.
6865     * @see _.difference, _.without
6866     * @example
6867     *
6868     * _.xor([2, 1], [2, 3]);
6869     * // => [1, 3]
6870     */var xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject));});/**
6871     * This method is like `_.xor` except that it accepts `iteratee` which is
6872     * invoked for each element of each `arrays` to generate the criterion by
6873     * which by which they're compared. The order of result values is determined
6874     * by the order they occur in the arrays. The iteratee is invoked with one
6875     * argument: (value).
6876     *
6877     * @static
6878     * @memberOf _
6879     * @since 4.0.0
6880     * @category Array
6881     * @param {...Array} [arrays] The arrays to inspect.
6882     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
6883     * @returns {Array} Returns the new array of filtered values.
6884     * @example
6885     *
6886     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
6887     * // => [1.2, 3.4]
6888     *
6889     * // The `_.property` iteratee shorthand.
6890     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
6891     * // => [{ 'x': 2 }]
6892     */var xorBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2));});/**
6893     * This method is like `_.xor` except that it accepts `comparator` which is
6894     * invoked to compare elements of `arrays`. The order of result values is
6895     * determined by the order they occur in the arrays. The comparator is invoked
6896     * with two arguments: (arrVal, othVal).
6897     *
6898     * @static
6899     * @memberOf _
6900     * @since 4.0.0
6901     * @category Array
6902     * @param {...Array} [arrays] The arrays to inspect.
6903     * @param {Function} [comparator] The comparator invoked per element.
6904     * @returns {Array} Returns the new array of filtered values.
6905     * @example
6906     *
6907     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
6908     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
6909     *
6910     * _.xorWith(objects, others, _.isEqual);
6911     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
6912     */var xorWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined;return baseXor(arrayFilter(arrays,isArrayLikeObject),undefined,comparator);});/**
6913     * Creates an array of grouped elements, the first of which contains the
6914     * first elements of the given arrays, the second of which contains the
6915     * second elements of the given arrays, and so on.
6916     *
6917     * @static
6918     * @memberOf _
6919     * @since 0.1.0
6920     * @category Array
6921     * @param {...Array} [arrays] The arrays to process.
6922     * @returns {Array} Returns the new array of grouped elements.
6923     * @example
6924     *
6925     * _.zip(['a', 'b'], [1, 2], [true, false]);
6926     * // => [['a', 1, true], ['b', 2, false]]
6927     */var zip=baseRest(unzip);/**
6928     * This method is like `_.fromPairs` except that it accepts two arrays,
6929     * one of property identifiers and one of corresponding values.
6930     *
6931     * @static
6932     * @memberOf _
6933     * @since 0.4.0
6934     * @category Array
6935     * @param {Array} [props=[]] The property identifiers.
6936     * @param {Array} [values=[]] The property values.
6937     * @returns {Object} Returns the new object.
6938     * @example
6939     *
6940     * _.zipObject(['a', 'b'], [1, 2]);
6941     * // => { 'a': 1, 'b': 2 }
6942     */function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue);}/**
6943     * This method is like `_.zipObject` except that it supports property paths.
6944     *
6945     * @static
6946     * @memberOf _
6947     * @since 4.1.0
6948     * @category Array
6949     * @param {Array} [props=[]] The property identifiers.
6950     * @param {Array} [values=[]] The property values.
6951     * @returns {Object} Returns the new object.
6952     * @example
6953     *
6954     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
6955     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
6956     */function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet);}/**
6957     * This method is like `_.zip` except that it accepts `iteratee` to specify
6958     * how grouped values should be combined. The iteratee is invoked with the
6959     * elements of each group: (...group).
6960     *
6961     * @static
6962     * @memberOf _
6963     * @since 3.8.0
6964     * @category Array
6965     * @param {...Array} [arrays] The arrays to process.
6966     * @param {Function} [iteratee=_.identity] The function to combine
6967     *  grouped values.
6968     * @returns {Array} Returns the new array of grouped elements.
6969     * @example
6970     *
6971     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
6972     *   return a + b + c;
6973     * });
6974     * // => [111, 222]
6975     */var zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined;iteratee=typeof iteratee=='function'?(arrays.pop(),iteratee):undefined;return unzipWith(arrays,iteratee);});/*------------------------------------------------------------------------*/ /**
6976     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
6977     * chain sequences enabled. The result of such sequences must be unwrapped
6978     * with `_#value`.
6979     *
6980     * @static
6981     * @memberOf _
6982     * @since 1.3.0
6983     * @category Seq
6984     * @param {*} value The value to wrap.
6985     * @returns {Object} Returns the new `lodash` wrapper instance.
6986     * @example
6987     *
6988     * var users = [
6989     *   { 'user': 'barney',  'age': 36 },
6990     *   { 'user': 'fred',    'age': 40 },
6991     *   { 'user': 'pebbles', 'age': 1 }
6992     * ];
6993     *
6994     * var youngest = _
6995     *   .chain(users)
6996     *   .sortBy('age')
6997     *   .map(function(o) {
6998     *     return o.user + ' is ' + o.age;
6999     *   })
7000     *   .head()
7001     *   .value();
7002     * // => 'pebbles is 1'
7003     */function chain(value){var result=lodash(value);result.__chain__=true;return result;}/**
7004     * This method invokes `interceptor` and returns `value`. The interceptor
7005     * is invoked with one argument; (value). The purpose of this method is to
7006     * "tap into" a method chain sequence in order to modify intermediate results.
7007     *
7008     * @static
7009     * @memberOf _
7010     * @since 0.1.0
7011     * @category Seq
7012     * @param {*} value The value to provide to `interceptor`.
7013     * @param {Function} interceptor The function to invoke.
7014     * @returns {*} Returns `value`.
7015     * @example
7016     *
7017     * _([1, 2, 3])
7018     *  .tap(function(array) {
7019     *    // Mutate input array.
7020     *    array.pop();
7021     *  })
7022     *  .reverse()
7023     *  .value();
7024     * // => [2, 1]
7025     */function tap(value,interceptor){interceptor(value);return value;}/**
7026     * This method is like `_.tap` except that it returns the result of `interceptor`.
7027     * The purpose of this method is to "pass thru" values replacing intermediate
7028     * results in a method chain sequence.
7029     *
7030     * @static
7031     * @memberOf _
7032     * @since 3.0.0
7033     * @category Seq
7034     * @param {*} value The value to provide to `interceptor`.
7035     * @param {Function} interceptor The function to invoke.
7036     * @returns {*} Returns the result of `interceptor`.
7037     * @example
7038     *
7039     * _('  abc  ')
7040     *  .chain()
7041     *  .trim()
7042     *  .thru(function(value) {
7043     *    return [value];
7044     *  })
7045     *  .value();
7046     * // => ['abc']
7047     */function thru(value,interceptor){return interceptor(value);}/**
7048     * This method is the wrapper version of `_.at`.
7049     *
7050     * @name at
7051     * @memberOf _
7052     * @since 1.0.0
7053     * @category Seq
7054     * @param {...(string|string[])} [paths] The property paths to pick.
7055     * @returns {Object} Returns the new `lodash` wrapper instance.
7056     * @example
7057     *
7058     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
7059     *
7060     * _(object).at(['a[0].b.c', 'a[1]']).value();
7061     * // => [3, 4]
7062     */var wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function interceptor(object){return baseAt(object,paths);};if(length>1||this.__actions__.length||!(value instanceof LazyWrapper)||!isIndex(start)){return this.thru(interceptor);}value=value.slice(start,+start+(length?1:0));value.__actions__.push({'func':thru,'args':[interceptor],'thisArg':undefined});return new LodashWrapper(value,this.__chain__).thru(function(array){if(length&&!array.length){array.push(undefined);}return array;});});/**
7063     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
7064     *
7065     * @name chain
7066     * @memberOf _
7067     * @since 0.1.0
7068     * @category Seq
7069     * @returns {Object} Returns the new `lodash` wrapper instance.
7070     * @example
7071     *
7072     * var users = [
7073     *   { 'user': 'barney', 'age': 36 },
7074     *   { 'user': 'fred',   'age': 40 }
7075     * ];
7076     *
7077     * // A sequence without explicit chaining.
7078     * _(users).head();
7079     * // => { 'user': 'barney', 'age': 36 }
7080     *
7081     * // A sequence with explicit chaining.
7082     * _(users)
7083     *   .chain()
7084     *   .head()
7085     *   .pick('user')
7086     *   .value();
7087     * // => { 'user': 'barney' }
7088     */function wrapperChain(){return chain(this);}/**
7089     * Executes the chain sequence and returns the wrapped result.
7090     *
7091     * @name commit
7092     * @memberOf _
7093     * @since 3.2.0
7094     * @category Seq
7095     * @returns {Object} Returns the new `lodash` wrapper instance.
7096     * @example
7097     *
7098     * var array = [1, 2];
7099     * var wrapped = _(array).push(3);
7100     *
7101     * console.log(array);
7102     * // => [1, 2]
7103     *
7104     * wrapped = wrapped.commit();
7105     * console.log(array);
7106     * // => [1, 2, 3]
7107     *
7108     * wrapped.last();
7109     * // => 3
7110     *
7111     * console.log(array);
7112     * // => [1, 2, 3]
7113     */function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__);}/**
7114     * Gets the next value on a wrapped object following the
7115     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
7116     *
7117     * @name next
7118     * @memberOf _
7119     * @since 4.0.0
7120     * @category Seq
7121     * @returns {Object} Returns the next iterator value.
7122     * @example
7123     *
7124     * var wrapped = _([1, 2]);
7125     *
7126     * wrapped.next();
7127     * // => { 'done': false, 'value': 1 }
7128     *
7129     * wrapped.next();
7130     * // => { 'done': false, 'value': 2 }
7131     *
7132     * wrapped.next();
7133     * // => { 'done': true, 'value': undefined }
7134     */function wrapperNext(){if(this.__values__===undefined){this.__values__=toArray(this.value());}var done=this.__index__>=this.__values__.length,value=done?undefined:this.__values__[this.__index__++];return{'done':done,'value':value};}/**
7135     * Enables the wrapper to be iterable.
7136     *
7137     * @name Symbol.iterator
7138     * @memberOf _
7139     * @since 4.0.0
7140     * @category Seq
7141     * @returns {Object} Returns the wrapper object.
7142     * @example
7143     *
7144     * var wrapped = _([1, 2]);
7145     *
7146     * wrapped[Symbol.iterator]() === wrapped;
7147     * // => true
7148     *
7149     * Array.from(wrapped);
7150     * // => [1, 2]
7151     */function wrapperToIterator(){return this;}/**
7152     * Creates a clone of the chain sequence planting `value` as the wrapped value.
7153     *
7154     * @name plant
7155     * @memberOf _
7156     * @since 3.2.0
7157     * @category Seq
7158     * @param {*} value The value to plant.
7159     * @returns {Object} Returns the new `lodash` wrapper instance.
7160     * @example
7161     *
7162     * function square(n) {
7163     *   return n * n;
7164     * }
7165     *
7166     * var wrapped = _([1, 2]).map(square);
7167     * var other = wrapped.plant([3, 4]);
7168     *
7169     * other.value();
7170     * // => [9, 16]
7171     *
7172     * wrapped.value();
7173     * // => [1, 4]
7174     */function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);clone.__index__=0;clone.__values__=undefined;if(result){previous.__wrapped__=clone;}else{result=clone;}var previous=clone;parent=parent.__wrapped__;}previous.__wrapped__=value;return result;}/**
7175     * This method is the wrapper version of `_.reverse`.
7176     *
7177     * **Note:** This method mutates the wrapped array.
7178     *
7179     * @name reverse
7180     * @memberOf _
7181     * @since 0.1.0
7182     * @category Seq
7183     * @returns {Object} Returns the new `lodash` wrapper instance.
7184     * @example
7185     *
7186     * var array = [1, 2, 3];
7187     *
7188     * _(array).reverse().value()
7189     * // => [3, 2, 1]
7190     *
7191     * console.log(array);
7192     * // => [3, 2, 1]
7193     */function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this);}wrapped=wrapped.reverse();wrapped.__actions__.push({'func':thru,'args':[reverse],'thisArg':undefined});return new LodashWrapper(wrapped,this.__chain__);}return this.thru(reverse);}/**
7194     * Executes the chain sequence to resolve the unwrapped value.
7195     *
7196     * @name value
7197     * @memberOf _
7198     * @since 0.1.0
7199     * @alias toJSON, valueOf
7200     * @category Seq
7201     * @returns {*} Returns the resolved unwrapped value.
7202     * @example
7203     *
7204     * _([1, 2, 3]).value();
7205     * // => [1, 2, 3]
7206     */function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__);}/*------------------------------------------------------------------------*/ /**
7207     * Creates an object composed of keys generated from the results of running
7208     * each element of `collection` thru `iteratee`. The corresponding value of
7209     * each key is the number of times the key was returned by `iteratee`. The
7210     * iteratee is invoked with one argument: (value).
7211     *
7212     * @static
7213     * @memberOf _
7214     * @since 0.5.0
7215     * @category Collection
7216     * @param {Array|Object} collection The collection to iterate over.
7217     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
7218     * @returns {Object} Returns the composed aggregate object.
7219     * @example
7220     *
7221     * _.countBy([6.1, 4.2, 6.3], Math.floor);
7222     * // => { '4': 1, '6': 2 }
7223     *
7224     * // The `_.property` iteratee shorthand.
7225     * _.countBy(['one', 'two', 'three'], 'length');
7226     * // => { '3': 2, '5': 1 }
7227     */var countBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){++result[key];}else{baseAssignValue(result,key,1);}});/**
7228     * Checks if `predicate` returns truthy for **all** elements of `collection`.
7229     * Iteration is stopped once `predicate` returns falsey. The predicate is
7230     * invoked with three arguments: (value, index|key, collection).
7231     *
7232     * **Note:** This method returns `true` for
7233     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
7234     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
7235     * elements of empty collections.
7236     *
7237     * @static
7238     * @memberOf _
7239     * @since 0.1.0
7240     * @category Collection
7241     * @param {Array|Object} collection The collection to iterate over.
7242     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7243     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7244     * @returns {boolean} Returns `true` if all elements pass the predicate check,
7245     *  else `false`.
7246     * @example
7247     *
7248     * _.every([true, 1, null, 'yes'], Boolean);
7249     * // => false
7250     *
7251     * var users = [
7252     *   { 'user': 'barney', 'age': 36, 'active': false },
7253     *   { 'user': 'fred',   'age': 40, 'active': false }
7254     * ];
7255     *
7256     * // The `_.matches` iteratee shorthand.
7257     * _.every(users, { 'user': 'barney', 'active': false });
7258     * // => false
7259     *
7260     * // The `_.matchesProperty` iteratee shorthand.
7261     * _.every(users, ['active', false]);
7262     * // => true
7263     *
7264     * // The `_.property` iteratee shorthand.
7265     * _.every(users, 'active');
7266     * // => false
7267     */function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined;}return func(collection,getIteratee(predicate,3));}/**
7268     * Iterates over elements of `collection`, returning an array of all elements
7269     * `predicate` returns truthy for. The predicate is invoked with three
7270     * arguments: (value, index|key, collection).
7271     *
7272     * **Note:** Unlike `_.remove`, this method returns a new array.
7273     *
7274     * @static
7275     * @memberOf _
7276     * @since 0.1.0
7277     * @category Collection
7278     * @param {Array|Object} collection The collection to iterate over.
7279     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7280     * @returns {Array} Returns the new filtered array.
7281     * @see _.reject
7282     * @example
7283     *
7284     * var users = [
7285     *   { 'user': 'barney', 'age': 36, 'active': true },
7286     *   { 'user': 'fred',   'age': 40, 'active': false }
7287     * ];
7288     *
7289     * _.filter(users, function(o) { return !o.active; });
7290     * // => objects for ['fred']
7291     *
7292     * // The `_.matches` iteratee shorthand.
7293     * _.filter(users, { 'age': 36, 'active': true });
7294     * // => objects for ['barney']
7295     *
7296     * // The `_.matchesProperty` iteratee shorthand.
7297     * _.filter(users, ['active', false]);
7298     * // => objects for ['fred']
7299     *
7300     * // The `_.property` iteratee shorthand.
7301     * _.filter(users, 'active');
7302     * // => objects for ['barney']
7303     *
7304     * // Combining several predicates using `_.overEvery` or `_.overSome`.
7305     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
7306     * // => objects for ['fred', 'barney']
7307     */function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3));}/**
7308     * Iterates over elements of `collection`, returning the first element
7309     * `predicate` returns truthy for. The predicate is invoked with three
7310     * arguments: (value, index|key, collection).
7311     *
7312     * @static
7313     * @memberOf _
7314     * @since 0.1.0
7315     * @category Collection
7316     * @param {Array|Object} collection The collection to inspect.
7317     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7318     * @param {number} [fromIndex=0] The index to search from.
7319     * @returns {*} Returns the matched element, else `undefined`.
7320     * @example
7321     *
7322     * var users = [
7323     *   { 'user': 'barney',  'age': 36, 'active': true },
7324     *   { 'user': 'fred',    'age': 40, 'active': false },
7325     *   { 'user': 'pebbles', 'age': 1,  'active': true }
7326     * ];
7327     *
7328     * _.find(users, function(o) { return o.age < 40; });
7329     * // => object for 'barney'
7330     *
7331     * // The `_.matches` iteratee shorthand.
7332     * _.find(users, { 'age': 1, 'active': true });
7333     * // => object for 'pebbles'
7334     *
7335     * // The `_.matchesProperty` iteratee shorthand.
7336     * _.find(users, ['active', false]);
7337     * // => object for 'fred'
7338     *
7339     * // The `_.property` iteratee shorthand.
7340     * _.find(users, 'active');
7341     * // => object for 'barney'
7342     */var find=createFind(findIndex);/**
7343     * This method is like `_.find` except that it iterates over elements of
7344     * `collection` from right to left.
7345     *
7346     * @static
7347     * @memberOf _
7348     * @since 2.0.0
7349     * @category Collection
7350     * @param {Array|Object} collection The collection to inspect.
7351     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7352     * @param {number} [fromIndex=collection.length-1] The index to search from.
7353     * @returns {*} Returns the matched element, else `undefined`.
7354     * @example
7355     *
7356     * _.findLast([1, 2, 3, 4], function(n) {
7357     *   return n % 2 == 1;
7358     * });
7359     * // => 3
7360     */var findLast=createFind(findLastIndex);/**
7361     * Creates a flattened array of values by running each element in `collection`
7362     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
7363     * with three arguments: (value, index|key, collection).
7364     *
7365     * @static
7366     * @memberOf _
7367     * @since 4.0.0
7368     * @category Collection
7369     * @param {Array|Object} collection The collection to iterate over.
7370     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7371     * @returns {Array} Returns the new flattened array.
7372     * @example
7373     *
7374     * function duplicate(n) {
7375     *   return [n, n];
7376     * }
7377     *
7378     * _.flatMap([1, 2], duplicate);
7379     * // => [1, 1, 2, 2]
7380     */function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1);}/**
7381     * This method is like `_.flatMap` except that it recursively flattens the
7382     * mapped results.
7383     *
7384     * @static
7385     * @memberOf _
7386     * @since 4.7.0
7387     * @category Collection
7388     * @param {Array|Object} collection The collection to iterate over.
7389     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7390     * @returns {Array} Returns the new flattened array.
7391     * @example
7392     *
7393     * function duplicate(n) {
7394     *   return [[[n, n]]];
7395     * }
7396     *
7397     * _.flatMapDeep([1, 2], duplicate);
7398     * // => [1, 1, 2, 2]
7399     */function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY);}/**
7400     * This method is like `_.flatMap` except that it recursively flattens the
7401     * mapped results up to `depth` times.
7402     *
7403     * @static
7404     * @memberOf _
7405     * @since 4.7.0
7406     * @category Collection
7407     * @param {Array|Object} collection The collection to iterate over.
7408     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7409     * @param {number} [depth=1] The maximum recursion depth.
7410     * @returns {Array} Returns the new flattened array.
7411     * @example
7412     *
7413     * function duplicate(n) {
7414     *   return [[[n, n]]];
7415     * }
7416     *
7417     * _.flatMapDepth([1, 2], duplicate, 2);
7418     * // => [[1, 1], [2, 2]]
7419     */function flatMapDepth(collection,iteratee,depth){depth=depth===undefined?1:toInteger(depth);return baseFlatten(map(collection,iteratee),depth);}/**
7420     * Iterates over elements of `collection` and invokes `iteratee` for each element.
7421     * The iteratee is invoked with three arguments: (value, index|key, collection).
7422     * Iteratee functions may exit iteration early by explicitly returning `false`.
7423     *
7424     * **Note:** As with other "Collections" methods, objects with a "length"
7425     * property are iterated like arrays. To avoid this behavior use `_.forIn`
7426     * or `_.forOwn` for object iteration.
7427     *
7428     * @static
7429     * @memberOf _
7430     * @since 0.1.0
7431     * @alias each
7432     * @category Collection
7433     * @param {Array|Object} collection The collection to iterate over.
7434     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7435     * @returns {Array|Object} Returns `collection`.
7436     * @see _.forEachRight
7437     * @example
7438     *
7439     * _.forEach([1, 2], function(value) {
7440     *   console.log(value);
7441     * });
7442     * // => Logs `1` then `2`.
7443     *
7444     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
7445     *   console.log(key);
7446     * });
7447     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
7448     */function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3));}/**
7449     * This method is like `_.forEach` except that it iterates over elements of
7450     * `collection` from right to left.
7451     *
7452     * @static
7453     * @memberOf _
7454     * @since 2.0.0
7455     * @alias eachRight
7456     * @category Collection
7457     * @param {Array|Object} collection The collection to iterate over.
7458     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7459     * @returns {Array|Object} Returns `collection`.
7460     * @see _.forEach
7461     * @example
7462     *
7463     * _.forEachRight([1, 2], function(value) {
7464     *   console.log(value);
7465     * });
7466     * // => Logs `2` then `1`.
7467     */function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3));}/**
7468     * Creates an object composed of keys generated from the results of running
7469     * each element of `collection` thru `iteratee`. The order of grouped values
7470     * is determined by the order they occur in `collection`. The corresponding
7471     * value of each key is an array of elements responsible for generating the
7472     * key. The iteratee is invoked with one argument: (value).
7473     *
7474     * @static
7475     * @memberOf _
7476     * @since 0.1.0
7477     * @category Collection
7478     * @param {Array|Object} collection The collection to iterate over.
7479     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
7480     * @returns {Object} Returns the composed aggregate object.
7481     * @example
7482     *
7483     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
7484     * // => { '4': [4.2], '6': [6.1, 6.3] }
7485     *
7486     * // The `_.property` iteratee shorthand.
7487     * _.groupBy(['one', 'two', 'three'], 'length');
7488     * // => { '3': ['one', 'two'], '5': ['three'] }
7489     */var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value);}else{baseAssignValue(result,key,[value]);}});/**
7490     * Checks if `value` is in `collection`. If `collection` is a string, it's
7491     * checked for a substring of `value`, otherwise
7492     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
7493     * is used for equality comparisons. If `fromIndex` is negative, it's used as
7494     * the offset from the end of `collection`.
7495     *
7496     * @static
7497     * @memberOf _
7498     * @since 0.1.0
7499     * @category Collection
7500     * @param {Array|Object|string} collection The collection to inspect.
7501     * @param {*} value The value to search for.
7502     * @param {number} [fromIndex=0] The index to search from.
7503     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
7504     * @returns {boolean} Returns `true` if `value` is found, else `false`.
7505     * @example
7506     *
7507     * _.includes([1, 2, 3], 1);
7508     * // => true
7509     *
7510     * _.includes([1, 2, 3], 1, 2);
7511     * // => false
7512     *
7513     * _.includes({ 'a': 1, 'b': 2 }, 1);
7514     * // => true
7515     *
7516     * _.includes('abcd', 'bc');
7517     * // => true
7518     */function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection);fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;if(fromIndex<0){fromIndex=nativeMax(length+fromIndex,0);}return isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1;}/**
7519     * Invokes the method at `path` of each element in `collection`, returning
7520     * an array of the results of each invoked method. Any additional arguments
7521     * are provided to each invoked method. If `path` is a function, it's invoked
7522     * for, and `this` bound to, each element in `collection`.
7523     *
7524     * @static
7525     * @memberOf _
7526     * @since 4.0.0
7527     * @category Collection
7528     * @param {Array|Object} collection The collection to iterate over.
7529     * @param {Array|Function|string} path The path of the method to invoke or
7530     *  the function invoked per iteration.
7531     * @param {...*} [args] The arguments to invoke each method with.
7532     * @returns {Array} Returns the array of results.
7533     * @example
7534     *
7535     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
7536     * // => [[1, 5, 7], [1, 2, 3]]
7537     *
7538     * _.invokeMap([123, 456], String.prototype.split, '');
7539     * // => [['1', '2', '3'], ['4', '5', '6']]
7540     */var invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc=typeof path=='function',result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args);});return result;});/**
7541     * Creates an object composed of keys generated from the results of running
7542     * each element of `collection` thru `iteratee`. The corresponding value of
7543     * each key is the last element responsible for generating the key. The
7544     * iteratee is invoked with one argument: (value).
7545     *
7546     * @static
7547     * @memberOf _
7548     * @since 4.0.0
7549     * @category Collection
7550     * @param {Array|Object} collection The collection to iterate over.
7551     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
7552     * @returns {Object} Returns the composed aggregate object.
7553     * @example
7554     *
7555     * var array = [
7556     *   { 'dir': 'left', 'code': 97 },
7557     *   { 'dir': 'right', 'code': 100 }
7558     * ];
7559     *
7560     * _.keyBy(array, function(o) {
7561     *   return String.fromCharCode(o.code);
7562     * });
7563     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
7564     *
7565     * _.keyBy(array, 'dir');
7566     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
7567     */var keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value);});/**
7568     * Creates an array of values by running each element in `collection` thru
7569     * `iteratee`. The iteratee is invoked with three arguments:
7570     * (value, index|key, collection).
7571     *
7572     * Many lodash methods are guarded to work as iteratees for methods like
7573     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
7574     *
7575     * The guarded methods are:
7576     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
7577     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
7578     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
7579     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
7580     *
7581     * @static
7582     * @memberOf _
7583     * @since 0.1.0
7584     * @category Collection
7585     * @param {Array|Object} collection The collection to iterate over.
7586     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7587     * @returns {Array} Returns the new mapped array.
7588     * @example
7589     *
7590     * function square(n) {
7591     *   return n * n;
7592     * }
7593     *
7594     * _.map([4, 8], square);
7595     * // => [16, 64]
7596     *
7597     * _.map({ 'a': 4, 'b': 8 }, square);
7598     * // => [16, 64] (iteration order is not guaranteed)
7599     *
7600     * var users = [
7601     *   { 'user': 'barney' },
7602     *   { 'user': 'fred' }
7603     * ];
7604     *
7605     * // The `_.property` iteratee shorthand.
7606     * _.map(users, 'user');
7607     * // => ['barney', 'fred']
7608     */function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3));}/**
7609     * This method is like `_.sortBy` except that it allows specifying the sort
7610     * orders of the iteratees to sort by. If `orders` is unspecified, all values
7611     * are sorted in ascending order. Otherwise, specify an order of "desc" for
7612     * descending or "asc" for ascending sort order of corresponding values.
7613     *
7614     * @static
7615     * @memberOf _
7616     * @since 4.0.0
7617     * @category Collection
7618     * @param {Array|Object} collection The collection to iterate over.
7619     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
7620     *  The iteratees to sort by.
7621     * @param {string[]} [orders] The sort orders of `iteratees`.
7622     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
7623     * @returns {Array} Returns the new sorted array.
7624     * @example
7625     *
7626     * var users = [
7627     *   { 'user': 'fred',   'age': 48 },
7628     *   { 'user': 'barney', 'age': 34 },
7629     *   { 'user': 'fred',   'age': 40 },
7630     *   { 'user': 'barney', 'age': 36 }
7631     * ];
7632     *
7633     * // Sort by `user` in ascending order and by `age` in descending order.
7634     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
7635     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
7636     */function orderBy(collection,iteratees,orders,guard){if(collection==null){return[];}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees];}orders=guard?undefined:orders;if(!isArray(orders)){orders=orders==null?[]:[orders];}return baseOrderBy(collection,iteratees,orders);}/**
7637     * Creates an array of elements split into two groups, the first of which
7638     * contains elements `predicate` returns truthy for, the second of which
7639     * contains elements `predicate` returns falsey for. The predicate is
7640     * invoked with one argument: (value).
7641     *
7642     * @static
7643     * @memberOf _
7644     * @since 3.0.0
7645     * @category Collection
7646     * @param {Array|Object} collection The collection to iterate over.
7647     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7648     * @returns {Array} Returns the array of grouped elements.
7649     * @example
7650     *
7651     * var users = [
7652     *   { 'user': 'barney',  'age': 36, 'active': false },
7653     *   { 'user': 'fred',    'age': 40, 'active': true },
7654     *   { 'user': 'pebbles', 'age': 1,  'active': false }
7655     * ];
7656     *
7657     * _.partition(users, function(o) { return o.active; });
7658     * // => objects for [['fred'], ['barney', 'pebbles']]
7659     *
7660     * // The `_.matches` iteratee shorthand.
7661     * _.partition(users, { 'age': 1, 'active': false });
7662     * // => objects for [['pebbles'], ['barney', 'fred']]
7663     *
7664     * // The `_.matchesProperty` iteratee shorthand.
7665     * _.partition(users, ['active', false]);
7666     * // => objects for [['barney', 'pebbles'], ['fred']]
7667     *
7668     * // The `_.property` iteratee shorthand.
7669     * _.partition(users, 'active');
7670     * // => objects for [['fred'], ['barney', 'pebbles']]
7671     */var partition=createAggregator(function(result,value,key){result[key?0:1].push(value);},function(){return[[],[]];});/**
7672     * Reduces `collection` to a value which is the accumulated result of running
7673     * each element in `collection` thru `iteratee`, where each successive
7674     * invocation is supplied the return value of the previous. If `accumulator`
7675     * is not given, the first element of `collection` is used as the initial
7676     * value. The iteratee is invoked with four arguments:
7677     * (accumulator, value, index|key, collection).
7678     *
7679     * Many lodash methods are guarded to work as iteratees for methods like
7680     * `_.reduce`, `_.reduceRight`, and `_.transform`.
7681     *
7682     * The guarded methods are:
7683     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
7684     * and `sortBy`
7685     *
7686     * @static
7687     * @memberOf _
7688     * @since 0.1.0
7689     * @category Collection
7690     * @param {Array|Object} collection The collection to iterate over.
7691     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7692     * @param {*} [accumulator] The initial value.
7693     * @returns {*} Returns the accumulated value.
7694     * @see _.reduceRight
7695     * @example
7696     *
7697     * _.reduce([1, 2], function(sum, n) {
7698     *   return sum + n;
7699     * }, 0);
7700     * // => 3
7701     *
7702     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
7703     *   (result[value] || (result[value] = [])).push(key);
7704     *   return result;
7705     * }, {});
7706     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
7707     */function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach);}/**
7708     * This method is like `_.reduce` except that it iterates over elements of
7709     * `collection` from right to left.
7710     *
7711     * @static
7712     * @memberOf _
7713     * @since 0.1.0
7714     * @category Collection
7715     * @param {Array|Object} collection The collection to iterate over.
7716     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7717     * @param {*} [accumulator] The initial value.
7718     * @returns {*} Returns the accumulated value.
7719     * @see _.reduce
7720     * @example
7721     *
7722     * var array = [[0, 1], [2, 3], [4, 5]];
7723     *
7724     * _.reduceRight(array, function(flattened, other) {
7725     *   return flattened.concat(other);
7726     * }, []);
7727     * // => [4, 5, 2, 3, 0, 1]
7728     */function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight);}/**
7729     * The opposite of `_.filter`; this method returns the elements of `collection`
7730     * that `predicate` does **not** return truthy for.
7731     *
7732     * @static
7733     * @memberOf _
7734     * @since 0.1.0
7735     * @category Collection
7736     * @param {Array|Object} collection The collection to iterate over.
7737     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7738     * @returns {Array} Returns the new filtered array.
7739     * @see _.filter
7740     * @example
7741     *
7742     * var users = [
7743     *   { 'user': 'barney', 'age': 36, 'active': false },
7744     *   { 'user': 'fred',   'age': 40, 'active': true }
7745     * ];
7746     *
7747     * _.reject(users, function(o) { return !o.active; });
7748     * // => objects for ['fred']
7749     *
7750     * // The `_.matches` iteratee shorthand.
7751     * _.reject(users, { 'age': 40, 'active': true });
7752     * // => objects for ['barney']
7753     *
7754     * // The `_.matchesProperty` iteratee shorthand.
7755     * _.reject(users, ['active', false]);
7756     * // => objects for ['fred']
7757     *
7758     * // The `_.property` iteratee shorthand.
7759     * _.reject(users, 'active');
7760     * // => objects for ['barney']
7761     */function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(getIteratee(predicate,3)));}/**
7762     * Gets a random element from `collection`.
7763     *
7764     * @static
7765     * @memberOf _
7766     * @since 2.0.0
7767     * @category Collection
7768     * @param {Array|Object} collection The collection to sample.
7769     * @returns {*} Returns the random element.
7770     * @example
7771     *
7772     * _.sample([1, 2, 3, 4]);
7773     * // => 2
7774     */function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection);}/**
7775     * Gets `n` random elements at unique keys from `collection` up to the
7776     * size of `collection`.
7777     *
7778     * @static
7779     * @memberOf _
7780     * @since 4.0.0
7781     * @category Collection
7782     * @param {Array|Object} collection The collection to sample.
7783     * @param {number} [n=1] The number of elements to sample.
7784     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7785     * @returns {Array} Returns the random elements.
7786     * @example
7787     *
7788     * _.sampleSize([1, 2, 3], 2);
7789     * // => [3, 1]
7790     *
7791     * _.sampleSize([1, 2, 3], 4);
7792     * // => [2, 3, 1]
7793     */function sampleSize(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n===undefined){n=1;}else{n=toInteger(n);}var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n);}/**
7794     * Creates an array of shuffled values, using a version of the
7795     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
7796     *
7797     * @static
7798     * @memberOf _
7799     * @since 0.1.0
7800     * @category Collection
7801     * @param {Array|Object} collection The collection to shuffle.
7802     * @returns {Array} Returns the new shuffled array.
7803     * @example
7804     *
7805     * _.shuffle([1, 2, 3, 4]);
7806     * // => [4, 1, 3, 2]
7807     */function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection);}/**
7808     * Gets the size of `collection` by returning its length for array-like
7809     * values or the number of own enumerable string keyed properties for objects.
7810     *
7811     * @static
7812     * @memberOf _
7813     * @since 0.1.0
7814     * @category Collection
7815     * @param {Array|Object|string} collection The collection to inspect.
7816     * @returns {number} Returns the collection size.
7817     * @example
7818     *
7819     * _.size([1, 2, 3]);
7820     * // => 3
7821     *
7822     * _.size({ 'a': 1, 'b': 2 });
7823     * // => 2
7824     *
7825     * _.size('pebbles');
7826     * // => 7
7827     */function size(collection){if(collection==null){return 0;}if(isArrayLike(collection)){return isString(collection)?stringSize(collection):collection.length;}var tag=getTag(collection);if(tag==mapTag||tag==setTag){return collection.size;}return baseKeys(collection).length;}/**
7828     * Checks if `predicate` returns truthy for **any** element of `collection`.
7829     * Iteration is stopped once `predicate` returns truthy. The predicate is
7830     * invoked with three arguments: (value, index|key, collection).
7831     *
7832     * @static
7833     * @memberOf _
7834     * @since 0.1.0
7835     * @category Collection
7836     * @param {Array|Object} collection The collection to iterate over.
7837     * @param {Function} [predicate=_.identity] The function invoked per iteration.
7838     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7839     * @returns {boolean} Returns `true` if any element passes the predicate check,
7840     *  else `false`.
7841     * @example
7842     *
7843     * _.some([null, 0, 'yes', false], Boolean);
7844     * // => true
7845     *
7846     * var users = [
7847     *   { 'user': 'barney', 'active': true },
7848     *   { 'user': 'fred',   'active': false }
7849     * ];
7850     *
7851     * // The `_.matches` iteratee shorthand.
7852     * _.some(users, { 'user': 'barney', 'active': false });
7853     * // => false
7854     *
7855     * // The `_.matchesProperty` iteratee shorthand.
7856     * _.some(users, ['active', false]);
7857     * // => true
7858     *
7859     * // The `_.property` iteratee shorthand.
7860     * _.some(users, 'active');
7861     * // => true
7862     */function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined;}return func(collection,getIteratee(predicate,3));}/**
7863     * Creates an array of elements, sorted in ascending order by the results of
7864     * running each element in a collection thru each iteratee. This method
7865     * performs a stable sort, that is, it preserves the original sort order of
7866     * equal elements. The iteratees are invoked with one argument: (value).
7867     *
7868     * @static
7869     * @memberOf _
7870     * @since 0.1.0
7871     * @category Collection
7872     * @param {Array|Object} collection The collection to iterate over.
7873     * @param {...(Function|Function[])} [iteratees=[_.identity]]
7874     *  The iteratees to sort by.
7875     * @returns {Array} Returns the new sorted array.
7876     * @example
7877     *
7878     * var users = [
7879     *   { 'user': 'fred',   'age': 48 },
7880     *   { 'user': 'barney', 'age': 36 },
7881     *   { 'user': 'fred',   'age': 30 },
7882     *   { 'user': 'barney', 'age': 34 }
7883     * ];
7884     *
7885     * _.sortBy(users, [function(o) { return o.user; }]);
7886     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
7887     *
7888     * _.sortBy(users, ['user', 'age']);
7889     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
7890     */var sortBy=baseRest(function(collection,iteratees){if(collection==null){return[];}var length=iteratees.length;if(length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])){iteratees=[];}else if(length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])){iteratees=[iteratees[0]];}return baseOrderBy(collection,baseFlatten(iteratees,1),[]);});/*------------------------------------------------------------------------*/ /**
7891     * Gets the timestamp of the number of milliseconds that have elapsed since
7892     * the Unix epoch (1 January 1970 00:00:00 UTC).
7893     *
7894     * @static
7895     * @memberOf _
7896     * @since 2.4.0
7897     * @category Date
7898     * @returns {number} Returns the timestamp.
7899     * @example
7900     *
7901     * _.defer(function(stamp) {
7902     *   console.log(_.now() - stamp);
7903     * }, _.now());
7904     * // => Logs the number of milliseconds it took for the deferred invocation.
7905     */var now=ctxNow||function(){return root.Date.now();};/*------------------------------------------------------------------------*/ /**
7906     * The opposite of `_.before`; this method creates a function that invokes
7907     * `func` once it's called `n` or more times.
7908     *
7909     * @static
7910     * @memberOf _
7911     * @since 0.1.0
7912     * @category Function
7913     * @param {number} n The number of calls before `func` is invoked.
7914     * @param {Function} func The function to restrict.
7915     * @returns {Function} Returns the new restricted function.
7916     * @example
7917     *
7918     * var saves = ['profile', 'settings'];
7919     *
7920     * var done = _.after(saves.length, function() {
7921     *   console.log('done saving!');
7922     * });
7923     *
7924     * _.forEach(saves, function(type) {
7925     *   asyncSave({ 'type': type, 'complete': done });
7926     * });
7927     * // => Logs 'done saving!' after the two async saves have completed.
7928     */function after(n,func){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n<1){return func.apply(this,arguments);}};}/**
7929     * Creates a function that invokes `func`, with up to `n` arguments,
7930     * ignoring any additional arguments.
7931     *
7932     * @static
7933     * @memberOf _
7934     * @since 3.0.0
7935     * @category Function
7936     * @param {Function} func The function to cap arguments for.
7937     * @param {number} [n=func.length] The arity cap.
7938     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7939     * @returns {Function} Returns the new capped function.
7940     * @example
7941     *
7942     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
7943     * // => [6, 8, 10]
7944     */function ary(func,n,guard){n=guard?undefined:n;n=func&&n==null?func.length:n;return createWrap(func,WRAP_ARY_FLAG,undefined,undefined,undefined,undefined,n);}/**
7945     * Creates a function that invokes `func`, with the `this` binding and arguments
7946     * of the created function, while it's called less than `n` times. Subsequent
7947     * calls to the created function return the result of the last `func` invocation.
7948     *
7949     * @static
7950     * @memberOf _
7951     * @since 3.0.0
7952     * @category Function
7953     * @param {number} n The number of calls at which `func` is no longer invoked.
7954     * @param {Function} func The function to restrict.
7955     * @returns {Function} Returns the new restricted function.
7956     * @example
7957     *
7958     * jQuery(element).on('click', _.before(5, addContactToList));
7959     * // => Allows adding up to 4 contacts to the list.
7960     */function before(n,func){var result;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n>0){result=func.apply(this,arguments);}if(n<=1){func=undefined;}return result;};}/**
7961     * Creates a function that invokes `func` with the `this` binding of `thisArg`
7962     * and `partials` prepended to the arguments it receives.
7963     *
7964     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
7965     * may be used as a placeholder for partially applied arguments.
7966     *
7967     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
7968     * property of bound functions.
7969     *
7970     * @static
7971     * @memberOf _
7972     * @since 0.1.0
7973     * @category Function
7974     * @param {Function} func The function to bind.
7975     * @param {*} thisArg The `this` binding of `func`.
7976     * @param {...*} [partials] The arguments to be partially applied.
7977     * @returns {Function} Returns the new bound function.
7978     * @example
7979     *
7980     * function greet(greeting, punctuation) {
7981     *   return greeting + ' ' + this.user + punctuation;
7982     * }
7983     *
7984     * var object = { 'user': 'fred' };
7985     *
7986     * var bound = _.bind(greet, object, 'hi');
7987     * bound('!');
7988     * // => 'hi fred!'
7989     *
7990     * // Bound with placeholders.
7991     * var bound = _.bind(greet, object, _, '!');
7992     * bound('hi');
7993     * // => 'hi fred!'
7994     */var bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(func,bitmask,thisArg,partials,holders);});/**
7995     * Creates a function that invokes the method at `object[key]` with `partials`
7996     * prepended to the arguments it receives.
7997     *
7998     * This method differs from `_.bind` by allowing bound functions to reference
7999     * methods that may be redefined or don't yet exist. See
8000     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
8001     * for more details.
8002     *
8003     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
8004     * builds, may be used as a placeholder for partially applied arguments.
8005     *
8006     * @static
8007     * @memberOf _
8008     * @since 0.10.0
8009     * @category Function
8010     * @param {Object} object The object to invoke the method on.
8011     * @param {string} key The key of the method.
8012     * @param {...*} [partials] The arguments to be partially applied.
8013     * @returns {Function} Returns the new bound function.
8014     * @example
8015     *
8016     * var object = {
8017     *   'user': 'fred',
8018     *   'greet': function(greeting, punctuation) {
8019     *     return greeting + ' ' + this.user + punctuation;
8020     *   }
8021     * };
8022     *
8023     * var bound = _.bindKey(object, 'greet', 'hi');
8024     * bound('!');
8025     * // => 'hi fred!'
8026     *
8027     * object.greet = function(greeting, punctuation) {
8028     *   return greeting + 'ya ' + this.user + punctuation;
8029     * };
8030     *
8031     * bound('!');
8032     * // => 'hiya fred!'
8033     *
8034     * // Bound with placeholders.
8035     * var bound = _.bindKey(object, 'greet', _, '!');
8036     * bound('hi');
8037     * // => 'hiya fred!'
8038     */var bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(key,bitmask,object,partials,holders);});/**
8039     * Creates a function that accepts arguments of `func` and either invokes
8040     * `func` returning its result, if at least `arity` number of arguments have
8041     * been provided, or returns a function that accepts the remaining `func`
8042     * arguments, and so on. The arity of `func` may be specified if `func.length`
8043     * is not sufficient.
8044     *
8045     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
8046     * may be used as a placeholder for provided arguments.
8047     *
8048     * **Note:** This method doesn't set the "length" property of curried functions.
8049     *
8050     * @static
8051     * @memberOf _
8052     * @since 2.0.0
8053     * @category Function
8054     * @param {Function} func The function to curry.
8055     * @param {number} [arity=func.length] The arity of `func`.
8056     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8057     * @returns {Function} Returns the new curried function.
8058     * @example
8059     *
8060     * var abc = function(a, b, c) {
8061     *   return [a, b, c];
8062     * };
8063     *
8064     * var curried = _.curry(abc);
8065     *
8066     * curried(1)(2)(3);
8067     * // => [1, 2, 3]
8068     *
8069     * curried(1, 2)(3);
8070     * // => [1, 2, 3]
8071     *
8072     * curried(1, 2, 3);
8073     * // => [1, 2, 3]
8074     *
8075     * // Curried with placeholders.
8076     * curried(1)(_, 3)(2);
8077     * // => [1, 2, 3]
8078     */function curry(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curry.placeholder;return result;}/**
8079     * This method is like `_.curry` except that arguments are applied to `func`
8080     * in the manner of `_.partialRight` instead of `_.partial`.
8081     *
8082     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
8083     * builds, may be used as a placeholder for provided arguments.
8084     *
8085     * **Note:** This method doesn't set the "length" property of curried functions.
8086     *
8087     * @static
8088     * @memberOf _
8089     * @since 3.0.0
8090     * @category Function
8091     * @param {Function} func The function to curry.
8092     * @param {number} [arity=func.length] The arity of `func`.
8093     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8094     * @returns {Function} Returns the new curried function.
8095     * @example
8096     *
8097     * var abc = function(a, b, c) {
8098     *   return [a, b, c];
8099     * };
8100     *
8101     * var curried = _.curryRight(abc);
8102     *
8103     * curried(3)(2)(1);
8104     * // => [1, 2, 3]
8105     *
8106     * curried(2, 3)(1);
8107     * // => [1, 2, 3]
8108     *
8109     * curried(1, 2, 3);
8110     * // => [1, 2, 3]
8111     *
8112     * // Curried with placeholders.
8113     * curried(3)(1, _)(2);
8114     * // => [1, 2, 3]
8115     */function curryRight(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curryRight.placeholder;return result;}/**
8116     * Creates a debounced function that delays invoking `func` until after `wait`
8117     * milliseconds have elapsed since the last time the debounced function was
8118     * invoked. The debounced function comes with a `cancel` method to cancel
8119     * delayed `func` invocations and a `flush` method to immediately invoke them.
8120     * Provide `options` to indicate whether `func` should be invoked on the
8121     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
8122     * with the last arguments provided to the debounced function. Subsequent
8123     * calls to the debounced function return the result of the last `func`
8124     * invocation.
8125     *
8126     * **Note:** If `leading` and `trailing` options are `true`, `func` is
8127     * invoked on the trailing edge of the timeout only if the debounced function
8128     * is invoked more than once during the `wait` timeout.
8129     *
8130     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
8131     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
8132     *
8133     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
8134     * for details over the differences between `_.debounce` and `_.throttle`.
8135     *
8136     * @static
8137     * @memberOf _
8138     * @since 0.1.0
8139     * @category Function
8140     * @param {Function} func The function to debounce.
8141     * @param {number} [wait=0] The number of milliseconds to delay.
8142     * @param {Object} [options={}] The options object.
8143     * @param {boolean} [options.leading=false]
8144     *  Specify invoking on the leading edge of the timeout.
8145     * @param {number} [options.maxWait]
8146     *  The maximum time `func` is allowed to be delayed before it's invoked.
8147     * @param {boolean} [options.trailing=true]
8148     *  Specify invoking on the trailing edge of the timeout.
8149     * @returns {Function} Returns the new debounced function.
8150     * @example
8151     *
8152     * // Avoid costly calculations while the window size is in flux.
8153     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
8154     *
8155     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
8156     * jQuery(element).on('click', _.debounce(sendMail, 300, {
8157     *   'leading': true,
8158     *   'trailing': false
8159     * }));
8160     *
8161     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
8162     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
8163     * var source = new EventSource('/stream');
8164     * jQuery(source).on('message', debounced);
8165     *
8166     * // Cancel the trailing debounced invocation.
8167     * jQuery(window).on('popstate', debounced.cancel);
8168     */function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing='maxWait'in options;maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait;trailing='trailing'in options?!!options.trailing:trailing;}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=undefined;lastInvokeTime=time;result=func.apply(thisArg,args);return result;}function leadingEdge(time){// Reset any `maxWait` timer.
8169lastInvokeTime=time;// Start the timer for the trailing edge.
8170timerId=setTimeout(timerExpired,wait);// Invoke the leading edge.
8171return leading?invokeFunc(time):result;}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting;}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;// Either this is the first call, activity has stopped and we're at the
8172// trailing edge, the system time has gone backwards and we're treating
8173// it as the trailing edge, or we've hit the `maxWait` limit.
8174return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait;}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time);}// Restart the timer.
8175timerId=setTimeout(timerExpired,remainingWait(time));}function trailingEdge(time){timerId=undefined;// Only invoke if we have `lastArgs` which means `func` has been
8176// debounced at least once.
8177if(trailing&&lastArgs){return invokeFunc(time);}lastArgs=lastThis=undefined;return result;}function cancel(){if(timerId!==undefined){clearTimeout(timerId);}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=undefined;}function flush(){return timerId===undefined?result:trailingEdge(now());}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===undefined){return leadingEdge(lastCallTime);}if(maxing){// Handle invocations in a tight loop.
8178clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime);}}if(timerId===undefined){timerId=setTimeout(timerExpired,wait);}return result;}debounced.cancel=cancel;debounced.flush=flush;return debounced;}/**
8179     * Defers invoking the `func` until the current call stack has cleared. Any
8180     * additional arguments are provided to `func` when it's invoked.
8181     *
8182     * @static
8183     * @memberOf _
8184     * @since 0.1.0
8185     * @category Function
8186     * @param {Function} func The function to defer.
8187     * @param {...*} [args] The arguments to invoke `func` with.
8188     * @returns {number} Returns the timer id.
8189     * @example
8190     *
8191     * _.defer(function(text) {
8192     *   console.log(text);
8193     * }, 'deferred');
8194     * // => Logs 'deferred' after one millisecond.
8195     */var defer=baseRest(function(func,args){return baseDelay(func,1,args);});/**
8196     * Invokes `func` after `wait` milliseconds. Any additional arguments are
8197     * provided to `func` when it's invoked.
8198     *
8199     * @static
8200     * @memberOf _
8201     * @since 0.1.0
8202     * @category Function
8203     * @param {Function} func The function to delay.
8204     * @param {number} wait The number of milliseconds to delay invocation.
8205     * @param {...*} [args] The arguments to invoke `func` with.
8206     * @returns {number} Returns the timer id.
8207     * @example
8208     *
8209     * _.delay(function(text) {
8210     *   console.log(text);
8211     * }, 1000, 'later');
8212     * // => Logs 'later' after one second.
8213     */var delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args);});/**
8214     * Creates a function that invokes `func` with arguments reversed.
8215     *
8216     * @static
8217     * @memberOf _
8218     * @since 4.0.0
8219     * @category Function
8220     * @param {Function} func The function to flip arguments for.
8221     * @returns {Function} Returns the new flipped function.
8222     * @example
8223     *
8224     * var flipped = _.flip(function() {
8225     *   return _.toArray(arguments);
8226     * });
8227     *
8228     * flipped('a', 'b', 'c', 'd');
8229     * // => ['d', 'c', 'b', 'a']
8230     */function flip(func){return createWrap(func,WRAP_FLIP_FLAG);}/**
8231     * Creates a function that memoizes the result of `func`. If `resolver` is
8232     * provided, it determines the cache key for storing the result based on the
8233     * arguments provided to the memoized function. By default, the first argument
8234     * provided to the memoized function is used as the map cache key. The `func`
8235     * is invoked with the `this` binding of the memoized function.
8236     *
8237     * **Note:** The cache is exposed as the `cache` property on the memoized
8238     * function. Its creation may be customized by replacing the `_.memoize.Cache`
8239     * constructor with one whose instances implement the
8240     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
8241     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
8242     *
8243     * @static
8244     * @memberOf _
8245     * @since 0.1.0
8246     * @category Function
8247     * @param {Function} func The function to have its output memoized.
8248     * @param {Function} [resolver] The function to resolve the cache key.
8249     * @returns {Function} Returns the new memoized function.
8250     * @example
8251     *
8252     * var object = { 'a': 1, 'b': 2 };
8253     * var other = { 'c': 3, 'd': 4 };
8254     *
8255     * var values = _.memoize(_.values);
8256     * values(object);
8257     * // => [1, 2]
8258     *
8259     * values(other);
8260     * // => [3, 4]
8261     *
8262     * object.a = 2;
8263     * values(object);
8264     * // => [1, 2]
8265     *
8266     * // Modify the result cache.
8267     * values.cache.set(object, ['a', 'b']);
8268     * values(object);
8269     * // => ['a', 'b']
8270     *
8271     * // Replace `_.memoize.Cache`.
8272     * _.memoize.Cache = WeakMap;
8273     */function memoize(func,resolver){if(typeof func!='function'||resolver!=null&&typeof resolver!='function'){throw new TypeError(FUNC_ERROR_TEXT);}var memoized=function memoized(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key);}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result;};memoized.cache=new(memoize.Cache||MapCache)();return memoized;}// Expose `MapCache`.
8274memoize.Cache=MapCache;/**
8275     * Creates a function that negates the result of the predicate `func`. The
8276     * `func` predicate is invoked with the `this` binding and arguments of the
8277     * created function.
8278     *
8279     * @static
8280     * @memberOf _
8281     * @since 3.0.0
8282     * @category Function
8283     * @param {Function} predicate The predicate to negate.
8284     * @returns {Function} Returns the new negated function.
8285     * @example
8286     *
8287     * function isEven(n) {
8288     *   return n % 2 == 0;
8289     * }
8290     *
8291     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
8292     * // => [1, 3, 5]
8293     */function negate(predicate){if(typeof predicate!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2]);}return!predicate.apply(this,args);};}/**
8294     * Creates a function that is restricted to invoking `func` once. Repeat calls
8295     * to the function return the value of the first invocation. The `func` is
8296     * invoked with the `this` binding and arguments of the created function.
8297     *
8298     * @static
8299     * @memberOf _
8300     * @since 0.1.0
8301     * @category Function
8302     * @param {Function} func The function to restrict.
8303     * @returns {Function} Returns the new restricted function.
8304     * @example
8305     *
8306     * var initialize = _.once(createApplication);
8307     * initialize();
8308     * initialize();
8309     * // => `createApplication` is invoked once
8310     */function once(func){return before(2,func);}/**
8311     * Creates a function that invokes `func` with its arguments transformed.
8312     *
8313     * @static
8314     * @since 4.0.0
8315     * @memberOf _
8316     * @category Function
8317     * @param {Function} func The function to wrap.
8318     * @param {...(Function|Function[])} [transforms=[_.identity]]
8319     *  The argument transforms.
8320     * @returns {Function} Returns the new function.
8321     * @example
8322     *
8323     * function doubled(n) {
8324     *   return n * 2;
8325     * }
8326     *
8327     * function square(n) {
8328     *   return n * n;
8329     * }
8330     *
8331     * var func = _.overArgs(function(x, y) {
8332     *   return [x, y];
8333     * }, [square, doubled]);
8334     *
8335     * func(9, 3);
8336     * // => [81, 6]
8337     *
8338     * func(10, 5);
8339     * // => [100, 10]
8340     */var overArgs=castRest(function(func,transforms){transforms=transforms.length==1&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){var index=-1,length=nativeMin(args.length,funcsLength);while(++index<length){args[index]=transforms[index].call(this,args[index]);}return apply(func,this,args);});});/**
8341     * Creates a function that invokes `func` with `partials` prepended to the
8342     * arguments it receives. This method is like `_.bind` except it does **not**
8343     * alter the `this` binding.
8344     *
8345     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
8346     * builds, may be used as a placeholder for partially applied arguments.
8347     *
8348     * **Note:** This method doesn't set the "length" property of partially
8349     * applied functions.
8350     *
8351     * @static
8352     * @memberOf _
8353     * @since 0.2.0
8354     * @category Function
8355     * @param {Function} func The function to partially apply arguments to.
8356     * @param {...*} [partials] The arguments to be partially applied.
8357     * @returns {Function} Returns the new partially applied function.
8358     * @example
8359     *
8360     * function greet(greeting, name) {
8361     *   return greeting + ' ' + name;
8362     * }
8363     *
8364     * var sayHelloTo = _.partial(greet, 'hello');
8365     * sayHelloTo('fred');
8366     * // => 'hello fred'
8367     *
8368     * // Partially applied with placeholders.
8369     * var greetFred = _.partial(greet, _, 'fred');
8370     * greetFred('hi');
8371     * // => 'hi fred'
8372     */var partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined,partials,holders);});/**
8373     * This method is like `_.partial` except that partially applied arguments
8374     * are appended to the arguments it receives.
8375     *
8376     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
8377     * builds, may be used as a placeholder for partially applied arguments.
8378     *
8379     * **Note:** This method doesn't set the "length" property of partially
8380     * applied functions.
8381     *
8382     * @static
8383     * @memberOf _
8384     * @since 1.0.0
8385     * @category Function
8386     * @param {Function} func The function to partially apply arguments to.
8387     * @param {...*} [partials] The arguments to be partially applied.
8388     * @returns {Function} Returns the new partially applied function.
8389     * @example
8390     *
8391     * function greet(greeting, name) {
8392     *   return greeting + ' ' + name;
8393     * }
8394     *
8395     * var greetFred = _.partialRight(greet, 'fred');
8396     * greetFred('hi');
8397     * // => 'hi fred'
8398     *
8399     * // Partially applied with placeholders.
8400     * var sayHelloTo = _.partialRight(greet, 'hello', _);
8401     * sayHelloTo('fred');
8402     * // => 'hello fred'
8403     */var partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined,partials,holders);});/**
8404     * Creates a function that invokes `func` with arguments arranged according
8405     * to the specified `indexes` where the argument value at the first index is
8406     * provided as the first argument, the argument value at the second index is
8407     * provided as the second argument, and so on.
8408     *
8409     * @static
8410     * @memberOf _
8411     * @since 3.0.0
8412     * @category Function
8413     * @param {Function} func The function to rearrange arguments for.
8414     * @param {...(number|number[])} indexes The arranged argument indexes.
8415     * @returns {Function} Returns the new function.
8416     * @example
8417     *
8418     * var rearged = _.rearg(function(a, b, c) {
8419     *   return [a, b, c];
8420     * }, [2, 0, 1]);
8421     *
8422     * rearged('b', 'c', 'a')
8423     * // => ['a', 'b', 'c']
8424     */var rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined,undefined,undefined,indexes);});/**
8425     * Creates a function that invokes `func` with the `this` binding of the
8426     * created function and arguments from `start` and beyond provided as
8427     * an array.
8428     *
8429     * **Note:** This method is based on the
8430     * [rest parameter](https://mdn.io/rest_parameters).
8431     *
8432     * @static
8433     * @memberOf _
8434     * @since 4.0.0
8435     * @category Function
8436     * @param {Function} func The function to apply a rest parameter to.
8437     * @param {number} [start=func.length-1] The start position of the rest parameter.
8438     * @returns {Function} Returns the new function.
8439     * @example
8440     *
8441     * var say = _.rest(function(what, names) {
8442     *   return what + ' ' + _.initial(names).join(', ') +
8443     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
8444     * });
8445     *
8446     * say('hello', 'fred', 'barney', 'pebbles');
8447     * // => 'hello fred, barney, & pebbles'
8448     */function rest(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start===undefined?start:toInteger(start);return baseRest(func,start);}/**
8449     * Creates a function that invokes `func` with the `this` binding of the
8450     * create function and an array of arguments much like
8451     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
8452     *
8453     * **Note:** This method is based on the
8454     * [spread operator](https://mdn.io/spread_operator).
8455     *
8456     * @static
8457     * @memberOf _
8458     * @since 3.2.0
8459     * @category Function
8460     * @param {Function} func The function to spread arguments over.
8461     * @param {number} [start=0] The start position of the spread.
8462     * @returns {Function} Returns the new function.
8463     * @example
8464     *
8465     * var say = _.spread(function(who, what) {
8466     *   return who + ' says ' + what;
8467     * });
8468     *
8469     * say(['fred', 'hello']);
8470     * // => 'fred says hello'
8471     *
8472     * var numbers = Promise.all([
8473     *   Promise.resolve(40),
8474     *   Promise.resolve(36)
8475     * ]);
8476     *
8477     * numbers.then(_.spread(function(x, y) {
8478     *   return x + y;
8479     * }));
8480     * // => a Promise of 76
8481     */function spread(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start==null?0:nativeMax(toInteger(start),0);return baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);if(array){arrayPush(otherArgs,array);}return apply(func,this,otherArgs);});}/**
8482     * Creates a throttled function that only invokes `func` at most once per
8483     * every `wait` milliseconds. The throttled function comes with a `cancel`
8484     * method to cancel delayed `func` invocations and a `flush` method to
8485     * immediately invoke them. Provide `options` to indicate whether `func`
8486     * should be invoked on the leading and/or trailing edge of the `wait`
8487     * timeout. The `func` is invoked with the last arguments provided to the
8488     * throttled function. Subsequent calls to the throttled function return the
8489     * result of the last `func` invocation.
8490     *
8491     * **Note:** If `leading` and `trailing` options are `true`, `func` is
8492     * invoked on the trailing edge of the timeout only if the throttled function
8493     * is invoked more than once during the `wait` timeout.
8494     *
8495     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
8496     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
8497     *
8498     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
8499     * for details over the differences between `_.throttle` and `_.debounce`.
8500     *
8501     * @static
8502     * @memberOf _
8503     * @since 0.1.0
8504     * @category Function
8505     * @param {Function} func The function to throttle.
8506     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
8507     * @param {Object} [options={}] The options object.
8508     * @param {boolean} [options.leading=true]
8509     *  Specify invoking on the leading edge of the timeout.
8510     * @param {boolean} [options.trailing=true]
8511     *  Specify invoking on the trailing edge of the timeout.
8512     * @returns {Function} Returns the new throttled function.
8513     * @example
8514     *
8515     * // Avoid excessively updating the position while scrolling.
8516     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
8517     *
8518     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
8519     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
8520     * jQuery(element).on('click', throttled);
8521     *
8522     * // Cancel the trailing throttled invocation.
8523     * jQuery(window).on('popstate', throttled.cancel);
8524     */function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(isObject(options)){leading='leading'in options?!!options.leading:leading;trailing='trailing'in options?!!options.trailing:trailing;}return debounce(func,wait,{'leading':leading,'maxWait':wait,'trailing':trailing});}/**
8525     * Creates a function that accepts up to one argument, ignoring any
8526     * additional arguments.
8527     *
8528     * @static
8529     * @memberOf _
8530     * @since 4.0.0
8531     * @category Function
8532     * @param {Function} func The function to cap arguments for.
8533     * @returns {Function} Returns the new capped function.
8534     * @example
8535     *
8536     * _.map(['6', '8', '10'], _.unary(parseInt));
8537     * // => [6, 8, 10]
8538     */function unary(func){return ary(func,1);}/**
8539     * Creates a function that provides `value` to `wrapper` as its first
8540     * argument. Any additional arguments provided to the function are appended
8541     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
8542     * binding of the created function.
8543     *
8544     * @static
8545     * @memberOf _
8546     * @since 0.1.0
8547     * @category Function
8548     * @param {*} value The value to wrap.
8549     * @param {Function} [wrapper=identity] The wrapper function.
8550     * @returns {Function} Returns the new function.
8551     * @example
8552     *
8553     * var p = _.wrap(_.escape, function(func, text) {
8554     *   return '<p>' + func(text) + '</p>';
8555     * });
8556     *
8557     * p('fred, barney, & pebbles');
8558     * // => '<p>fred, barney, &amp; pebbles</p>'
8559     */function wrap(value,wrapper){return partial(castFunction(wrapper),value);}/*------------------------------------------------------------------------*/ /**
8560     * Casts `value` as an array if it's not one.
8561     *
8562     * @static
8563     * @memberOf _
8564     * @since 4.4.0
8565     * @category Lang
8566     * @param {*} value The value to inspect.
8567     * @returns {Array} Returns the cast array.
8568     * @example
8569     *
8570     * _.castArray(1);
8571     * // => [1]
8572     *
8573     * _.castArray({ 'a': 1 });
8574     * // => [{ 'a': 1 }]
8575     *
8576     * _.castArray('abc');
8577     * // => ['abc']
8578     *
8579     * _.castArray(null);
8580     * // => [null]
8581     *
8582     * _.castArray(undefined);
8583     * // => [undefined]
8584     *
8585     * _.castArray();
8586     * // => []
8587     *
8588     * var array = [1, 2, 3];
8589     * console.log(_.castArray(array) === array);
8590     * // => true
8591     */function castArray(){if(!arguments.length){return[];}var value=arguments[0];return isArray(value)?value:[value];}/**
8592     * Creates a shallow clone of `value`.
8593     *
8594     * **Note:** This method is loosely based on the
8595     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
8596     * and supports cloning arrays, array buffers, booleans, date objects, maps,
8597     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
8598     * arrays. The own enumerable properties of `arguments` objects are cloned
8599     * as plain objects. An empty object is returned for uncloneable values such
8600     * as error objects, functions, DOM nodes, and WeakMaps.
8601     *
8602     * @static
8603     * @memberOf _
8604     * @since 0.1.0
8605     * @category Lang
8606     * @param {*} value The value to clone.
8607     * @returns {*} Returns the cloned value.
8608     * @see _.cloneDeep
8609     * @example
8610     *
8611     * var objects = [{ 'a': 1 }, { 'b': 2 }];
8612     *
8613     * var shallow = _.clone(objects);
8614     * console.log(shallow[0] === objects[0]);
8615     * // => true
8616     */function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG);}/**
8617     * This method is like `_.clone` except that it accepts `customizer` which
8618     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
8619     * cloning is handled by the method instead. The `customizer` is invoked with
8620     * up to four arguments; (value [, index|key, object, stack]).
8621     *
8622     * @static
8623     * @memberOf _
8624     * @since 4.0.0
8625     * @category Lang
8626     * @param {*} value The value to clone.
8627     * @param {Function} [customizer] The function to customize cloning.
8628     * @returns {*} Returns the cloned value.
8629     * @see _.cloneDeepWith
8630     * @example
8631     *
8632     * function customizer(value) {
8633     *   if (_.isElement(value)) {
8634     *     return value.cloneNode(false);
8635     *   }
8636     * }
8637     *
8638     * var el = _.cloneWith(document.body, customizer);
8639     *
8640     * console.log(el === document.body);
8641     * // => false
8642     * console.log(el.nodeName);
8643     * // => 'BODY'
8644     * console.log(el.childNodes.length);
8645     * // => 0
8646     */function cloneWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseClone(value,CLONE_SYMBOLS_FLAG,customizer);}/**
8647     * This method is like `_.clone` except that it recursively clones `value`.
8648     *
8649     * @static
8650     * @memberOf _
8651     * @since 1.0.0
8652     * @category Lang
8653     * @param {*} value The value to recursively clone.
8654     * @returns {*} Returns the deep cloned value.
8655     * @see _.clone
8656     * @example
8657     *
8658     * var objects = [{ 'a': 1 }, { 'b': 2 }];
8659     *
8660     * var deep = _.cloneDeep(objects);
8661     * console.log(deep[0] === objects[0]);
8662     * // => false
8663     */function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG);}/**
8664     * This method is like `_.cloneWith` except that it recursively clones `value`.
8665     *
8666     * @static
8667     * @memberOf _
8668     * @since 4.0.0
8669     * @category Lang
8670     * @param {*} value The value to recursively clone.
8671     * @param {Function} [customizer] The function to customize cloning.
8672     * @returns {*} Returns the deep cloned value.
8673     * @see _.cloneWith
8674     * @example
8675     *
8676     * function customizer(value) {
8677     *   if (_.isElement(value)) {
8678     *     return value.cloneNode(true);
8679     *   }
8680     * }
8681     *
8682     * var el = _.cloneDeepWith(document.body, customizer);
8683     *
8684     * console.log(el === document.body);
8685     * // => false
8686     * console.log(el.nodeName);
8687     * // => 'BODY'
8688     * console.log(el.childNodes.length);
8689     * // => 20
8690     */function cloneDeepWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer);}/**
8691     * Checks if `object` conforms to `source` by invoking the predicate
8692     * properties of `source` with the corresponding property values of `object`.
8693     *
8694     * **Note:** This method is equivalent to `_.conforms` when `source` is
8695     * partially applied.
8696     *
8697     * @static
8698     * @memberOf _
8699     * @since 4.14.0
8700     * @category Lang
8701     * @param {Object} object The object to inspect.
8702     * @param {Object} source The object of property predicates to conform to.
8703     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
8704     * @example
8705     *
8706     * var object = { 'a': 1, 'b': 2 };
8707     *
8708     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
8709     * // => true
8710     *
8711     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
8712     * // => false
8713     */function conformsTo(object,source){return source==null||baseConformsTo(object,source,keys(source));}/**
8714     * Performs a
8715     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8716     * comparison between two values to determine if they are equivalent.
8717     *
8718     * @static
8719     * @memberOf _
8720     * @since 4.0.0
8721     * @category Lang
8722     * @param {*} value The value to compare.
8723     * @param {*} other The other value to compare.
8724     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
8725     * @example
8726     *
8727     * var object = { 'a': 1 };
8728     * var other = { 'a': 1 };
8729     *
8730     * _.eq(object, object);
8731     * // => true
8732     *
8733     * _.eq(object, other);
8734     * // => false
8735     *
8736     * _.eq('a', 'a');
8737     * // => true
8738     *
8739     * _.eq('a', Object('a'));
8740     * // => false
8741     *
8742     * _.eq(NaN, NaN);
8743     * // => true
8744     */function eq(value,other){return value===other||value!==value&&other!==other;}/**
8745     * Checks if `value` is greater than `other`.
8746     *
8747     * @static
8748     * @memberOf _
8749     * @since 3.9.0
8750     * @category Lang
8751     * @param {*} value The value to compare.
8752     * @param {*} other The other value to compare.
8753     * @returns {boolean} Returns `true` if `value` is greater than `other`,
8754     *  else `false`.
8755     * @see _.lt
8756     * @example
8757     *
8758     * _.gt(3, 1);
8759     * // => true
8760     *
8761     * _.gt(3, 3);
8762     * // => false
8763     *
8764     * _.gt(1, 3);
8765     * // => false
8766     */var gt=createRelationalOperation(baseGt);/**
8767     * Checks if `value` is greater than or equal to `other`.
8768     *
8769     * @static
8770     * @memberOf _
8771     * @since 3.9.0
8772     * @category Lang
8773     * @param {*} value The value to compare.
8774     * @param {*} other The other value to compare.
8775     * @returns {boolean} Returns `true` if `value` is greater than or equal to
8776     *  `other`, else `false`.
8777     * @see _.lte
8778     * @example
8779     *
8780     * _.gte(3, 1);
8781     * // => true
8782     *
8783     * _.gte(3, 3);
8784     * // => true
8785     *
8786     * _.gte(1, 3);
8787     * // => false
8788     */var gte=createRelationalOperation(function(value,other){return value>=other;});/**
8789     * Checks if `value` is likely an `arguments` object.
8790     *
8791     * @static
8792     * @memberOf _
8793     * @since 0.1.0
8794     * @category Lang
8795     * @param {*} value The value to check.
8796     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
8797     *  else `false`.
8798     * @example
8799     *
8800     * _.isArguments(function() { return arguments; }());
8801     * // => true
8802     *
8803     * _.isArguments([1, 2, 3]);
8804     * // => false
8805     */var isArguments=baseIsArguments(function(){return arguments;}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,'callee')&&!propertyIsEnumerable.call(value,'callee');};/**
8806     * Checks if `value` is classified as an `Array` object.
8807     *
8808     * @static
8809     * @memberOf _
8810     * @since 0.1.0
8811     * @category Lang
8812     * @param {*} value The value to check.
8813     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
8814     * @example
8815     *
8816     * _.isArray([1, 2, 3]);
8817     * // => true
8818     *
8819     * _.isArray(document.body.children);
8820     * // => false
8821     *
8822     * _.isArray('abc');
8823     * // => false
8824     *
8825     * _.isArray(_.noop);
8826     * // => false
8827     */var isArray=Array.isArray;/**
8828     * Checks if `value` is classified as an `ArrayBuffer` object.
8829     *
8830     * @static
8831     * @memberOf _
8832     * @since 4.3.0
8833     * @category Lang
8834     * @param {*} value The value to check.
8835     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
8836     * @example
8837     *
8838     * _.isArrayBuffer(new ArrayBuffer(2));
8839     * // => true
8840     *
8841     * _.isArrayBuffer(new Array(2));
8842     * // => false
8843     */var isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer;/**
8844     * Checks if `value` is array-like. A value is considered array-like if it's
8845     * not a function and has a `value.length` that's an integer greater than or
8846     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
8847     *
8848     * @static
8849     * @memberOf _
8850     * @since 4.0.0
8851     * @category Lang
8852     * @param {*} value The value to check.
8853     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
8854     * @example
8855     *
8856     * _.isArrayLike([1, 2, 3]);
8857     * // => true
8858     *
8859     * _.isArrayLike(document.body.children);
8860     * // => true
8861     *
8862     * _.isArrayLike('abc');
8863     * // => true
8864     *
8865     * _.isArrayLike(_.noop);
8866     * // => false
8867     */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/**
8868     * This method is like `_.isArrayLike` except that it also checks if `value`
8869     * is an object.
8870     *
8871     * @static
8872     * @memberOf _
8873     * @since 4.0.0
8874     * @category Lang
8875     * @param {*} value The value to check.
8876     * @returns {boolean} Returns `true` if `value` is an array-like object,
8877     *  else `false`.
8878     * @example
8879     *
8880     * _.isArrayLikeObject([1, 2, 3]);
8881     * // => true
8882     *
8883     * _.isArrayLikeObject(document.body.children);
8884     * // => true
8885     *
8886     * _.isArrayLikeObject('abc');
8887     * // => false
8888     *
8889     * _.isArrayLikeObject(_.noop);
8890     * // => false
8891     */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/**
8892     * Checks if `value` is classified as a boolean primitive or object.
8893     *
8894     * @static
8895     * @memberOf _
8896     * @since 0.1.0
8897     * @category Lang
8898     * @param {*} value The value to check.
8899     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
8900     * @example
8901     *
8902     * _.isBoolean(false);
8903     * // => true
8904     *
8905     * _.isBoolean(null);
8906     * // => false
8907     */function isBoolean(value){return value===true||value===false||isObjectLike(value)&&baseGetTag(value)==boolTag;}/**
8908     * Checks if `value` is a buffer.
8909     *
8910     * @static
8911     * @memberOf _
8912     * @since 4.3.0
8913     * @category Lang
8914     * @param {*} value The value to check.
8915     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
8916     * @example
8917     *
8918     * _.isBuffer(new Buffer(2));
8919     * // => true
8920     *
8921     * _.isBuffer(new Uint8Array(2));
8922     * // => false
8923     */var isBuffer=nativeIsBuffer||stubFalse;/**
8924     * Checks if `value` is classified as a `Date` object.
8925     *
8926     * @static
8927     * @memberOf _
8928     * @since 0.1.0
8929     * @category Lang
8930     * @param {*} value The value to check.
8931     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
8932     * @example
8933     *
8934     * _.isDate(new Date);
8935     * // => true
8936     *
8937     * _.isDate('Mon April 23 2012');
8938     * // => false
8939     */var isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate;/**
8940     * Checks if `value` is likely a DOM element.
8941     *
8942     * @static
8943     * @memberOf _
8944     * @since 0.1.0
8945     * @category Lang
8946     * @param {*} value The value to check.
8947     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
8948     * @example
8949     *
8950     * _.isElement(document.body);
8951     * // => true
8952     *
8953     * _.isElement('<body>');
8954     * // => false
8955     */function isElement(value){return isObjectLike(value)&&value.nodeType===1&&!isPlainObject(value);}/**
8956     * Checks if `value` is an empty object, collection, map, or set.
8957     *
8958     * Objects are considered empty if they have no own enumerable string keyed
8959     * properties.
8960     *
8961     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
8962     * jQuery-like collections are considered empty if they have a `length` of `0`.
8963     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
8964     *
8965     * @static
8966     * @memberOf _
8967     * @since 0.1.0
8968     * @category Lang
8969     * @param {*} value The value to check.
8970     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
8971     * @example
8972     *
8973     * _.isEmpty(null);
8974     * // => true
8975     *
8976     * _.isEmpty(true);
8977     * // => true
8978     *
8979     * _.isEmpty(1);
8980     * // => true
8981     *
8982     * _.isEmpty([1, 2, 3]);
8983     * // => false
8984     *
8985     * _.isEmpty({ 'a': 1 });
8986     * // => false
8987     */function isEmpty(value){if(value==null){return true;}if(isArrayLike(value)&&(isArray(value)||typeof value=='string'||typeof value.splice=='function'||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length;}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size;}if(isPrototype(value)){return!baseKeys(value).length;}for(var key in value){if(hasOwnProperty.call(value,key)){return false;}}return true;}/**
8988     * Performs a deep comparison between two values to determine if they are
8989     * equivalent.
8990     *
8991     * **Note:** This method supports comparing arrays, array buffers, booleans,
8992     * date objects, error objects, maps, numbers, `Object` objects, regexes,
8993     * sets, strings, symbols, and typed arrays. `Object` objects are compared
8994     * by their own, not inherited, enumerable properties. Functions and DOM
8995     * nodes are compared by strict equality, i.e. `===`.
8996     *
8997     * @static
8998     * @memberOf _
8999     * @since 0.1.0
9000     * @category Lang
9001     * @param {*} value The value to compare.
9002     * @param {*} other The other value to compare.
9003     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
9004     * @example
9005     *
9006     * var object = { 'a': 1 };
9007     * var other = { 'a': 1 };
9008     *
9009     * _.isEqual(object, other);
9010     * // => true
9011     *
9012     * object === other;
9013     * // => false
9014     */function isEqual(value,other){return baseIsEqual(value,other);}/**
9015     * This method is like `_.isEqual` except that it accepts `customizer` which
9016     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
9017     * are handled by the method instead. The `customizer` is invoked with up to
9018     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
9019     *
9020     * @static
9021     * @memberOf _
9022     * @since 4.0.0
9023     * @category Lang
9024     * @param {*} value The value to compare.
9025     * @param {*} other The other value to compare.
9026     * @param {Function} [customizer] The function to customize comparisons.
9027     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
9028     * @example
9029     *
9030     * function isGreeting(value) {
9031     *   return /^h(?:i|ello)$/.test(value);
9032     * }
9033     *
9034     * function customizer(objValue, othValue) {
9035     *   if (isGreeting(objValue) && isGreeting(othValue)) {
9036     *     return true;
9037     *   }
9038     * }
9039     *
9040     * var array = ['hello', 'goodbye'];
9041     * var other = ['hi', 'goodbye'];
9042     *
9043     * _.isEqualWith(array, other, customizer);
9044     * // => true
9045     */function isEqualWith(value,other,customizer){customizer=typeof customizer=='function'?customizer:undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,undefined,customizer):!!result;}/**
9046     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
9047     * `SyntaxError`, `TypeError`, or `URIError` object.
9048     *
9049     * @static
9050     * @memberOf _
9051     * @since 3.0.0
9052     * @category Lang
9053     * @param {*} value The value to check.
9054     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
9055     * @example
9056     *
9057     * _.isError(new Error);
9058     * // => true
9059     *
9060     * _.isError(Error);
9061     * // => false
9062     */function isError(value){if(!isObjectLike(value)){return false;}var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||typeof value.message=='string'&&typeof value.name=='string'&&!isPlainObject(value);}/**
9063     * Checks if `value` is a finite primitive number.
9064     *
9065     * **Note:** This method is based on
9066     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
9067     *
9068     * @static
9069     * @memberOf _
9070     * @since 0.1.0
9071     * @category Lang
9072     * @param {*} value The value to check.
9073     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
9074     * @example
9075     *
9076     * _.isFinite(3);
9077     * // => true
9078     *
9079     * _.isFinite(Number.MIN_VALUE);
9080     * // => true
9081     *
9082     * _.isFinite(Infinity);
9083     * // => false
9084     *
9085     * _.isFinite('3');
9086     * // => false
9087     */function isFinite(value){return typeof value=='number'&&nativeIsFinite(value);}/**
9088     * Checks if `value` is classified as a `Function` object.
9089     *
9090     * @static
9091     * @memberOf _
9092     * @since 0.1.0
9093     * @category Lang
9094     * @param {*} value The value to check.
9095     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
9096     * @example
9097     *
9098     * _.isFunction(_);
9099     * // => true
9100     *
9101     * _.isFunction(/abc/);
9102     * // => false
9103     */function isFunction(value){if(!isObject(value)){return false;}// The use of `Object#toString` avoids issues with the `typeof` operator
9104// in Safari 9 which returns 'object' for typed arrays and other constructors.
9105var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag;}/**
9106     * Checks if `value` is an integer.
9107     *
9108     * **Note:** This method is based on
9109     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
9110     *
9111     * @static
9112     * @memberOf _
9113     * @since 4.0.0
9114     * @category Lang
9115     * @param {*} value The value to check.
9116     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
9117     * @example
9118     *
9119     * _.isInteger(3);
9120     * // => true
9121     *
9122     * _.isInteger(Number.MIN_VALUE);
9123     * // => false
9124     *
9125     * _.isInteger(Infinity);
9126     * // => false
9127     *
9128     * _.isInteger('3');
9129     * // => false
9130     */function isInteger(value){return typeof value=='number'&&value==toInteger(value);}/**
9131     * Checks if `value` is a valid array-like length.
9132     *
9133     * **Note:** This method is loosely based on
9134     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
9135     *
9136     * @static
9137     * @memberOf _
9138     * @since 4.0.0
9139     * @category Lang
9140     * @param {*} value The value to check.
9141     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
9142     * @example
9143     *
9144     * _.isLength(3);
9145     * // => true
9146     *
9147     * _.isLength(Number.MIN_VALUE);
9148     * // => false
9149     *
9150     * _.isLength(Infinity);
9151     * // => false
9152     *
9153     * _.isLength('3');
9154     * // => false
9155     */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/**
9156     * Checks if `value` is the
9157     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
9158     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
9159     *
9160     * @static
9161     * @memberOf _
9162     * @since 0.1.0
9163     * @category Lang
9164     * @param {*} value The value to check.
9165     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
9166     * @example
9167     *
9168     * _.isObject({});
9169     * // => true
9170     *
9171     * _.isObject([1, 2, 3]);
9172     * // => true
9173     *
9174     * _.isObject(_.noop);
9175     * // => true
9176     *
9177     * _.isObject(null);
9178     * // => false
9179     */function isObject(value){var type=_typeof(value);return value!=null&&(type=='object'||type=='function');}/**
9180     * Checks if `value` is object-like. A value is object-like if it's not `null`
9181     * and has a `typeof` result of "object".
9182     *
9183     * @static
9184     * @memberOf _
9185     * @since 4.0.0
9186     * @category Lang
9187     * @param {*} value The value to check.
9188     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
9189     * @example
9190     *
9191     * _.isObjectLike({});
9192     * // => true
9193     *
9194     * _.isObjectLike([1, 2, 3]);
9195     * // => true
9196     *
9197     * _.isObjectLike(_.noop);
9198     * // => false
9199     *
9200     * _.isObjectLike(null);
9201     * // => false
9202     */function isObjectLike(value){return value!=null&&_typeof(value)=='object';}/**
9203     * Checks if `value` is classified as a `Map` object.
9204     *
9205     * @static
9206     * @memberOf _
9207     * @since 4.3.0
9208     * @category Lang
9209     * @param {*} value The value to check.
9210     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
9211     * @example
9212     *
9213     * _.isMap(new Map);
9214     * // => true
9215     *
9216     * _.isMap(new WeakMap);
9217     * // => false
9218     */var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;/**
9219     * Performs a partial deep comparison between `object` and `source` to
9220     * determine if `object` contains equivalent property values.
9221     *
9222     * **Note:** This method is equivalent to `_.matches` when `source` is
9223     * partially applied.
9224     *
9225     * Partial comparisons will match empty array and empty object `source`
9226     * values against any array or object value, respectively. See `_.isEqual`
9227     * for a list of supported value comparisons.
9228     *
9229     * @static
9230     * @memberOf _
9231     * @since 3.0.0
9232     * @category Lang
9233     * @param {Object} object The object to inspect.
9234     * @param {Object} source The object of property values to match.
9235     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
9236     * @example
9237     *
9238     * var object = { 'a': 1, 'b': 2 };
9239     *
9240     * _.isMatch(object, { 'b': 2 });
9241     * // => true
9242     *
9243     * _.isMatch(object, { 'b': 1 });
9244     * // => false
9245     */function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source));}/**
9246     * This method is like `_.isMatch` except that it accepts `customizer` which
9247     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
9248     * are handled by the method instead. The `customizer` is invoked with five
9249     * arguments: (objValue, srcValue, index|key, object, source).
9250     *
9251     * @static
9252     * @memberOf _
9253     * @since 4.0.0
9254     * @category Lang
9255     * @param {Object} object The object to inspect.
9256     * @param {Object} source The object of property values to match.
9257     * @param {Function} [customizer] The function to customize comparisons.
9258     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
9259     * @example
9260     *
9261     * function isGreeting(value) {
9262     *   return /^h(?:i|ello)$/.test(value);
9263     * }
9264     *
9265     * function customizer(objValue, srcValue) {
9266     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
9267     *     return true;
9268     *   }
9269     * }
9270     *
9271     * var object = { 'greeting': 'hello' };
9272     * var source = { 'greeting': 'hi' };
9273     *
9274     * _.isMatchWith(object, source, customizer);
9275     * // => true
9276     */function isMatchWith(object,source,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseIsMatch(object,source,getMatchData(source),customizer);}/**
9277     * Checks if `value` is `NaN`.
9278     *
9279     * **Note:** This method is based on
9280     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
9281     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
9282     * `undefined` and other non-number values.
9283     *
9284     * @static
9285     * @memberOf _
9286     * @since 0.1.0
9287     * @category Lang
9288     * @param {*} value The value to check.
9289     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
9290     * @example
9291     *
9292     * _.isNaN(NaN);
9293     * // => true
9294     *
9295     * _.isNaN(new Number(NaN));
9296     * // => true
9297     *
9298     * isNaN(undefined);
9299     * // => true
9300     *
9301     * _.isNaN(undefined);
9302     * // => false
9303     */function isNaN(value){// An `NaN` primitive is the only value that is not equal to itself.
9304// Perform the `toStringTag` check first to avoid errors with some
9305// ActiveX objects in IE.
9306return isNumber(value)&&value!=+value;}/**
9307     * Checks if `value` is a pristine native function.
9308     *
9309     * **Note:** This method can't reliably detect native functions in the presence
9310     * of the core-js package because core-js circumvents this kind of detection.
9311     * Despite multiple requests, the core-js maintainer has made it clear: any
9312     * attempt to fix the detection will be obstructed. As a result, we're left
9313     * with little choice but to throw an error. Unfortunately, this also affects
9314     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
9315     * which rely on core-js.
9316     *
9317     * @static
9318     * @memberOf _
9319     * @since 3.0.0
9320     * @category Lang
9321     * @param {*} value The value to check.
9322     * @returns {boolean} Returns `true` if `value` is a native function,
9323     *  else `false`.
9324     * @example
9325     *
9326     * _.isNative(Array.prototype.push);
9327     * // => true
9328     *
9329     * _.isNative(_);
9330     * // => false
9331     */function isNative(value){if(isMaskable(value)){throw new Error(CORE_ERROR_TEXT);}return baseIsNative(value);}/**
9332     * Checks if `value` is `null`.
9333     *
9334     * @static
9335     * @memberOf _
9336     * @since 0.1.0
9337     * @category Lang
9338     * @param {*} value The value to check.
9339     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
9340     * @example
9341     *
9342     * _.isNull(null);
9343     * // => true
9344     *
9345     * _.isNull(void 0);
9346     * // => false
9347     */function isNull(value){return value===null;}/**
9348     * Checks if `value` is `null` or `undefined`.
9349     *
9350     * @static
9351     * @memberOf _
9352     * @since 4.0.0
9353     * @category Lang
9354     * @param {*} value The value to check.
9355     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
9356     * @example
9357     *
9358     * _.isNil(null);
9359     * // => true
9360     *
9361     * _.isNil(void 0);
9362     * // => true
9363     *
9364     * _.isNil(NaN);
9365     * // => false
9366     */function isNil(value){return value==null;}/**
9367     * Checks if `value` is classified as a `Number` primitive or object.
9368     *
9369     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
9370     * classified as numbers, use the `_.isFinite` method.
9371     *
9372     * @static
9373     * @memberOf _
9374     * @since 0.1.0
9375     * @category Lang
9376     * @param {*} value The value to check.
9377     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
9378     * @example
9379     *
9380     * _.isNumber(3);
9381     * // => true
9382     *
9383     * _.isNumber(Number.MIN_VALUE);
9384     * // => true
9385     *
9386     * _.isNumber(Infinity);
9387     * // => true
9388     *
9389     * _.isNumber('3');
9390     * // => false
9391     */function isNumber(value){return typeof value=='number'||isObjectLike(value)&&baseGetTag(value)==numberTag;}/**
9392     * Checks if `value` is a plain object, that is, an object created by the
9393     * `Object` constructor or one with a `[[Prototype]]` of `null`.
9394     *
9395     * @static
9396     * @memberOf _
9397     * @since 0.8.0
9398     * @category Lang
9399     * @param {*} value The value to check.
9400     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
9401     * @example
9402     *
9403     * function Foo() {
9404     *   this.a = 1;
9405     * }
9406     *
9407     * _.isPlainObject(new Foo);
9408     * // => false
9409     *
9410     * _.isPlainObject([1, 2, 3]);
9411     * // => false
9412     *
9413     * _.isPlainObject({ 'x': 0, 'y': 0 });
9414     * // => true
9415     *
9416     * _.isPlainObject(Object.create(null));
9417     * // => true
9418     */function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false;}var proto=getPrototype(value);if(proto===null){return true;}var Ctor=hasOwnProperty.call(proto,'constructor')&&proto.constructor;return typeof Ctor=='function'&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString;}/**
9419     * Checks if `value` is classified as a `RegExp` object.
9420     *
9421     * @static
9422     * @memberOf _
9423     * @since 0.1.0
9424     * @category Lang
9425     * @param {*} value The value to check.
9426     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
9427     * @example
9428     *
9429     * _.isRegExp(/abc/);
9430     * // => true
9431     *
9432     * _.isRegExp('/abc/');
9433     * // => false
9434     */var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp;/**
9435     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
9436     * double precision number which isn't the result of a rounded unsafe integer.
9437     *
9438     * **Note:** This method is based on
9439     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
9440     *
9441     * @static
9442     * @memberOf _
9443     * @since 4.0.0
9444     * @category Lang
9445     * @param {*} value The value to check.
9446     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
9447     * @example
9448     *
9449     * _.isSafeInteger(3);
9450     * // => true
9451     *
9452     * _.isSafeInteger(Number.MIN_VALUE);
9453     * // => false
9454     *
9455     * _.isSafeInteger(Infinity);
9456     * // => false
9457     *
9458     * _.isSafeInteger('3');
9459     * // => false
9460     */function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER;}/**
9461     * Checks if `value` is classified as a `Set` object.
9462     *
9463     * @static
9464     * @memberOf _
9465     * @since 4.3.0
9466     * @category Lang
9467     * @param {*} value The value to check.
9468     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
9469     * @example
9470     *
9471     * _.isSet(new Set);
9472     * // => true
9473     *
9474     * _.isSet(new WeakSet);
9475     * // => false
9476     */var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;/**
9477     * Checks if `value` is classified as a `String` primitive or object.
9478     *
9479     * @static
9480     * @since 0.1.0
9481     * @memberOf _
9482     * @category Lang
9483     * @param {*} value The value to check.
9484     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
9485     * @example
9486     *
9487     * _.isString('abc');
9488     * // => true
9489     *
9490     * _.isString(1);
9491     * // => false
9492     */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag;}/**
9493     * Checks if `value` is classified as a `Symbol` primitive or object.
9494     *
9495     * @static
9496     * @memberOf _
9497     * @since 4.0.0
9498     * @category Lang
9499     * @param {*} value The value to check.
9500     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
9501     * @example
9502     *
9503     * _.isSymbol(Symbol.iterator);
9504     * // => true
9505     *
9506     * _.isSymbol('abc');
9507     * // => false
9508     */function isSymbol(value){return _typeof(value)=='symbol'||isObjectLike(value)&&baseGetTag(value)==symbolTag;}/**
9509     * Checks if `value` is classified as a typed array.
9510     *
9511     * @static
9512     * @memberOf _
9513     * @since 3.0.0
9514     * @category Lang
9515     * @param {*} value The value to check.
9516     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
9517     * @example
9518     *
9519     * _.isTypedArray(new Uint8Array);
9520     * // => true
9521     *
9522     * _.isTypedArray([]);
9523     * // => false
9524     */var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;/**
9525     * Checks if `value` is `undefined`.
9526     *
9527     * @static
9528     * @since 0.1.0
9529     * @memberOf _
9530     * @category Lang
9531     * @param {*} value The value to check.
9532     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
9533     * @example
9534     *
9535     * _.isUndefined(void 0);
9536     * // => true
9537     *
9538     * _.isUndefined(null);
9539     * // => false
9540     */function isUndefined(value){return value===undefined;}/**
9541     * Checks if `value` is classified as a `WeakMap` object.
9542     *
9543     * @static
9544     * @memberOf _
9545     * @since 4.3.0
9546     * @category Lang
9547     * @param {*} value The value to check.
9548     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
9549     * @example
9550     *
9551     * _.isWeakMap(new WeakMap);
9552     * // => true
9553     *
9554     * _.isWeakMap(new Map);
9555     * // => false
9556     */function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag;}/**
9557     * Checks if `value` is classified as a `WeakSet` object.
9558     *
9559     * @static
9560     * @memberOf _
9561     * @since 4.3.0
9562     * @category Lang
9563     * @param {*} value The value to check.
9564     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
9565     * @example
9566     *
9567     * _.isWeakSet(new WeakSet);
9568     * // => true
9569     *
9570     * _.isWeakSet(new Set);
9571     * // => false
9572     */function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag;}/**
9573     * Checks if `value` is less than `other`.
9574     *
9575     * @static
9576     * @memberOf _
9577     * @since 3.9.0
9578     * @category Lang
9579     * @param {*} value The value to compare.
9580     * @param {*} other The other value to compare.
9581     * @returns {boolean} Returns `true` if `value` is less than `other`,
9582     *  else `false`.
9583     * @see _.gt
9584     * @example
9585     *
9586     * _.lt(1, 3);
9587     * // => true
9588     *
9589     * _.lt(3, 3);
9590     * // => false
9591     *
9592     * _.lt(3, 1);
9593     * // => false
9594     */var lt=createRelationalOperation(baseLt);/**
9595     * Checks if `value` is less than or equal to `other`.
9596     *
9597     * @static
9598     * @memberOf _
9599     * @since 3.9.0
9600     * @category Lang
9601     * @param {*} value The value to compare.
9602     * @param {*} other The other value to compare.
9603     * @returns {boolean} Returns `true` if `value` is less than or equal to
9604     *  `other`, else `false`.
9605     * @see _.gte
9606     * @example
9607     *
9608     * _.lte(1, 3);
9609     * // => true
9610     *
9611     * _.lte(3, 3);
9612     * // => true
9613     *
9614     * _.lte(3, 1);
9615     * // => false
9616     */var lte=createRelationalOperation(function(value,other){return value<=other;});/**
9617     * Converts `value` to an array.
9618     *
9619     * @static
9620     * @since 0.1.0
9621     * @memberOf _
9622     * @category Lang
9623     * @param {*} value The value to convert.
9624     * @returns {Array} Returns the converted array.
9625     * @example
9626     *
9627     * _.toArray({ 'a': 1, 'b': 2 });
9628     * // => [1, 2]
9629     *
9630     * _.toArray('abc');
9631     * // => ['a', 'b', 'c']
9632     *
9633     * _.toArray(1);
9634     * // => []
9635     *
9636     * _.toArray(null);
9637     * // => []
9638     */function toArray(value){if(!value){return[];}if(isArrayLike(value)){return isString(value)?stringToArray(value):copyArray(value);}if(symIterator&&value[symIterator]){return iteratorToArray(value[symIterator]());}var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value);}/**
9639     * Converts `value` to a finite number.
9640     *
9641     * @static
9642     * @memberOf _
9643     * @since 4.12.0
9644     * @category Lang
9645     * @param {*} value The value to convert.
9646     * @returns {number} Returns the converted number.
9647     * @example
9648     *
9649     * _.toFinite(3.2);
9650     * // => 3.2
9651     *
9652     * _.toFinite(Number.MIN_VALUE);
9653     * // => 5e-324
9654     *
9655     * _.toFinite(Infinity);
9656     * // => 1.7976931348623157e+308
9657     *
9658     * _.toFinite('3.2');
9659     * // => 3.2
9660     */function toFinite(value){if(!value){return value===0?value:0;}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER;}return value===value?value:0;}/**
9661     * Converts `value` to an integer.
9662     *
9663     * **Note:** This method is loosely based on
9664     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
9665     *
9666     * @static
9667     * @memberOf _
9668     * @since 4.0.0
9669     * @category Lang
9670     * @param {*} value The value to convert.
9671     * @returns {number} Returns the converted integer.
9672     * @example
9673     *
9674     * _.toInteger(3.2);
9675     * // => 3
9676     *
9677     * _.toInteger(Number.MIN_VALUE);
9678     * // => 0
9679     *
9680     * _.toInteger(Infinity);
9681     * // => 1.7976931348623157e+308
9682     *
9683     * _.toInteger('3.2');
9684     * // => 3
9685     */function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0;}/**
9686     * Converts `value` to an integer suitable for use as the length of an
9687     * array-like object.
9688     *
9689     * **Note:** This method is based on
9690     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
9691     *
9692     * @static
9693     * @memberOf _
9694     * @since 4.0.0
9695     * @category Lang
9696     * @param {*} value The value to convert.
9697     * @returns {number} Returns the converted integer.
9698     * @example
9699     *
9700     * _.toLength(3.2);
9701     * // => 3
9702     *
9703     * _.toLength(Number.MIN_VALUE);
9704     * // => 0
9705     *
9706     * _.toLength(Infinity);
9707     * // => 4294967295
9708     *
9709     * _.toLength('3.2');
9710     * // => 3
9711     */function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0;}/**
9712     * Converts `value` to a number.
9713     *
9714     * @static
9715     * @memberOf _
9716     * @since 4.0.0
9717     * @category Lang
9718     * @param {*} value The value to process.
9719     * @returns {number} Returns the number.
9720     * @example
9721     *
9722     * _.toNumber(3.2);
9723     * // => 3.2
9724     *
9725     * _.toNumber(Number.MIN_VALUE);
9726     * // => 5e-324
9727     *
9728     * _.toNumber(Infinity);
9729     * // => Infinity
9730     *
9731     * _.toNumber('3.2');
9732     * // => 3.2
9733     */function toNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}if(isObject(value)){var other=typeof value.valueOf=='function'?value.valueOf():value;value=isObject(other)?other+'':other;}if(typeof value!='string'){return value===0?value:+value;}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value;}/**
9734     * Converts `value` to a plain object flattening inherited enumerable string
9735     * keyed properties of `value` to own properties of the plain object.
9736     *
9737     * @static
9738     * @memberOf _
9739     * @since 3.0.0
9740     * @category Lang
9741     * @param {*} value The value to convert.
9742     * @returns {Object} Returns the converted plain object.
9743     * @example
9744     *
9745     * function Foo() {
9746     *   this.b = 2;
9747     * }
9748     *
9749     * Foo.prototype.c = 3;
9750     *
9751     * _.assign({ 'a': 1 }, new Foo);
9752     * // => { 'a': 1, 'b': 2 }
9753     *
9754     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
9755     * // => { 'a': 1, 'b': 2, 'c': 3 }
9756     */function toPlainObject(value){return copyObject(value,keysIn(value));}/**
9757     * Converts `value` to a safe integer. A safe integer can be compared and
9758     * represented correctly.
9759     *
9760     * @static
9761     * @memberOf _
9762     * @since 4.0.0
9763     * @category Lang
9764     * @param {*} value The value to convert.
9765     * @returns {number} Returns the converted integer.
9766     * @example
9767     *
9768     * _.toSafeInteger(3.2);
9769     * // => 3
9770     *
9771     * _.toSafeInteger(Number.MIN_VALUE);
9772     * // => 0
9773     *
9774     * _.toSafeInteger(Infinity);
9775     * // => 9007199254740991
9776     *
9777     * _.toSafeInteger('3.2');
9778     * // => 3
9779     */function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):value===0?value:0;}/**
9780     * Converts `value` to a string. An empty string is returned for `null`
9781     * and `undefined` values. The sign of `-0` is preserved.
9782     *
9783     * @static
9784     * @memberOf _
9785     * @since 4.0.0
9786     * @category Lang
9787     * @param {*} value The value to convert.
9788     * @returns {string} Returns the converted string.
9789     * @example
9790     *
9791     * _.toString(null);
9792     * // => ''
9793     *
9794     * _.toString(-0);
9795     * // => '-0'
9796     *
9797     * _.toString([1, 2, 3]);
9798     * // => '1,2,3'
9799     */function toString(value){return value==null?'':baseToString(value);}/*------------------------------------------------------------------------*/ /**
9800     * Assigns own enumerable string keyed properties of source objects to the
9801     * destination object. Source objects are applied from left to right.
9802     * Subsequent sources overwrite property assignments of previous sources.
9803     *
9804     * **Note:** This method mutates `object` and is loosely based on
9805     * [`Object.assign`](https://mdn.io/Object/assign).
9806     *
9807     * @static
9808     * @memberOf _
9809     * @since 0.10.0
9810     * @category Object
9811     * @param {Object} object The destination object.
9812     * @param {...Object} [sources] The source objects.
9813     * @returns {Object} Returns `object`.
9814     * @see _.assignIn
9815     * @example
9816     *
9817     * function Foo() {
9818     *   this.a = 1;
9819     * }
9820     *
9821     * function Bar() {
9822     *   this.c = 3;
9823     * }
9824     *
9825     * Foo.prototype.b = 2;
9826     * Bar.prototype.d = 4;
9827     *
9828     * _.assign({ 'a': 0 }, new Foo, new Bar);
9829     * // => { 'a': 1, 'c': 3 }
9830     */var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source)){copyObject(source,keys(source),object);return;}for(var key in source){if(hasOwnProperty.call(source,key)){assignValue(object,key,source[key]);}}});/**
9831     * This method is like `_.assign` except that it iterates over own and
9832     * inherited source properties.
9833     *
9834     * **Note:** This method mutates `object`.
9835     *
9836     * @static
9837     * @memberOf _
9838     * @since 4.0.0
9839     * @alias extend
9840     * @category Object
9841     * @param {Object} object The destination object.
9842     * @param {...Object} [sources] The source objects.
9843     * @returns {Object} Returns `object`.
9844     * @see _.assign
9845     * @example
9846     *
9847     * function Foo() {
9848     *   this.a = 1;
9849     * }
9850     *
9851     * function Bar() {
9852     *   this.c = 3;
9853     * }
9854     *
9855     * Foo.prototype.b = 2;
9856     * Bar.prototype.d = 4;
9857     *
9858     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
9859     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
9860     */var assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object);});/**
9861     * This method is like `_.assignIn` except that it accepts `customizer`
9862     * which is invoked to produce the assigned values. If `customizer` returns
9863     * `undefined`, assignment is handled by the method instead. The `customizer`
9864     * is invoked with five arguments: (objValue, srcValue, key, object, source).
9865     *
9866     * **Note:** This method mutates `object`.
9867     *
9868     * @static
9869     * @memberOf _
9870     * @since 4.0.0
9871     * @alias extendWith
9872     * @category Object
9873     * @param {Object} object The destination object.
9874     * @param {...Object} sources The source objects.
9875     * @param {Function} [customizer] The function to customize assigned values.
9876     * @returns {Object} Returns `object`.
9877     * @see _.assignWith
9878     * @example
9879     *
9880     * function customizer(objValue, srcValue) {
9881     *   return _.isUndefined(objValue) ? srcValue : objValue;
9882     * }
9883     *
9884     * var defaults = _.partialRight(_.assignInWith, customizer);
9885     *
9886     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
9887     * // => { 'a': 1, 'b': 2 }
9888     */var assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer);});/**
9889     * This method is like `_.assign` except that it accepts `customizer`
9890     * which is invoked to produce the assigned values. If `customizer` returns
9891     * `undefined`, assignment is handled by the method instead. The `customizer`
9892     * is invoked with five arguments: (objValue, srcValue, key, object, source).
9893     *
9894     * **Note:** This method mutates `object`.
9895     *
9896     * @static
9897     * @memberOf _
9898     * @since 4.0.0
9899     * @category Object
9900     * @param {Object} object The destination object.
9901     * @param {...Object} sources The source objects.
9902     * @param {Function} [customizer] The function to customize assigned values.
9903     * @returns {Object} Returns `object`.
9904     * @see _.assignInWith
9905     * @example
9906     *
9907     * function customizer(objValue, srcValue) {
9908     *   return _.isUndefined(objValue) ? srcValue : objValue;
9909     * }
9910     *
9911     * var defaults = _.partialRight(_.assignWith, customizer);
9912     *
9913     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
9914     * // => { 'a': 1, 'b': 2 }
9915     */var assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer);});/**
9916     * Creates an array of values corresponding to `paths` of `object`.
9917     *
9918     * @static
9919     * @memberOf _
9920     * @since 1.0.0
9921     * @category Object
9922     * @param {Object} object The object to iterate over.
9923     * @param {...(string|string[])} [paths] The property paths to pick.
9924     * @returns {Array} Returns the picked values.
9925     * @example
9926     *
9927     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
9928     *
9929     * _.at(object, ['a[0].b.c', 'a[1]']);
9930     * // => [3, 4]
9931     */var at=flatRest(baseAt);/**
9932     * Creates an object that inherits from the `prototype` object. If a
9933     * `properties` object is given, its own enumerable string keyed properties
9934     * are assigned to the created object.
9935     *
9936     * @static
9937     * @memberOf _
9938     * @since 2.3.0
9939     * @category Object
9940     * @param {Object} prototype The object to inherit from.
9941     * @param {Object} [properties] The properties to assign to the object.
9942     * @returns {Object} Returns the new object.
9943     * @example
9944     *
9945     * function Shape() {
9946     *   this.x = 0;
9947     *   this.y = 0;
9948     * }
9949     *
9950     * function Circle() {
9951     *   Shape.call(this);
9952     * }
9953     *
9954     * Circle.prototype = _.create(Shape.prototype, {
9955     *   'constructor': Circle
9956     * });
9957     *
9958     * var circle = new Circle;
9959     * circle instanceof Circle;
9960     * // => true
9961     *
9962     * circle instanceof Shape;
9963     * // => true
9964     */function create(prototype,properties){var result=baseCreate(prototype);return properties==null?result:baseAssign(result,properties);}/**
9965     * Assigns own and inherited enumerable string keyed properties of source
9966     * objects to the destination object for all destination properties that
9967     * resolve to `undefined`. Source objects are applied from left to right.
9968     * Once a property is set, additional values of the same property are ignored.
9969     *
9970     * **Note:** This method mutates `object`.
9971     *
9972     * @static
9973     * @since 0.1.0
9974     * @memberOf _
9975     * @category Object
9976     * @param {Object} object The destination object.
9977     * @param {...Object} [sources] The source objects.
9978     * @returns {Object} Returns `object`.
9979     * @see _.defaultsDeep
9980     * @example
9981     *
9982     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
9983     * // => { 'a': 1, 'b': 2 }
9984     */var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1;}while(++index<length){var source=sources[index];var props=keysIn(source);var propsIndex=-1;var propsLength=props.length;while(++propsIndex<propsLength){var key=props[propsIndex];var value=object[key];if(value===undefined||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key)){object[key]=source[key];}}}return object;});/**
9985     * This method is like `_.defaults` except that it recursively assigns
9986     * default properties.
9987     *
9988     * **Note:** This method mutates `object`.
9989     *
9990     * @static
9991     * @memberOf _
9992     * @since 3.10.0
9993     * @category Object
9994     * @param {Object} object The destination object.
9995     * @param {...Object} [sources] The source objects.
9996     * @returns {Object} Returns `object`.
9997     * @see _.defaults
9998     * @example
9999     *
10000     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
10001     * // => { 'a': { 'b': 2, 'c': 3 } }
10002     */var defaultsDeep=baseRest(function(args){args.push(undefined,customDefaultsMerge);return apply(mergeWith,undefined,args);});/**
10003     * This method is like `_.find` except that it returns the key of the first
10004     * element `predicate` returns truthy for instead of the element itself.
10005     *
10006     * @static
10007     * @memberOf _
10008     * @since 1.1.0
10009     * @category Object
10010     * @param {Object} object The object to inspect.
10011     * @param {Function} [predicate=_.identity] The function invoked per iteration.
10012     * @returns {string|undefined} Returns the key of the matched element,
10013     *  else `undefined`.
10014     * @example
10015     *
10016     * var users = {
10017     *   'barney':  { 'age': 36, 'active': true },
10018     *   'fred':    { 'age': 40, 'active': false },
10019     *   'pebbles': { 'age': 1,  'active': true }
10020     * };
10021     *
10022     * _.findKey(users, function(o) { return o.age < 40; });
10023     * // => 'barney' (iteration order is not guaranteed)
10024     *
10025     * // The `_.matches` iteratee shorthand.
10026     * _.findKey(users, { 'age': 1, 'active': true });
10027     * // => 'pebbles'
10028     *
10029     * // The `_.matchesProperty` iteratee shorthand.
10030     * _.findKey(users, ['active', false]);
10031     * // => 'fred'
10032     *
10033     * // The `_.property` iteratee shorthand.
10034     * _.findKey(users, 'active');
10035     * // => 'barney'
10036     */function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn);}/**
10037     * This method is like `_.findKey` except that it iterates over elements of
10038     * a collection in the opposite order.
10039     *
10040     * @static
10041     * @memberOf _
10042     * @since 2.0.0
10043     * @category Object
10044     * @param {Object} object The object to inspect.
10045     * @param {Function} [predicate=_.identity] The function invoked per iteration.
10046     * @returns {string|undefined} Returns the key of the matched element,
10047     *  else `undefined`.
10048     * @example
10049     *
10050     * var users = {
10051     *   'barney':  { 'age': 36, 'active': true },
10052     *   'fred':    { 'age': 40, 'active': false },
10053     *   'pebbles': { 'age': 1,  'active': true }
10054     * };
10055     *
10056     * _.findLastKey(users, function(o) { return o.age < 40; });
10057     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
10058     *
10059     * // The `_.matches` iteratee shorthand.
10060     * _.findLastKey(users, { 'age': 36, 'active': true });
10061     * // => 'barney'
10062     *
10063     * // The `_.matchesProperty` iteratee shorthand.
10064     * _.findLastKey(users, ['active', false]);
10065     * // => 'fred'
10066     *
10067     * // The `_.property` iteratee shorthand.
10068     * _.findLastKey(users, 'active');
10069     * // => 'pebbles'
10070     */function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight);}/**
10071     * Iterates over own and inherited enumerable string keyed properties of an
10072     * object and invokes `iteratee` for each property. The iteratee is invoked
10073     * with three arguments: (value, key, object). Iteratee functions may exit
10074     * iteration early by explicitly returning `false`.
10075     *
10076     * @static
10077     * @memberOf _
10078     * @since 0.3.0
10079     * @category Object
10080     * @param {Object} object The object to iterate over.
10081     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10082     * @returns {Object} Returns `object`.
10083     * @see _.forInRight
10084     * @example
10085     *
10086     * function Foo() {
10087     *   this.a = 1;
10088     *   this.b = 2;
10089     * }
10090     *
10091     * Foo.prototype.c = 3;
10092     *
10093     * _.forIn(new Foo, function(value, key) {
10094     *   console.log(key);
10095     * });
10096     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
10097     */function forIn(object,iteratee){return object==null?object:baseFor(object,getIteratee(iteratee,3),keysIn);}/**
10098     * This method is like `_.forIn` except that it iterates over properties of
10099     * `object` in the opposite order.
10100     *
10101     * @static
10102     * @memberOf _
10103     * @since 2.0.0
10104     * @category Object
10105     * @param {Object} object The object to iterate over.
10106     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10107     * @returns {Object} Returns `object`.
10108     * @see _.forIn
10109     * @example
10110     *
10111     * function Foo() {
10112     *   this.a = 1;
10113     *   this.b = 2;
10114     * }
10115     *
10116     * Foo.prototype.c = 3;
10117     *
10118     * _.forInRight(new Foo, function(value, key) {
10119     *   console.log(key);
10120     * });
10121     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
10122     */function forInRight(object,iteratee){return object==null?object:baseForRight(object,getIteratee(iteratee,3),keysIn);}/**
10123     * Iterates over own enumerable string keyed properties of an object and
10124     * invokes `iteratee` for each property. The iteratee is invoked with three
10125     * arguments: (value, key, object). Iteratee functions may exit iteration
10126     * early by explicitly returning `false`.
10127     *
10128     * @static
10129     * @memberOf _
10130     * @since 0.3.0
10131     * @category Object
10132     * @param {Object} object The object to iterate over.
10133     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10134     * @returns {Object} Returns `object`.
10135     * @see _.forOwnRight
10136     * @example
10137     *
10138     * function Foo() {
10139     *   this.a = 1;
10140     *   this.b = 2;
10141     * }
10142     *
10143     * Foo.prototype.c = 3;
10144     *
10145     * _.forOwn(new Foo, function(value, key) {
10146     *   console.log(key);
10147     * });
10148     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
10149     */function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3));}/**
10150     * This method is like `_.forOwn` except that it iterates over properties of
10151     * `object` in the opposite order.
10152     *
10153     * @static
10154     * @memberOf _
10155     * @since 2.0.0
10156     * @category Object
10157     * @param {Object} object The object to iterate over.
10158     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10159     * @returns {Object} Returns `object`.
10160     * @see _.forOwn
10161     * @example
10162     *
10163     * function Foo() {
10164     *   this.a = 1;
10165     *   this.b = 2;
10166     * }
10167     *
10168     * Foo.prototype.c = 3;
10169     *
10170     * _.forOwnRight(new Foo, function(value, key) {
10171     *   console.log(key);
10172     * });
10173     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
10174     */function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3));}/**
10175     * Creates an array of function property names from own enumerable properties
10176     * of `object`.
10177     *
10178     * @static
10179     * @since 0.1.0
10180     * @memberOf _
10181     * @category Object
10182     * @param {Object} object The object to inspect.
10183     * @returns {Array} Returns the function names.
10184     * @see _.functionsIn
10185     * @example
10186     *
10187     * function Foo() {
10188     *   this.a = _.constant('a');
10189     *   this.b = _.constant('b');
10190     * }
10191     *
10192     * Foo.prototype.c = _.constant('c');
10193     *
10194     * _.functions(new Foo);
10195     * // => ['a', 'b']
10196     */function functions(object){return object==null?[]:baseFunctions(object,keys(object));}/**
10197     * Creates an array of function property names from own and inherited
10198     * enumerable properties of `object`.
10199     *
10200     * @static
10201     * @memberOf _
10202     * @since 4.0.0
10203     * @category Object
10204     * @param {Object} object The object to inspect.
10205     * @returns {Array} Returns the function names.
10206     * @see _.functions
10207     * @example
10208     *
10209     * function Foo() {
10210     *   this.a = _.constant('a');
10211     *   this.b = _.constant('b');
10212     * }
10213     *
10214     * Foo.prototype.c = _.constant('c');
10215     *
10216     * _.functionsIn(new Foo);
10217     * // => ['a', 'b', 'c']
10218     */function functionsIn(object){return object==null?[]:baseFunctions(object,keysIn(object));}/**
10219     * Gets the value at `path` of `object`. If the resolved value is
10220     * `undefined`, the `defaultValue` is returned in its place.
10221     *
10222     * @static
10223     * @memberOf _
10224     * @since 3.7.0
10225     * @category Object
10226     * @param {Object} object The object to query.
10227     * @param {Array|string} path The path of the property to get.
10228     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
10229     * @returns {*} Returns the resolved value.
10230     * @example
10231     *
10232     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
10233     *
10234     * _.get(object, 'a[0].b.c');
10235     * // => 3
10236     *
10237     * _.get(object, ['a', '0', 'b', 'c']);
10238     * // => 3
10239     *
10240     * _.get(object, 'a.b.c', 'default');
10241     * // => 'default'
10242     */function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,path);return result===undefined?defaultValue:result;}/**
10243     * Checks if `path` is a direct property of `object`.
10244     *
10245     * @static
10246     * @since 0.1.0
10247     * @memberOf _
10248     * @category Object
10249     * @param {Object} object The object to query.
10250     * @param {Array|string} path The path to check.
10251     * @returns {boolean} Returns `true` if `path` exists, else `false`.
10252     * @example
10253     *
10254     * var object = { 'a': { 'b': 2 } };
10255     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
10256     *
10257     * _.has(object, 'a');
10258     * // => true
10259     *
10260     * _.has(object, 'a.b');
10261     * // => true
10262     *
10263     * _.has(object, ['a', 'b']);
10264     * // => true
10265     *
10266     * _.has(other, 'a');
10267     * // => false
10268     */function has(object,path){return object!=null&&hasPath(object,path,baseHas);}/**
10269     * Checks if `path` is a direct or inherited property of `object`.
10270     *
10271     * @static
10272     * @memberOf _
10273     * @since 4.0.0
10274     * @category Object
10275     * @param {Object} object The object to query.
10276     * @param {Array|string} path The path to check.
10277     * @returns {boolean} Returns `true` if `path` exists, else `false`.
10278     * @example
10279     *
10280     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
10281     *
10282     * _.hasIn(object, 'a');
10283     * // => true
10284     *
10285     * _.hasIn(object, 'a.b');
10286     * // => true
10287     *
10288     * _.hasIn(object, ['a', 'b']);
10289     * // => true
10290     *
10291     * _.hasIn(object, 'b');
10292     * // => false
10293     */function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn);}/**
10294     * Creates an object composed of the inverted keys and values of `object`.
10295     * If `object` contains duplicate values, subsequent values overwrite
10296     * property assignments of previous values.
10297     *
10298     * @static
10299     * @memberOf _
10300     * @since 0.7.0
10301     * @category Object
10302     * @param {Object} object The object to invert.
10303     * @returns {Object} Returns the new inverted object.
10304     * @example
10305     *
10306     * var object = { 'a': 1, 'b': 2, 'c': 1 };
10307     *
10308     * _.invert(object);
10309     * // => { '1': 'c', '2': 'b' }
10310     */var invert=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}result[value]=key;},constant(identity));/**
10311     * This method is like `_.invert` except that the inverted object is generated
10312     * from the results of running each element of `object` thru `iteratee`. The
10313     * corresponding inverted value of each inverted key is an array of keys
10314     * responsible for generating the inverted value. The iteratee is invoked
10315     * with one argument: (value).
10316     *
10317     * @static
10318     * @memberOf _
10319     * @since 4.1.0
10320     * @category Object
10321     * @param {Object} object The object to invert.
10322     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10323     * @returns {Object} Returns the new inverted object.
10324     * @example
10325     *
10326     * var object = { 'a': 1, 'b': 2, 'c': 1 };
10327     *
10328     * _.invertBy(object);
10329     * // => { '1': ['a', 'c'], '2': ['b'] }
10330     *
10331     * _.invertBy(object, function(value) {
10332     *   return 'group' + value;
10333     * });
10334     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
10335     */var invertBy=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}if(hasOwnProperty.call(result,value)){result[value].push(key);}else{result[value]=[key];}},getIteratee);/**
10336     * Invokes the method at `path` of `object`.
10337     *
10338     * @static
10339     * @memberOf _
10340     * @since 4.0.0
10341     * @category Object
10342     * @param {Object} object The object to query.
10343     * @param {Array|string} path The path of the method to invoke.
10344     * @param {...*} [args] The arguments to invoke the method with.
10345     * @returns {*} Returns the result of the invoked method.
10346     * @example
10347     *
10348     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
10349     *
10350     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
10351     * // => [2, 3]
10352     */var invoke=baseRest(baseInvoke);/**
10353     * Creates an array of the own enumerable property names of `object`.
10354     *
10355     * **Note:** Non-object values are coerced to objects. See the
10356     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
10357     * for more details.
10358     *
10359     * @static
10360     * @since 0.1.0
10361     * @memberOf _
10362     * @category Object
10363     * @param {Object} object The object to query.
10364     * @returns {Array} Returns the array of property names.
10365     * @example
10366     *
10367     * function Foo() {
10368     *   this.a = 1;
10369     *   this.b = 2;
10370     * }
10371     *
10372     * Foo.prototype.c = 3;
10373     *
10374     * _.keys(new Foo);
10375     * // => ['a', 'b'] (iteration order is not guaranteed)
10376     *
10377     * _.keys('hi');
10378     * // => ['0', '1']
10379     */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object);}/**
10380     * Creates an array of the own and inherited enumerable property names of `object`.
10381     *
10382     * **Note:** Non-object values are coerced to objects.
10383     *
10384     * @static
10385     * @memberOf _
10386     * @since 3.0.0
10387     * @category Object
10388     * @param {Object} object The object to query.
10389     * @returns {Array} Returns the array of property names.
10390     * @example
10391     *
10392     * function Foo() {
10393     *   this.a = 1;
10394     *   this.b = 2;
10395     * }
10396     *
10397     * Foo.prototype.c = 3;
10398     *
10399     * _.keysIn(new Foo);
10400     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
10401     */function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object);}/**
10402     * The opposite of `_.mapValues`; this method creates an object with the
10403     * same values as `object` and keys generated by running each own enumerable
10404     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
10405     * with three arguments: (value, key, object).
10406     *
10407     * @static
10408     * @memberOf _
10409     * @since 3.8.0
10410     * @category Object
10411     * @param {Object} object The object to iterate over.
10412     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10413     * @returns {Object} Returns the new mapped object.
10414     * @see _.mapValues
10415     * @example
10416     *
10417     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
10418     *   return key + value;
10419     * });
10420     * // => { 'a1': 1, 'b2': 2 }
10421     */function mapKeys(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value);});return result;}/**
10422     * Creates an object with the same keys as `object` and values generated
10423     * by running each own enumerable string keyed property of `object` thru
10424     * `iteratee`. The iteratee is invoked with three arguments:
10425     * (value, key, object).
10426     *
10427     * @static
10428     * @memberOf _
10429     * @since 2.4.0
10430     * @category Object
10431     * @param {Object} object The object to iterate over.
10432     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10433     * @returns {Object} Returns the new mapped object.
10434     * @see _.mapKeys
10435     * @example
10436     *
10437     * var users = {
10438     *   'fred':    { 'user': 'fred',    'age': 40 },
10439     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
10440     * };
10441     *
10442     * _.mapValues(users, function(o) { return o.age; });
10443     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
10444     *
10445     * // The `_.property` iteratee shorthand.
10446     * _.mapValues(users, 'age');
10447     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
10448     */function mapValues(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object));});return result;}/**
10449     * This method is like `_.assign` except that it recursively merges own and
10450     * inherited enumerable string keyed properties of source objects into the
10451     * destination object. Source properties that resolve to `undefined` are
10452     * skipped if a destination value exists. Array and plain object properties
10453     * are merged recursively. Other objects and value types are overridden by
10454     * assignment. Source objects are applied from left to right. Subsequent
10455     * sources overwrite property assignments of previous sources.
10456     *
10457     * **Note:** This method mutates `object`.
10458     *
10459     * @static
10460     * @memberOf _
10461     * @since 0.5.0
10462     * @category Object
10463     * @param {Object} object The destination object.
10464     * @param {...Object} [sources] The source objects.
10465     * @returns {Object} Returns `object`.
10466     * @example
10467     *
10468     * var object = {
10469     *   'a': [{ 'b': 2 }, { 'd': 4 }]
10470     * };
10471     *
10472     * var other = {
10473     *   'a': [{ 'c': 3 }, { 'e': 5 }]
10474     * };
10475     *
10476     * _.merge(object, other);
10477     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
10478     */var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex);});/**
10479     * This method is like `_.merge` except that it accepts `customizer` which
10480     * is invoked to produce the merged values of the destination and source
10481     * properties. If `customizer` returns `undefined`, merging is handled by the
10482     * method instead. The `customizer` is invoked with six arguments:
10483     * (objValue, srcValue, key, object, source, stack).
10484     *
10485     * **Note:** This method mutates `object`.
10486     *
10487     * @static
10488     * @memberOf _
10489     * @since 4.0.0
10490     * @category Object
10491     * @param {Object} object The destination object.
10492     * @param {...Object} sources The source objects.
10493     * @param {Function} customizer The function to customize assigned values.
10494     * @returns {Object} Returns `object`.
10495     * @example
10496     *
10497     * function customizer(objValue, srcValue) {
10498     *   if (_.isArray(objValue)) {
10499     *     return objValue.concat(srcValue);
10500     *   }
10501     * }
10502     *
10503     * var object = { 'a': [1], 'b': [2] };
10504     * var other = { 'a': [3], 'b': [4] };
10505     *
10506     * _.mergeWith(object, other, customizer);
10507     * // => { 'a': [1, 3], 'b': [2, 4] }
10508     */var mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer);});/**
10509     * The opposite of `_.pick`; this method creates an object composed of the
10510     * own and inherited enumerable property paths of `object` that are not omitted.
10511     *
10512     * **Note:** This method is considerably slower than `_.pick`.
10513     *
10514     * @static
10515     * @since 0.1.0
10516     * @memberOf _
10517     * @category Object
10518     * @param {Object} object The source object.
10519     * @param {...(string|string[])} [paths] The property paths to omit.
10520     * @returns {Object} Returns the new object.
10521     * @example
10522     *
10523     * var object = { 'a': 1, 'b': '2', 'c': 3 };
10524     *
10525     * _.omit(object, ['a', 'c']);
10526     * // => { 'b': '2' }
10527     */var omit=flatRest(function(object,paths){var result={};if(object==null){return result;}var isDeep=false;paths=arrayMap(paths,function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path;});copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone);}var length=paths.length;while(length--){baseUnset(result,paths[length]);}return result;});/**
10528     * The opposite of `_.pickBy`; this method creates an object composed of
10529     * the own and inherited enumerable string keyed properties of `object` that
10530     * `predicate` doesn't return truthy for. The predicate is invoked with two
10531     * arguments: (value, key).
10532     *
10533     * @static
10534     * @memberOf _
10535     * @since 4.0.0
10536     * @category Object
10537     * @param {Object} object The source object.
10538     * @param {Function} [predicate=_.identity] The function invoked per property.
10539     * @returns {Object} Returns the new object.
10540     * @example
10541     *
10542     * var object = { 'a': 1, 'b': '2', 'c': 3 };
10543     *
10544     * _.omitBy(object, _.isNumber);
10545     * // => { 'b': '2' }
10546     */function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)));}/**
10547     * Creates an object composed of the picked `object` properties.
10548     *
10549     * @static
10550     * @since 0.1.0
10551     * @memberOf _
10552     * @category Object
10553     * @param {Object} object The source object.
10554     * @param {...(string|string[])} [paths] The property paths to pick.
10555     * @returns {Object} Returns the new object.
10556     * @example
10557     *
10558     * var object = { 'a': 1, 'b': '2', 'c': 3 };
10559     *
10560     * _.pick(object, ['a', 'c']);
10561     * // => { 'a': 1, 'c': 3 }
10562     */var pick=flatRest(function(object,paths){return object==null?{}:basePick(object,paths);});/**
10563     * Creates an object composed of the `object` properties `predicate` returns
10564     * truthy for. The predicate is invoked with two arguments: (value, key).
10565     *
10566     * @static
10567     * @memberOf _
10568     * @since 4.0.0
10569     * @category Object
10570     * @param {Object} object The source object.
10571     * @param {Function} [predicate=_.identity] The function invoked per property.
10572     * @returns {Object} Returns the new object.
10573     * @example
10574     *
10575     * var object = { 'a': 1, 'b': '2', 'c': 3 };
10576     *
10577     * _.pickBy(object, _.isNumber);
10578     * // => { 'a': 1, 'c': 3 }
10579     */function pickBy(object,predicate){if(object==null){return{};}var props=arrayMap(getAllKeysIn(object),function(prop){return[prop];});predicate=getIteratee(predicate);return basePickBy(object,props,function(value,path){return predicate(value,path[0]);});}/**
10580     * This method is like `_.get` except that if the resolved value is a
10581     * function it's invoked with the `this` binding of its parent object and
10582     * its result is returned.
10583     *
10584     * @static
10585     * @since 0.1.0
10586     * @memberOf _
10587     * @category Object
10588     * @param {Object} object The object to query.
10589     * @param {Array|string} path The path of the property to resolve.
10590     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
10591     * @returns {*} Returns the resolved value.
10592     * @example
10593     *
10594     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
10595     *
10596     * _.result(object, 'a[0].b.c1');
10597     * // => 3
10598     *
10599     * _.result(object, 'a[0].b.c2');
10600     * // => 4
10601     *
10602     * _.result(object, 'a[0].b.c3', 'default');
10603     * // => 'default'
10604     *
10605     * _.result(object, 'a[0].b.c3', _.constant('default'));
10606     * // => 'default'
10607     */function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;// Ensure the loop is entered when path is empty.
10608if(!length){length=1;object=undefined;}while(++index<length){var value=object==null?undefined:object[toKey(path[index])];if(value===undefined){index=length;value=defaultValue;}object=isFunction(value)?value.call(object):value;}return object;}/**
10609     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
10610     * it's created. Arrays are created for missing index properties while objects
10611     * are created for all other missing properties. Use `_.setWith` to customize
10612     * `path` creation.
10613     *
10614     * **Note:** This method mutates `object`.
10615     *
10616     * @static
10617     * @memberOf _
10618     * @since 3.7.0
10619     * @category Object
10620     * @param {Object} object The object to modify.
10621     * @param {Array|string} path The path of the property to set.
10622     * @param {*} value The value to set.
10623     * @returns {Object} Returns `object`.
10624     * @example
10625     *
10626     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
10627     *
10628     * _.set(object, 'a[0].b.c', 4);
10629     * console.log(object.a[0].b.c);
10630     * // => 4
10631     *
10632     * _.set(object, ['x', '0', 'y', 'z'], 5);
10633     * console.log(object.x[0].y.z);
10634     * // => 5
10635     */function set(object,path,value){return object==null?object:baseSet(object,path,value);}/**
10636     * This method is like `_.set` except that it accepts `customizer` which is
10637     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
10638     * path creation is handled by the method instead. The `customizer` is invoked
10639     * with three arguments: (nsValue, key, nsObject).
10640     *
10641     * **Note:** This method mutates `object`.
10642     *
10643     * @static
10644     * @memberOf _
10645     * @since 4.0.0
10646     * @category Object
10647     * @param {Object} object The object to modify.
10648     * @param {Array|string} path The path of the property to set.
10649     * @param {*} value The value to set.
10650     * @param {Function} [customizer] The function to customize assigned values.
10651     * @returns {Object} Returns `object`.
10652     * @example
10653     *
10654     * var object = {};
10655     *
10656     * _.setWith(object, '[0][1]', 'a', Object);
10657     * // => { '0': { '1': 'a' } }
10658     */function setWith(object,path,value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return object==null?object:baseSet(object,path,value,customizer);}/**
10659     * Creates an array of own enumerable string keyed-value pairs for `object`
10660     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
10661     * entries are returned.
10662     *
10663     * @static
10664     * @memberOf _
10665     * @since 4.0.0
10666     * @alias entries
10667     * @category Object
10668     * @param {Object} object The object to query.
10669     * @returns {Array} Returns the key-value pairs.
10670     * @example
10671     *
10672     * function Foo() {
10673     *   this.a = 1;
10674     *   this.b = 2;
10675     * }
10676     *
10677     * Foo.prototype.c = 3;
10678     *
10679     * _.toPairs(new Foo);
10680     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
10681     */var toPairs=createToPairs(keys);/**
10682     * Creates an array of own and inherited enumerable string keyed-value pairs
10683     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
10684     * or set, its entries are returned.
10685     *
10686     * @static
10687     * @memberOf _
10688     * @since 4.0.0
10689     * @alias entriesIn
10690     * @category Object
10691     * @param {Object} object The object to query.
10692     * @returns {Array} Returns the key-value pairs.
10693     * @example
10694     *
10695     * function Foo() {
10696     *   this.a = 1;
10697     *   this.b = 2;
10698     * }
10699     *
10700     * Foo.prototype.c = 3;
10701     *
10702     * _.toPairsIn(new Foo);
10703     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
10704     */var toPairsIn=createToPairs(keysIn);/**
10705     * An alternative to `_.reduce`; this method transforms `object` to a new
10706     * `accumulator` object which is the result of running each of its own
10707     * enumerable string keyed properties thru `iteratee`, with each invocation
10708     * potentially mutating the `accumulator` object. If `accumulator` is not
10709     * provided, a new object with the same `[[Prototype]]` will be used. The
10710     * iteratee is invoked with four arguments: (accumulator, value, key, object).
10711     * Iteratee functions may exit iteration early by explicitly returning `false`.
10712     *
10713     * @static
10714     * @memberOf _
10715     * @since 1.3.0
10716     * @category Object
10717     * @param {Object} object The object to iterate over.
10718     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10719     * @param {*} [accumulator] The custom accumulator value.
10720     * @returns {*} Returns the accumulated value.
10721     * @example
10722     *
10723     * _.transform([2, 3, 4], function(result, n) {
10724     *   result.push(n *= n);
10725     *   return n % 2 == 0;
10726     * }, []);
10727     * // => [4, 9]
10728     *
10729     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
10730     *   (result[value] || (result[value] = [])).push(key);
10731     * }, {});
10732     * // => { '1': ['a', 'c'], '2': ['b'] }
10733     */function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);iteratee=getIteratee(iteratee,4);if(accumulator==null){var Ctor=object&&object.constructor;if(isArrLike){accumulator=isArr?new Ctor():[];}else if(isObject(object)){accumulator=isFunction(Ctor)?baseCreate(getPrototype(object)):{};}else{accumulator={};}}(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object);});return accumulator;}/**
10734     * Removes the property at `path` of `object`.
10735     *
10736     * **Note:** This method mutates `object`.
10737     *
10738     * @static
10739     * @memberOf _
10740     * @since 4.0.0
10741     * @category Object
10742     * @param {Object} object The object to modify.
10743     * @param {Array|string} path The path of the property to unset.
10744     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
10745     * @example
10746     *
10747     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
10748     * _.unset(object, 'a[0].b.c');
10749     * // => true
10750     *
10751     * console.log(object);
10752     * // => { 'a': [{ 'b': {} }] };
10753     *
10754     * _.unset(object, ['a', '0', 'b', 'c']);
10755     * // => true
10756     *
10757     * console.log(object);
10758     * // => { 'a': [{ 'b': {} }] };
10759     */function unset(object,path){return object==null?true:baseUnset(object,path);}/**
10760     * This method is like `_.set` except that accepts `updater` to produce the
10761     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
10762     * is invoked with one argument: (value).
10763     *
10764     * **Note:** This method mutates `object`.
10765     *
10766     * @static
10767     * @memberOf _
10768     * @since 4.6.0
10769     * @category Object
10770     * @param {Object} object The object to modify.
10771     * @param {Array|string} path The path of the property to set.
10772     * @param {Function} updater The function to produce the updated value.
10773     * @returns {Object} Returns `object`.
10774     * @example
10775     *
10776     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
10777     *
10778     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
10779     * console.log(object.a[0].b.c);
10780     * // => 9
10781     *
10782     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
10783     * console.log(object.x[0].y.z);
10784     * // => 0
10785     */function update(object,path,updater){return object==null?object:baseUpdate(object,path,castFunction(updater));}/**
10786     * This method is like `_.update` except that it accepts `customizer` which is
10787     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
10788     * path creation is handled by the method instead. The `customizer` is invoked
10789     * with three arguments: (nsValue, key, nsObject).
10790     *
10791     * **Note:** This method mutates `object`.
10792     *
10793     * @static
10794     * @memberOf _
10795     * @since 4.6.0
10796     * @category Object
10797     * @param {Object} object The object to modify.
10798     * @param {Array|string} path The path of the property to set.
10799     * @param {Function} updater The function to produce the updated value.
10800     * @param {Function} [customizer] The function to customize assigned values.
10801     * @returns {Object} Returns `object`.
10802     * @example
10803     *
10804     * var object = {};
10805     *
10806     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
10807     * // => { '0': { '1': 'a' } }
10808     */function updateWith(object,path,updater,customizer){customizer=typeof customizer=='function'?customizer:undefined;return object==null?object:baseUpdate(object,path,castFunction(updater),customizer);}/**
10809     * Creates an array of the own enumerable string keyed property values of `object`.
10810     *
10811     * **Note:** Non-object values are coerced to objects.
10812     *
10813     * @static
10814     * @since 0.1.0
10815     * @memberOf _
10816     * @category Object
10817     * @param {Object} object The object to query.
10818     * @returns {Array} Returns the array of property values.
10819     * @example
10820     *
10821     * function Foo() {
10822     *   this.a = 1;
10823     *   this.b = 2;
10824     * }
10825     *
10826     * Foo.prototype.c = 3;
10827     *
10828     * _.values(new Foo);
10829     * // => [1, 2] (iteration order is not guaranteed)
10830     *
10831     * _.values('hi');
10832     * // => ['h', 'i']
10833     */function values(object){return object==null?[]:baseValues(object,keys(object));}/**
10834     * Creates an array of the own and inherited enumerable string keyed property
10835     * values of `object`.
10836     *
10837     * **Note:** Non-object values are coerced to objects.
10838     *
10839     * @static
10840     * @memberOf _
10841     * @since 3.0.0
10842     * @category Object
10843     * @param {Object} object The object to query.
10844     * @returns {Array} Returns the array of property values.
10845     * @example
10846     *
10847     * function Foo() {
10848     *   this.a = 1;
10849     *   this.b = 2;
10850     * }
10851     *
10852     * Foo.prototype.c = 3;
10853     *
10854     * _.valuesIn(new Foo);
10855     * // => [1, 2, 3] (iteration order is not guaranteed)
10856     */function valuesIn(object){return object==null?[]:baseValues(object,keysIn(object));}/*------------------------------------------------------------------------*/ /**
10857     * Clamps `number` within the inclusive `lower` and `upper` bounds.
10858     *
10859     * @static
10860     * @memberOf _
10861     * @since 4.0.0
10862     * @category Number
10863     * @param {number} number The number to clamp.
10864     * @param {number} [lower] The lower bound.
10865     * @param {number} upper The upper bound.
10866     * @returns {number} Returns the clamped number.
10867     * @example
10868     *
10869     * _.clamp(-10, -5, 5);
10870     * // => -5
10871     *
10872     * _.clamp(10, -5, 5);
10873     * // => 5
10874     */function clamp(number,lower,upper){if(upper===undefined){upper=lower;lower=undefined;}if(upper!==undefined){upper=toNumber(upper);upper=upper===upper?upper:0;}if(lower!==undefined){lower=toNumber(lower);lower=lower===lower?lower:0;}return baseClamp(toNumber(number),lower,upper);}/**
10875     * Checks if `n` is between `start` and up to, but not including, `end`. If
10876     * `end` is not specified, it's set to `start` with `start` then set to `0`.
10877     * If `start` is greater than `end` the params are swapped to support
10878     * negative ranges.
10879     *
10880     * @static
10881     * @memberOf _
10882     * @since 3.3.0
10883     * @category Number
10884     * @param {number} number The number to check.
10885     * @param {number} [start=0] The start of the range.
10886     * @param {number} end The end of the range.
10887     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
10888     * @see _.range, _.rangeRight
10889     * @example
10890     *
10891     * _.inRange(3, 2, 4);
10892     * // => true
10893     *
10894     * _.inRange(4, 8);
10895     * // => true
10896     *
10897     * _.inRange(4, 2);
10898     * // => false
10899     *
10900     * _.inRange(2, 2);
10901     * // => false
10902     *
10903     * _.inRange(1.2, 2);
10904     * // => true
10905     *
10906     * _.inRange(5.2, 4);
10907     * // => false
10908     *
10909     * _.inRange(-3, -2, -6);
10910     * // => true
10911     */function inRange(number,start,end){start=toFinite(start);if(end===undefined){end=start;start=0;}else{end=toFinite(end);}number=toNumber(number);return baseInRange(number,start,end);}/**
10912     * Produces a random number between the inclusive `lower` and `upper` bounds.
10913     * If only one argument is provided a number between `0` and the given number
10914     * is returned. If `floating` is `true`, or either `lower` or `upper` are
10915     * floats, a floating-point number is returned instead of an integer.
10916     *
10917     * **Note:** JavaScript follows the IEEE-754 standard for resolving
10918     * floating-point values which can produce unexpected results.
10919     *
10920     * @static
10921     * @memberOf _
10922     * @since 0.7.0
10923     * @category Number
10924     * @param {number} [lower=0] The lower bound.
10925     * @param {number} [upper=1] The upper bound.
10926     * @param {boolean} [floating] Specify returning a floating-point number.
10927     * @returns {number} Returns the random number.
10928     * @example
10929     *
10930     * _.random(0, 5);
10931     * // => an integer between 0 and 5
10932     *
10933     * _.random(5);
10934     * // => also an integer between 0 and 5
10935     *
10936     * _.random(5, true);
10937     * // => a floating-point number between 0 and 5
10938     *
10939     * _.random(1.2, 5.2);
10940     * // => a floating-point number between 1.2 and 5.2
10941     */function random(lower,upper,floating){if(floating&&typeof floating!='boolean'&&isIterateeCall(lower,upper,floating)){upper=floating=undefined;}if(floating===undefined){if(typeof upper=='boolean'){floating=upper;upper=undefined;}else if(typeof lower=='boolean'){floating=lower;lower=undefined;}}if(lower===undefined&&upper===undefined){lower=0;upper=1;}else{lower=toFinite(lower);if(upper===undefined){upper=lower;lower=0;}else{upper=toFinite(upper);}}if(lower>upper){var temp=lower;lower=upper;upper=temp;}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat('1e-'+((rand+'').length-1))),upper);}return baseRandom(lower,upper);}/*------------------------------------------------------------------------*/ /**
10942     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
10943     *
10944     * @static
10945     * @memberOf _
10946     * @since 3.0.0
10947     * @category String
10948     * @param {string} [string=''] The string to convert.
10949     * @returns {string} Returns the camel cased string.
10950     * @example
10951     *
10952     * _.camelCase('Foo Bar');
10953     * // => 'fooBar'
10954     *
10955     * _.camelCase('--foo-bar--');
10956     * // => 'fooBar'
10957     *
10958     * _.camelCase('__FOO_BAR__');
10959     * // => 'fooBar'
10960     */var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?capitalize(word):word);});/**
10961     * Converts the first character of `string` to upper case and the remaining
10962     * to lower case.
10963     *
10964     * @static
10965     * @memberOf _
10966     * @since 3.0.0
10967     * @category String
10968     * @param {string} [string=''] The string to capitalize.
10969     * @returns {string} Returns the capitalized string.
10970     * @example
10971     *
10972     * _.capitalize('FRED');
10973     * // => 'Fred'
10974     */function capitalize(string){return upperFirst(toString(string).toLowerCase());}/**
10975     * Deburrs `string` by converting
10976     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
10977     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
10978     * letters to basic Latin letters and removing
10979     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
10980     *
10981     * @static
10982     * @memberOf _
10983     * @since 3.0.0
10984     * @category String
10985     * @param {string} [string=''] The string to deburr.
10986     * @returns {string} Returns the deburred string.
10987     * @example
10988     *
10989     * _.deburr('déjà vu');
10990     * // => 'deja vu'
10991     */function deburr(string){string=toString(string);return string&&string.replace(reLatin,deburrLetter).replace(reComboMark,'');}/**
10992     * Checks if `string` ends with the given target string.
10993     *
10994     * @static
10995     * @memberOf _
10996     * @since 3.0.0
10997     * @category String
10998     * @param {string} [string=''] The string to inspect.
10999     * @param {string} [target] The string to search for.
11000     * @param {number} [position=string.length] The position to search up to.
11001     * @returns {boolean} Returns `true` if `string` ends with `target`,
11002     *  else `false`.
11003     * @example
11004     *
11005     * _.endsWith('abc', 'c');
11006     * // => true
11007     *
11008     * _.endsWith('abc', 'b');
11009     * // => false
11010     *
11011     * _.endsWith('abc', 'b', 2);
11012     * // => true
11013     */function endsWith(string,target,position){string=toString(string);target=baseToString(target);var length=string.length;position=position===undefined?length:baseClamp(toInteger(position),0,length);var end=position;position-=target.length;return position>=0&&string.slice(position,end)==target;}/**
11014     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
11015     * corresponding HTML entities.
11016     *
11017     * **Note:** No other characters are escaped. To escape additional
11018     * characters use a third-party library like [_he_](https://mths.be/he).
11019     *
11020     * Though the ">" character is escaped for symmetry, characters like
11021     * ">" and "/" don't need escaping in HTML and have no special meaning
11022     * unless they're part of a tag or unquoted attribute value. See
11023     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
11024     * (under "semi-related fun fact") for more details.
11025     *
11026     * When working with HTML you should always
11027     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
11028     * XSS vectors.
11029     *
11030     * @static
11031     * @since 0.1.0
11032     * @memberOf _
11033     * @category String
11034     * @param {string} [string=''] The string to escape.
11035     * @returns {string} Returns the escaped string.
11036     * @example
11037     *
11038     * _.escape('fred, barney, & pebbles');
11039     * // => 'fred, barney, &amp; pebbles'
11040     */function escape(string){string=toString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string;}/**
11041     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
11042     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
11043     *
11044     * @static
11045     * @memberOf _
11046     * @since 3.0.0
11047     * @category String
11048     * @param {string} [string=''] The string to escape.
11049     * @returns {string} Returns the escaped string.
11050     * @example
11051     *
11052     * _.escapeRegExp('[lodash](https://lodash.com/)');
11053     * // => '\[lodash\]\(https://lodash\.com/\)'
11054     */function escapeRegExp(string){string=toString(string);return string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,'\\$&'):string;}/**
11055     * Converts `string` to
11056     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
11057     *
11058     * @static
11059     * @memberOf _
11060     * @since 3.0.0
11061     * @category String
11062     * @param {string} [string=''] The string to convert.
11063     * @returns {string} Returns the kebab cased string.
11064     * @example
11065     *
11066     * _.kebabCase('Foo Bar');
11067     * // => 'foo-bar'
11068     *
11069     * _.kebabCase('fooBar');
11070     * // => 'foo-bar'
11071     *
11072     * _.kebabCase('__FOO_BAR__');
11073     * // => 'foo-bar'
11074     */var kebabCase=createCompounder(function(result,word,index){return result+(index?'-':'')+word.toLowerCase();});/**
11075     * Converts `string`, as space separated words, to lower case.
11076     *
11077     * @static
11078     * @memberOf _
11079     * @since 4.0.0
11080     * @category String
11081     * @param {string} [string=''] The string to convert.
11082     * @returns {string} Returns the lower cased string.
11083     * @example
11084     *
11085     * _.lowerCase('--Foo-Bar--');
11086     * // => 'foo bar'
11087     *
11088     * _.lowerCase('fooBar');
11089     * // => 'foo bar'
11090     *
11091     * _.lowerCase('__FOO_BAR__');
11092     * // => 'foo bar'
11093     */var lowerCase=createCompounder(function(result,word,index){return result+(index?' ':'')+word.toLowerCase();});/**
11094     * Converts the first character of `string` to lower case.
11095     *
11096     * @static
11097     * @memberOf _
11098     * @since 4.0.0
11099     * @category String
11100     * @param {string} [string=''] The string to convert.
11101     * @returns {string} Returns the converted string.
11102     * @example
11103     *
11104     * _.lowerFirst('Fred');
11105     * // => 'fred'
11106     *
11107     * _.lowerFirst('FRED');
11108     * // => 'fRED'
11109     */var lowerFirst=createCaseFirst('toLowerCase');/**
11110     * Pads `string` on the left and right sides if it's shorter than `length`.
11111     * Padding characters are truncated if they can't be evenly divided by `length`.
11112     *
11113     * @static
11114     * @memberOf _
11115     * @since 3.0.0
11116     * @category String
11117     * @param {string} [string=''] The string to pad.
11118     * @param {number} [length=0] The padding length.
11119     * @param {string} [chars=' '] The string used as padding.
11120     * @returns {string} Returns the padded string.
11121     * @example
11122     *
11123     * _.pad('abc', 8);
11124     * // => '  abc   '
11125     *
11126     * _.pad('abc', 8, '_-');
11127     * // => '_-abc_-_'
11128     *
11129     * _.pad('abc', 3);
11130     * // => 'abc'
11131     */function pad(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;if(!length||strLength>=length){return string;}var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars);}/**
11132     * Pads `string` on the right side if it's shorter than `length`. Padding
11133     * characters are truncated if they exceed `length`.
11134     *
11135     * @static
11136     * @memberOf _
11137     * @since 4.0.0
11138     * @category String
11139     * @param {string} [string=''] The string to pad.
11140     * @param {number} [length=0] The padding length.
11141     * @param {string} [chars=' '] The string used as padding.
11142     * @returns {string} Returns the padded string.
11143     * @example
11144     *
11145     * _.padEnd('abc', 6);
11146     * // => 'abc   '
11147     *
11148     * _.padEnd('abc', 6, '_-');
11149     * // => 'abc_-_'
11150     *
11151     * _.padEnd('abc', 3);
11152     * // => 'abc'
11153     */function padEnd(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string;}/**
11154     * Pads `string` on the left side if it's shorter than `length`. Padding
11155     * characters are truncated if they exceed `length`.
11156     *
11157     * @static
11158     * @memberOf _
11159     * @since 4.0.0
11160     * @category String
11161     * @param {string} [string=''] The string to pad.
11162     * @param {number} [length=0] The padding length.
11163     * @param {string} [chars=' '] The string used as padding.
11164     * @returns {string} Returns the padded string.
11165     * @example
11166     *
11167     * _.padStart('abc', 6);
11168     * // => '   abc'
11169     *
11170     * _.padStart('abc', 6, '_-');
11171     * // => '_-_abc'
11172     *
11173     * _.padStart('abc', 3);
11174     * // => 'abc'
11175     */function padStart(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string;}/**
11176     * Converts `string` to an integer of the specified radix. If `radix` is
11177     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
11178     * hexadecimal, in which case a `radix` of `16` is used.
11179     *
11180     * **Note:** This method aligns with the
11181     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
11182     *
11183     * @static
11184     * @memberOf _
11185     * @since 1.1.0
11186     * @category String
11187     * @param {string} string The string to convert.
11188     * @param {number} [radix=10] The radix to interpret `value` by.
11189     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11190     * @returns {number} Returns the converted integer.
11191     * @example
11192     *
11193     * _.parseInt('08');
11194     * // => 8
11195     *
11196     * _.map(['6', '08', '10'], _.parseInt);
11197     * // => [6, 8, 10]
11198     */function parseInt(string,radix,guard){if(guard||radix==null){radix=0;}else if(radix){radix=+radix;}return nativeParseInt(toString(string).replace(reTrimStart,''),radix||0);}/**
11199     * Repeats the given string `n` times.
11200     *
11201     * @static
11202     * @memberOf _
11203     * @since 3.0.0
11204     * @category String
11205     * @param {string} [string=''] The string to repeat.
11206     * @param {number} [n=1] The number of times to repeat the string.
11207     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11208     * @returns {string} Returns the repeated string.
11209     * @example
11210     *
11211     * _.repeat('*', 3);
11212     * // => '***'
11213     *
11214     * _.repeat('abc', 2);
11215     * // => 'abcabc'
11216     *
11217     * _.repeat('abc', 0);
11218     * // => ''
11219     */function repeat(string,n,guard){if(guard?isIterateeCall(string,n,guard):n===undefined){n=1;}else{n=toInteger(n);}return baseRepeat(toString(string),n);}/**
11220     * Replaces matches for `pattern` in `string` with `replacement`.
11221     *
11222     * **Note:** This method is based on
11223     * [`String#replace`](https://mdn.io/String/replace).
11224     *
11225     * @static
11226     * @memberOf _
11227     * @since 4.0.0
11228     * @category String
11229     * @param {string} [string=''] The string to modify.
11230     * @param {RegExp|string} pattern The pattern to replace.
11231     * @param {Function|string} replacement The match replacement.
11232     * @returns {string} Returns the modified string.
11233     * @example
11234     *
11235     * _.replace('Hi Fred', 'Fred', 'Barney');
11236     * // => 'Hi Barney'
11237     */function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2]);}/**
11238     * Converts `string` to
11239     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
11240     *
11241     * @static
11242     * @memberOf _
11243     * @since 3.0.0
11244     * @category String
11245     * @param {string} [string=''] The string to convert.
11246     * @returns {string} Returns the snake cased string.
11247     * @example
11248     *
11249     * _.snakeCase('Foo Bar');
11250     * // => 'foo_bar'
11251     *
11252     * _.snakeCase('fooBar');
11253     * // => 'foo_bar'
11254     *
11255     * _.snakeCase('--FOO-BAR--');
11256     * // => 'foo_bar'
11257     */var snakeCase=createCompounder(function(result,word,index){return result+(index?'_':'')+word.toLowerCase();});/**
11258     * Splits `string` by `separator`.
11259     *
11260     * **Note:** This method is based on
11261     * [`String#split`](https://mdn.io/String/split).
11262     *
11263     * @static
11264     * @memberOf _
11265     * @since 4.0.0
11266     * @category String
11267     * @param {string} [string=''] The string to split.
11268     * @param {RegExp|string} separator The separator pattern to split by.
11269     * @param {number} [limit] The length to truncate results to.
11270     * @returns {Array} Returns the string segments.
11271     * @example
11272     *
11273     * _.split('a-b-c', '-', 2);
11274     * // => ['a', 'b']
11275     */function split(string,separator,limit){if(limit&&typeof limit!='number'&&isIterateeCall(string,separator,limit)){separator=limit=undefined;}limit=limit===undefined?MAX_ARRAY_LENGTH:limit>>>0;if(!limit){return[];}string=toString(string);if(string&&(typeof separator=='string'||separator!=null&&!isRegExp(separator))){separator=baseToString(separator);if(!separator&&hasUnicode(string)){return castSlice(stringToArray(string),0,limit);}}return string.split(separator,limit);}/**
11276     * Converts `string` to
11277     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
11278     *
11279     * @static
11280     * @memberOf _
11281     * @since 3.1.0
11282     * @category String
11283     * @param {string} [string=''] The string to convert.
11284     * @returns {string} Returns the start cased string.
11285     * @example
11286     *
11287     * _.startCase('--foo-bar--');
11288     * // => 'Foo Bar'
11289     *
11290     * _.startCase('fooBar');
11291     * // => 'Foo Bar'
11292     *
11293     * _.startCase('__FOO_BAR__');
11294     * // => 'FOO BAR'
11295     */var startCase=createCompounder(function(result,word,index){return result+(index?' ':'')+upperFirst(word);});/**
11296     * Checks if `string` starts with the given target string.
11297     *
11298     * @static
11299     * @memberOf _
11300     * @since 3.0.0
11301     * @category String
11302     * @param {string} [string=''] The string to inspect.
11303     * @param {string} [target] The string to search for.
11304     * @param {number} [position=0] The position to search from.
11305     * @returns {boolean} Returns `true` if `string` starts with `target`,
11306     *  else `false`.
11307     * @example
11308     *
11309     * _.startsWith('abc', 'a');
11310     * // => true
11311     *
11312     * _.startsWith('abc', 'b');
11313     * // => false
11314     *
11315     * _.startsWith('abc', 'b', 1);
11316     * // => true
11317     */function startsWith(string,target,position){string=toString(string);position=position==null?0:baseClamp(toInteger(position),0,string.length);target=baseToString(target);return string.slice(position,position+target.length)==target;}/**
11318     * Creates a compiled template function that can interpolate data properties
11319     * in "interpolate" delimiters, HTML-escape interpolated data properties in
11320     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
11321     * properties may be accessed as free variables in the template. If a setting
11322     * object is given, it takes precedence over `_.templateSettings` values.
11323     *
11324     * **Note:** In the development build `_.template` utilizes
11325     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
11326     * for easier debugging.
11327     *
11328     * For more information on precompiling templates see
11329     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
11330     *
11331     * For more information on Chrome extension sandboxes see
11332     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
11333     *
11334     * @static
11335     * @since 0.1.0
11336     * @memberOf _
11337     * @category String
11338     * @param {string} [string=''] The template string.
11339     * @param {Object} [options={}] The options object.
11340     * @param {RegExp} [options.escape=_.templateSettings.escape]
11341     *  The HTML "escape" delimiter.
11342     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
11343     *  The "evaluate" delimiter.
11344     * @param {Object} [options.imports=_.templateSettings.imports]
11345     *  An object to import into the template as free variables.
11346     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
11347     *  The "interpolate" delimiter.
11348     * @param {string} [options.sourceURL='lodash.templateSources[n]']
11349     *  The sourceURL of the compiled template.
11350     * @param {string} [options.variable='obj']
11351     *  The data object variable name.
11352     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11353     * @returns {Function} Returns the compiled template function.
11354     * @example
11355     *
11356     * // Use the "interpolate" delimiter to create a compiled template.
11357     * var compiled = _.template('hello <%= user %>!');
11358     * compiled({ 'user': 'fred' });
11359     * // => 'hello fred!'
11360     *
11361     * // Use the HTML "escape" delimiter to escape data property values.
11362     * var compiled = _.template('<b><%- value %></b>');
11363     * compiled({ 'value': '<script>' });
11364     * // => '<b>&lt;script&gt;</b>'
11365     *
11366     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
11367     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
11368     * compiled({ 'users': ['fred', 'barney'] });
11369     * // => '<li>fred</li><li>barney</li>'
11370     *
11371     * // Use the internal `print` function in "evaluate" delimiters.
11372     * var compiled = _.template('<% print("hello " + user); %>!');
11373     * compiled({ 'user': 'barney' });
11374     * // => 'hello barney!'
11375     *
11376     * // Use the ES template literal delimiter as an "interpolate" delimiter.
11377     * // Disable support by replacing the "interpolate" delimiter.
11378     * var compiled = _.template('hello ${ user }!');
11379     * compiled({ 'user': 'pebbles' });
11380     * // => 'hello pebbles!'
11381     *
11382     * // Use backslashes to treat delimiters as plain text.
11383     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
11384     * compiled({ 'value': 'ignored' });
11385     * // => '<%- value %>'
11386     *
11387     * // Use the `imports` option to import `jQuery` as `jq`.
11388     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
11389     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
11390     * compiled({ 'users': ['fred', 'barney'] });
11391     * // => '<li>fred</li><li>barney</li>'
11392     *
11393     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
11394     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
11395     * compiled(data);
11396     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
11397     *
11398     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
11399     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
11400     * compiled.source;
11401     * // => function(data) {
11402     * //   var __t, __p = '';
11403     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
11404     * //   return __p;
11405     * // }
11406     *
11407     * // Use custom template delimiters.
11408     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
11409     * var compiled = _.template('hello {{ user }}!');
11410     * compiled({ 'user': 'mustache' });
11411     * // => 'hello mustache!'
11412     *
11413     * // Use the `source` property to inline compiled templates for meaningful
11414     * // line numbers in error messages and stack traces.
11415     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
11416     *   var JST = {\
11417     *     "main": ' + _.template(mainText).source + '\
11418     *   };\
11419     * ');
11420     */function template(string,options,guard){// Based on John Resig's `tmpl` implementation
11421// (http://ejohn.org/blog/javascript-micro-templating/)
11422// and Laura Doktorova's doT.js (https://github.com/olado/doT).
11423var settings=lodash.templateSettings;if(guard&&isIterateeCall(string,options,guard)){options=undefined;}string=toString(string);options=assignInWith({},options,settings,customDefaultsAssignIn);var imports=assignInWith({},options.imports,settings.imports,customDefaultsAssignIn),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";// Compile the regexp to match each delimiter.
11424var reDelimiters=RegExp((options.escape||reNoMatch).source+'|'+interpolate.source+'|'+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+'|'+(options.evaluate||reNoMatch).source+'|$','g');// Use a sourceURL for easier debugging.
11425// The sourceURL gets injected into the source that's eval-ed, so be careful
11426// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
11427// and escape the comment, thus injecting code that gets evaled.
11428var sourceURL='//# sourceURL='+(hasOwnProperty.call(options,'sourceURL')?(options.sourceURL+'').replace(/\s/g,' '):'lodash.templateSources['+ ++templateCounter+']')+'\n';string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);// Escape characters that can't be included in string literals.
11429source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);// Replace delimiters with snippets.
11430if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'";}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '";}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'";}index=offset+match.length;// The JS engine embedded in Adobe products needs `match` returned in
11431// order to produce the correct `offset` value.
11432return match;});source+="';\n";// If `variable` is not specified wrap a with-statement around the generated
11433// code to add the data object to the top of the scope chain.
11434var variable=hasOwnProperty.call(options,'variable')&&options.variable;if(!variable){source='with (obj) {\n'+source+'\n}\n';}// Throw an error if a forbidden character was found in `variable`, to prevent
11435// potential command injection attacks.
11436else if(reForbiddenIdentifierChars.test(variable)){throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);}// Cleanup code by stripping empty strings.
11437source=(isEvaluating?source.replace(reEmptyStringLeading,''):source).replace(reEmptyStringMiddle,'$1').replace(reEmptyStringTrailing,'$1;');// Frame code as the function body.
11438source='function('+(variable||'obj')+') {\n'+(variable?'':'obj || (obj = {});\n')+"var __t, __p = ''"+(isEscaping?', __e = _.escape':'')+(isEvaluating?', __j = Array.prototype.join;\n'+"function print() { __p += __j.call(arguments, '') }\n":';\n')+source+'return __p\n}';var result=attempt(function(){return Function(importsKeys,sourceURL+'return '+source).apply(undefined,importsValues);});// Provide the compiled function's source by its `toString` method or
11439// the `source` property as a convenience for inlining compiled templates.
11440result.source=source;if(isError(result)){throw result;}return result;}/**
11441     * Converts `string`, as a whole, to lower case just like
11442     * [String#toLowerCase](https://mdn.io/toLowerCase).
11443     *
11444     * @static
11445     * @memberOf _
11446     * @since 4.0.0
11447     * @category String
11448     * @param {string} [string=''] The string to convert.
11449     * @returns {string} Returns the lower cased string.
11450     * @example
11451     *
11452     * _.toLower('--Foo-Bar--');
11453     * // => '--foo-bar--'
11454     *
11455     * _.toLower('fooBar');
11456     * // => 'foobar'
11457     *
11458     * _.toLower('__FOO_BAR__');
11459     * // => '__foo_bar__'
11460     */function toLower(value){return toString(value).toLowerCase();}/**
11461     * Converts `string`, as a whole, to upper case just like
11462     * [String#toUpperCase](https://mdn.io/toUpperCase).
11463     *
11464     * @static
11465     * @memberOf _
11466     * @since 4.0.0
11467     * @category String
11468     * @param {string} [string=''] The string to convert.
11469     * @returns {string} Returns the upper cased string.
11470     * @example
11471     *
11472     * _.toUpper('--foo-bar--');
11473     * // => '--FOO-BAR--'
11474     *
11475     * _.toUpper('fooBar');
11476     * // => 'FOOBAR'
11477     *
11478     * _.toUpper('__foo_bar__');
11479     * // => '__FOO_BAR__'
11480     */function toUpper(value){return toString(value).toUpperCase();}/**
11481     * Removes leading and trailing whitespace or specified characters from `string`.
11482     *
11483     * @static
11484     * @memberOf _
11485     * @since 3.0.0
11486     * @category String
11487     * @param {string} [string=''] The string to trim.
11488     * @param {string} [chars=whitespace] The characters to trim.
11489     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11490     * @returns {string} Returns the trimmed string.
11491     * @example
11492     *
11493     * _.trim('  abc  ');
11494     * // => 'abc'
11495     *
11496     * _.trim('-_-abc-_-', '_-');
11497     * // => 'abc'
11498     *
11499     * _.map(['  foo  ', '  bar  '], _.trim);
11500     * // => ['foo', 'bar']
11501     */function trim(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined)){return baseTrim(string);}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars),start=charsStartIndex(strSymbols,chrSymbols),end=charsEndIndex(strSymbols,chrSymbols)+1;return castSlice(strSymbols,start,end).join('');}/**
11502     * Removes trailing whitespace or specified characters from `string`.
11503     *
11504     * @static
11505     * @memberOf _
11506     * @since 4.0.0
11507     * @category String
11508     * @param {string} [string=''] The string to trim.
11509     * @param {string} [chars=whitespace] The characters to trim.
11510     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11511     * @returns {string} Returns the trimmed string.
11512     * @example
11513     *
11514     * _.trimEnd('  abc  ');
11515     * // => '  abc'
11516     *
11517     * _.trimEnd('-_-abc-_-', '_-');
11518     * // => '-_-abc'
11519     */function trimEnd(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined)){return string.slice(0,trimmedEndIndex(string)+1);}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),end=charsEndIndex(strSymbols,stringToArray(chars))+1;return castSlice(strSymbols,0,end).join('');}/**
11520     * Removes leading whitespace or specified characters from `string`.
11521     *
11522     * @static
11523     * @memberOf _
11524     * @since 4.0.0
11525     * @category String
11526     * @param {string} [string=''] The string to trim.
11527     * @param {string} [chars=whitespace] The characters to trim.
11528     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11529     * @returns {string} Returns the trimmed string.
11530     * @example
11531     *
11532     * _.trimStart('  abc  ');
11533     * // => 'abc  '
11534     *
11535     * _.trimStart('-_-abc-_-', '_-');
11536     * // => 'abc-_-'
11537     */function trimStart(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined)){return string.replace(reTrimStart,'');}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),start=charsStartIndex(strSymbols,stringToArray(chars));return castSlice(strSymbols,start).join('');}/**
11538     * Truncates `string` if it's longer than the given maximum string length.
11539     * The last characters of the truncated string are replaced with the omission
11540     * string which defaults to "...".
11541     *
11542     * @static
11543     * @memberOf _
11544     * @since 4.0.0
11545     * @category String
11546     * @param {string} [string=''] The string to truncate.
11547     * @param {Object} [options={}] The options object.
11548     * @param {number} [options.length=30] The maximum string length.
11549     * @param {string} [options.omission='...'] The string to indicate text is omitted.
11550     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
11551     * @returns {string} Returns the truncated string.
11552     * @example
11553     *
11554     * _.truncate('hi-diddly-ho there, neighborino');
11555     * // => 'hi-diddly-ho there, neighbo...'
11556     *
11557     * _.truncate('hi-diddly-ho there, neighborino', {
11558     *   'length': 24,
11559     *   'separator': ' '
11560     * });
11561     * // => 'hi-diddly-ho there,...'
11562     *
11563     * _.truncate('hi-diddly-ho there, neighborino', {
11564     *   'length': 24,
11565     *   'separator': /,? +/
11566     * });
11567     * // => 'hi-diddly-ho there...'
11568     *
11569     * _.truncate('hi-diddly-ho there, neighborino', {
11570     *   'omission': ' [...]'
11571     * });
11572     * // => 'hi-diddly-ho there, neig [...]'
11573     */function truncate(string,options){var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(isObject(options)){var separator='separator'in options?options.separator:separator;length='length'in options?toInteger(options.length):length;omission='omission'in options?baseToString(options.omission):omission;}string=toString(string);var strLength=string.length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length;}if(length>=strLength){return string;}var end=length-stringSize(omission);if(end<1){return omission;}var result=strSymbols?castSlice(strSymbols,0,end).join(''):string.slice(0,end);if(separator===undefined){return result+omission;}if(strSymbols){end+=result.length-end;}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;if(!separator.global){separator=RegExp(separator.source,toString(reFlags.exec(separator))+'g');}separator.lastIndex=0;while(match=separator.exec(substring)){var newEnd=match.index;}result=result.slice(0,newEnd===undefined?end:newEnd);}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index);}}return result+omission;}/**
11574     * The inverse of `_.escape`; this method converts the HTML entities
11575     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
11576     * their corresponding characters.
11577     *
11578     * **Note:** No other HTML entities are unescaped. To unescape additional
11579     * HTML entities use a third-party library like [_he_](https://mths.be/he).
11580     *
11581     * @static
11582     * @memberOf _
11583     * @since 0.6.0
11584     * @category String
11585     * @param {string} [string=''] The string to unescape.
11586     * @returns {string} Returns the unescaped string.
11587     * @example
11588     *
11589     * _.unescape('fred, barney, &amp; pebbles');
11590     * // => 'fred, barney, & pebbles'
11591     */function unescape(string){string=toString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string;}/**
11592     * Converts `string`, as space separated words, to upper case.
11593     *
11594     * @static
11595     * @memberOf _
11596     * @since 4.0.0
11597     * @category String
11598     * @param {string} [string=''] The string to convert.
11599     * @returns {string} Returns the upper cased string.
11600     * @example
11601     *
11602     * _.upperCase('--foo-bar');
11603     * // => 'FOO BAR'
11604     *
11605     * _.upperCase('fooBar');
11606     * // => 'FOO BAR'
11607     *
11608     * _.upperCase('__foo_bar__');
11609     * // => 'FOO BAR'
11610     */var upperCase=createCompounder(function(result,word,index){return result+(index?' ':'')+word.toUpperCase();});/**
11611     * Converts the first character of `string` to upper case.
11612     *
11613     * @static
11614     * @memberOf _
11615     * @since 4.0.0
11616     * @category String
11617     * @param {string} [string=''] The string to convert.
11618     * @returns {string} Returns the converted string.
11619     * @example
11620     *
11621     * _.upperFirst('fred');
11622     * // => 'Fred'
11623     *
11624     * _.upperFirst('FRED');
11625     * // => 'FRED'
11626     */var upperFirst=createCaseFirst('toUpperCase');/**
11627     * Splits `string` into an array of its words.
11628     *
11629     * @static
11630     * @memberOf _
11631     * @since 3.0.0
11632     * @category String
11633     * @param {string} [string=''] The string to inspect.
11634     * @param {RegExp|string} [pattern] The pattern to match words.
11635     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11636     * @returns {Array} Returns the words of `string`.
11637     * @example
11638     *
11639     * _.words('fred, barney, & pebbles');
11640     * // => ['fred', 'barney', 'pebbles']
11641     *
11642     * _.words('fred, barney, & pebbles', /[^, ]+/g);
11643     * // => ['fred', 'barney', '&', 'pebbles']
11644     */function words(string,pattern,guard){string=toString(string);pattern=guard?undefined:pattern;if(pattern===undefined){return hasUnicodeWord(string)?unicodeWords(string):asciiWords(string);}return string.match(pattern)||[];}/*------------------------------------------------------------------------*/ /**
11645     * Attempts to invoke `func`, returning either the result or the caught error
11646     * object. Any additional arguments are provided to `func` when it's invoked.
11647     *
11648     * @static
11649     * @memberOf _
11650     * @since 3.0.0
11651     * @category Util
11652     * @param {Function} func The function to attempt.
11653     * @param {...*} [args] The arguments to invoke `func` with.
11654     * @returns {*} Returns the `func` result or error object.
11655     * @example
11656     *
11657     * // Avoid throwing errors for invalid selectors.
11658     * var elements = _.attempt(function(selector) {
11659     *   return document.querySelectorAll(selector);
11660     * }, '>_>');
11661     *
11662     * if (_.isError(elements)) {
11663     *   elements = [];
11664     * }
11665     */var attempt=baseRest(function(func,args){try{return apply(func,undefined,args);}catch(e){return isError(e)?e:new Error(e);}});/**
11666     * Binds methods of an object to the object itself, overwriting the existing
11667     * method.
11668     *
11669     * **Note:** This method doesn't set the "length" property of bound functions.
11670     *
11671     * @static
11672     * @since 0.1.0
11673     * @memberOf _
11674     * @category Util
11675     * @param {Object} object The object to bind and assign the bound methods to.
11676     * @param {...(string|string[])} methodNames The object method names to bind.
11677     * @returns {Object} Returns `object`.
11678     * @example
11679     *
11680     * var view = {
11681     *   'label': 'docs',
11682     *   'click': function() {
11683     *     console.log('clicked ' + this.label);
11684     *   }
11685     * };
11686     *
11687     * _.bindAll(view, ['click']);
11688     * jQuery(element).on('click', view.click);
11689     * // => Logs 'clicked docs' when clicked.
11690     */var bindAll=flatRest(function(object,methodNames){arrayEach(methodNames,function(key){key=toKey(key);baseAssignValue(object,key,bind(object[key],object));});return object;});/**
11691     * Creates a function that iterates over `pairs` and invokes the corresponding
11692     * function of the first predicate to return truthy. The predicate-function
11693     * pairs are invoked with the `this` binding and arguments of the created
11694     * function.
11695     *
11696     * @static
11697     * @memberOf _
11698     * @since 4.0.0
11699     * @category Util
11700     * @param {Array} pairs The predicate-function pairs.
11701     * @returns {Function} Returns the new composite function.
11702     * @example
11703     *
11704     * var func = _.cond([
11705     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
11706     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
11707     *   [_.stubTrue,                      _.constant('no match')]
11708     * ]);
11709     *
11710     * func({ 'a': 1, 'b': 2 });
11711     * // => 'matches A'
11712     *
11713     * func({ 'a': 0, 'b': 1 });
11714     * // => 'matches B'
11715     *
11716     * func({ 'a': '1', 'b': '2' });
11717     * // => 'no match'
11718     */function cond(pairs){var length=pairs==null?0:pairs.length,toIteratee=getIteratee();pairs=!length?[]:arrayMap(pairs,function(pair){if(typeof pair[1]!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return[toIteratee(pair[0]),pair[1]];});return baseRest(function(args){var index=-1;while(++index<length){var pair=pairs[index];if(apply(pair[0],this,args)){return apply(pair[1],this,args);}}});}/**
11719     * Creates a function that invokes the predicate properties of `source` with
11720     * the corresponding property values of a given object, returning `true` if
11721     * all predicates return truthy, else `false`.
11722     *
11723     * **Note:** The created function is equivalent to `_.conformsTo` with
11724     * `source` partially applied.
11725     *
11726     * @static
11727     * @memberOf _
11728     * @since 4.0.0
11729     * @category Util
11730     * @param {Object} source The object of property predicates to conform to.
11731     * @returns {Function} Returns the new spec function.
11732     * @example
11733     *
11734     * var objects = [
11735     *   { 'a': 2, 'b': 1 },
11736     *   { 'a': 1, 'b': 2 }
11737     * ];
11738     *
11739     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
11740     * // => [{ 'a': 1, 'b': 2 }]
11741     */function conforms(source){return baseConforms(baseClone(source,CLONE_DEEP_FLAG));}/**
11742     * Creates a function that returns `value`.
11743     *
11744     * @static
11745     * @memberOf _
11746     * @since 2.4.0
11747     * @category Util
11748     * @param {*} value The value to return from the new function.
11749     * @returns {Function} Returns the new constant function.
11750     * @example
11751     *
11752     * var objects = _.times(2, _.constant({ 'a': 1 }));
11753     *
11754     * console.log(objects);
11755     * // => [{ 'a': 1 }, { 'a': 1 }]
11756     *
11757     * console.log(objects[0] === objects[1]);
11758     * // => true
11759     */function constant(value){return function(){return value;};}/**
11760     * Checks `value` to determine whether a default value should be returned in
11761     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
11762     * or `undefined`.
11763     *
11764     * @static
11765     * @memberOf _
11766     * @since 4.14.0
11767     * @category Util
11768     * @param {*} value The value to check.
11769     * @param {*} defaultValue The default value.
11770     * @returns {*} Returns the resolved value.
11771     * @example
11772     *
11773     * _.defaultTo(1, 10);
11774     * // => 1
11775     *
11776     * _.defaultTo(undefined, 10);
11777     * // => 10
11778     */function defaultTo(value,defaultValue){return value==null||value!==value?defaultValue:value;}/**
11779     * Creates a function that returns the result of invoking the given functions
11780     * with the `this` binding of the created function, where each successive
11781     * invocation is supplied the return value of the previous.
11782     *
11783     * @static
11784     * @memberOf _
11785     * @since 3.0.0
11786     * @category Util
11787     * @param {...(Function|Function[])} [funcs] The functions to invoke.
11788     * @returns {Function} Returns the new composite function.
11789     * @see _.flowRight
11790     * @example
11791     *
11792     * function square(n) {
11793     *   return n * n;
11794     * }
11795     *
11796     * var addSquare = _.flow([_.add, square]);
11797     * addSquare(1, 2);
11798     * // => 9
11799     */var flow=createFlow();/**
11800     * This method is like `_.flow` except that it creates a function that
11801     * invokes the given functions from right to left.
11802     *
11803     * @static
11804     * @since 3.0.0
11805     * @memberOf _
11806     * @category Util
11807     * @param {...(Function|Function[])} [funcs] The functions to invoke.
11808     * @returns {Function} Returns the new composite function.
11809     * @see _.flow
11810     * @example
11811     *
11812     * function square(n) {
11813     *   return n * n;
11814     * }
11815     *
11816     * var addSquare = _.flowRight([square, _.add]);
11817     * addSquare(1, 2);
11818     * // => 9
11819     */var flowRight=createFlow(true);/**
11820     * This method returns the first argument it receives.
11821     *
11822     * @static
11823     * @since 0.1.0
11824     * @memberOf _
11825     * @category Util
11826     * @param {*} value Any value.
11827     * @returns {*} Returns `value`.
11828     * @example
11829     *
11830     * var object = { 'a': 1 };
11831     *
11832     * console.log(_.identity(object) === object);
11833     * // => true
11834     */function identity(value){return value;}/**
11835     * Creates a function that invokes `func` with the arguments of the created
11836     * function. If `func` is a property name, the created function returns the
11837     * property value for a given element. If `func` is an array or object, the
11838     * created function returns `true` for elements that contain the equivalent
11839     * source properties, otherwise it returns `false`.
11840     *
11841     * @static
11842     * @since 4.0.0
11843     * @memberOf _
11844     * @category Util
11845     * @param {*} [func=_.identity] The value to convert to a callback.
11846     * @returns {Function} Returns the callback.
11847     * @example
11848     *
11849     * var users = [
11850     *   { 'user': 'barney', 'age': 36, 'active': true },
11851     *   { 'user': 'fred',   'age': 40, 'active': false }
11852     * ];
11853     *
11854     * // The `_.matches` iteratee shorthand.
11855     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
11856     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
11857     *
11858     * // The `_.matchesProperty` iteratee shorthand.
11859     * _.filter(users, _.iteratee(['user', 'fred']));
11860     * // => [{ 'user': 'fred', 'age': 40 }]
11861     *
11862     * // The `_.property` iteratee shorthand.
11863     * _.map(users, _.iteratee('user'));
11864     * // => ['barney', 'fred']
11865     *
11866     * // Create custom iteratee shorthands.
11867     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
11868     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
11869     *     return func.test(string);
11870     *   };
11871     * });
11872     *
11873     * _.filter(['abc', 'def'], /ef/);
11874     * // => ['def']
11875     */function iteratee(func){return baseIteratee(typeof func=='function'?func:baseClone(func,CLONE_DEEP_FLAG));}/**
11876     * Creates a function that performs a partial deep comparison between a given
11877     * object and `source`, returning `true` if the given object has equivalent
11878     * property values, else `false`.
11879     *
11880     * **Note:** The created function is equivalent to `_.isMatch` with `source`
11881     * partially applied.
11882     *
11883     * Partial comparisons will match empty array and empty object `source`
11884     * values against any array or object value, respectively. See `_.isEqual`
11885     * for a list of supported value comparisons.
11886     *
11887     * **Note:** Multiple values can be checked by combining several matchers
11888     * using `_.overSome`
11889     *
11890     * @static
11891     * @memberOf _
11892     * @since 3.0.0
11893     * @category Util
11894     * @param {Object} source The object of property values to match.
11895     * @returns {Function} Returns the new spec function.
11896     * @example
11897     *
11898     * var objects = [
11899     *   { 'a': 1, 'b': 2, 'c': 3 },
11900     *   { 'a': 4, 'b': 5, 'c': 6 }
11901     * ];
11902     *
11903     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
11904     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
11905     *
11906     * // Checking for several possible values
11907     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
11908     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
11909     */function matches(source){return baseMatches(baseClone(source,CLONE_DEEP_FLAG));}/**
11910     * Creates a function that performs a partial deep comparison between the
11911     * value at `path` of a given object to `srcValue`, returning `true` if the
11912     * object value is equivalent, else `false`.
11913     *
11914     * **Note:** Partial comparisons will match empty array and empty object
11915     * `srcValue` values against any array or object value, respectively. See
11916     * `_.isEqual` for a list of supported value comparisons.
11917     *
11918     * **Note:** Multiple values can be checked by combining several matchers
11919     * using `_.overSome`
11920     *
11921     * @static
11922     * @memberOf _
11923     * @since 3.2.0
11924     * @category Util
11925     * @param {Array|string} path The path of the property to get.
11926     * @param {*} srcValue The value to match.
11927     * @returns {Function} Returns the new spec function.
11928     * @example
11929     *
11930     * var objects = [
11931     *   { 'a': 1, 'b': 2, 'c': 3 },
11932     *   { 'a': 4, 'b': 5, 'c': 6 }
11933     * ];
11934     *
11935     * _.find(objects, _.matchesProperty('a', 4));
11936     * // => { 'a': 4, 'b': 5, 'c': 6 }
11937     *
11938     * // Checking for several possible values
11939     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
11940     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
11941     */function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,CLONE_DEEP_FLAG));}/**
11942     * Creates a function that invokes the method at `path` of a given object.
11943     * Any additional arguments are provided to the invoked method.
11944     *
11945     * @static
11946     * @memberOf _
11947     * @since 3.7.0
11948     * @category Util
11949     * @param {Array|string} path The path of the method to invoke.
11950     * @param {...*} [args] The arguments to invoke the method with.
11951     * @returns {Function} Returns the new invoker function.
11952     * @example
11953     *
11954     * var objects = [
11955     *   { 'a': { 'b': _.constant(2) } },
11956     *   { 'a': { 'b': _.constant(1) } }
11957     * ];
11958     *
11959     * _.map(objects, _.method('a.b'));
11960     * // => [2, 1]
11961     *
11962     * _.map(objects, _.method(['a', 'b']));
11963     * // => [2, 1]
11964     */var method=baseRest(function(path,args){return function(object){return baseInvoke(object,path,args);};});/**
11965     * The opposite of `_.method`; this method creates a function that invokes
11966     * the method at a given path of `object`. Any additional arguments are
11967     * provided to the invoked method.
11968     *
11969     * @static
11970     * @memberOf _
11971     * @since 3.7.0
11972     * @category Util
11973     * @param {Object} object The object to query.
11974     * @param {...*} [args] The arguments to invoke the method with.
11975     * @returns {Function} Returns the new invoker function.
11976     * @example
11977     *
11978     * var array = _.times(3, _.constant),
11979     *     object = { 'a': array, 'b': array, 'c': array };
11980     *
11981     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
11982     * // => [2, 0]
11983     *
11984     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
11985     * // => [2, 0]
11986     */var methodOf=baseRest(function(object,args){return function(path){return baseInvoke(object,path,args);};});/**
11987     * Adds all own enumerable string keyed function properties of a source
11988     * object to the destination object. If `object` is a function, then methods
11989     * are added to its prototype as well.
11990     *
11991     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
11992     * avoid conflicts caused by modifying the original.
11993     *
11994     * @static
11995     * @since 0.1.0
11996     * @memberOf _
11997     * @category Util
11998     * @param {Function|Object} [object=lodash] The destination object.
11999     * @param {Object} source The object of functions to add.
12000     * @param {Object} [options={}] The options object.
12001     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
12002     * @returns {Function|Object} Returns `object`.
12003     * @example
12004     *
12005     * function vowels(string) {
12006     *   return _.filter(string, function(v) {
12007     *     return /[aeiou]/i.test(v);
12008     *   });
12009     * }
12010     *
12011     * _.mixin({ 'vowels': vowels });
12012     * _.vowels('fred');
12013     * // => ['e']
12014     *
12015     * _('fred').vowels().value();
12016     * // => ['e']
12017     *
12018     * _.mixin({ 'vowels': vowels }, { 'chain': false });
12019     * _('fred').vowels();
12020     * // => ['e']
12021     */function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);if(options==null&&!(isObject(source)&&(methodNames.length||!props.length))){options=source;source=object;object=this;methodNames=baseFunctions(source,keys(source));}var chain=!(isObject(options)&&'chain'in options)||!!options.chain,isFunc=isFunction(object);arrayEach(methodNames,function(methodName){var func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=copyArray(this.__actions__);actions.push({'func':func,'args':arguments,'thisArg':object});result.__chain__=chainAll;return result;}return func.apply(object,arrayPush([this.value()],arguments));};}});return object;}/**
12022     * Reverts the `_` variable to its previous value and returns a reference to
12023     * the `lodash` function.
12024     *
12025     * @static
12026     * @since 0.1.0
12027     * @memberOf _
12028     * @category Util
12029     * @returns {Function} Returns the `lodash` function.
12030     * @example
12031     *
12032     * var lodash = _.noConflict();
12033     */function noConflict(){if(root._===this){root._=oldDash;}return this;}/**
12034     * This method returns `undefined`.
12035     *
12036     * @static
12037     * @memberOf _
12038     * @since 2.3.0
12039     * @category Util
12040     * @example
12041     *
12042     * _.times(2, _.noop);
12043     * // => [undefined, undefined]
12044     */function noop(){// No operation performed.
12045}/**
12046     * Creates a function that gets the argument at index `n`. If `n` is negative,
12047     * the nth argument from the end is returned.
12048     *
12049     * @static
12050     * @memberOf _
12051     * @since 4.0.0
12052     * @category Util
12053     * @param {number} [n=0] The index of the argument to return.
12054     * @returns {Function} Returns the new pass-thru function.
12055     * @example
12056     *
12057     * var func = _.nthArg(1);
12058     * func('a', 'b', 'c', 'd');
12059     * // => 'b'
12060     *
12061     * var func = _.nthArg(-2);
12062     * func('a', 'b', 'c', 'd');
12063     * // => 'c'
12064     */function nthArg(n){n=toInteger(n);return baseRest(function(args){return baseNth(args,n);});}/**
12065     * Creates a function that invokes `iteratees` with the arguments it receives
12066     * and returns their results.
12067     *
12068     * @static
12069     * @memberOf _
12070     * @since 4.0.0
12071     * @category Util
12072     * @param {...(Function|Function[])} [iteratees=[_.identity]]
12073     *  The iteratees to invoke.
12074     * @returns {Function} Returns the new function.
12075     * @example
12076     *
12077     * var func = _.over([Math.max, Math.min]);
12078     *
12079     * func(1, 2, 3, 4);
12080     * // => [4, 1]
12081     */var over=createOver(arrayMap);/**
12082     * Creates a function that checks if **all** of the `predicates` return
12083     * truthy when invoked with the arguments it receives.
12084     *
12085     * Following shorthands are possible for providing predicates.
12086     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
12087     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
12088     *
12089     * @static
12090     * @memberOf _
12091     * @since 4.0.0
12092     * @category Util
12093     * @param {...(Function|Function[])} [predicates=[_.identity]]
12094     *  The predicates to check.
12095     * @returns {Function} Returns the new function.
12096     * @example
12097     *
12098     * var func = _.overEvery([Boolean, isFinite]);
12099     *
12100     * func('1');
12101     * // => true
12102     *
12103     * func(null);
12104     * // => false
12105     *
12106     * func(NaN);
12107     * // => false
12108     */var overEvery=createOver(arrayEvery);/**
12109     * Creates a function that checks if **any** of the `predicates` return
12110     * truthy when invoked with the arguments it receives.
12111     *
12112     * Following shorthands are possible for providing predicates.
12113     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
12114     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
12115     *
12116     * @static
12117     * @memberOf _
12118     * @since 4.0.0
12119     * @category Util
12120     * @param {...(Function|Function[])} [predicates=[_.identity]]
12121     *  The predicates to check.
12122     * @returns {Function} Returns the new function.
12123     * @example
12124     *
12125     * var func = _.overSome([Boolean, isFinite]);
12126     *
12127     * func('1');
12128     * // => true
12129     *
12130     * func(null);
12131     * // => true
12132     *
12133     * func(NaN);
12134     * // => false
12135     *
12136     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
12137     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
12138     */var overSome=createOver(arraySome);/**
12139     * Creates a function that returns the value at `path` of a given object.
12140     *
12141     * @static
12142     * @memberOf _
12143     * @since 2.4.0
12144     * @category Util
12145     * @param {Array|string} path The path of the property to get.
12146     * @returns {Function} Returns the new accessor function.
12147     * @example
12148     *
12149     * var objects = [
12150     *   { 'a': { 'b': 2 } },
12151     *   { 'a': { 'b': 1 } }
12152     * ];
12153     *
12154     * _.map(objects, _.property('a.b'));
12155     * // => [2, 1]
12156     *
12157     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
12158     * // => [1, 2]
12159     */function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path);}/**
12160     * The opposite of `_.property`; this method creates a function that returns
12161     * the value at a given path of `object`.
12162     *
12163     * @static
12164     * @memberOf _
12165     * @since 3.0.0
12166     * @category Util
12167     * @param {Object} object The object to query.
12168     * @returns {Function} Returns the new accessor function.
12169     * @example
12170     *
12171     * var array = [0, 1, 2],
12172     *     object = { 'a': array, 'b': array, 'c': array };
12173     *
12174     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
12175     * // => [2, 0]
12176     *
12177     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
12178     * // => [2, 0]
12179     */function propertyOf(object){return function(path){return object==null?undefined:baseGet(object,path);};}/**
12180     * Creates an array of numbers (positive and/or negative) progressing from
12181     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
12182     * `start` is specified without an `end` or `step`. If `end` is not specified,
12183     * it's set to `start` with `start` then set to `0`.
12184     *
12185     * **Note:** JavaScript follows the IEEE-754 standard for resolving
12186     * floating-point values which can produce unexpected results.
12187     *
12188     * @static
12189     * @since 0.1.0
12190     * @memberOf _
12191     * @category Util
12192     * @param {number} [start=0] The start of the range.
12193     * @param {number} end The end of the range.
12194     * @param {number} [step=1] The value to increment or decrement by.
12195     * @returns {Array} Returns the range of numbers.
12196     * @see _.inRange, _.rangeRight
12197     * @example
12198     *
12199     * _.range(4);
12200     * // => [0, 1, 2, 3]
12201     *
12202     * _.range(-4);
12203     * // => [0, -1, -2, -3]
12204     *
12205     * _.range(1, 5);
12206     * // => [1, 2, 3, 4]
12207     *
12208     * _.range(0, 20, 5);
12209     * // => [0, 5, 10, 15]
12210     *
12211     * _.range(0, -4, -1);
12212     * // => [0, -1, -2, -3]
12213     *
12214     * _.range(1, 4, 0);
12215     * // => [1, 1, 1]
12216     *
12217     * _.range(0);
12218     * // => []
12219     */var range=createRange();/**
12220     * This method is like `_.range` except that it populates values in
12221     * descending order.
12222     *
12223     * @static
12224     * @memberOf _
12225     * @since 4.0.0
12226     * @category Util
12227     * @param {number} [start=0] The start of the range.
12228     * @param {number} end The end of the range.
12229     * @param {number} [step=1] The value to increment or decrement by.
12230     * @returns {Array} Returns the range of numbers.
12231     * @see _.inRange, _.range
12232     * @example
12233     *
12234     * _.rangeRight(4);
12235     * // => [3, 2, 1, 0]
12236     *
12237     * _.rangeRight(-4);
12238     * // => [-3, -2, -1, 0]
12239     *
12240     * _.rangeRight(1, 5);
12241     * // => [4, 3, 2, 1]
12242     *
12243     * _.rangeRight(0, 20, 5);
12244     * // => [15, 10, 5, 0]
12245     *
12246     * _.rangeRight(0, -4, -1);
12247     * // => [-3, -2, -1, 0]
12248     *
12249     * _.rangeRight(1, 4, 0);
12250     * // => [1, 1, 1]
12251     *
12252     * _.rangeRight(0);
12253     * // => []
12254     */var rangeRight=createRange(true);/**
12255     * This method returns a new empty array.
12256     *
12257     * @static
12258     * @memberOf _
12259     * @since 4.13.0
12260     * @category Util
12261     * @returns {Array} Returns the new empty array.
12262     * @example
12263     *
12264     * var arrays = _.times(2, _.stubArray);
12265     *
12266     * console.log(arrays);
12267     * // => [[], []]
12268     *
12269     * console.log(arrays[0] === arrays[1]);
12270     * // => false
12271     */function stubArray(){return[];}/**
12272     * This method returns `false`.
12273     *
12274     * @static
12275     * @memberOf _
12276     * @since 4.13.0
12277     * @category Util
12278     * @returns {boolean} Returns `false`.
12279     * @example
12280     *
12281     * _.times(2, _.stubFalse);
12282     * // => [false, false]
12283     */function stubFalse(){return false;}/**
12284     * This method returns a new empty object.
12285     *
12286     * @static
12287     * @memberOf _
12288     * @since 4.13.0
12289     * @category Util
12290     * @returns {Object} Returns the new empty object.
12291     * @example
12292     *
12293     * var objects = _.times(2, _.stubObject);
12294     *
12295     * console.log(objects);
12296     * // => [{}, {}]
12297     *
12298     * console.log(objects[0] === objects[1]);
12299     * // => false
12300     */function stubObject(){return{};}/**
12301     * This method returns an empty string.
12302     *
12303     * @static
12304     * @memberOf _
12305     * @since 4.13.0
12306     * @category Util
12307     * @returns {string} Returns the empty string.
12308     * @example
12309     *
12310     * _.times(2, _.stubString);
12311     * // => ['', '']
12312     */function stubString(){return'';}/**
12313     * This method returns `true`.
12314     *
12315     * @static
12316     * @memberOf _
12317     * @since 4.13.0
12318     * @category Util
12319     * @returns {boolean} Returns `true`.
12320     * @example
12321     *
12322     * _.times(2, _.stubTrue);
12323     * // => [true, true]
12324     */function stubTrue(){return true;}/**
12325     * Invokes the iteratee `n` times, returning an array of the results of
12326     * each invocation. The iteratee is invoked with one argument; (index).
12327     *
12328     * @static
12329     * @since 0.1.0
12330     * @memberOf _
12331     * @category Util
12332     * @param {number} n The number of times to invoke `iteratee`.
12333     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
12334     * @returns {Array} Returns the array of results.
12335     * @example
12336     *
12337     * _.times(3, String);
12338     * // => ['0', '1', '2']
12339     *
12340     *  _.times(4, _.constant(0));
12341     * // => [0, 0, 0, 0]
12342     */function times(n,iteratee){n=toInteger(n);if(n<1||n>MAX_SAFE_INTEGER){return[];}var index=MAX_ARRAY_LENGTH,length=nativeMin(n,MAX_ARRAY_LENGTH);iteratee=getIteratee(iteratee);n-=MAX_ARRAY_LENGTH;var result=baseTimes(length,iteratee);while(++index<n){iteratee(index);}return result;}/**
12343     * Converts `value` to a property path array.
12344     *
12345     * @static
12346     * @memberOf _
12347     * @since 4.0.0
12348     * @category Util
12349     * @param {*} value The value to convert.
12350     * @returns {Array} Returns the new property path array.
12351     * @example
12352     *
12353     * _.toPath('a.b.c');
12354     * // => ['a', 'b', 'c']
12355     *
12356     * _.toPath('a[0].b.c');
12357     * // => ['a', '0', 'b', 'c']
12358     */function toPath(value){if(isArray(value)){return arrayMap(value,toKey);}return isSymbol(value)?[value]:copyArray(stringToPath(toString(value)));}/**
12359     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
12360     *
12361     * @static
12362     * @since 0.1.0
12363     * @memberOf _
12364     * @category Util
12365     * @param {string} [prefix=''] The value to prefix the ID with.
12366     * @returns {string} Returns the unique ID.
12367     * @example
12368     *
12369     * _.uniqueId('contact_');
12370     * // => 'contact_104'
12371     *
12372     * _.uniqueId();
12373     * // => '105'
12374     */function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id;}/*------------------------------------------------------------------------*/ /**
12375     * Adds two numbers.
12376     *
12377     * @static
12378     * @memberOf _
12379     * @since 3.4.0
12380     * @category Math
12381     * @param {number} augend The first number in an addition.
12382     * @param {number} addend The second number in an addition.
12383     * @returns {number} Returns the total.
12384     * @example
12385     *
12386     * _.add(6, 4);
12387     * // => 10
12388     */var add=createMathOperation(function(augend,addend){return augend+addend;},0);/**
12389     * Computes `number` rounded up to `precision`.
12390     *
12391     * @static
12392     * @memberOf _
12393     * @since 3.10.0
12394     * @category Math
12395     * @param {number} number The number to round up.
12396     * @param {number} [precision=0] The precision to round up to.
12397     * @returns {number} Returns the rounded up number.
12398     * @example
12399     *
12400     * _.ceil(4.006);
12401     * // => 5
12402     *
12403     * _.ceil(6.004, 2);
12404     * // => 6.01
12405     *
12406     * _.ceil(6040, -2);
12407     * // => 6100
12408     */var ceil=createRound('ceil');/**
12409     * Divide two numbers.
12410     *
12411     * @static
12412     * @memberOf _
12413     * @since 4.7.0
12414     * @category Math
12415     * @param {number} dividend The first number in a division.
12416     * @param {number} divisor The second number in a division.
12417     * @returns {number} Returns the quotient.
12418     * @example
12419     *
12420     * _.divide(6, 4);
12421     * // => 1.5
12422     */var divide=createMathOperation(function(dividend,divisor){return dividend/divisor;},1);/**
12423     * Computes `number` rounded down to `precision`.
12424     *
12425     * @static
12426     * @memberOf _
12427     * @since 3.10.0
12428     * @category Math
12429     * @param {number} number The number to round down.
12430     * @param {number} [precision=0] The precision to round down to.
12431     * @returns {number} Returns the rounded down number.
12432     * @example
12433     *
12434     * _.floor(4.006);
12435     * // => 4
12436     *
12437     * _.floor(0.046, 2);
12438     * // => 0.04
12439     *
12440     * _.floor(4060, -2);
12441     * // => 4000
12442     */var floor=createRound('floor');/**
12443     * Computes the maximum value of `array`. If `array` is empty or falsey,
12444     * `undefined` is returned.
12445     *
12446     * @static
12447     * @since 0.1.0
12448     * @memberOf _
12449     * @category Math
12450     * @param {Array} array The array to iterate over.
12451     * @returns {*} Returns the maximum value.
12452     * @example
12453     *
12454     * _.max([4, 2, 8, 6]);
12455     * // => 8
12456     *
12457     * _.max([]);
12458     * // => undefined
12459     */function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined;}/**
12460     * This method is like `_.max` except that it accepts `iteratee` which is
12461     * invoked for each element in `array` to generate the criterion by which
12462     * the value is ranked. The iteratee is invoked with one argument: (value).
12463     *
12464     * @static
12465     * @memberOf _
12466     * @since 4.0.0
12467     * @category Math
12468     * @param {Array} array The array to iterate over.
12469     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12470     * @returns {*} Returns the maximum value.
12471     * @example
12472     *
12473     * var objects = [{ 'n': 1 }, { 'n': 2 }];
12474     *
12475     * _.maxBy(objects, function(o) { return o.n; });
12476     * // => { 'n': 2 }
12477     *
12478     * // The `_.property` iteratee shorthand.
12479     * _.maxBy(objects, 'n');
12480     * // => { 'n': 2 }
12481     */function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined;}/**
12482     * Computes the mean of the values in `array`.
12483     *
12484     * @static
12485     * @memberOf _
12486     * @since 4.0.0
12487     * @category Math
12488     * @param {Array} array The array to iterate over.
12489     * @returns {number} Returns the mean.
12490     * @example
12491     *
12492     * _.mean([4, 2, 8, 6]);
12493     * // => 5
12494     */function mean(array){return baseMean(array,identity);}/**
12495     * This method is like `_.mean` except that it accepts `iteratee` which is
12496     * invoked for each element in `array` to generate the value to be averaged.
12497     * The iteratee is invoked with one argument: (value).
12498     *
12499     * @static
12500     * @memberOf _
12501     * @since 4.7.0
12502     * @category Math
12503     * @param {Array} array The array to iterate over.
12504     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12505     * @returns {number} Returns the mean.
12506     * @example
12507     *
12508     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
12509     *
12510     * _.meanBy(objects, function(o) { return o.n; });
12511     * // => 5
12512     *
12513     * // The `_.property` iteratee shorthand.
12514     * _.meanBy(objects, 'n');
12515     * // => 5
12516     */function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2));}/**
12517     * Computes the minimum value of `array`. If `array` is empty or falsey,
12518     * `undefined` is returned.
12519     *
12520     * @static
12521     * @since 0.1.0
12522     * @memberOf _
12523     * @category Math
12524     * @param {Array} array The array to iterate over.
12525     * @returns {*} Returns the minimum value.
12526     * @example
12527     *
12528     * _.min([4, 2, 8, 6]);
12529     * // => 2
12530     *
12531     * _.min([]);
12532     * // => undefined
12533     */function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined;}/**
12534     * This method is like `_.min` except that it accepts `iteratee` which is
12535     * invoked for each element in `array` to generate the criterion by which
12536     * the value is ranked. The iteratee is invoked with one argument: (value).
12537     *
12538     * @static
12539     * @memberOf _
12540     * @since 4.0.0
12541     * @category Math
12542     * @param {Array} array The array to iterate over.
12543     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12544     * @returns {*} Returns the minimum value.
12545     * @example
12546     *
12547     * var objects = [{ 'n': 1 }, { 'n': 2 }];
12548     *
12549     * _.minBy(objects, function(o) { return o.n; });
12550     * // => { 'n': 1 }
12551     *
12552     * // The `_.property` iteratee shorthand.
12553     * _.minBy(objects, 'n');
12554     * // => { 'n': 1 }
12555     */function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined;}/**
12556     * Multiply two numbers.
12557     *
12558     * @static
12559     * @memberOf _
12560     * @since 4.7.0
12561     * @category Math
12562     * @param {number} multiplier The first number in a multiplication.
12563     * @param {number} multiplicand The second number in a multiplication.
12564     * @returns {number} Returns the product.
12565     * @example
12566     *
12567     * _.multiply(6, 4);
12568     * // => 24
12569     */var multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand;},1);/**
12570     * Computes `number` rounded to `precision`.
12571     *
12572     * @static
12573     * @memberOf _
12574     * @since 3.10.0
12575     * @category Math
12576     * @param {number} number The number to round.
12577     * @param {number} [precision=0] The precision to round to.
12578     * @returns {number} Returns the rounded number.
12579     * @example
12580     *
12581     * _.round(4.006);
12582     * // => 4
12583     *
12584     * _.round(4.006, 2);
12585     * // => 4.01
12586     *
12587     * _.round(4060, -2);
12588     * // => 4100
12589     */var round=createRound('round');/**
12590     * Subtract two numbers.
12591     *
12592     * @static
12593     * @memberOf _
12594     * @since 4.0.0
12595     * @category Math
12596     * @param {number} minuend The first number in a subtraction.
12597     * @param {number} subtrahend The second number in a subtraction.
12598     * @returns {number} Returns the difference.
12599     * @example
12600     *
12601     * _.subtract(6, 4);
12602     * // => 2
12603     */var subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend;},0);/**
12604     * Computes the sum of the values in `array`.
12605     *
12606     * @static
12607     * @memberOf _
12608     * @since 3.4.0
12609     * @category Math
12610     * @param {Array} array The array to iterate over.
12611     * @returns {number} Returns the sum.
12612     * @example
12613     *
12614     * _.sum([4, 2, 8, 6]);
12615     * // => 20
12616     */function sum(array){return array&&array.length?baseSum(array,identity):0;}/**
12617     * This method is like `_.sum` except that it accepts `iteratee` which is
12618     * invoked for each element in `array` to generate the value to be summed.
12619     * The iteratee is invoked with one argument: (value).
12620     *
12621     * @static
12622     * @memberOf _
12623     * @since 4.0.0
12624     * @category Math
12625     * @param {Array} array The array to iterate over.
12626     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12627     * @returns {number} Returns the sum.
12628     * @example
12629     *
12630     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
12631     *
12632     * _.sumBy(objects, function(o) { return o.n; });
12633     * // => 20
12634     *
12635     * // The `_.property` iteratee shorthand.
12636     * _.sumBy(objects, 'n');
12637     * // => 20
12638     */function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0;}/*------------------------------------------------------------------------*/ // Add methods that return wrapped values in chain sequences.
12639lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.assignIn=assignIn;lodash.assignInWith=assignInWith;lodash.assignWith=assignWith;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.castArray=castArray;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.concat=concat;lodash.cond=cond;lodash.conforms=conforms;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defaultsDeep=defaultsDeep;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.differenceBy=differenceBy;lodash.differenceWith=differenceWith;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatMap=flatMap;lodash.flatMapDeep=flatMapDeep;lodash.flatMapDepth=flatMapDepth;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flattenDepth=flattenDepth;lodash.flip=flip;lodash.flow=flow;lodash.flowRight=flowRight;lodash.fromPairs=fromPairs;lodash.functions=functions;lodash.functionsIn=functionsIn;lodash.groupBy=groupBy;lodash.initial=initial;lodash.intersection=intersection;lodash.intersectionBy=intersectionBy;lodash.intersectionWith=intersectionWith;lodash.invert=invert;lodash.invertBy=invertBy;lodash.invokeMap=invokeMap;lodash.iteratee=iteratee;lodash.keyBy=keyBy;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.mergeWith=mergeWith;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.negate=negate;lodash.nthArg=nthArg;lodash.omit=omit;lodash.omitBy=omitBy;lodash.once=once;lodash.orderBy=orderBy;lodash.over=over;lodash.overArgs=overArgs;lodash.overEvery=overEvery;lodash.overSome=overSome;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pickBy=pickBy;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAll=pullAll;lodash.pullAllBy=pullAllBy;lodash.pullAllWith=pullAllWith;lodash.pullAt=pullAt;lodash.range=range;lodash.rangeRight=rangeRight;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.reverse=reverse;lodash.sampleSize=sampleSize;lodash.set=set;lodash.setWith=setWith;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortedUniq=sortedUniq;lodash.sortedUniqBy=sortedUniqBy;lodash.split=split;lodash.spread=spread;lodash.tail=tail;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.toArray=toArray;lodash.toPairs=toPairs;lodash.toPairsIn=toPairsIn;lodash.toPath=toPath;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.unary=unary;lodash.union=union;lodash.unionBy=unionBy;lodash.unionWith=unionWith;lodash.uniq=uniq;lodash.uniqBy=uniqBy;lodash.uniqWith=uniqWith;lodash.unset=unset;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.update=update;lodash.updateWith=updateWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.without=without;lodash.words=words;lodash.wrap=wrap;lodash.xor=xor;lodash.xorBy=xorBy;lodash.xorWith=xorWith;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipObjectDeep=zipObjectDeep;lodash.zipWith=zipWith;// Add aliases.
12640lodash.entries=toPairs;lodash.entriesIn=toPairsIn;lodash.extend=assignIn;lodash.extendWith=assignInWith;// Add methods to `lodash.prototype`.
12641mixin(lodash,lodash);/*------------------------------------------------------------------------*/ // Add methods that return unwrapped values in chain sequences.
12642lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clamp=clamp;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.cloneDeepWith=cloneDeepWith;lodash.cloneWith=cloneWith;lodash.conformsTo=conformsTo;lodash.deburr=deburr;lodash.defaultTo=defaultTo;lodash.divide=divide;lodash.endsWith=endsWith;lodash.eq=eq;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.floor=floor;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.hasIn=hasIn;lodash.head=head;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.invoke=invoke;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isArrayBuffer=isArrayBuffer;lodash.isArrayLike=isArrayLike;lodash.isArrayLikeObject=isArrayLikeObject;lodash.isBoolean=isBoolean;lodash.isBuffer=isBuffer;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isEqualWith=isEqualWith;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isInteger=isInteger;lodash.isLength=isLength;lodash.isMap=isMap;lodash.isMatch=isMatch;lodash.isMatchWith=isMatchWith;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNil=isNil;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isObjectLike=isObjectLike;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isSafeInteger=isSafeInteger;lodash.isSet=isSet;lodash.isString=isString;lodash.isSymbol=isSymbol;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.isWeakMap=isWeakMap;lodash.isWeakSet=isWeakSet;lodash.join=join;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lowerCase=lowerCase;lodash.lowerFirst=lowerFirst;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.maxBy=maxBy;lodash.mean=mean;lodash.meanBy=meanBy;lodash.min=min;lodash.minBy=minBy;lodash.stubArray=stubArray;lodash.stubFalse=stubFalse;lodash.stubObject=stubObject;lodash.stubString=stubString;lodash.stubTrue=stubTrue;lodash.multiply=multiply;lodash.nth=nth;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padEnd=padEnd;lodash.padStart=padStart;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.replace=replace;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.sample=sample;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedIndexBy=sortedIndexBy;lodash.sortedIndexOf=sortedIndexOf;lodash.sortedLastIndex=sortedLastIndex;lodash.sortedLastIndexBy=sortedLastIndexBy;lodash.sortedLastIndexOf=sortedLastIndexOf;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.subtract=subtract;lodash.sum=sum;lodash.sumBy=sumBy;lodash.template=template;lodash.times=times;lodash.toFinite=toFinite;lodash.toInteger=toInteger;lodash.toLength=toLength;lodash.toLower=toLower;lodash.toNumber=toNumber;lodash.toSafeInteger=toSafeInteger;lodash.toString=toString;lodash.toUpper=toUpper;lodash.trim=trim;lodash.trimEnd=trimEnd;lodash.trimStart=trimStart;lodash.truncate=truncate;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.upperCase=upperCase;lodash.upperFirst=upperFirst;// Add aliases.
12643lodash.each=forEach;lodash.eachRight=forEachRight;lodash.first=head;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!hasOwnProperty.call(lodash.prototype,methodName)){source[methodName]=func;}});return source;}(),{'chain':false});/*------------------------------------------------------------------------*/ /**
12644     * The semantic version number.
12645     *
12646     * @static
12647     * @memberOf _
12648     * @type {string}
12649     */lodash.VERSION=VERSION;// Assign default placeholders.
12650arrayEach(['bind','bindKey','curry','curryRight','partial','partialRight'],function(methodName){lodash[methodName].placeholder=lodash;});// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
12651arrayEach(['drop','take'],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();if(result.__filtered__){result.__takeCount__=nativeMin(n,result.__takeCount__);}else{result.__views__.push({'size':nativeMin(n,MAX_ARRAY_LENGTH),'type':methodName+(result.__dir__<0?'Right':'')});}return result;};LazyWrapper.prototype[methodName+'Right']=function(n){return this.reverse()[methodName](n).reverse();};});// Add `LazyWrapper` methods that accept an `iteratee` value.
12652arrayEach(['filter','map','takeWhile'],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||type==LAZY_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();result.__iteratees__.push({'iteratee':getIteratee(iteratee,3),'type':type});result.__filtered__=result.__filtered__||isFilter;return result;};});// Add `LazyWrapper` methods for `_.head` and `_.last`.
12653arrayEach(['head','last'],function(methodName,index){var takeName='take'+(index?'Right':'');LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0];};});// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
12654arrayEach(['initial','tail'],function(methodName,index){var dropName='drop'+(index?'':'Right');LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1);};});LazyWrapper.prototype.compact=function(){return this.filter(identity);};LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head();};LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate);};LazyWrapper.prototype.invokeMap=baseRest(function(path,args){if(typeof path=='function'){return new LazyWrapper(this);}return this.map(function(value){return baseInvoke(value,path,args);});});LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)));};LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;if(result.__filtered__&&(start>0||end<0)){return new LazyWrapper(result);}if(start<0){result=result.takeRight(-start);}else if(start){result=result.drop(start);}if(end!==undefined){end=toInteger(end);result=end<0?result.dropRight(-end):result.take(end-start);}return result;};LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse();};LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH);};// Add `LazyWrapper` methods to `lodash.prototype`.
12655baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?'take'+(methodName=='last'?'Right':''):methodName],retUnwrapped=isTaker||/^find/.test(methodName);if(!lodashFunc){return;}lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);var interceptor=function interceptor(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result;};if(useLazy&&checkIteratee&&typeof iteratee=='function'&&iteratee.length!=1){// Avoid lazy use if the iteratee has a "length" value other than `1`.
12656isLazy=useLazy=false;}var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);result.__actions__.push({'func':thru,'args':[interceptor],'thisArg':undefined});return new LodashWrapper(result,chainAll);}if(isUnwrapped&&onlyLazy){return func.apply(this,args);}result=this.thru(interceptor);return isUnwrapped?isTaker?result.value()[0]:result.value():result;};});// Add `Array` methods to `lodash.prototype`.
12657arrayEach(['pop','push','shift','sort','splice','unshift'],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?'tap':'thru',retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args);}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args);});};});// Map minified method names to their real names.
12658baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+'';if(!hasOwnProperty.call(realNames,key)){realNames[key]=[];}realNames[key].push({'name':methodName,'func':lodashFunc});}});realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{'name':'wrapper','func':undefined}];// Add methods to `LazyWrapper`.
12659LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;// Add chain sequence methods to the `lodash` wrapper.
12660lodash.prototype.at=wrapperAt;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;// Add lazy aliases.
12661lodash.prototype.first=lodash.prototype.head;if(symIterator){lodash.prototype[symIterator]=wrapperToIterator;}return lodash;};/*--------------------------------------------------------------------------*/ // Export lodash.
12662var _=runInContext();// Some AMD build optimizers, like r.js, check for condition patterns like:
12663if( true&&_typeof(__webpack_require__.amdO)=='object'&&__webpack_require__.amdO){// Expose Lodash on the global object to prevent errors when Lodash is
12664// loaded by a script tag in the presence of an AMD loader.
12665// See http://requirejs.org/docs/errors.html#mismatch for more details.
12666// Use `_.noConflict` to remove Lodash from the global object.
12667root._=_;// Define as an anonymous module so, through path mapping, it can be
12668// referenced as the "underscore" module.
12669!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return _;}).call(exports, __webpack_require__, exports, module),
12670		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}// Check for `exports` after `define` in case a build optimizer adds it.
12671else if(freeModule){// Export for Node.js.
12672(freeModule.exports=_)._=_;// Export for CommonJS support.
12673freeExports._=_;}else{// Export to the global object.
12674root._=_;}}).call(this);
12675
12676/***/ }),
12677
vendor: 116,622 bytes, lines 12678-15481
12678/***/ "./node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js":
12679/*!**************************************************************************!*\
12680  !*** ./node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js ***!
12681  \**************************************************************************/
12682/***/ (function(module, exports, __webpack_require__) {
12683
12684var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12685/*!
12686 * ScrollMagic v2.0.8 (2020-08-14)
12687 * The javascript library for magical scroll interactions.
12688 * (c) 2020 Jan Paepke (@janpaepke)
12689 * Project Website: http://scrollmagic.io
12690 * 
12691 * @version 2.0.8
12692 * @license Dual licensed under MIT license and GPL.
12693 * @author Jan Paepke - [email protected]
12694 *
12695 * @file ScrollMagic main library.
12696 */
12697/**
12698 * @namespace ScrollMagic
12699 */
12700(function (root, factory) {
12701  if (true) {
12702    // AMD. Register as an anonymous module.
12703    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
12704		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
12705		(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
12706		__WEBPACK_AMD_DEFINE_FACTORY__),
12707		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
12708  } else {}
12709})(this, function () {
12710  "use strict";
12711
12712  var ScrollMagic = function ScrollMagic() {
12713    _util.log(2, '(COMPATIBILITY NOTICE) -> As of ScrollMagic 2.0.0 you need to use \'new ScrollMagic.Controller()\' to create a new controller instance. Use \'new ScrollMagic.Scene()\' to instance a scene.');
12714  };
12715  ScrollMagic.version = "2.0.8";
12716
12717  // TODO: temporary workaround for chrome's scroll jitter bug
12718  if (typeof window !== 'undefined') {
12719    window.addEventListener("mousewheel", void 0);
12720  }
12721
12722  // global const
12723  var PIN_SPACER_ATTRIBUTE = "data-scrollmagic-pin-spacer";
12724
12725  /**
12726   * The main class that is needed once per scroll container.
12727   *
12728   * @class
12729   *
12730   * @example
12731   * // basic initialization
12732   * var controller = new ScrollMagic.Controller();
12733   *
12734   * // passing options
12735   * var controller = new ScrollMagic.Controller({container: "#myContainer", loglevel: 3});
12736   *
12737   * @param {object} [options] - An object containing one or more options for the controller.
12738   * @param {(string|object)} [options.container=window] - A selector, DOM object that references the main container for scrolling.
12739   * @param {boolean} [options.vertical=true] - Sets the scroll mode to vertical (`true`) or horizontal (`false`) scrolling.
12740   * @param {object} [options.globalSceneOptions={}] - These options will be passed to every Scene that is added to the controller using the addScene method. For more information on Scene options see {@link ScrollMagic.Scene}.
12741   * @param {number} [options.loglevel=2] Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic.
12742  										 ** `0` => silent
12743  										 ** `1` => errors
12744  										 ** `2` => errors, warnings
12745  										 ** `3` => errors, warnings, debuginfo
12746   * @param {boolean} [options.refreshInterval=100] - Some changes don't call events by default, like changing the container size or moving a scene trigger element.  
12747   																										 This interval polls these parameters to fire the necessary events.  
12748   																										 If you don't use custom containers, trigger elements or have static layouts, where the positions of the trigger elements don't change, you can set this to 0 disable interval checking and improve performance.
12749   *
12750   */
12751  ScrollMagic.Controller = function (options) {
12752    /*
12753     * ----------------------------------------------------------------
12754     * settings
12755     * ----------------------------------------------------------------
12756     */
12757    var NAMESPACE = 'ScrollMagic.Controller',
12758      SCROLL_DIRECTION_FORWARD = 'FORWARD',
12759      SCROLL_DIRECTION_REVERSE = 'REVERSE',
12760      SCROLL_DIRECTION_PAUSED = 'PAUSED',
12761      DEFAULT_OPTIONS = CONTROLLER_OPTIONS.defaults;
12762
12763    /*
12764     * ----------------------------------------------------------------
12765     * private vars
12766     * ----------------------------------------------------------------
12767     */
12768    var Controller = this,
12769      _options = _util.extend({}, DEFAULT_OPTIONS, options),
12770      _sceneObjects = [],
12771      _updateScenesOnNextCycle = false,
12772      // can be boolean (true => all scenes) or an array of scenes to be updated
12773      _scrollPos = 0,
12774      _scrollDirection = SCROLL_DIRECTION_PAUSED,
12775      _isDocument = true,
12776      _viewPortSize = 0,
12777      _enabled = true,
12778      _updateTimeout,
12779      _refreshTimeout;
12780
12781    /*
12782     * ----------------------------------------------------------------
12783     * private functions
12784     * ----------------------------------------------------------------
12785     */
12786
12787    /**
12788     * Internal constructor function of the ScrollMagic Controller
12789     * @private
12790     */
12791    var construct = function construct() {
12792      for (var key in _options) {
12793        if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {
12794          log(2, "WARNING: Unknown option \"" + key + "\"");
12795          delete _options[key];
12796        }
12797      }
12798      _options.container = _util.get.elements(_options.container)[0];
12799      // check ScrollContainer
12800      if (!_options.container) {
12801        log(1, "ERROR creating object " + NAMESPACE + ": No valid scroll container supplied");
12802        throw NAMESPACE + " init failed."; // cancel
12803      }
12804
12805      _isDocument = _options.container === window || _options.container === document.body || !document.body.contains(_options.container);
12806      // normalize to window
12807      if (_isDocument) {
12808        _options.container = window;
12809      }
12810      // update container size immediately
12811      _viewPortSize = getViewportSize();
12812      // set event handlers
12813      _options.container.addEventListener("resize", onChange);
12814      _options.container.addEventListener("scroll", onChange);
12815      var ri = parseInt(_options.refreshInterval, 10);
12816      _options.refreshInterval = _util.type.Number(ri) ? ri : DEFAULT_OPTIONS.refreshInterval;
12817      scheduleRefresh();
12818      log(3, "added new " + NAMESPACE + " controller (v" + ScrollMagic.version + ")");
12819    };
12820
12821    /**
12822     * Schedule the next execution of the refresh function
12823     * @private
12824     */
12825    var scheduleRefresh = function scheduleRefresh() {
12826      if (_options.refreshInterval > 0) {
12827        _refreshTimeout = window.setTimeout(refresh, _options.refreshInterval);
12828      }
12829    };
12830
12831    /**
12832     * Default function to get scroll pos - overwriteable using `Controller.scrollPos(newFunction)`
12833     * @private
12834     */
12835    var getScrollPos = function getScrollPos() {
12836      return _options.vertical ? _util.get.scrollTop(_options.container) : _util.get.scrollLeft(_options.container);
12837    };
12838
12839    /**
12840     * Returns the current viewport Size (width vor horizontal, height for vertical)
12841     * @private
12842     */
12843    var getViewportSize = function getViewportSize() {
12844      return _options.vertical ? _util.get.height(_options.container) : _util.get.width(_options.container);
12845    };
12846
12847    /**
12848     * Default function to set scroll pos - overwriteable using `Controller.scrollTo(newFunction)`
12849     * Make available publicly for pinned mousewheel workaround.
12850     * @private
12851     */
12852    var setScrollPos = this._setScrollPos = function (pos) {
12853      if (_options.vertical) {
12854        if (_isDocument) {
12855          window.scrollTo(_util.get.scrollLeft(), pos);
12856        } else {
12857          _options.container.scrollTop = pos;
12858        }
12859      } else {
12860        if (_isDocument) {
12861          window.scrollTo(pos, _util.get.scrollTop());
12862        } else {
12863          _options.container.scrollLeft = pos;
12864        }
12865      }
12866    };
12867
12868    /**
12869     * Handle updates in cycles instead of on scroll (performance)
12870     * @private
12871     */
12872    var updateScenes = function updateScenes() {
12873      if (_enabled && _updateScenesOnNextCycle) {
12874        // determine scenes to update
12875        var scenesToUpdate = _util.type.Array(_updateScenesOnNextCycle) ? _updateScenesOnNextCycle : _sceneObjects.slice(0);
12876        // reset scenes
12877        _updateScenesOnNextCycle = false;
12878        var oldScrollPos = _scrollPos;
12879        // update scroll pos now instead of onChange, as it might have changed since scheduling (i.e. in-browser smooth scroll)
12880        _scrollPos = Controller.scrollPos();
12881        var deltaScroll = _scrollPos - oldScrollPos;
12882        if (deltaScroll !== 0) {
12883          // scroll position changed?
12884          _scrollDirection = deltaScroll > 0 ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_REVERSE;
12885        }
12886        // reverse order of scenes if scrolling reverse
12887        if (_scrollDirection === SCROLL_DIRECTION_REVERSE) {
12888          scenesToUpdate.reverse();
12889        }
12890        // update scenes
12891        scenesToUpdate.forEach(function (scene, index) {
12892          log(3, "updating Scene " + (index + 1) + "/" + scenesToUpdate.length + " (" + _sceneObjects.length + " total)");
12893          scene.update(true);
12894        });
12895        if (scenesToUpdate.length === 0 && _options.loglevel >= 3) {
12896          log(3, "updating 0 Scenes (nothing added to controller)");
12897        }
12898      }
12899    };
12900
12901    /**
12902     * Initializes rAF callback
12903     * @private
12904     */
12905    var debounceUpdate = function debounceUpdate() {
12906      _updateTimeout = _util.rAF(updateScenes);
12907    };
12908
12909    /**
12910     * Handles Container changes
12911     * @private
12912     */
12913    var onChange = function onChange(e) {
12914      log(3, "event fired causing an update:", e.type);
12915      if (e.type == "resize") {
12916        // resize
12917        _viewPortSize = getViewportSize();
12918        _scrollDirection = SCROLL_DIRECTION_PAUSED;
12919      }
12920      // schedule update
12921      if (_updateScenesOnNextCycle !== true) {
12922        _updateScenesOnNextCycle = true;
12923        debounceUpdate();
12924      }
12925    };
12926    var refresh = function refresh() {
12927      if (!_isDocument) {
12928        // simulate resize event. Only works for viewport relevant param (performance)
12929        if (_viewPortSize != getViewportSize()) {
12930          var resizeEvent;
12931          try {
12932            resizeEvent = new Event('resize', {
12933              bubbles: false,
12934              cancelable: false
12935            });
12936          } catch (e) {
12937            // stupid IE
12938            resizeEvent = document.createEvent("Event");
12939            resizeEvent.initEvent("resize", false, false);
12940          }
12941          _options.container.dispatchEvent(resizeEvent);
12942        }
12943      }
12944      _sceneObjects.forEach(function (scene, index) {
12945        // refresh all scenes
12946        scene.refresh();
12947      });
12948      scheduleRefresh();
12949    };
12950
12951    /**
12952     * Send a debug message to the console.
12953     * provided publicly with _log for plugins
12954     * @private
12955     *
12956     * @param {number} loglevel - The loglevel required to initiate output for the message.
12957     * @param {...mixed} output - One or more variables that should be passed to the console.
12958     */
12959    var log = this._log = function (loglevel, output) {
12960      if (_options.loglevel >= loglevel) {
12961        Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->");
12962        _util.log.apply(window, arguments);
12963      }
12964    };
12965    // for scenes we have getters for each option, but for the controller we don't, so we need to make it available externally for plugins
12966    this._options = _options;
12967
12968    /**
12969     * Sort scenes in ascending order of their start offset.
12970     * @private
12971     *
12972     * @param {array} ScenesArray - an array of ScrollMagic Scenes that should be sorted
12973     * @return {array} The sorted array of Scenes.
12974     */
12975    var sortScenes = function sortScenes(ScenesArray) {
12976      if (ScenesArray.length <= 1) {
12977        return ScenesArray;
12978      } else {
12979        var scenes = ScenesArray.slice(0);
12980        scenes.sort(function (a, b) {
12981          return a.scrollOffset() > b.scrollOffset() ? 1 : -1;
12982        });
12983        return scenes;
12984      }
12985    };
12986
12987    /**
12988     * ----------------------------------------------------------------
12989     * public functions
12990     * ----------------------------------------------------------------
12991     */
12992
12993    /**
12994     * Add one ore more scene(s) to the controller.  
12995     * This is the equivalent to `Scene.addTo(controller)`.
12996     * @public
12997     * @example
12998     * // with a previously defined scene
12999     * controller.addScene(scene);
13000     *
13001     * // with a newly created scene.
13002     * controller.addScene(new ScrollMagic.Scene({duration : 0}));
13003     *
13004     * // adding multiple scenes
13005     * controller.addScene([scene, scene2, new ScrollMagic.Scene({duration : 0})]);
13006     *
13007     * @param {(ScrollMagic.Scene|array)} newScene - ScrollMagic Scene or Array of Scenes to be added to the controller.
13008     * @return {Controller} Parent object for chaining.
13009     */
13010    this.addScene = function (newScene) {
13011      if (_util.type.Array(newScene)) {
13012        newScene.forEach(function (scene, index) {
13013          Controller.addScene(scene);
13014        });
13015      } else if (newScene instanceof ScrollMagic.Scene) {
13016        if (newScene.controller() !== Controller) {
13017          newScene.addTo(Controller);
13018        } else if (_sceneObjects.indexOf(newScene) < 0) {
13019          // new scene
13020          _sceneObjects.push(newScene); // add to array
13021          _sceneObjects = sortScenes(_sceneObjects); // sort
13022          newScene.on("shift.controller_sort", function () {
13023            // resort whenever scene moves
13024            _sceneObjects = sortScenes(_sceneObjects);
13025          });
13026          // insert Global defaults.
13027          for (var key in _options.globalSceneOptions) {
13028            if (newScene[key]) {
13029              newScene[key].call(newScene, _options.globalSceneOptions[key]);
13030            }
13031          }
13032          log(3, "adding Scene (now " + _sceneObjects.length + " total)");
13033        }
13034      } else {
13035        log(1, "ERROR: invalid argument supplied for '.addScene()'");
13036      }
13037      return Controller;
13038    };
13039
13040    /**
13041     * Remove one ore more scene(s) from the controller.  
13042     * This is the equivalent to `Scene.remove()`.
13043     * @public
13044     * @example
13045     * // remove a scene from the controller
13046     * controller.removeScene(scene);
13047     *
13048     * // remove multiple scenes from the controller
13049     * controller.removeScene([scene, scene2, scene3]);
13050     *
13051     * @param {(ScrollMagic.Scene|array)} Scene - ScrollMagic Scene or Array of Scenes to be removed from the controller.
13052     * @returns {Controller} Parent object for chaining.
13053     */
13054    this.removeScene = function (Scene) {
13055      if (_util.type.Array(Scene)) {
13056        Scene.forEach(function (scene, index) {
13057          Controller.removeScene(scene);
13058        });
13059      } else {
13060        var index = _sceneObjects.indexOf(Scene);
13061        if (index > -1) {
13062          Scene.off("shift.controller_sort");
13063          _sceneObjects.splice(index, 1);
13064          log(3, "removing Scene (now " + _sceneObjects.length + " left)");
13065          Scene.remove();
13066        }
13067      }
13068      return Controller;
13069    };
13070
13071    /**
13072    * Update one ore more scene(s) according to the scroll position of the container.  
13073    * This is the equivalent to `Scene.update()`.  
13074    * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container.  
13075    * It then updates the current scene state accordingly (or does nothing, if the state is already correct) – Pins will be set to their correct position and tweens will be updated to their correct progress.  
13076    * _**Note:** This method gets called constantly whenever Controller detects a change. The only application for you is if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._
13077    * @public
13078    * @example
13079    * // update a specific scene on next cycle
13080     * controller.updateScene(scene);
13081     *
13082    * // update a specific scene immediately
13083    * controller.updateScene(scene, true);
13084     *
13085    * // update multiple scenes scene on next cycle
13086    * controller.updateScene([scene1, scene2, scene3]);
13087    *
13088    * @param {ScrollMagic.Scene} Scene - ScrollMagic Scene or Array of Scenes that is/are supposed to be updated.
13089    * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle.  
13090    										  This is useful when changing multiple properties of the scene - this way it will only be updated once all new properties are set (updateScenes).
13091    * @return {Controller} Parent object for chaining.
13092    */
13093    this.updateScene = function (Scene, immediately) {
13094      if (_util.type.Array(Scene)) {
13095        Scene.forEach(function (scene, index) {
13096          Controller.updateScene(scene, immediately);
13097        });
13098      } else {
13099        if (immediately) {
13100          Scene.update(true);
13101        } else if (_updateScenesOnNextCycle !== true && Scene instanceof ScrollMagic.Scene) {
13102          // if _updateScenesOnNextCycle is true, all connected scenes are already scheduled for update
13103          // prep array for next update cycle
13104          _updateScenesOnNextCycle = _updateScenesOnNextCycle || [];
13105          if (_updateScenesOnNextCycle.indexOf(Scene) == -1) {
13106            _updateScenesOnNextCycle.push(Scene);
13107          }
13108          _updateScenesOnNextCycle = sortScenes(_updateScenesOnNextCycle); // sort
13109          debounceUpdate();
13110        }
13111      }
13112      return Controller;
13113    };
13114
13115    /**
13116     * Updates the controller params and calls updateScene on every scene, that is attached to the controller.  
13117     * See `Controller.updateScene()` for more information about what this means.  
13118     * In most cases you will not need this function, as it is called constantly, whenever ScrollMagic detects a state change event, like resize or scroll.  
13119     * The only application for this method is when ScrollMagic fails to detect these events.  
13120     * One application is with some external scroll libraries (like iScroll) that move an internal container to a negative offset instead of actually scrolling. In this case the update on the controller needs to be called whenever the child container's position changes.
13121     * For this case there will also be the need to provide a custom function to calculate the correct scroll position. See `Controller.scrollPos()` for details.
13122     * @public
13123     * @example
13124     * // update the controller on next cycle (saves performance due to elimination of redundant updates)
13125     * controller.update();
13126     *
13127     * // update the controller immediately
13128     * controller.update(true);
13129     *
13130     * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance)
13131     * @return {Controller} Parent object for chaining.
13132     */
13133    this.update = function (immediately) {
13134      onChange({
13135        type: "resize"
13136      }); // will update size and set _updateScenesOnNextCycle to true
13137      if (immediately) {
13138        updateScenes();
13139      }
13140      return Controller;
13141    };
13142
13143    /**
13144     * Scroll to a numeric scroll offset, a DOM element, the start of a scene or provide an alternate method for scrolling.  
13145     * For vertical controllers it will change the top scroll offset and for horizontal applications it will change the left offset.
13146     * @public
13147     *
13148     * @since 1.1.0
13149     * @example
13150     * // scroll to an offset of 100
13151     * controller.scrollTo(100);
13152     *
13153     * // scroll to a DOM element
13154     * controller.scrollTo("#anchor");
13155     *
13156     * // scroll to the beginning of a scene
13157     * var scene = new ScrollMagic.Scene({offset: 200});
13158     * controller.scrollTo(scene);
13159     *
13160     * // define a new scroll position modification function (jQuery animate instead of jump)
13161     * controller.scrollTo(function (newScrollPos) {
13162     *	$("html, body").animate({scrollTop: newScrollPos});
13163     * });
13164     * controller.scrollTo(100); // call as usual, but the new function will be used instead
13165     *
13166     * // define a new scroll function with an additional parameter
13167     * controller.scrollTo(function (newScrollPos, message) {
13168     *  console.log(message);
13169     *	$(this).animate({scrollTop: newScrollPos});
13170     * });
13171     * // call as usual, but supply an extra parameter to the defined custom function
13172     * controller.scrollTo(100, "my message");
13173     *
13174     * // define a new scroll function with an additional parameter containing multiple variables
13175     * controller.scrollTo(function (newScrollPos, options) {
13176     *  someGlobalVar = options.a + options.b;
13177     *	$(this).animate({scrollTop: newScrollPos});
13178     * });
13179     * // call as usual, but supply an extra parameter containing multiple options
13180     * controller.scrollTo(100, {a: 1, b: 2});
13181     *
13182     * // define a new scroll function with a callback supplied as an additional parameter
13183     * controller.scrollTo(function (newScrollPos, callback) {
13184     *	$(this).animate({scrollTop: newScrollPos}, 400, "swing", callback);
13185     * });
13186     * // call as usual, but supply an extra parameter, which is used as a callback in the previously defined custom scroll function
13187     * controller.scrollTo(100, function() {
13188     *	console.log("scroll has finished.");
13189     * });
13190     *
13191     * @param {mixed} scrollTarget - The supplied argument can be one of these types:
13192     * 1. `number` -> The container will scroll to this new scroll offset.
13193     * 2. `string` or `object` -> Can be a selector or a DOM object.  
13194     *  The container will scroll to the position of this element.
13195     * 3. `ScrollMagic Scene` -> The container will scroll to the start of this scene.
13196     * 4. `function` -> This function will be used for future scroll position modifications.  
13197     *  This provides a way for you to change the behaviour of scrolling and adding new behaviour like animation. The function receives the new scroll position as a parameter and a reference to the container element using `this`.  
13198     *  It may also optionally receive an optional additional parameter (see below)  
13199     *  _**NOTE:**  
13200     *  All other options will still work as expected, using the new function to scroll._
13201     * @param {mixed} [additionalParameter] - If a custom scroll function was defined (see above 4.), you may want to supply additional parameters to it, when calling it. You can do this using this parameter – see examples for details. Please note, that this parameter will have no effect, if you use the default scrolling function.
13202     * @returns {Controller} Parent object for chaining.
13203     */
13204    this.scrollTo = function (scrollTarget, additionalParameter) {
13205      if (_util.type.Number(scrollTarget)) {
13206        // excecute
13207        setScrollPos.call(_options.container, scrollTarget, additionalParameter);
13208      } else if (scrollTarget instanceof ScrollMagic.Scene) {
13209        // scroll to scene
13210        if (scrollTarget.controller() === Controller) {
13211          // check if the controller is associated with this scene
13212          Controller.scrollTo(scrollTarget.scrollOffset(), additionalParameter);
13213        } else {
13214          log(2, "scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.", scrollTarget);
13215        }
13216      } else if (_util.type.Function(scrollTarget)) {
13217        // assign new scroll function
13218        setScrollPos = scrollTarget;
13219      } else {
13220        // scroll to element
13221        var elem = _util.get.elements(scrollTarget)[0];
13222        if (elem) {
13223          // if parent is pin spacer, use spacer position instead so correct start position is returned for pinned elements.
13224          while (elem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) {
13225            elem = elem.parentNode;
13226          }
13227          var param = _options.vertical ? "top" : "left",
13228            // which param is of interest ?
13229            containerOffset = _util.get.offset(_options.container),
13230            // container position is needed because element offset is returned in relation to document, not in relation to container.
13231            elementOffset = _util.get.offset(elem);
13232          if (!_isDocument) {
13233            // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent
13234            containerOffset[param] -= Controller.scrollPos();
13235          }
13236          Controller.scrollTo(elementOffset[param] - containerOffset[param], additionalParameter);
13237        } else {
13238          log(2, "scrollTo(): The supplied argument is invalid. Scroll cancelled.", scrollTarget);
13239        }
13240      }
13241      return Controller;
13242    };
13243
13244    /**
13245     * **Get** the current scrollPosition or **Set** a new method to calculate it.  
13246     * -> **GET**:
13247     * When used as a getter this function will return the current scroll position.  
13248     * To get a cached value use Controller.info("scrollPos"), which will be updated in the update cycle.  
13249     * For vertical controllers it will return the top scroll offset and for horizontal applications it will return the left offset.
13250     *
13251     * -> **SET**:
13252     * When used as a setter this method prodes a way to permanently overwrite the controller's scroll position calculation.  
13253     * A typical usecase is when the scroll position is not reflected by the containers scrollTop or scrollLeft values, but for example by the inner offset of a child container.  
13254     * Moving a child container inside a parent is a commonly used method for several scrolling frameworks, including iScroll.  
13255     * By providing an alternate calculation function you can make sure ScrollMagic receives the correct scroll position.  
13256     * Please also bear in mind that your function should return y values for vertical scrolls an x for horizontals.
13257     *
13258     * To change the current scroll position please use `Controller.scrollTo()`.
13259     * @public
13260     *
13261     * @example
13262     * // get the current scroll Position
13263     * var scrollPos = controller.scrollPos();
13264     *
13265     * // set a new scroll position calculation method
13266     * controller.scrollPos(function () {
13267     *	return this.info("vertical") ? -mychildcontainer.y : -mychildcontainer.x
13268     * });
13269     *
13270     * @param {function} [scrollPosMethod] - The function to be used for the scroll position calculation of the container.
13271     * @returns {(number|Controller)} Current scroll position or parent object for chaining.
13272     */
13273    this.scrollPos = function (scrollPosMethod) {
13274      if (!arguments.length) {
13275        // get
13276        return getScrollPos.call(Controller);
13277      } else {
13278        // set
13279        if (_util.type.Function(scrollPosMethod)) {
13280          getScrollPos = scrollPosMethod;
13281        } else {
13282          log(2, "Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'.");
13283        }
13284      }
13285      return Controller;
13286    };
13287
13288    /**
13289     * **Get** all infos or one in particular about the controller.
13290     * @public
13291     * @example
13292     * // returns the current scroll position (number)
13293     * var scrollPos = controller.info("scrollPos");
13294     *
13295     * // returns all infos as an object
13296     * var infos = controller.info();
13297     *
13298     * @param {string} [about] - If passed only this info will be returned instead of an object containing all.  
13299     							 Valid options are:
13300     							 ** `"size"` => the current viewport size of the container
13301     							 ** `"vertical"` => true if vertical scrolling, otherwise false
13302     							 ** `"scrollPos"` => the current scroll position
13303     							 ** `"scrollDirection"` => the last known direction of the scroll
13304     							 ** `"container"` => the container element
13305     							 ** `"isDocument"` => true if container element is the document.
13306     * @returns {(mixed|object)} The requested info(s).
13307     */
13308    this.info = function (about) {
13309      var values = {
13310        size: _viewPortSize,
13311        // contains height or width (in regard to orientation);
13312        vertical: _options.vertical,
13313        scrollPos: _scrollPos,
13314        scrollDirection: _scrollDirection,
13315        container: _options.container,
13316        isDocument: _isDocument
13317      };
13318      if (!arguments.length) {
13319        // get all as an object
13320        return values;
13321      } else if (values[about] !== undefined) {
13322        return values[about];
13323      } else {
13324        log(1, "ERROR: option \"" + about + "\" is not available");
13325        return;
13326      }
13327    };
13328
13329    /**
13330     * **Get** or **Set** the current loglevel option value.
13331     * @public
13332     *
13333     * @example
13334     * // get the current value
13335     * var loglevel = controller.loglevel();
13336     *
13337     * // set a new value
13338     * controller.loglevel(3);
13339     *
13340     * @param {number} [newLoglevel] - The new loglevel setting of the Controller. `[0-3]`
13341     * @returns {(number|Controller)} Current loglevel or parent object for chaining.
13342     */
13343    this.loglevel = function (newLoglevel) {
13344      if (!arguments.length) {
13345        // get
13346        return _options.loglevel;
13347      } else if (_options.loglevel != newLoglevel) {
13348        // set
13349        _options.loglevel = newLoglevel;
13350      }
13351      return Controller;
13352    };
13353
13354    /**
13355     * **Get** or **Set** the current enabled state of the controller.  
13356     * This can be used to disable all Scenes connected to the controller without destroying or removing them.
13357     * @public
13358     *
13359     * @example
13360     * // get the current value
13361     * var enabled = controller.enabled();
13362     *
13363     * // disable the controller
13364     * controller.enabled(false);
13365     *
13366     * @param {boolean} [newState] - The new enabled state of the controller `true` or `false`.
13367     * @returns {(boolean|Controller)} Current enabled state or parent object for chaining.
13368     */
13369    this.enabled = function (newState) {
13370      if (!arguments.length) {
13371        // get
13372        return _enabled;
13373      } else if (_enabled != newState) {
13374        // set
13375        _enabled = !!newState;
13376        Controller.updateScene(_sceneObjects, true);
13377      }
13378      return Controller;
13379    };
13380
13381    /**
13382     * Destroy the Controller, all Scenes and everything.
13383     * @public
13384     *
13385     * @example
13386     * // without resetting the scenes
13387     * controller = controller.destroy();
13388     *
13389     * // with scene reset
13390     * controller = controller.destroy(true);
13391     *
13392     * @param {boolean} [resetScenes=false] - If `true` the pins and tweens (if existent) of all scenes will be reset.
13393     * @returns {null} Null to unset handler variables.
13394     */
13395    this.destroy = function (resetScenes) {
13396      window.clearTimeout(_refreshTimeout);
13397      var i = _sceneObjects.length;
13398      while (i--) {
13399        _sceneObjects[i].destroy(resetScenes);
13400      }
13401      _options.container.removeEventListener("resize", onChange);
13402      _options.container.removeEventListener("scroll", onChange);
13403      _util.cAF(_updateTimeout);
13404      log(3, "destroyed " + NAMESPACE + " (reset: " + (resetScenes ? "true" : "false") + ")");
13405      return null;
13406    };
13407
13408    // INIT
13409    construct();
13410    return Controller;
13411  };
13412
13413  // store pagewide controller options
13414  var CONTROLLER_OPTIONS = {
13415    defaults: {
13416      container: window,
13417      vertical: true,
13418      globalSceneOptions: {},
13419      loglevel: 2,
13420      refreshInterval: 100
13421    }
13422  };
13423  /*
13424   * method used to add an option to ScrollMagic Scenes.
13425   */
13426  ScrollMagic.Controller.addOption = function (name, defaultValue) {
13427    CONTROLLER_OPTIONS.defaults[name] = defaultValue;
13428  };
13429  // instance extension function for plugins
13430  ScrollMagic.Controller.extend = function (extension) {
13431    var oldClass = this;
13432    ScrollMagic.Controller = function () {
13433      oldClass.apply(this, arguments);
13434      this.$super = _util.extend({}, this); // copy parent state
13435      return extension.apply(this, arguments) || this;
13436    };
13437    _util.extend(ScrollMagic.Controller, oldClass); // copy properties
13438    ScrollMagic.Controller.prototype = oldClass.prototype; // copy prototype
13439    ScrollMagic.Controller.prototype.constructor = ScrollMagic.Controller; // restore constructor
13440  };
13441
13442  /**
13443   * A Scene defines where the controller should react and how.
13444   *
13445   * @class
13446   *
13447   * @example
13448   * // create a standard scene and add it to a controller
13449   * new ScrollMagic.Scene()
13450   *		.addTo(controller);
13451   *
13452   * // create a scene with custom options and assign a handler to it.
13453   * var scene = new ScrollMagic.Scene({
13454   * 		duration: 100,
13455   *		offset: 200,
13456   *		triggerHook: "onEnter",
13457   *		reverse: false
13458   * });
13459   *
13460   * @param {object} [options] - Options for the Scene. The options can be updated at any time.  
13461   							   Instead of setting the options for each scene individually you can also set them globally in the controller as the controllers `globalSceneOptions` option. The object accepts the same properties as the ones below.  
13462   							   When a scene is added to the controller the options defined using the Scene constructor will be overwritten by those set in `globalSceneOptions`.
13463   * @param {(number|string|function)} [options.duration=0] - The duration of the scene. 
13464   					Please see `Scene.duration()` for details.
13465   * @param {number} [options.offset=0] - Offset Value for the Trigger Position. If no triggerElement is defined this will be the scroll distance from the start of the page, after which the scene will start.
13466   * @param {(string|object)} [options.triggerElement=null] - Selector or DOM object that defines the start of the scene. If undefined the scene will start right at the start of the page (unless an offset is set).
13467   * @param {(number|string)} [options.triggerHook="onCenter"] - Can be a number between 0 and 1 defining the position of the trigger Hook in relation to the viewport.  
13468   															  Can also be defined using a string:
13469   															  ** `"onEnter"` => `1`
13470   															  ** `"onCenter"` => `0.5`
13471   															  ** `"onLeave"` => `0`
13472   * @param {boolean} [options.reverse=true] - Should the scene reverse, when scrolling up?
13473   * @param {number} [options.loglevel=2] - Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic.
13474   										  ** `0` => silent
13475   										  ** `1` => errors
13476   										  ** `2` => errors, warnings
13477   										  ** `3` => errors, warnings, debuginfo
13478   * 
13479   */
13480  ScrollMagic.Scene = function (options) {
13481    /*
13482     * ----------------------------------------------------------------
13483     * settings
13484     * ----------------------------------------------------------------
13485     */
13486
13487    var NAMESPACE = 'ScrollMagic.Scene',
13488      SCENE_STATE_BEFORE = 'BEFORE',
13489      SCENE_STATE_DURING = 'DURING',
13490      SCENE_STATE_AFTER = 'AFTER',
13491      DEFAULT_OPTIONS = SCENE_OPTIONS.defaults;
13492
13493    /*
13494     * ----------------------------------------------------------------
13495     * private vars
13496     * ----------------------------------------------------------------
13497     */
13498
13499    var Scene = this,
13500      _options = _util.extend({}, DEFAULT_OPTIONS, options),
13501      _state = SCENE_STATE_BEFORE,
13502      _progress = 0,
13503      _scrollOffset = {
13504        start: 0,
13505        end: 0
13506      },
13507      // reflects the controllers's scroll position for the start and end of the scene respectively
13508      _triggerPos = 0,
13509      _enabled = true,
13510      _durationUpdateMethod,
13511      _controller;
13512
13513    /**
13514     * Internal constructor function of the ScrollMagic Scene
13515     * @private
13516     */
13517    var construct = function construct() {
13518      for (var key in _options) {
13519        // check supplied options
13520        if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {
13521          log(2, "WARNING: Unknown option \"" + key + "\"");
13522          delete _options[key];
13523        }
13524      }
13525      // add getters/setters for all possible options
13526      for (var optionName in DEFAULT_OPTIONS) {
13527        addSceneOption(optionName);
13528      }
13529      // validate all options
13530      validateOption();
13531    };
13532
13533    /*
13534     * ----------------------------------------------------------------
13535     * Event Management
13536     * ----------------------------------------------------------------
13537     */
13538
13539    var _listeners = {};
13540    /**
13541     * Scene start event.  
13542     * Fires whenever the scroll position its the starting point of the scene.  
13543     * It will also fire when scrolling back up going over the start position of the scene. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback.
13544     *
13545     * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method.
13546     *
13547     * @event ScrollMagic.Scene#start
13548     *
13549     * @example
13550     * scene.on("start", function (event) {
13551     * 	console.log("Hit start point of scene.");
13552     * });
13553     *
13554     * @property {object} event - The event Object passed to each callback
13555     * @property {string} event.type - The name of the event
13556     * @property {Scene} event.target - The Scene object that triggered this event
13557     * @property {number} event.progress - Reflects the current progress of the scene
13558     * @property {string} event.state - The current state of the scene `"BEFORE"` or `"DURING"`
13559     * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"`
13560     */
13561    /**
13562     * Scene end event.  
13563     * Fires whenever the scroll position its the ending point of the scene.  
13564     * It will also fire when scrolling back up from after the scene and going over its end position. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback.
13565     *
13566     * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method.
13567     *
13568     * @event ScrollMagic.Scene#end
13569     *
13570     * @example
13571     * scene.on("end", function (event) {
13572     * 	console.log("Hit end point of scene.");
13573     * });
13574     *
13575     * @property {object} event - The event Object passed to each callback
13576     * @property {string} event.type - The name of the event
13577     * @property {Scene} event.target - The Scene object that triggered this event
13578     * @property {number} event.progress - Reflects the current progress of the scene
13579     * @property {string} event.state - The current state of the scene `"DURING"` or `"AFTER"`
13580     * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"`
13581     */
13582    /**
13583     * Scene enter event.  
13584     * Fires whenever the scene enters the "DURING" state.  
13585     * Keep in mind that it doesn't matter if the scene plays forward or backward: This event always fires when the scene enters its active scroll timeframe, regardless of the scroll-direction.
13586     *
13587     * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method.
13588     *
13589     * @event ScrollMagic.Scene#enter
13590     *
13591     * @example
13592     * scene.on("enter", function (event) {
13593     * 	console.log("Scene entered.");
13594     * });
13595     *
13596     * @property {object} event - The event Object passed to each callback
13597     * @property {string} event.type - The name of the event
13598     * @property {Scene} event.target - The Scene object that triggered this event
13599     * @property {number} event.progress - Reflects the current progress of the scene
13600     * @property {string} event.state - The current state of the scene - always `"DURING"`
13601     * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"`
13602     */
13603    /**
13604     * Scene leave event.  
13605     * Fires whenever the scene's state goes from "DURING" to either "BEFORE" or "AFTER".  
13606     * Keep in mind that it doesn't matter if the scene plays forward or backward: This event always fires when the scene leaves its active scroll timeframe, regardless of the scroll-direction.
13607     *
13608     * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method.
13609     *
13610     * @event ScrollMagic.Scene#leave
13611     *
13612     * @example
13613     * scene.on("leave", function (event) {
13614     * 	console.log("Scene left.");
13615     * });
13616     *
13617     * @property {object} event - The event Object passed to each callback
13618     * @property {string} event.type - The name of the event
13619     * @property {Scene} event.target - The Scene object that triggered this event
13620     * @property {number} event.progress - Reflects the current progress of the scene
13621     * @property {string} event.state - The current state of the scene `"BEFORE"` or `"AFTER"`
13622     * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"`
13623     */
13624    /**
13625     * Scene update event.  
13626     * Fires whenever the scene is updated (but not necessarily changes the progress).
13627     *
13628     * @event ScrollMagic.Scene#update
13629     *
13630     * @example
13631     * scene.on("update", function (event) {
13632     * 	console.log("Scene updated.");
13633     * });
13634     *
13635     * @property {object} event - The event Object passed to each callback
13636     * @property {string} event.type - The name of the event
13637     * @property {Scene} event.target - The Scene object that triggered this event
13638     * @property {number} event.startPos - The starting position of the scene (in relation to the conainer)
13639     * @property {number} event.endPos - The ending position of the scene (in relation to the conainer)
13640     * @property {number} event.scrollPos - The current scroll position of the container
13641     */
13642    /**
13643     * Scene progress event.  
13644     * Fires whenever the progress of the scene changes.
13645     *
13646     * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method.
13647     *
13648     * @event ScrollMagic.Scene#progress
13649     *
13650     * @example
13651     * scene.on("progress", function (event) {
13652     * 	console.log("Scene progress changed to " + event.progress);
13653     * });
13654     *
13655     * @property {object} event - The event Object passed to each callback
13656     * @property {string} event.type - The name of the event
13657     * @property {Scene} event.target - The Scene object that triggered this event
13658     * @property {number} event.progress - Reflects the current progress of the scene
13659     * @property {string} event.state - The current state of the scene `"BEFORE"`, `"DURING"` or `"AFTER"`
13660     * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"`
13661     */
13662    /**
13663     * Scene change event.  
13664     * Fires whenvever a property of the scene is changed.
13665     *
13666     * @event ScrollMagic.Scene#change
13667     *
13668     * @example
13669     * scene.on("change", function (event) {
13670     * 	console.log("Scene Property \"" + event.what + "\" changed to " + event.newval);
13671     * });
13672     *
13673     * @property {object} event - The event Object passed to each callback
13674     * @property {string} event.type - The name of the event
13675     * @property {Scene} event.target - The Scene object that triggered this event
13676     * @property {string} event.what - Indicates what value has been changed
13677     * @property {mixed} event.newval - The new value of the changed property
13678     */
13679    /**
13680     * Scene shift event.  
13681     * Fires whenvever the start or end **scroll offset** of the scene change.
13682     * This happens explicitely, when one of these values change: `offset`, `duration` or `triggerHook`.
13683     * It will fire implicitly when the `triggerElement` changes, if the new element has a different position (most cases).
13684     * It will also fire implicitly when the size of the container changes and the triggerHook is anything other than `onLeave`.
13685     *
13686     * @event ScrollMagic.Scene#shift
13687     * @since 1.1.0
13688     *
13689     * @example
13690     * scene.on("shift", function (event) {
13691     * 	console.log("Scene moved, because the " + event.reason + " has changed.)");
13692     * });
13693     *
13694     * @property {object} event - The event Object passed to each callback
13695     * @property {string} event.type - The name of the event
13696     * @property {Scene} event.target - The Scene object that triggered this event
13697     * @property {string} event.reason - Indicates why the scene has shifted
13698     */
13699    /**
13700     * Scene destroy event.  
13701     * Fires whenvever the scene is destroyed.
13702     * This can be used to tidy up custom behaviour used in events.
13703     *
13704     * @event ScrollMagic.Scene#destroy
13705     * @since 1.1.0
13706     *
13707     * @example
13708     * scene.on("enter", function (event) {
13709     *        // add custom action
13710     *        $("#my-elem").left("200");
13711     *      })
13712     *      .on("destroy", function (event) {
13713     *        // reset my element to start position
13714     *        if (event.reset) {
13715     *          $("#my-elem").left("0");
13716     *        }
13717     *      });
13718     *
13719     * @property {object} event - The event Object passed to each callback
13720     * @property {string} event.type - The name of the event
13721     * @property {Scene} event.target - The Scene object that triggered this event
13722     * @property {boolean} event.reset - Indicates if the destroy method was called with reset `true` or `false`.
13723     */
13724    /**
13725     * Scene add event.  
13726     * Fires when the scene is added to a controller.
13727     * This is mostly used by plugins to know that change might be due.
13728     *
13729     * @event ScrollMagic.Scene#add
13730     * @since 2.0.0
13731     *
13732     * @example
13733     * scene.on("add", function (event) {
13734     * 	console.log('Scene was added to a new controller.');
13735     * });
13736     *
13737     * @property {object} event - The event Object passed to each callback
13738     * @property {string} event.type - The name of the event
13739     * @property {Scene} event.target - The Scene object that triggered this event
13740     * @property {boolean} event.controller - The controller object the scene was added to.
13741     */
13742    /**
13743     * Scene remove event.  
13744     * Fires when the scene is removed from a controller.
13745     * This is mostly used by plugins to know that change might be due.
13746     *
13747     * @event ScrollMagic.Scene#remove
13748     * @since 2.0.0
13749     *
13750     * @example
13751     * scene.on("remove", function (event) {
13752     * 	console.log('Scene was removed from its controller.');
13753     * });
13754     *
13755     * @property {object} event - The event Object passed to each callback
13756     * @property {string} event.type - The name of the event
13757     * @property {Scene} event.target - The Scene object that triggered this event
13758     */
13759
13760    /**
13761     * Add one ore more event listener.  
13762     * The callback function will be fired at the respective event, and an object containing relevant data will be passed to the callback.
13763     * @method ScrollMagic.Scene#on
13764     *
13765     * @example
13766     * function callback (event) {
13767     * 		console.log("Event fired! (" + event.type + ")");
13768     * }
13769     * // add listeners
13770     * scene.on("change update progress start end enter leave", callback);
13771     *
13772     * @param {string} names - The name or names of the event the callback should be attached to.
13773     * @param {function} callback - A function that should be executed, when the event is dispatched. An event object will be passed to the callback.
13774     * @returns {Scene} Parent object for chaining.
13775     */
13776    this.on = function (names, callback) {
13777      if (_util.type.Function(callback)) {
13778        names = names.trim().split(' ');
13779        names.forEach(function (fullname) {
13780          var nameparts = fullname.split('.'),
13781            eventname = nameparts[0],
13782            namespace = nameparts[1];
13783          if (eventname != "*") {
13784            // disallow wildcards
13785            if (!_listeners[eventname]) {
13786              _listeners[eventname] = [];
13787            }
13788            _listeners[eventname].push({
13789              namespace: namespace || '',
13790              callback: callback
13791            });
13792          }
13793        });
13794      } else {
13795        log(1, "ERROR when calling '.on()': Supplied callback for '" + names + "' is not a valid function!");
13796      }
13797      return Scene;
13798    };
13799
13800    /**
13801     * Remove one or more event listener.
13802     * @method ScrollMagic.Scene#off
13803     *
13804     * @example
13805     * function callback (event) {
13806     * 		console.log("Event fired! (" + event.type + ")");
13807     * }
13808     * // add listeners
13809     * scene.on("change update", callback);
13810     * // remove listeners
13811     * scene.off("change update", callback);
13812     *
13813     * @param {string} names - The name or names of the event that should be removed.
13814     * @param {function} [callback] - A specific callback function that should be removed. If none is passed all callbacks to the event listener will be removed.
13815     * @returns {Scene} Parent object for chaining.
13816     */
13817    this.off = function (names, callback) {
13818      if (!names) {
13819        log(1, "ERROR: Invalid event name supplied.");
13820        return Scene;
13821      }
13822      names = names.trim().split(' ');
13823      names.forEach(function (fullname, key) {
13824        var nameparts = fullname.split('.'),
13825          eventname = nameparts[0],
13826          namespace = nameparts[1] || '',
13827          removeList = eventname === '*' ? Object.keys(_listeners) : [eventname];
13828        removeList.forEach(function (remove) {
13829          var list = _listeners[remove] || [],
13830            i = list.length;
13831          while (i--) {
13832            var listener = list[i];
13833            if (listener && (namespace === listener.namespace || namespace === '*') && (!callback || callback == listener.callback)) {
13834              list.splice(i, 1);
13835            }
13836          }
13837          if (!list.length) {
13838            delete _listeners[remove];
13839          }
13840        });
13841      });
13842      return Scene;
13843    };
13844
13845    /**
13846     * Trigger an event.
13847     * @method ScrollMagic.Scene#trigger
13848     *
13849     * @example
13850     * this.trigger("change");
13851     *
13852     * @param {string} name - The name of the event that should be triggered.
13853     * @param {object} [vars] - An object containing info that should be passed to the callback.
13854     * @returns {Scene} Parent object for chaining.
13855     */
13856    this.trigger = function (name, vars) {
13857      if (name) {
13858        var nameparts = name.trim().split('.'),
13859          eventname = nameparts[0],
13860          namespace = nameparts[1],
13861          listeners = _listeners[eventname];
13862        log(3, 'event fired:', eventname, vars ? "->" : '', vars || '');
13863        if (listeners) {
13864          listeners.forEach(function (listener, key) {
13865            if (!namespace || namespace === listener.namespace) {
13866              listener.callback.call(Scene, new ScrollMagic.Event(eventname, listener.namespace, Scene, vars));
13867            }
13868          });
13869        }
13870      } else {
13871        log(1, "ERROR: Invalid event name supplied.");
13872      }
13873      return Scene;
13874    };
13875
13876    // set event listeners
13877    Scene.on("change.internal", function (e) {
13878      if (e.what !== "loglevel" && e.what !== "tweenChanges") {
13879        // no need for a scene update scene with these options...
13880        if (e.what === "triggerElement") {
13881          updateTriggerElementPosition();
13882        } else if (e.what === "reverse") {
13883          // the only property left that may have an impact on the current scene state. Everything else is handled by the shift event.
13884          Scene.update();
13885        }
13886      }
13887    }).on("shift.internal", function (e) {
13888      updateScrollOffset();
13889      Scene.update(); // update scene to reflect new position
13890    });
13891
13892    /**
13893     * Send a debug message to the console.
13894     * @private
13895     * but provided publicly with _log for plugins
13896     *
13897     * @param {number} loglevel - The loglevel required to initiate output for the message.
13898     * @param {...mixed} output - One or more variables that should be passed to the console.
13899     */
13900    var log = this._log = function (loglevel, output) {
13901      if (_options.loglevel >= loglevel) {
13902        Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->");
13903        _util.log.apply(window, arguments);
13904      }
13905    };
13906
13907    /**
13908     * Add the scene to a controller.  
13909     * This is the equivalent to `Controller.addScene(scene)`.
13910     * @method ScrollMagic.Scene#addTo
13911     *
13912     * @example
13913     * // add a scene to a ScrollMagic Controller
13914     * scene.addTo(controller);
13915     *
13916     * @param {ScrollMagic.Controller} controller - The controller to which the scene should be added.
13917     * @returns {Scene} Parent object for chaining.
13918     */
13919    this.addTo = function (controller) {
13920      if (!(controller instanceof ScrollMagic.Controller)) {
13921        log(1, "ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller");
13922      } else if (_controller != controller) {
13923        // new controller
13924        if (_controller) {
13925          // was associated to a different controller before, so remove it...
13926          _controller.removeScene(Scene);
13927        }
13928        _controller = controller;
13929        validateOption();
13930        updateDuration(true);
13931        updateTriggerElementPosition(true);
13932        updateScrollOffset();
13933        _controller.info("container").addEventListener('resize', onContainerResize);
13934        controller.addScene(Scene);
13935        Scene.trigger("add", {
13936          controller: _controller
13937        });
13938        log(3, "added " + NAMESPACE + " to controller");
13939        Scene.update();
13940      }
13941      return Scene;
13942    };
13943
13944    /**
13945     * **Get** or **Set** the current enabled state of the scene.  
13946     * This can be used to disable this scene without removing or destroying it.
13947     * @method ScrollMagic.Scene#enabled
13948     *
13949     * @example
13950     * // get the current value
13951     * var enabled = scene.enabled();
13952     *
13953     * // disable the scene
13954     * scene.enabled(false);
13955     *
13956     * @param {boolean} [newState] - The new enabled state of the scene `true` or `false`.
13957     * @returns {(boolean|Scene)} Current enabled state or parent object for chaining.
13958     */
13959    this.enabled = function (newState) {
13960      if (!arguments.length) {
13961        // get
13962        return _enabled;
13963      } else if (_enabled != newState) {
13964        // set
13965        _enabled = !!newState;
13966        Scene.update(true);
13967      }
13968      return Scene;
13969    };
13970
13971    /**
13972     * Remove the scene from the controller.  
13973     * This is the equivalent to `Controller.removeScene(scene)`.
13974     * The scene will not be updated anymore until you readd it to a controller.
13975     * To remove the pin or the tween you need to call removeTween() or removePin() respectively.
13976     * @method ScrollMagic.Scene#remove
13977     * @example
13978     * // remove the scene from its controller
13979     * scene.remove();
13980     *
13981     * @returns {Scene} Parent object for chaining.
13982     */
13983    this.remove = function () {
13984      if (_controller) {
13985        _controller.info("container").removeEventListener('resize', onContainerResize);
13986        var tmpParent = _controller;
13987        _controller = undefined;
13988        tmpParent.removeScene(Scene);
13989        Scene.trigger("remove");
13990        log(3, "removed " + NAMESPACE + " from controller");
13991      }
13992      return Scene;
13993    };
13994
13995    /**
13996     * Destroy the scene and everything.
13997     * @method ScrollMagic.Scene#destroy
13998     * @example
13999     * // destroy the scene without resetting the pin and tween to their initial positions
14000     * scene = scene.destroy();
14001     *
14002     * // destroy the scene and reset the pin and tween
14003     * scene = scene.destroy(true);
14004     *
14005     * @param {boolean} [reset=false] - If `true` the pin and tween (if existent) will be reset.
14006     * @returns {null} Null to unset handler variables.
14007     */
14008    this.destroy = function (reset) {
14009      Scene.trigger("destroy", {
14010        reset: reset
14011      });
14012      Scene.remove();
14013      Scene.off("*.*");
14014      log(3, "destroyed " + NAMESPACE + " (reset: " + (reset ? "true" : "false") + ")");
14015      return null;
14016    };
14017
14018    /**
14019     * Updates the Scene to reflect the current state.  
14020     * This is the equivalent to `Controller.updateScene(scene, immediately)`.  
14021     * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container.  
14022     * It then updates the current scene state accordingly (or does nothing, if the state is already correct) – Pins will be set to their correct position and tweens will be updated to their correct progress.
14023     * This means an update doesn't necessarily result in a progress change. The `progress` event will be fired if the progress has indeed changed between this update and the last.  
14024     * _**NOTE:** This method gets called constantly whenever ScrollMagic detects a change. The only application for you is if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._
14025     * @method ScrollMagic.Scene#update
14026     * @example
14027     * // update the scene on next tick
14028     * scene.update();
14029     *
14030     * // update the scene immediately
14031     * scene.update(true);
14032     *
14033     * @fires Scene.update
14034     *
14035     * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance).
14036     * @returns {Scene} Parent object for chaining.
14037     */
14038    this.update = function (immediately) {
14039      if (_controller) {
14040        if (immediately) {
14041          if (_controller.enabled() && _enabled) {
14042            var scrollPos = _controller.info("scrollPos"),
14043              newProgress;
14044            if (_options.duration > 0) {
14045              newProgress = (scrollPos - _scrollOffset.start) / (_scrollOffset.end - _scrollOffset.start);
14046            } else {
14047              newProgress = scrollPos >= _scrollOffset.start ? 1 : 0;
14048            }
14049            Scene.trigger("update", {
14050              startPos: _scrollOffset.start,
14051              endPos: _scrollOffset.end,
14052              scrollPos: scrollPos
14053            });
14054            Scene.progress(newProgress);
14055          } else if (_pin && _state === SCENE_STATE_DURING) {
14056            updatePinState(true); // unpin in position
14057          }
14058        } else {
14059          _controller.updateScene(Scene, false);
14060        }
14061      }
14062      return Scene;
14063    };
14064
14065    /**
14066     * Updates dynamic scene variables like the trigger element position or the duration.
14067     * This method is automatically called in regular intervals from the controller. See {@link ScrollMagic.Controller} option `refreshInterval`.
14068     * 
14069     * You can call it to minimize lag, for example when you intentionally change the position of the triggerElement.
14070     * If you don't it will simply be updated in the next refresh interval of the container, which is usually sufficient.
14071     *
14072     * @method ScrollMagic.Scene#refresh
14073     * @since 1.1.0
14074     * @example
14075     * scene = new ScrollMagic.Scene({triggerElement: "#trigger"});
14076     * 
14077     * // change the position of the trigger
14078     * $("#trigger").css("top", 500);
14079     * // immediately let the scene know of this change
14080     * scene.refresh();
14081     *
14082     * @fires {@link Scene.shift}, if the trigger element position or the duration changed
14083     * @fires {@link Scene.change}, if the duration changed
14084     *
14085     * @returns {Scene} Parent object for chaining.
14086     */
14087    this.refresh = function () {
14088      updateDuration();
14089      updateTriggerElementPosition();
14090      // update trigger element position
14091      return Scene;
14092    };
14093
14094    /**
14095     * **Get** or **Set** the scene's progress.  
14096     * Usually it shouldn't be necessary to use this as a setter, as it is set automatically by scene.update().  
14097     * The order in which the events are fired depends on the duration of the scene:
14098     *  1. Scenes with `duration == 0`:  
14099     *  Scenes that have no duration by definition have no ending. Thus the `end` event will never be fired.  
14100     *  When the trigger position of the scene is passed the events are always fired in this order:  
14101     *  `enter`, `start`, `progress` when scrolling forward  
14102     *  and  
14103     *  `progress`, `start`, `leave` when scrolling in reverse
14104     *  2. Scenes with `duration > 0`:  
14105     *  Scenes with a set duration have a defined start and end point.  
14106     *  When scrolling past the start position of the scene it will fire these events in this order:  
14107     *  `enter`, `start`, `progress`  
14108     *  When continuing to scroll and passing the end point it will fire these events:  
14109     *  `progress`, `end`, `leave`  
14110     *  When reversing through the end point these events are fired:  
14111     *  `enter`, `end`, `progress`  
14112     *  And when continuing to scroll past the start position in reverse it will fire:  
14113     *  `progress`, `start`, `leave`  
14114     *  In between start and end the `progress` event will be called constantly, whenever the progress changes.
14115     * 
14116     * In short:  
14117     * `enter` events will always trigger **before** the progress update and `leave` envents will trigger **after** the progress update.  
14118     * `start` and `end` will always trigger at their respective position.
14119     * 
14120     * Please review the event descriptions for details on the events and the event object that is passed to the callback.
14121     * 
14122     * @method ScrollMagic.Scene#progress
14123     * @example
14124     * // get the current scene progress
14125     * var progress = scene.progress();
14126     *
14127     * // set new scene progress
14128     * scene.progress(0.3);
14129     *
14130     * @fires {@link Scene.enter}, when used as setter
14131     * @fires {@link Scene.start}, when used as setter
14132     * @fires {@link Scene.progress}, when used as setter
14133     * @fires {@link Scene.end}, when used as setter
14134     * @fires {@link Scene.leave}, when used as setter
14135     *
14136     * @param {number} [progress] - The new progress value of the scene `[0-1]`.
14137     * @returns {number} `get` -  Current scene progress.
14138     * @returns {Scene} `set` -  Parent object for chaining.
14139     */
14140    this.progress = function (progress) {
14141      if (!arguments.length) {
14142        // get
14143        return _progress;
14144      } else {
14145        // set
14146        var doUpdate = false,
14147          oldState = _state,
14148          scrollDirection = _controller ? _controller.info("scrollDirection") : 'PAUSED',
14149          reverseOrForward = _options.reverse || progress >= _progress;
14150        if (_options.duration === 0) {
14151          // zero duration scenes
14152          doUpdate = _progress != progress;
14153          _progress = progress < 1 && reverseOrForward ? 0 : 1;
14154          _state = _progress === 0 ? SCENE_STATE_BEFORE : SCENE_STATE_DURING;
14155        } else {
14156          // scenes with start and end
14157          if (progress < 0 && _state !== SCENE_STATE_BEFORE && reverseOrForward) {
14158            // go back to initial state
14159            _progress = 0;
14160            _state = SCENE_STATE_BEFORE;
14161            doUpdate = true;
14162          } else if (progress >= 0 && progress < 1 && reverseOrForward) {
14163            _progress = progress;
14164            _state = SCENE_STATE_DURING;
14165            doUpdate = true;
14166          } else if (progress >= 1 && _state !== SCENE_STATE_AFTER) {
14167            _progress = 1;
14168            _state = SCENE_STATE_AFTER;
14169            doUpdate = true;
14170          } else if (_state === SCENE_STATE_DURING && !reverseOrForward) {
14171            updatePinState(); // in case we scrolled backwards mid-scene and reverse is disabled => update the pin position, so it doesn't move back as well.
14172          }
14173        }
14174
14175        if (doUpdate) {
14176          // fire events
14177          var eventVars = {
14178              progress: _progress,
14179              state: _state,
14180              scrollDirection: scrollDirection
14181            },
14182            stateChanged = _state != oldState;
14183          var trigger = function trigger(eventName) {
14184            // tmp helper to simplify code
14185            Scene.trigger(eventName, eventVars);
14186          };
14187          if (stateChanged) {
14188            // enter events
14189            if (oldState !== SCENE_STATE_DURING) {
14190              trigger("enter");
14191              trigger(oldState === SCENE_STATE_BEFORE ? "start" : "end");
14192            }
14193          }
14194          trigger("progress");
14195          if (stateChanged) {
14196            // leave events
14197            if (_state !== SCENE_STATE_DURING) {
14198              trigger(_state === SCENE_STATE_BEFORE ? "start" : "end");
14199              trigger("leave");
14200            }
14201          }
14202        }
14203        return Scene;
14204      }
14205    };
14206
14207    /**
14208     * Update the start and end scrollOffset of the container.
14209     * The positions reflect what the controller's scroll position will be at the start and end respectively.
14210     * Is called, when:
14211     *   - Scene event "change" is called with: offset, triggerHook, duration 
14212     *   - scroll container event "resize" is called
14213     *   - the position of the triggerElement changes
14214     *   - the controller changes -> addTo()
14215     * @private
14216     */
14217    var updateScrollOffset = function updateScrollOffset() {
14218      _scrollOffset = {
14219        start: _triggerPos + _options.offset
14220      };
14221      if (_controller && _options.triggerElement) {
14222        // take away triggerHook portion to get relative to top
14223        _scrollOffset.start -= _controller.info("size") * _options.triggerHook;
14224      }
14225      _scrollOffset.end = _scrollOffset.start + _options.duration;
14226    };
14227
14228    /**
14229     * Updates the duration if set to a dynamic function.
14230     * This method is called when the scene is added to a controller and in regular intervals from the controller through scene.refresh().
14231     * 
14232     * @fires {@link Scene.change}, if the duration changed
14233     * @fires {@link Scene.shift}, if the duration changed
14234     *
14235     * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed.
14236     * @private
14237     */
14238    var updateDuration = function updateDuration(suppressEvents) {
14239      // update duration
14240      if (_durationUpdateMethod) {
14241        var varname = "duration";
14242        if (changeOption(varname, _durationUpdateMethod.call(Scene)) && !suppressEvents) {
14243          // set
14244          Scene.trigger("change", {
14245            what: varname,
14246            newval: _options[varname]
14247          });
14248          Scene.trigger("shift", {
14249            reason: varname
14250          });
14251        }
14252      }
14253    };
14254
14255    /**
14256     * Updates the position of the triggerElement, if present.
14257     * This method is called ...
14258     *  - ... when the triggerElement is changed
14259     *  - ... when the scene is added to a (new) controller
14260     *  - ... in regular intervals from the controller through scene.refresh().
14261     * 
14262     * @fires {@link Scene.shift}, if the position changed
14263     *
14264     * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed.
14265     * @private
14266     */
14267    var updateTriggerElementPosition = function updateTriggerElementPosition(suppressEvents) {
14268      var elementPos = 0,
14269        telem = _options.triggerElement;
14270      if (_controller && (telem || _triggerPos > 0)) {
14271        // either an element exists or was removed and the triggerPos is still > 0
14272        if (telem) {
14273          // there currently a triggerElement set
14274          if (telem.parentNode) {
14275            // check if element is still attached to DOM
14276            var controllerInfo = _controller.info(),
14277              containerOffset = _util.get.offset(controllerInfo.container),
14278              // container position is needed because element offset is returned in relation to document, not in relation to container.
14279              param = controllerInfo.vertical ? "top" : "left"; // which param is of interest ?
14280
14281            // if parent is spacer, use spacer position instead so correct start position is returned for pinned elements.
14282            while (telem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) {
14283              telem = telem.parentNode;
14284            }
14285            var elementOffset = _util.get.offset(telem);
14286            if (!controllerInfo.isDocument) {
14287              // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent
14288              containerOffset[param] -= _controller.scrollPos();
14289            }
14290            elementPos = elementOffset[param] - containerOffset[param];
14291          } else {
14292            // there was an element, but it was removed from DOM
14293            log(2, "WARNING: triggerElement was removed from DOM and will be reset to", undefined);
14294            Scene.triggerElement(undefined); // unset, so a change event is triggered
14295          }
14296        }
14297
14298        var changed = elementPos != _triggerPos;
14299        _triggerPos = elementPos;
14300        if (changed && !suppressEvents) {
14301          Scene.trigger("shift", {
14302            reason: "triggerElementPosition"
14303          });
14304        }
14305      }
14306    };
14307
14308    /**
14309     * Trigger a shift event, when the container is resized and the triggerHook is > 1.
14310     * @private
14311     */
14312    var onContainerResize = function onContainerResize(e) {
14313      if (_options.triggerHook > 0) {
14314        Scene.trigger("shift", {
14315          reason: "containerResize"
14316        });
14317      }
14318    };
14319    var _validate = _util.extend(SCENE_OPTIONS.validate, {
14320      // validation for duration handled internally for reference to private var _durationMethod
14321      duration: function duration(val) {
14322        if (_util.type.String(val) && val.match(/^(\.|\d)*\d+%$/)) {
14323          // percentage value
14324          var perc = parseFloat(val) / 100;
14325          val = function val() {
14326            return _controller ? _controller.info("size") * perc : 0;
14327          };
14328        }
14329        if (_util.type.Function(val)) {
14330          // function
14331          _durationUpdateMethod = val;
14332          try {
14333            val = parseFloat(_durationUpdateMethod.call(Scene));
14334          } catch (e) {
14335            val = -1; // will cause error below
14336          }
14337        }
14338        // val has to be float
14339        val = parseFloat(val);
14340        if (!_util.type.Number(val) || val < 0) {
14341          if (_durationUpdateMethod) {
14342            _durationUpdateMethod = undefined;
14343            throw ["Invalid return value of supplied function for option \"duration\":", val];
14344          } else {
14345            throw ["Invalid value for option \"duration\":", val];
14346          }
14347        }
14348        return val;
14349      }
14350    });
14351
14352    /**
14353     * Checks the validity of a specific or all options and reset to default if neccessary.
14354     * @private
14355     */
14356    var validateOption = function validateOption(check) {
14357      check = arguments.length ? [check] : Object.keys(_validate);
14358      check.forEach(function (optionName, key) {
14359        var value;
14360        if (_validate[optionName]) {
14361          // there is a validation method for this option
14362          try {
14363            // validate value
14364            value = _validate[optionName](_options[optionName]);
14365          } catch (e) {
14366            // validation failed -> reset to default
14367            value = DEFAULT_OPTIONS[optionName];
14368            var logMSG = _util.type.String(e) ? [e] : e;
14369            if (_util.type.Array(logMSG)) {
14370              logMSG[0] = "ERROR: " + logMSG[0];
14371              logMSG.unshift(1); // loglevel 1 for error msg
14372              log.apply(this, logMSG);
14373            } else {
14374              log(1, "ERROR: Problem executing validation callback for option '" + optionName + "':", e.message);
14375            }
14376          } finally {
14377            _options[optionName] = value;
14378          }
14379        }
14380      });
14381    };
14382
14383    /**
14384     * Helper used by the setter/getters for scene options
14385     * @private
14386     */
14387    var changeOption = function changeOption(varname, newval) {
14388      var changed = false,
14389        oldval = _options[varname];
14390      if (_options[varname] != newval) {
14391        _options[varname] = newval;
14392        validateOption(varname); // resets to default if necessary
14393        changed = oldval != _options[varname];
14394      }
14395      return changed;
14396    };
14397
14398    // generate getters/setters for all options
14399    var addSceneOption = function addSceneOption(optionName) {
14400      if (!Scene[optionName]) {
14401        Scene[optionName] = function (newVal) {
14402          if (!arguments.length) {
14403            // get
14404            return _options[optionName];
14405          } else {
14406            if (optionName === "duration") {
14407              // new duration is set, so any previously set function must be unset
14408              _durationUpdateMethod = undefined;
14409            }
14410            if (changeOption(optionName, newVal)) {
14411              // set
14412              Scene.trigger("change", {
14413                what: optionName,
14414                newval: _options[optionName]
14415              });
14416              if (SCENE_OPTIONS.shifts.indexOf(optionName) > -1) {
14417                Scene.trigger("shift", {
14418                  reason: optionName
14419                });
14420              }
14421            }
14422          }
14423          return Scene;
14424        };
14425      }
14426    };
14427
14428    /**
14429     * **Get** or **Set** the duration option value.
14430     *
14431     * As a **setter** it accepts three types of parameters:
14432     * 1. `number`: Sets the duration of the scene to exactly this amount of pixels.  
14433     *   This means the scene will last for exactly this amount of pixels scrolled. Sub-Pixels are also valid.
14434     *   A value of `0` means that the scene is 'open end' and no end will be triggered. Pins will never unpin and animations will play independently of scroll progress.
14435     * 2. `string`: Always updates the duration relative to parent scroll container.  
14436     *   For example `"100%"` will keep the duration always exactly at the inner height of the scroll container.
14437     *   When scrolling vertically the width is used for reference respectively.
14438     * 3. `function`: The supplied function will be called to return the scene duration.
14439     *   This is useful in setups where the duration depends on other elements who might change size. By supplying a function you can return a value instead of updating potentially multiple scene durations.  
14440     *   The scene can be referenced inside the callback using `this`.
14441     *   _**WARNING:** This is an easy way to kill performance, as the callback will be executed every time `Scene.refresh()` is called, which happens a lot. The interval is defined by the controller (see ScrollMagic.Controller option `refreshInterval`).  
14442     *   It's recomended to avoid calculations within the function and use cached variables as return values.  
14443     *   This counts double if you use the same function for multiple scenes._
14444     *
14445     * @method ScrollMagic.Scene#duration
14446     * @example
14447     * // get the current duration value
14448     * var duration = scene.duration();
14449     *
14450     * // set a new duration
14451     * scene.duration(300);
14452     *
14453     * // set duration responsively to container size
14454     * scene.duration("100%");
14455     *
14456     * // use a function to randomize the duration for some reason.
14457     * var durationValueCache;
14458     * function durationCallback () {
14459     *   return durationValueCache;
14460     * }
14461     * function updateDuration () {
14462     *   durationValueCache = Math.random() * 100;
14463     * }
14464     * updateDuration(); // set to initial value
14465     * scene.duration(durationCallback); // set duration callback
14466     *
14467     * @fires {@link Scene.change}, when used as setter
14468     * @fires {@link Scene.shift}, when used as setter
14469     * @param {(number|string|function)} [newDuration] - The new duration setting for the scene.
14470     * @returns {number} `get` -  Current scene duration.
14471     * @returns {Scene} `set` -  Parent object for chaining.
14472     */
14473
14474    /**
14475     * **Get** or **Set** the offset option value.
14476     * @method ScrollMagic.Scene#offset
14477     * @example
14478     * // get the current offset
14479     * var offset = scene.offset();
14480     *
14481     * // set a new offset
14482     * scene.offset(100);
14483     *
14484     * @fires {@link Scene.change}, when used as setter
14485     * @fires {@link Scene.shift}, when used as setter
14486     * @param {number} [newOffset] - The new offset of the scene.
14487     * @returns {number} `get` -  Current scene offset.
14488     * @returns {Scene} `set` -  Parent object for chaining.
14489     */
14490
14491    /**
14492     * **Get** or **Set** the triggerElement option value.
14493     * Does **not** fire `Scene.shift`, because changing the trigger Element doesn't necessarily mean the start position changes. This will be determined in `Scene.refresh()`, which is automatically triggered.
14494     * @method ScrollMagic.Scene#triggerElement
14495     * @example
14496     * // get the current triggerElement
14497     * var triggerElement = scene.triggerElement();
14498     *
14499     * // set a new triggerElement using a selector
14500     * scene.triggerElement("#trigger");
14501     * // set a new triggerElement using a DOM object
14502     * scene.triggerElement(document.getElementById("trigger"));
14503     *
14504     * @fires {@link Scene.change}, when used as setter
14505     * @param {(string|object)} [newTriggerElement] - The new trigger element for the scene.
14506     * @returns {(string|object)} `get` -  Current triggerElement.
14507     * @returns {Scene} `set` -  Parent object for chaining.
14508     */
14509
14510    /**
14511     * **Get** or **Set** the triggerHook option value.
14512     * @method ScrollMagic.Scene#triggerHook
14513     * @example
14514     * // get the current triggerHook value
14515     * var triggerHook = scene.triggerHook();
14516     *
14517     * // set a new triggerHook using a string
14518     * scene.triggerHook("onLeave");
14519     * // set a new triggerHook using a number
14520     * scene.triggerHook(0.7);
14521     *
14522     * @fires {@link Scene.change}, when used as setter
14523     * @fires {@link Scene.shift}, when used as setter
14524     * @param {(number|string)} [newTriggerHook] - The new triggerHook of the scene. See {@link Scene} parameter description for value options.
14525     * @returns {number} `get` -  Current triggerHook (ALWAYS numerical).
14526     * @returns {Scene} `set` -  Parent object for chaining.
14527     */
14528
14529    /**
14530     * **Get** or **Set** the reverse option value.
14531     * @method ScrollMagic.Scene#reverse
14532     * @example
14533     * // get the current reverse option
14534     * var reverse = scene.reverse();
14535     *
14536     * // set new reverse option
14537     * scene.reverse(false);
14538     *
14539     * @fires {@link Scene.change}, when used as setter
14540     * @param {boolean} [newReverse] - The new reverse setting of the scene.
14541     * @returns {boolean} `get` -  Current reverse option value.
14542     * @returns {Scene} `set` -  Parent object for chaining.
14543     */
14544
14545    /**
14546     * **Get** or **Set** the loglevel option value.
14547     * @method ScrollMagic.Scene#loglevel
14548     * @example
14549     * // get the current loglevel
14550     * var loglevel = scene.loglevel();
14551     *
14552     * // set new loglevel
14553     * scene.loglevel(3);
14554     *
14555     * @fires {@link Scene.change}, when used as setter
14556     * @param {number} [newLoglevel] - The new loglevel setting of the scene. `[0-3]`
14557     * @returns {number} `get` -  Current loglevel.
14558     * @returns {Scene} `set` -  Parent object for chaining.
14559     */
14560
14561    /**
14562     * **Get** the associated controller.
14563     * @method ScrollMagic.Scene#controller
14564     * @example
14565     * // get the controller of a scene
14566     * var controller = scene.controller();
14567     *
14568     * @returns {ScrollMagic.Controller} Parent controller or `undefined`
14569     */
14570    this.controller = function () {
14571      return _controller;
14572    };
14573
14574    /**
14575     * **Get** the current state.
14576     * @method ScrollMagic.Scene#state
14577     * @example
14578     * // get the current state
14579     * var state = scene.state();
14580     *
14581     * @returns {string} `"BEFORE"`, `"DURING"` or `"AFTER"`
14582     */
14583    this.state = function () {
14584      return _state;
14585    };
14586
14587    /**
14588     * **Get** the current scroll offset for the start of the scene.  
14589     * Mind, that the scrollOffset is related to the size of the container, if `triggerHook` is bigger than `0` (or `"onLeave"`).  
14590     * This means, that resizing the container or changing the `triggerHook` will influence the scene's start offset.
14591     * @method ScrollMagic.Scene#scrollOffset
14592     * @example
14593     * // get the current scroll offset for the start and end of the scene.
14594     * var start = scene.scrollOffset();
14595     * var end = scene.scrollOffset() + scene.duration();
14596     * console.log("the scene starts at", start, "and ends at", end);
14597     *
14598     * @returns {number} The scroll offset (of the container) at which the scene will trigger. Y value for vertical and X value for horizontal scrolls.
14599     */
14600    this.scrollOffset = function () {
14601      return _scrollOffset.start;
14602    };
14603
14604    /**
14605     * **Get** the trigger position of the scene (including the value of the `offset` option).  
14606     * @method ScrollMagic.Scene#triggerPosition
14607     * @example
14608     * // get the scene's trigger position
14609     * var triggerPosition = scene.triggerPosition();
14610     *
14611     * @returns {number} Start position of the scene. Top position value for vertical and left position value for horizontal scrolls.
14612     */
14613    this.triggerPosition = function () {
14614      var pos = _options.offset; // the offset is the basis
14615      if (_controller) {
14616        // get the trigger position
14617        if (_options.triggerElement) {
14618          // Element as trigger
14619          pos += _triggerPos;
14620        } else {
14621          // return the height of the triggerHook to start at the beginning
14622          pos += _controller.info("size") * Scene.triggerHook();
14623        }
14624      }
14625      return pos;
14626    };
14627    var _pin, _pinOptions;
14628    Scene.on("shift.internal", function (e) {
14629      var durationChanged = e.reason === "duration";
14630      if (_state === SCENE_STATE_AFTER && durationChanged || _state === SCENE_STATE_DURING && _options.duration === 0) {
14631        // if [duration changed after a scene (inside scene progress updates pin position)] or [duration is 0, we are in pin phase and some other value changed].
14632        updatePinState();
14633      }
14634      if (durationChanged) {
14635        updatePinDimensions();
14636      }
14637    }).on("progress.internal", function (e) {
14638      updatePinState();
14639    }).on("add.internal", function (e) {
14640      updatePinDimensions();
14641    }).on("destroy.internal", function (e) {
14642      Scene.removePin(e.reset);
14643    });
14644    /**
14645     * Update the pin state.
14646     * @private
14647     */
14648    var updatePinState = function updatePinState(forceUnpin) {
14649      if (_pin && _controller) {
14650        var containerInfo = _controller.info(),
14651          pinTarget = _pinOptions.spacer.firstChild; // may be pin element or another spacer, if cascading pins
14652
14653        if (!forceUnpin && _state === SCENE_STATE_DURING) {
14654          // during scene or if duration is 0 and we are past the trigger
14655          // pinned state
14656          if (_util.css(pinTarget, "position") != "fixed") {
14657            // change state before updating pin spacer (position changes due to fixed collapsing might occur.)
14658            _util.css(pinTarget, {
14659              "position": "fixed"
14660            });
14661            // update pin spacer
14662            updatePinDimensions();
14663          }
14664          var fixedPos = _util.get.offset(_pinOptions.spacer, true),
14665            // get viewport position of spacer
14666            scrollDistance = _options.reverse || _options.duration === 0 ? containerInfo.scrollPos - _scrollOffset.start // quicker
14667            : Math.round(_progress * _options.duration * 10) / 10; // if no reverse and during pin the position needs to be recalculated using the progress
14668
14669          // add scrollDistance
14670          fixedPos[containerInfo.vertical ? "top" : "left"] += scrollDistance;
14671
14672          // set new values
14673          _util.css(_pinOptions.spacer.firstChild, {
14674            top: fixedPos.top,
14675            left: fixedPos.left
14676          });
14677        } else {
14678          // unpinned state
14679          var newCSS = {
14680              position: _pinOptions.inFlow ? "relative" : "absolute",
14681              top: 0,
14682              left: 0
14683            },
14684            change = _util.css(pinTarget, "position") != newCSS.position;
14685          if (!_pinOptions.pushFollowers) {
14686            newCSS[containerInfo.vertical ? "top" : "left"] = _options.duration * _progress;
14687          } else if (_options.duration > 0) {
14688            // only concerns scenes with duration
14689            if (_state === SCENE_STATE_AFTER && parseFloat(_util.css(_pinOptions.spacer, "padding-top")) === 0) {
14690              change = true; // if in after state but havent updated spacer yet (jumped past pin)
14691            } else if (_state === SCENE_STATE_BEFORE && parseFloat(_util.css(_pinOptions.spacer, "padding-bottom")) === 0) {
14692              // before
14693              change = true; // jumped past fixed state upward direction
14694            }
14695          }
14696          // set new values
14697          _util.css(pinTarget, newCSS);
14698          if (change) {
14699            // update pin spacer if state changed
14700            updatePinDimensions();
14701          }
14702        }
14703      }
14704    };
14705
14706    /**
14707     * Update the pin spacer and/or element size.
14708     * The size of the spacer needs to be updated whenever the duration of the scene changes, if it is to push down following elements.
14709     * @private
14710     */
14711    var updatePinDimensions = function updatePinDimensions() {
14712      if (_pin && _controller && _pinOptions.inFlow) {
14713        // no spacerresize, if original position is absolute
14714        var after = _state === SCENE_STATE_AFTER,
14715          before = _state === SCENE_STATE_BEFORE,
14716          during = _state === SCENE_STATE_DURING,
14717          vertical = _controller.info("vertical"),
14718          pinTarget = _pinOptions.spacer.firstChild,
14719          // usually the pined element but can also be another spacer (cascaded pins)
14720          marginCollapse = _util.isMarginCollapseType(_util.css(_pinOptions.spacer, "display")),
14721          css = {};
14722
14723        // set new size
14724        // if relsize: spacer -> pin | else: pin -> spacer
14725        if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) {
14726          if (during) {
14727            _util.css(_pin, {
14728              "width": _util.get.width(_pinOptions.spacer)
14729            });
14730          } else {
14731            _util.css(_pin, {
14732              "width": "100%"
14733            });
14734          }
14735        } else {
14736          // minwidth is needed for cascaded pins.
14737          css["min-width"] = _util.get.width(vertical ? _pin : pinTarget, true, true);
14738          css.width = during ? css["min-width"] : "auto";
14739        }
14740        if (_pinOptions.relSize.height) {
14741          if (during) {
14742            // the only padding the spacer should ever include is the duration (if pushFollowers = true), so we need to substract that.
14743            _util.css(_pin, {
14744              "height": _util.get.height(_pinOptions.spacer) - (_pinOptions.pushFollowers ? _options.duration : 0)
14745            });
14746          } else {
14747            _util.css(_pin, {
14748              "height": "100%"
14749            });
14750          }
14751        } else {
14752          // margin is only included if it's a cascaded pin to resolve an IE9 bug
14753          css["min-height"] = _util.get.height(vertical ? pinTarget : _pin, true, !marginCollapse); // needed for cascading pins
14754          css.height = during ? css["min-height"] : "auto";
14755        }
14756
14757        // add space for duration if pushFollowers is true
14758        if (_pinOptions.pushFollowers) {
14759          css["padding" + (vertical ? "Top" : "Left")] = _options.duration * _progress;
14760          css["padding" + (vertical ? "Bottom" : "Right")] = _options.duration * (1 - _progress);
14761        }
14762        _util.css(_pinOptions.spacer, css);
14763      }
14764    };
14765
14766    /**
14767     * Updates the Pin state (in certain scenarios)
14768     * If the controller container is not the document and we are mid-pin-phase scrolling or resizing the main document can result to wrong pin positions.
14769     * So this function is called on resize and scroll of the document.
14770     * @private
14771     */
14772    var updatePinInContainer = function updatePinInContainer() {
14773      if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) {
14774        updatePinState();
14775      }
14776    };
14777
14778    /**
14779     * Updates the Pin spacer size state (in certain scenarios)
14780     * If container is resized during pin and relatively sized the size of the pin might need to be updated...
14781     * So this function is called on resize of the container.
14782     * @private
14783     */
14784    var updateRelativePinSpacer = function updateRelativePinSpacer() {
14785      if (_controller && _pin &&
14786      // well, duh
14787      _state === SCENE_STATE_DURING && (
14788      // element in pinned state?
14789      // is width or height relatively sized, but not in relation to body? then we need to recalc.
14790      (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) && _util.get.width(window) != _util.get.width(_pinOptions.spacer.parentNode) || _pinOptions.relSize.height && _util.get.height(window) != _util.get.height(_pinOptions.spacer.parentNode))) {
14791        updatePinDimensions();
14792      }
14793    };
14794
14795    /**
14796     * Is called, when the mousewhel is used while over a pinned element inside a div container.
14797     * If the scene is in fixed state scroll events would be counted towards the body. This forwards the event to the scroll container.
14798     * @private
14799     */
14800    var onMousewheelOverPin = function onMousewheelOverPin(e) {
14801      if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) {
14802        // in pin state
14803        e.preventDefault();
14804        _controller._setScrollPos(_controller.info("scrollPos") - ((e.wheelDelta || e[_controller.info("vertical") ? "wheelDeltaY" : "wheelDeltaX"]) / 3 || -e.detail * 30));
14805      }
14806    };
14807
14808    /**
14809     * Pin an element for the duration of the scene.
14810     * If the scene duration is 0 the element will only be unpinned, if the user scrolls back past the start position.  
14811     * Make sure only one pin is applied to an element at the same time.
14812     * An element can be pinned multiple times, but only successively.
14813     * _**NOTE:** The option `pushFollowers` has no effect, when the scene duration is 0._
14814     * @method ScrollMagic.Scene#setPin
14815     * @example
14816     * // pin element and push all following elements down by the amount of the pin duration.
14817     * scene.setPin("#pin");
14818     *
14819     * // pin element and keeping all following elements in their place. The pinned element will move past them.
14820     * scene.setPin("#pin", {pushFollowers: false});
14821     *
14822     * @param {(string|object)} element - A Selector targeting an element or a DOM object that is supposed to be pinned.
14823     * @param {object} [settings] - settings for the pin
14824     * @param {boolean} [settings.pushFollowers=true] - If `true` following elements will be "pushed" down for the duration of the pin, if `false` the pinned element will just scroll past them.  
14825     												   Ignored, when duration is `0`.
14826     * @param {string} [settings.spacerClass="scrollmagic-pin-spacer"] - Classname of the pin spacer element, which is used to replace the element.
14827     *
14828     * @returns {Scene} Parent object for chaining.
14829     */
14830    this.setPin = function (element, settings) {
14831      var defaultSettings = {
14832        pushFollowers: true,
14833        spacerClass: "scrollmagic-pin-spacer"
14834      };
14835      var pushFollowersActivelySet = settings && settings.hasOwnProperty('pushFollowers');
14836      settings = _util.extend({}, defaultSettings, settings);
14837
14838      // validate Element
14839      element = _util.get.elements(element)[0];
14840      if (!element) {
14841        log(1, "ERROR calling method 'setPin()': Invalid pin element supplied.");
14842        return Scene; // cancel
14843      } else if (_util.css(element, "position") === "fixed") {
14844        log(1, "ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'.");
14845        return Scene; // cancel
14846      }
14847
14848      if (_pin) {
14849        // preexisting pin?
14850        if (_pin === element) {
14851          // same pin we already have -> do nothing
14852          return Scene; // cancel
14853        } else {
14854          // kill old pin
14855          Scene.removePin();
14856        }
14857      }
14858      _pin = element;
14859      var parentDisplay = _pin.parentNode.style.display,
14860        boundsParams = ["top", "left", "bottom", "right", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"];
14861      _pin.parentNode.style.display = 'none'; // hack start to force css to return stylesheet values instead of calculated px values.
14862      var inFlow = _util.css(_pin, "position") != "absolute",
14863        pinCSS = _util.css(_pin, boundsParams.concat(["display"])),
14864        sizeCSS = _util.css(_pin, ["width", "height"]);
14865      _pin.parentNode.style.display = parentDisplay; // hack end.
14866
14867      if (!inFlow && settings.pushFollowers) {
14868        log(2, "WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled.");
14869        settings.pushFollowers = false;
14870      }
14871      window.setTimeout(function () {
14872        // wait until all finished, because with responsive duration it will only be set after scene is added to controller
14873        if (_pin && _options.duration === 0 && pushFollowersActivelySet && settings.pushFollowers) {
14874          log(2, "WARNING: pushFollowers =", true, "has no effect, when scene duration is 0.");
14875        }
14876      }, 0);
14877
14878      // create spacer and insert
14879      var spacer = _pin.parentNode.insertBefore(document.createElement('div'), _pin),
14880        spacerCSS = _util.extend(pinCSS, {
14881          position: inFlow ? "relative" : "absolute",
14882          boxSizing: "content-box",
14883          mozBoxSizing: "content-box",
14884          webkitBoxSizing: "content-box"
14885        });
14886      if (!inFlow) {
14887        // copy size if positioned absolutely, to work for bottom/right positioned elements.
14888        _util.extend(spacerCSS, _util.css(_pin, ["width", "height"]));
14889      }
14890      _util.css(spacer, spacerCSS);
14891      spacer.setAttribute(PIN_SPACER_ATTRIBUTE, "");
14892      _util.addClass(spacer, settings.spacerClass);
14893
14894      // set the pin Options
14895      _pinOptions = {
14896        spacer: spacer,
14897        relSize: {
14898          // save if size is defined using % values. if so, handle spacer resize differently...
14899          width: sizeCSS.width.slice(-1) === "%",
14900          height: sizeCSS.height.slice(-1) === "%",
14901          autoFullWidth: sizeCSS.width === "auto" && inFlow && _util.isMarginCollapseType(pinCSS.display)
14902        },
14903        pushFollowers: settings.pushFollowers,
14904        inFlow: inFlow // stores if the element takes up space in the document flow
14905      };
14906
14907      if (!_pin.___origStyle) {
14908        _pin.___origStyle = {};
14909        var pinInlineCSS = _pin.style,
14910          copyStyles = boundsParams.concat(["width", "height", "position", "boxSizing", "mozBoxSizing", "webkitBoxSizing"]);
14911        copyStyles.forEach(function (val) {
14912          _pin.___origStyle[val] = pinInlineCSS[val] || "";
14913        });
14914      }
14915
14916      // if relative size, transfer it to spacer and make pin calculate it...
14917      if (_pinOptions.relSize.width) {
14918        _util.css(spacer, {
14919          width: sizeCSS.width
14920        });
14921      }
14922      if (_pinOptions.relSize.height) {
14923        _util.css(spacer, {
14924          height: sizeCSS.height
14925        });
14926      }
14927
14928      // now place the pin element inside the spacer	
14929      spacer.appendChild(_pin);
14930      // and set new css
14931      _util.css(_pin, {
14932        position: inFlow ? "relative" : "absolute",
14933        margin: "auto",
14934        top: "auto",
14935        left: "auto",
14936        bottom: "auto",
14937        right: "auto"
14938      });
14939      if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) {
14940        _util.css(_pin, {
14941          boxSizing: "border-box",
14942          mozBoxSizing: "border-box",
14943          webkitBoxSizing: "border-box"
14944        });
14945      }
14946
14947      // add listener to document to update pin position in case controller is not the document.
14948      window.addEventListener('scroll', updatePinInContainer);
14949      window.addEventListener('resize', updatePinInContainer);
14950      window.addEventListener('resize', updateRelativePinSpacer);
14951      // add mousewheel listener to catch scrolls over fixed elements
14952      _pin.addEventListener("mousewheel", onMousewheelOverPin);
14953      _pin.addEventListener("DOMMouseScroll", onMousewheelOverPin);
14954      log(3, "added pin");
14955
14956      // finally update the pin to init
14957      updatePinState();
14958      return Scene;
14959    };
14960
14961    /**
14962     * Remove the pin from the scene.
14963     * @method ScrollMagic.Scene#removePin
14964     * @example
14965     * // remove the pin from the scene without resetting it (the spacer is not removed)
14966     * scene.removePin();
14967     *
14968     * // remove the pin from the scene and reset the pin element to its initial position (spacer is removed)
14969     * scene.removePin(true);
14970     *
14971     * @param {boolean} [reset=false] - If `false` the spacer will not be removed and the element's position will not be reset.
14972     * @returns {Scene} Parent object for chaining.
14973     */
14974    this.removePin = function (reset) {
14975      if (_pin) {
14976        if (_state === SCENE_STATE_DURING) {
14977          updatePinState(true); // force unpin at position
14978        }
14979
14980        if (reset || !_controller) {
14981          // if there's no controller no progress was made anyway...
14982          var pinTarget = _pinOptions.spacer.firstChild; // usually the pin element, but may be another spacer (cascaded pins)...
14983          if (pinTarget.hasAttribute(PIN_SPACER_ATTRIBUTE)) {
14984            // copy margins to child spacer
14985            var style = _pinOptions.spacer.style,
14986              values = ["margin", "marginLeft", "marginRight", "marginTop", "marginBottom"],
14987              margins = {};
14988            values.forEach(function (val) {
14989              margins[val] = style[val] || "";
14990            });
14991            _util.css(pinTarget, margins);
14992          }
14993          _pinOptions.spacer.parentNode.insertBefore(pinTarget, _pinOptions.spacer);
14994          _pinOptions.spacer.parentNode.removeChild(_pinOptions.spacer);
14995          if (!_pin.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) {
14996            // if it's the last pin for this element -> restore inline styles
14997            // TODO: only correctly set for first pin (when cascading) - how to fix?
14998            _util.css(_pin, _pin.___origStyle);
14999            delete _pin.___origStyle;
15000          }
15001        }
15002        window.removeEventListener('scroll', updatePinInContainer);
15003        window.removeEventListener('resize', updatePinInContainer);
15004        window.removeEventListener('resize', updateRelativePinSpacer);
15005        _pin.removeEventListener("mousewheel", onMousewheelOverPin);
15006        _pin.removeEventListener("DOMMouseScroll", onMousewheelOverPin);
15007        _pin = undefined;
15008        log(3, "removed pin (reset: " + (reset ? "true" : "false") + ")");
15009      }
15010      return Scene;
15011    };
15012    var _cssClasses,
15013      _cssClassElems = [];
15014    Scene.on("destroy.internal", function (e) {
15015      Scene.removeClassToggle(e.reset);
15016    });
15017    /**
15018     * Define a css class modification while the scene is active.  
15019     * When the scene triggers the classes will be added to the supplied element and removed, when the scene is over.
15020     * If the scene duration is 0 the classes will only be removed if the user scrolls back past the start position.
15021     * @method ScrollMagic.Scene#setClassToggle
15022     * @example
15023     * // add the class 'myclass' to the element with the id 'my-elem' for the duration of the scene
15024     * scene.setClassToggle("#my-elem", "myclass");
15025     *
15026     * // add multiple classes to multiple elements defined by the selector '.classChange'
15027     * scene.setClassToggle(".classChange", "class1 class2 class3");
15028     *
15029     * @param {(string|object)} element - A Selector targeting one or more elements or a DOM object that is supposed to be modified.
15030     * @param {string} classes - One or more Classnames (separated by space) that should be added to the element during the scene.
15031     *
15032     * @returns {Scene} Parent object for chaining.
15033     */
15034    this.setClassToggle = function (element, classes) {
15035      var elems = _util.get.elements(element);
15036      if (elems.length === 0 || !_util.type.String(classes)) {
15037        log(1, "ERROR calling method 'setClassToggle()': Invalid " + (elems.length === 0 ? "element" : "classes") + " supplied.");
15038        return Scene;
15039      }
15040      if (_cssClassElems.length > 0) {
15041        // remove old ones
15042        Scene.removeClassToggle();
15043      }
15044      _cssClasses = classes;
15045      _cssClassElems = elems;
15046      Scene.on("enter.internal_class leave.internal_class", function (e) {
15047        var toggle = e.type === "enter" ? _util.addClass : _util.removeClass;
15048        _cssClassElems.forEach(function (elem, key) {
15049          toggle(elem, _cssClasses);
15050        });
15051      });
15052      return Scene;
15053    };
15054
15055    /**
15056     * Remove the class binding from the scene.
15057     * @method ScrollMagic.Scene#removeClassToggle
15058     * @example
15059     * // remove class binding from the scene without reset
15060     * scene.removeClassToggle();
15061     *
15062     * // remove class binding and remove the changes it caused
15063     * scene.removeClassToggle(true);
15064     *
15065     * @param {boolean} [reset=false] - If `false` and the classes are currently active, they will remain on the element. If `true` they will be removed.
15066     * @returns {Scene} Parent object for chaining.
15067     */
15068    this.removeClassToggle = function (reset) {
15069      if (reset) {
15070        _cssClassElems.forEach(function (elem, key) {
15071          _util.removeClass(elem, _cssClasses);
15072        });
15073      }
15074      Scene.off("start.internal_class end.internal_class");
15075      _cssClasses = undefined;
15076      _cssClassElems = [];
15077      return Scene;
15078    };
15079
15080    // INIT
15081    construct();
15082    return Scene;
15083  };
15084
15085  // store pagewide scene options
15086  var SCENE_OPTIONS = {
15087    defaults: {
15088      duration: 0,
15089      offset: 0,
15090      triggerElement: undefined,
15091      triggerHook: 0.5,
15092      reverse: true,
15093      loglevel: 2
15094    },
15095    validate: {
15096      offset: function offset(val) {
15097        val = parseFloat(val);
15098        if (!_util.type.Number(val)) {
15099          throw ["Invalid value for option \"offset\":", val];
15100        }
15101        return val;
15102      },
15103      triggerElement: function triggerElement(val) {
15104        val = val || undefined;
15105        if (val) {
15106          var elem = _util.get.elements(val)[0];
15107          if (elem && elem.parentNode) {
15108            val = elem;
15109          } else {
15110            throw ["Element defined in option \"triggerElement\" was not found:", val];
15111          }
15112        }
15113        return val;
15114      },
15115      triggerHook: function triggerHook(val) {
15116        var translate = {
15117          "onCenter": 0.5,
15118          "onEnter": 1,
15119          "onLeave": 0
15120        };
15121        if (_util.type.Number(val)) {
15122          val = Math.max(0, Math.min(parseFloat(val), 1)); //  make sure its betweeen 0 and 1
15123        } else if (val in translate) {
15124          val = translate[val];
15125        } else {
15126          throw ["Invalid value for option \"triggerHook\": ", val];
15127        }
15128        return val;
15129      },
15130      reverse: function reverse(val) {
15131        return !!val; // force boolean
15132      },
15133
15134      loglevel: function loglevel(val) {
15135        val = parseInt(val);
15136        if (!_util.type.Number(val) || val < 0 || val > 3) {
15137          throw ["Invalid value for option \"loglevel\":", val];
15138        }
15139        return val;
15140      }
15141    },
15142    // holder for  validation methods. duration validation is handled in 'getters-setters.js'
15143    shifts: ["duration", "offset", "triggerHook"] // list of options that trigger a `shift` event
15144  };
15145  /*
15146   * method used to add an option to ScrollMagic Scenes.
15147   * TODO: DOC (private for dev)
15148   */
15149  ScrollMagic.Scene.addOption = function (name, defaultValue, validationCallback, shifts) {
15150    if (!(name in SCENE_OPTIONS.defaults)) {
15151      SCENE_OPTIONS.defaults[name] = defaultValue;
15152      SCENE_OPTIONS.validate[name] = validationCallback;
15153      if (shifts) {
15154        SCENE_OPTIONS.shifts.push(name);
15155      }
15156    } else {
15157      ScrollMagic._util.log(1, "[static] ScrollMagic.Scene -> Cannot add Scene option '" + name + "', because it already exists.");
15158    }
15159  };
15160  // instance extension function for plugins
15161  // TODO: DOC (private for dev)
15162  ScrollMagic.Scene.extend = function (extension) {
15163    var oldClass = this;
15164    ScrollMagic.Scene = function () {
15165      oldClass.apply(this, arguments);
15166      this.$super = _util.extend({}, this); // copy parent state
15167      return extension.apply(this, arguments) || this;
15168    };
15169    _util.extend(ScrollMagic.Scene, oldClass); // copy properties
15170    ScrollMagic.Scene.prototype = oldClass.prototype; // copy prototype
15171    ScrollMagic.Scene.prototype.constructor = ScrollMagic.Scene; // restore constructor
15172  };
15173
15174  /**
15175   * TODO: DOCS (private for dev)
15176   * @class
15177   * @private
15178   */
15179
15180  ScrollMagic.Event = function (type, namespace, target, vars) {
15181    vars = vars || {};
15182    for (var key in vars) {
15183      this[key] = vars[key];
15184    }
15185    this.type = type;
15186    this.target = this.currentTarget = target;
15187    this.namespace = namespace || '';
15188    this.timeStamp = this.timestamp = Date.now();
15189    return this;
15190  };
15191
15192  /*
15193   * TODO: DOCS (private for dev)
15194   */
15195
15196  var _util = ScrollMagic._util = function (window) {
15197    var U = {},
15198      i;
15199
15200    /**
15201     * ------------------------------
15202     * internal helpers
15203     * ------------------------------
15204     */
15205
15206    // parse float and fall back to 0.
15207    var floatval = function floatval(number) {
15208      return parseFloat(number) || 0;
15209    };
15210    // get current style IE safe (otherwise IE would return calculated values for 'auto')
15211    var _getComputedStyle = function _getComputedStyle(elem) {
15212      return elem.currentStyle ? elem.currentStyle : window.getComputedStyle(elem);
15213    };
15214
15215    // get element dimension (width or height)
15216    var _dimension = function _dimension(which, elem, outer, includeMargin) {
15217      elem = elem === document ? window : elem;
15218      if (elem === window) {
15219        includeMargin = false;
15220      } else if (!_type.DomElement(elem)) {
15221        return 0;
15222      }
15223      which = which.charAt(0).toUpperCase() + which.substr(1).toLowerCase();
15224      var dimension = (outer ? elem['offset' + which] || elem['outer' + which] : elem['client' + which] || elem['inner' + which]) || 0;
15225      if (outer && includeMargin) {
15226        var style = _getComputedStyle(elem);
15227        dimension += which === 'Height' ? floatval(style.marginTop) + floatval(style.marginBottom) : floatval(style.marginLeft) + floatval(style.marginRight);
15228      }
15229      return dimension;
15230    };
15231    // converts 'margin-top' into 'marginTop'
15232    var _camelCase = function _camelCase(str) {
15233      return str.replace(/^[^a-z]+([a-z])/g, '$1').replace(/-([a-z])/g, function (g) {
15234        return g[1].toUpperCase();
15235      });
15236    };
15237
15238    /**
15239     * ------------------------------
15240     * external helpers
15241     * ------------------------------
15242     */
15243
15244    // extend obj – same as jQuery.extend({}, objA, objB)
15245    U.extend = function (obj) {
15246      obj = obj || {};
15247      for (i = 1; i < arguments.length; i++) {
15248        if (!arguments[i]) {
15249          continue;
15250        }
15251        for (var key in arguments[i]) {
15252          if (arguments[i].hasOwnProperty(key)) {
15253            obj[key] = arguments[i][key];
15254          }
15255        }
15256      }
15257      return obj;
15258    };
15259
15260    // check if a css display type results in margin-collapse or not
15261    U.isMarginCollapseType = function (str) {
15262      return ["block", "flex", "list-item", "table", "-webkit-box"].indexOf(str) > -1;
15263    };
15264
15265    // implementation of requestAnimationFrame
15266    // based on https://gist.github.com/paulirish/1579671
15267    var lastTime = 0,
15268      vendors = ['ms', 'moz', 'webkit', 'o'];
15269    var _requestAnimationFrame = window.requestAnimationFrame;
15270    var _cancelAnimationFrame = window.cancelAnimationFrame;
15271    // try vendor prefixes if the above doesn't work
15272    for (i = 0; !_requestAnimationFrame && i < vendors.length; ++i) {
15273      _requestAnimationFrame = window[vendors[i] + 'RequestAnimationFrame'];
15274      _cancelAnimationFrame = window[vendors[i] + 'CancelAnimationFrame'] || window[vendors[i] + 'CancelRequestAnimationFrame'];
15275    }
15276
15277    // fallbacks
15278    if (!_requestAnimationFrame) {
15279      _requestAnimationFrame = function _requestAnimationFrame(callback) {
15280        var currTime = new Date().getTime(),
15281          timeToCall = Math.max(0, 16 - (currTime - lastTime)),
15282          id = window.setTimeout(function () {
15283            callback(currTime + timeToCall);
15284          }, timeToCall);
15285        lastTime = currTime + timeToCall;
15286        return id;
15287      };
15288    }
15289    if (!_cancelAnimationFrame) {
15290      _cancelAnimationFrame = function _cancelAnimationFrame(id) {
15291        window.clearTimeout(id);
15292      };
15293    }
15294    U.rAF = _requestAnimationFrame.bind(window);
15295    U.cAF = _cancelAnimationFrame.bind(window);
15296    var loglevels = ["error", "warn", "log"],
15297      console = window.console || {};
15298    console.log = console.log || function () {}; // no console log, well - do nothing then...
15299    // make sure methods for all levels exist.
15300    for (i = 0; i < loglevels.length; i++) {
15301      var method = loglevels[i];
15302      if (!console[method]) {
15303        console[method] = console.log; // prefer .log over nothing
15304      }
15305    }
15306
15307    U.log = function (loglevel) {
15308      if (loglevel > loglevels.length || loglevel <= 0) loglevel = loglevels.length;
15309      var now = new Date(),
15310        time = ("0" + now.getHours()).slice(-2) + ":" + ("0" + now.getMinutes()).slice(-2) + ":" + ("0" + now.getSeconds()).slice(-2) + ":" + ("00" + now.getMilliseconds()).slice(-3),
15311        method = loglevels[loglevel - 1],
15312        args = Array.prototype.splice.call(arguments, 1),
15313        func = Function.prototype.bind.call(console[method], console);
15314      args.unshift(time);
15315      func.apply(console, args);
15316    };
15317
15318    /**
15319     * ------------------------------
15320     * type testing
15321     * ------------------------------
15322     */
15323
15324    var _type = U.type = function (v) {
15325      return Object.prototype.toString.call(v).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
15326    };
15327    _type.String = function (v) {
15328      return _type(v) === 'string';
15329    };
15330    _type.Function = function (v) {
15331      return _type(v) === 'function';
15332    };
15333    _type.Array = function (v) {
15334      return Array.isArray(v);
15335    };
15336    _type.Number = function (v) {
15337      return !_type.Array(v) && v - parseFloat(v) + 1 >= 0;
15338    };
15339    _type.DomElement = function (o) {
15340      return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === "object" || typeof HTMLElement === "function" ? o instanceof HTMLElement || o instanceof SVGElement :
15341      //DOM2
15342      o && _typeof(o) === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string";
15343    };
15344
15345    /**
15346     * ------------------------------
15347     * DOM Element info
15348     * ------------------------------
15349     */
15350    // always returns a list of matching DOM elements, from a selector, a DOM element or an list of elements or even an array of selectors
15351    var _get = U.get = {};
15352    _get.elements = function (selector) {
15353      var arr = [];
15354      if (_type.String(selector)) {
15355        try {
15356          selector = document.querySelectorAll(selector);
15357        } catch (e) {
15358          // invalid selector
15359          return arr;
15360        }
15361      }
15362      if (_type(selector) === 'nodelist' || _type.Array(selector) || selector instanceof NodeList) {
15363        for (var i = 0, ref = arr.length = selector.length; i < ref; i++) {
15364          // list of elements
15365          var elem = selector[i];
15366          arr[i] = _type.DomElement(elem) ? elem : _get.elements(elem); // if not an element, try to resolve recursively
15367        }
15368      } else if (_type.DomElement(selector) || selector === document || selector === window) {
15369        arr = [selector]; // only the element
15370      }
15371
15372      return arr;
15373    };
15374    // get scroll top value
15375    _get.scrollTop = function (elem) {
15376      return elem && typeof elem.scrollTop === 'number' ? elem.scrollTop : window.pageYOffset || 0;
15377    };
15378    // get scroll left value
15379    _get.scrollLeft = function (elem) {
15380      return elem && typeof elem.scrollLeft === 'number' ? elem.scrollLeft : window.pageXOffset || 0;
15381    };
15382    // get element height
15383    _get.width = function (elem, outer, includeMargin) {
15384      return _dimension('width', elem, outer, includeMargin);
15385    };
15386    // get element width
15387    _get.height = function (elem, outer, includeMargin) {
15388      return _dimension('height', elem, outer, includeMargin);
15389    };
15390
15391    // get element position (optionally relative to viewport)
15392    _get.offset = function (elem, relativeToViewport) {
15393      var offset = {
15394        top: 0,
15395        left: 0
15396      };
15397      if (elem && elem.getBoundingClientRect) {
15398        // check if available
15399        var rect = elem.getBoundingClientRect();
15400        offset.top = rect.top;
15401        offset.left = rect.left;
15402        if (!relativeToViewport) {
15403          // clientRect is by default relative to viewport...
15404          offset.top += _get.scrollTop();
15405          offset.left += _get.scrollLeft();
15406        }
15407      }
15408      return offset;
15409    };
15410
15411    /**
15412     * ------------------------------
15413     * DOM Element manipulation
15414     * ------------------------------
15415     */
15416
15417    U.addClass = function (elem, classname) {
15418      if (classname) {
15419        if (elem.classList) elem.classList.add(classname);else elem.className += ' ' + classname;
15420      }
15421    };
15422    U.removeClass = function (elem, classname) {
15423      if (classname) {
15424        if (elem.classList) elem.classList.remove(classname);else elem.className = elem.className.replace(new RegExp('(^|\\b)' + classname.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
15425      }
15426    };
15427    // if options is string -> returns css value
15428    // if options is array -> returns object with css value pairs
15429    // if options is object -> set new css values
15430    U.css = function (elem, options) {
15431      if (_type.String(options)) {
15432        return _getComputedStyle(elem)[_camelCase(options)];
15433      } else if (_type.Array(options)) {
15434        var obj = {},
15435          style = _getComputedStyle(elem);
15436        options.forEach(function (option, key) {
15437          obj[option] = style[_camelCase(option)];
15438        });
15439        return obj;
15440      } else {
15441        for (var option in options) {
15442          var val = options[option];
15443          if (val == parseFloat(val)) {
15444            // assume pixel for seemingly numerical values
15445            val += 'px';
15446          }
15447          elem.style[_camelCase(option)] = val;
15448        }
15449      }
15450    };
15451    return U;
15452  }(window || {});
15453  ScrollMagic.Scene.prototype.addIndicators = function () {
15454    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js');
15455    return this;
15456  };
15457  ScrollMagic.Scene.prototype.removeIndicators = function () {
15458    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js');
15459    return this;
15460  };
15461  ScrollMagic.Scene.prototype.setTween = function () {
15462    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js');
15463    return this;
15464  };
15465  ScrollMagic.Scene.prototype.removeTween = function () {
15466    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js');
15467    return this;
15468  };
15469  ScrollMagic.Scene.prototype.setVelocity = function () {
15470    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js');
15471    return this;
15472  };
15473  ScrollMagic.Scene.prototype.removeVelocity = function () {
15474    ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js');
15475    return this;
15476  };
15477  return ScrollMagic;
15478});
15479
15480/***/ }),
15481
vendor: 10,000 bytes, lines 15482-15674
15482/***/ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js":
15483/*!************************************************************************!*\
15484  !*** ./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js ***!
15485  \************************************************************************/
15486/***/ (function(module, exports, __webpack_require__) {
15487
15488var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15489/*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */
15490window.Element && !Element.prototype.closest && (Element.prototype.closest = function (e) {
15491  var t,
15492    n = (this.document || this.ownerDocument).querySelectorAll(e),
15493    o = this;
15494  do {
15495    for (t = n.length; 0 <= --t && n.item(t) !== o;);
15496  } while (t < 0 && (o = o.parentElement));
15497  return o;
15498}), function () {
15499  if ("function" == typeof window.CustomEvent) return;
15500  function e(e, t) {
15501    t = t || {
15502      bubbles: !1,
15503      cancelable: !1,
15504      detail: void 0
15505    };
15506    var n = document.createEvent("CustomEvent");
15507    return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), n;
15508  }
15509  e.prototype = window.Event.prototype, window.CustomEvent = e;
15510}(), function () {
15511  for (var r = 0, e = ["ms", "moz", "webkit", "o"], t = 0; t < e.length && !window.requestAnimationFrame; ++t) window.requestAnimationFrame = window[e[t] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[e[t] + "CancelAnimationFrame"] || window[e[t] + "CancelRequestAnimationFrame"];
15512  window.requestAnimationFrame || (window.requestAnimationFrame = function (e, t) {
15513    var n = new Date().getTime(),
15514      o = Math.max(0, 16 - (n - r)),
15515      a = window.setTimeout(function () {
15516        e(n + o);
15517      }, o);
15518    return r = n + o, a;
15519  }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (e) {
15520    clearTimeout(e);
15521  });
15522}(), function (e, t) {
15523   true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
15524    return t(e);
15525  }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
15526		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : 0;
15527}("undefined" != typeof __webpack_require__.g ? __webpack_require__.g : "undefined" != typeof window ? window : this, function (M) {
15528  "use strict";
15529
15530  var q = {
15531      ignore: "[data-scroll-ignore]",
15532      header: null,
15533      topOnEmptyHash: !0,
15534      speed: 500,
15535      speedAsDuration: !1,
15536      durationMax: null,
15537      durationMin: null,
15538      clip: !0,
15539      offset: 0,
15540      easing: "easeInOutCubic",
15541      customEasing: null,
15542      updateURL: !0,
15543      popstate: !0,
15544      emitEvents: !0
15545    },
15546    I = function I() {
15547      var n = {};
15548      return Array.prototype.forEach.call(arguments, function (e) {
15549        for (var t in e) {
15550          if (!e.hasOwnProperty(t)) return;
15551          n[t] = e[t];
15552        }
15553      }), n;
15554    },
15555    r = function r(e) {
15556      "#" === e.charAt(0) && (e = e.substr(1));
15557      for (var t, n = String(e), o = n.length, a = -1, r = "", i = n.charCodeAt(0); ++a < o;) {
15558        if (0 === (t = n.charCodeAt(a))) throw new InvalidCharacterError("Invalid character: the input contains U+0000.");
15559        1 <= t && t <= 31 || 127 == t || 0 === a && 48 <= t && t <= 57 || 1 === a && 48 <= t && t <= 57 && 45 === i ? r += "\\" + t.toString(16) + " " : r += 128 <= t || 45 === t || 95 === t || 48 <= t && t <= 57 || 65 <= t && t <= 90 || 97 <= t && t <= 122 ? n.charAt(a) : "\\" + n.charAt(a);
15560      }
15561      return "#" + r;
15562    },
15563    F = function F() {
15564      return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
15565    },
15566    L = function L(e) {
15567      return e ? (t = e, parseInt(M.getComputedStyle(t).height, 10) + e.offsetTop) : 0;
15568      var t;
15569    },
15570    x = function x(e, t, n) {
15571      0 === e && document.body.focus(), n || (e.focus(), document.activeElement !== e && (e.setAttribute("tabindex", "-1"), e.focus(), e.style.outline = "none"), M.scrollTo(0, t));
15572    },
15573    H = function H(e, t, n, o) {
15574      if (t.emitEvents && "function" == typeof M.CustomEvent) {
15575        var a = new CustomEvent(e, {
15576          bubbles: !0,
15577          detail: {
15578            anchor: n,
15579            toggle: o
15580          }
15581        });
15582        document.dispatchEvent(a);
15583      }
15584    };
15585  return function (o, e) {
15586    var b,
15587      a,
15588      A,
15589      O,
15590      C = {};
15591    C.cancelScroll = function (e) {
15592      cancelAnimationFrame(O), O = null, e || H("scrollCancel", b);
15593    }, C.animateScroll = function (a, r, e) {
15594      C.cancelScroll();
15595      var i = I(b || q, e || {}),
15596        c = "[object Number]" === Object.prototype.toString.call(a),
15597        t = c || !a.tagName ? null : a;
15598      if (c || t) {
15599        var s = M.pageYOffset;
15600        i.header && !A && (A = document.querySelector(i.header));
15601        var n,
15602          o,
15603          u,
15604          l,
15605          m,
15606          d,
15607          f,
15608          h,
15609          p = L(A),
15610          g = c ? a : function (e, t, n, o) {
15611            var a = 0;
15612            if (e.offsetParent) for (; a += e.offsetTop, e = e.offsetParent;);
15613            return a = Math.max(a - t - n, 0), o && (a = Math.min(a, F() - M.innerHeight)), a;
15614          }(t, p, parseInt("function" == typeof i.offset ? i.offset(a, r) : i.offset, 10), i.clip),
15615          y = g - s,
15616          v = F(),
15617          w = 0,
15618          S = (n = y, u = (o = i).speedAsDuration ? o.speed : Math.abs(n / 1e3 * o.speed), o.durationMax && u > o.durationMax ? o.durationMax : o.durationMin && u < o.durationMin ? o.durationMin : parseInt(u, 10)),
15619          E = function E(e) {
15620            var t, n, o;
15621            l || (l = e), w += e - l, d = s + y * (n = m = 1 < (m = 0 === S ? 0 : w / S) ? 1 : m, "easeInQuad" === (t = i).easing && (o = n * n), "easeOutQuad" === t.easing && (o = n * (2 - n)), "easeInOutQuad" === t.easing && (o = n < .5 ? 2 * n * n : (4 - 2 * n) * n - 1), "easeInCubic" === t.easing && (o = n * n * n), "easeOutCubic" === t.easing && (o = --n * n * n + 1), "easeInOutCubic" === t.easing && (o = n < .5 ? 4 * n * n * n : (n - 1) * (2 * n - 2) * (2 * n - 2) + 1), "easeInQuart" === t.easing && (o = n * n * n * n), "easeOutQuart" === t.easing && (o = 1 - --n * n * n * n), "easeInOutQuart" === t.easing && (o = n < .5 ? 8 * n * n * n * n : 1 - 8 * --n * n * n * n), "easeInQuint" === t.easing && (o = n * n * n * n * n), "easeOutQuint" === t.easing && (o = 1 + --n * n * n * n * n), "easeInOutQuint" === t.easing && (o = n < .5 ? 16 * n * n * n * n * n : 1 + 16 * --n * n * n * n * n), t.customEasing && (o = t.customEasing(n)), o || n), M.scrollTo(0, Math.floor(d)), function (e, t) {
15622              var n = M.pageYOffset;
15623              if (e == t || n == t || (s < t && M.innerHeight + n) >= v) return C.cancelScroll(!0), x(a, t, c), H("scrollStop", i, a, r), !(O = l = null);
15624            }(d, g) || (O = M.requestAnimationFrame(E), l = e);
15625          };
15626        0 === M.pageYOffset && M.scrollTo(0, 0), f = a, h = i, c || history.pushState && h.updateURL && history.pushState({
15627          smoothScroll: JSON.stringify(h),
15628          anchor: f.id
15629        }, document.title, f === document.documentElement ? "#top" : "#" + f.id), "matchMedia" in M && M.matchMedia("(prefers-reduced-motion)").matches ? x(a, Math.floor(g), !1) : (H("scrollStart", i, a, r), C.cancelScroll(!0), M.requestAnimationFrame(E));
15630      }
15631    };
15632    var t = function t(e) {
15633        if (!e.defaultPrevented && !(0 !== e.button || e.metaKey || e.ctrlKey || e.shiftKey) && "closest" in e.target && (a = e.target.closest(o)) && "a" === a.tagName.toLowerCase() && !e.target.closest(b.ignore) && a.hostname === M.location.hostname && a.pathname === M.location.pathname && /#/.test(a.href)) {
15634          var t, n;
15635          try {
15636            t = r(decodeURIComponent(a.hash));
15637          } catch (e) {
15638            t = r(a.hash);
15639          }
15640          if ("#" === t) {
15641            if (!b.topOnEmptyHash) return;
15642            n = document.documentElement;
15643          } else n = document.querySelector(t);
15644          (n = n || "#top" !== t ? n : document.documentElement) && (e.preventDefault(), function (e) {
15645            if (history.replaceState && e.updateURL && !history.state) {
15646              var t = M.location.hash;
15647              t = t || "", history.replaceState({
15648                smoothScroll: JSON.stringify(e),
15649                anchor: t || M.pageYOffset
15650              }, document.title, t || M.location.href);
15651            }
15652          }(b), C.animateScroll(n, a));
15653        }
15654      },
15655      n = function n(e) {
15656        if (null !== history.state && history.state.smoothScroll && history.state.smoothScroll === JSON.stringify(b)) {
15657          var t = history.state.anchor;
15658          "string" == typeof t && t && !(t = document.querySelector(r(history.state.anchor))) || C.animateScroll(t, null, {
15659            updateURL: !1
15660          });
15661        }
15662      };
15663    C.destroy = function () {
15664      b && (document.removeEventListener("click", t, !1), M.removeEventListener("popstate", n, !1), C.cancelScroll(), O = A = a = b = null);
15665    };
15666    return function () {
15667      if (!("querySelector" in document && "addEventListener" in M && "requestAnimationFrame" in M && "closest" in M.Element.prototype)) throw "Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";
15668      C.destroy(), b = I(q, e || {}), A = b.header ? document.querySelector(b.header) : null, document.addEventListener("click", t, !1), b.updateURL && b.popstate && M.addEventListener("popstate", n, !1);
15669    }(), C;
15670  };
15671});
15672
15673/***/ }),
15674
vendor: 12,167 bytes, lines 15675-16024
15675/***/ "./node_modules/smoothscroll-polyfill/dist/smoothscroll.js":
15676/*!*****************************************************************!*\
15677  !*** ./node_modules/smoothscroll-polyfill/dist/smoothscroll.js ***!
15678  \*****************************************************************/
15679/***/ (function(module, exports) {
15680
15681function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15682/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */
15683(function () {
15684  'use strict';
15685
15686  // polyfill
15687  function polyfill() {
15688    // aliases
15689    var w = window;
15690    var d = document;
15691
15692    // return if scroll behavior is supported and polyfill is not forced
15693    if ('scrollBehavior' in d.documentElement.style && w.__forceSmoothScrollPolyfill__ !== true) {
15694      return;
15695    }
15696
15697    // globals
15698    var Element = w.HTMLElement || w.Element;
15699    var SCROLL_TIME = 468;
15700
15701    // object gathering original scroll methods
15702    var original = {
15703      scroll: w.scroll || w.scrollTo,
15704      scrollBy: w.scrollBy,
15705      elementScroll: Element.prototype.scroll || scrollElement,
15706      scrollIntoView: Element.prototype.scrollIntoView
15707    };
15708
15709    // define timing method
15710    var now = w.performance && w.performance.now ? w.performance.now.bind(w.performance) : Date.now;
15711
15712    /**
15713     * indicates if a the current browser is made by Microsoft
15714     * @method isMicrosoftBrowser
15715     * @param {String} userAgent
15716     * @returns {Boolean}
15717     */
15718    function isMicrosoftBrowser(userAgent) {
15719      var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];
15720      return new RegExp(userAgentPatterns.join('|')).test(userAgent);
15721    }
15722
15723    /*
15724     * IE has rounding bug rounding down clientHeight and clientWidth and
15725     * rounding up scrollHeight and scrollWidth causing false positives
15726     * on hasScrollableSpace
15727     */
15728    var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;
15729
15730    /**
15731     * changes scroll position inside an element
15732     * @method scrollElement
15733     * @param {Number} x
15734     * @param {Number} y
15735     * @returns {undefined}
15736     */
15737    function scrollElement(x, y) {
15738      this.scrollLeft = x;
15739      this.scrollTop = y;
15740    }
15741
15742    /**
15743     * returns result of applying ease math function to a number
15744     * @method ease
15745     * @param {Number} k
15746     * @returns {Number}
15747     */
15748    function ease(k) {
15749      return 0.5 * (1 - Math.cos(Math.PI * k));
15750    }
15751
15752    /**
15753     * indicates if a smooth behavior should be applied
15754     * @method shouldBailOut
15755     * @param {Number|Object} firstArg
15756     * @returns {Boolean}
15757     */
15758    function shouldBailOut(firstArg) {
15759      if (firstArg === null || _typeof(firstArg) !== 'object' || firstArg.behavior === undefined || firstArg.behavior === 'auto' || firstArg.behavior === 'instant') {
15760        // first argument is not an object/null
15761        // or behavior is auto, instant or undefined
15762        return true;
15763      }
15764      if (_typeof(firstArg) === 'object' && firstArg.behavior === 'smooth') {
15765        // first argument is an object and behavior is smooth
15766        return false;
15767      }
15768
15769      // throw error when behavior is not supported
15770      throw new TypeError('behavior member of ScrollOptions ' + firstArg.behavior + ' is not a valid value for enumeration ScrollBehavior.');
15771    }
15772
15773    /**
15774     * indicates if an element has scrollable space in the provided axis
15775     * @method hasScrollableSpace
15776     * @param {Node} el
15777     * @param {String} axis
15778     * @returns {Boolean}
15779     */
15780    function hasScrollableSpace(el, axis) {
15781      if (axis === 'Y') {
15782        return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;
15783      }
15784      if (axis === 'X') {
15785        return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;
15786      }
15787    }
15788
15789    /**
15790     * indicates if an element has a scrollable overflow property in the axis
15791     * @method canOverflow
15792     * @param {Node} el
15793     * @param {String} axis
15794     * @returns {Boolean}
15795     */
15796    function canOverflow(el, axis) {
15797      var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];
15798      return overflowValue === 'auto' || overflowValue === 'scroll';
15799    }
15800
15801    /**
15802     * indicates if an element can be scrolled in either axis
15803     * @method isScrollable
15804     * @param {Node} el
15805     * @param {String} axis
15806     * @returns {Boolean}
15807     */
15808    function isScrollable(el) {
15809      var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');
15810      var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');
15811      return isScrollableY || isScrollableX;
15812    }
15813
15814    /**
15815     * finds scrollable parent of an element
15816     * @method findScrollableParent
15817     * @param {Node} el
15818     * @returns {Node} el
15819     */
15820    function findScrollableParent(el) {
15821      while (el !== d.body && isScrollable(el) === false) {
15822        el = el.parentNode || el.host;
15823      }
15824      return el;
15825    }
15826
15827    /**
15828     * self invoked function that, given a context, steps through scrolling
15829     * @method step
15830     * @param {Object} context
15831     * @returns {undefined}
15832     */
15833    function step(context) {
15834      var time = now();
15835      var value;
15836      var currentX;
15837      var currentY;
15838      var elapsed = (time - context.startTime) / SCROLL_TIME;
15839
15840      // avoid elapsed times higher than one
15841      elapsed = elapsed > 1 ? 1 : elapsed;
15842
15843      // apply easing to elapsed time
15844      value = ease(elapsed);
15845      currentX = context.startX + (context.x - context.startX) * value;
15846      currentY = context.startY + (context.y - context.startY) * value;
15847      context.method.call(context.scrollable, currentX, currentY);
15848
15849      // scroll more if we have not reached our destination
15850      if (currentX !== context.x || currentY !== context.y) {
15851        w.requestAnimationFrame(step.bind(w, context));
15852      }
15853    }
15854
15855    /**
15856     * scrolls window or element with a smooth behavior
15857     * @method smoothScroll
15858     * @param {Object|Node} el
15859     * @param {Number} x
15860     * @param {Number} y
15861     * @returns {undefined}
15862     */
15863    function smoothScroll(el, x, y) {
15864      var scrollable;
15865      var startX;
15866      var startY;
15867      var method;
15868      var startTime = now();
15869
15870      // define scroll context
15871      if (el === d.body) {
15872        scrollable = w;
15873        startX = w.scrollX || w.pageXOffset;
15874        startY = w.scrollY || w.pageYOffset;
15875        method = original.scroll;
15876      } else {
15877        scrollable = el;
15878        startX = el.scrollLeft;
15879        startY = el.scrollTop;
15880        method = scrollElement;
15881      }
15882
15883      // scroll looping over a frame
15884      step({
15885        scrollable: scrollable,
15886        method: method,
15887        startTime: startTime,
15888        startX: startX,
15889        startY: startY,
15890        x: x,
15891        y: y
15892      });
15893    }
15894
15895    // ORIGINAL METHODS OVERRIDES
15896    // w.scroll and w.scrollTo
15897    w.scroll = w.scrollTo = function () {
15898      // avoid action when no arguments are passed
15899      if (arguments[0] === undefined) {
15900        return;
15901      }
15902
15903      // avoid smooth behavior if not required
15904      if (shouldBailOut(arguments[0]) === true) {
15905        original.scroll.call(w, arguments[0].left !== undefined ? arguments[0].left : _typeof(arguments[0]) !== 'object' ? arguments[0] : w.scrollX || w.pageXOffset,
15906        // use top prop, second argument if present or fallback to scrollY
15907        arguments[0].top !== undefined ? arguments[0].top : arguments[1] !== undefined ? arguments[1] : w.scrollY || w.pageYOffset);
15908        return;
15909      }
15910
15911      // LET THE SMOOTHNESS BEGIN!
15912      smoothScroll.call(w, d.body, arguments[0].left !== undefined ? ~~arguments[0].left : w.scrollX || w.pageXOffset, arguments[0].top !== undefined ? ~~arguments[0].top : w.scrollY || w.pageYOffset);
15913    };
15914
15915    // w.scrollBy
15916    w.scrollBy = function () {
15917      // avoid action when no arguments are passed
15918      if (arguments[0] === undefined) {
15919        return;
15920      }
15921
15922      // avoid smooth behavior if not required
15923      if (shouldBailOut(arguments[0])) {
15924        original.scrollBy.call(w, arguments[0].left !== undefined ? arguments[0].left : _typeof(arguments[0]) !== 'object' ? arguments[0] : 0, arguments[0].top !== undefined ? arguments[0].top : arguments[1] !== undefined ? arguments[1] : 0);
15925        return;
15926      }
15927
15928      // LET THE SMOOTHNESS BEGIN!
15929      smoothScroll.call(w, d.body, ~~arguments[0].left + (w.scrollX || w.pageXOffset), ~~arguments[0].top + (w.scrollY || w.pageYOffset));
15930    };
15931
15932    // Element.prototype.scroll and Element.prototype.scrollTo
15933    Element.prototype.scroll = Element.prototype.scrollTo = function () {
15934      // avoid action when no arguments are passed
15935      if (arguments[0] === undefined) {
15936        return;
15937      }
15938
15939      // avoid smooth behavior if not required
15940      if (shouldBailOut(arguments[0]) === true) {
15941        // if one number is passed, throw error to match Firefox implementation
15942        if (typeof arguments[0] === 'number' && arguments[1] === undefined) {
15943          throw new SyntaxError('Value could not be converted');
15944        }
15945        original.elementScroll.call(this,
15946        // use left prop, first number argument or fallback to scrollLeft
15947        arguments[0].left !== undefined ? ~~arguments[0].left : _typeof(arguments[0]) !== 'object' ? ~~arguments[0] : this.scrollLeft,
15948        // use top prop, second argument or fallback to scrollTop
15949        arguments[0].top !== undefined ? ~~arguments[0].top : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop);
15950        return;
15951      }
15952      var left = arguments[0].left;
15953      var top = arguments[0].top;
15954
15955      // LET THE SMOOTHNESS BEGIN!
15956      smoothScroll.call(this, this, typeof left === 'undefined' ? this.scrollLeft : ~~left, typeof top === 'undefined' ? this.scrollTop : ~~top);
15957    };
15958
15959    // Element.prototype.scrollBy
15960    Element.prototype.scrollBy = function () {
15961      // avoid action when no arguments are passed
15962      if (arguments[0] === undefined) {
15963        return;
15964      }
15965
15966      // avoid smooth behavior if not required
15967      if (shouldBailOut(arguments[0]) === true) {
15968        original.elementScroll.call(this, arguments[0].left !== undefined ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft, arguments[0].top !== undefined ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop);
15969        return;
15970      }
15971      this.scroll({
15972        left: ~~arguments[0].left + this.scrollLeft,
15973        top: ~~arguments[0].top + this.scrollTop,
15974        behavior: arguments[0].behavior
15975      });
15976    };
15977
15978    // Element.prototype.scrollIntoView
15979    Element.prototype.scrollIntoView = function () {
15980      // avoid smooth behavior if not required
15981      if (shouldBailOut(arguments[0]) === true) {
15982        original.scrollIntoView.call(this, arguments[0] === undefined ? true : arguments[0]);
15983        return;
15984      }
15985
15986      // LET THE SMOOTHNESS BEGIN!
15987      var scrollableParent = findScrollableParent(this);
15988      var parentRects = scrollableParent.getBoundingClientRect();
15989      var clientRects = this.getBoundingClientRect();
15990      if (scrollableParent !== d.body) {
15991        // reveal element inside parent
15992        smoothScroll.call(this, scrollableParent, scrollableParent.scrollLeft + clientRects.left - parentRects.left, scrollableParent.scrollTop + clientRects.top - parentRects.top);
15993
15994        // reveal parent in viewport unless is fixed
15995        if (w.getComputedStyle(scrollableParent).position !== 'fixed') {
15996          w.scrollBy({
15997            left: parentRects.left,
15998            top: parentRects.top,
15999            behavior: 'smooth'
16000          });
16001        }
16002      } else {
16003        // reveal element in viewport
16004        w.scrollBy({
16005          left: clientRects.left,
16006          top: clientRects.top,
16007          behavior: 'smooth'
16008        });
16009      }
16010    };
16011  }
16012  if (( false ? 0 : _typeof(exports)) === 'object' && "object" !== 'undefined') {
16013    // commonjs
16014    module.exports = {
16015      polyfill: polyfill
16016    };
16017  } else {
16018    // global
16019    polyfill();
16020  }
16021})();
16022
16023/***/ }),
16024
16025/***/ "./src/js/modules/pagetop.js":
16026/*!***********************************!*\
16027  !*** ./src/js/modules/pagetop.js ***!
16028  \***********************************/
16029/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16030
16031"use strict";
16032__webpack_require__.r(__webpack_exports__);
16033/* harmony export */ __webpack_require__.d(__webpack_exports__, {
16034/* harmony export */   pagetop: function() { return /* binding */ pagetop; }
16035/* harmony export */ });
16036function pagetop() {
16037  var pagetop = document.querySelector('.js-pagetop');
16038  var reserve = document.querySelector('.js-reserve');
16039  var footer = document.querySelector('.js-footer');
16040  var padding = window.matchMedia("(max-width: 767px)").matches ? 20 : 40;
16041  pagetop.style.bottom = reserve.getBoundingClientRect().height + padding + "px";
16042  window.addEventListener('scroll', function () {
16043    if (footer.getBoundingClientRect().top <= window.innerHeight) {
16044      pagetop.style.position = "absolute";
16045      pagetop.style.bottom = reserve.getBoundingClientRect().height + footer.getBoundingClientRect().height + padding + "px";
16046    } else {
16047      pagetop.style.position = "fixed";
16048      pagetop.style.bottom = reserve.getBoundingClientRect().height + padding + "px";
16049    }
16050  });
16051}
16052
16053/***/ }),
16054
16055/***/ "./src/js/modules/scrollAction.js":
16056/*!****************************************!*\
16057  !*** ./src/js/modules/scrollAction.js ***!
16058  \****************************************/
16059/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16060
16061"use strict";
16062__webpack_require__.r(__webpack_exports__);
16063/* harmony export */ __webpack_require__.d(__webpack_exports__, {
16064/* harmony export */   scrollAction: function() { return /* binding */ scrollAction; }
16065/* harmony export */ });
16066/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
16067/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
16068
16069function scrollAction() {
16070  window.addEventListener('scroll', _.throttle(function (e) {
16071    // ここに処理
16072    var intro = document.querySelector('.js-intro');
16073    var reserve = document.querySelector('.js-reserve');
16074    var pagetop = document.querySelector('.js-pagetop');
16075    if (intro.classList.contains('is-animated')) {
16076      reserve.classList.add('is-view');
16077      pagetop.classList.add('is-view');
16078    } else {
16079      reserve.classList.remove('is-view');
16080      pagetop.classList.remove('is-view');
16081    }
16082    return false;
16083  }, 50, {
16084    trailing: true,
16085    leading: true
16086  }));
16087}
16088
16089/***/ }),
16090
16091/***/ "./src/js/modules/scrollmagic.js":
16092/*!***************************************!*\
16093  !*** ./src/js/modules/scrollmagic.js ***!
16094  \***************************************/
16095/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16096
16097"use strict";
16098__webpack_require__.r(__webpack_exports__);
16099/* harmony export */ __webpack_require__.d(__webpack_exports__, {
16100/* harmony export */   scrollmagic: function() { return /* binding */ scrollmagic; }
16101/* harmony export */ });
16102/* harmony import */ var scrollmagic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! scrollmagic */ "./node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js");
16103/* harmony import */ var scrollmagic__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(scrollmagic__WEBPACK_IMPORTED_MODULE_0__);
16104
16105function scrollmagic() {
16106  //Enter処理
16107  var controllerEnter = new (scrollmagic__WEBPACK_IMPORTED_MODULE_0___default().Controller)();
16108  var scrollEnter = document.querySelectorAll('.js-scrollAnimation');
16109  for (var i = 0; i < scrollEnter.length; i++) {
16110    var tag = scrollEnter[i];
16111    new (scrollmagic__WEBPACK_IMPORTED_MODULE_0___default().Scene)({
16112      triggerElement: tag,
16113      triggerHook: 'onEnter',
16114      offset: 100
16115    }).setClassToggle(tag, 'is-animated').addTo(controllerEnter);
16116  }
16117
16118  //Center処理
16119  // let controllerCenter = new ScrollMagic.Controller();
16120
16121  // let scrollCenter = document.querySelectorAll('.js-scrollAnimation02');
16122
16123  // for (let i = 0; i < scrollCenter.length; i++) {
16124  //   let tag = scrollCenter[i];
16125
16126  //   new ScrollMagic.Scene({
16127  //     triggerElement: tag,
16128  //     triggerHook: 'onCenter',
16129  //     offset: 0,
16130  //   })
16131  //     .setClassToggle(tag, 'is-animated')
16132  //     .addTo(controllerCenter);
16133  // }
16134
16135  //Leave処理
16136  var controllerLeave = new (scrollmagic__WEBPACK_IMPORTED_MODULE_0___default().Controller)();
16137  var scrollLeave = document.querySelectorAll('.js-scrollAnimation03');
16138  for (var _i = 0; _i < scrollLeave.length; _i++) {
16139    var _tag = scrollLeave[_i];
16140    new (scrollmagic__WEBPACK_IMPORTED_MODULE_0___default().Scene)({
16141      triggerElement: _tag,
16142      triggerHook: 'onLeave',
16143      offset: 0
16144    }).setClassToggle(_tag, 'is-animated').addTo(controllerLeave);
16145  }
16146}
16147
16148/***/ }),
16149
16150/***/ "./src/js/modules/smooth.js":
16151/*!**********************************!*\
16152  !*** ./src/js/modules/smooth.js ***!
16153  \**********************************/
16154/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16155
16156"use strict";
16157__webpack_require__.r(__webpack_exports__);
16158/* harmony export */ __webpack_require__.d(__webpack_exports__, {
16159/* harmony export */   smooth: function() { return /* binding */ smooth; }
16160/* harmony export */ });
16161/* harmony import */ var smoothscroll_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! smoothscroll-polyfill */ "./node_modules/smoothscroll-polyfill/dist/smoothscroll.js");
16162/* harmony import */ var smoothscroll_polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(smoothscroll_polyfill__WEBPACK_IMPORTED_MODULE_0__);
16163/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! smooth-scroll */ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js");
16164/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(smooth_scroll__WEBPACK_IMPORTED_MODULE_1__);
16165
16166
16167
16168//npm i smoothscroll-polyfill
16169//npm i smooth-scroll
16170function smooth() {
16171  smoothscroll_polyfill__WEBPACK_IMPORTED_MODULE_0___default().polyfill();
16172  var scroll = new (smooth_scroll__WEBPACK_IMPORTED_MODULE_1___default())('a[href*="#"]', {
16173    speed: 300,
16174    updateURL: false
16175  });
16176}
16177
16178/***/ }),
16179
16180/***/ "./src/js/modules/splide.js":
16181/*!**********************************!*\
16182  !*** ./src/js/modules/splide.js ***!
16183  \**********************************/
16184/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16185
16186"use strict";
16187__webpack_require__.r(__webpack_exports__);
16188/* harmony export */ __webpack_require__.d(__webpack_exports__, {
16189/* harmony export */   splide: function() { return /* binding */ splide; }
16190/* harmony export */ });
16191/* harmony import */ var _splidejs_splide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @splidejs/splide */ "./node_modules/@splidejs/splide/dist/js/splide.esm.js");
16192
16193function splide() {
16194  var splideKv = document.querySelector('.js-splideKv');
16195  new _splidejs_splide__WEBPACK_IMPORTED_MODULE_0__["default"](splideKv, {
16196    type: 'fade',
16197    rewind: true,
16198    perPage: 1,
16199    arrows: false,
16200    pagination: false,
16201    drag: false,
16202    autoplay: true,
16203    interval: 5000,
16204    speed: 1500,
16205    pauseOnHover: false
16206  }).mount();
16207}
16208
16209/***/ })
vendor: 5,134 bytes, lines 16209-16334
16209
16210
16211/******/ 	});
16212/************************************************************************/
16213/******/ 	// The module cache
16214/******/ 	var __webpack_module_cache__ = {};
16215/******/ 	
16216/******/ 	// The require function
16217/******/ 	function __webpack_require__(moduleId) {
16218/******/ 		// Check if module is in cache
16219/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
16220/******/ 		if (cachedModule !== undefined) {
16221/******/ 			return cachedModule.exports;
16222/******/ 		}
16223/******/ 		// Create a new module (and put it into the cache)
16224/******/ 		var module = __webpack_module_cache__[moduleId] = {
16225/******/ 			id: moduleId,
16226/******/ 			loaded: false,
16227/******/ 			exports: {}
16228/******/ 		};
16229/******/ 	
16230/******/ 		// Execute the module function
16231/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
16232/******/ 	
16233/******/ 		// Flag the module as loaded
16234/******/ 		module.loaded = true;
16235/******/ 	
16236/******/ 		// Return the exports of the module
16237/******/ 		return module.exports;
16238/******/ 	}
16239/******/ 	
16240/************************************************************************/
16241/******/ 	/* webpack/runtime/amd options */
16242/******/ 	!function() {
16243/******/ 		__webpack_require__.amdO = {};
16244/******/ 	}();
16245/******/ 	
16246/******/ 	/* webpack/runtime/compat get default export */
16247/******/ 	!function() {
16248/******/ 		// getDefaultExport function for compatibility with non-harmony modules
16249/******/ 		__webpack_require__.n = function(module) {
16250/******/ 			var getter = module && module.__esModule ?
16251/******/ 				function() { return module['default']; } :
16252/******/ 				function() { return module; };
16253/******/ 			__webpack_require__.d(getter, { a: getter });
16254/******/ 			return getter;
16255/******/ 		};
16256/******/ 	}();
16257/******/ 	
16258/******/ 	/* webpack/runtime/define property getters */
16259/******/ 	!function() {
16260/******/ 		// define getter functions for harmony exports
16261/******/ 		__webpack_require__.d = function(exports, definition) {
16262/******/ 			for(var key in definition) {
16263/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
16264/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
16265/******/ 				}
16266/******/ 			}
16267/******/ 		};
16268/******/ 	}();
16269/******/ 	
16270/******/ 	/* webpack/runtime/global */
16271/******/ 	!function() {
16272/******/ 		__webpack_require__.g = (function() {
16273/******/ 			if (typeof globalThis === 'object') return globalThis;
16274/******/ 			try {
16275/******/ 				return this || new Function('return this')();
16276/******/ 			} catch (e) {
16277/******/ 				if (typeof window === 'object') return window;
16278/******/ 			}
16279/******/ 		})();
16280/******/ 	}();
16281/******/ 	
16282/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
16283/******/ 	!function() {
16284/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
16285/******/ 	}();
16286/******/ 	
16287/******/ 	/* webpack/runtime/make namespace object */
16288/******/ 	!function() {
16289/******/ 		// define __esModule on exports
16290/******/ 		__webpack_require__.r = function(exports) {
16291/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
16292/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16293/******/ 			}
16294/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
16295/******/ 		};
16296/******/ 	}();
16297/******/ 	
16298/******/ 	/* webpack/runtime/node module decorator */
16299/******/ 	!function() {
16300/******/ 		__webpack_require__.nmd = function(module) {
16301/******/ 			module.paths = [];
16302/******/ 			if (!module.children) module.children = [];
16303/******/ 			return module;
16304/******/ 		};
16305/******/ 	}();
16306/******/ 	
16307/************************************************************************/
16308var __webpack_exports__ = {};
16309// This entry need to be wrapped in an IIFE because it need to be in strict mode.
16310!function() {
16311"use strict";
16312/*!*************************!*\
16313  !*** ./src/js/index.js ***!
16314  \*************************/
16315__webpack_require__.r(__webpack_exports__);
16316/* harmony import */ var _modules_splide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/splide */ "./src/js/modules/splide.js");
16317/* harmony import */ var _modules_pagetop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/pagetop */ "./src/js/modules/pagetop.js");
16318/* harmony import */ var _modules_scrollmagic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/scrollmagic */ "./src/js/modules/scrollmagic.js");
16319/* harmony import */ var _modules_scrollAction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/scrollAction */ "./src/js/modules/scrollAction.js");
16320/* harmony import */ var _modules_smooth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/smooth */ "./src/js/modules/smooth.js");
16321
16322
16323
16324
16325
16326(0,_modules_splide__WEBPACK_IMPORTED_MODULE_0__.splide)();
16327(0,_modules_pagetop__WEBPACK_IMPORTED_MODULE_1__.pagetop)();
16328(0,_modules_scrollmagic__WEBPACK_IMPORTED_MODULE_2__.scrollmagic)();
16329(0,_modules_scrollAction__WEBPACK_IMPORTED_MODULE_3__.scrollAction)();
16330(0,_modules_smooth__WEBPACK_IMPORTED_MODULE_4__.smooth)();
16331}();
16332/******/ })()
16333;
16334//# sourceMappingURL=script.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.