PageSourceSearch

https://drugfreesport.org.za/wp-content/themes/drugfreesport/dist/main.js

js drugfreesport.org.za collected 2026-10-03 23:48:27 UTC 424,075 bytes, 13,249 lines download raw bytes

vendor: 3,609 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./src/index.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
vendor: 936 bytes, lines 89-137
89/***/ "./node_modules/decouple/index.js":
90/*!****************************************!*\
91  !*** ./node_modules/decouple/index.js ***!
92  \****************************************/
93/*! no static exports found */
94/***/ (function(module, exports, __webpack_require__) {
95
96"use strict";
97
98
99var requestAnimFrame = function () {
100  return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (callback) {
101    window.setTimeout(callback, 1000 / 60);
102  };
103}();
104
105function decouple(node, event, fn) {
106  var eve,
107      tracking = false;
108
109  function captureEvent(e) {
110    eve = e;
111    track();
112  }
113
114  function track() {
115    if (!tracking) {
116      requestAnimFrame(update);
117      tracking = true;
118    }
119  }
120
121  function update() {
122    fn.call(node, eve);
123    tracking = false;
124  }
125
126  node.addEventListener(event, captureEvent, false);
127  return captureEvent;
128}
129/**
130 * Expose decouple
131 */
132
133
134module.exports = decouple;
135
136/***/ }),
137
vendor: 4,409 bytes, lines 138-296
138/***/ "./node_modules/emitter/dist/index.js":
139/*!********************************************!*\
140  !*** ./node_modules/emitter/dist/index.js ***!
141  \********************************************/
142/*! no static exports found */
143/***/ (function(module, exports, __webpack_require__) {
144
145"use strict";
146
147
148var _classCallCheck = function _classCallCheck(instance, Constructor) {
149  if (!(instance instanceof Constructor)) {
150    throw new TypeError("Cannot call a class as a function");
151  }
152};
153
154exports.__esModule = true;
155/**
156 * Creates a new instance of Emitter.
157 * @class
158 * @returns {Object} Returns a new instance of Emitter.
159 * @example
160 * // Creates a new instance of Emitter.
161 * var Emitter = require('emitter');
162 *
163 * var emitter = new Emitter();
164 */
165
166var Emitter = function () {
167  function Emitter() {
168    _classCallCheck(this, Emitter);
169  }
170  /**
171   * Adds a listener to the collection for the specified event.
172   * @memberof! Emitter.prototype
173   * @function
174   * @param {String} event - The event name.
175   * @param {Function} listener - A listener function to add.
176   * @returns {Object} Returns an instance of Emitter.
177   * @example
178   * // Add an event listener to "foo" event.
179   * emitter.on('foo', listener);
180   */
181
182
183  Emitter.prototype.on = function on(event, listener) {
184    // Use the current collection or create it.
185    this._eventCollection = this._eventCollection || {}; // Use the current collection of an event or create it.
186
187    this._eventCollection[event] = this._eventCollection[event] || []; // Appends the listener into the collection of the given event
188
189    this._eventCollection[event].push(listener);
190
191    return this;
192  };
193  /**
194   * Adds a listener to the collection for the specified event that will be called only once.
195   * @memberof! Emitter.prototype
196   * @function
197   * @param {String} event - The event name.
198   * @param {Function} listener - A listener function to add.
199   * @returns {Object} Returns an instance of Emitter.
200   * @example
201   * // Will add an event handler to "foo" event once.
202   * emitter.once('foo', listener);
203   */
204
205
206  Emitter.prototype.once = function once(event, listener) {
207    var self = this;
208
209    function fn() {
210      self.off(event, fn);
211      listener.apply(this, arguments);
212    }
213
214    fn.listener = listener;
215    this.on(event, fn);
216    return this;
217  };
218  /**
219   * Removes a listener from the collection for the specified event.
220   * @memberof! Emitter.prototype
221   * @function
222   * @param {String} event - The event name.
223   * @param {Function} listener - A listener function to remove.
224   * @returns {Object} Returns an instance of Emitter.
225   * @example
226   * // Remove a given listener.
227   * emitter.off('foo', listener);
228   */
229
230
231  Emitter.prototype.off = function off(event, listener) {
232    var listeners = undefined; // Defines listeners value.
233
234    if (!this._eventCollection || !(listeners = this._eventCollection[event])) {
235      return this;
236    }
237
238    listeners.forEach(function (fn, i) {
239      if (fn === listener || fn.listener === listener) {
240        // Removes the given listener.
241        listeners.splice(i, 1);
242      }
243    }); // Removes an empty event collection.
244
245    if (listeners.length === 0) {
246      delete this._eventCollection[event];
247    }
248
249    return this;
250  };
251  /**
252   * Execute each item in the listener collection in order with the specified data.
253   * @memberof! Emitter.prototype
254   * @function
255   * @param {String} event - The name of the event you want to emit.
256   * @param {...Object} data - Data to pass to the listeners.
257   * @returns {Object} Returns an instance of Emitter.
258   * @example
259   * // Emits the "foo" event with 'param1' and 'param2' as arguments.
260   * emitter.emit('foo', 'param1', 'param2');
261   */
262
263
264  Emitter.prototype.emit = function emit(event) {
265    var _this = this;
266
267    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
268      args[_key - 1] = arguments[_key];
269    }
270
271    var listeners = undefined; // Defines listeners value.
272
273    if (!this._eventCollection || !(listeners = this._eventCollection[event])) {
274      return this;
275    } // Clone listeners
276
277
278    listeners = listeners.slice(0);
279    listeners.forEach(function (fn) {
280      return fn.apply(_this, args);
281    });
282    return this;
283  };
284
285  return Emitter;
286}();
287/**
288 * Exports Emitter
289 */
290
291
292exports["default"] = Emitter;
293module.exports = exports["default"];
294
295/***/ }),
296
vendor: 317,270 bytes, lines 297-9771
297/***/ "./node_modules/jquery/dist/jquery.js":
298/*!********************************************!*\
299  !*** ./node_modules/jquery/dist/jquery.js ***!
300  \********************************************/
301/*! no static exports found */
302/***/ (function(module, exports, __webpack_require__) {
303
304/* WEBPACK VAR INJECTION */(function(module) {var __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); }
305
306/*!
307 * jQuery JavaScript Library v3.6.0
308 * https://jquery.com/
309 *
310 * Includes Sizzle.js
311 * https://sizzlejs.com/
312 *
313 * Copyright OpenJS Foundation and other contributors
314 * Released under the MIT license
315 * https://jquery.org/license
316 *
317 * Date: 2021-03-02T17:08Z
318 */
319(function (global, factory) {
320  "use strict";
321
322  if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") {
323    // For CommonJS and CommonJS-like environments where a proper `window`
324    // is present, execute the factory and get jQuery.
325    // For environments that do not have a `window` with a `document`
326    // (such as Node.js), expose a factory as module.exports.
327    // This accentuates the need for the creation of a real `window`.
328    // e.g. var jQuery = require("jquery")(window);
329    // See ticket #14549 for more info.
330    module.exports = global.document ? factory(global, true) : function (w) {
331      if (!w.document) {
332        throw new Error("jQuery requires a window with a document");
333      }
334
335      return factory(w);
336    };
337  } else {
338    factory(global);
339  } // Pass this if window is not defined yet
340
341})(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
342  // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
343  // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
344  // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
345  // enough that all such attempts are guarded in a try block.
346  "use strict";
347
348  var arr = [];
349  var getProto = Object.getPrototypeOf;
350  var _slice = arr.slice;
351  var flat = arr.flat ? function (array) {
352    return arr.flat.call(array);
353  } : function (array) {
354    return arr.concat.apply([], array);
355  };
356  var push = arr.push;
357  var indexOf = arr.indexOf;
358  var class2type = {};
359  var toString = class2type.toString;
360  var hasOwn = class2type.hasOwnProperty;
361  var fnToString = hasOwn.toString;
362  var ObjectFunctionString = fnToString.call(Object);
363  var support = {};
364
365  var isFunction = function isFunction(obj) {
366    // Support: Chrome <=57, Firefox <=52
367    // In some browsers, typeof returns "function" for HTML <object> elements
368    // (i.e., `typeof document.createElement( "object" ) === "function"`).
369    // We don't want to classify *any* DOM node as a function.
370    // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
371    // Plus for old WebKit, typeof returns "function" for HTML collections
372    // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
373    return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
374  };
375
376  var isWindow = function isWindow(obj) {
377    return obj != null && obj === obj.window;
378  };
379
380  var document = window.document;
381  var preservedScriptAttributes = {
382    type: true,
383    src: true,
384    nonce: true,
385    noModule: true
386  };
387
388  function DOMEval(code, node, doc) {
389    doc = doc || document;
390    var i,
391        val,
392        script = doc.createElement("script");
393    script.text = code;
394
395    if (node) {
396      for (i in preservedScriptAttributes) {
397        // Support: Firefox 64+, Edge 18+
398        // Some browsers don't support the "nonce" property on scripts.
399        // On the other hand, just using `getAttribute` is not enough as
400        // the `nonce` attribute is reset to an empty string whenever it
401        // becomes browsing-context connected.
402        // See https://github.com/whatwg/html/issues/2369
403        // See https://html.spec.whatwg.org/#nonce-attributes
404        // The `node.getAttribute` check was added for the sake of
405        // `jQuery.globalEval` so that it can fake a nonce-containing node
406        // via an object.
407        val = node[i] || node.getAttribute && node.getAttribute(i);
408
409        if (val) {
410          script.setAttribute(i, val);
411        }
412      }
413    }
414
415    doc.head.appendChild(script).parentNode.removeChild(script);
416  }
417
418  function toType(obj) {
419    if (obj == null) {
420      return obj + "";
421    } // Support: Android <=2.3 only (functionish RegExp)
422
423
424    return _typeof(obj) === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : _typeof(obj);
425  }
426  /* global Symbol */
427  // Defining this global in .eslintrc.json would create a danger of using the global
428  // unguarded in another place, it seems safer to define global only for this module
429
430
431  var version = "3.6.0",
432      // Define a local copy of jQuery
433  jQuery = function jQuery(selector, context) {
434    // The jQuery object is actually just the init constructor 'enhanced'
435    // Need init if jQuery is called (just allow error to be thrown if not included)
436    return new jQuery.fn.init(selector, context);
437  };
438
439  jQuery.fn = jQuery.prototype = {
440    // The current version of jQuery being used
441    jquery: version,
442    constructor: jQuery,
443    // The default length of a jQuery object is 0
444    length: 0,
445    toArray: function toArray() {
446      return _slice.call(this);
447    },
448    // Get the Nth element in the matched element set OR
449    // Get the whole matched element set as a clean array
450    get: function get(num) {
451      // Return all the elements in a clean array
452      if (num == null) {
453        return _slice.call(this);
454      } // Return just the one element from the set
455
456
457      return num < 0 ? this[num + this.length] : this[num];
458    },
459    // Take an array of elements and push it onto the stack
460    // (returning the new matched element set)
461    pushStack: function pushStack(elems) {
462      // Build a new jQuery matched element set
463      var ret = jQuery.merge(this.constructor(), elems); // Add the old object onto the stack (as a reference)
464
465      ret.prevObject = this; // Return the newly-formed element set
466
467      return ret;
468    },
469    // Execute a callback for every element in the matched set.
470    each: function each(callback) {
471      return jQuery.each(this, callback);
472    },
473    map: function map(callback) {
474      return this.pushStack(jQuery.map(this, function (elem, i) {
475        return callback.call(elem, i, elem);
476      }));
477    },
478    slice: function slice() {
479      return this.pushStack(_slice.apply(this, arguments));
480    },
481    first: function first() {
482      return this.eq(0);
483    },
484    last: function last() {
485      return this.eq(-1);
486    },
487    even: function even() {
488      return this.pushStack(jQuery.grep(this, function (_elem, i) {
489        return (i + 1) % 2;
490      }));
491    },
492    odd: function odd() {
493      return this.pushStack(jQuery.grep(this, function (_elem, i) {
494        return i % 2;
495      }));
496    },
497    eq: function eq(i) {
498      var len = this.length,
499          j = +i + (i < 0 ? len : 0);
500      return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
501    },
502    end: function end() {
503      return this.prevObject || this.constructor();
504    },
505    // For internal use only.
506    // Behaves like an Array's method, not like a jQuery method.
507    push: push,
508    sort: arr.sort,
509    splice: arr.splice
510  };
511
512  jQuery.extend = jQuery.fn.extend = function () {
513    var options,
514        name,
515        src,
516        copy,
517        copyIsArray,
518        clone,
519        target = arguments[0] || {},
520        i = 1,
521        length = arguments.length,
522        deep = false; // Handle a deep copy situation
523
524    if (typeof target === "boolean") {
525      deep = target; // Skip the boolean and the target
526
527      target = arguments[i] || {};
528      i++;
529    } // Handle case when target is a string or something (possible in deep copy)
530
531
532    if (_typeof(target) !== "object" && !isFunction(target)) {
533      target = {};
534    } // Extend jQuery itself if only one argument is passed
535
536
537    if (i === length) {
538      target = this;
539      i--;
540    }
541
542    for (; i < length; i++) {
543      // Only deal with non-null/undefined values
544      if ((options = arguments[i]) != null) {
545        // Extend the base object
546        for (name in options) {
547          copy = options[name]; // Prevent Object.prototype pollution
548          // Prevent never-ending loop
549
550          if (name === "__proto__" || target === copy) {
551            continue;
552          } // Recurse if we're merging plain objects or arrays
553
554
555          if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
556            src = target[name]; // Ensure proper type for the source value
557
558            if (copyIsArray && !Array.isArray(src)) {
559              clone = [];
560            } else if (!copyIsArray && !jQuery.isPlainObject(src)) {
561              clone = {};
562            } else {
563              clone = src;
564            }
565
566            copyIsArray = false; // Never move original objects, clone them
567
568            target[name] = jQuery.extend(deep, clone, copy); // Don't bring in undefined values
569          } else if (copy !== undefined) {
570            target[name] = copy;
571          }
572        }
573      }
574    } // Return the modified object
575
576
577    return target;
578  };
579
580  jQuery.extend({
581    // Unique for each copy of jQuery on the page
582    expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
583    // Assume jQuery is ready without the ready module
584    isReady: true,
585    error: function error(msg) {
586      throw new Error(msg);
587    },
588    noop: function noop() {},
589    isPlainObject: function isPlainObject(obj) {
590      var proto, Ctor; // Detect obvious negatives
591      // Use toString instead of jQuery.type to catch host objects
592
593      if (!obj || toString.call(obj) !== "[object Object]") {
594        return false;
595      }
596
597      proto = getProto(obj); // Objects with no prototype (e.g., `Object.create( null )`) are plain
598
599      if (!proto) {
600        return true;
601      } // Objects with prototype are plain iff they were constructed by a global Object function
602
603
604      Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
605      return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
606    },
607    isEmptyObject: function isEmptyObject(obj) {
608      var name;
609
610      for (name in obj) {
611        return false;
612      }
613
614      return true;
615    },
616    // Evaluates a script in a provided context; falls back to the global one
617    // if not specified.
618    globalEval: function globalEval(code, options, doc) {
619      DOMEval(code, {
620        nonce: options && options.nonce
621      }, doc);
622    },
623    each: function each(obj, callback) {
624      var length,
625          i = 0;
626
627      if (isArrayLike(obj)) {
628        length = obj.length;
629
630        for (; i < length; i++) {
631          if (callback.call(obj[i], i, obj[i]) === false) {
632            break;
633          }
634        }
635      } else {
636        for (i in obj) {
637          if (callback.call(obj[i], i, obj[i]) === false) {
638            break;
639          }
640        }
641      }
642
643      return obj;
644    },
645    // results is for internal usage only
646    makeArray: function makeArray(arr, results) {
647      var ret = results || [];
648
649      if (arr != null) {
650        if (isArrayLike(Object(arr))) {
651          jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);
652        } else {
653          push.call(ret, arr);
654        }
655      }
656
657      return ret;
658    },
659    inArray: function inArray(elem, arr, i) {
660      return arr == null ? -1 : indexOf.call(arr, elem, i);
661    },
662    // Support: Android <=4.0 only, PhantomJS 1 only
663    // push.apply(_, arraylike) throws on ancient WebKit
664    merge: function merge(first, second) {
665      var len = +second.length,
666          j = 0,
667          i = first.length;
668
669      for (; j < len; j++) {
670        first[i++] = second[j];
671      }
672
673      first.length = i;
674      return first;
675    },
676    grep: function grep(elems, callback, invert) {
677      var callbackInverse,
678          matches = [],
679          i = 0,
680          length = elems.length,
681          callbackExpect = !invert; // Go through the array, only saving the items
682      // that pass the validator function
683
684      for (; i < length; i++) {
685        callbackInverse = !callback(elems[i], i);
686
687        if (callbackInverse !== callbackExpect) {
688          matches.push(elems[i]);
689        }
690      }
691
692      return matches;
693    },
694    // arg is for internal usage only
695    map: function map(elems, callback, arg) {
696      var length,
697          value,
698          i = 0,
699          ret = []; // Go through the array, translating each of the items to their new values
700
701      if (isArrayLike(elems)) {
702        length = elems.length;
703
704        for (; i < length; i++) {
705          value = callback(elems[i], i, arg);
706
707          if (value != null) {
708            ret.push(value);
709          }
710        } // Go through every key on the object,
711
712      } else {
713        for (i in elems) {
714          value = callback(elems[i], i, arg);
715
716          if (value != null) {
717            ret.push(value);
718          }
719        }
720      } // Flatten any nested arrays
721
722
723      return flat(ret);
724    },
725    // A global GUID counter for objects
726    guid: 1,
727    // jQuery.support is not used in Core but other projects attach their
728    // properties to it so it needs to exist.
729    support: support
730  });
731
732  if (typeof Symbol === "function") {
733    jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
734  } // Populate the class2type map
735
736
737  jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (_i, name) {
738    class2type["[object " + name + "]"] = name.toLowerCase();
739  });
740
741  function isArrayLike(obj) {
742    // Support: real iOS 8.2 only (not reproducible in simulator)
743    // `in` check used to prevent JIT error (gh-2145)
744    // hasOwn isn't used here due to false negatives
745    // regarding Nodelist length in IE
746    var length = !!obj && "length" in obj && obj.length,
747        type = toType(obj);
748
749    if (isFunction(obj) || isWindow(obj)) {
750      return false;
751    }
752
753    return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
754  }
755
756  var Sizzle =
757  /*!
758   * Sizzle CSS Selector Engine v2.3.6
759   * https://sizzlejs.com/
760   *
761   * Copyright JS Foundation and other contributors
762   * Released under the MIT license
763   * https://js.foundation/
764   *
765   * Date: 2021-02-16
766   */
767  function (window) {
768    var i,
769        support,
770        Expr,
771        getText,
772        isXML,
773        tokenize,
774        compile,
775        select,
776        outermostContext,
777        sortInput,
778        hasDuplicate,
779        // Local document vars
780    setDocument,
781        document,
782        docElem,
783        documentIsHTML,
784        rbuggyQSA,
785        rbuggyMatches,
786        matches,
787        contains,
788        // Instance-specific data
789    expando = "sizzle" + 1 * new Date(),
790        preferredDoc = window.document,
791        dirruns = 0,
792        done = 0,
793        classCache = createCache(),
794        tokenCache = createCache(),
795        compilerCache = createCache(),
796        nonnativeSelectorCache = createCache(),
797        sortOrder = function sortOrder(a, b) {
798      if (a === b) {
799        hasDuplicate = true;
800      }
801
802      return 0;
803    },
804        // Instance methods
805    hasOwn = {}.hasOwnProperty,
806        arr = [],
807        pop = arr.pop,
808        pushNative = arr.push,
809        push = arr.push,
810        slice = arr.slice,
811        // Use a stripped-down indexOf as it's faster than native
812    // https://jsperf.com/thor-indexof-vs-for/5
813    indexOf = function indexOf(list, elem) {
814      var i = 0,
815          len = list.length;
816
817      for (; i < len; i++) {
818        if (list[i] === elem) {
819          return i;
820        }
821      }
822
823      return -1;
824    },
825        booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + "ismap|loop|multiple|open|readonly|required|scoped",
826        // Regular expressions
827    // http://www.w3.org/TR/css3-selectors/#whitespace
828    whitespace = "[\\x20\\t\\r\\n\\f]",
829        // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
830    identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
831        // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
832    attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
833    "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5]
834    // or strings [capture 3 or capture 4]"
835    "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]",
836        pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
837    // 1. quoted (capture 3; capture 4 or capture 5)
838    "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6)
839    "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2)
840    ".*" + ")\\)|)",
841        // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
842    rwhitespace = new RegExp(whitespace + "+", "g"),
843        rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
844        rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
845        rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
846        rdescend = new RegExp(whitespace + "|>"),
847        rpseudo = new RegExp(pseudos),
848        ridentifier = new RegExp("^" + identifier + "$"),
849        matchExpr = {
850      "ID": new RegExp("^#(" + identifier + ")"),
851      "CLASS": new RegExp("^\\.(" + identifier + ")"),
852      "TAG": new RegExp("^(" + identifier + "|[*])"),
853      "ATTR": new RegExp("^" + attributes),
854      "PSEUDO": new RegExp("^" + pseudos),
855      "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
856      "bool": new RegExp("^(?:" + booleans + ")$", "i"),
857      // For use in libraries implementing .is()
858      // We use this for POS matching in `select`
859      "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
860    },
861        rhtml = /HTML$/i,
862        rinputs = /^(?:input|select|textarea|button)$/i,
863        rheader = /^h\d$/i,
864        rnative = /^[^{]+\{\s*\[native \w/,
865        // Easily-parseable/retrievable ID or TAG or CLASS selectors
866    rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
867        rsibling = /[+~]/,
868        // CSS escapes
869    // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
870    runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"),
871        funescape = function funescape(escape, nonHex) {
872      var high = "0x" + escape.slice(1) - 0x10000;
873      return nonHex ? // Strip the backslash prefix from a non-hex escape sequence
874      nonHex : // Replace a hexadecimal escape sequence with the encoded Unicode code point
875      // Support: IE <=11+
876      // For values outside the Basic Multilingual Plane (BMP), manually construct a
877      // surrogate pair
878      high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
879    },
880        // CSS string/identifier serialization
881    // https://drafts.csswg.org/cssom/#common-serializing-idioms
882    rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
883        fcssescape = function fcssescape(ch, asCodePoint) {
884      if (asCodePoint) {
885        // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
886        if (ch === "\0") {
887          return "\uFFFD";
888        } // Control characters and (dependent upon position) numbers get escaped as code points
889
890
891        return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
892      } // Other potentially-special ASCII characters get backslash-escaped
893
894
895      return "\\" + ch;
896    },
897        // Used for iframes
898    // See setDocument()
899    // Removing the function wrapper causes a "Permission Denied"
900    // error in IE
901    unloadHandler = function unloadHandler() {
902      setDocument();
903    },
904        inDisabledFieldset = addCombinator(function (elem) {
905      return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
906    }, {
907      dir: "parentNode",
908      next: "legend"
909    }); // Optimize for push.apply( _, NodeList )
910
911
912    try {
913      push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); // Support: Android<4.0
914      // Detect silently failing push.apply
915      // eslint-disable-next-line no-unused-expressions
916
917      arr[preferredDoc.childNodes.length].nodeType;
918    } catch (e) {
919      push = {
920        apply: arr.length ? // Leverage slice if possible
921        function (target, els) {
922          pushNative.apply(target, slice.call(els));
923        } : // Support: IE<9
924        // Otherwise append directly
925        function (target, els) {
926          var j = target.length,
927              i = 0; // Can't trust NodeList.length
928
929          while (target[j++] = els[i++]) {}
930
931          target.length = j - 1;
932        }
933      };
934    }
935
936    function Sizzle(selector, context, results, seed) {
937      var m,
938          i,
939          elem,
940          nid,
941          match,
942          groups,
943          newSelector,
944          newContext = context && context.ownerDocument,
945          // nodeType defaults to 9, since context defaults to document
946      nodeType = context ? context.nodeType : 9;
947      results = results || []; // Return early from calls with invalid selector or context
948
949      if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
950        return results;
951      } // Try to shortcut find operations (as opposed to filters) in HTML documents
952
953
954      if (!seed) {
955        setDocument(context);
956        context = context || document;
957
958        if (documentIsHTML) {
959          // If the selector is sufficiently simple, try using a "get*By*" DOM method
960          // (excepting DocumentFragment context, where the methods don't exist)
961          if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
962            // ID selector
963            if (m = match[1]) {
964              // Document context
965              if (nodeType === 9) {
966                if (elem = context.getElementById(m)) {
967                  // Support: IE, Opera, Webkit
968                  // TODO: identify versions
969                  // getElementById can match elements by name instead of ID
970                  if (elem.id === m) {
971                    results.push(elem);
972                    return results;
973                  }
974                } else {
975                  return results;
976                } // Element context
977
978              } else {
979                // Support: IE, Opera, Webkit
980                // TODO: identify versions
981                // getElementById can match elements by name instead of ID
982                if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {
983                  results.push(elem);
984                  return results;
985                }
986              } // Type selector
987
988            } else if (match[2]) {
989              push.apply(results, context.getElementsByTagName(selector));
990              return results; // Class selector
991            } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
992              push.apply(results, context.getElementsByClassName(m));
993              return results;
994            }
995          } // Take advantage of querySelectorAll
996
997
998          if (support.qsa && !nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && ( // Support: IE 8 only
999          // Exclude object elements
1000          nodeType !== 1 || context.nodeName.toLowerCase() !== "object")) {
1001            newSelector = selector;
1002            newContext = context; // qSA considers elements outside a scoping root when evaluating child or
1003            // descendant combinators, which is not what we want.
1004            // In such cases, we work around the behavior by prefixing every selector in the
1005            // list with an ID selector referencing the scope context.
1006            // The technique has to be used as well when a leading combinator is used
1007            // as such selectors are not recognized by querySelectorAll.
1008            // Thanks to Andrew Dupont for this technique.
1009
1010            if (nodeType === 1 && (rdescend.test(selector) || rcombinators.test(selector))) {
1011              // Expand context for sibling selectors
1012              newContext = rsibling.test(selector) && testContext(context.parentNode) || context; // We can use :scope instead of the ID hack if the browser
1013              // supports it & if we're not changing the context.
1014
1015              if (newContext !== context || !support.scope) {
1016                // Capture the context ID, setting it first if necessary
1017                if (nid = context.getAttribute("id")) {
1018                  nid = nid.replace(rcssescape, fcssescape);
1019                } else {
1020                  context.setAttribute("id", nid = expando);
1021                }
1022              } // Prefix every selector in the list
1023
1024
1025              groups = tokenize(selector);
1026              i = groups.length;
1027
1028              while (i--) {
1029                groups[i] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i]);
1030              }
1031
1032              newSelector = groups.join(",");
1033            }
1034
1035            try {
1036              push.apply(results, newContext.querySelectorAll(newSelector));
1037              return results;
1038            } catch (qsaError) {
1039              nonnativeSelectorCache(selector, true);
1040            } finally {
1041              if (nid === expando) {
1042                context.removeAttribute("id");
1043              }
1044            }
1045          }
1046        }
1047      } // All others
1048
1049
1050      return select(selector.replace(rtrim, "$1"), context, results, seed);
1051    }
1052    /**
1053     * Create key-value caches of limited size
1054     * @returns {function(string, object)} Returns the Object data after storing it on itself with
1055     *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1056     *	deleting the oldest entry
1057     */
1058
1059
1060    function createCache() {
1061      var keys = [];
1062
1063      function cache(key, value) {
1064        // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1065        if (keys.push(key + " ") > Expr.cacheLength) {
1066          // Only keep the most recent entries
1067          delete cache[keys.shift()];
1068        }
1069
1070        return cache[key + " "] = value;
1071      }
1072
1073      return cache;
1074    }
1075    /**
1076     * Mark a function for special use by Sizzle
1077     * @param {Function} fn The function to mark
1078     */
1079
1080
1081    function markFunction(fn) {
1082      fn[expando] = true;
1083      return fn;
1084    }
1085    /**
1086     * Support testing using an element
1087     * @param {Function} fn Passed the created element and returns a boolean result
1088     */
1089
1090
1091    function assert(fn) {
1092      var el = document.createElement("fieldset");
1093
1094      try {
1095        return !!fn(el);
1096      } catch (e) {
1097        return false;
1098      } finally {
1099        // Remove from its parent by default
1100        if (el.parentNode) {
1101          el.parentNode.removeChild(el);
1102        } // release memory in IE
1103
1104
1105        el = null;
1106      }
1107    }
1108    /**
1109     * Adds the same handler for all of the specified attrs
1110     * @param {String} attrs Pipe-separated list of attributes
1111     * @param {Function} handler The method that will be applied
1112     */
1113
1114
1115    function addHandle(attrs, handler) {
1116      var arr = attrs.split("|"),
1117          i = arr.length;
1118
1119      while (i--) {
1120        Expr.attrHandle[arr[i]] = handler;
1121      }
1122    }
1123    /**
1124     * Checks document order of two siblings
1125     * @param {Element} a
1126     * @param {Element} b
1127     * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1128     */
1129
1130
1131    function siblingCheck(a, b) {
1132      var cur = b && a,
1133          diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes
1134
1135      if (diff) {
1136        return diff;
1137      } // Check if b follows a
1138
1139
1140      if (cur) {
1141        while (cur = cur.nextSibling) {
1142          if (cur === b) {
1143            return -1;
1144          }
1145        }
1146      }
1147
1148      return a ? 1 : -1;
1149    }
1150    /**
1151     * Returns a function to use in pseudos for input types
1152     * @param {String} type
1153     */
1154
1155
1156    function createInputPseudo(type) {
1157      return function (elem) {
1158        var name = elem.nodeName.toLowerCase();
1159        return name === "input" && elem.type === type;
1160      };
1161    }
1162    /**
1163     * Returns a function to use in pseudos for buttons
1164     * @param {String} type
1165     */
1166
1167
1168    function createButtonPseudo(type) {
1169      return function (elem) {
1170        var name = elem.nodeName.toLowerCase();
1171        return (name === "input" || name === "button") && elem.type === type;
1172      };
1173    }
1174    /**
1175     * Returns a function to use in pseudos for :enabled/:disabled
1176     * @param {Boolean} disabled true for :disabled; false for :enabled
1177     */
1178
1179
1180    function createDisabledPseudo(disabled) {
1181      // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1182      return function (elem) {
1183        // Only certain elements can match :enabled or :disabled
1184        // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1185        // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1186        if ("form" in elem) {
1187          // Check for inherited disabledness on relevant non-disabled elements:
1188          // * listed form-associated elements in a disabled fieldset
1189          //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
1190          //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1191          // * option elements in a disabled optgroup
1192          //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1193          // All such elements have a "form" property.
1194          if (elem.parentNode && elem.disabled === false) {
1195            // Option elements defer to a parent optgroup if present
1196            if ("label" in elem) {
1197              if ("label" in elem.parentNode) {
1198                return elem.parentNode.disabled === disabled;
1199              } else {
1200                return elem.disabled === disabled;
1201              }
1202            } // Support: IE 6 - 11
1203            // Use the isDisabled shortcut property to check for disabled fieldset ancestors
1204
1205
1206            return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
1207
1208            /* jshint -W018 */
1209            elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
1210          }
1211
1212          return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property.
1213          // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1214          // even exist on them, let alone have a boolean value.
1215        } else if ("label" in elem) {
1216          return elem.disabled === disabled;
1217        } // Remaining elements are neither :enabled nor :disabled
1218
1219
1220        return false;
1221      };
1222    }
1223    /**
1224     * Returns a function to use in pseudos for positionals
1225     * @param {Function} fn
1226     */
1227
1228
1229    function createPositionalPseudo(fn) {
1230      return markFunction(function (argument) {
1231        argument = +argument;
1232        return markFunction(function (seed, matches) {
1233          var j,
1234              matchIndexes = fn([], seed.length, argument),
1235              i = matchIndexes.length; // Match elements found at the specified indexes
1236
1237          while (i--) {
1238            if (seed[j = matchIndexes[i]]) {
1239              seed[j] = !(matches[j] = seed[j]);
1240            }
1241          }
1242        });
1243      });
1244    }
1245    /**
1246     * Checks a node for validity as a Sizzle context
1247     * @param {Element|Object=} context
1248     * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1249     */
1250
1251
1252    function testContext(context) {
1253      return context && typeof context.getElementsByTagName !== "undefined" && context;
1254    } // Expose support vars for convenience
1255
1256
1257    support = Sizzle.support = {};
1258    /**
1259     * Detects XML nodes
1260     * @param {Element|Object} elem An element or a document
1261     * @returns {Boolean} True iff elem is a non-HTML XML node
1262     */
1263
1264    isXML = Sizzle.isXML = function (elem) {
1265      var namespace = elem && elem.namespaceURI,
1266          docElem = elem && (elem.ownerDocument || elem).documentElement; // Support: IE <=8
1267      // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
1268      // https://bugs.jquery.com/ticket/4833
1269
1270      return !rhtml.test(namespace || docElem && docElem.nodeName || "HTML");
1271    };
1272    /**
1273     * Sets document-related variables once based on the current document
1274     * @param {Element|Object} [doc] An element or document object to use to set the document
1275     * @returns {Object} Returns the current document
1276     */
1277
1278
1279    setDocument = Sizzle.setDocument = function (node) {
1280      var hasCompare,
1281          subWindow,
1282          doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected
1283      // Support: IE 11+, Edge 17 - 18+
1284      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1285      // two documents; shallow comparisons work.
1286      // eslint-disable-next-line eqeqeq
1287
1288      if (doc == document || doc.nodeType !== 9 || !doc.documentElement) {
1289        return document;
1290      } // Update global variables
1291
1292
1293      document = doc;
1294      docElem = document.documentElement;
1295      documentIsHTML = !isXML(document); // Support: IE 9 - 11+, Edge 12 - 18+
1296      // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1297      // Support: IE 11+, Edge 17 - 18+
1298      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1299      // two documents; shallow comparisons work.
1300      // eslint-disable-next-line eqeqeq
1301
1302      if (preferredDoc != document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {
1303        // Support: IE 11, Edge
1304        if (subWindow.addEventListener) {
1305          subWindow.addEventListener("unload", unloadHandler, false); // Support: IE 9 - 10 only
1306        } else if (subWindow.attachEvent) {
1307          subWindow.attachEvent("onunload", unloadHandler);
1308        }
1309      } // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
1310      // Safari 4 - 5 only, Opera <=11.6 - 12.x only
1311      // IE/Edge & older browsers don't support the :scope pseudo-class.
1312      // Support: Safari 6.0 only
1313      // Safari 6.0 supports :scope but it's an alias of :root there.
1314
1315
1316      support.scope = assert(function (el) {
1317        docElem.appendChild(el).appendChild(document.createElement("div"));
1318        return typeof el.querySelectorAll !== "undefined" && !el.querySelectorAll(":scope fieldset div").length;
1319      });
1320      /* Attributes
1321      ---------------------------------------------------------------------- */
1322      // Support: IE<8
1323      // Verify that getAttribute really returns attributes and not properties
1324      // (excepting IE8 booleans)
1325
1326      support.attributes = assert(function (el) {
1327        el.className = "i";
1328        return !el.getAttribute("className");
1329      });
1330      /* getElement(s)By*
1331      ---------------------------------------------------------------------- */
1332      // Check if getElementsByTagName("*") returns only elements
1333
1334      support.getElementsByTagName = assert(function (el) {
1335        el.appendChild(document.createComment(""));
1336        return !el.getElementsByTagName("*").length;
1337      }); // Support: IE<9
1338
1339      support.getElementsByClassName = rnative.test(document.getElementsByClassName); // Support: IE<10
1340      // Check if getElementById returns elements by name
1341      // The broken getElementById methods don't pick up programmatically-set names,
1342      // so use a roundabout getElementsByName test
1343
1344      support.getById = assert(function (el) {
1345        docElem.appendChild(el).id = expando;
1346        return !document.getElementsByName || !document.getElementsByName(expando).length;
1347      }); // ID filter and find
1348
1349      if (support.getById) {
1350        Expr.filter["ID"] = function (id) {
1351          var attrId = id.replace(runescape, funescape);
1352          return function (elem) {
1353            return elem.getAttribute("id") === attrId;
1354          };
1355        };
1356
1357        Expr.find["ID"] = function (id, context) {
1358          if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1359            var elem = context.getElementById(id);
1360            return elem ? [elem] : [];
1361          }
1362        };
1363      } else {
1364        Expr.filter["ID"] = function (id) {
1365          var attrId = id.replace(runescape, funescape);
1366          return function (elem) {
1367            var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
1368            return node && node.value === attrId;
1369          };
1370        }; // Support: IE 6 - 7 only
1371        // getElementById is not reliable as a find shortcut
1372
1373
1374        Expr.find["ID"] = function (id, context) {
1375          if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1376            var node,
1377                i,
1378                elems,
1379                elem = context.getElementById(id);
1380
1381            if (elem) {
1382              // Verify the id attribute
1383              node = elem.getAttributeNode("id");
1384
1385              if (node && node.value === id) {
1386                return [elem];
1387              } // Fall back on getElementsByName
1388
1389
1390              elems = context.getElementsByName(id);
1391              i = 0;
1392
1393              while (elem = elems[i++]) {
1394                node = elem.getAttributeNode("id");
1395
1396                if (node && node.value === id) {
1397                  return [elem];
1398                }
1399              }
1400            }
1401
1402            return [];
1403          }
1404        };
1405      } // Tag
1406
1407
1408      Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) {
1409        if (typeof context.getElementsByTagName !== "undefined") {
1410          return context.getElementsByTagName(tag); // DocumentFragment nodes don't have gEBTN
1411        } else if (support.qsa) {
1412          return context.querySelectorAll(tag);
1413        }
1414      } : function (tag, context) {
1415        var elem,
1416            tmp = [],
1417            i = 0,
1418            // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1419        results = context.getElementsByTagName(tag); // Filter out possible comments
1420
1421        if (tag === "*") {
1422          while (elem = results[i++]) {
1423            if (elem.nodeType === 1) {
1424              tmp.push(elem);
1425            }
1426          }
1427
1428          return tmp;
1429        }
1430
1431        return results;
1432      }; // Class
1433
1434      Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
1435        if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
1436          return context.getElementsByClassName(className);
1437        }
1438      };
1439      /* QSA/matchesSelector
1440      ---------------------------------------------------------------------- */
1441      // QSA and matchesSelector support
1442      // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1443
1444
1445      rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21)
1446      // We allow this because of a bug in IE8/9 that throws an error
1447      // whenever `document.activeElement` is accessed on an iframe
1448      // So, we allow :focus to pass through QSA all the time to avoid the IE error
1449      // See https://bugs.jquery.com/ticket/13378
1450
1451      rbuggyQSA = [];
1452
1453      if (support.qsa = rnative.test(document.querySelectorAll)) {
1454        // Build QSA regex
1455        // Regex strategy adopted from Diego Perini
1456        assert(function (el) {
1457          var input; // Select is set to empty string on purpose
1458          // This is to test IE's treatment of not explicitly
1459          // setting a boolean content attribute,
1460          // since its presence should be enough
1461          // https://bugs.jquery.com/ticket/12359
1462
1463          docElem.appendChild(el).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16
1464          // Nothing should be selected when empty strings follow ^= or $= or *=
1465          // The test attribute must be unknown in Opera but "safe" for WinRT
1466          // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1467
1468          if (el.querySelectorAll("[msallowcapture^='']").length) {
1469            rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
1470          } // Support: IE8
1471          // Boolean attributes and "value" are not treated correctly
1472
1473
1474          if (!el.querySelectorAll("[selected]").length) {
1475            rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
1476          } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1477
1478
1479          if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
1480            rbuggyQSA.push("~=");
1481          } // Support: IE 11+, Edge 15 - 18+
1482          // IE 11/Edge don't find elements on a `[name='']` query in some cases.
1483          // Adding a temporary attribute to the document before the selection works
1484          // around the issue.
1485          // Interestingly, IE 10 & older don't seem to have the issue.
1486
1487
1488          input = document.createElement("input");
1489          input.setAttribute("name", "");
1490          el.appendChild(input);
1491
1492          if (!el.querySelectorAll("[name='']").length) {
1493            rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + "*(?:''|\"\")");
1494          } // Webkit/Opera - :checked should return selected option elements
1495          // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1496          // IE8 throws error here and will not see later tests
1497
1498
1499          if (!el.querySelectorAll(":checked").length) {
1500            rbuggyQSA.push(":checked");
1501          } // Support: Safari 8+, iOS 8+
1502          // https://bugs.webkit.org/show_bug.cgi?id=136851
1503          // In-page `selector#id sibling-combinator selector` fails
1504
1505
1506          if (!el.querySelectorAll("a#" + expando + "+*").length) {
1507            rbuggyQSA.push(".#.+[+~]");
1508          } // Support: Firefox <=3.6 - 5 only
1509          // Old Firefox doesn't throw on a badly-escaped identifier.
1510
1511
1512          el.querySelectorAll("\\\f");
1513          rbuggyQSA.push("[\\r\\n\\f]");
1514        });
1515        assert(function (el) {
1516          el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"; // Support: Windows 8 Native Apps
1517          // The type and name attributes are restricted during .innerHTML assignment
1518
1519          var input = document.createElement("input");
1520          input.setAttribute("type", "hidden");
1521          el.appendChild(input).setAttribute("name", "D"); // Support: IE8
1522          // Enforce case-sensitivity of name attribute
1523
1524          if (el.querySelectorAll("[name=d]").length) {
1525            rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
1526          } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1527          // IE8 throws error here and will not see later tests
1528
1529
1530          if (el.querySelectorAll(":enabled").length !== 2) {
1531            rbuggyQSA.push(":enabled", ":disabled");
1532          } // Support: IE9-11+
1533          // IE's :disabled selector does not pick up the children of disabled fieldsets
1534
1535
1536          docElem.appendChild(el).disabled = true;
1537
1538          if (el.querySelectorAll(":disabled").length !== 2) {
1539            rbuggyQSA.push(":enabled", ":disabled");
1540          } // Support: Opera 10 - 11 only
1541          // Opera 10-11 does not throw on post-comma invalid pseudos
1542
1543
1544          el.querySelectorAll("*,:x");
1545          rbuggyQSA.push(",.*:");
1546        });
1547      }
1548
1549      if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {
1550        assert(function (el) {
1551          // Check to see if it's possible to do matchesSelector
1552          // on a disconnected node (IE 9)
1553          support.disconnectedMatch = matches.call(el, "*"); // This should fail with an exception
1554          // Gecko does not error, returns false instead
1555
1556          matches.call(el, "[s!='']:x");
1557          rbuggyMatches.push("!=", pseudos);
1558        });
1559      }
1560
1561      rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
1562      rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
1563      /* Contains
1564      ---------------------------------------------------------------------- */
1565
1566      hasCompare = rnative.test(docElem.compareDocumentPosition); // Element contains another
1567      // Purposefully self-exclusive
1568      // As in, an element does not contain itself
1569
1570      contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
1571        var adown = a.nodeType === 9 ? a.documentElement : a,
1572            bup = b && b.parentNode;
1573        return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
1574      } : function (a, b) {
1575        if (b) {
1576          while (b = b.parentNode) {
1577            if (b === a) {
1578              return true;
1579            }
1580          }
1581        }
1582
1583        return false;
1584      };
1585      /* Sorting
1586      ---------------------------------------------------------------------- */
1587      // Document order sorting
1588
1589      sortOrder = hasCompare ? function (a, b) {
1590        // Flag for duplicate removal
1591        if (a === b) {
1592          hasDuplicate = true;
1593          return 0;
1594        } // Sort on method existence if only one input has compareDocumentPosition
1595
1596
1597        var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1598
1599        if (compare) {
1600          return compare;
1601        } // Calculate position if both inputs belong to the same document
1602        // Support: IE 11+, Edge 17 - 18+
1603        // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1604        // two documents; shallow comparisons work.
1605        // eslint-disable-next-line eqeqeq
1606
1607
1608        compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected
1609        1; // Disconnected nodes
1610
1611        if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
1612          // Choose the first element that is related to our preferred document
1613          // Support: IE 11+, Edge 17 - 18+
1614          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1615          // two documents; shallow comparisons work.
1616          // eslint-disable-next-line eqeqeq
1617          if (a == document || a.ownerDocument == preferredDoc && contains(preferredDoc, a)) {
1618            return -1;
1619          } // Support: IE 11+, Edge 17 - 18+
1620          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1621          // two documents; shallow comparisons work.
1622          // eslint-disable-next-line eqeqeq
1623
1624
1625          if (b == document || b.ownerDocument == preferredDoc && contains(preferredDoc, b)) {
1626            return 1;
1627          } // Maintain original order
1628
1629
1630          return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
1631        }
1632
1633        return compare & 4 ? -1 : 1;
1634      } : function (a, b) {
1635        // Exit early if the nodes are identical
1636        if (a === b) {
1637          hasDuplicate = true;
1638          return 0;
1639        }
1640
1641        var cur,
1642            i = 0,
1643            aup = a.parentNode,
1644            bup = b.parentNode,
1645            ap = [a],
1646            bp = [b]; // Parentless nodes are either documents or disconnected
1647
1648        if (!aup || !bup) {
1649          // Support: IE 11+, Edge 17 - 18+
1650          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1651          // two documents; shallow comparisons work.
1652
1653          /* eslint-disable eqeqeq */
1654          return a == document ? -1 : b == document ? 1 :
1655          /* eslint-enable eqeqeq */
1656          aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; // If the nodes are siblings, we can do a quick check
1657        } else if (aup === bup) {
1658          return siblingCheck(a, b);
1659        } // Otherwise we need full lists of their ancestors for comparison
1660
1661
1662        cur = a;
1663
1664        while (cur = cur.parentNode) {
1665          ap.unshift(cur);
1666        }
1667
1668        cur = b;
1669
1670        while (cur = cur.parentNode) {
1671          bp.unshift(cur);
1672        } // Walk down the tree looking for a discrepancy
1673
1674
1675        while (ap[i] === bp[i]) {
1676          i++;
1677        }
1678
1679        return i ? // Do a sibling check if the nodes have a common ancestor
1680        siblingCheck(ap[i], bp[i]) : // Otherwise nodes in our document sort first
1681        // Support: IE 11+, Edge 17 - 18+
1682        // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1683        // two documents; shallow comparisons work.
1684
1685        /* eslint-disable eqeqeq */
1686        ap[i] == preferredDoc ? -1 : bp[i] == preferredDoc ? 1 :
1687        /* eslint-enable eqeqeq */
1688        0;
1689      };
1690      return document;
1691    };
1692
1693    Sizzle.matches = function (expr, elements) {
1694      return Sizzle(expr, null, null, elements);
1695    };
1696
1697    Sizzle.matchesSelector = function (elem, expr) {
1698      setDocument(elem);
1699
1700      if (support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
1701        try {
1702          var ret = matches.call(elem, expr); // IE 9's matchesSelector returns false on disconnected nodes
1703
1704          if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
1705          // fragment in IE 9
1706          elem.document && elem.document.nodeType !== 11) {
1707            return ret;
1708          }
1709        } catch (e) {
1710          nonnativeSelectorCache(expr, true);
1711        }
1712      }
1713
1714      return Sizzle(expr, document, null, [elem]).length > 0;
1715    };
1716
1717    Sizzle.contains = function (context, elem) {
1718      // Set document vars if needed
1719      // Support: IE 11+, Edge 17 - 18+
1720      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1721      // two documents; shallow comparisons work.
1722      // eslint-disable-next-line eqeqeq
1723      if ((context.ownerDocument || context) != document) {
1724        setDocument(context);
1725      }
1726
1727      return contains(context, elem);
1728    };
1729
1730    Sizzle.attr = function (elem, name) {
1731      // Set document vars if needed
1732      // Support: IE 11+, Edge 17 - 18+
1733      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1734      // two documents; shallow comparisons work.
1735      // eslint-disable-next-line eqeqeq
1736      if ((elem.ownerDocument || elem) != document) {
1737        setDocument(elem);
1738      }
1739
1740      var fn = Expr.attrHandle[name.toLowerCase()],
1741          // Don't get fooled by Object.prototype properties (jQuery #13807)
1742      val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
1743      return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
1744    };
1745
1746    Sizzle.escape = function (sel) {
1747      return (sel + "").replace(rcssescape, fcssescape);
1748    };
1749
1750    Sizzle.error = function (msg) {
1751      throw new Error("Syntax error, unrecognized expression: " + msg);
1752    };
1753    /**
1754     * Document sorting and removing duplicates
1755     * @param {ArrayLike} results
1756     */
1757
1758
1759    Sizzle.uniqueSort = function (results) {
1760      var elem,
1761          duplicates = [],
1762          j = 0,
1763          i = 0; // Unless we *know* we can detect duplicates, assume their presence
1764
1765      hasDuplicate = !support.detectDuplicates;
1766      sortInput = !support.sortStable && results.slice(0);
1767      results.sort(sortOrder);
1768
1769      if (hasDuplicate) {
1770        while (elem = results[i++]) {
1771          if (elem === results[i]) {
1772            j = duplicates.push(i);
1773          }
1774        }
1775
1776        while (j--) {
1777          results.splice(duplicates[j], 1);
1778        }
1779      } // Clear input after sorting to release objects
1780      // See https://github.com/jquery/sizzle/pull/225
1781
1782
1783      sortInput = null;
1784      return results;
1785    };
1786    /**
1787     * Utility function for retrieving the text value of an array of DOM nodes
1788     * @param {Array|Element} elem
1789     */
1790
1791
1792    getText = Sizzle.getText = function (elem) {
1793      var node,
1794          ret = "",
1795          i = 0,
1796          nodeType = elem.nodeType;
1797
1798      if (!nodeType) {
1799        // If no nodeType, this is expected to be an array
1800        while (node = elem[i++]) {
1801          // Do not traverse comment nodes
1802          ret += getText(node);
1803        }
1804      } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
1805        // Use textContent for elements
1806        // innerText usage removed for consistency of new lines (jQuery #11153)
1807        if (typeof elem.textContent === "string") {
1808          return elem.textContent;
1809        } else {
1810          // Traverse its children
1811          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
1812            ret += getText(elem);
1813          }
1814        }
1815      } else if (nodeType === 3 || nodeType === 4) {
1816        return elem.nodeValue;
1817      } // Do not include comment or processing instruction nodes
1818
1819
1820      return ret;
1821    };
1822
1823    Expr = Sizzle.selectors = {
1824      // Can be adjusted by the user
1825      cacheLength: 50,
1826      createPseudo: markFunction,
1827      match: matchExpr,
1828      attrHandle: {},
1829      find: {},
1830      relative: {
1831        ">": {
1832          dir: "parentNode",
1833          first: true
1834        },
1835        " ": {
1836          dir: "parentNode"
1837        },
1838        "+": {
1839          dir: "previousSibling",
1840          first: true
1841        },
1842        "~": {
1843          dir: "previousSibling"
1844        }
1845      },
1846      preFilter: {
1847        "ATTR": function ATTR(match) {
1848          match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted
1849
1850          match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
1851
1852          if (match[2] === "~=") {
1853            match[3] = " " + match[3] + " ";
1854          }
1855
1856          return match.slice(0, 4);
1857        },
1858        "CHILD": function CHILD(match) {
1859          /* matches from matchExpr["CHILD"]
1860          	1 type (only|nth|...)
1861          	2 what (child|of-type)
1862          	3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1863          	4 xn-component of xn+y argument ([+-]?\d*n|)
1864          	5 sign of xn-component
1865          	6 x of xn-component
1866          	7 sign of y-component
1867          	8 y of y-component
1868          */
1869          match[1] = match[1].toLowerCase();
1870
1871          if (match[1].slice(0, 3) === "nth") {
1872            // nth-* requires argument
1873            if (!match[3]) {
1874              Sizzle.error(match[0]);
1875            } // numeric x and y parameters for Expr.filter.CHILD
1876            // remember that false/true cast respectively to 0/1
1877
1878
1879            match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
1880            match[5] = +(match[7] + match[8] || match[3] === "odd"); // other types prohibit arguments
1881          } else if (match[3]) {
1882            Sizzle.error(match[0]);
1883          }
1884
1885          return match;
1886        },
1887        "PSEUDO": function PSEUDO(match) {
1888          var excess,
1889              unquoted = !match[6] && match[2];
1890
1891          if (matchExpr["CHILD"].test(match[0])) {
1892            return null;
1893          } // Accept quoted arguments as-is
1894
1895
1896          if (match[3]) {
1897            match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments
1898          } else if (unquoted && rpseudo.test(unquoted) && ( // Get excess from tokenize (recursively)
1899          excess = tokenize(unquoted, true)) && ( // advance to the next closing parenthesis
1900          excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
1901            // excess is a negative index
1902            match[0] = match[0].slice(0, excess);
1903            match[2] = unquoted.slice(0, excess);
1904          } // Return only captures needed by the pseudo filter method (type and argument)
1905
1906
1907          return match.slice(0, 3);
1908        }
1909      },
1910      filter: {
1911        "TAG": function TAG(nodeNameSelector) {
1912          var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
1913          return nodeNameSelector === "*" ? function () {
1914            return true;
1915          } : function (elem) {
1916            return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1917          };
1918        },
1919        "CLASS": function CLASS(className) {
1920          var pattern = classCache[className + " "];
1921          return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) {
1922            return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
1923          });
1924        },
1925        "ATTR": function ATTR(name, operator, check) {
1926          return function (elem) {
1927            var result = Sizzle.attr(elem, name);
1928
1929            if (result == null) {
1930              return operator === "!=";
1931            }
1932
1933            if (!operator) {
1934              return true;
1935            }
1936
1937            result += "";
1938            /* eslint-disable max-len */
1939
1940            return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false;
1941            /* eslint-enable max-len */
1942          };
1943        },
1944        "CHILD": function CHILD(type, what, _argument, first, last) {
1945          var simple = type.slice(0, 3) !== "nth",
1946              forward = type.slice(-4) !== "last",
1947              ofType = what === "of-type";
1948          return first === 1 && last === 0 ? // Shortcut for :nth-*(n)
1949          function (elem) {
1950            return !!elem.parentNode;
1951          } : function (elem, _context, xml) {
1952            var cache,
1953                uniqueCache,
1954                outerCache,
1955                node,
1956                nodeIndex,
1957                start,
1958                dir = simple !== forward ? "nextSibling" : "previousSibling",
1959                parent = elem.parentNode,
1960                name = ofType && elem.nodeName.toLowerCase(),
1961                useCache = !xml && !ofType,
1962                diff = false;
1963
1964            if (parent) {
1965              // :(first|last|only)-(child|of-type)
1966              if (simple) {
1967                while (dir) {
1968                  node = elem;
1969
1970                  while (node = node[dir]) {
1971                    if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
1972                      return false;
1973                    }
1974                  } // Reverse direction for :only-* (if we haven't yet done so)
1975
1976
1977                  start = dir = type === "only" && !start && "nextSibling";
1978                }
1979
1980                return true;
1981              }
1982
1983              start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent`
1984
1985              if (forward && useCache) {
1986                // Seek `elem` from a previously-cached index
1987                // ...in a gzip-friendly way
1988                node = parent;
1989                outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
1990                // Defend against cloned attroperties (jQuery gh-1709)
1991
1992                uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
1993                cache = uniqueCache[type] || [];
1994                nodeIndex = cache[0] === dirruns && cache[1];
1995                diff = nodeIndex && cache[2];
1996                node = nodeIndex && parent.childNodes[nodeIndex];
1997
1998                while (node = ++nodeIndex && node && node[dir] || ( // Fallback to seeking `elem` from the start
1999                diff = nodeIndex = 0) || start.pop()) {
2000                  // When found, cache indexes on `parent` and break
2001                  if (node.nodeType === 1 && ++diff && node === elem) {
2002                    uniqueCache[type] = [dirruns, nodeIndex, diff];
2003                    break;
2004                  }
2005                }
2006              } else {
2007                // Use previously-cached element index if available
2008                if (useCache) {
2009                  // ...in a gzip-friendly way
2010                  node = elem;
2011                  outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
2012                  // Defend against cloned attroperties (jQuery gh-1709)
2013
2014                  uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
2015                  cache = uniqueCache[type] || [];
2016                  nodeIndex = cache[0] === dirruns && cache[1];
2017                  diff = nodeIndex;
2018                } // xml :nth-child(...)
2019                // or :nth-last-child(...) or :nth(-last)?-of-type(...)
2020
2021
2022                if (diff === false) {
2023                  // Use the same loop as above to seek `elem` from the start
2024                  while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
2025                    if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
2026                      // Cache the index of each encountered element
2027                      if (useCache) {
2028                        outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
2029                        // Defend against cloned attroperties (jQuery gh-1709)
2030
2031                        uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
2032                        uniqueCache[type] = [dirruns, diff];
2033                      }
2034
2035                      if (node === elem) {
2036                        break;
2037                      }
2038                    }
2039                  }
2040                }
2041              } // Incorporate the offset, then check against cycle size
2042
2043
2044              diff -= last;
2045              return diff === first || diff % first === 0 && diff / first >= 0;
2046            }
2047          };
2048        },
2049        "PSEUDO": function PSEUDO(pseudo, argument) {
2050          // pseudo-class names are case-insensitive
2051          // http://www.w3.org/TR/selectors/#pseudo-classes
2052          // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2053          // Remember that setFilters inherits from pseudos
2054          var args,
2055              fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); // The user may use createPseudo to indicate that
2056          // arguments are needed to create the filter function
2057          // just as Sizzle does
2058
2059          if (fn[expando]) {
2060            return fn(argument);
2061          } // But maintain support for old signatures
2062
2063
2064          if (fn.length > 1) {
2065            args = [pseudo, pseudo, "", argument];
2066            return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
2067              var idx,
2068                  matched = fn(seed, argument),
2069                  i = matched.length;
2070
2071              while (i--) {
2072                idx = indexOf(seed, matched[i]);
2073                seed[idx] = !(matches[idx] = matched[i]);
2074              }
2075            }) : function (elem) {
2076              return fn(elem, 0, args);
2077            };
2078          }
2079
2080          return fn;
2081        }
2082      },
2083      pseudos: {
2084        // Potentially complex pseudos
2085        "not": markFunction(function (selector) {
2086          // Trim the selector passed to compile
2087          // to avoid treating leading and trailing
2088          // spaces as combinators
2089          var input = [],
2090              results = [],
2091              matcher = compile(selector.replace(rtrim, "$1"));
2092          return matcher[expando] ? markFunction(function (seed, matches, _context, xml) {
2093            var elem,
2094                unmatched = matcher(seed, null, xml, []),
2095                i = seed.length; // Match elements unmatched by `matcher`
2096
2097            while (i--) {
2098              if (elem = unmatched[i]) {
2099                seed[i] = !(matches[i] = elem);
2100              }
2101            }
2102          }) : function (elem, _context, xml) {
2103            input[0] = elem;
2104            matcher(input, null, xml, results); // Don't keep the element (issue #299)
2105
2106            input[0] = null;
2107            return !results.pop();
2108          };
2109        }),
2110        "has": markFunction(function (selector) {
2111          return function (elem) {
2112            return Sizzle(selector, elem).length > 0;
2113          };
2114        }),
2115        "contains": markFunction(function (text) {
2116          text = text.replace(runescape, funescape);
2117          return function (elem) {
2118            return (elem.textContent || getText(elem)).indexOf(text) > -1;
2119          };
2120        }),
2121        // "Whether an element is represented by a :lang() selector
2122        // is based solely on the element's language value
2123        // being equal to the identifier C,
2124        // or beginning with the identifier C immediately followed by "-".
2125        // The matching of C against the element's language value is performed case-insensitively.
2126        // The identifier C does not have to be a valid language name."
2127        // http://www.w3.org/TR/selectors/#lang-pseudo
2128        "lang": markFunction(function (lang) {
2129          // lang value must be a valid identifier
2130          if (!ridentifier.test(lang || "")) {
2131            Sizzle.error("unsupported lang: " + lang);
2132          }
2133
2134          lang = lang.replace(runescape, funescape).toLowerCase();
2135          return function (elem) {
2136            var elemLang;
2137
2138            do {
2139              if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
2140                elemLang = elemLang.toLowerCase();
2141                return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
2142              }
2143            } while ((elem = elem.parentNode) && elem.nodeType === 1);
2144
2145            return false;
2146          };
2147        }),
2148        // Miscellaneous
2149        "target": function target(elem) {
2150          var hash = window.location && window.location.hash;
2151          return hash && hash.slice(1) === elem.id;
2152        },
2153        "root": function root(elem) {
2154          return elem === docElem;
2155        },
2156        "focus": function focus(elem) {
2157          return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2158        },
2159        // Boolean properties
2160        "enabled": createDisabledPseudo(false),
2161        "disabled": createDisabledPseudo(true),
2162        "checked": function checked(elem) {
2163          // In CSS3, :checked should return both checked and selected elements
2164          // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2165          var nodeName = elem.nodeName.toLowerCase();
2166          return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected;
2167        },
2168        "selected": function selected(elem) {
2169          // Accessing this property makes selected-by-default
2170          // options in Safari work properly
2171          if (elem.parentNode) {
2172            // eslint-disable-next-line no-unused-expressions
2173            elem.parentNode.selectedIndex;
2174          }
2175
2176          return elem.selected === true;
2177        },
2178        // Contents
2179        "empty": function empty(elem) {
2180          // http://www.w3.org/TR/selectors/#empty-pseudo
2181          // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2182          //   but not by others (comment: 8; processing instruction: 7; etc.)
2183          // nodeType < 6 works because attributes (2) do not appear as children
2184          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
2185            if (elem.nodeType < 6) {
2186              return false;
2187            }
2188          }
2189
2190          return true;
2191        },
2192        "parent": function parent(elem) {
2193          return !Expr.pseudos["empty"](elem);
2194        },
2195        // Element/input types
2196        "header": function header(elem) {
2197          return rheader.test(elem.nodeName);
2198        },
2199        "input": function input(elem) {
2200          return rinputs.test(elem.nodeName);
2201        },
2202        "button": function button(elem) {
2203          var name = elem.nodeName.toLowerCase();
2204          return name === "input" && elem.type === "button" || name === "button";
2205        },
2206        "text": function text(elem) {
2207          var attr;
2208          return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ( // Support: IE<8
2209          // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2210          (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
2211        },
2212        // Position-in-collection
2213        "first": createPositionalPseudo(function () {
2214          return [0];
2215        }),
2216        "last": createPositionalPseudo(function (_matchIndexes, length) {
2217          return [length - 1];
2218        }),
2219        "eq": createPositionalPseudo(function (_matchIndexes, length, argument) {
2220          return [argument < 0 ? argument + length : argument];
2221        }),
2222        "even": createPositionalPseudo(function (matchIndexes, length) {
2223          var i = 0;
2224
2225          for (; i < length; i += 2) {
2226            matchIndexes.push(i);
2227          }
2228
2229          return matchIndexes;
2230        }),
2231        "odd": createPositionalPseudo(function (matchIndexes, length) {
2232          var i = 1;
2233
2234          for (; i < length; i += 2) {
2235            matchIndexes.push(i);
2236          }
2237
2238          return matchIndexes;
2239        }),
2240        "lt": createPositionalPseudo(function (matchIndexes, length, argument) {
2241          var i = argument < 0 ? argument + length : argument > length ? length : argument;
2242
2243          for (; --i >= 0;) {
2244            matchIndexes.push(i);
2245          }
2246
2247          return matchIndexes;
2248        }),
2249        "gt": createPositionalPseudo(function (matchIndexes, length, argument) {
2250          var i = argument < 0 ? argument + length : argument;
2251
2252          for (; ++i < length;) {
2253            matchIndexes.push(i);
2254          }
2255
2256          return matchIndexes;
2257        })
2258      }
2259    };
2260    Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos
2261
2262    for (i in {
2263      radio: true,
2264      checkbox: true,
2265      file: true,
2266      password: true,
2267      image: true
2268    }) {
2269      Expr.pseudos[i] = createInputPseudo(i);
2270    }
2271
2272    for (i in {
2273      submit: true,
2274      reset: true
2275    }) {
2276      Expr.pseudos[i] = createButtonPseudo(i);
2277    } // Easy API for creating new setFilters
2278
2279
2280    function setFilters() {}
2281
2282    setFilters.prototype = Expr.filters = Expr.pseudos;
2283    Expr.setFilters = new setFilters();
2284
2285    tokenize = Sizzle.tokenize = function (selector, parseOnly) {
2286      var matched,
2287          match,
2288          tokens,
2289          type,
2290          soFar,
2291          groups,
2292          preFilters,
2293          cached = tokenCache[selector + " "];
2294
2295      if (cached) {
2296        return parseOnly ? 0 : cached.slice(0);
2297      }
2298
2299      soFar = selector;
2300      groups = [];
2301      preFilters = Expr.preFilter;
2302
2303      while (soFar) {
2304        // Comma and first run
2305        if (!matched || (match = rcomma.exec(soFar))) {
2306          if (match) {
2307            // Don't consume trailing commas as valid
2308            soFar = soFar.slice(match[0].length) || soFar;
2309          }
2310
2311          groups.push(tokens = []);
2312        }
2313
2314        matched = false; // Combinators
2315
2316        if (match = rcombinators.exec(soFar)) {
2317          matched = match.shift();
2318          tokens.push({
2319            value: matched,
2320            // Cast descendant combinators to space
2321            type: match[0].replace(rtrim, " ")
2322          });
2323          soFar = soFar.slice(matched.length);
2324        } // Filters
2325
2326
2327        for (type in Expr.filter) {
2328          if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
2329            matched = match.shift();
2330            tokens.push({
2331              value: matched,
2332              type: type,
2333              matches: match
2334            });
2335            soFar = soFar.slice(matched.length);
2336          }
2337        }
2338
2339        if (!matched) {
2340          break;
2341        }
2342      } // Return the length of the invalid excess
2343      // if we're just parsing
2344      // Otherwise, throw an error or return tokens
2345
2346
2347      return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : // Cache the tokens
2348      tokenCache(selector, groups).slice(0);
2349    };
2350
2351    function toSelector(tokens) {
2352      var i = 0,
2353          len = tokens.length,
2354          selector = "";
2355
2356      for (; i < len; i++) {
2357        selector += tokens[i].value;
2358      }
2359
2360      return selector;
2361    }
2362
2363    function addCombinator(matcher, combinator, base) {
2364      var dir = combinator.dir,
2365          skip = combinator.next,
2366          key = skip || dir,
2367          checkNonElements = base && key === "parentNode",
2368          doneName = done++;
2369      return combinator.first ? // Check against closest ancestor/preceding element
2370      function (elem, context, xml) {
2371        while (elem = elem[dir]) {
2372          if (elem.nodeType === 1 || checkNonElements) {
2373            return matcher(elem, context, xml);
2374          }
2375        }
2376
2377        return false;
2378      } : // Check against all ancestor/preceding elements
2379      function (elem, context, xml) {
2380        var oldCache,
2381            uniqueCache,
2382            outerCache,
2383            newCache = [dirruns, doneName]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2384
2385        if (xml) {
2386          while (elem = elem[dir]) {
2387            if (elem.nodeType === 1 || checkNonElements) {
2388              if (matcher(elem, context, xml)) {
2389                return true;
2390              }
2391            }
2392          }
2393        } else {
2394          while (elem = elem[dir]) {
2395            if (elem.nodeType === 1 || checkNonElements) {
2396              outerCache = elem[expando] || (elem[expando] = {}); // Support: IE <9 only
2397              // Defend against cloned attroperties (jQuery gh-1709)
2398
2399              uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
2400
2401              if (skip && skip === elem.nodeName.toLowerCase()) {
2402                elem = elem[dir] || elem;
2403              } else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
2404                // Assign to newCache so results back-propagate to previous elements
2405                return newCache[2] = oldCache[2];
2406              } else {
2407                // Reuse newcache so results back-propagate to previous elements
2408                uniqueCache[key] = newCache; // A match means we're done; a fail means we have to keep checking
2409
2410                if (newCache[2] = matcher(elem, context, xml)) {
2411                  return true;
2412                }
2413              }
2414            }
2415          }
2416        }
2417
2418        return false;
2419      };
2420    }
2421
2422    function elementMatcher(matchers) {
2423      return matchers.length > 1 ? function (elem, context, xml) {
2424        var i = matchers.length;
2425
2426        while (i--) {
2427          if (!matchers[i](elem, context, xml)) {
2428            return false;
2429          }
2430        }
2431
2432        return true;
2433      } : matchers[0];
2434    }
2435
2436    function multipleContexts(selector, contexts, results) {
2437      var i = 0,
2438          len = contexts.length;
2439
2440      for (; i < len; i++) {
2441        Sizzle(selector, contexts[i], results);
2442      }
2443
2444      return results;
2445    }
2446
2447    function condense(unmatched, map, filter, context, xml) {
2448      var elem,
2449          newUnmatched = [],
2450          i = 0,
2451          len = unmatched.length,
2452          mapped = map != null;
2453
2454      for (; i < len; i++) {
2455        if (elem = unmatched[i]) {
2456          if (!filter || filter(elem, context, xml)) {
2457            newUnmatched.push(elem);
2458
2459            if (mapped) {
2460              map.push(i);
2461            }
2462          }
2463        }
2464      }
2465
2466      return newUnmatched;
2467    }
2468
2469    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
2470      if (postFilter && !postFilter[expando]) {
2471        postFilter = setMatcher(postFilter);
2472      }
2473
2474      if (postFinder && !postFinder[expando]) {
2475        postFinder = setMatcher(postFinder, postSelector);
2476      }
2477
2478      return markFunction(function (seed, results, context, xml) {
2479        var temp,
2480            i,
2481            elem,
2482            preMap = [],
2483            postMap = [],
2484            preexisting = results.length,
2485            // Get initial elements from seed or context
2486        elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
2487            // Prefilter to get matcher input, preserving a map for seed-results synchronization
2488        matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
2489            matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2490        postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary
2491        [] : // ...otherwise use results directly
2492        results : matcherIn; // Find primary matches
2493
2494        if (matcher) {
2495          matcher(matcherIn, matcherOut, context, xml);
2496        } // Apply postFilter
2497
2498
2499        if (postFilter) {
2500          temp = condense(matcherOut, postMap);
2501          postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn
2502
2503          i = temp.length;
2504
2505          while (i--) {
2506            if (elem = temp[i]) {
2507              matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
2508            }
2509          }
2510        }
2511
2512        if (seed) {
2513          if (postFinder || preFilter) {
2514            if (postFinder) {
2515              // Get the final matcherOut by condensing this intermediate into postFinder contexts
2516              temp = [];
2517              i = matcherOut.length;
2518
2519              while (i--) {
2520                if (elem = matcherOut[i]) {
2521                  // Restore matcherIn since elem is not yet a final match
2522                  temp.push(matcherIn[i] = elem);
2523                }
2524              }
2525
2526              postFinder(null, matcherOut = [], temp, xml);
2527            } // Move matched elements from seed to results to keep them synchronized
2528
2529
2530            i = matcherOut.length;
2531
2532            while (i--) {
2533              if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
2534                seed[temp] = !(results[temp] = elem);
2535              }
2536            }
2537          } // Add elements to results, through postFinder if defined
2538
2539        } else {
2540          matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
2541
2542          if (postFinder) {
2543            postFinder(null, results, matcherOut, xml);
2544          } else {
2545            push.apply(results, matcherOut);
2546          }
2547        }
2548      });
2549    }
2550
2551    function matcherFromTokens(tokens) {
2552      var checkContext,
2553          matcher,
2554          j,
2555          len = tokens.length,
2556          leadingRelative = Expr.relative[tokens[0].type],
2557          implicitRelative = leadingRelative || Expr.relative[" "],
2558          i = leadingRelative ? 1 : 0,
2559          // The foundational matcher ensures that elements are reachable from top-level context(s)
2560      matchContext = addCombinator(function (elem) {
2561        return elem === checkContext;
2562      }, implicitRelative, true),
2563          matchAnyContext = addCombinator(function (elem) {
2564        return indexOf(checkContext, elem) > -1;
2565      }, implicitRelative, true),
2566          matchers = [function (elem, context, xml) {
2567        var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element (issue #299)
2568
2569        checkContext = null;
2570        return ret;
2571      }];
2572
2573      for (; i < len; i++) {
2574        if (matcher = Expr.relative[tokens[i].type]) {
2575          matchers = [addCombinator(elementMatcher(matchers), matcher)];
2576        } else {
2577          matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher
2578
2579          if (matcher[expando]) {
2580            // Find the next relative operator (if any) for proper handling
2581            j = ++i;
2582
2583            for (; j < len; j++) {
2584              if (Expr.relative[tokens[j].type]) {
2585                break;
2586              }
2587            }
2588
2589            return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2590            tokens.slice(0, i - 1).concat({
2591              value: tokens[i - 2].type === " " ? "*" : ""
2592            })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
2593          }
2594
2595          matchers.push(matcher);
2596        }
2597      }
2598
2599      return elementMatcher(matchers);
2600    }
2601
2602    function matcherFromGroupMatchers(elementMatchers, setMatchers) {
2603      var bySet = setMatchers.length > 0,
2604          byElement = elementMatchers.length > 0,
2605          superMatcher = function superMatcher(seed, context, xml, results, outermost) {
2606        var elem,
2607            j,
2608            matcher,
2609            matchedCount = 0,
2610            i = "0",
2611            unmatched = seed && [],
2612            setMatched = [],
2613            contextBackup = outermostContext,
2614            // We must always have either seed elements or outermost context
2615        elems = seed || byElement && Expr.find["TAG"]("*", outermost),
2616            // Use integer dirruns iff this is the outermost matcher
2617        dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,
2618            len = elems.length;
2619
2620        if (outermost) {
2621          // Support: IE 11+, Edge 17 - 18+
2622          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2623          // two documents; shallow comparisons work.
2624          // eslint-disable-next-line eqeqeq
2625          outermostContext = context == document || context || outermost;
2626        } // Add elements passing elementMatchers directly to results
2627        // Support: IE<9, Safari
2628        // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2629
2630
2631        for (; i !== len && (elem = elems[i]) != null; i++) {
2632          if (byElement && elem) {
2633            j = 0; // Support: IE 11+, Edge 17 - 18+
2634            // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2635            // two documents; shallow comparisons work.
2636            // eslint-disable-next-line eqeqeq
2637
2638            if (!context && elem.ownerDocument != document) {
2639              setDocument(elem);
2640              xml = !documentIsHTML;
2641            }
2642
2643            while (matcher = elementMatchers[j++]) {
2644              if (matcher(elem, context || document, xml)) {
2645                results.push(elem);
2646                break;
2647              }
2648            }
2649
2650            if (outermost) {
2651              dirruns = dirrunsUnique;
2652            }
2653          } // Track unmatched elements for set filters
2654
2655
2656          if (bySet) {
2657            // They will have gone through all possible matchers
2658            if (elem = !matcher && elem) {
2659              matchedCount--;
2660            } // Lengthen the array for every element, matched or not
2661
2662
2663            if (seed) {
2664              unmatched.push(elem);
2665            }
2666          }
2667        } // `i` is now the count of elements visited above, and adding it to `matchedCount`
2668        // makes the latter nonnegative.
2669
2670
2671        matchedCount += i; // Apply set filters to unmatched elements
2672        // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2673        // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2674        // no element matchers and no seed.
2675        // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2676        // case, which will result in a "00" `matchedCount` that differs from `i` but is also
2677        // numerically zero.
2678
2679        if (bySet && i !== matchedCount) {
2680          j = 0;
2681
2682          while (matcher = setMatchers[j++]) {
2683            matcher(unmatched, setMatched, context, xml);
2684          }
2685
2686          if (seed) {
2687            // Reintegrate element matches to eliminate the need for sorting
2688            if (matchedCount > 0) {
2689              while (i--) {
2690                if (!(unmatched[i] || setMatched[i])) {
2691                  setMatched[i] = pop.call(results);
2692                }
2693              }
2694            } // Discard index placeholder values to get only actual matches
2695
2696
2697            setMatched = condense(setMatched);
2698          } // Add matches to results
2699
2700
2701          push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting
2702
2703          if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
2704            Sizzle.uniqueSort(results);
2705          }
2706        } // Override manipulation of globals by nested matchers
2707
2708
2709        if (outermost) {
2710          dirruns = dirrunsUnique;
2711          outermostContext = contextBackup;
2712        }
2713
2714        return unmatched;
2715      };
2716
2717      return bySet ? markFunction(superMatcher) : superMatcher;
2718    }
2719
2720    compile = Sizzle.compile = function (selector, match
2721    /* Internal Use Only */
2722    ) {
2723      var i,
2724          setMatchers = [],
2725          elementMatchers = [],
2726          cached = compilerCache[selector + " "];
2727
2728      if (!cached) {
2729        // Generate a function of recursive functions that can be used to check each element
2730        if (!match) {
2731          match = tokenize(selector);
2732        }
2733
2734        i = match.length;
2735
2736        while (i--) {
2737          cached = matcherFromTokens(match[i]);
2738
2739          if (cached[expando]) {
2740            setMatchers.push(cached);
2741          } else {
2742            elementMatchers.push(cached);
2743          }
2744        } // Cache the compiled function
2745
2746
2747        cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization
2748
2749        cached.selector = selector;
2750      }
2751
2752      return cached;
2753    };
2754    /**
2755     * A low-level selection function that works with Sizzle's compiled
2756     *  selector functions
2757     * @param {String|Function} selector A selector or a pre-compiled
2758     *  selector function built with Sizzle.compile
2759     * @param {Element} context
2760     * @param {Array} [results]
2761     * @param {Array} [seed] A set of elements to match against
2762     */
2763
2764
2765    select = Sizzle.select = function (selector, context, results, seed) {
2766      var i,
2767          tokens,
2768          token,
2769          type,
2770          find,
2771          compiled = typeof selector === "function" && selector,
2772          match = !seed && tokenize(selector = compiled.selector || selector);
2773      results = results || []; // Try to minimize operations if there is only one selector in the list and no seed
2774      // (the latter of which guarantees us context)
2775
2776      if (match.length === 1) {
2777        // Reduce context if the leading compound selector is an ID
2778        tokens = match[0] = match[0].slice(0);
2779
2780        if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
2781          context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
2782
2783          if (!context) {
2784            return results; // Precompiled matchers will still verify ancestry, so step up a level
2785          } else if (compiled) {
2786            context = context.parentNode;
2787          }
2788
2789          selector = selector.slice(tokens.shift().value.length);
2790        } // Fetch a seed set for right-to-left matching
2791
2792
2793        i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
2794
2795        while (i--) {
2796          token = tokens[i]; // Abort if we hit a combinator
2797
2798          if (Expr.relative[type = token.type]) {
2799            break;
2800          }
2801
2802          if (find = Expr.find[type]) {
2803            // Search, expanding context for leading sibling combinators
2804            if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
2805              // If seed is empty or no tokens remain, we can return early
2806              tokens.splice(i, 1);
2807              selector = seed.length && toSelector(tokens);
2808
2809              if (!selector) {
2810                push.apply(results, seed);
2811                return results;
2812              }
2813
2814              break;
2815            }
2816          }
2817        }
2818      } // Compile and execute a filtering function if one is not provided
2819      // Provide `match` to avoid retokenization if we modified the selector above
2820
2821
2822      (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);
2823      return results;
2824    }; // One-time assignments
2825    // Sort stability
2826
2827
2828    support.sortStable = expando.split("").sort(sortOrder).join("") === expando; // Support: Chrome 14-35+
2829    // Always assume duplicates if they aren't passed to the comparison function
2830
2831    support.detectDuplicates = !!hasDuplicate; // Initialize against the default document
2832
2833    setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2834    // Detached nodes confoundingly follow *each other*
2835
2836    support.sortDetached = assert(function (el) {
2837      // Should return 1, but returns 4 (following)
2838      return el.compareDocumentPosition(document.createElement("fieldset")) & 1;
2839    }); // Support: IE<8
2840    // Prevent attribute/property "interpolation"
2841    // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2842
2843    if (!assert(function (el) {
2844      el.innerHTML = "<a href='#'></a>";
2845      return el.firstChild.getAttribute("href") === "#";
2846    })) {
2847      addHandle("type|href|height|width", function (elem, name, isXML) {
2848        if (!isXML) {
2849          return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
2850        }
2851      });
2852    } // Support: IE<9
2853    // Use defaultValue in place of getAttribute("value")
2854
2855
2856    if (!support.attributes || !assert(function (el) {
2857      el.innerHTML = "<input/>";
2858      el.firstChild.setAttribute("value", "");
2859      return el.firstChild.getAttribute("value") === "";
2860    })) {
2861      addHandle("value", function (elem, _name, isXML) {
2862        if (!isXML && elem.nodeName.toLowerCase() === "input") {
2863          return elem.defaultValue;
2864        }
2865      });
2866    } // Support: IE<9
2867    // Use getAttributeNode to fetch booleans when getAttribute lies
2868
2869
2870    if (!assert(function (el) {
2871      return el.getAttribute("disabled") == null;
2872    })) {
2873      addHandle(booleans, function (elem, name, isXML) {
2874        var val;
2875
2876        if (!isXML) {
2877          return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
2878        }
2879      });
2880    }
2881
2882    return Sizzle;
2883  }(window);
2884
2885  jQuery.find = Sizzle;
2886  jQuery.expr = Sizzle.selectors; // Deprecated
2887
2888  jQuery.expr[":"] = jQuery.expr.pseudos;
2889  jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
2890  jQuery.text = Sizzle.getText;
2891  jQuery.isXMLDoc = Sizzle.isXML;
2892  jQuery.contains = Sizzle.contains;
2893  jQuery.escapeSelector = Sizzle.escape;
2894
2895  var dir = function dir(elem, _dir, until) {
2896    var matched = [],
2897        truncate = until !== undefined;
2898
2899    while ((elem = elem[_dir]) && elem.nodeType !== 9) {
2900      if (elem.nodeType === 1) {
2901        if (truncate && jQuery(elem).is(until)) {
2902          break;
2903        }
2904
2905        matched.push(elem);
2906      }
2907    }
2908
2909    return matched;
2910  };
2911
2912  var _siblings = function siblings(n, elem) {
2913    var matched = [];
2914
2915    for (; n; n = n.nextSibling) {
2916      if (n.nodeType === 1 && n !== elem) {
2917        matched.push(n);
2918      }
2919    }
2920
2921    return matched;
2922  };
2923
2924  var rneedsContext = jQuery.expr.match.needsContext;
2925
2926  function nodeName(elem, name) {
2927    return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
2928  }
2929
2930  var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; // Implement the identical functionality for filter and not
2931
2932  function winnow(elements, qualifier, not) {
2933    if (isFunction(qualifier)) {
2934      return jQuery.grep(elements, function (elem, i) {
2935        return !!qualifier.call(elem, i, elem) !== not;
2936      });
2937    } // Single element
2938
2939
2940    if (qualifier.nodeType) {
2941      return jQuery.grep(elements, function (elem) {
2942        return elem === qualifier !== not;
2943      });
2944    } // Arraylike of elements (jQuery, arguments, Array)
2945
2946
2947    if (typeof qualifier !== "string") {
2948      return jQuery.grep(elements, function (elem) {
2949        return indexOf.call(qualifier, elem) > -1 !== not;
2950      });
2951    } // Filtered directly for both simple and complex selectors
2952
2953
2954    return jQuery.filter(qualifier, elements, not);
2955  }
2956
2957  jQuery.filter = function (expr, elems, not) {
2958    var elem = elems[0];
2959
2960    if (not) {
2961      expr = ":not(" + expr + ")";
2962    }
2963
2964    if (elems.length === 1 && elem.nodeType === 1) {
2965      return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
2966    }
2967
2968    return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
2969      return elem.nodeType === 1;
2970    }));
2971  };
2972
2973  jQuery.fn.extend({
2974    find: function find(selector) {
2975      var i,
2976          ret,
2977          len = this.length,
2978          self = this;
2979
2980      if (typeof selector !== "string") {
2981        return this.pushStack(jQuery(selector).filter(function () {
2982          for (i = 0; i < len; i++) {
2983            if (jQuery.contains(self[i], this)) {
2984              return true;
2985            }
2986          }
2987        }));
2988      }
2989
2990      ret = this.pushStack([]);
2991
2992      for (i = 0; i < len; i++) {
2993        jQuery.find(selector, self[i], ret);
2994      }
2995
2996      return len > 1 ? jQuery.uniqueSort(ret) : ret;
2997    },
2998    filter: function filter(selector) {
2999      return this.pushStack(winnow(this, selector || [], false));
3000    },
3001    not: function not(selector) {
3002      return this.pushStack(winnow(this, selector || [], true));
3003    },
3004    is: function is(selector) {
3005      return !!winnow(this, // If this is a positional/relative selector, check membership in the returned set
3006      // so $("p:first").is("p:last") won't return true for a doc with two "p".
3007      typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
3008    }
3009  }); // Initialize a jQuery object
3010  // A central reference to the root jQuery(document)
3011
3012  var rootjQuery,
3013      // A simple way to check for HTML strings
3014  // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3015  // Strict HTML recognition (#11290: must start with <)
3016  // Shortcut simple #id case for speed
3017  rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3018      init = jQuery.fn.init = function (selector, context, root) {
3019    var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false)
3020
3021    if (!selector) {
3022      return this;
3023    } // Method init() accepts an alternate rootjQuery
3024    // so migrate can support jQuery.sub (gh-2101)
3025
3026
3027    root = root || rootjQuery; // Handle HTML strings
3028
3029    if (typeof selector === "string") {
3030      if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
3031        // Assume that strings that start and end with <> are HTML and skip the regex check
3032        match = [null, selector, null];
3033      } else {
3034        match = rquickExpr.exec(selector);
3035      } // Match html or make sure no context is specified for #id
3036
3037
3038      if (match && (match[1] || !context)) {
3039        // HANDLE: $(html) -> $(array)
3040        if (match[1]) {
3041          context = context instanceof jQuery ? context[0] : context; // Option to run scripts is true for back-compat
3042          // Intentionally let the error be thrown if parseHTML is not present
3043
3044          jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); // HANDLE: $(html, props)
3045
3046          if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
3047            for (match in context) {
3048              // Properties of context are called as methods if possible
3049              if (isFunction(this[match])) {
3050                this[match](context[match]); // ...and otherwise set as attributes
3051              } else {
3052                this.attr(match, context[match]);
3053              }
3054            }
3055          }
3056
3057          return this; // HANDLE: $(#id)
3058        } else {
3059          elem = document.getElementById(match[2]);
3060
3061          if (elem) {
3062            // Inject the element directly into the jQuery object
3063            this[0] = elem;
3064            this.length = 1;
3065          }
3066
3067          return this;
3068        } // HANDLE: $(expr, $(...))
3069
3070      } else if (!context || context.jquery) {
3071        return (context || root).find(selector); // HANDLE: $(expr, context)
3072        // (which is just equivalent to: $(context).find(expr)
3073      } else {
3074        return this.constructor(context).find(selector);
3075      } // HANDLE: $(DOMElement)
3076
3077    } else if (selector.nodeType) {
3078      this[0] = selector;
3079      this.length = 1;
3080      return this; // HANDLE: $(function)
3081      // Shortcut for document ready
3082    } else if (isFunction(selector)) {
3083      return root.ready !== undefined ? root.ready(selector) : // Execute immediately if ready is not present
3084      selector(jQuery);
3085    }
3086
3087    return jQuery.makeArray(selector, this);
3088  }; // Give the init function the jQuery prototype for later instantiation
3089
3090
3091  init.prototype = jQuery.fn; // Initialize central reference
3092
3093  rootjQuery = jQuery(document);
3094  var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3095      // Methods guaranteed to produce a unique set when starting from a unique set
3096  guaranteedUnique = {
3097    children: true,
3098    contents: true,
3099    next: true,
3100    prev: true
3101  };
3102  jQuery.fn.extend({
3103    has: function has(target) {
3104      var targets = jQuery(target, this),
3105          l = targets.length;
3106      return this.filter(function () {
3107        var i = 0;
3108
3109        for (; i < l; i++) {
3110          if (jQuery.contains(this, targets[i])) {
3111            return true;
3112          }
3113        }
3114      });
3115    },
3116    closest: function closest(selectors, context) {
3117      var cur,
3118          i = 0,
3119          l = this.length,
3120          matched = [],
3121          targets = typeof selectors !== "string" && jQuery(selectors); // Positional selectors never match, since there's no _selection_ context
3122
3123      if (!rneedsContext.test(selectors)) {
3124        for (; i < l; i++) {
3125          for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
3126            // Always skip document fragments
3127            if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : // Don't pass non-elements to Sizzle
3128            cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {
3129              matched.push(cur);
3130              break;
3131            }
3132          }
3133        }
3134      }
3135
3136      return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
3137    },
3138    // Determine the position of an element within the set
3139    index: function index(elem) {
3140      // No argument, return index in parent
3141      if (!elem) {
3142        return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
3143      } // Index in selector
3144
3145
3146      if (typeof elem === "string") {
3147        return indexOf.call(jQuery(elem), this[0]);
3148      } // Locate the position of the desired element
3149
3150
3151      return indexOf.call(this, // If it receives a jQuery object, the first element is used
3152      elem.jquery ? elem[0] : elem);
3153    },
3154    add: function add(selector, context) {
3155      return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));
3156    },
3157    addBack: function addBack(selector) {
3158      return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));
3159    }
3160  });
3161
3162  function sibling(cur, dir) {
3163    while ((cur = cur[dir]) && cur.nodeType !== 1) {}
3164
3165    return cur;
3166  }
3167
3168  jQuery.each({
3169    parent: function parent(elem) {
3170      var parent = elem.parentNode;
3171      return parent && parent.nodeType !== 11 ? parent : null;
3172    },
3173    parents: function parents(elem) {
3174      return dir(elem, "parentNode");
3175    },
3176    parentsUntil: function parentsUntil(elem, _i, until) {
3177      return dir(elem, "parentNode", until);
3178    },
3179    next: function next(elem) {
3180      return sibling(elem, "nextSibling");
3181    },
3182    prev: function prev(elem) {
3183      return sibling(elem, "previousSibling");
3184    },
3185    nextAll: function nextAll(elem) {
3186      return dir(elem, "nextSibling");
3187    },
3188    prevAll: function prevAll(elem) {
3189      return dir(elem, "previousSibling");
3190    },
3191    nextUntil: function nextUntil(elem, _i, until) {
3192      return dir(elem, "nextSibling", until);
3193    },
3194    prevUntil: function prevUntil(elem, _i, until) {
3195      return dir(elem, "previousSibling", until);
3196    },
3197    siblings: function siblings(elem) {
3198      return _siblings((elem.parentNode || {}).firstChild, elem);
3199    },
3200    children: function children(elem) {
3201      return _siblings(elem.firstChild);
3202    },
3203    contents: function contents(elem) {
3204      if (elem.contentDocument != null && // Support: IE 11+
3205      // <object> elements with no `data` attribute has an object
3206      // `contentDocument` with a `null` prototype.
3207      getProto(elem.contentDocument)) {
3208        return elem.contentDocument;
3209      } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3210      // Treat the template element as a regular one in browsers that
3211      // don't support it.
3212
3213
3214      if (nodeName(elem, "template")) {
3215        elem = elem.content || elem;
3216      }
3217
3218      return jQuery.merge([], elem.childNodes);
3219    }
3220  }, function (name, fn) {
3221    jQuery.fn[name] = function (until, selector) {
3222      var matched = jQuery.map(this, fn, until);
3223
3224      if (name.slice(-5) !== "Until") {
3225        selector = until;
3226      }
3227
3228      if (selector && typeof selector === "string") {
3229        matched = jQuery.filter(selector, matched);
3230      }
3231
3232      if (this.length > 1) {
3233        // Remove duplicates
3234        if (!guaranteedUnique[name]) {
3235          jQuery.uniqueSort(matched);
3236        } // Reverse order for parents* and prev-derivatives
3237
3238
3239        if (rparentsprev.test(name)) {
3240          matched.reverse();
3241        }
3242      }
3243
3244      return this.pushStack(matched);
3245    };
3246  });
3247  var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; // Convert String-formatted options into Object-formatted ones
3248
3249  function createOptions(options) {
3250    var object = {};
3251    jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) {
3252      object[flag] = true;
3253    });
3254    return object;
3255  }
3256  /*
3257   * Create a callback list using the following parameters:
3258   *
3259   *	options: an optional list of space-separated options that will change how
3260   *			the callback list behaves or a more traditional option object
3261   *
3262   * By default a callback list will act like an event callback list and can be
3263   * "fired" multiple times.
3264   *
3265   * Possible options:
3266   *
3267   *	once:			will ensure the callback list can only be fired once (like a Deferred)
3268   *
3269   *	memory:			will keep track of previous values and will call any callback added
3270   *					after the list has been fired right away with the latest "memorized"
3271   *					values (like a Deferred)
3272   *
3273   *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3274   *
3275   *	stopOnFalse:	interrupt callings when a callback returns false
3276   *
3277   */
3278
3279
3280  jQuery.Callbacks = function (options) {
3281    // Convert options from String-formatted to Object-formatted if needed
3282    // (we check in cache first)
3283    options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);
3284
3285    var // Flag to know if list is currently firing
3286    firing,
3287        // Last fire value for non-forgettable lists
3288    memory,
3289        // Flag to know if list was already fired
3290    _fired,
3291        // Flag to prevent firing
3292    _locked,
3293        // Actual callback list
3294    list = [],
3295        // Queue of execution data for repeatable lists
3296    queue = [],
3297        // Index of currently firing callback (modified by add/remove as needed)
3298    firingIndex = -1,
3299        // Fire callbacks
3300    fire = function fire() {
3301      // Enforce single-firing
3302      _locked = _locked || options.once; // Execute callbacks for all pending executions,
3303      // respecting firingIndex overrides and runtime changes
3304
3305      _fired = firing = true;
3306
3307      for (; queue.length; firingIndex = -1) {
3308        memory = queue.shift();
3309
3310        while (++firingIndex < list.length) {
3311          // Run callback and check for early termination
3312          if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
3313            // Jump to end and forget the data so .add doesn't re-fire
3314            firingIndex = list.length;
3315            memory = false;
3316          }
3317        }
3318      } // Forget the data if we're done with it
3319
3320
3321      if (!options.memory) {
3322        memory = false;
3323      }
3324
3325      firing = false; // Clean up if we're done firing for good
3326
3327      if (_locked) {
3328        // Keep an empty list if we have data for future add calls
3329        if (memory) {
3330          list = []; // Otherwise, this object is spent
3331        } else {
3332          list = "";
3333        }
3334      }
3335    },
3336        // Actual Callbacks object
3337    self = {
3338      // Add a callback or a collection of callbacks to the list
3339      add: function add() {
3340        if (list) {
3341          // If we have memory from a past run, we should fire after adding
3342          if (memory && !firing) {
3343            firingIndex = list.length - 1;
3344            queue.push(memory);
3345          }
3346
3347          (function add(args) {
3348            jQuery.each(args, function (_, arg) {
3349              if (isFunction(arg)) {
3350                if (!options.unique || !self.has(arg)) {
3351                  list.push(arg);
3352                }
3353              } else if (arg && arg.length && toType(arg) !== "string") {
3354                // Inspect recursively
3355                add(arg);
3356              }
3357            });
3358          })(arguments);
3359
3360          if (memory && !firing) {
3361            fire();
3362          }
3363        }
3364
3365        return this;
3366      },
3367      // Remove a callback from the list
3368      remove: function remove() {
3369        jQuery.each(arguments, function (_, arg) {
3370          var index;
3371
3372          while ((index = jQuery.inArray(arg, list, index)) > -1) {
3373            list.splice(index, 1); // Handle firing indexes
3374
3375            if (index <= firingIndex) {
3376              firingIndex--;
3377            }
3378          }
3379        });
3380        return this;
3381      },
3382      // Check if a given callback is in the list.
3383      // If no argument is given, return whether or not list has callbacks attached.
3384      has: function has(fn) {
3385        return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
3386      },
3387      // Remove all callbacks from the list
3388      empty: function empty() {
3389        if (list) {
3390          list = [];
3391        }
3392
3393        return this;
3394      },
3395      // Disable .fire and .add
3396      // Abort any current/pending executions
3397      // Clear all callbacks and values
3398      disable: function disable() {
3399        _locked = queue = [];
3400        list = memory = "";
3401        return this;
3402      },
3403      disabled: function disabled() {
3404        return !list;
3405      },
3406      // Disable .fire
3407      // Also disable .add unless we have memory (since it would have no effect)
3408      // Abort any pending executions
3409      lock: function lock() {
3410        _locked = queue = [];
3411
3412        if (!memory && !firing) {
3413          list = memory = "";
3414        }
3415
3416        return this;
3417      },
3418      locked: function locked() {
3419        return !!_locked;
3420      },
3421      // Call all callbacks with the given context and arguments
3422      fireWith: function fireWith(context, args) {
3423        if (!_locked) {
3424          args = args || [];
3425          args = [context, args.slice ? args.slice() : args];
3426          queue.push(args);
3427
3428          if (!firing) {
3429            fire();
3430          }
3431        }
3432
3433        return this;
3434      },
3435      // Call all the callbacks with the given arguments
3436      fire: function fire() {
3437        self.fireWith(this, arguments);
3438        return this;
3439      },
3440      // To know if the callbacks have already been called at least once
3441      fired: function fired() {
3442        return !!_fired;
3443      }
3444    };
3445
3446    return self;
3447  };
3448
3449  function Identity(v) {
3450    return v;
3451  }
3452
3453  function Thrower(ex) {
3454    throw ex;
3455  }
3456
3457  function adoptValue(value, resolve, reject, noValue) {
3458    var method;
3459
3460    try {
3461      // Check for promise aspect first to privilege synchronous behavior
3462      if (value && isFunction(method = value.promise)) {
3463        method.call(value).done(resolve).fail(reject); // Other thenables
3464      } else if (value && isFunction(method = value.then)) {
3465        method.call(value, resolve, reject); // Other non-thenables
3466      } else {
3467        // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3468        // * false: [ value ].slice( 0 ) => resolve( value )
3469        // * true: [ value ].slice( 1 ) => resolve()
3470        resolve.apply(undefined, [value].slice(noValue));
3471      } // For Promises/A+, convert exceptions into rejections
3472      // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3473      // Deferred#then to conditionally suppress rejection.
3474
3475    } catch (value) {
3476      // Support: Android 4.0 only
3477      // Strict mode functions invoked without .call/.apply get global-object context
3478      reject.apply(undefined, [value]);
3479    }
3480  }
3481
3482  jQuery.extend({
3483    Deferred: function Deferred(func) {
3484      var tuples = [// action, add listener, callbacks,
3485      // ... .then handlers, argument index, [final state]
3486      ["notify", "progress", jQuery.Callbacks("memory"), jQuery.Callbacks("memory"), 2], ["resolve", "done", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 1, "rejected"]],
3487          _state = "pending",
3488          _promise = {
3489        state: function state() {
3490          return _state;
3491        },
3492        always: function always() {
3493          deferred.done(arguments).fail(arguments);
3494          return this;
3495        },
3496        "catch": function _catch(fn) {
3497          return _promise.then(null, fn);
3498        },
3499        // Keep pipe for back-compat
3500        pipe: function
3501          /* fnDone, fnFail, fnProgress */
3502        pipe() {
3503          var fns = arguments;
3504          return jQuery.Deferred(function (newDefer) {
3505            jQuery.each(tuples, function (_i, tuple) {
3506              // Map tuples (progress, done, fail) to arguments (done, fail, progress)
3507              var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; // deferred.progress(function() { bind to newDefer or newDefer.notify })
3508              // deferred.done(function() { bind to newDefer or newDefer.resolve })
3509              // deferred.fail(function() { bind to newDefer or newDefer.reject })
3510
3511              deferred[tuple[1]](function () {
3512                var returned = fn && fn.apply(this, arguments);
3513
3514                if (returned && isFunction(returned.promise)) {
3515                  returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
3516                } else {
3517                  newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments);
3518                }
3519              });
3520            });
3521            fns = null;
3522          }).promise();
3523        },
3524        then: function then(onFulfilled, onRejected, onProgress) {
3525          var maxDepth = 0;
3526
3527          function resolve(depth, deferred, handler, special) {
3528            return function () {
3529              var that = this,
3530                  args = arguments,
3531                  mightThrow = function mightThrow() {
3532                var returned, then; // Support: Promises/A+ section 2.3.3.3.3
3533                // https://promisesaplus.com/#point-59
3534                // Ignore double-resolution attempts
3535
3536                if (depth < maxDepth) {
3537                  return;
3538                }
3539
3540                returned = handler.apply(that, args); // Support: Promises/A+ section 2.3.1
3541                // https://promisesaplus.com/#point-48
3542
3543                if (returned === deferred.promise()) {
3544                  throw new TypeError("Thenable self-resolution");
3545                } // Support: Promises/A+ sections 2.3.3.1, 3.5
3546                // https://promisesaplus.com/#point-54
3547                // https://promisesaplus.com/#point-75
3548                // Retrieve `then` only once
3549
3550
3551                then = returned && ( // Support: Promises/A+ section 2.3.4
3552                // https://promisesaplus.com/#point-64
3553                // Only check objects and functions for thenability
3554                _typeof(returned) === "object" || typeof returned === "function") && returned.then; // Handle a returned thenable
3555
3556                if (isFunction(then)) {
3557                  // Special processors (notify) just wait for resolution
3558                  if (special) {
3559                    then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special)); // Normal processors (resolve) also hook into progress
3560                  } else {
3561                    // ...and disregard older resolution values
3562                    maxDepth++;
3563                    then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith));
3564                  } // Handle all other returned values
3565
3566                } else {
3567                  // Only substitute handlers pass on context
3568                  // and multiple values (non-spec behavior)
3569                  if (handler !== Identity) {
3570                    that = undefined;
3571                    args = [returned];
3572                  } // Process the value(s)
3573                  // Default process is resolve
3574
3575
3576                  (special || deferred.resolveWith)(that, args);
3577                }
3578              },
3579                  // Only normal processors (resolve) catch and reject exceptions
3580              process = special ? mightThrow : function () {
3581                try {
3582                  mightThrow();
3583                } catch (e) {
3584                  if (jQuery.Deferred.exceptionHook) {
3585                    jQuery.Deferred.exceptionHook(e, process.stackTrace);
3586                  } // Support: Promises/A+ section 2.3.3.3.4.1
3587                  // https://promisesaplus.com/#point-61
3588                  // Ignore post-resolution exceptions
3589
3590
3591                  if (depth + 1 >= maxDepth) {
3592                    // Only substitute handlers pass on context
3593                    // and multiple values (non-spec behavior)
3594                    if (handler !== Thrower) {
3595                      that = undefined;
3596                      args = [e];
3597                    }
3598
3599                    deferred.rejectWith(that, args);
3600                  }
3601                }
3602              }; // Support: Promises/A+ section 2.3.3.3.1
3603              // https://promisesaplus.com/#point-57
3604              // Re-resolve promises immediately to dodge false rejection from
3605              // subsequent errors
3606
3607
3608              if (depth) {
3609                process();
3610              } else {
3611                // Call an optional hook to record the stack, in case of exception
3612                // since it's otherwise lost when execution goes async
3613                if (jQuery.Deferred.getStackHook) {
3614                  process.stackTrace = jQuery.Deferred.getStackHook();
3615                }
3616
3617                window.setTimeout(process);
3618              }
3619            };
3620          }
3621
3622          return jQuery.Deferred(function (newDefer) {
3623            // progress_handlers.add( ... )
3624            tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith)); // fulfilled_handlers.add( ... )
3625
3626            tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity)); // rejected_handlers.add( ... )
3627
3628            tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower));
3629          }).promise();
3630        },
3631        // Get a promise for this deferred
3632        // If obj is provided, the promise aspect is added to the object
3633        promise: function promise(obj) {
3634          return obj != null ? jQuery.extend(obj, _promise) : _promise;
3635        }
3636      },
3637          deferred = {}; // Add list-specific methods
3638
3639      jQuery.each(tuples, function (i, tuple) {
3640        var list = tuple[2],
3641            stateString = tuple[5]; // promise.progress = list.add
3642        // promise.done = list.add
3643        // promise.fail = list.add
3644
3645        _promise[tuple[1]] = list.add; // Handle state
3646
3647        if (stateString) {
3648          list.add(function () {
3649            // state = "resolved" (i.e., fulfilled)
3650            // state = "rejected"
3651            _state = stateString;
3652          }, // rejected_callbacks.disable
3653          // fulfilled_callbacks.disable
3654          tuples[3 - i][2].disable, // rejected_handlers.disable
3655          // fulfilled_handlers.disable
3656          tuples[3 - i][3].disable, // progress_callbacks.lock
3657          tuples[0][2].lock, // progress_handlers.lock
3658          tuples[0][3].lock);
3659        } // progress_handlers.fire
3660        // fulfilled_handlers.fire
3661        // rejected_handlers.fire
3662
3663
3664        list.add(tuple[3].fire); // deferred.notify = function() { deferred.notifyWith(...) }
3665        // deferred.resolve = function() { deferred.resolveWith(...) }
3666        // deferred.reject = function() { deferred.rejectWith(...) }
3667
3668        deferred[tuple[0]] = function () {
3669          deferred[tuple[0] + "With"](this === deferred ? undefined : this, arguments);
3670          return this;
3671        }; // deferred.notifyWith = list.fireWith
3672        // deferred.resolveWith = list.fireWith
3673        // deferred.rejectWith = list.fireWith
3674
3675
3676        deferred[tuple[0] + "With"] = list.fireWith;
3677      }); // Make the deferred a promise
3678
3679      _promise.promise(deferred); // Call given func if any
3680
3681
3682      if (func) {
3683        func.call(deferred, deferred);
3684      } // All done!
3685
3686
3687      return deferred;
3688    },
3689    // Deferred helper
3690    when: function when(singleValue) {
3691      var // count of uncompleted subordinates
3692      remaining = arguments.length,
3693          // count of unprocessed arguments
3694      i = remaining,
3695          // subordinate fulfillment data
3696      resolveContexts = Array(i),
3697          resolveValues = _slice.call(arguments),
3698          // the primary Deferred
3699      primary = jQuery.Deferred(),
3700          // subordinate callback factory
3701      updateFunc = function updateFunc(i) {
3702        return function (value) {
3703          resolveContexts[i] = this;
3704          resolveValues[i] = arguments.length > 1 ? _slice.call(arguments) : value;
3705
3706          if (! --remaining) {
3707            primary.resolveWith(resolveContexts, resolveValues);
3708          }
3709        };
3710      }; // Single- and empty arguments are adopted like Promise.resolve
3711
3712
3713      if (remaining <= 1) {
3714        adoptValue(singleValue, primary.done(updateFunc(i)).resolve, primary.reject, !remaining); // Use .then() to unwrap secondary thenables (cf. gh-3000)
3715
3716        if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {
3717          return primary.then();
3718        }
3719      } // Multiple arguments are aggregated like Promise.all array elements
3720
3721
3722      while (i--) {
3723        adoptValue(resolveValues[i], updateFunc(i), primary.reject);
3724      }
3725
3726      return primary.promise();
3727    }
3728  }); // These usually indicate a programmer mistake during development,
3729  // warn about them ASAP rather than swallowing them by default.
3730
3731  var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
3732
3733  jQuery.Deferred.exceptionHook = function (error, stack) {
3734    // Support: IE 8 - 9 only
3735    // Console exists when dev tools are open, which can happen at any time
3736    if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {
3737      window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack);
3738    }
3739  };
3740
3741  jQuery.readyException = function (error) {
3742    window.setTimeout(function () {
3743      throw error;
3744    });
3745  }; // The deferred used on DOM ready
3746
3747
3748  var readyList = jQuery.Deferred();
3749
3750  jQuery.fn.ready = function (fn) {
3751    readyList.then(fn) // Wrap jQuery.readyException in a function so that the lookup
3752    // happens at the time of error handling instead of callback
3753    // registration.
3754    ["catch"](function (error) {
3755      jQuery.readyException(error);
3756    });
3757    return this;
3758  };
3759
3760  jQuery.extend({
3761    // Is the DOM ready to be used? Set to true once it occurs.
3762    isReady: false,
3763    // A counter to track how many items to wait for before
3764    // the ready event fires. See #6781
3765    readyWait: 1,
3766    // Handle when the DOM is ready
3767    ready: function ready(wait) {
3768      // Abort if there are pending holds or we're already ready
3769      if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
3770        return;
3771      } // Remember that the DOM is ready
3772
3773
3774      jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be
3775
3776      if (wait !== true && --jQuery.readyWait > 0) {
3777        return;
3778      } // If there are functions bound, to execute
3779
3780
3781      readyList.resolveWith(document, [jQuery]);
3782    }
3783  });
3784  jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method
3785
3786  function completed() {
3787    document.removeEventListener("DOMContentLoaded", completed);
3788    window.removeEventListener("load", completed);
3789    jQuery.ready();
3790  } // Catch cases where $(document).ready() is called
3791  // after the browser event has already occurred.
3792  // Support: IE <=9 - 10 only
3793  // Older IE sometimes signals "interactive" too soon
3794
3795
3796  if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) {
3797    // Handle it asynchronously to allow scripts the opportunity to delay ready
3798    window.setTimeout(jQuery.ready);
3799  } else {
3800    // Use the handy event callback
3801    document.addEventListener("DOMContentLoaded", completed); // A fallback to window.onload, that will always work
3802
3803    window.addEventListener("load", completed);
3804  } // Multifunctional method to get and set values of a collection
3805  // The value/s can optionally be executed if it's a function
3806
3807
3808  var access = function access(elems, fn, key, value, chainable, emptyGet, raw) {
3809    var i = 0,
3810        len = elems.length,
3811        bulk = key == null; // Sets many values
3812
3813    if (toType(key) === "object") {
3814      chainable = true;
3815
3816      for (i in key) {
3817        access(elems, fn, i, key[i], true, emptyGet, raw);
3818      } // Sets one value
3819
3820    } else if (value !== undefined) {
3821      chainable = true;
3822
3823      if (!isFunction(value)) {
3824        raw = true;
3825      }
3826
3827      if (bulk) {
3828        // Bulk operations run against the entire set
3829        if (raw) {
3830          fn.call(elems, value);
3831          fn = null; // ...except when executing function values
3832        } else {
3833          bulk = fn;
3834
3835          fn = function fn(elem, _key, value) {
3836            return bulk.call(jQuery(elem), value);
3837          };
3838        }
3839      }
3840
3841      if (fn) {
3842        for (; i < len; i++) {
3843          fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
3844        }
3845      }
3846    }
3847
3848    if (chainable) {
3849      return elems;
3850    } // Gets
3851
3852
3853    if (bulk) {
3854      return fn.call(elems);
3855    }
3856
3857    return len ? fn(elems[0], key) : emptyGet;
3858  }; // Matches dashed string for camelizing
3859
3860
3861  var rmsPrefix = /^-ms-/,
3862      rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace()
3863
3864  function fcamelCase(_all, letter) {
3865    return letter.toUpperCase();
3866  } // Convert dashed to camelCase; used by the css and data modules
3867  // Support: IE <=9 - 11, Edge 12 - 15
3868  // Microsoft forgot to hump their vendor prefix (#9572)
3869
3870
3871  function camelCase(string) {
3872    return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
3873  }
3874
3875  var acceptData = function acceptData(owner) {
3876    // Accepts only:
3877    //  - Node
3878    //    - Node.ELEMENT_NODE
3879    //    - Node.DOCUMENT_NODE
3880    //  - Object
3881    //    - Any
3882    return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
3883  };
3884
3885  function Data() {
3886    this.expando = jQuery.expando + Data.uid++;
3887  }
3888
3889  Data.uid = 1;
3890  Data.prototype = {
3891    cache: function cache(owner) {
3892      // Check if the owner object already has a cache
3893      var value = owner[this.expando]; // If not, create one
3894
3895      if (!value) {
3896        value = {}; // We can accept data for non-element nodes in modern browsers,
3897        // but we should not, see #8335.
3898        // Always return an empty object.
3899
3900        if (acceptData(owner)) {
3901          // If it is a node unlikely to be stringify-ed or looped over
3902          // use plain assignment
3903          if (owner.nodeType) {
3904            owner[this.expando] = value; // Otherwise secure it in a non-enumerable property
3905            // configurable must be true to allow the property to be
3906            // deleted when data is removed
3907          } else {
3908            Object.defineProperty(owner, this.expando, {
3909              value: value,
3910              configurable: true
3911            });
3912          }
3913        }
3914      }
3915
3916      return value;
3917    },
3918    set: function set(owner, data, value) {
3919      var prop,
3920          cache = this.cache(owner); // Handle: [ owner, key, value ] args
3921      // Always use camelCase key (gh-2257)
3922
3923      if (typeof data === "string") {
3924        cache[camelCase(data)] = value; // Handle: [ owner, { properties } ] args
3925      } else {
3926        // Copy the properties one-by-one to the cache object
3927        for (prop in data) {
3928          cache[camelCase(prop)] = data[prop];
3929        }
3930      }
3931
3932      return cache;
3933    },
3934    get: function get(owner, key) {
3935      return key === undefined ? this.cache(owner) : // Always use camelCase key (gh-2257)
3936      owner[this.expando] && owner[this.expando][camelCase(key)];
3937    },
3938    access: function access(owner, key, value) {
3939      // In cases where either:
3940      //
3941      //   1. No key was specified
3942      //   2. A string key was specified, but no value provided
3943      //
3944      // Take the "read" path and allow the get method to determine
3945      // which value to return, respectively either:
3946      //
3947      //   1. The entire cache object
3948      //   2. The data stored at the key
3949      //
3950      if (key === undefined || key && typeof key === "string" && value === undefined) {
3951        return this.get(owner, key);
3952      } // When the key is not a string, or both a key and value
3953      // are specified, set or extend (existing objects) with either:
3954      //
3955      //   1. An object of properties
3956      //   2. A key and value
3957      //
3958
3959
3960      this.set(owner, key, value); // Since the "set" path can have two possible entry points
3961      // return the expected data based on which path was taken[*]
3962
3963      return value !== undefined ? value : key;
3964    },
3965    remove: function remove(owner, key) {
3966      var i,
3967          cache = owner[this.expando];
3968
3969      if (cache === undefined) {
3970        return;
3971      }
3972
3973      if (key !== undefined) {
3974        // Support array or space separated string of keys
3975        if (Array.isArray(key)) {
3976          // If key is an array of keys...
3977          // We always set camelCase keys, so remove that.
3978          key = key.map(camelCase);
3979        } else {
3980          key = camelCase(key); // If a key with the spaces exists, use it.
3981          // Otherwise, create an array by matching non-whitespace
3982
3983          key = key in cache ? [key] : key.match(rnothtmlwhite) || [];
3984        }
3985
3986        i = key.length;
3987
3988        while (i--) {
3989          delete cache[key[i]];
3990        }
3991      } // Remove the expando if there's no more data
3992
3993
3994      if (key === undefined || jQuery.isEmptyObject(cache)) {
3995        // Support: Chrome <=35 - 45
3996        // Webkit & Blink performance suffers when deleting properties
3997        // from DOM nodes, so set to undefined instead
3998        // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
3999        if (owner.nodeType) {
4000          owner[this.expando] = undefined;
4001        } else {
4002          delete owner[this.expando];
4003        }
4004      }
4005    },
4006    hasData: function hasData(owner) {
4007      var cache = owner[this.expando];
4008      return cache !== undefined && !jQuery.isEmptyObject(cache);
4009    }
4010  };
4011  var dataPriv = new Data();
4012  var dataUser = new Data(); //	Implementation Summary
4013  //
4014  //	1. Enforce API surface and semantic compatibility with 1.9.x branch
4015  //	2. Improve the module's maintainability by reducing the storage
4016  //		paths to a single mechanism.
4017  //	3. Use the same single mechanism to support "private" and "user" data.
4018  //	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4019  //	5. Avoid exposing implementation details on user objects (eg. expando properties)
4020  //	6. Provide a clear path for implementation upgrade to WeakMap in 2014
4021
4022  var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4023      rmultiDash = /[A-Z]/g;
4024
4025  function getData(data) {
4026    if (data === "true") {
4027      return true;
4028    }
4029
4030    if (data === "false") {
4031      return false;
4032    }
4033
4034    if (data === "null") {
4035      return null;
4036    } // Only convert to a number if it doesn't change the string
4037
4038
4039    if (data === +data + "") {
4040      return +data;
4041    }
4042
4043    if (rbrace.test(data)) {
4044      return JSON.parse(data);
4045    }
4046
4047    return data;
4048  }
4049
4050  function dataAttr(elem, key, data) {
4051    var name; // If nothing was found internally, try to fetch any
4052    // data from the HTML5 data-* attribute
4053
4054    if (data === undefined && elem.nodeType === 1) {
4055      name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
4056      data = elem.getAttribute(name);
4057
4058      if (typeof data === "string") {
4059        try {
4060          data = getData(data);
4061        } catch (e) {} // Make sure we set the data so it isn't changed later
4062
4063
4064        dataUser.set(elem, key, data);
4065      } else {
4066        data = undefined;
4067      }
4068    }
4069
4070    return data;
4071  }
4072
4073  jQuery.extend({
4074    hasData: function hasData(elem) {
4075      return dataUser.hasData(elem) || dataPriv.hasData(elem);
4076    },
4077    data: function data(elem, name, _data) {
4078      return dataUser.access(elem, name, _data);
4079    },
4080    removeData: function removeData(elem, name) {
4081      dataUser.remove(elem, name);
4082    },
4083    // TODO: Now that all calls to _data and _removeData have been replaced
4084    // with direct calls to dataPriv methods, these can be deprecated.
4085    _data: function _data(elem, name, data) {
4086      return dataPriv.access(elem, name, data);
4087    },
4088    _removeData: function _removeData(elem, name) {
4089      dataPriv.remove(elem, name);
4090    }
4091  });
4092  jQuery.fn.extend({
4093    data: function data(key, value) {
4094      var i,
4095          name,
4096          data,
4097          elem = this[0],
4098          attrs = elem && elem.attributes; // Gets all values
4099
4100      if (key === undefined) {
4101        if (this.length) {
4102          data = dataUser.get(elem);
4103
4104          if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
4105            i = attrs.length;
4106
4107            while (i--) {
4108              // Support: IE 11 only
4109              // The attrs elements can be null (#14894)
4110              if (attrs[i]) {
4111                name = attrs[i].name;
4112
4113                if (name.indexOf("data-") === 0) {
4114                  name = camelCase(name.slice(5));
4115                  dataAttr(elem, name, data[name]);
4116                }
4117              }
4118            }
4119
4120            dataPriv.set(elem, "hasDataAttrs", true);
4121          }
4122        }
4123
4124        return data;
4125      } // Sets multiple values
4126
4127
4128      if (_typeof(key) === "object") {
4129        return this.each(function () {
4130          dataUser.set(this, key);
4131        });
4132      }
4133
4134      return access(this, function (value) {
4135        var data; // The calling jQuery object (element matches) is not empty
4136        // (and therefore has an element appears at this[ 0 ]) and the
4137        // `value` parameter was not undefined. An empty jQuery object
4138        // will result in `undefined` for elem = this[ 0 ] which will
4139        // throw an exception if an attempt to read a data cache is made.
4140
4141        if (elem && value === undefined) {
4142          // Attempt to get data from the cache
4143          // The key will always be camelCased in Data
4144          data = dataUser.get(elem, key);
4145
4146          if (data !== undefined) {
4147            return data;
4148          } // Attempt to "discover" the data in
4149          // HTML5 custom data-* attrs
4150
4151
4152          data = dataAttr(elem, key);
4153
4154          if (data !== undefined) {
4155            return data;
4156          } // We tried really hard, but the data doesn't exist.
4157
4158
4159          return;
4160        } // Set the data...
4161
4162
4163        this.each(function () {
4164          // We always store the camelCased key
4165          dataUser.set(this, key, value);
4166        });
4167      }, null, value, arguments.length > 1, null, true);
4168    },
4169    removeData: function removeData(key) {
4170      return this.each(function () {
4171        dataUser.remove(this, key);
4172      });
4173    }
4174  });
4175  jQuery.extend({
4176    queue: function queue(elem, type, data) {
4177      var queue;
4178
4179      if (elem) {
4180        type = (type || "fx") + "queue";
4181        queue = dataPriv.get(elem, type); // Speed up dequeue by getting out quickly if this is just a lookup
4182
4183        if (data) {
4184          if (!queue || Array.isArray(data)) {
4185            queue = dataPriv.access(elem, type, jQuery.makeArray(data));
4186          } else {
4187            queue.push(data);
4188          }
4189        }
4190
4191        return queue || [];
4192      }
4193    },
4194    dequeue: function dequeue(elem, type) {
4195      type = type || "fx";
4196
4197      var queue = jQuery.queue(elem, type),
4198          startLength = queue.length,
4199          fn = queue.shift(),
4200          hooks = jQuery._queueHooks(elem, type),
4201          next = function next() {
4202        jQuery.dequeue(elem, type);
4203      }; // If the fx queue is dequeued, always remove the progress sentinel
4204
4205
4206      if (fn === "inprogress") {
4207        fn = queue.shift();
4208        startLength--;
4209      }
4210
4211      if (fn) {
4212        // Add a progress sentinel to prevent the fx queue from being
4213        // automatically dequeued
4214        if (type === "fx") {
4215          queue.unshift("inprogress");
4216        } // Clear up the last queue stop function
4217
4218
4219        delete hooks.stop;
4220        fn.call(elem, next, hooks);
4221      }
4222
4223      if (!startLength && hooks) {
4224        hooks.empty.fire();
4225      }
4226    },
4227    // Not public - generate a queueHooks object, or return the current one
4228    _queueHooks: function _queueHooks(elem, type) {
4229      var key = type + "queueHooks";
4230      return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
4231        empty: jQuery.Callbacks("once memory").add(function () {
4232          dataPriv.remove(elem, [type + "queue", key]);
4233        })
4234      });
4235    }
4236  });
4237  jQuery.fn.extend({
4238    queue: function queue(type, data) {
4239      var setter = 2;
4240
4241      if (typeof type !== "string") {
4242        data = type;
4243        type = "fx";
4244        setter--;
4245      }
4246
4247      if (arguments.length < setter) {
4248        return jQuery.queue(this[0], type);
4249      }
4250
4251      return data === undefined ? this : this.each(function () {
4252        var queue = jQuery.queue(this, type, data); // Ensure a hooks for this queue
4253
4254        jQuery._queueHooks(this, type);
4255
4256        if (type === "fx" && queue[0] !== "inprogress") {
4257          jQuery.dequeue(this, type);
4258        }
4259      });
4260    },
4261    dequeue: function dequeue(type) {
4262      return this.each(function () {
4263        jQuery.dequeue(this, type);
4264      });
4265    },
4266    clearQueue: function clearQueue(type) {
4267      return this.queue(type || "fx", []);
4268    },
4269    // Get a promise resolved when queues of a certain type
4270    // are emptied (fx is the type by default)
4271    promise: function promise(type, obj) {
4272      var tmp,
4273          count = 1,
4274          defer = jQuery.Deferred(),
4275          elements = this,
4276          i = this.length,
4277          resolve = function resolve() {
4278        if (! --count) {
4279          defer.resolveWith(elements, [elements]);
4280        }
4281      };
4282
4283      if (typeof type !== "string") {
4284        obj = type;
4285        type = undefined;
4286      }
4287
4288      type = type || "fx";
4289
4290      while (i--) {
4291        tmp = dataPriv.get(elements[i], type + "queueHooks");
4292
4293        if (tmp && tmp.empty) {
4294          count++;
4295          tmp.empty.add(resolve);
4296        }
4297      }
4298
4299      resolve();
4300      return defer.promise(obj);
4301    }
4302  });
4303  var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
4304  var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
4305  var cssExpand = ["Top", "Right", "Bottom", "Left"];
4306  var documentElement = document.documentElement;
4307
4308  var isAttached = function isAttached(elem) {
4309    return jQuery.contains(elem.ownerDocument, elem);
4310  },
4311      composed = {
4312    composed: true
4313  }; // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
4314  // Check attachment across shadow DOM boundaries when possible (gh-3504)
4315  // Support: iOS 10.0-10.2 only
4316  // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
4317  // leading to errors. We need to check for `getRootNode`.
4318
4319
4320  if (documentElement.getRootNode) {
4321    isAttached = function isAttached(elem) {
4322      return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
4323    };
4324  }
4325
4326  var isHiddenWithinTree = function isHiddenWithinTree(elem, el) {
4327    // isHiddenWithinTree might be called from jQuery#filter function;
4328    // in that case, element will be second argument
4329    elem = el || elem; // Inline style trumps all
4330
4331    return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style
4332    // Support: Firefox <=43 - 45
4333    // Disconnected elements can have computed display: none, so first confirm that elem is
4334    // in the document.
4335    isAttached(elem) && jQuery.css(elem, "display") === "none";
4336  };
4337
4338  function adjustCSS(elem, prop, valueParts, tween) {
4339    var adjusted,
4340        scale,
4341        maxIterations = 20,
4342        currentValue = tween ? function () {
4343      return tween.cur();
4344    } : function () {
4345      return jQuery.css(elem, prop, "");
4346    },
4347        initial = currentValue(),
4348        unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
4349        // Starting value computation is required for potential unit mismatches
4350    initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));
4351
4352    if (initialInUnit && initialInUnit[3] !== unit) {
4353      // Support: Firefox <=54
4354      // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4355      initial = initial / 2; // Trust units reported by jQuery.css
4356
4357      unit = unit || initialInUnit[3]; // Iteratively approximate from a nonzero starting point
4358
4359      initialInUnit = +initial || 1;
4360
4361      while (maxIterations--) {
4362        // Evaluate and update our best guess (doubling guesses that zero out).
4363        // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4364        jQuery.style(elem, prop, initialInUnit + unit);
4365
4366        if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
4367          maxIterations = 0;
4368        }
4369
4370        initialInUnit = initialInUnit / scale;
4371      }
4372
4373      initialInUnit = initialInUnit * 2;
4374      jQuery.style(elem, prop, initialInUnit + unit); // Make sure we update the tween properties later on
4375
4376      valueParts = valueParts || [];
4377    }
4378
4379    if (valueParts) {
4380      initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified
4381
4382      adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
4383
4384      if (tween) {
4385        tween.unit = unit;
4386        tween.start = initialInUnit;
4387        tween.end = adjusted;
4388      }
4389    }
4390
4391    return adjusted;
4392  }
4393
4394  var defaultDisplayMap = {};
4395
4396  function getDefaultDisplay(elem) {
4397    var temp,
4398        doc = elem.ownerDocument,
4399        nodeName = elem.nodeName,
4400        display = defaultDisplayMap[nodeName];
4401
4402    if (display) {
4403      return display;
4404    }
4405
4406    temp = doc.body.appendChild(doc.createElement(nodeName));
4407    display = jQuery.css(temp, "display");
4408    temp.parentNode.removeChild(temp);
4409
4410    if (display === "none") {
4411      display = "block";
4412    }
4413
4414    defaultDisplayMap[nodeName] = display;
4415    return display;
4416  }
4417
4418  function showHide(elements, show) {
4419    var display,
4420        elem,
4421        values = [],
4422        index = 0,
4423        length = elements.length; // Determine new display value for elements that need to change
4424
4425    for (; index < length; index++) {
4426      elem = elements[index];
4427
4428      if (!elem.style) {
4429        continue;
4430      }
4431
4432      display = elem.style.display;
4433
4434      if (show) {
4435        // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4436        // check is required in this first loop unless we have a nonempty display value (either
4437        // inline or about-to-be-restored)
4438        if (display === "none") {
4439          values[index] = dataPriv.get(elem, "display") || null;
4440
4441          if (!values[index]) {
4442            elem.style.display = "";
4443          }
4444        }
4445
4446        if (elem.style.display === "" && isHiddenWithinTree(elem)) {
4447          values[index] = getDefaultDisplay(elem);
4448        }
4449      } else {
4450        if (display !== "none") {
4451          values[index] = "none"; // Remember what we're overwriting
4452
4453          dataPriv.set(elem, "display", display);
4454        }
4455      }
4456    } // Set the display of the elements in a second loop to avoid constant reflow
4457
4458
4459    for (index = 0; index < length; index++) {
4460      if (values[index] != null) {
4461        elements[index].style.display = values[index];
4462      }
4463    }
4464
4465    return elements;
4466  }
4467
4468  jQuery.fn.extend({
4469    show: function show() {
4470      return showHide(this, true);
4471    },
4472    hide: function hide() {
4473      return showHide(this);
4474    },
4475    toggle: function toggle(state) {
4476      if (typeof state === "boolean") {
4477        return state ? this.show() : this.hide();
4478      }
4479
4480      return this.each(function () {
4481        if (isHiddenWithinTree(this)) {
4482          jQuery(this).show();
4483        } else {
4484          jQuery(this).hide();
4485        }
4486      });
4487    }
4488  });
4489  var rcheckableType = /^(?:checkbox|radio)$/i;
4490  var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
4491  var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
4492
4493  (function () {
4494    var fragment = document.createDocumentFragment(),
4495        div = fragment.appendChild(document.createElement("div")),
4496        input = document.createElement("input"); // Support: Android 4.0 - 4.3 only
4497    // Check state lost if the name is set (#11217)
4498    // Support: Windows Web Apps (WWA)
4499    // `name` and `type` must use .setAttribute for WWA (#14901)
4500
4501    input.setAttribute("type", "radio");
4502    input.setAttribute("checked", "checked");
4503    input.setAttribute("name", "t");
4504    div.appendChild(input); // Support: Android <=4.1 only
4505    // Older WebKit doesn't clone checked state correctly in fragments
4506
4507    support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; // Support: IE <=11 only
4508    // Make sure textarea (and checkbox) defaultValue is properly cloned
4509
4510    div.innerHTML = "<textarea>x</textarea>";
4511    support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; // Support: IE <=9 only
4512    // IE <=9 replaces <option> tags with their contents when inserted outside of
4513    // the select element.
4514
4515    div.innerHTML = "<option></option>";
4516    support.option = !!div.lastChild;
4517  })(); // We have to close these tags to support XHTML (#13200)
4518
4519
4520  var wrapMap = {
4521    // XHTML parsers do not magically insert elements in the
4522    // same way that tag soup parsers do. So we cannot shorten
4523    // this by omitting <tbody> or other required elements.
4524    thead: [1, "<table>", "</table>"],
4525    col: [2, "<table><colgroup>", "</colgroup></table>"],
4526    tr: [2, "<table><tbody>", "</tbody></table>"],
4527    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
4528    _default: [0, "", ""]
4529  };
4530  wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
4531  wrapMap.th = wrapMap.td; // Support: IE <=9 only
4532
4533  if (!support.option) {
4534    wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
4535  }
4536
4537  function getAll(context, tag) {
4538    // Support: IE <=9 - 11 only
4539    // Use typeof to avoid zero-argument method invocation on host objects (#15151)
4540    var ret;
4541
4542    if (typeof context.getElementsByTagName !== "undefined") {
4543      ret = context.getElementsByTagName(tag || "*");
4544    } else if (typeof context.querySelectorAll !== "undefined") {
4545      ret = context.querySelectorAll(tag || "*");
4546    } else {
4547      ret = [];
4548    }
4549
4550    if (tag === undefined || tag && nodeName(context, tag)) {
4551      return jQuery.merge([context], ret);
4552    }
4553
4554    return ret;
4555  } // Mark scripts as having already been evaluated
4556
4557
4558  function setGlobalEval(elems, refElements) {
4559    var i = 0,
4560        l = elems.length;
4561
4562    for (; i < l; i++) {
4563      dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval"));
4564    }
4565  }
4566
4567  var rhtml = /<|&#?\w+;/;
4568
4569  function buildFragment(elems, context, scripts, selection, ignored) {
4570    var elem,
4571        tmp,
4572        tag,
4573        wrap,
4574        attached,
4575        j,
4576        fragment = context.createDocumentFragment(),
4577        nodes = [],
4578        i = 0,
4579        l = elems.length;
4580
4581    for (; i < l; i++) {
4582      elem = elems[i];
4583
4584      if (elem || elem === 0) {
4585        // Add nodes directly
4586        if (toType(elem) === "object") {
4587          // Support: Android <=4.0 only, PhantomJS 1 only
4588          // push.apply(_, arraylike) throws on ancient WebKit
4589          jQuery.merge(nodes, elem.nodeType ? [elem] : elem); // Convert non-html into a text node
4590        } else if (!rhtml.test(elem)) {
4591          nodes.push(context.createTextNode(elem)); // Convert html into DOM nodes
4592        } else {
4593          tmp = tmp || fragment.appendChild(context.createElement("div")); // Deserialize a standard representation
4594
4595          tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
4596          wrap = wrapMap[tag] || wrapMap._default;
4597          tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; // Descend through wrappers to the right content
4598
4599          j = wrap[0];
4600
4601          while (j--) {
4602            tmp = tmp.lastChild;
4603          } // Support: Android <=4.0 only, PhantomJS 1 only
4604          // push.apply(_, arraylike) throws on ancient WebKit
4605
4606
4607          jQuery.merge(nodes, tmp.childNodes); // Remember the top-level container
4608
4609          tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392)
4610
4611          tmp.textContent = "";
4612        }
4613      }
4614    } // Remove wrapper from fragment
4615
4616
4617    fragment.textContent = "";
4618    i = 0;
4619
4620    while (elem = nodes[i++]) {
4621      // Skip elements already in the context collection (trac-4087)
4622      if (selection && jQuery.inArray(elem, selection) > -1) {
4623        if (ignored) {
4624          ignored.push(elem);
4625        }
4626
4627        continue;
4628      }
4629
4630      attached = isAttached(elem); // Append to fragment
4631
4632      tmp = getAll(fragment.appendChild(elem), "script"); // Preserve script evaluation history
4633
4634      if (attached) {
4635        setGlobalEval(tmp);
4636      } // Capture executables
4637
4638
4639      if (scripts) {
4640        j = 0;
4641
4642        while (elem = tmp[j++]) {
4643          if (rscriptType.test(elem.type || "")) {
4644            scripts.push(elem);
4645          }
4646        }
4647      }
4648    }
4649
4650    return fragment;
4651  }
4652
4653  var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
4654
4655  function returnTrue() {
4656    return true;
4657  }
4658
4659  function returnFalse() {
4660    return false;
4661  } // Support: IE <=9 - 11+
4662  // focus() and blur() are asynchronous, except when they are no-op.
4663  // So expect focus to be synchronous when the element is already active,
4664  // and blur to be synchronous when the element is not already active.
4665  // (focus and blur are always synchronous in other supported browsers,
4666  // this just defines when we can count on it).
4667
4668
4669  function expectSync(elem, type) {
4670    return elem === safeActiveElement() === (type === "focus");
4671  } // Support: IE <=9 only
4672  // Accessing document.activeElement can throw unexpectedly
4673  // https://bugs.jquery.com/ticket/13393
4674
4675
4676  function safeActiveElement() {
4677    try {
4678      return document.activeElement;
4679    } catch (err) {}
4680  }
4681
4682  function _on(elem, types, selector, data, fn, one) {
4683    var origFn, type; // Types can be a map of types/handlers
4684
4685    if (_typeof(types) === "object") {
4686      // ( types-Object, selector, data )
4687      if (typeof selector !== "string") {
4688        // ( types-Object, data )
4689        data = data || selector;
4690        selector = undefined;
4691      }
4692
4693      for (type in types) {
4694        _on(elem, type, selector, data, types[type], one);
4695      }
4696
4697      return elem;
4698    }
4699
4700    if (data == null && fn == null) {
4701      // ( types, fn )
4702      fn = selector;
4703      data = selector = undefined;
4704    } else if (fn == null) {
4705      if (typeof selector === "string") {
4706        // ( types, selector, fn )
4707        fn = data;
4708        data = undefined;
4709      } else {
4710        // ( types, data, fn )
4711        fn = data;
4712        data = selector;
4713        selector = undefined;
4714      }
4715    }
4716
4717    if (fn === false) {
4718      fn = returnFalse;
4719    } else if (!fn) {
4720      return elem;
4721    }
4722
4723    if (one === 1) {
4724      origFn = fn;
4725
4726      fn = function fn(event) {
4727        // Can use an empty set, since event contains the info
4728        jQuery().off(event);
4729        return origFn.apply(this, arguments);
4730      }; // Use same guid so caller can remove using origFn
4731
4732
4733      fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
4734    }
4735
4736    return elem.each(function () {
4737      jQuery.event.add(this, types, fn, data, selector);
4738    });
4739  }
4740  /*
4741   * Helper functions for managing events -- not part of the public interface.
4742   * Props to Dean Edwards' addEvent library for many of the ideas.
4743   */
4744
4745
4746  jQuery.event = {
4747    global: {},
4748    add: function add(elem, types, handler, data, selector) {
4749      var handleObjIn,
4750          eventHandle,
4751          tmp,
4752          events,
4753          t,
4754          handleObj,
4755          special,
4756          handlers,
4757          type,
4758          namespaces,
4759          origType,
4760          elemData = dataPriv.get(elem); // Only attach events to objects that accept data
4761
4762      if (!acceptData(elem)) {
4763        return;
4764      } // Caller can pass in an object of custom data in lieu of the handler
4765
4766
4767      if (handler.handler) {
4768        handleObjIn = handler;
4769        handler = handleObjIn.handler;
4770        selector = handleObjIn.selector;
4771      } // Ensure that invalid selectors throw exceptions at attach time
4772      // Evaluate against documentElement in case elem is a non-element node (e.g., document)
4773
4774
4775      if (selector) {
4776        jQuery.find.matchesSelector(documentElement, selector);
4777      } // Make sure that the handler has a unique ID, used to find/remove it later
4778
4779
4780      if (!handler.guid) {
4781        handler.guid = jQuery.guid++;
4782      } // Init the element's event structure and main handler, if this is the first
4783
4784
4785      if (!(events = elemData.events)) {
4786        events = elemData.events = Object.create(null);
4787      }
4788
4789      if (!(eventHandle = elemData.handle)) {
4790        eventHandle = elemData.handle = function (e) {
4791          // Discard the second event of a jQuery.event.trigger() and
4792          // when an event is called after a page has unloaded
4793          return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;
4794        };
4795      } // Handle multiple events separated by a space
4796
4797
4798      types = (types || "").match(rnothtmlwhite) || [""];
4799      t = types.length;
4800
4801      while (t--) {
4802        tmp = rtypenamespace.exec(types[t]) || [];
4803        type = origType = tmp[1];
4804        namespaces = (tmp[2] || "").split(".").sort(); // There *must* be a type, no attaching namespace-only handlers
4805
4806        if (!type) {
4807          continue;
4808        } // If event changes its type, use the special event handlers for the changed type
4809
4810
4811        special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type
4812
4813        type = (selector ? special.delegateType : special.bindType) || type; // Update special based on newly reset type
4814
4815        special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers
4816
4817        handleObj = jQuery.extend({
4818          type: type,
4819          origType: origType,
4820          data: data,
4821          handler: handler,
4822          guid: handler.guid,
4823          selector: selector,
4824          needsContext: selector && jQuery.expr.match.needsContext.test(selector),
4825          namespace: namespaces.join(".")
4826        }, handleObjIn); // Init the event handler queue if we're the first
4827
4828        if (!(handlers = events[type])) {
4829          handlers = events[type] = [];
4830          handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false
4831
4832          if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
4833            if (elem.addEventListener) {
4834              elem.addEventListener(type, eventHandle);
4835            }
4836          }
4837        }
4838
4839        if (special.add) {
4840          special.add.call(elem, handleObj);
4841
4842          if (!handleObj.handler.guid) {
4843            handleObj.handler.guid = handler.guid;
4844          }
4845        } // Add to the element's handler list, delegates in front
4846
4847
4848        if (selector) {
4849          handlers.splice(handlers.delegateCount++, 0, handleObj);
4850        } else {
4851          handlers.push(handleObj);
4852        } // Keep track of which events have ever been used, for event optimization
4853
4854
4855        jQuery.event.global[type] = true;
4856      }
4857    },
4858    // Detach an event or set of events from an element
4859    remove: function remove(elem, types, handler, selector, mappedTypes) {
4860      var j,
4861          origCount,
4862          tmp,
4863          events,
4864          t,
4865          handleObj,
4866          special,
4867          handlers,
4868          type,
4869          namespaces,
4870          origType,
4871          elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
4872
4873      if (!elemData || !(events = elemData.events)) {
4874        return;
4875      } // Once for each type.namespace in types; type may be omitted
4876
4877
4878      types = (types || "").match(rnothtmlwhite) || [""];
4879      t = types.length;
4880
4881      while (t--) {
4882        tmp = rtypenamespace.exec(types[t]) || [];
4883        type = origType = tmp[1];
4884        namespaces = (tmp[2] || "").split(".").sort(); // Unbind all events (on this namespace, if provided) for the element
4885
4886        if (!type) {
4887          for (type in events) {
4888            jQuery.event.remove(elem, type + types[t], handler, selector, true);
4889          }
4890
4891          continue;
4892        }
4893
4894        special = jQuery.event.special[type] || {};
4895        type = (selector ? special.delegateType : special.bindType) || type;
4896        handlers = events[type] || [];
4897        tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); // Remove matching events
4898
4899        origCount = j = handlers.length;
4900
4901        while (j--) {
4902          handleObj = handlers[j];
4903
4904          if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
4905            handlers.splice(j, 1);
4906
4907            if (handleObj.selector) {
4908              handlers.delegateCount--;
4909            }
4910
4911            if (special.remove) {
4912              special.remove.call(elem, handleObj);
4913            }
4914          }
4915        } // Remove generic event handler if we removed something and no more handlers exist
4916        // (avoids potential for endless recursion during removal of special event handlers)
4917
4918
4919        if (origCount && !handlers.length) {
4920          if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
4921            jQuery.removeEvent(elem, type, elemData.handle);
4922          }
4923
4924          delete events[type];
4925        }
4926      } // Remove data and the expando if it's no longer used
4927
4928
4929      if (jQuery.isEmptyObject(events)) {
4930        dataPriv.remove(elem, "handle events");
4931      }
4932    },
4933    dispatch: function dispatch(nativeEvent) {
4934      var i,
4935          j,
4936          ret,
4937          matched,
4938          handleObj,
4939          handlerQueue,
4940          args = new Array(arguments.length),
4941          // Make a writable jQuery.Event from the native event object
4942      event = jQuery.event.fix(nativeEvent),
4943          handlers = (dataPriv.get(this, "events") || Object.create(null))[event.type] || [],
4944          special = jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event
4945
4946      args[0] = event;
4947
4948      for (i = 1; i < arguments.length; i++) {
4949        args[i] = arguments[i];
4950      }
4951
4952      event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired
4953
4954      if (special.preDispatch && special.preDispatch.call(this, event) === false) {
4955        return;
4956      } // Determine handlers
4957
4958
4959      handlerQueue = jQuery.event.handlers.call(this, event, handlers); // Run delegates first; they may want to stop propagation beneath us
4960
4961      i = 0;
4962
4963      while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
4964        event.currentTarget = matched.elem;
4965        j = 0;
4966
4967        while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
4968          // If the event is namespaced, then each handler is only invoked if it is
4969          // specially universal or its namespaces are a superset of the event's.
4970          if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
4971            event.handleObj = handleObj;
4972            event.data = handleObj.data;
4973            ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
4974
4975            if (ret !== undefined) {
4976              if ((event.result = ret) === false) {
4977                event.preventDefault();
4978                event.stopPropagation();
4979              }
4980            }
4981          }
4982        }
4983      } // Call the postDispatch hook for the mapped type
4984
4985
4986      if (special.postDispatch) {
4987        special.postDispatch.call(this, event);
4988      }
4989
4990      return event.result;
4991    },
4992    handlers: function handlers(event, _handlers) {
4993      var i,
4994          handleObj,
4995          sel,
4996          matchedHandlers,
4997          matchedSelectors,
4998          handlerQueue = [],
4999          delegateCount = _handlers.delegateCount,
5000          cur = event.target; // Find delegate handlers
5001
5002      if (delegateCount && // Support: IE <=9
5003      // Black-hole SVG <use> instance trees (trac-13180)
5004      cur.nodeType && // Support: Firefox <=42
5005      // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5006      // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5007      // Support: IE 11 only
5008      // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5009      !(event.type === "click" && event.button >= 1)) {
5010        for (; cur !== this; cur = cur.parentNode || this) {
5011          // Don't check non-elements (#13208)
5012          // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5013          if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
5014            matchedHandlers = [];
5015            matchedSelectors = {};
5016
5017            for (i = 0; i < delegateCount; i++) {
5018              handleObj = _handlers[i]; // Don't conflict with Object.prototype properties (#13203)
5019
5020              sel = handleObj.selector + " ";
5021
5022              if (matchedSelectors[sel] === undefined) {
5023                matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
5024              }
5025
5026              if (matchedSelectors[sel]) {
5027                matchedHandlers.push(handleObj);
5028              }
5029            }
5030
5031            if (matchedHandlers.length) {
5032              handlerQueue.push({
5033                elem: cur,
5034                handlers: matchedHandlers
5035              });
5036            }
5037          }
5038        }
5039      } // Add the remaining (directly-bound) handlers
5040
5041
5042      cur = this;
5043
5044      if (delegateCount < _handlers.length) {
5045        handlerQueue.push({
5046          elem: cur,
5047          handlers: _handlers.slice(delegateCount)
5048        });
5049      }
5050
5051      return handlerQueue;
5052    },
5053    addProp: function addProp(name, hook) {
5054      Object.defineProperty(jQuery.Event.prototype, name, {
5055        enumerable: true,
5056        configurable: true,
5057        get: isFunction(hook) ? function () {
5058          if (this.originalEvent) {
5059            return hook(this.originalEvent);
5060          }
5061        } : function () {
5062          if (this.originalEvent) {
5063            return this.originalEvent[name];
5064          }
5065        },
5066        set: function set(value) {
5067          Object.defineProperty(this, name, {
5068            enumerable: true,
5069            configurable: true,
5070            writable: true,
5071            value: value
5072          });
5073        }
5074      });
5075    },
5076    fix: function fix(originalEvent) {
5077      return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
5078    },
5079    special: {
5080      load: {
5081        // Prevent triggered image.load events from bubbling to window.load
5082        noBubble: true
5083      },
5084      click: {
5085        // Utilize native event to ensure correct state for checkable inputs
5086        setup: function setup(data) {
5087          // For mutual compressibility with _default, replace `this` access with a local var.
5088          // `|| data` is dead code meant only to preserve the variable through minification.
5089          var el = this || data; // Claim the first handler
5090
5091          if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
5092            // dataPriv.set( el, "click", ... )
5093            leverageNative(el, "click", returnTrue);
5094          } // Return false to allow normal processing in the caller
5095
5096
5097          return false;
5098        },
5099        trigger: function trigger(data) {
5100          // For mutual compressibility with _default, replace `this` access with a local var.
5101          // `|| data` is dead code meant only to preserve the variable through minification.
5102          var el = this || data; // Force setup before triggering a click
5103
5104          if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
5105            leverageNative(el, "click");
5106          } // Return non-false to allow normal event-path propagation
5107
5108
5109          return true;
5110        },
5111        // For cross-browser consistency, suppress native .click() on links
5112        // Also prevent it if we're currently inside a leveraged native-event stack
5113        _default: function _default(event) {
5114          var target = event.target;
5115          return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
5116        }
5117      },
5118      beforeunload: {
5119        postDispatch: function postDispatch(event) {
5120          // Support: Firefox 20+
5121          // Firefox doesn't alert if the returnValue field is not set.
5122          if (event.result !== undefined && event.originalEvent) {
5123            event.originalEvent.returnValue = event.result;
5124          }
5125        }
5126      }
5127    }
5128  }; // Ensure the presence of an event listener that handles manually-triggered
5129  // synthetic events by interrupting progress until reinvoked in response to
5130  // *native* events that it fires directly, ensuring that state changes have
5131  // already occurred before other listeners are invoked.
5132
5133  function leverageNative(el, type, expectSync) {
5134    // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
5135    if (!expectSync) {
5136      if (dataPriv.get(el, type) === undefined) {
5137        jQuery.event.add(el, type, returnTrue);
5138      }
5139
5140      return;
5141    } // Register the controller as a special universal handler for all event namespaces
5142
5143
5144    dataPriv.set(el, type, false);
5145    jQuery.event.add(el, type, {
5146      namespace: false,
5147      handler: function handler(event) {
5148        var notAsync,
5149            result,
5150            saved = dataPriv.get(this, type);
5151
5152        if (event.isTrigger & 1 && this[type]) {
5153          // Interrupt processing of the outer synthetic .trigger()ed event
5154          // Saved data should be false in such cases, but might be a leftover capture object
5155          // from an async native handler (gh-4350)
5156          if (!saved.length) {
5157            // Store arguments for use when handling the inner native event
5158            // There will always be at least one argument (an event object), so this array
5159            // will not be confused with a leftover capture object.
5160            saved = _slice.call(arguments);
5161            dataPriv.set(this, type, saved); // Trigger the native event and capture its result
5162            // Support: IE <=9 - 11+
5163            // focus() and blur() are asynchronous
5164
5165            notAsync = expectSync(this, type);
5166            this[type]();
5167            result = dataPriv.get(this, type);
5168
5169            if (saved !== result || notAsync) {
5170              dataPriv.set(this, type, false);
5171            } else {
5172              result = {};
5173            }
5174
5175            if (saved !== result) {
5176              // Cancel the outer synthetic event
5177              event.stopImmediatePropagation();
5178              event.preventDefault(); // Support: Chrome 86+
5179              // In Chrome, if an element having a focusout handler is blurred by
5180              // clicking outside of it, it invokes the handler synchronously. If
5181              // that handler calls `.remove()` on the element, the data is cleared,
5182              // leaving `result` undefined. We need to guard against this.
5183
5184              return result && result.value;
5185            } // If this is an inner synthetic event for an event with a bubbling surrogate
5186            // (focus or blur), assume that the surrogate already propagated from triggering the
5187            // native event and prevent that from happening again here.
5188            // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
5189            // bubbling surrogate propagates *after* the non-bubbling base), but that seems
5190            // less bad than duplication.
5191
5192          } else if ((jQuery.event.special[type] || {}).delegateType) {
5193            event.stopPropagation();
5194          } // If this is a native event triggered above, everything is now in order
5195          // Fire an inner synthetic event with the original arguments
5196
5197        } else if (saved.length) {
5198          // ...and capture the result
5199          dataPriv.set(this, type, {
5200            value: jQuery.event.trigger( // Support: IE <=9 - 11+
5201            // Extend with the prototype to reset the above stopImmediatePropagation()
5202            jQuery.extend(saved[0], jQuery.Event.prototype), saved.slice(1), this)
5203          }); // Abort handling of the native event
5204
5205          event.stopImmediatePropagation();
5206        }
5207      }
5208    });
5209  }
5210
5211  jQuery.removeEvent = function (elem, type, handle) {
5212    // This "if" is needed for plain objects
5213    if (elem.removeEventListener) {
5214      elem.removeEventListener(type, handle);
5215    }
5216  };
5217
5218  jQuery.Event = function (src, props) {
5219    // Allow instantiation without the 'new' keyword
5220    if (!(this instanceof jQuery.Event)) {
5221      return new jQuery.Event(src, props);
5222    } // Event object
5223
5224
5225    if (src && src.type) {
5226      this.originalEvent = src;
5227      this.type = src.type; // Events bubbling up the document may have been marked as prevented
5228      // by a handler lower down the tree; reflect the correct value.
5229
5230      this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only
5231      src.returnValue === false ? returnTrue : returnFalse; // Create target properties
5232      // Support: Safari <=6 - 7 only
5233      // Target should not be a text node (#504, #13143)
5234
5235      this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
5236      this.currentTarget = src.currentTarget;
5237      this.relatedTarget = src.relatedTarget; // Event type
5238    } else {
5239      this.type = src;
5240    } // Put explicitly provided properties onto the event object
5241
5242
5243    if (props) {
5244      jQuery.extend(this, props);
5245    } // Create a timestamp if incoming event doesn't have one
5246
5247
5248    this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed
5249
5250    this[jQuery.expando] = true;
5251  }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5252  // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5253
5254
5255  jQuery.Event.prototype = {
5256    constructor: jQuery.Event,
5257    isDefaultPrevented: returnFalse,
5258    isPropagationStopped: returnFalse,
5259    isImmediatePropagationStopped: returnFalse,
5260    isSimulated: false,
5261    preventDefault: function preventDefault() {
5262      var e = this.originalEvent;
5263      this.isDefaultPrevented = returnTrue;
5264
5265      if (e && !this.isSimulated) {
5266        e.preventDefault();
5267      }
5268    },
5269    stopPropagation: function stopPropagation() {
5270      var e = this.originalEvent;
5271      this.isPropagationStopped = returnTrue;
5272
5273      if (e && !this.isSimulated) {
5274        e.stopPropagation();
5275      }
5276    },
5277    stopImmediatePropagation: function stopImmediatePropagation() {
5278      var e = this.originalEvent;
5279      this.isImmediatePropagationStopped = returnTrue;
5280
5281      if (e && !this.isSimulated) {
5282        e.stopImmediatePropagation();
5283      }
5284
5285      this.stopPropagation();
5286    }
5287  }; // Includes all common event props including KeyEvent and MouseEvent specific props
5288
5289  jQuery.each({
5290    altKey: true,
5291    bubbles: true,
5292    cancelable: true,
5293    changedTouches: true,
5294    ctrlKey: true,
5295    detail: true,
5296    eventPhase: true,
5297    metaKey: true,
5298    pageX: true,
5299    pageY: true,
5300    shiftKey: true,
5301    view: true,
5302    "char": true,
5303    code: true,
5304    charCode: true,
5305    key: true,
5306    keyCode: true,
5307    button: true,
5308    buttons: true,
5309    clientX: true,
5310    clientY: true,
5311    offsetX: true,
5312    offsetY: true,
5313    pointerId: true,
5314    pointerType: true,
5315    screenX: true,
5316    screenY: true,
5317    targetTouches: true,
5318    toElement: true,
5319    touches: true,
5320    which: true
5321  }, jQuery.event.addProp);
5322  jQuery.each({
5323    focus: "focusin",
5324    blur: "focusout"
5325  }, function (type, delegateType) {
5326    jQuery.event.special[type] = {
5327      // Utilize native event if possible so blur/focus sequence is correct
5328      setup: function setup() {
5329        // Claim the first handler
5330        // dataPriv.set( this, "focus", ... )
5331        // dataPriv.set( this, "blur", ... )
5332        leverageNative(this, type, expectSync); // Return false to allow normal processing in the caller
5333
5334        return false;
5335      },
5336      trigger: function trigger() {
5337        // Force setup before trigger
5338        leverageNative(this, type); // Return non-false to allow normal event-path propagation
5339
5340        return true;
5341      },
5342      // Suppress native focus or blur as it's already being fired
5343      // in leverageNative.
5344      _default: function _default() {
5345        return true;
5346      },
5347      delegateType: delegateType
5348    };
5349  }); // Create mouseenter/leave events using mouseover/out and event-time checks
5350  // so that event delegation works in jQuery.
5351  // Do the same for pointerenter/pointerleave and pointerover/pointerout
5352  //
5353  // Support: Safari 7 only
5354  // Safari sends mouseenter too often; see:
5355  // https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5356  // for the description of the bug (it existed in older Chrome versions as well).
5357
5358  jQuery.each({
5359    mouseenter: "mouseover",
5360    mouseleave: "mouseout",
5361    pointerenter: "pointerover",
5362    pointerleave: "pointerout"
5363  }, function (orig, fix) {
5364    jQuery.event.special[orig] = {
5365      delegateType: fix,
5366      bindType: fix,
5367      handle: function handle(event) {
5368        var ret,
5369            target = this,
5370            related = event.relatedTarget,
5371            handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target.
5372        // NB: No relatedTarget if the mouse left/entered the browser window
5373
5374        if (!related || related !== target && !jQuery.contains(target, related)) {
5375          event.type = handleObj.origType;
5376          ret = handleObj.handler.apply(this, arguments);
5377          event.type = fix;
5378        }
5379
5380        return ret;
5381      }
5382    };
5383  });
5384  jQuery.fn.extend({
5385    on: function on(types, selector, data, fn) {
5386      return _on(this, types, selector, data, fn);
5387    },
5388    one: function one(types, selector, data, fn) {
5389      return _on(this, types, selector, data, fn, 1);
5390    },
5391    off: function off(types, selector, fn) {
5392      var handleObj, type;
5393
5394      if (types && types.preventDefault && types.handleObj) {
5395        // ( event )  dispatched jQuery.Event
5396        handleObj = types.handleObj;
5397        jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
5398        return this;
5399      }
5400
5401      if (_typeof(types) === "object") {
5402        // ( types-object [, selector] )
5403        for (type in types) {
5404          this.off(type, selector, types[type]);
5405        }
5406
5407        return this;
5408      }
5409
5410      if (selector === false || typeof selector === "function") {
5411        // ( types [, fn] )
5412        fn = selector;
5413        selector = undefined;
5414      }
5415
5416      if (fn === false) {
5417        fn = returnFalse;
5418      }
5419
5420      return this.each(function () {
5421        jQuery.event.remove(this, types, fn, selector);
5422      });
5423    }
5424  });
5425  var // Support: IE <=10 - 11, Edge 12 - 13 only
5426  // In IE/Edge using regex groups here causes severe slowdowns.
5427  // See https://connect.microsoft.com/IE/feedback/details/1736512/
5428  rnoInnerhtml = /<script|<style|<link/i,
5429      // checked="checked" or checked
5430  rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5431      rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; // Prefer a tbody over its parent table for containing new rows
5432
5433  function manipulationTarget(elem, content) {
5434    if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
5435      return jQuery(elem).children("tbody")[0] || elem;
5436    }
5437
5438    return elem;
5439  } // Replace/restore the type attribute of script elements for safe DOM manipulation
5440
5441
5442  function disableScript(elem) {
5443    elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
5444    return elem;
5445  }
5446
5447  function restoreScript(elem) {
5448    if ((elem.type || "").slice(0, 5) === "true/") {
5449      elem.type = elem.type.slice(5);
5450    } else {
5451      elem.removeAttribute("type");
5452    }
5453
5454    return elem;
5455  }
5456
5457  function cloneCopyEvent(src, dest) {
5458    var i, l, type, pdataOld, udataOld, udataCur, events;
5459
5460    if (dest.nodeType !== 1) {
5461      return;
5462    } // 1. Copy private data: events, handlers, etc.
5463
5464
5465    if (dataPriv.hasData(src)) {
5466      pdataOld = dataPriv.get(src);
5467      events = pdataOld.events;
5468
5469      if (events) {
5470        dataPriv.remove(dest, "handle events");
5471
5472        for (type in events) {
5473          for (i = 0, l = events[type].length; i < l; i++) {
5474            jQuery.event.add(dest, type, events[type][i]);
5475          }
5476        }
5477      }
5478    } // 2. Copy user data
5479
5480
5481    if (dataUser.hasData(src)) {
5482      udataOld = dataUser.access(src);
5483      udataCur = jQuery.extend({}, udataOld);
5484      dataUser.set(dest, udataCur);
5485    }
5486  } // Fix IE bugs, see support tests
5487
5488
5489  function fixInput(src, dest) {
5490    var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button.
5491
5492    if (nodeName === "input" && rcheckableType.test(src.type)) {
5493      dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options
5494    } else if (nodeName === "input" || nodeName === "textarea") {
5495      dest.defaultValue = src.defaultValue;
5496    }
5497  }
5498
5499  function domManip(collection, args, callback, ignored) {
5500    // Flatten any nested arrays
5501    args = flat(args);
5502    var fragment,
5503        first,
5504        scripts,
5505        hasScripts,
5506        node,
5507        doc,
5508        i = 0,
5509        l = collection.length,
5510        iNoClone = l - 1,
5511        value = args[0],
5512        valueIsFunction = isFunction(value); // We can't cloneNode fragments that contain checked, in WebKit
5513
5514    if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
5515      return collection.each(function (index) {
5516        var self = collection.eq(index);
5517
5518        if (valueIsFunction) {
5519          args[0] = value.call(this, index, self.html());
5520        }
5521
5522        domManip(self, args, callback, ignored);
5523      });
5524    }
5525
5526    if (l) {
5527      fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
5528      first = fragment.firstChild;
5529
5530      if (fragment.childNodes.length === 1) {
5531        fragment = first;
5532      } // Require either new content or an interest in ignored elements to invoke the callback
5533
5534
5535      if (first || ignored) {
5536        scripts = jQuery.map(getAll(fragment, "script"), disableScript);
5537        hasScripts = scripts.length; // Use the original fragment for the last item
5538        // instead of the first because it can end up
5539        // being emptied incorrectly in certain situations (#8070).
5540
5541        for (; i < l; i++) {
5542          node = fragment;
5543
5544          if (i !== iNoClone) {
5545            node = jQuery.clone(node, true, true); // Keep references to cloned scripts for later restoration
5546
5547            if (hasScripts) {
5548              // Support: Android <=4.0 only, PhantomJS 1 only
5549              // push.apply(_, arraylike) throws on ancient WebKit
5550              jQuery.merge(scripts, getAll(node, "script"));
5551            }
5552          }
5553
5554          callback.call(collection[i], node, i);
5555        }
5556
5557        if (hasScripts) {
5558          doc = scripts[scripts.length - 1].ownerDocument; // Reenable scripts
5559
5560          jQuery.map(scripts, restoreScript); // Evaluate executable scripts on first document insertion
5561
5562          for (i = 0; i < hasScripts; i++) {
5563            node = scripts[i];
5564
5565            if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {
5566              if (node.src && (node.type || "").toLowerCase() !== "module") {
5567                // Optional AJAX dependency, but won't run scripts if not present
5568                if (jQuery._evalUrl && !node.noModule) {
5569                  jQuery._evalUrl(node.src, {
5570                    nonce: node.nonce || node.getAttribute("nonce")
5571                  }, doc);
5572                }
5573              } else {
5574                DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
5575              }
5576            }
5577          }
5578        }
5579      }
5580    }
5581
5582    return collection;
5583  }
5584
5585  function _remove(elem, selector, keepData) {
5586    var node,
5587        nodes = selector ? jQuery.filter(selector, elem) : elem,
5588        i = 0;
5589
5590    for (; (node = nodes[i]) != null; i++) {
5591      if (!keepData && node.nodeType === 1) {
5592        jQuery.cleanData(getAll(node));
5593      }
5594
5595      if (node.parentNode) {
5596        if (keepData && isAttached(node)) {
5597          setGlobalEval(getAll(node, "script"));
5598        }
5599
5600        node.parentNode.removeChild(node);
5601      }
5602    }
5603
5604    return elem;
5605  }
5606
5607  jQuery.extend({
5608    htmlPrefilter: function htmlPrefilter(html) {
5609      return html;
5610    },
5611    clone: function clone(elem, dataAndEvents, deepDataAndEvents) {
5612      var i,
5613          l,
5614          srcElements,
5615          destElements,
5616          clone = elem.cloneNode(true),
5617          inPage = isAttached(elem); // Fix IE cloning issues
5618
5619      if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
5620        // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
5621        destElements = getAll(clone);
5622        srcElements = getAll(elem);
5623
5624        for (i = 0, l = srcElements.length; i < l; i++) {
5625          fixInput(srcElements[i], destElements[i]);
5626        }
5627      } // Copy the events from the original to the clone
5628
5629
5630      if (dataAndEvents) {
5631        if (deepDataAndEvents) {
5632          srcElements = srcElements || getAll(elem);
5633          destElements = destElements || getAll(clone);
5634
5635          for (i = 0, l = srcElements.length; i < l; i++) {
5636            cloneCopyEvent(srcElements[i], destElements[i]);
5637          }
5638        } else {
5639          cloneCopyEvent(elem, clone);
5640        }
5641      } // Preserve script evaluation history
5642
5643
5644      destElements = getAll(clone, "script");
5645
5646      if (destElements.length > 0) {
5647        setGlobalEval(destElements, !inPage && getAll(elem, "script"));
5648      } // Return the cloned set
5649
5650
5651      return clone;
5652    },
5653    cleanData: function cleanData(elems) {
5654      var data,
5655          elem,
5656          type,
5657          special = jQuery.event.special,
5658          i = 0;
5659
5660      for (; (elem = elems[i]) !== undefined; i++) {
5661        if (acceptData(elem)) {
5662          if (data = elem[dataPriv.expando]) {
5663            if (data.events) {
5664              for (type in data.events) {
5665                if (special[type]) {
5666                  jQuery.event.remove(elem, type); // This is a shortcut to avoid jQuery.event.remove's overhead
5667                } else {
5668                  jQuery.removeEvent(elem, type, data.handle);
5669                }
5670              }
5671            } // Support: Chrome <=35 - 45+
5672            // Assign undefined instead of using delete, see Data#remove
5673
5674
5675            elem[dataPriv.expando] = undefined;
5676          }
5677
5678          if (elem[dataUser.expando]) {
5679            // Support: Chrome <=35 - 45+
5680            // Assign undefined instead of using delete, see Data#remove
5681            elem[dataUser.expando] = undefined;
5682          }
5683        }
5684      }
5685    }
5686  });
5687  jQuery.fn.extend({
5688    detach: function detach(selector) {
5689      return _remove(this, selector, true);
5690    },
5691    remove: function remove(selector) {
5692      return _remove(this, selector);
5693    },
5694    text: function text(value) {
5695      return access(this, function (value) {
5696        return value === undefined ? jQuery.text(this) : this.empty().each(function () {
5697          if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
5698            this.textContent = value;
5699          }
5700        });
5701      }, null, value, arguments.length);
5702    },
5703    append: function append() {
5704      return domManip(this, arguments, function (elem) {
5705        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
5706          var target = manipulationTarget(this, elem);
5707          target.appendChild(elem);
5708        }
5709      });
5710    },
5711    prepend: function prepend() {
5712      return domManip(this, arguments, function (elem) {
5713        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
5714          var target = manipulationTarget(this, elem);
5715          target.insertBefore(elem, target.firstChild);
5716        }
5717      });
5718    },
5719    before: function before() {
5720      return domManip(this, arguments, function (elem) {
5721        if (this.parentNode) {
5722          this.parentNode.insertBefore(elem, this);
5723        }
5724      });
5725    },
5726    after: function after() {
5727      return domManip(this, arguments, function (elem) {
5728        if (this.parentNode) {
5729          this.parentNode.insertBefore(elem, this.nextSibling);
5730        }
5731      });
5732    },
5733    empty: function empty() {
5734      var elem,
5735          i = 0;
5736
5737      for (; (elem = this[i]) != null; i++) {
5738        if (elem.nodeType === 1) {
5739          // Prevent memory leaks
5740          jQuery.cleanData(getAll(elem, false)); // Remove any remaining nodes
5741
5742          elem.textContent = "";
5743        }
5744      }
5745
5746      return this;
5747    },
5748    clone: function clone(dataAndEvents, deepDataAndEvents) {
5749      dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5750      deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5751      return this.map(function () {
5752        return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
5753      });
5754    },
5755    html: function html(value) {
5756      return access(this, function (value) {
5757        var elem = this[0] || {},
5758            i = 0,
5759            l = this.length;
5760
5761        if (value === undefined && elem.nodeType === 1) {
5762          return elem.innerHTML;
5763        } // See if we can take a shortcut and just use innerHTML
5764
5765
5766        if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
5767          value = jQuery.htmlPrefilter(value);
5768
5769          try {
5770            for (; i < l; i++) {
5771              elem = this[i] || {}; // Remove element nodes and prevent memory leaks
5772
5773              if (elem.nodeType === 1) {
5774                jQuery.cleanData(getAll(elem, false));
5775                elem.innerHTML = value;
5776              }
5777            }
5778
5779            elem = 0; // If using innerHTML throws an exception, use the fallback method
5780          } catch (e) {}
5781        }
5782
5783        if (elem) {
5784          this.empty().append(value);
5785        }
5786      }, null, value, arguments.length);
5787    },
5788    replaceWith: function replaceWith() {
5789      var ignored = []; // Make the changes, replacing each non-ignored context element with the new content
5790
5791      return domManip(this, arguments, function (elem) {
5792        var parent = this.parentNode;
5793
5794        if (jQuery.inArray(this, ignored) < 0) {
5795          jQuery.cleanData(getAll(this));
5796
5797          if (parent) {
5798            parent.replaceChild(elem, this);
5799          }
5800        } // Force callback invocation
5801
5802      }, ignored);
5803    }
5804  });
5805  jQuery.each({
5806    appendTo: "append",
5807    prependTo: "prepend",
5808    insertBefore: "before",
5809    insertAfter: "after",
5810    replaceAll: "replaceWith"
5811  }, function (name, original) {
5812    jQuery.fn[name] = function (selector) {
5813      var elems,
5814          ret = [],
5815          insert = jQuery(selector),
5816          last = insert.length - 1,
5817          i = 0;
5818
5819      for (; i <= last; i++) {
5820        elems = i === last ? this : this.clone(true);
5821        jQuery(insert[i])[original](elems); // Support: Android <=4.0 only, PhantomJS 1 only
5822        // .get() because push.apply(_, arraylike) throws on ancient WebKit
5823
5824        push.apply(ret, elems.get());
5825      }
5826
5827      return this.pushStack(ret);
5828    };
5829  });
5830  var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
5831
5832  var getStyles = function getStyles(elem) {
5833    // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
5834    // IE throws on elements created in popups
5835    // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
5836    var view = elem.ownerDocument.defaultView;
5837
5838    if (!view || !view.opener) {
5839      view = window;
5840    }
5841
5842    return view.getComputedStyle(elem);
5843  };
5844
5845  var swap = function swap(elem, options, callback) {
5846    var ret,
5847        name,
5848        old = {}; // Remember the old values, and insert the new ones
5849
5850    for (name in options) {
5851      old[name] = elem.style[name];
5852      elem.style[name] = options[name];
5853    }
5854
5855    ret = callback.call(elem); // Revert the old values
5856
5857    for (name in options) {
5858      elem.style[name] = old[name];
5859    }
5860
5861    return ret;
5862  };
5863
5864  var rboxStyle = new RegExp(cssExpand.join("|"), "i");
5865
5866  (function () {
5867    // Executing both pixelPosition & boxSizingReliable tests require only one layout
5868    // so they're executed at the same time to save the second computation.
5869    function computeStyleTests() {
5870      // This is a singleton, we need to execute it only once
5871      if (!div) {
5872        return;
5873      }
5874
5875      container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0";
5876      div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%";
5877      documentElement.appendChild(container).appendChild(div);
5878      var divStyle = window.getComputedStyle(div);
5879      pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
5880
5881      reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
5882      // Some styles come back with percentage values, even though they shouldn't
5883
5884      div.style.right = "60%";
5885      pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only
5886      // Detect misreporting of content dimensions for box-sizing:border-box elements
5887
5888      boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only
5889      // Detect overflow:scroll screwiness (gh-3699)
5890      // Support: Chrome <=64
5891      // Don't get tricked when zoom affects offsetWidth (gh-4029)
5892
5893      div.style.position = "absolute";
5894      scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
5895      documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and
5896      // it will also be a sign that checks already performed
5897
5898      div = null;
5899    }
5900
5901    function roundPixelMeasures(measure) {
5902      return Math.round(parseFloat(measure));
5903    }
5904
5905    var pixelPositionVal,
5906        boxSizingReliableVal,
5907        scrollboxSizeVal,
5908        pixelBoxStylesVal,
5909        reliableTrDimensionsVal,
5910        reliableMarginLeftVal,
5911        container = document.createElement("div"),
5912        div = document.createElement("div"); // Finish early in limited (non-browser) environments
5913
5914    if (!div.style) {
5915      return;
5916    } // Support: IE <=9 - 11 only
5917    // Style of cloned element affects source element cloned (#8908)
5918
5919
5920    div.style.backgroundClip = "content-box";
5921    div.cloneNode(true).style.backgroundClip = "";
5922    support.clearCloneStyle = div.style.backgroundClip === "content-box";
5923    jQuery.extend(support, {
5924      boxSizingReliable: function boxSizingReliable() {
5925        computeStyleTests();
5926        return boxSizingReliableVal;
5927      },
5928      pixelBoxStyles: function pixelBoxStyles() {
5929        computeStyleTests();
5930        return pixelBoxStylesVal;
5931      },
5932      pixelPosition: function pixelPosition() {
5933        computeStyleTests();
5934        return pixelPositionVal;
5935      },
5936      reliableMarginLeft: function reliableMarginLeft() {
5937        computeStyleTests();
5938        return reliableMarginLeftVal;
5939      },
5940      scrollboxSize: function scrollboxSize() {
5941        computeStyleTests();
5942        return scrollboxSizeVal;
5943      },
5944      // Support: IE 9 - 11+, Edge 15 - 18+
5945      // IE/Edge misreport `getComputedStyle` of table rows with width/height
5946      // set in CSS while `offset*` properties report correct values.
5947      // Behavior in IE 9 is more subtle than in newer versions & it passes
5948      // some versions of this test; make sure not to make it pass there!
5949      //
5950      // Support: Firefox 70+
5951      // Only Firefox includes border widths
5952      // in computed dimensions. (gh-4529)
5953      reliableTrDimensions: function reliableTrDimensions() {
5954        var table, tr, trChild, trStyle;
5955
5956        if (reliableTrDimensionsVal == null) {
5957          table = document.createElement("table");
5958          tr = document.createElement("tr");
5959          trChild = document.createElement("div");
5960          table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
5961          tr.style.cssText = "border:1px solid"; // Support: Chrome 86+
5962          // Height set through cssText does not get applied.
5963          // Computed height then comes back as 0.
5964
5965          tr.style.height = "1px";
5966          trChild.style.height = "9px"; // Support: Android 8 Chrome 86+
5967          // In our bodyBackground.html iframe,
5968          // display for all div elements is set to "inline",
5969          // which causes a problem only in Android 8 Chrome 86.
5970          // Ensuring the div is display: block
5971          // gets around this issue.
5972
5973          trChild.style.display = "block";
5974          documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
5975          trStyle = window.getComputedStyle(tr);
5976          reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;
5977          documentElement.removeChild(table);
5978        }
5979
5980        return reliableTrDimensionsVal;
5981      }
5982    });
5983  })();
5984
5985  function curCSS(elem, name, computed) {
5986    var width,
5987        minWidth,
5988        maxWidth,
5989        ret,
5990        // Support: Firefox 51+
5991    // Retrieving style before computed somehow
5992    // fixes an issue with getting wrong values
5993    // on detached elements
5994    style = elem.style;
5995    computed = computed || getStyles(elem); // getPropertyValue is needed for:
5996    //   .css('filter') (IE 9 only, #12537)
5997    //   .css('--customProperty) (#3144)
5998
5999    if (computed) {
6000      ret = computed.getPropertyValue(name) || computed[name];
6001
6002      if (ret === "" && !isAttached(elem)) {
6003        ret = jQuery.style(elem, name);
6004      } // A tribute to the "awesome hack by Dean Edwards"
6005      // Android Browser returns percentage for some values,
6006      // but width seems to be reliably pixels.
6007      // This is against the CSSOM draft spec:
6008      // https://drafts.csswg.org/cssom/#resolved-values
6009
6010
6011      if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
6012        // Remember the original values
6013        width = style.width;
6014        minWidth = style.minWidth;
6015        maxWidth = style.maxWidth; // Put in the new values to get a computed value out
6016
6017        style.minWidth = style.maxWidth = style.width = ret;
6018        ret = computed.width; // Revert the changed values
6019
6020        style.width = width;
6021        style.minWidth = minWidth;
6022        style.maxWidth = maxWidth;
6023      }
6024    }
6025
6026    return ret !== undefined ? // Support: IE <=9 - 11 only
6027    // IE returns zIndex value as an integer.
6028    ret + "" : ret;
6029  }
6030
6031  function addGetHookIf(conditionFn, hookFn) {
6032    // Define the hook, we'll check on the first run if it's really needed.
6033    return {
6034      get: function get() {
6035        if (conditionFn()) {
6036          // Hook not needed (or it's not possible to use it due
6037          // to missing dependency), remove it.
6038          delete this.get;
6039          return;
6040        } // Hook needed; redefine it so that the support test is not executed again.
6041
6042
6043        return (this.get = hookFn).apply(this, arguments);
6044      }
6045    };
6046  }
6047
6048  var cssPrefixes = ["Webkit", "Moz", "ms"],
6049      emptyStyle = document.createElement("div").style,
6050      vendorProps = {}; // Return a vendor-prefixed property or undefined
6051
6052  function vendorPropName(name) {
6053    // Check for vendor prefixed names
6054    var capName = name[0].toUpperCase() + name.slice(1),
6055        i = cssPrefixes.length;
6056
6057    while (i--) {
6058      name = cssPrefixes[i] + capName;
6059
6060      if (name in emptyStyle) {
6061        return name;
6062      }
6063    }
6064  } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property
6065
6066
6067  function finalPropName(name) {
6068    var _final = jQuery.cssProps[name] || vendorProps[name];
6069
6070    if (_final) {
6071      return _final;
6072    }
6073
6074    if (name in emptyStyle) {
6075      return name;
6076    }
6077
6078    return vendorProps[name] = vendorPropName(name) || name;
6079  }
6080
6081  var // Swappable if display is none or starts with table
6082  // except "table", "table-cell", or "table-caption"
6083  // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6084  rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6085      rcustomProp = /^--/,
6086      cssShow = {
6087    position: "absolute",
6088    visibility: "hidden",
6089    display: "block"
6090  },
6091      cssNormalTransform = {
6092    letterSpacing: "0",
6093    fontWeight: "400"
6094  };
6095
6096  function setPositiveNumber(_elem, value, subtract) {
6097    // Any relative (+/-) values have already been
6098    // normalized at this point
6099    var matches = rcssNum.exec(value);
6100    return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks
6101    Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value;
6102  }
6103
6104  function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
6105    var i = dimension === "width" ? 1 : 0,
6106        extra = 0,
6107        delta = 0; // Adjustment may not be necessary
6108
6109    if (box === (isBorderBox ? "border" : "content")) {
6110      return 0;
6111    }
6112
6113    for (; i < 4; i += 2) {
6114      // Both box models exclude margin
6115      if (box === "margin") {
6116        delta += jQuery.css(elem, box + cssExpand[i], true, styles);
6117      } // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6118
6119
6120      if (!isBorderBox) {
6121        // Add padding
6122        delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles); // For "border" or "margin", add border
6123
6124        if (box !== "padding") {
6125          delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); // But still keep track of it otherwise
6126        } else {
6127          extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6128        } // If we get here with a border-box (content + padding + border), we're seeking "content" or
6129        // "padding" or "margin"
6130
6131      } else {
6132        // For "content", subtract padding
6133        if (box === "content") {
6134          delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
6135        } // For "content" or "padding", subtract border
6136
6137
6138        if (box !== "margin") {
6139          delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6140        }
6141      }
6142    } // Account for positive content-box scroll gutter when requested by providing computedVal
6143
6144
6145    if (!isBorderBox && computedVal >= 0) {
6146      // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6147      // Assuming integer scroll gutter, subtract the rest and round down
6148      delta += Math.max(0, Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
6149      // Use an explicit zero to avoid NaN (gh-3964)
6150      )) || 0;
6151    }
6152
6153    return delta;
6154  }
6155
6156  function getWidthOrHeight(elem, dimension, extra) {
6157    // Start with computed style
6158    var styles = getStyles(elem),
6159        // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
6160    // Fake content-box until we know it's needed to know the true value.
6161    boxSizingNeeded = !support.boxSizingReliable() || extra,
6162        isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6163        valueIsBorderBox = isBorderBox,
6164        val = curCSS(elem, dimension, styles),
6165        offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); // Support: Firefox <=54
6166    // Return a confounding non-pixel value or feign ignorance, as appropriate.
6167
6168    if (rnumnonpx.test(val)) {
6169      if (!extra) {
6170        return val;
6171      }
6172
6173      val = "auto";
6174    } // Support: IE 9 - 11 only
6175    // Use offsetWidth/offsetHeight for when box sizing is unreliable.
6176    // In those cases, the computed value can be trusted to be border-box.
6177
6178
6179    if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+
6180    // IE/Edge misreport `getComputedStyle` of table rows with width/height
6181    // set in CSS while `offset*` properties report correct values.
6182    // Interestingly, in some cases IE 9 doesn't suffer from this issue.
6183    !support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"
6184    // This happens for inline elements with no explicit setting (gh-3571)
6185    val === "auto" || // Support: Android <=4.1 - 4.3 only
6186    // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6187    !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected
6188    elem.getClientRects().length) {
6189      isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; // Where available, offsetWidth/offsetHeight approximate border box dimensions.
6190      // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
6191      // retrieved value as a content box dimension.
6192
6193      valueIsBorderBox = offsetProp in elem;
6194
6195      if (valueIsBorderBox) {
6196        val = elem[offsetProp];
6197      }
6198    } // Normalize "" and auto
6199
6200
6201    val = parseFloat(val) || 0; // Adjust for the element's box model
6202
6203    return val + boxModelAdjustment(elem, dimension, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589)
6204    val) + "px";
6205  }
6206
6207  jQuery.extend({
6208    // Add in style property hooks for overriding the default
6209    // behavior of getting and setting a style property
6210    cssHooks: {
6211      opacity: {
6212        get: function get(elem, computed) {
6213          if (computed) {
6214            // We should always get a number back from opacity
6215            var ret = curCSS(elem, "opacity");
6216            return ret === "" ? "1" : ret;
6217          }
6218        }
6219      }
6220    },
6221    // Don't automatically add "px" to these possibly-unitless properties
6222    cssNumber: {
6223      "animationIterationCount": true,
6224      "columnCount": true,
6225      "fillOpacity": true,
6226      "flexGrow": true,
6227      "flexShrink": true,
6228      "fontWeight": true,
6229      "gridArea": true,
6230      "gridColumn": true,
6231      "gridColumnEnd": true,
6232      "gridColumnStart": true,
6233      "gridRow": true,
6234      "gridRowEnd": true,
6235      "gridRowStart": true,
6236      "lineHeight": true,
6237      "opacity": true,
6238      "order": true,
6239      "orphans": true,
6240      "widows": true,
6241      "zIndex": true,
6242      "zoom": true
6243    },
6244    // Add in properties whose names you wish to fix before
6245    // setting or getting the value
6246    cssProps: {},
6247    // Get and set the style property on a DOM Node
6248    style: function style(elem, name, value, extra) {
6249      // Don't set styles on text and comment nodes
6250      if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
6251        return;
6252      } // Make sure that we're working with the right name
6253
6254
6255      var ret,
6256          type,
6257          hooks,
6258          origName = camelCase(name),
6259          isCustomProp = rcustomProp.test(name),
6260          style = elem.style; // Make sure that we're working with the right name. We don't
6261      // want to query the value if it is a CSS custom property
6262      // since they are user-defined.
6263
6264      if (!isCustomProp) {
6265        name = finalPropName(origName);
6266      } // Gets hook for the prefixed version, then unprefixed version
6267
6268
6269      hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // Check if we're setting a value
6270
6271      if (value !== undefined) {
6272        type = _typeof(value); // Convert "+=" or "-=" to relative numbers (#7345)
6273
6274        if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
6275          value = adjustCSS(elem, name, ret); // Fixes bug #9237
6276
6277          type = "number";
6278        } // Make sure that null and NaN values aren't set (#7116)
6279
6280
6281        if (value == null || value !== value) {
6282          return;
6283        } // If a number was passed in, add the unit (except for certain CSS properties)
6284        // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
6285        // "px" to a few hardcoded values.
6286
6287
6288        if (type === "number" && !isCustomProp) {
6289          value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
6290        } // background-* props affect original clone's values
6291
6292
6293        if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
6294          style[name] = "inherit";
6295        } // If a hook was provided, use that value, otherwise just set the specified value
6296
6297
6298        if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
6299          if (isCustomProp) {
6300            style.setProperty(name, value);
6301          } else {
6302            style[name] = value;
6303          }
6304        }
6305      } else {
6306        // If a hook was provided get the non-computed value from there
6307        if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
6308          return ret;
6309        } // Otherwise just get the value from the style object
6310
6311
6312        return style[name];
6313      }
6314    },
6315    css: function css(elem, name, extra, styles) {
6316      var val,
6317          num,
6318          hooks,
6319          origName = camelCase(name),
6320          isCustomProp = rcustomProp.test(name); // Make sure that we're working with the right name. We don't
6321      // want to modify the value if it is a CSS custom property
6322      // since they are user-defined.
6323
6324      if (!isCustomProp) {
6325        name = finalPropName(origName);
6326      } // Try prefixed name followed by the unprefixed name
6327
6328
6329      hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // If a hook was provided get the computed value from there
6330
6331      if (hooks && "get" in hooks) {
6332        val = hooks.get(elem, true, extra);
6333      } // Otherwise, if a way to get the computed value exists, use that
6334
6335
6336      if (val === undefined) {
6337        val = curCSS(elem, name, styles);
6338      } // Convert "normal" to computed value
6339
6340
6341      if (val === "normal" && name in cssNormalTransform) {
6342        val = cssNormalTransform[name];
6343      } // Make numeric if forced or a qualifier was provided and val looks numeric
6344
6345
6346      if (extra === "" || extra) {
6347        num = parseFloat(val);
6348        return extra === true || isFinite(num) ? num || 0 : val;
6349      }
6350
6351      return val;
6352    }
6353  });
6354  jQuery.each(["height", "width"], function (_i, dimension) {
6355    jQuery.cssHooks[dimension] = {
6356      get: function get(elem, computed, extra) {
6357        if (computed) {
6358          // Certain elements can have dimension info if we invisibly show them
6359          // but it must have a current display style that would benefit
6360          return rdisplayswap.test(jQuery.css(elem, "display")) && ( // Support: Safari 8+
6361          // Table columns in Safari have non-zero offsetWidth & zero
6362          // getBoundingClientRect().width unless display is changed.
6363          // Support: IE <=11 only
6364          // Running getBoundingClientRect on a disconnected node
6365          // in IE throws an error.
6366          !elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function () {
6367            return getWidthOrHeight(elem, dimension, extra);
6368          }) : getWidthOrHeight(elem, dimension, extra);
6369        }
6370      },
6371      set: function set(elem, value, extra) {
6372        var matches,
6373            styles = getStyles(elem),
6374            // Only read styles.position if the test has a chance to fail
6375        // to avoid forcing a reflow.
6376        scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute",
6377            // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
6378        boxSizingNeeded = scrollboxSizeBuggy || extra,
6379            isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6380            subtract = extra ? boxModelAdjustment(elem, dimension, extra, isBorderBox, styles) : 0; // Account for unreliable border-box dimensions by comparing offset* to computed and
6381        // faking a content-box to get border and padding (gh-3699)
6382
6383        if (isBorderBox && scrollboxSizeBuggy) {
6384          subtract -= Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5);
6385        } // Convert to pixels if value adjustment is needed
6386
6387
6388        if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
6389          elem.style[dimension] = value;
6390          value = jQuery.css(elem, dimension);
6391        }
6392
6393        return setPositiveNumber(elem, value, subtract);
6394      }
6395    };
6396  });
6397  jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function (elem, computed) {
6398    if (computed) {
6399      return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, {
6400        marginLeft: 0
6401      }, function () {
6402        return elem.getBoundingClientRect().left;
6403      })) + "px";
6404    }
6405  }); // These hooks are used by animate to expand properties
6406
6407  jQuery.each({
6408    margin: "",
6409    padding: "",
6410    border: "Width"
6411  }, function (prefix, suffix) {
6412    jQuery.cssHooks[prefix + suffix] = {
6413      expand: function expand(value) {
6414        var i = 0,
6415            expanded = {},
6416            // Assumes a single number if not a string
6417        parts = typeof value === "string" ? value.split(" ") : [value];
6418
6419        for (; i < 4; i++) {
6420          expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
6421        }
6422
6423        return expanded;
6424      }
6425    };
6426
6427    if (prefix !== "margin") {
6428      jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
6429    }
6430  });
6431  jQuery.fn.extend({
6432    css: function css(name, value) {
6433      return access(this, function (elem, name, value) {
6434        var styles,
6435            len,
6436            map = {},
6437            i = 0;
6438
6439        if (Array.isArray(name)) {
6440          styles = getStyles(elem);
6441          len = name.length;
6442
6443          for (; i < len; i++) {
6444            map[name[i]] = jQuery.css(elem, name[i], false, styles);
6445          }
6446
6447          return map;
6448        }
6449
6450        return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name);
6451      }, name, value, arguments.length > 1);
6452    }
6453  });
6454
6455  function Tween(elem, options, prop, end, easing) {
6456    return new Tween.prototype.init(elem, options, prop, end, easing);
6457  }
6458
6459  jQuery.Tween = Tween;
6460  Tween.prototype = {
6461    constructor: Tween,
6462    init: function init(elem, options, prop, end, easing, unit) {
6463      this.elem = elem;
6464      this.prop = prop;
6465      this.easing = easing || jQuery.easing._default;
6466      this.options = options;
6467      this.start = this.now = this.cur();
6468      this.end = end;
6469      this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
6470    },
6471    cur: function cur() {
6472      var hooks = Tween.propHooks[this.prop];
6473      return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
6474    },
6475    run: function run(percent) {
6476      var eased,
6477          hooks = Tween.propHooks[this.prop];
6478
6479      if (this.options.duration) {
6480        this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);
6481      } else {
6482        this.pos = eased = percent;
6483      }
6484
6485      this.now = (this.end - this.start) * eased + this.start;
6486
6487      if (this.options.step) {
6488        this.options.step.call(this.elem, this.now, this);
6489      }
6490
6491      if (hooks && hooks.set) {
6492        hooks.set(this);
6493      } else {
6494        Tween.propHooks._default.set(this);
6495      }
6496
6497      return this;
6498    }
6499  };
6500  Tween.prototype.init.prototype = Tween.prototype;
6501  Tween.propHooks = {
6502    _default: {
6503      get: function get(tween) {
6504        var result; // Use a property on the element directly when it is not a DOM element,
6505        // or when there is no matching style property that exists.
6506
6507        if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
6508          return tween.elem[tween.prop];
6509        } // Passing an empty string as a 3rd parameter to .css will automatically
6510        // attempt a parseFloat and fallback to a string if the parse fails.
6511        // Simple values such as "10px" are parsed to Float;
6512        // complex values such as "rotate(1rad)" are returned as-is.
6513
6514
6515        result = jQuery.css(tween.elem, tween.prop, ""); // Empty strings, null, undefined and "auto" are converted to 0.
6516
6517        return !result || result === "auto" ? 0 : result;
6518      },
6519      set: function set(tween) {
6520        // Use step hook for back compat.
6521        // Use cssHook if its there.
6522        // Use .style if available and use plain properties where available.
6523        if (jQuery.fx.step[tween.prop]) {
6524          jQuery.fx.step[tween.prop](tween);
6525        } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
6526          jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
6527        } else {
6528          tween.elem[tween.prop] = tween.now;
6529        }
6530      }
6531    }
6532  }; // Support: IE <=9 only
6533  // Panic based approach to setting things on disconnected nodes
6534
6535  Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
6536    set: function set(tween) {
6537      if (tween.elem.nodeType && tween.elem.parentNode) {
6538        tween.elem[tween.prop] = tween.now;
6539      }
6540    }
6541  };
6542  jQuery.easing = {
6543    linear: function linear(p) {
6544      return p;
6545    },
6546    swing: function swing(p) {
6547      return 0.5 - Math.cos(p * Math.PI) / 2;
6548    },
6549    _default: "swing"
6550  };
6551  jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point
6552
6553  jQuery.fx.step = {};
6554  var fxNow,
6555      inProgress,
6556      rfxtypes = /^(?:toggle|show|hide)$/,
6557      rrun = /queueHooks$/;
6558
6559  function schedule() {
6560    if (inProgress) {
6561      if (document.hidden === false && window.requestAnimationFrame) {
6562        window.requestAnimationFrame(schedule);
6563      } else {
6564        window.setTimeout(schedule, jQuery.fx.interval);
6565      }
6566
6567      jQuery.fx.tick();
6568    }
6569  } // Animations created synchronously will run synchronously
6570
6571
6572  function createFxNow() {
6573    window.setTimeout(function () {
6574      fxNow = undefined;
6575    });
6576    return fxNow = Date.now();
6577  } // Generate parameters to create a standard animation
6578
6579
6580  function genFx(type, includeWidth) {
6581    var which,
6582        i = 0,
6583        attrs = {
6584      height: type
6585    }; // If we include width, step value is 1 to do all cssExpand values,
6586    // otherwise step value is 2 to skip over Left and Right
6587
6588    includeWidth = includeWidth ? 1 : 0;
6589
6590    for (; i < 4; i += 2 - includeWidth) {
6591      which = cssExpand[i];
6592      attrs["margin" + which] = attrs["padding" + which] = type;
6593    }
6594
6595    if (includeWidth) {
6596      attrs.opacity = attrs.width = type;
6597    }
6598
6599    return attrs;
6600  }
6601
6602  function createTween(value, prop, animation) {
6603    var tween,
6604        collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]),
6605        index = 0,
6606        length = collection.length;
6607
6608    for (; index < length; index++) {
6609      if (tween = collection[index].call(animation, prop, value)) {
6610        // We're done with this property
6611        return tween;
6612      }
6613    }
6614  }
6615
6616  function defaultPrefilter(elem, props, opts) {
6617    var prop,
6618        value,
6619        toggle,
6620        hooks,
6621        oldfire,
6622        propTween,
6623        restoreDisplay,
6624        display,
6625        isBox = "width" in props || "height" in props,
6626        anim = this,
6627        orig = {},
6628        style = elem.style,
6629        hidden = elem.nodeType && isHiddenWithinTree(elem),
6630        dataShow = dataPriv.get(elem, "fxshow"); // Queue-skipping animations hijack the fx hooks
6631
6632    if (!opts.queue) {
6633      hooks = jQuery._queueHooks(elem, "fx");
6634
6635      if (hooks.unqueued == null) {
6636        hooks.unqueued = 0;
6637        oldfire = hooks.empty.fire;
6638
6639        hooks.empty.fire = function () {
6640          if (!hooks.unqueued) {
6641            oldfire();
6642          }
6643        };
6644      }
6645
6646      hooks.unqueued++;
6647      anim.always(function () {
6648        // Ensure the complete handler is called before this completes
6649        anim.always(function () {
6650          hooks.unqueued--;
6651
6652          if (!jQuery.queue(elem, "fx").length) {
6653            hooks.empty.fire();
6654          }
6655        });
6656      });
6657    } // Detect show/hide animations
6658
6659
6660    for (prop in props) {
6661      value = props[prop];
6662
6663      if (rfxtypes.test(value)) {
6664        delete props[prop];
6665        toggle = toggle || value === "toggle";
6666
6667        if (value === (hidden ? "hide" : "show")) {
6668          // Pretend to be hidden if this is a "show" and
6669          // there is still data from a stopped show/hide
6670          if (value === "show" && dataShow && dataShow[prop] !== undefined) {
6671            hidden = true; // Ignore all other no-op show/hide data
6672          } else {
6673            continue;
6674          }
6675        }
6676
6677        orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
6678      }
6679    } // Bail out if this is a no-op like .hide().hide()
6680
6681
6682    propTween = !jQuery.isEmptyObject(props);
6683
6684    if (!propTween && jQuery.isEmptyObject(orig)) {
6685      return;
6686    } // Restrict "overflow" and "display" styles during box animations
6687
6688
6689    if (isBox && elem.nodeType === 1) {
6690      // Support: IE <=9 - 11, Edge 12 - 15
6691      // Record all 3 overflow attributes because IE does not infer the shorthand
6692      // from identically-valued overflowX and overflowY and Edge just mirrors
6693      // the overflowX value there.
6694      opts.overflow = [style.overflow, style.overflowX, style.overflowY]; // Identify a display type, preferring old show/hide data over the CSS cascade
6695
6696      restoreDisplay = dataShow && dataShow.display;
6697
6698      if (restoreDisplay == null) {
6699        restoreDisplay = dataPriv.get(elem, "display");
6700      }
6701
6702      display = jQuery.css(elem, "display");
6703
6704      if (display === "none") {
6705        if (restoreDisplay) {
6706          display = restoreDisplay;
6707        } else {
6708          // Get nonempty value(s) by temporarily forcing visibility
6709          showHide([elem], true);
6710          restoreDisplay = elem.style.display || restoreDisplay;
6711          display = jQuery.css(elem, "display");
6712          showHide([elem]);
6713        }
6714      } // Animate inline elements as inline-block
6715
6716
6717      if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
6718        if (jQuery.css(elem, "float") === "none") {
6719          // Restore the original display value at the end of pure show/hide animations
6720          if (!propTween) {
6721            anim.done(function () {
6722              style.display = restoreDisplay;
6723            });
6724
6725            if (restoreDisplay == null) {
6726              display = style.display;
6727              restoreDisplay = display === "none" ? "" : display;
6728            }
6729          }
6730
6731          style.display = "inline-block";
6732        }
6733      }
6734    }
6735
6736    if (opts.overflow) {
6737      style.overflow = "hidden";
6738      anim.always(function () {
6739        style.overflow = opts.overflow[0];
6740        style.overflowX = opts.overflow[1];
6741        style.overflowY = opts.overflow[2];
6742      });
6743    } // Implement show/hide animations
6744
6745
6746    propTween = false;
6747
6748    for (prop in orig) {
6749      // General show/hide setup for this element animation
6750      if (!propTween) {
6751        if (dataShow) {
6752          if ("hidden" in dataShow) {
6753            hidden = dataShow.hidden;
6754          }
6755        } else {
6756          dataShow = dataPriv.access(elem, "fxshow", {
6757            display: restoreDisplay
6758          });
6759        } // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
6760
6761
6762        if (toggle) {
6763          dataShow.hidden = !hidden;
6764        } // Show elements before animating them
6765
6766
6767        if (hidden) {
6768          showHide([elem], true);
6769        }
6770        /* eslint-disable no-loop-func */
6771
6772
6773        anim.done(function () {
6774          /* eslint-enable no-loop-func */
6775          // The final step of a "hide" animation is actually hiding the element
6776          if (!hidden) {
6777            showHide([elem]);
6778          }
6779
6780          dataPriv.remove(elem, "fxshow");
6781
6782          for (prop in orig) {
6783            jQuery.style(elem, prop, orig[prop]);
6784          }
6785        });
6786      } // Per-property setup
6787
6788
6789      propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
6790
6791      if (!(prop in dataShow)) {
6792        dataShow[prop] = propTween.start;
6793
6794        if (hidden) {
6795          propTween.end = propTween.start;
6796          propTween.start = 0;
6797        }
6798      }
6799    }
6800  }
6801
6802  function propFilter(props, specialEasing) {
6803    var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass
6804
6805    for (index in props) {
6806      name = camelCase(index);
6807      easing = specialEasing[name];
6808      value = props[index];
6809
6810      if (Array.isArray(value)) {
6811        easing = value[1];
6812        value = props[index] = value[0];
6813      }
6814
6815      if (index !== name) {
6816        props[name] = value;
6817        delete props[index];
6818      }
6819
6820      hooks = jQuery.cssHooks[name];
6821
6822      if (hooks && "expand" in hooks) {
6823        value = hooks.expand(value);
6824        delete props[name]; // Not quite $.extend, this won't overwrite existing keys.
6825        // Reusing 'index' because we have the correct "name"
6826
6827        for (index in value) {
6828          if (!(index in props)) {
6829            props[index] = value[index];
6830            specialEasing[index] = easing;
6831          }
6832        }
6833      } else {
6834        specialEasing[name] = easing;
6835      }
6836    }
6837  }
6838
6839  function Animation(elem, properties, options) {
6840    var result,
6841        stopped,
6842        index = 0,
6843        length = Animation.prefilters.length,
6844        deferred = jQuery.Deferred().always(function () {
6845      // Don't match elem in the :animated selector
6846      delete tick.elem;
6847    }),
6848        tick = function tick() {
6849      if (stopped) {
6850        return false;
6851      }
6852
6853      var currentTime = fxNow || createFxNow(),
6854          remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
6855          // Support: Android 2.3 only
6856      // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
6857      temp = remaining / animation.duration || 0,
6858          percent = 1 - temp,
6859          index = 0,
6860          length = animation.tweens.length;
6861
6862      for (; index < length; index++) {
6863        animation.tweens[index].run(percent);
6864      }
6865
6866      deferred.notifyWith(elem, [animation, percent, remaining]); // If there's more to do, yield
6867
6868      if (percent < 1 && length) {
6869        return remaining;
6870      } // If this was an empty animation, synthesize a final progress notification
6871
6872
6873      if (!length) {
6874        deferred.notifyWith(elem, [animation, 1, 0]);
6875      } // Resolve the animation and report its conclusion
6876
6877
6878      deferred.resolveWith(elem, [animation]);
6879      return false;
6880    },
6881        animation = deferred.promise({
6882      elem: elem,
6883      props: jQuery.extend({}, properties),
6884      opts: jQuery.extend(true, {
6885        specialEasing: {},
6886        easing: jQuery.easing._default
6887      }, options),
6888      originalProperties: properties,
6889      originalOptions: options,
6890      startTime: fxNow || createFxNow(),
6891      duration: options.duration,
6892      tweens: [],
6893      createTween: function createTween(prop, end) {
6894        var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
6895        animation.tweens.push(tween);
6896        return tween;
6897      },
6898      stop: function stop(gotoEnd) {
6899        var index = 0,
6900            // If we are going to the end, we want to run all the tweens
6901        // otherwise we skip this part
6902        length = gotoEnd ? animation.tweens.length : 0;
6903
6904        if (stopped) {
6905          return this;
6906        }
6907
6908        stopped = true;
6909
6910        for (; index < length; index++) {
6911          animation.tweens[index].run(1);
6912        } // Resolve when we played the last frame; otherwise, reject
6913
6914
6915        if (gotoEnd) {
6916          deferred.notifyWith(elem, [animation, 1, 0]);
6917          deferred.resolveWith(elem, [animation, gotoEnd]);
6918        } else {
6919          deferred.rejectWith(elem, [animation, gotoEnd]);
6920        }
6921
6922        return this;
6923      }
6924    }),
6925        props = animation.props;
6926
6927    propFilter(props, animation.opts.specialEasing);
6928
6929    for (; index < length; index++) {
6930      result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
6931
6932      if (result) {
6933        if (isFunction(result.stop)) {
6934          jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
6935        }
6936
6937        return result;
6938      }
6939    }
6940
6941    jQuery.map(props, createTween, animation);
6942
6943    if (isFunction(animation.opts.start)) {
6944      animation.opts.start.call(elem, animation);
6945    } // Attach callbacks from options
6946
6947
6948    animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
6949    jQuery.fx.timer(jQuery.extend(tick, {
6950      elem: elem,
6951      anim: animation,
6952      queue: animation.opts.queue
6953    }));
6954    return animation;
6955  }
6956
6957  jQuery.Animation = jQuery.extend(Animation, {
6958    tweeners: {
6959      "*": [function (prop, value) {
6960        var tween = this.createTween(prop, value);
6961        adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
6962        return tween;
6963      }]
6964    },
6965    tweener: function tweener(props, callback) {
6966      if (isFunction(props)) {
6967        callback = props;
6968        props = ["*"];
6969      } else {
6970        props = props.match(rnothtmlwhite);
6971      }
6972
6973      var prop,
6974          index = 0,
6975          length = props.length;
6976
6977      for (; index < length; index++) {
6978        prop = props[index];
6979        Animation.tweeners[prop] = Animation.tweeners[prop] || [];
6980        Animation.tweeners[prop].unshift(callback);
6981      }
6982    },
6983    prefilters: [defaultPrefilter],
6984    prefilter: function prefilter(callback, prepend) {
6985      if (prepend) {
6986        Animation.prefilters.unshift(callback);
6987      } else {
6988        Animation.prefilters.push(callback);
6989      }
6990    }
6991  });
6992
6993  jQuery.speed = function (speed, easing, fn) {
6994    var opt = speed && _typeof(speed) === "object" ? jQuery.extend({}, speed) : {
6995      complete: fn || !fn && easing || isFunction(speed) && speed,
6996      duration: speed,
6997      easing: fn && easing || easing && !isFunction(easing) && easing
6998    }; // Go to the end state if fx are off
6999
7000    if (jQuery.fx.off) {
7001      opt.duration = 0;
7002    } else {
7003      if (typeof opt.duration !== "number") {
7004        if (opt.duration in jQuery.fx.speeds) {
7005          opt.duration = jQuery.fx.speeds[opt.duration];
7006        } else {
7007          opt.duration = jQuery.fx.speeds._default;
7008        }
7009      }
7010    } // Normalize opt.queue - true/undefined/null -> "fx"
7011
7012
7013    if (opt.queue == null || opt.queue === true) {
7014      opt.queue = "fx";
7015    } // Queueing
7016
7017
7018    opt.old = opt.complete;
7019
7020    opt.complete = function () {
7021      if (isFunction(opt.old)) {
7022        opt.old.call(this);
7023      }
7024
7025      if (opt.queue) {
7026        jQuery.dequeue(this, opt.queue);
7027      }
7028    };
7029
7030    return opt;
7031  };
7032
7033  jQuery.fn.extend({
7034    fadeTo: function fadeTo(speed, to, easing, callback) {
7035      // Show any hidden elements after setting opacity to 0
7036      return this.filter(isHiddenWithinTree).css("opacity", 0).show() // Animate to the value specified
7037      .end().animate({
7038        opacity: to
7039      }, speed, easing, callback);
7040    },
7041    animate: function animate(prop, speed, easing, callback) {
7042      var empty = jQuery.isEmptyObject(prop),
7043          optall = jQuery.speed(speed, easing, callback),
7044          doAnimation = function doAnimation() {
7045        // Operate on a copy of prop so per-property easing won't be lost
7046        var anim = Animation(this, jQuery.extend({}, prop), optall); // Empty animations, or finishing resolves immediately
7047
7048        if (empty || dataPriv.get(this, "finish")) {
7049          anim.stop(true);
7050        }
7051      };
7052
7053      doAnimation.finish = doAnimation;
7054      return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
7055    },
7056    stop: function stop(type, clearQueue, gotoEnd) {
7057      var stopQueue = function stopQueue(hooks) {
7058        var stop = hooks.stop;
7059        delete hooks.stop;
7060        stop(gotoEnd);
7061      };
7062
7063      if (typeof type !== "string") {
7064        gotoEnd = clearQueue;
7065        clearQueue = type;
7066        type = undefined;
7067      }
7068
7069      if (clearQueue) {
7070        this.queue(type || "fx", []);
7071      }
7072
7073      return this.each(function () {
7074        var dequeue = true,
7075            index = type != null && type + "queueHooks",
7076            timers = jQuery.timers,
7077            data = dataPriv.get(this);
7078
7079        if (index) {
7080          if (data[index] && data[index].stop) {
7081            stopQueue(data[index]);
7082          }
7083        } else {
7084          for (index in data) {
7085            if (data[index] && data[index].stop && rrun.test(index)) {
7086              stopQueue(data[index]);
7087            }
7088          }
7089        }
7090
7091        for (index = timers.length; index--;) {
7092          if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
7093            timers[index].anim.stop(gotoEnd);
7094            dequeue = false;
7095            timers.splice(index, 1);
7096          }
7097        } // Start the next in the queue if the last step wasn't forced.
7098        // Timers currently will call their complete callbacks, which
7099        // will dequeue but only if they were gotoEnd.
7100
7101
7102        if (dequeue || !gotoEnd) {
7103          jQuery.dequeue(this, type);
7104        }
7105      });
7106    },
7107    finish: function finish(type) {
7108      if (type !== false) {
7109        type = type || "fx";
7110      }
7111
7112      return this.each(function () {
7113        var index,
7114            data = dataPriv.get(this),
7115            queue = data[type + "queue"],
7116            hooks = data[type + "queueHooks"],
7117            timers = jQuery.timers,
7118            length = queue ? queue.length : 0; // Enable finishing flag on private data
7119
7120        data.finish = true; // Empty the queue first
7121
7122        jQuery.queue(this, type, []);
7123
7124        if (hooks && hooks.stop) {
7125          hooks.stop.call(this, true);
7126        } // Look for any active animations, and finish them
7127
7128
7129        for (index = timers.length; index--;) {
7130          if (timers[index].elem === this && timers[index].queue === type) {
7131            timers[index].anim.stop(true);
7132            timers.splice(index, 1);
7133          }
7134        } // Look for any animations in the old queue and finish them
7135
7136
7137        for (index = 0; index < length; index++) {
7138          if (queue[index] && queue[index].finish) {
7139            queue[index].finish.call(this);
7140          }
7141        } // Turn off finishing flag
7142
7143
7144        delete data.finish;
7145      });
7146    }
7147  });
7148  jQuery.each(["toggle", "show", "hide"], function (_i, name) {
7149    var cssFn = jQuery.fn[name];
7150
7151    jQuery.fn[name] = function (speed, easing, callback) {
7152      return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
7153    };
7154  }); // Generate shortcuts for custom animations
7155
7156  jQuery.each({
7157    slideDown: genFx("show"),
7158    slideUp: genFx("hide"),
7159    slideToggle: genFx("toggle"),
7160    fadeIn: {
7161      opacity: "show"
7162    },
7163    fadeOut: {
7164      opacity: "hide"
7165    },
7166    fadeToggle: {
7167      opacity: "toggle"
7168    }
7169  }, function (name, props) {
7170    jQuery.fn[name] = function (speed, easing, callback) {
7171      return this.animate(props, speed, easing, callback);
7172    };
7173  });
7174  jQuery.timers = [];
7175
7176  jQuery.fx.tick = function () {
7177    var timer,
7178        i = 0,
7179        timers = jQuery.timers;
7180    fxNow = Date.now();
7181
7182    for (; i < timers.length; i++) {
7183      timer = timers[i]; // Run the timer and safely remove it when done (allowing for external removal)
7184
7185      if (!timer() && timers[i] === timer) {
7186        timers.splice(i--, 1);
7187      }
7188    }
7189
7190    if (!timers.length) {
7191      jQuery.fx.stop();
7192    }
7193
7194    fxNow = undefined;
7195  };
7196
7197  jQuery.fx.timer = function (timer) {
7198    jQuery.timers.push(timer);
7199    jQuery.fx.start();
7200  };
7201
7202  jQuery.fx.interval = 13;
7203
7204  jQuery.fx.start = function () {
7205    if (inProgress) {
7206      return;
7207    }
7208
7209    inProgress = true;
7210    schedule();
7211  };
7212
7213  jQuery.fx.stop = function () {
7214    inProgress = null;
7215  };
7216
7217  jQuery.fx.speeds = {
7218    slow: 600,
7219    fast: 200,
7220    // Default speed
7221    _default: 400
7222  }; // Based off of the plugin by Clint Helfers, with permission.
7223  // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
7224
7225  jQuery.fn.delay = function (time, type) {
7226    time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
7227    type = type || "fx";
7228    return this.queue(type, function (next, hooks) {
7229      var timeout = window.setTimeout(next, time);
7230
7231      hooks.stop = function () {
7232        window.clearTimeout(timeout);
7233      };
7234    });
7235  };
7236
7237  (function () {
7238    var input = document.createElement("input"),
7239        select = document.createElement("select"),
7240        opt = select.appendChild(document.createElement("option"));
7241    input.type = "checkbox"; // Support: Android <=4.3 only
7242    // Default value for a checkbox should be "on"
7243
7244    support.checkOn = input.value !== ""; // Support: IE <=11 only
7245    // Must access selectedIndex to make default options select
7246
7247    support.optSelected = opt.selected; // Support: IE <=11 only
7248    // An input loses its value after becoming a radio
7249
7250    input = document.createElement("input");
7251    input.value = "t";
7252    input.type = "radio";
7253    support.radioValue = input.value === "t";
7254  })();
7255
7256  var boolHook,
7257      attrHandle = jQuery.expr.attrHandle;
7258  jQuery.fn.extend({
7259    attr: function attr(name, value) {
7260      return access(this, jQuery.attr, name, value, arguments.length > 1);
7261    },
7262    removeAttr: function removeAttr(name) {
7263      return this.each(function () {
7264        jQuery.removeAttr(this, name);
7265      });
7266    }
7267  });
7268  jQuery.extend({
7269    attr: function attr(elem, name, value) {
7270      var ret,
7271          hooks,
7272          nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes
7273
7274      if (nType === 3 || nType === 8 || nType === 2) {
7275        return;
7276      } // Fallback to prop when attributes are not supported
7277
7278
7279      if (typeof elem.getAttribute === "undefined") {
7280        return jQuery.prop(elem, name, value);
7281      } // Attribute hooks are determined by the lowercase version
7282      // Grab necessary hook if one is defined
7283
7284
7285      if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7286        hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : undefined);
7287      }
7288
7289      if (value !== undefined) {
7290        if (value === null) {
7291          jQuery.removeAttr(elem, name);
7292          return;
7293        }
7294
7295        if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
7296          return ret;
7297        }
7298
7299        elem.setAttribute(name, value + "");
7300        return value;
7301      }
7302
7303      if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
7304        return ret;
7305      }
7306
7307      ret = jQuery.find.attr(elem, name); // Non-existent attributes return null, we normalize to undefined
7308
7309      return ret == null ? undefined : ret;
7310    },
7311    attrHooks: {
7312      type: {
7313        set: function set(elem, value) {
7314          if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
7315            var val = elem.value;
7316            elem.setAttribute("type", value);
7317
7318            if (val) {
7319              elem.value = val;
7320            }
7321
7322            return value;
7323          }
7324        }
7325      }
7326    },
7327    removeAttr: function removeAttr(elem, value) {
7328      var name,
7329          i = 0,
7330          // Attribute names can contain non-HTML whitespace characters
7331      // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
7332      attrNames = value && value.match(rnothtmlwhite);
7333
7334      if (attrNames && elem.nodeType === 1) {
7335        while (name = attrNames[i++]) {
7336          elem.removeAttribute(name);
7337        }
7338      }
7339    }
7340  }); // Hooks for boolean attributes
7341
7342  boolHook = {
7343    set: function set(elem, value, name) {
7344      if (value === false) {
7345        // Remove boolean attributes when set to false
7346        jQuery.removeAttr(elem, name);
7347      } else {
7348        elem.setAttribute(name, name);
7349      }
7350
7351      return name;
7352    }
7353  };
7354  jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (_i, name) {
7355    var getter = attrHandle[name] || jQuery.find.attr;
7356
7357    attrHandle[name] = function (elem, name, isXML) {
7358      var ret,
7359          handle,
7360          lowercaseName = name.toLowerCase();
7361
7362      if (!isXML) {
7363        // Avoid an infinite loop by temporarily removing this function from the getter
7364        handle = attrHandle[lowercaseName];
7365        attrHandle[lowercaseName] = ret;
7366        ret = getter(elem, name, isXML) != null ? lowercaseName : null;
7367        attrHandle[lowercaseName] = handle;
7368      }
7369
7370      return ret;
7371    };
7372  });
7373  var rfocusable = /^(?:input|select|textarea|button)$/i,
7374      rclickable = /^(?:a|area)$/i;
7375  jQuery.fn.extend({
7376    prop: function prop(name, value) {
7377      return access(this, jQuery.prop, name, value, arguments.length > 1);
7378    },
7379    removeProp: function removeProp(name) {
7380      return this.each(function () {
7381        delete this[jQuery.propFix[name] || name];
7382      });
7383    }
7384  });
7385  jQuery.extend({
7386    prop: function prop(elem, name, value) {
7387      var ret,
7388          hooks,
7389          nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes
7390
7391      if (nType === 3 || nType === 8 || nType === 2) {
7392        return;
7393      }
7394
7395      if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7396        // Fix name and attach hooks
7397        name = jQuery.propFix[name] || name;
7398        hooks = jQuery.propHooks[name];
7399      }
7400
7401      if (value !== undefined) {
7402        if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
7403          return ret;
7404        }
7405
7406        return elem[name] = value;
7407      }
7408
7409      if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
7410        return ret;
7411      }
7412
7413      return elem[name];
7414    },
7415    propHooks: {
7416      tabIndex: {
7417        get: function get(elem) {
7418          // Support: IE <=9 - 11 only
7419          // elem.tabIndex doesn't always return the
7420          // correct value when it hasn't been explicitly set
7421          // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
7422          // Use proper attribute retrieval(#12072)
7423          var tabindex = jQuery.find.attr(elem, "tabindex");
7424
7425          if (tabindex) {
7426            return parseInt(tabindex, 10);
7427          }
7428
7429          if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
7430            return 0;
7431          }
7432
7433          return -1;
7434        }
7435      }
7436    },
7437    propFix: {
7438      "for": "htmlFor",
7439      "class": "className"
7440    }
7441  }); // Support: IE <=11 only
7442  // Accessing the selectedIndex property
7443  // forces the browser to respect setting selected
7444  // on the option
7445  // The getter ensures a default option is selected
7446  // when in an optgroup
7447  // eslint rule "no-unused-expressions" is disabled for this code
7448  // since it considers such accessions noop
7449
7450  if (!support.optSelected) {
7451    jQuery.propHooks.selected = {
7452      get: function get(elem) {
7453        /* eslint no-unused-expressions: "off" */
7454        var parent = elem.parentNode;
7455
7456        if (parent && parent.parentNode) {
7457          parent.parentNode.selectedIndex;
7458        }
7459
7460        return null;
7461      },
7462      set: function set(elem) {
7463        /* eslint no-unused-expressions: "off" */
7464        var parent = elem.parentNode;
7465
7466        if (parent) {
7467          parent.selectedIndex;
7468
7469          if (parent.parentNode) {
7470            parent.parentNode.selectedIndex;
7471          }
7472        }
7473      }
7474    };
7475  }
7476
7477  jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
7478    jQuery.propFix[this.toLowerCase()] = this;
7479  }); // Strip and collapse whitespace according to HTML spec
7480  // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
7481
7482  function stripAndCollapse(value) {
7483    var tokens = value.match(rnothtmlwhite) || [];
7484    return tokens.join(" ");
7485  }
7486
7487  function getClass(elem) {
7488    return elem.getAttribute && elem.getAttribute("class") || "";
7489  }
7490
7491  function classesToArray(value) {
7492    if (Array.isArray(value)) {
7493      return value;
7494    }
7495
7496    if (typeof value === "string") {
7497      return value.match(rnothtmlwhite) || [];
7498    }
7499
7500    return [];
7501  }
7502
7503  jQuery.fn.extend({
7504    addClass: function addClass(value) {
7505      var classes,
7506          elem,
7507          cur,
7508          curValue,
7509          clazz,
7510          j,
7511          finalValue,
7512          i = 0;
7513
7514      if (isFunction(value)) {
7515        return this.each(function (j) {
7516          jQuery(this).addClass(value.call(this, j, getClass(this)));
7517        });
7518      }
7519
7520      classes = classesToArray(value);
7521
7522      if (classes.length) {
7523        while (elem = this[i++]) {
7524          curValue = getClass(elem);
7525          cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
7526
7527          if (cur) {
7528            j = 0;
7529
7530            while (clazz = classes[j++]) {
7531              if (cur.indexOf(" " + clazz + " ") < 0) {
7532                cur += clazz + " ";
7533              }
7534            } // Only assign if different to avoid unneeded rendering.
7535
7536
7537            finalValue = stripAndCollapse(cur);
7538
7539            if (curValue !== finalValue) {
7540              elem.setAttribute("class", finalValue);
7541            }
7542          }
7543        }
7544      }
7545
7546      return this;
7547    },
7548    removeClass: function removeClass(value) {
7549      var classes,
7550          elem,
7551          cur,
7552          curValue,
7553          clazz,
7554          j,
7555          finalValue,
7556          i = 0;
7557
7558      if (isFunction(value)) {
7559        return this.each(function (j) {
7560          jQuery(this).removeClass(value.call(this, j, getClass(this)));
7561        });
7562      }
7563
7564      if (!arguments.length) {
7565        return this.attr("class", "");
7566      }
7567
7568      classes = classesToArray(value);
7569
7570      if (classes.length) {
7571        while (elem = this[i++]) {
7572          curValue = getClass(elem); // This expression is here for better compressibility (see addClass)
7573
7574          cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
7575
7576          if (cur) {
7577            j = 0;
7578
7579            while (clazz = classes[j++]) {
7580              // Remove *all* instances
7581              while (cur.indexOf(" " + clazz + " ") > -1) {
7582                cur = cur.replace(" " + clazz + " ", " ");
7583              }
7584            } // Only assign if different to avoid unneeded rendering.
7585
7586
7587            finalValue = stripAndCollapse(cur);
7588
7589            if (curValue !== finalValue) {
7590              elem.setAttribute("class", finalValue);
7591            }
7592          }
7593        }
7594      }
7595
7596      return this;
7597    },
7598    toggleClass: function toggleClass(value, stateVal) {
7599      var type = _typeof(value),
7600          isValidValue = type === "string" || Array.isArray(value);
7601
7602      if (typeof stateVal === "boolean" && isValidValue) {
7603        return stateVal ? this.addClass(value) : this.removeClass(value);
7604      }
7605
7606      if (isFunction(value)) {
7607        return this.each(function (i) {
7608          jQuery(this).toggleClass(value.call(this, i, getClass(this), stateVal), stateVal);
7609        });
7610      }
7611
7612      return this.each(function () {
7613        var className, i, self, classNames;
7614
7615        if (isValidValue) {
7616          // Toggle individual class names
7617          i = 0;
7618          self = jQuery(this);
7619          classNames = classesToArray(value);
7620
7621          while (className = classNames[i++]) {
7622            // Check each className given, space separated list
7623            if (self.hasClass(className)) {
7624              self.removeClass(className);
7625            } else {
7626              self.addClass(className);
7627            }
7628          } // Toggle whole class name
7629
7630        } else if (value === undefined || type === "boolean") {
7631          className = getClass(this);
7632
7633          if (className) {
7634            // Store className if set
7635            dataPriv.set(this, "__className__", className);
7636          } // If the element has a class name or if we're passed `false`,
7637          // then remove the whole classname (if there was one, the above saved it).
7638          // Otherwise bring back whatever was previously saved (if anything),
7639          // falling back to the empty string if nothing was stored.
7640
7641
7642          if (this.setAttribute) {
7643            this.setAttribute("class", className || value === false ? "" : dataPriv.get(this, "__className__") || "");
7644          }
7645        }
7646      });
7647    },
7648    hasClass: function hasClass(selector) {
7649      var className,
7650          elem,
7651          i = 0;
7652      className = " " + selector + " ";
7653
7654      while (elem = this[i++]) {
7655        if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
7656          return true;
7657        }
7658      }
7659
7660      return false;
7661    }
7662  });
7663  var rreturn = /\r/g;
7664  jQuery.fn.extend({
7665    val: function val(value) {
7666      var hooks,
7667          ret,
7668          valueIsFunction,
7669          elem = this[0];
7670
7671      if (!arguments.length) {
7672        if (elem) {
7673          hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
7674
7675          if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
7676            return ret;
7677          }
7678
7679          ret = elem.value; // Handle most common string cases
7680
7681          if (typeof ret === "string") {
7682            return ret.replace(rreturn, "");
7683          } // Handle cases where value is null/undef or number
7684
7685
7686          return ret == null ? "" : ret;
7687        }
7688
7689        return;
7690      }
7691
7692      valueIsFunction = isFunction(value);
7693      return this.each(function (i) {
7694        var val;
7695
7696        if (this.nodeType !== 1) {
7697          return;
7698        }
7699
7700        if (valueIsFunction) {
7701          val = value.call(this, i, jQuery(this).val());
7702        } else {
7703          val = value;
7704        } // Treat null/undefined as ""; convert numbers to string
7705
7706
7707        if (val == null) {
7708          val = "";
7709        } else if (typeof val === "number") {
7710          val += "";
7711        } else if (Array.isArray(val)) {
7712          val = jQuery.map(val, function (value) {
7713            return value == null ? "" : value + "";
7714          });
7715        }
7716
7717        hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; // If set returns undefined, fall back to normal setting
7718
7719        if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
7720          this.value = val;
7721        }
7722      });
7723    }
7724  });
7725  jQuery.extend({
7726    valHooks: {
7727      option: {
7728        get: function get(elem) {
7729          var val = jQuery.find.attr(elem, "value");
7730          return val != null ? val : // Support: IE <=10 - 11 only
7731          // option.text throws exceptions (#14686, #14858)
7732          // Strip and collapse whitespace
7733          // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
7734          stripAndCollapse(jQuery.text(elem));
7735        }
7736      },
7737      select: {
7738        get: function get(elem) {
7739          var value,
7740              option,
7741              i,
7742              options = elem.options,
7743              index = elem.selectedIndex,
7744              one = elem.type === "select-one",
7745              values = one ? null : [],
7746              max = one ? index + 1 : options.length;
7747
7748          if (index < 0) {
7749            i = max;
7750          } else {
7751            i = one ? index : 0;
7752          } // Loop through all the selected options
7753
7754
7755          for (; i < max; i++) {
7756            option = options[i]; // Support: IE <=9 only
7757            // IE8-9 doesn't update selected after form reset (#2551)
7758
7759            if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup
7760            !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
7761              // Get the specific value for the option
7762              value = jQuery(option).val(); // We don't need an array for one selects
7763
7764              if (one) {
7765                return value;
7766              } // Multi-Selects return an array
7767
7768
7769              values.push(value);
7770            }
7771          }
7772
7773          return values;
7774        },
7775        set: function set(elem, value) {
7776          var optionSet,
7777              option,
7778              options = elem.options,
7779              values = jQuery.makeArray(value),
7780              i = options.length;
7781
7782          while (i--) {
7783            option = options[i];
7784            /* eslint-disable no-cond-assign */
7785
7786            if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
7787              optionSet = true;
7788            }
7789            /* eslint-enable no-cond-assign */
7790
7791          } // Force browsers to behave consistently when non-matching value is set
7792
7793
7794          if (!optionSet) {
7795            elem.selectedIndex = -1;
7796          }
7797
7798          return values;
7799        }
7800      }
7801    }
7802  }); // Radios and checkboxes getter/setter
7803
7804  jQuery.each(["radio", "checkbox"], function () {
7805    jQuery.valHooks[this] = {
7806      set: function set(elem, value) {
7807        if (Array.isArray(value)) {
7808          return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
7809        }
7810      }
7811    };
7812
7813    if (!support.checkOn) {
7814      jQuery.valHooks[this].get = function (elem) {
7815        return elem.getAttribute("value") === null ? "on" : elem.value;
7816      };
7817    }
7818  }); // Return jQuery for attributes-only inclusion
7819
7820  support.focusin = "onfocusin" in window;
7821
7822  var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
7823      stopPropagationCallback = function stopPropagationCallback(e) {
7824    e.stopPropagation();
7825  };
7826
7827  jQuery.extend(jQuery.event, {
7828    trigger: function trigger(event, data, elem, onlyHandlers) {
7829      var i,
7830          cur,
7831          tmp,
7832          bubbleType,
7833          ontype,
7834          handle,
7835          special,
7836          lastElement,
7837          eventPath = [elem || document],
7838          type = hasOwn.call(event, "type") ? event.type : event,
7839          namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
7840      cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes
7841
7842      if (elem.nodeType === 3 || elem.nodeType === 8) {
7843        return;
7844      } // focus/blur morphs to focusin/out; ensure we're not firing them right now
7845
7846
7847      if (rfocusMorph.test(type + jQuery.event.triggered)) {
7848        return;
7849      }
7850
7851      if (type.indexOf(".") > -1) {
7852        // Namespaced trigger; create a regexp to match event type in handle()
7853        namespaces = type.split(".");
7854        type = namespaces.shift();
7855        namespaces.sort();
7856      }
7857
7858      ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string
7859
7860      event = event[jQuery.expando] ? event : new jQuery.Event(type, _typeof(event) === "object" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
7861
7862      event.isTrigger = onlyHandlers ? 2 : 3;
7863      event.namespace = namespaces.join(".");
7864      event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; // Clean up the event in case it is being reused
7865
7866      event.result = undefined;
7867
7868      if (!event.target) {
7869        event.target = elem;
7870      } // Clone any incoming data and prepend the event, creating the handler arg list
7871
7872
7873      data = data == null ? [event] : jQuery.makeArray(data, [event]); // Allow special events to draw outside the lines
7874
7875      special = jQuery.event.special[type] || {};
7876
7877      if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
7878        return;
7879      } // Determine event propagation path in advance, per W3C events spec (#9951)
7880      // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
7881
7882
7883      if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
7884        bubbleType = special.delegateType || type;
7885
7886        if (!rfocusMorph.test(bubbleType + type)) {
7887          cur = cur.parentNode;
7888        }
7889
7890        for (; cur; cur = cur.parentNode) {
7891          eventPath.push(cur);
7892          tmp = cur;
7893        } // Only add window if we got to document (e.g., not plain obj or detached DOM)
7894
7895
7896        if (tmp === (elem.ownerDocument || document)) {
7897          eventPath.push(tmp.defaultView || tmp.parentWindow || window);
7898        }
7899      } // Fire handlers on the event path
7900
7901
7902      i = 0;
7903
7904      while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
7905        lastElement = cur;
7906        event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler
7907
7908        handle = (dataPriv.get(cur, "events") || Object.create(null))[event.type] && dataPriv.get(cur, "handle");
7909
7910        if (handle) {
7911          handle.apply(cur, data);
7912        } // Native handler
7913
7914
7915        handle = ontype && cur[ontype];
7916
7917        if (handle && handle.apply && acceptData(cur)) {
7918          event.result = handle.apply(cur, data);
7919
7920          if (event.result === false) {
7921            event.preventDefault();
7922          }
7923        }
7924      }
7925
7926      event.type = type; // If nobody prevented the default action, do it now
7927
7928      if (!onlyHandlers && !event.isDefaultPrevented()) {
7929        if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
7930          // Call a native DOM method on the target with the same name as the event.
7931          // Don't do default actions on window, that's where global variables be (#6170)
7932          if (ontype && isFunction(elem[type]) && !isWindow(elem)) {
7933            // Don't re-trigger an onFOO event when we call its FOO() method
7934            tmp = elem[ontype];
7935
7936            if (tmp) {
7937              elem[ontype] = null;
7938            } // Prevent re-triggering of the same event, since we already bubbled it above
7939
7940
7941            jQuery.event.triggered = type;
7942
7943            if (event.isPropagationStopped()) {
7944              lastElement.addEventListener(type, stopPropagationCallback);
7945            }
7946
7947            elem[type]();
7948
7949            if (event.isPropagationStopped()) {
7950              lastElement.removeEventListener(type, stopPropagationCallback);
7951            }
7952
7953            jQuery.event.triggered = undefined;
7954
7955            if (tmp) {
7956              elem[ontype] = tmp;
7957            }
7958          }
7959        }
7960      }
7961
7962      return event.result;
7963    },
7964    // Piggyback on a donor event to simulate a different one
7965    // Used only for `focus(in | out)` events
7966    simulate: function simulate(type, elem, event) {
7967      var e = jQuery.extend(new jQuery.Event(), event, {
7968        type: type,
7969        isSimulated: true
7970      });
7971      jQuery.event.trigger(e, null, elem);
7972    }
7973  });
7974  jQuery.fn.extend({
7975    trigger: function trigger(type, data) {
7976      return this.each(function () {
7977        jQuery.event.trigger(type, data, this);
7978      });
7979    },
7980    triggerHandler: function triggerHandler(type, data) {
7981      var elem = this[0];
7982
7983      if (elem) {
7984        return jQuery.event.trigger(type, data, elem, true);
7985      }
7986    }
7987  }); // Support: Firefox <=44
7988  // Firefox doesn't have focus(in | out) events
7989  // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
7990  //
7991  // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
7992  // focus(in | out) events fire after focus & blur events,
7993  // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
7994  // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
7995
7996  if (!support.focusin) {
7997    jQuery.each({
7998      focus: "focusin",
7999      blur: "focusout"
8000    }, function (orig, fix) {
8001      // Attach a single capturing handler on the document while someone wants focusin/focusout
8002      var handler = function handler(event) {
8003        jQuery.event.simulate(fix, event.target, jQuery.event.fix(event));
8004      };
8005
8006      jQuery.event.special[fix] = {
8007        setup: function setup() {
8008          // Handle: regular nodes (via `this.ownerDocument`), window
8009          // (via `this.document`) & document (via `this`).
8010          var doc = this.ownerDocument || this.document || this,
8011              attaches = dataPriv.access(doc, fix);
8012
8013          if (!attaches) {
8014            doc.addEventListener(orig, handler, true);
8015          }
8016
8017          dataPriv.access(doc, fix, (attaches || 0) + 1);
8018        },
8019        teardown: function teardown() {
8020          var doc = this.ownerDocument || this.document || this,
8021              attaches = dataPriv.access(doc, fix) - 1;
8022
8023          if (!attaches) {
8024            doc.removeEventListener(orig, handler, true);
8025            dataPriv.remove(doc, fix);
8026          } else {
8027            dataPriv.access(doc, fix, attaches);
8028          }
8029        }
8030      };
8031    });
8032  }
8033
8034  var location = window.location;
8035  var nonce = {
8036    guid: Date.now()
8037  };
8038  var rquery = /\?/; // Cross-browser xml parsing
8039
8040  jQuery.parseXML = function (data) {
8041    var xml, parserErrorElem;
8042
8043    if (!data || typeof data !== "string") {
8044      return null;
8045    } // Support: IE 9 - 11 only
8046    // IE throws on parseFromString with invalid input.
8047
8048
8049    try {
8050      xml = new window.DOMParser().parseFromString(data, "text/xml");
8051    } catch (e) {}
8052
8053    parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];
8054
8055    if (!xml || parserErrorElem) {
8056      jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function (el) {
8057        return el.textContent;
8058      }).join("\n") : data));
8059    }
8060
8061    return xml;
8062  };
8063
8064  var rbracket = /\[\]$/,
8065      rCRLF = /\r?\n/g,
8066      rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8067      rsubmittable = /^(?:input|select|textarea|keygen)/i;
8068
8069  function buildParams(prefix, obj, traditional, add) {
8070    var name;
8071
8072    if (Array.isArray(obj)) {
8073      // Serialize array item.
8074      jQuery.each(obj, function (i, v) {
8075        if (traditional || rbracket.test(prefix)) {
8076          // Treat each array item as a scalar.
8077          add(prefix, v);
8078        } else {
8079          // Item is non-scalar (array or object), encode its numeric index.
8080          buildParams(prefix + "[" + (_typeof(v) === "object" && v != null ? i : "") + "]", v, traditional, add);
8081        }
8082      });
8083    } else if (!traditional && toType(obj) === "object") {
8084      // Serialize object item.
8085      for (name in obj) {
8086        buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
8087      }
8088    } else {
8089      // Serialize scalar item.
8090      add(prefix, obj);
8091    }
8092  } // Serialize an array of form elements or a set of
8093  // key/values into a query string
8094
8095
8096  jQuery.param = function (a, traditional) {
8097    var prefix,
8098        s = [],
8099        add = function add(key, valueOrFunction) {
8100      // If value is a function, invoke it and use its return value
8101      var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;
8102      s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);
8103    };
8104
8105    if (a == null) {
8106      return "";
8107    } // If an array was passed in, assume that it is an array of form elements.
8108
8109
8110    if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
8111      // Serialize the form elements
8112      jQuery.each(a, function () {
8113        add(this.name, this.value);
8114      });
8115    } else {
8116      // If traditional, encode the "old" way (the way 1.3.2 or older
8117      // did it), otherwise encode params recursively.
8118      for (prefix in a) {
8119        buildParams(prefix, a[prefix], traditional, add);
8120      }
8121    } // Return the resulting serialization
8122
8123
8124    return s.join("&");
8125  };
8126
8127  jQuery.fn.extend({
8128    serialize: function serialize() {
8129      return jQuery.param(this.serializeArray());
8130    },
8131    serializeArray: function serializeArray() {
8132      return this.map(function () {
8133        // Can add propHook for "elements" to filter or add form elements
8134        var elements = jQuery.prop(this, "elements");
8135        return elements ? jQuery.makeArray(elements) : this;
8136      }).filter(function () {
8137        var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works
8138
8139        return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
8140      }).map(function (_i, elem) {
8141        var val = jQuery(this).val();
8142
8143        if (val == null) {
8144          return null;
8145        }
8146
8147        if (Array.isArray(val)) {
8148          return jQuery.map(val, function (val) {
8149            return {
8150              name: elem.name,
8151              value: val.replace(rCRLF, "\r\n")
8152            };
8153          });
8154        }
8155
8156        return {
8157          name: elem.name,
8158          value: val.replace(rCRLF, "\r\n")
8159        };
8160      }).get();
8161    }
8162  });
8163  var r20 = /%20/g,
8164      rhash = /#.*$/,
8165      rantiCache = /([?&])_=[^&]*/,
8166      rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
8167      // #7653, #8125, #8152: local protocol detection
8168  rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
8169      rnoContent = /^(?:GET|HEAD)$/,
8170      rprotocol = /^\/\//,
8171
8172  /* Prefilters
8173   * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
8174   * 2) These are called:
8175   *    - BEFORE asking for a transport
8176   *    - AFTER param serialization (s.data is a string if s.processData is true)
8177   * 3) key is the dataType
8178   * 4) the catchall symbol "*" can be used
8179   * 5) execution will start with transport dataType and THEN continue down to "*" if needed
8180   */
8181  prefilters = {},
8182
8183  /* Transports bindings
8184   * 1) key is the dataType
8185   * 2) the catchall symbol "*" can be used
8186   * 3) selection will start with transport dataType and THEN go to "*" if needed
8187   */
8188  transports = {},
8189      // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
8190  allTypes = "*/".concat("*"),
8191      // Anchor tag for parsing the document origin
8192  originAnchor = document.createElement("a");
8193  originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
8194
8195  function addToPrefiltersOrTransports(structure) {
8196    // dataTypeExpression is optional and defaults to "*"
8197    return function (dataTypeExpression, func) {
8198      if (typeof dataTypeExpression !== "string") {
8199        func = dataTypeExpression;
8200        dataTypeExpression = "*";
8201      }
8202
8203      var dataType,
8204          i = 0,
8205          dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
8206
8207      if (isFunction(func)) {
8208        // For each dataType in the dataTypeExpression
8209        while (dataType = dataTypes[i++]) {
8210          // Prepend if requested
8211          if (dataType[0] === "+") {
8212            dataType = dataType.slice(1) || "*";
8213            (structure[dataType] = structure[dataType] || []).unshift(func); // Otherwise append
8214          } else {
8215            (structure[dataType] = structure[dataType] || []).push(func);
8216          }
8217        }
8218      }
8219    };
8220  } // Base inspection function for prefilters and transports
8221
8222
8223  function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
8224    var inspected = {},
8225        seekingTransport = structure === transports;
8226
8227    function inspect(dataType) {
8228      var selected;
8229      inspected[dataType] = true;
8230      jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
8231        var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
8232
8233        if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
8234          options.dataTypes.unshift(dataTypeOrTransport);
8235          inspect(dataTypeOrTransport);
8236          return false;
8237        } else if (seekingTransport) {
8238          return !(selected = dataTypeOrTransport);
8239        }
8240      });
8241      return selected;
8242    }
8243
8244    return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
8245  } // A special extend for ajax options
8246  // that takes "flat" options (not to be deep extended)
8247  // Fixes #9887
8248
8249
8250  function ajaxExtend(target, src) {
8251    var key,
8252        deep,
8253        flatOptions = jQuery.ajaxSettings.flatOptions || {};
8254
8255    for (key in src) {
8256      if (src[key] !== undefined) {
8257        (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
8258      }
8259    }
8260
8261    if (deep) {
8262      jQuery.extend(true, target, deep);
8263    }
8264
8265    return target;
8266  }
8267  /* Handles responses to an ajax request:
8268   * - finds the right dataType (mediates between content-type and expected dataType)
8269   * - returns the corresponding response
8270   */
8271
8272
8273  function ajaxHandleResponses(s, jqXHR, responses) {
8274    var ct,
8275        type,
8276        finalDataType,
8277        firstDataType,
8278        contents = s.contents,
8279        dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process
8280
8281    while (dataTypes[0] === "*") {
8282      dataTypes.shift();
8283
8284      if (ct === undefined) {
8285        ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8286      }
8287    } // Check if we're dealing with a known content-type
8288
8289
8290    if (ct) {
8291      for (type in contents) {
8292        if (contents[type] && contents[type].test(ct)) {
8293          dataTypes.unshift(type);
8294          break;
8295        }
8296      }
8297    } // Check to see if we have a response for the expected dataType
8298
8299
8300    if (dataTypes[0] in responses) {
8301      finalDataType = dataTypes[0];
8302    } else {
8303      // Try convertible dataTypes
8304      for (type in responses) {
8305        if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
8306          finalDataType = type;
8307          break;
8308        }
8309
8310        if (!firstDataType) {
8311          firstDataType = type;
8312        }
8313      } // Or just use first one
8314
8315
8316      finalDataType = finalDataType || firstDataType;
8317    } // If we found a dataType
8318    // We add the dataType to the list if needed
8319    // and return the corresponding response
8320
8321
8322    if (finalDataType) {
8323      if (finalDataType !== dataTypes[0]) {
8324        dataTypes.unshift(finalDataType);
8325      }
8326
8327      return responses[finalDataType];
8328    }
8329  }
8330  /* Chain conversions given the request and the original response
8331   * Also sets the responseXXX fields on the jqXHR instance
8332   */
8333
8334
8335  function ajaxConvert(s, response, jqXHR, isSuccess) {
8336    var conv2,
8337        current,
8338        conv,
8339        tmp,
8340        prev,
8341        converters = {},
8342        // Work with a copy of dataTypes in case we need to modify it for conversion
8343    dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys
8344
8345    if (dataTypes[1]) {
8346      for (conv in s.converters) {
8347        converters[conv.toLowerCase()] = s.converters[conv];
8348      }
8349    }
8350
8351    current = dataTypes.shift(); // Convert to each sequential dataType
8352
8353    while (current) {
8354      if (s.responseFields[current]) {
8355        jqXHR[s.responseFields[current]] = response;
8356      } // Apply the dataFilter if provided
8357
8358
8359      if (!prev && isSuccess && s.dataFilter) {
8360        response = s.dataFilter(response, s.dataType);
8361      }
8362
8363      prev = current;
8364      current = dataTypes.shift();
8365
8366      if (current) {
8367        // There's only work to do if current dataType is non-auto
8368        if (current === "*") {
8369          current = prev; // Convert response if prev dataType is non-auto and differs from current
8370        } else if (prev !== "*" && prev !== current) {
8371          // Seek a direct converter
8372          conv = converters[prev + " " + current] || converters["* " + current]; // If none found, seek a pair
8373
8374          if (!conv) {
8375            for (conv2 in converters) {
8376              // If conv2 outputs current
8377              tmp = conv2.split(" ");
8378
8379              if (tmp[1] === current) {
8380                // If prev can be converted to accepted input
8381                conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
8382
8383                if (conv) {
8384                  // Condense equivalence converters
8385                  if (conv === true) {
8386                    conv = converters[conv2]; // Otherwise, insert the intermediate dataType
8387                  } else if (converters[conv2] !== true) {
8388                    current = tmp[0];
8389                    dataTypes.unshift(tmp[1]);
8390                  }
8391
8392                  break;
8393                }
8394              }
8395            }
8396          } // Apply converter (if not an equivalence)
8397
8398
8399          if (conv !== true) {
8400            // Unless errors are allowed to bubble, catch and return them
8401            if (conv && s["throws"]) {
8402              response = conv(response);
8403            } else {
8404              try {
8405                response = conv(response);
8406              } catch (e) {
8407                return {
8408                  state: "parsererror",
8409                  error: conv ? e : "No conversion from " + prev + " to " + current
8410                };
8411              }
8412            }
8413          }
8414        }
8415      }
8416    }
8417
8418    return {
8419      state: "success",
8420      data: response
8421    };
8422  }
8423
8424  jQuery.extend({
8425    // Counter for holding the number of active queries
8426    active: 0,
8427    // Last-Modified header cache for next request
8428    lastModified: {},
8429    etag: {},
8430    ajaxSettings: {
8431      url: location.href,
8432      type: "GET",
8433      isLocal: rlocalProtocol.test(location.protocol),
8434      global: true,
8435      processData: true,
8436      async: true,
8437      contentType: "application/x-www-form-urlencoded; charset=UTF-8",
8438
8439      /*
8440      timeout: 0,
8441      data: null,
8442      dataType: null,
8443      username: null,
8444      password: null,
8445      cache: null,
8446      throws: false,
8447      traditional: false,
8448      headers: {},
8449      */
8450      accepts: {
8451        "*": allTypes,
8452        text: "text/plain",
8453        html: "text/html",
8454        xml: "application/xml, text/xml",
8455        json: "application/json, text/javascript"
8456      },
8457      contents: {
8458        xml: /\bxml\b/,
8459        html: /\bhtml/,
8460        json: /\bjson\b/
8461      },
8462      responseFields: {
8463        xml: "responseXML",
8464        text: "responseText",
8465        json: "responseJSON"
8466      },
8467      // Data converters
8468      // Keys separate source (or catchall "*") and destination types with a single space
8469      converters: {
8470        // Convert anything to text
8471        "* text": String,
8472        // Text to html (true = no transformation)
8473        "text html": true,
8474        // Evaluate text as a json expression
8475        "text json": JSON.parse,
8476        // Parse text as xml
8477        "text xml": jQuery.parseXML
8478      },
8479      // For options that shouldn't be deep extended:
8480      // you can add your own custom options here if
8481      // and when you create one that shouldn't be
8482      // deep extended (see ajaxExtend)
8483      flatOptions: {
8484        url: true,
8485        context: true
8486      }
8487    },
8488    // Creates a full fledged settings object into target
8489    // with both ajaxSettings and settings fields.
8490    // If target is omitted, writes into ajaxSettings.
8491    ajaxSetup: function ajaxSetup(target, settings) {
8492      return settings ? // Building a settings object
8493      ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : // Extending ajaxSettings
8494      ajaxExtend(jQuery.ajaxSettings, target);
8495    },
8496    ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
8497    ajaxTransport: addToPrefiltersOrTransports(transports),
8498    // Main method
8499    ajax: function ajax(url, options) {
8500      // If url is an object, simulate pre-1.5 signature
8501      if (_typeof(url) === "object") {
8502        options = url;
8503        url = undefined;
8504      } // Force options to be an object
8505
8506
8507      options = options || {};
8508
8509      var transport,
8510          // URL without anti-cache param
8511      cacheURL,
8512          // Response headers
8513      responseHeadersString,
8514          responseHeaders,
8515          // timeout handle
8516      timeoutTimer,
8517          // Url cleanup var
8518      urlAnchor,
8519          // Request state (becomes false upon send and true upon completion)
8520      completed,
8521          // To know if global events are to be dispatched
8522      fireGlobals,
8523          // Loop variable
8524      i,
8525          // uncached part of the url
8526      uncached,
8527          // Create the final options object
8528      s = jQuery.ajaxSetup({}, options),
8529          // Callbacks context
8530      callbackContext = s.context || s,
8531          // Context for global events is callbackContext if it is a DOM node or jQuery collection
8532      globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,
8533          // Deferreds
8534      deferred = jQuery.Deferred(),
8535          completeDeferred = jQuery.Callbacks("once memory"),
8536          // Status-dependent callbacks
8537      _statusCode = s.statusCode || {},
8538          // Headers (they are sent all at once)
8539      requestHeaders = {},
8540          requestHeadersNames = {},
8541          // Default abort message
8542      strAbort = "canceled",
8543          // Fake xhr
8544      jqXHR = {
8545        readyState: 0,
8546        // Builds headers hashtable if needed
8547        getResponseHeader: function getResponseHeader(key) {
8548          var match;
8549
8550          if (completed) {
8551            if (!responseHeaders) {
8552              responseHeaders = {};
8553
8554              while (match = rheaders.exec(responseHeadersString)) {
8555                responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);
8556              }
8557            }
8558
8559            match = responseHeaders[key.toLowerCase() + " "];
8560          }
8561
8562          return match == null ? null : match.join(", ");
8563        },
8564        // Raw string
8565        getAllResponseHeaders: function getAllResponseHeaders() {
8566          return completed ? responseHeadersString : null;
8567        },
8568        // Caches the header
8569        setRequestHeader: function setRequestHeader(name, value) {
8570          if (completed == null) {
8571            name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
8572            requestHeaders[name] = value;
8573          }
8574
8575          return this;
8576        },
8577        // Overrides response content-type header
8578        overrideMimeType: function overrideMimeType(type) {
8579          if (completed == null) {
8580            s.mimeType = type;
8581          }
8582
8583          return this;
8584        },
8585        // Status-dependent callbacks
8586        statusCode: function statusCode(map) {
8587          var code;
8588
8589          if (map) {
8590            if (completed) {
8591              // Execute the appropriate callbacks
8592              jqXHR.always(map[jqXHR.status]);
8593            } else {
8594              // Lazy-add the new callbacks in a way that preserves old ones
8595              for (code in map) {
8596                _statusCode[code] = [_statusCode[code], map[code]];
8597              }
8598            }
8599          }
8600
8601          return this;
8602        },
8603        // Cancel the request
8604        abort: function abort(statusText) {
8605          var finalText = statusText || strAbort;
8606
8607          if (transport) {
8608            transport.abort(finalText);
8609          }
8610
8611          done(0, finalText);
8612          return this;
8613        }
8614      }; // Attach deferreds
8615
8616
8617      deferred.promise(jqXHR); // Add protocol if not provided (prefilters might expect it)
8618      // Handle falsy url in the settings object (#10093: consistency with old signature)
8619      // We also use the url parameter if available
8620
8621      s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//"); // Alias method option to type as per ticket #12004
8622
8623      s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list
8624
8625      s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; // A cross-domain request is in order when the origin doesn't match the current origin.
8626
8627      if (s.crossDomain == null) {
8628        urlAnchor = document.createElement("a"); // Support: IE <=8 - 11, Edge 12 - 15
8629        // IE throws exception on accessing the href property if url is malformed,
8630        // e.g. http://example.com:80x/
8631
8632        try {
8633          urlAnchor.href = s.url; // Support: IE <=8 - 11 only
8634          // Anchor's host property isn't correctly set when s.url is relative
8635
8636          urlAnchor.href = urlAnchor.href;
8637          s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
8638        } catch (e) {
8639          // If there is an error parsing the URL, assume it is crossDomain,
8640          // it can be rejected by the transport if it is invalid
8641          s.crossDomain = true;
8642        }
8643      } // Convert data if not already a string
8644
8645
8646      if (s.data && s.processData && typeof s.data !== "string") {
8647        s.data = jQuery.param(s.data, s.traditional);
8648      } // Apply prefilters
8649
8650
8651      inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); // If request was aborted inside a prefilter, stop there
8652
8653      if (completed) {
8654        return jqXHR;
8655      } // We can fire global events as of now if asked to
8656      // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
8657
8658
8659      fireGlobals = jQuery.event && s.global; // Watch for a new set of requests
8660
8661      if (fireGlobals && jQuery.active++ === 0) {
8662        jQuery.event.trigger("ajaxStart");
8663      } // Uppercase the type
8664
8665
8666      s.type = s.type.toUpperCase(); // Determine if request has content
8667
8668      s.hasContent = !rnoContent.test(s.type); // Save the URL in case we're toying with the If-Modified-Since
8669      // and/or If-None-Match header later on
8670      // Remove hash to simplify url manipulation
8671
8672      cacheURL = s.url.replace(rhash, ""); // More options handling for requests with no content
8673
8674      if (!s.hasContent) {
8675        // Remember the hash so we can put it back
8676        uncached = s.url.slice(cacheURL.length); // If data is available and should be processed, append data to url
8677
8678        if (s.data && (s.processData || typeof s.data === "string")) {
8679          cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; // #9682: remove data so that it's not used in an eventual retry
8680
8681          delete s.data;
8682        } // Add or update anti-cache param if needed
8683
8684
8685        if (s.cache === false) {
8686          cacheURL = cacheURL.replace(rantiCache, "$1");
8687          uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
8688        } // Put hash and anti-cache on the URL that will be requested (gh-1732)
8689
8690
8691        s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658)
8692      } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
8693        s.data = s.data.replace(r20, "+");
8694      } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8695
8696
8697      if (s.ifModified) {
8698        if (jQuery.lastModified[cacheURL]) {
8699          jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
8700        }
8701
8702        if (jQuery.etag[cacheURL]) {
8703          jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
8704        }
8705      } // Set the correct header, if data is being sent
8706
8707
8708      if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
8709        jqXHR.setRequestHeader("Content-Type", s.contentType);
8710      } // Set the Accepts header for the server, depending on the dataType
8711
8712
8713      jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); // Check for headers option
8714
8715      for (i in s.headers) {
8716        jqXHR.setRequestHeader(i, s.headers[i]);
8717      } // Allow custom headers/mimetypes and early abort
8718
8719
8720      if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) {
8721        // Abort if not done already and return
8722        return jqXHR.abort();
8723      } // Aborting is no longer a cancellation
8724
8725
8726      strAbort = "abort"; // Install callbacks on deferreds
8727
8728      completeDeferred.add(s.complete);
8729      jqXHR.done(s.success);
8730      jqXHR.fail(s.error); // Get transport
8731
8732      transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); // If no transport, we auto-abort
8733
8734      if (!transport) {
8735        done(-1, "No Transport");
8736      } else {
8737        jqXHR.readyState = 1; // Send global event
8738
8739        if (fireGlobals) {
8740          globalEventContext.trigger("ajaxSend", [jqXHR, s]);
8741        } // If request was aborted inside ajaxSend, stop there
8742
8743
8744        if (completed) {
8745          return jqXHR;
8746        } // Timeout
8747
8748
8749        if (s.async && s.timeout > 0) {
8750          timeoutTimer = window.setTimeout(function () {
8751            jqXHR.abort("timeout");
8752          }, s.timeout);
8753        }
8754
8755        try {
8756          completed = false;
8757          transport.send(requestHeaders, done);
8758        } catch (e) {
8759          // Rethrow post-completion exceptions
8760          if (completed) {
8761            throw e;
8762          } // Propagate others as results
8763
8764
8765          done(-1, e);
8766        }
8767      } // Callback for when everything is done
8768
8769
8770      function done(status, nativeStatusText, responses, headers) {
8771        var isSuccess,
8772            success,
8773            error,
8774            response,
8775            modified,
8776            statusText = nativeStatusText; // Ignore repeat invocations
8777
8778        if (completed) {
8779          return;
8780        }
8781
8782        completed = true; // Clear timeout if it exists
8783
8784        if (timeoutTimer) {
8785          window.clearTimeout(timeoutTimer);
8786        } // Dereference transport for early garbage collection
8787        // (no matter how long the jqXHR object will be used)
8788
8789
8790        transport = undefined; // Cache response headers
8791
8792        responseHeadersString = headers || ""; // Set readyState
8793
8794        jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful
8795
8796        isSuccess = status >= 200 && status < 300 || status === 304; // Get response data
8797
8798        if (responses) {
8799          response = ajaxHandleResponses(s, jqXHR, responses);
8800        } // Use a noop converter for missing script but not if jsonp
8801
8802
8803        if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) {
8804          s.converters["text script"] = function () {};
8805        } // Convert no matter what (that way responseXXX fields are always set)
8806
8807
8808        response = ajaxConvert(s, response, jqXHR, isSuccess); // If successful, handle type chaining
8809
8810        if (isSuccess) {
8811          // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8812          if (s.ifModified) {
8813            modified = jqXHR.getResponseHeader("Last-Modified");
8814
8815            if (modified) {
8816              jQuery.lastModified[cacheURL] = modified;
8817            }
8818
8819            modified = jqXHR.getResponseHeader("etag");
8820
8821            if (modified) {
8822              jQuery.etag[cacheURL] = modified;
8823            }
8824          } // if no content
8825
8826
8827          if (status === 204 || s.type === "HEAD") {
8828            statusText = "nocontent"; // if not modified
8829          } else if (status === 304) {
8830            statusText = "notmodified"; // If we have data, let's convert it
8831          } else {
8832            statusText = response.state;
8833            success = response.data;
8834            error = response.error;
8835            isSuccess = !error;
8836          }
8837        } else {
8838          // Extract error from statusText and normalize for non-aborts
8839          error = statusText;
8840
8841          if (status || !statusText) {
8842            statusText = "error";
8843
8844            if (status < 0) {
8845              status = 0;
8846            }
8847          }
8848        } // Set data for the fake xhr object
8849
8850
8851        jqXHR.status = status;
8852        jqXHR.statusText = (nativeStatusText || statusText) + ""; // Success/Error
8853
8854        if (isSuccess) {
8855          deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
8856        } else {
8857          deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
8858        } // Status-dependent callbacks
8859
8860
8861        jqXHR.statusCode(_statusCode);
8862        _statusCode = undefined;
8863
8864        if (fireGlobals) {
8865          globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);
8866        } // Complete
8867
8868
8869        completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
8870
8871        if (fireGlobals) {
8872          globalEventContext.trigger("ajaxComplete", [jqXHR, s]); // Handle the global AJAX counter
8873
8874          if (! --jQuery.active) {
8875            jQuery.event.trigger("ajaxStop");
8876          }
8877        }
8878      }
8879
8880      return jqXHR;
8881    },
8882    getJSON: function getJSON(url, data, callback) {
8883      return jQuery.get(url, data, callback, "json");
8884    },
8885    getScript: function getScript(url, callback) {
8886      return jQuery.get(url, undefined, callback, "script");
8887    }
8888  });
8889  jQuery.each(["get", "post"], function (_i, method) {
8890    jQuery[method] = function (url, data, callback, type) {
8891      // Shift arguments if data argument was omitted
8892      if (isFunction(data)) {
8893        type = type || callback;
8894        callback = data;
8895        data = undefined;
8896      } // The url can be an options object (which then must have .url)
8897
8898
8899      return jQuery.ajax(jQuery.extend({
8900        url: url,
8901        type: method,
8902        dataType: type,
8903        data: data,
8904        success: callback
8905      }, jQuery.isPlainObject(url) && url));
8906    };
8907  });
8908  jQuery.ajaxPrefilter(function (s) {
8909    var i;
8910
8911    for (i in s.headers) {
8912      if (i.toLowerCase() === "content-type") {
8913        s.contentType = s.headers[i] || "";
8914      }
8915    }
8916  });
8917
8918  jQuery._evalUrl = function (url, options, doc) {
8919    return jQuery.ajax({
8920      url: url,
8921      // Make this explicit, since user can override this through ajaxSetup (#11264)
8922      type: "GET",
8923      dataType: "script",
8924      cache: true,
8925      async: false,
8926      global: false,
8927      // Only evaluate the response if it is successful (gh-4126)
8928      // dataFilter is not invoked for failure responses, so using it instead
8929      // of the default converter is kludgy but it works.
8930      converters: {
8931        "text script": function textScript() {}
8932      },
8933      dataFilter: function dataFilter(response) {
8934        jQuery.globalEval(response, options, doc);
8935      }
8936    });
8937  };
8938
8939  jQuery.fn.extend({
8940    wrapAll: function wrapAll(html) {
8941      var wrap;
8942
8943      if (this[0]) {
8944        if (isFunction(html)) {
8945          html = html.call(this[0]);
8946        } // The elements to wrap the target around
8947
8948
8949        wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
8950
8951        if (this[0].parentNode) {
8952          wrap.insertBefore(this[0]);
8953        }
8954
8955        wrap.map(function () {
8956          var elem = this;
8957
8958          while (elem.firstElementChild) {
8959            elem = elem.firstElementChild;
8960          }
8961
8962          return elem;
8963        }).append(this);
8964      }
8965
8966      return this;
8967    },
8968    wrapInner: function wrapInner(html) {
8969      if (isFunction(html)) {
8970        return this.each(function (i) {
8971          jQuery(this).wrapInner(html.call(this, i));
8972        });
8973      }
8974
8975      return this.each(function () {
8976        var self = jQuery(this),
8977            contents = self.contents();
8978
8979        if (contents.length) {
8980          contents.wrapAll(html);
8981        } else {
8982          self.append(html);
8983        }
8984      });
8985    },
8986    wrap: function wrap(html) {
8987      var htmlIsFunction = isFunction(html);
8988      return this.each(function (i) {
8989        jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
8990      });
8991    },
8992    unwrap: function unwrap(selector) {
8993      this.parent(selector).not("body").each(function () {
8994        jQuery(this).replaceWith(this.childNodes);
8995      });
8996      return this;
8997    }
8998  });
8999
9000  jQuery.expr.pseudos.hidden = function (elem) {
9001    return !jQuery.expr.pseudos.visible(elem);
9002  };
9003
9004  jQuery.expr.pseudos.visible = function (elem) {
9005    return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
9006  };
9007
9008  jQuery.ajaxSettings.xhr = function () {
9009    try {
9010      return new window.XMLHttpRequest();
9011    } catch (e) {}
9012  };
9013
9014  var xhrSuccessStatus = {
9015    // File protocol always yields status code 0, assume 200
9016    0: 200,
9017    // Support: IE <=9 only
9018    // #1450: sometimes IE returns 1223 when it should be 204
9019    1223: 204
9020  },
9021      xhrSupported = jQuery.ajaxSettings.xhr();
9022  support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
9023  support.ajax = xhrSupported = !!xhrSupported;
9024  jQuery.ajaxTransport(function (options) {
9025    var _callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest
9026
9027
9028    if (support.cors || xhrSupported && !options.crossDomain) {
9029      return {
9030        send: function send(headers, complete) {
9031          var i,
9032              xhr = options.xhr();
9033          xhr.open(options.type, options.url, options.async, options.username, options.password); // Apply custom fields if provided
9034
9035          if (options.xhrFields) {
9036            for (i in options.xhrFields) {
9037              xhr[i] = options.xhrFields[i];
9038            }
9039          } // Override mime type if needed
9040
9041
9042          if (options.mimeType && xhr.overrideMimeType) {
9043            xhr.overrideMimeType(options.mimeType);
9044          } // X-Requested-With header
9045          // For cross-domain requests, seeing as conditions for a preflight are
9046          // akin to a jigsaw puzzle, we simply never set it to be sure.
9047          // (it can always be set on a per-request basis or even using ajaxSetup)
9048          // For same-domain requests, won't change header if already provided.
9049
9050
9051          if (!options.crossDomain && !headers["X-Requested-With"]) {
9052            headers["X-Requested-With"] = "XMLHttpRequest";
9053          } // Set headers
9054
9055
9056          for (i in headers) {
9057            xhr.setRequestHeader(i, headers[i]);
9058          } // Callback
9059
9060
9061          _callback = function callback(type) {
9062            return function () {
9063              if (_callback) {
9064                _callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
9065
9066                if (type === "abort") {
9067                  xhr.abort();
9068                } else if (type === "error") {
9069                  // Support: IE <=9 only
9070                  // On a manual native abort, IE9 throws
9071                  // errors on any property access that is not readyState
9072                  if (typeof xhr.status !== "number") {
9073                    complete(0, "error");
9074                  } else {
9075                    complete( // File: protocol always yields status 0; see #8605, #14207
9076                    xhr.status, xhr.statusText);
9077                  }
9078                } else {
9079                  complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, // Support: IE <=9 only
9080                  // IE9 has no XHR2 but throws on binary (trac-11426)
9081                  // For XHR2 non-text, let the caller handle it (gh-2498)
9082                  (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? {
9083                    binary: xhr.response
9084                  } : {
9085                    text: xhr.responseText
9086                  }, xhr.getAllResponseHeaders());
9087                }
9088              }
9089            };
9090          }; // Listen to events
9091
9092
9093          xhr.onload = _callback();
9094          errorCallback = xhr.onerror = xhr.ontimeout = _callback("error"); // Support: IE 9 only
9095          // Use onreadystatechange to replace onabort
9096          // to handle uncaught aborts
9097
9098          if (xhr.onabort !== undefined) {
9099            xhr.onabort = errorCallback;
9100          } else {
9101            xhr.onreadystatechange = function () {
9102              // Check readyState before timeout as it changes
9103              if (xhr.readyState === 4) {
9104                // Allow onerror to be called first,
9105                // but that will not handle a native abort
9106                // Also, save errorCallback to a variable
9107                // as xhr.onerror cannot be accessed
9108                window.setTimeout(function () {
9109                  if (_callback) {
9110                    errorCallback();
9111                  }
9112                });
9113              }
9114            };
9115          } // Create the abort callback
9116
9117
9118          _callback = _callback("abort");
9119
9120          try {
9121            // Do send the request (this may raise an exception)
9122            xhr.send(options.hasContent && options.data || null);
9123          } catch (e) {
9124            // #14683: Only rethrow if this hasn't been notified as an error yet
9125            if (_callback) {
9126              throw e;
9127            }
9128          }
9129        },
9130        abort: function abort() {
9131          if (_callback) {
9132            _callback();
9133          }
9134        }
9135      };
9136    }
9137  }); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
9138
9139  jQuery.ajaxPrefilter(function (s) {
9140    if (s.crossDomain) {
9141      s.contents.script = false;
9142    }
9143  }); // Install script dataType
9144
9145  jQuery.ajaxSetup({
9146    accepts: {
9147      script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript"
9148    },
9149    contents: {
9150      script: /\b(?:java|ecma)script\b/
9151    },
9152    converters: {
9153      "text script": function textScript(text) {
9154        jQuery.globalEval(text);
9155        return text;
9156      }
9157    }
9158  }); // Handle cache's special case and crossDomain
9159
9160  jQuery.ajaxPrefilter("script", function (s) {
9161    if (s.cache === undefined) {
9162      s.cache = false;
9163    }
9164
9165    if (s.crossDomain) {
9166      s.type = "GET";
9167    }
9168  }); // Bind script tag hack transport
9169
9170  jQuery.ajaxTransport("script", function (s) {
9171    // This transport only deals with cross domain or forced-by-attrs requests
9172    if (s.crossDomain || s.scriptAttrs) {
9173      var script, _callback2;
9174
9175      return {
9176        send: function send(_, complete) {
9177          script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({
9178            charset: s.scriptCharset,
9179            src: s.url
9180          }).on("load error", _callback2 = function callback(evt) {
9181            script.remove();
9182            _callback2 = null;
9183
9184            if (evt) {
9185              complete(evt.type === "error" ? 404 : 200, evt.type);
9186            }
9187          }); // Use native DOM manipulation to avoid our domManip AJAX trickery
9188
9189          document.head.appendChild(script[0]);
9190        },
9191        abort: function abort() {
9192          if (_callback2) {
9193            _callback2();
9194          }
9195        }
9196      };
9197    }
9198  });
9199  var oldCallbacks = [],
9200      rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings
9201
9202  jQuery.ajaxSetup({
9203    jsonp: "callback",
9204    jsonpCallback: function jsonpCallback() {
9205      var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++;
9206      this[callback] = true;
9207      return callback;
9208    }
9209  }); // Detect, normalize options and install callbacks for jsonp requests
9210
9211  jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
9212    var callbackName,
9213        overwritten,
9214        responseContainer,
9215        jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data"); // Handle iff the expected data type is "jsonp" or we have a parameter to set
9216
9217    if (jsonProp || s.dataTypes[0] === "jsonp") {
9218      // Get callback name, remembering preexisting value associated with it
9219      callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data
9220
9221      if (jsonProp) {
9222        s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
9223      } else if (s.jsonp !== false) {
9224        s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
9225      } // Use data converter to retrieve json after script execution
9226
9227
9228      s.converters["script json"] = function () {
9229        if (!responseContainer) {
9230          jQuery.error(callbackName + " was not called");
9231        }
9232
9233        return responseContainer[0];
9234      }; // Force json dataType
9235
9236
9237      s.dataTypes[0] = "json"; // Install callback
9238
9239      overwritten = window[callbackName];
9240
9241      window[callbackName] = function () {
9242        responseContainer = arguments;
9243      }; // Clean-up function (fires after converters)
9244
9245
9246      jqXHR.always(function () {
9247        // If previous value didn't exist - remove it
9248        if (overwritten === undefined) {
9249          jQuery(window).removeProp(callbackName); // Otherwise restore preexisting value
9250        } else {
9251          window[callbackName] = overwritten;
9252        } // Save back as free
9253
9254
9255        if (s[callbackName]) {
9256          // Make sure that re-using the options doesn't screw things around
9257          s.jsonpCallback = originalSettings.jsonpCallback; // Save the callback name for future use
9258
9259          oldCallbacks.push(callbackName);
9260        } // Call if it was a function and we have a response
9261
9262
9263        if (responseContainer && isFunction(overwritten)) {
9264          overwritten(responseContainer[0]);
9265        }
9266
9267        responseContainer = overwritten = undefined;
9268      }); // Delegate to script
9269
9270      return "script";
9271    }
9272  }); // Support: Safari 8 only
9273  // In Safari 8 documents created via document.implementation.createHTMLDocument
9274  // collapse sibling forms: the second one becomes a child of the first one.
9275  // Because of that, this security measure has to be disabled in Safari 8.
9276  // https://bugs.webkit.org/show_bug.cgi?id=137337
9277
9278  support.createHTMLDocument = function () {
9279    var body = document.implementation.createHTMLDocument("").body;
9280    body.innerHTML = "<form></form><form></form>";
9281    return body.childNodes.length === 2;
9282  }(); // Argument "data" should be string of html
9283  // context (optional): If specified, the fragment will be created in this context,
9284  // defaults to document
9285  // keepScripts (optional): If true, will include scripts passed in the html string
9286
9287
9288  jQuery.parseHTML = function (data, context, keepScripts) {
9289    if (typeof data !== "string") {
9290      return [];
9291    }
9292
9293    if (typeof context === "boolean") {
9294      keepScripts = context;
9295      context = false;
9296    }
9297
9298    var base, parsed, scripts;
9299
9300    if (!context) {
9301      // Stop scripts or inline event handlers from being executed immediately
9302      // by using document.implementation
9303      if (support.createHTMLDocument) {
9304        context = document.implementation.createHTMLDocument(""); // Set the base href for the created document
9305        // so any parsed elements with URLs
9306        // are based on the document's URL (gh-2965)
9307
9308        base = context.createElement("base");
9309        base.href = document.location.href;
9310        context.head.appendChild(base);
9311      } else {
9312        context = document;
9313      }
9314    }
9315
9316    parsed = rsingleTag.exec(data);
9317    scripts = !keepScripts && []; // Single tag
9318
9319    if (parsed) {
9320      return [context.createElement(parsed[1])];
9321    }
9322
9323    parsed = buildFragment([data], context, scripts);
9324
9325    if (scripts && scripts.length) {
9326      jQuery(scripts).remove();
9327    }
9328
9329    return jQuery.merge([], parsed.childNodes);
9330  };
9331  /**
9332   * Load a url into a page
9333   */
9334
9335
9336  jQuery.fn.load = function (url, params, callback) {
9337    var selector,
9338        type,
9339        response,
9340        self = this,
9341        off = url.indexOf(" ");
9342
9343    if (off > -1) {
9344      selector = stripAndCollapse(url.slice(off));
9345      url = url.slice(0, off);
9346    } // If it's a function
9347
9348
9349    if (isFunction(params)) {
9350      // We assume that it's the callback
9351      callback = params;
9352      params = undefined; // Otherwise, build a param string
9353    } else if (params && _typeof(params) === "object") {
9354      type = "POST";
9355    } // If we have elements to modify, make the request
9356
9357
9358    if (self.length > 0) {
9359      jQuery.ajax({
9360        url: url,
9361        // If "type" variable is undefined, then "GET" method will be used.
9362        // Make value of this field explicit since
9363        // user can override it through ajaxSetup method
9364        type: type || "GET",
9365        dataType: "html",
9366        data: params
9367      }).done(function (responseText) {
9368        // Save response for use in complete callback
9369        response = arguments;
9370        self.html(selector ? // If a selector was specified, locate the right elements in a dummy div
9371        // Exclude scripts to avoid IE 'Permission Denied' errors
9372        jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : // Otherwise use the full result
9373        responseText); // If the request succeeds, this function gets "data", "status", "jqXHR"
9374        // but they are ignored because response was set above.
9375        // If it fails, this function gets "jqXHR", "status", "error"
9376      }).always(callback && function (jqXHR, status) {
9377        self.each(function () {
9378          callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
9379        });
9380      });
9381    }
9382
9383    return this;
9384  };
9385
9386  jQuery.expr.pseudos.animated = function (elem) {
9387    return jQuery.grep(jQuery.timers, function (fn) {
9388      return elem === fn.elem;
9389    }).length;
9390  };
9391
9392  jQuery.offset = {
9393    setOffset: function setOffset(elem, options, i) {
9394      var curPosition,
9395          curLeft,
9396          curCSSTop,
9397          curTop,
9398          curOffset,
9399          curCSSLeft,
9400          calculatePosition,
9401          position = jQuery.css(elem, "position"),
9402          curElem = jQuery(elem),
9403          props = {}; // Set position first, in-case top/left are set even on static elem
9404
9405      if (position === "static") {
9406        elem.style.position = "relative";
9407      }
9408
9409      curOffset = curElem.offset();
9410      curCSSTop = jQuery.css(elem, "top");
9411      curCSSLeft = jQuery.css(elem, "left");
9412      calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; // Need to be able to calculate position if either
9413      // top or left is auto and position is either absolute or fixed
9414
9415      if (calculatePosition) {
9416        curPosition = curElem.position();
9417        curTop = curPosition.top;
9418        curLeft = curPosition.left;
9419      } else {
9420        curTop = parseFloat(curCSSTop) || 0;
9421        curLeft = parseFloat(curCSSLeft) || 0;
9422      }
9423
9424      if (isFunction(options)) {
9425        // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
9426        options = options.call(elem, i, jQuery.extend({}, curOffset));
9427      }
9428
9429      if (options.top != null) {
9430        props.top = options.top - curOffset.top + curTop;
9431      }
9432
9433      if (options.left != null) {
9434        props.left = options.left - curOffset.left + curLeft;
9435      }
9436
9437      if ("using" in options) {
9438        options.using.call(elem, props);
9439      } else {
9440        curElem.css(props);
9441      }
9442    }
9443  };
9444  jQuery.fn.extend({
9445    // offset() relates an element's border box to the document origin
9446    offset: function offset(options) {
9447      // Preserve chaining for setter
9448      if (arguments.length) {
9449        return options === undefined ? this : this.each(function (i) {
9450          jQuery.offset.setOffset(this, options, i);
9451        });
9452      }
9453
9454      var rect,
9455          win,
9456          elem = this[0];
9457
9458      if (!elem) {
9459        return;
9460      } // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
9461      // Support: IE <=11 only
9462      // Running getBoundingClientRect on a
9463      // disconnected node in IE throws an error
9464
9465
9466      if (!elem.getClientRects().length) {
9467        return {
9468          top: 0,
9469          left: 0
9470        };
9471      } // Get document-relative position by adding viewport scroll to viewport-relative gBCR
9472
9473
9474      rect = elem.getBoundingClientRect();
9475      win = elem.ownerDocument.defaultView;
9476      return {
9477        top: rect.top + win.pageYOffset,
9478        left: rect.left + win.pageXOffset
9479      };
9480    },
9481    // position() relates an element's margin box to its offset parent's padding box
9482    // This corresponds to the behavior of CSS absolute positioning
9483    position: function position() {
9484      if (!this[0]) {
9485        return;
9486      }
9487
9488      var offsetParent,
9489          offset,
9490          doc,
9491          elem = this[0],
9492          parentOffset = {
9493        top: 0,
9494        left: 0
9495      }; // position:fixed elements are offset from the viewport, which itself always has zero offset
9496
9497      if (jQuery.css(elem, "position") === "fixed") {
9498        // Assume position:fixed implies availability of getBoundingClientRect
9499        offset = elem.getBoundingClientRect();
9500      } else {
9501        offset = this.offset(); // Account for the *real* offset parent, which can be the document or its root element
9502        // when a statically positioned element is identified
9503
9504        doc = elem.ownerDocument;
9505        offsetParent = elem.offsetParent || doc.documentElement;
9506
9507        while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") {
9508          offsetParent = offsetParent.parentNode;
9509        }
9510
9511        if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
9512          // Incorporate borders into its offset, since they are outside its content origin
9513          parentOffset = jQuery(offsetParent).offset();
9514          parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
9515          parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
9516        }
9517      } // Subtract parent offsets and element margins
9518
9519
9520      return {
9521        top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
9522        left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
9523      };
9524    },
9525    // This method will return documentElement in the following cases:
9526    // 1) For the element inside the iframe without offsetParent, this method will return
9527    //    documentElement of the parent window
9528    // 2) For the hidden or detached element
9529    // 3) For body or html element, i.e. in case of the html node - it will return itself
9530    //
9531    // but those exceptions were never presented as a real life use-cases
9532    // and might be considered as more preferable results.
9533    //
9534    // This logic, however, is not guaranteed and can change at any point in the future
9535    offsetParent: function offsetParent() {
9536      return this.map(function () {
9537        var offsetParent = this.offsetParent;
9538
9539        while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
9540          offsetParent = offsetParent.offsetParent;
9541        }
9542
9543        return offsetParent || documentElement;
9544      });
9545    }
9546  }); // Create scrollLeft and scrollTop methods
9547
9548  jQuery.each({
9549    scrollLeft: "pageXOffset",
9550    scrollTop: "pageYOffset"
9551  }, function (method, prop) {
9552    var top = "pageYOffset" === prop;
9553
9554    jQuery.fn[method] = function (val) {
9555      return access(this, function (elem, method, val) {
9556        // Coalesce documents and windows
9557        var win;
9558
9559        if (isWindow(elem)) {
9560          win = elem;
9561        } else if (elem.nodeType === 9) {
9562          win = elem.defaultView;
9563        }
9564
9565        if (val === undefined) {
9566          return win ? win[prop] : elem[method];
9567        }
9568
9569        if (win) {
9570          win.scrollTo(!top ? val : win.pageXOffset, top ? val : win.pageYOffset);
9571        } else {
9572          elem[method] = val;
9573        }
9574      }, method, val, arguments.length);
9575    };
9576  }); // Support: Safari <=7 - 9.1, Chrome <=37 - 49
9577  // Add the top/left cssHooks using jQuery.fn.position
9578  // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
9579  // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
9580  // getComputedStyle returns percent when specified for top/left/bottom/right;
9581  // rather than make the css module depend on the offset module, just check for it here
9582
9583  jQuery.each(["top", "left"], function (_i, prop) {
9584    jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function (elem, computed) {
9585      if (computed) {
9586        computed = curCSS(elem, prop); // If curCSS returns percentage, fallback to offset
9587
9588        return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
9589      }
9590    });
9591  }); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
9592
9593  jQuery.each({
9594    Height: "height",
9595    Width: "width"
9596  }, function (name, type) {
9597    jQuery.each({
9598      padding: "inner" + name,
9599      content: type,
9600      "": "outer" + name
9601    }, function (defaultExtra, funcName) {
9602      // Margin is only for outerHeight, outerWidth
9603      jQuery.fn[funcName] = function (margin, value) {
9604        var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
9605            extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
9606        return access(this, function (elem, type, value) {
9607          var doc;
9608
9609          if (isWindow(elem)) {
9610            // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
9611            return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
9612          } // Get document width or height
9613
9614
9615          if (elem.nodeType === 9) {
9616            doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
9617            // whichever is greatest
9618
9619            return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]);
9620          }
9621
9622          return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat
9623          jQuery.css(elem, type, extra) : // Set width or height on the element
9624          jQuery.style(elem, type, value, extra);
9625        }, type, chainable ? margin : undefined, chainable);
9626      };
9627    });
9628  });
9629  jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (_i, type) {
9630    jQuery.fn[type] = function (fn) {
9631      return this.on(type, fn);
9632    };
9633  });
9634  jQuery.fn.extend({
9635    bind: function bind(types, data, fn) {
9636      return this.on(types, null, data, fn);
9637    },
9638    unbind: function unbind(types, fn) {
9639      return this.off(types, null, fn);
9640    },
9641    delegate: function delegate(selector, types, data, fn) {
9642      return this.on(types, selector, data, fn);
9643    },
9644    undelegate: function undelegate(selector, types, fn) {
9645      // ( namespace ) or ( selector, types [, fn] )
9646      return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
9647    },
9648    hover: function hover(fnOver, fnOut) {
9649      return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
9650    }
9651  });
9652  jQuery.each(("blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu").split(" "), function (_i, name) {
9653    // Handle event binding
9654    jQuery.fn[name] = function (data, fn) {
9655      return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
9656    };
9657  }); // Support: Android <=4.0 only
9658  // Make sure we trim BOM and NBSP
9659
9660  var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; // Bind a function to a context, optionally partially applying any
9661  // arguments.
9662  // jQuery.proxy is deprecated to promote standards (specifically Function#bind)
9663  // However, it is not slated for removal any time soon
9664
9665  jQuery.proxy = function (fn, context) {
9666    var tmp, args, proxy;
9667
9668    if (typeof context === "string") {
9669      tmp = fn[context];
9670      context = fn;
9671      fn = tmp;
9672    } // Quick check to determine if target is callable, in the spec
9673    // this throws a TypeError, but we will just return undefined.
9674
9675
9676    if (!isFunction(fn)) {
9677      return undefined;
9678    } // Simulated bind
9679
9680
9681    args = _slice.call(arguments, 2);
9682
9683    proxy = function proxy() {
9684      return fn.apply(context || this, args.concat(_slice.call(arguments)));
9685    }; // Set the guid of unique handler to the same of original handler, so it can be removed
9686
9687
9688    proxy.guid = fn.guid = fn.guid || jQuery.guid++;
9689    return proxy;
9690  };
9691
9692  jQuery.holdReady = function (hold) {
9693    if (hold) {
9694      jQuery.readyWait++;
9695    } else {
9696      jQuery.ready(true);
9697    }
9698  };
9699
9700  jQuery.isArray = Array.isArray;
9701  jQuery.parseJSON = JSON.parse;
9702  jQuery.nodeName = nodeName;
9703  jQuery.isFunction = isFunction;
9704  jQuery.isWindow = isWindow;
9705  jQuery.camelCase = camelCase;
9706  jQuery.type = toType;
9707  jQuery.now = Date.now;
9708
9709  jQuery.isNumeric = function (obj) {
9710    // As of jQuery 3.0, isNumeric is limited to
9711    // strings and numbers (primitives or objects)
9712    // that can be coerced to finite numbers (gh-2662)
9713    var type = jQuery.type(obj);
9714    return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("")
9715    // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
9716    // subtraction forces infinities to NaN
9717    !isNaN(obj - parseFloat(obj));
9718  };
9719
9720  jQuery.trim = function (text) {
9721    return text == null ? "" : (text + "").replace(rtrim, "");
9722  }; // Register as a named AMD module, since jQuery can be concatenated with other
9723  // files that may use define, but not via a proper concatenation script that
9724  // understands anonymous AMD modules. A named AMD is safest and most robust
9725  // way to register. Lowercase jquery is used because AMD module names are
9726  // derived from file names, and jQuery is normally delivered in a lowercase
9727  // file name. Do this after creating the global so that if an AMD module wants
9728  // to call noConflict to hide this version of jQuery, it will work.
9729  // Note that for maximum portability, libraries that are not jQuery should
9730  // declare themselves as anonymous modules, and avoid setting a global if an
9731  // AMD loader is present. jQuery is a special case. For more information, see
9732  // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
9733
9734
9735  if (true) {
9736    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
9737      return jQuery;
9738    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
9739				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
9740  }
9741
9742  var // Map over jQuery in case of overwrite
9743  _jQuery = window.jQuery,
9744      // Map over the $ in case of overwrite
9745  _$ = window.$;
9746
9747  jQuery.noConflict = function (deep) {
9748    if (window.$ === jQuery) {
9749      window.$ = _$;
9750    }
9751
9752    if (deep && window.jQuery === jQuery) {
9753      window.jQuery = _jQuery;
9754    }
9755
9756    return jQuery;
9757  }; // Expose jQuery and $ identifiers, even in AMD
9758  // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
9759  // and CommonJS for browser emulators (#13566)
9760
9761
9762  if (typeof noGlobal === "undefined") {
9763    window.jQuery = window.$ = jQuery;
9764  }
9765
9766  return jQuery;
9767});
9768/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
9769
9770/***/ }),
9771
vendor: 75,416 bytes, lines 9772-12463
9772/***/ "./node_modules/slick-carousel/slick/slick.js":
9773/*!****************************************************!*\
9774  !*** ./node_modules/slick-carousel/slick/slick.js ***!
9775  \****************************************************/
9776/*! no static exports found */
9777/***/ (function(module, exports, __webpack_require__) {
9778
9779var __WEBPACK_AMD_DEFINE_FACTORY__, __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); }
9780
9781/*
9782     _ _      _       _
9783 ___| (_) ___| | __  (_)___
9784/ __| | |/ __| |/ /  | / __|
9785\__ \ | | (__|   < _ | \__ \
9786|___/_|_|\___|_|\_(_)/ |___/
9787                   |__/
9788
9789 Version: 1.8.1
9790  Author: Ken Wheeler
9791 Website: http://kenwheeler.github.io
9792    Docs: http://kenwheeler.github.io/slick
9793    Repo: http://github.com/kenwheeler/slick
9794  Issues: http://github.com/kenwheeler/slick/issues
9795
9796 */
9797
9798/* global window, document, define, jQuery, setInterval, clearInterval */
9799;
9800
9801(function (factory) {
9802  'use strict';
9803
9804  if (true) {
9805    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
9806				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
9807				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
9808				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
9809  } else {}
9810})(function ($) {
9811  'use strict';
9812
9813  var Slick = window.Slick || {};
9814
9815  Slick = function () {
9816    var instanceUid = 0;
9817
9818    function Slick(element, settings) {
9819      var _ = this,
9820          dataSettings;
9821
9822      _.defaults = {
9823        accessibility: true,
9824        adaptiveHeight: false,
9825        appendArrows: $(element),
9826        appendDots: $(element),
9827        arrows: true,
9828        asNavFor: null,
9829        prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
9830        nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
9831        autoplay: false,
9832        autoplaySpeed: 3000,
9833        centerMode: false,
9834        centerPadding: '50px',
9835        cssEase: 'ease',
9836        customPaging: function customPaging(slider, i) {
9837          return $('<button type="button" />').text(i + 1);
9838        },
9839        dots: false,
9840        dotsClass: 'slick-dots',
9841        draggable: true,
9842        easing: 'linear',
9843        edgeFriction: 0.35,
9844        fade: false,
9845        focusOnSelect: false,
9846        focusOnChange: false,
9847        infinite: true,
9848        initialSlide: 0,
9849        lazyLoad: 'ondemand',
9850        mobileFirst: false,
9851        pauseOnHover: true,
9852        pauseOnFocus: true,
9853        pauseOnDotsHover: false,
9854        respondTo: 'window',
9855        responsive: null,
9856        rows: 1,
9857        rtl: false,
9858        slide: '',
9859        slidesPerRow: 1,
9860        slidesToShow: 1,
9861        slidesToScroll: 1,
9862        speed: 500,
9863        swipe: true,
9864        swipeToSlide: false,
9865        touchMove: true,
9866        touchThreshold: 5,
9867        useCSS: true,
9868        useTransform: true,
9869        variableWidth: false,
9870        vertical: false,
9871        verticalSwiping: false,
9872        waitForAnimate: true,
9873        zIndex: 1000
9874      };
9875      _.initials = {
9876        animating: false,
9877        dragging: false,
9878        autoPlayTimer: null,
9879        currentDirection: 0,
9880        currentLeft: null,
9881        currentSlide: 0,
9882        direction: 1,
9883        $dots: null,
9884        listWidth: null,
9885        listHeight: null,
9886        loadIndex: 0,
9887        $nextArrow: null,
9888        $prevArrow: null,
9889        scrolling: false,
9890        slideCount: null,
9891        slideWidth: null,
9892        $slideTrack: null,
9893        $slides: null,
9894        sliding: false,
9895        slideOffset: 0,
9896        swipeLeft: null,
9897        swiping: false,
9898        $list: null,
9899        touchObject: {},
9900        transformsEnabled: false,
9901        unslicked: false
9902      };
9903      $.extend(_, _.initials);
9904      _.activeBreakpoint = null;
9905      _.animType = null;
9906      _.animProp = null;
9907      _.breakpoints = [];
9908      _.breakpointSettings = [];
9909      _.cssTransitions = false;
9910      _.focussed = false;
9911      _.interrupted = false;
9912      _.hidden = 'hidden';
9913      _.paused = true;
9914      _.positionProp = null;
9915      _.respondTo = null;
9916      _.rowCount = 1;
9917      _.shouldClick = true;
9918      _.$slider = $(element);
9919      _.$slidesCache = null;
9920      _.transformType = null;
9921      _.transitionType = null;
9922      _.visibilityChange = 'visibilitychange';
9923      _.windowWidth = 0;
9924      _.windowTimer = null;
9925      dataSettings = $(element).data('slick') || {};
9926      _.options = $.extend({}, _.defaults, settings, dataSettings);
9927      _.currentSlide = _.options.initialSlide;
9928      _.originalSettings = _.options;
9929
9930      if (typeof document.mozHidden !== 'undefined') {
9931        _.hidden = 'mozHidden';
9932        _.visibilityChange = 'mozvisibilitychange';
9933      } else if (typeof document.webkitHidden !== 'undefined') {
9934        _.hidden = 'webkitHidden';
9935        _.visibilityChange = 'webkitvisibilitychange';
9936      }
9937
9938      _.autoPlay = $.proxy(_.autoPlay, _);
9939      _.autoPlayClear = $.proxy(_.autoPlayClear, _);
9940      _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
9941      _.changeSlide = $.proxy(_.changeSlide, _);
9942      _.clickHandler = $.proxy(_.clickHandler, _);
9943      _.selectHandler = $.proxy(_.selectHandler, _);
9944      _.setPosition = $.proxy(_.setPosition, _);
9945      _.swipeHandler = $.proxy(_.swipeHandler, _);
9946      _.dragHandler = $.proxy(_.dragHandler, _);
9947      _.keyHandler = $.proxy(_.keyHandler, _);
9948      _.instanceUid = instanceUid++; // A simple way to check for HTML strings
9949      // Strict HTML recognition (must start with <)
9950      // Extracted from jQuery v1.11 source
9951
9952      _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
9953
9954      _.registerBreakpoints();
9955
9956      _.init(true);
9957    }
9958
9959    return Slick;
9960  }();
9961
9962  Slick.prototype.activateADA = function () {
9963    var _ = this;
9964
9965    _.$slideTrack.find('.slick-active').attr({
9966      'aria-hidden': 'false'
9967    }).find('a, input, button, select').attr({
9968      'tabindex': '0'
9969    });
9970  };
9971
9972  Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {
9973    var _ = this;
9974
9975    if (typeof index === 'boolean') {
9976      addBefore = index;
9977      index = null;
9978    } else if (index < 0 || index >= _.slideCount) {
9979      return false;
9980    }
9981
9982    _.unload();
9983
9984    if (typeof index === 'number') {
9985      if (index === 0 && _.$slides.length === 0) {
9986        $(markup).appendTo(_.$slideTrack);
9987      } else if (addBefore) {
9988        $(markup).insertBefore(_.$slides.eq(index));
9989      } else {
9990        $(markup).insertAfter(_.$slides.eq(index));
9991      }
9992    } else {
9993      if (addBefore === true) {
9994        $(markup).prependTo(_.$slideTrack);
9995      } else {
9996        $(markup).appendTo(_.$slideTrack);
9997      }
9998    }
9999
10000    _.$slides = _.$slideTrack.children(this.options.slide);
10001
10002    _.$slideTrack.children(this.options.slide).detach();
10003
10004    _.$slideTrack.append(_.$slides);
10005
10006    _.$slides.each(function (index, element) {
10007      $(element).attr('data-slick-index', index);
10008    });
10009
10010    _.$slidesCache = _.$slides;
10011
10012    _.reinit();
10013  };
10014
10015  Slick.prototype.animateHeight = function () {
10016    var _ = this;
10017
10018    if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
10019      var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
10020
10021      _.$list.animate({
10022        height: targetHeight
10023      }, _.options.speed);
10024    }
10025  };
10026
10027  Slick.prototype.animateSlide = function (targetLeft, callback) {
10028    var animProps = {},
10029        _ = this;
10030
10031    _.animateHeight();
10032
10033    if (_.options.rtl === true && _.options.vertical === false) {
10034      targetLeft = -targetLeft;
10035    }
10036
10037    if (_.transformsEnabled === false) {
10038      if (_.options.vertical === false) {
10039        _.$slideTrack.animate({
10040          left: targetLeft
10041        }, _.options.speed, _.options.easing, callback);
10042      } else {
10043        _.$slideTrack.animate({
10044          top: targetLeft
10045        }, _.options.speed, _.options.easing, callback);
10046      }
10047    } else {
10048      if (_.cssTransitions === false) {
10049        if (_.options.rtl === true) {
10050          _.currentLeft = -_.currentLeft;
10051        }
10052
10053        $({
10054          animStart: _.currentLeft
10055        }).animate({
10056          animStart: targetLeft
10057        }, {
10058          duration: _.options.speed,
10059          easing: _.options.easing,
10060          step: function step(now) {
10061            now = Math.ceil(now);
10062
10063            if (_.options.vertical === false) {
10064              animProps[_.animType] = 'translate(' + now + 'px, 0px)';
10065
10066              _.$slideTrack.css(animProps);
10067            } else {
10068              animProps[_.animType] = 'translate(0px,' + now + 'px)';
10069
10070              _.$slideTrack.css(animProps);
10071            }
10072          },
10073          complete: function complete() {
10074            if (callback) {
10075              callback.call();
10076            }
10077          }
10078        });
10079      } else {
10080        _.applyTransition();
10081
10082        targetLeft = Math.ceil(targetLeft);
10083
10084        if (_.options.vertical === false) {
10085          animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
10086        } else {
10087          animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
10088        }
10089
10090        _.$slideTrack.css(animProps);
10091
10092        if (callback) {
10093          setTimeout(function () {
10094            _.disableTransition();
10095
10096            callback.call();
10097          }, _.options.speed);
10098        }
10099      }
10100    }
10101  };
10102
10103  Slick.prototype.getNavTarget = function () {
10104    var _ = this,
10105        asNavFor = _.options.asNavFor;
10106
10107    if (asNavFor && asNavFor !== null) {
10108      asNavFor = $(asNavFor).not(_.$slider);
10109    }
10110
10111    return asNavFor;
10112  };
10113
10114  Slick.prototype.asNavFor = function (index) {
10115    var _ = this,
10116        asNavFor = _.getNavTarget();
10117
10118    if (asNavFor !== null && _typeof(asNavFor) === 'object') {
10119      asNavFor.each(function () {
10120        var target = $(this).slick('getSlick');
10121
10122        if (!target.unslicked) {
10123          target.slideHandler(index, true);
10124        }
10125      });
10126    }
10127  };
10128
10129  Slick.prototype.applyTransition = function (slide) {
10130    var _ = this,
10131        transition = {};
10132
10133    if (_.options.fade === false) {
10134      transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
10135    } else {
10136      transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
10137    }
10138
10139    if (_.options.fade === false) {
10140      _.$slideTrack.css(transition);
10141    } else {
10142      _.$slides.eq(slide).css(transition);
10143    }
10144  };
10145
10146  Slick.prototype.autoPlay = function () {
10147    var _ = this;
10148
10149    _.autoPlayClear();
10150
10151    if (_.slideCount > _.options.slidesToShow) {
10152      _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
10153    }
10154  };
10155
10156  Slick.prototype.autoPlayClear = function () {
10157    var _ = this;
10158
10159    if (_.autoPlayTimer) {
10160      clearInterval(_.autoPlayTimer);
10161    }
10162  };
10163
10164  Slick.prototype.autoPlayIterator = function () {
10165    var _ = this,
10166        slideTo = _.currentSlide + _.options.slidesToScroll;
10167
10168    if (!_.paused && !_.interrupted && !_.focussed) {
10169      if (_.options.infinite === false) {
10170        if (_.direction === 1 && _.currentSlide + 1 === _.slideCount - 1) {
10171          _.direction = 0;
10172        } else if (_.direction === 0) {
10173          slideTo = _.currentSlide - _.options.slidesToScroll;
10174
10175          if (_.currentSlide - 1 === 0) {
10176            _.direction = 1;
10177          }
10178        }
10179      }
10180
10181      _.slideHandler(slideTo);
10182    }
10183  };
10184
10185  Slick.prototype.buildArrows = function () {
10186    var _ = this;
10187
10188    if (_.options.arrows === true) {
10189      _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
10190      _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
10191
10192      if (_.slideCount > _.options.slidesToShow) {
10193        _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
10194
10195        _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
10196
10197        if (_.htmlExpr.test(_.options.prevArrow)) {
10198          _.$prevArrow.prependTo(_.options.appendArrows);
10199        }
10200
10201        if (_.htmlExpr.test(_.options.nextArrow)) {
10202          _.$nextArrow.appendTo(_.options.appendArrows);
10203        }
10204
10205        if (_.options.infinite !== true) {
10206          _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
10207        }
10208      } else {
10209        _.$prevArrow.add(_.$nextArrow).addClass('slick-hidden').attr({
10210          'aria-disabled': 'true',
10211          'tabindex': '-1'
10212        });
10213      }
10214    }
10215  };
10216
10217  Slick.prototype.buildDots = function () {
10218    var _ = this,
10219        i,
10220        dot;
10221
10222    if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
10223      _.$slider.addClass('slick-dotted');
10224
10225      dot = $('<ul />').addClass(_.options.dotsClass);
10226
10227      for (i = 0; i <= _.getDotCount(); i += 1) {
10228        dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
10229      }
10230
10231      _.$dots = dot.appendTo(_.options.appendDots);
10232
10233      _.$dots.find('li').first().addClass('slick-active');
10234    }
10235  };
10236
10237  Slick.prototype.buildOut = function () {
10238    var _ = this;
10239
10240    _.$slides = _.$slider.children(_.options.slide + ':not(.slick-cloned)').addClass('slick-slide');
10241    _.slideCount = _.$slides.length;
10242
10243    _.$slides.each(function (index, element) {
10244      $(element).attr('data-slick-index', index).data('originalStyling', $(element).attr('style') || '');
10245    });
10246
10247    _.$slider.addClass('slick-slider');
10248
10249    _.$slideTrack = _.slideCount === 0 ? $('<div class="slick-track"/>').appendTo(_.$slider) : _.$slides.wrapAll('<div class="slick-track"/>').parent();
10250    _.$list = _.$slideTrack.wrap('<div class="slick-list"/>').parent();
10251
10252    _.$slideTrack.css('opacity', 0);
10253
10254    if (_.options.centerMode === true || _.options.swipeToSlide === true) {
10255      _.options.slidesToScroll = 1;
10256    }
10257
10258    $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
10259
10260    _.setupInfinite();
10261
10262    _.buildArrows();
10263
10264    _.buildDots();
10265
10266    _.updateDots();
10267
10268    _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
10269
10270    if (_.options.draggable === true) {
10271      _.$list.addClass('draggable');
10272    }
10273  };
10274
10275  Slick.prototype.buildRows = function () {
10276    var _ = this,
10277        a,
10278        b,
10279        c,
10280        newSlides,
10281        numOfSlides,
10282        originalSlides,
10283        slidesPerSection;
10284
10285    newSlides = document.createDocumentFragment();
10286    originalSlides = _.$slider.children();
10287
10288    if (_.options.rows > 0) {
10289      slidesPerSection = _.options.slidesPerRow * _.options.rows;
10290      numOfSlides = Math.ceil(originalSlides.length / slidesPerSection);
10291
10292      for (a = 0; a < numOfSlides; a++) {
10293        var slide = document.createElement('div');
10294
10295        for (b = 0; b < _.options.rows; b++) {
10296          var row = document.createElement('div');
10297
10298          for (c = 0; c < _.options.slidesPerRow; c++) {
10299            var target = a * slidesPerSection + (b * _.options.slidesPerRow + c);
10300
10301            if (originalSlides.get(target)) {
10302              row.appendChild(originalSlides.get(target));
10303            }
10304          }
10305
10306          slide.appendChild(row);
10307        }
10308
10309        newSlides.appendChild(slide);
10310      }
10311
10312      _.$slider.empty().append(newSlides);
10313
10314      _.$slider.children().children().children().css({
10315        'width': 100 / _.options.slidesPerRow + '%',
10316        'display': 'inline-block'
10317      });
10318    }
10319  };
10320
10321  Slick.prototype.checkResponsive = function (initial, forceUpdate) {
10322    var _ = this,
10323        breakpoint,
10324        targetBreakpoint,
10325        respondToWidth,
10326        triggerBreakpoint = false;
10327
10328    var sliderWidth = _.$slider.width();
10329
10330    var windowWidth = window.innerWidth || $(window).width();
10331
10332    if (_.respondTo === 'window') {
10333      respondToWidth = windowWidth;
10334    } else if (_.respondTo === 'slider') {
10335      respondToWidth = sliderWidth;
10336    } else if (_.respondTo === 'min') {
10337      respondToWidth = Math.min(windowWidth, sliderWidth);
10338    }
10339
10340    if (_.options.responsive && _.options.responsive.length && _.options.responsive !== null) {
10341      targetBreakpoint = null;
10342
10343      for (breakpoint in _.breakpoints) {
10344        if (_.breakpoints.hasOwnProperty(breakpoint)) {
10345          if (_.originalSettings.mobileFirst === false) {
10346            if (respondToWidth < _.breakpoints[breakpoint]) {
10347              targetBreakpoint = _.breakpoints[breakpoint];
10348            }
10349          } else {
10350            if (respondToWidth > _.breakpoints[breakpoint]) {
10351              targetBreakpoint = _.breakpoints[breakpoint];
10352            }
10353          }
10354        }
10355      }
10356
10357      if (targetBreakpoint !== null) {
10358        if (_.activeBreakpoint !== null) {
10359          if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
10360            _.activeBreakpoint = targetBreakpoint;
10361
10362            if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
10363              _.unslick(targetBreakpoint);
10364            } else {
10365              _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]);
10366
10367              if (initial === true) {
10368                _.currentSlide = _.options.initialSlide;
10369              }
10370
10371              _.refresh(initial);
10372            }
10373
10374            triggerBreakpoint = targetBreakpoint;
10375          }
10376        } else {
10377          _.activeBreakpoint = targetBreakpoint;
10378
10379          if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
10380            _.unslick(targetBreakpoint);
10381          } else {
10382            _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]);
10383
10384            if (initial === true) {
10385              _.currentSlide = _.options.initialSlide;
10386            }
10387
10388            _.refresh(initial);
10389          }
10390
10391          triggerBreakpoint = targetBreakpoint;
10392        }
10393      } else {
10394        if (_.activeBreakpoint !== null) {
10395          _.activeBreakpoint = null;
10396          _.options = _.originalSettings;
10397
10398          if (initial === true) {
10399            _.currentSlide = _.options.initialSlide;
10400          }
10401
10402          _.refresh(initial);
10403
10404          triggerBreakpoint = targetBreakpoint;
10405        }
10406      } // only trigger breakpoints during an actual break. not on initialize.
10407
10408
10409      if (!initial && triggerBreakpoint !== false) {
10410        _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
10411      }
10412    }
10413  };
10414
10415  Slick.prototype.changeSlide = function (event, dontAnimate) {
10416    var _ = this,
10417        $target = $(event.currentTarget),
10418        indexOffset,
10419        slideOffset,
10420        unevenOffset; // If target is a link, prevent default action.
10421
10422
10423    if ($target.is('a')) {
10424      event.preventDefault();
10425    } // If target is not the <li> element (ie: a child), find the <li>.
10426
10427
10428    if (!$target.is('li')) {
10429      $target = $target.closest('li');
10430    }
10431
10432    unevenOffset = _.slideCount % _.options.slidesToScroll !== 0;
10433    indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
10434
10435    switch (event.data.message) {
10436      case 'previous':
10437        slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
10438
10439        if (_.slideCount > _.options.slidesToShow) {
10440          _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
10441        }
10442
10443        break;
10444
10445      case 'next':
10446        slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
10447
10448        if (_.slideCount > _.options.slidesToShow) {
10449          _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
10450        }
10451
10452        break;
10453
10454      case 'index':
10455        var index = event.data.index === 0 ? 0 : event.data.index || $target.index() * _.options.slidesToScroll;
10456
10457        _.slideHandler(_.checkNavigable(index), false, dontAnimate);
10458
10459        $target.children().trigger('focus');
10460        break;
10461
10462      default:
10463        return;
10464    }
10465  };
10466
10467  Slick.prototype.checkNavigable = function (index) {
10468    var _ = this,
10469        navigables,
10470        prevNavigable;
10471
10472    navigables = _.getNavigableIndexes();
10473    prevNavigable = 0;
10474
10475    if (index > navigables[navigables.length - 1]) {
10476      index = navigables[navigables.length - 1];
10477    } else {
10478      for (var n in navigables) {
10479        if (index < navigables[n]) {
10480          index = prevNavigable;
10481          break;
10482        }
10483
10484        prevNavigable = navigables[n];
10485      }
10486    }
10487
10488    return index;
10489  };
10490
10491  Slick.prototype.cleanUpEvents = function () {
10492    var _ = this;
10493
10494    if (_.options.dots && _.$dots !== null) {
10495      $('li', _.$dots).off('click.slick', _.changeSlide).off('mouseenter.slick', $.proxy(_.interrupt, _, true)).off('mouseleave.slick', $.proxy(_.interrupt, _, false));
10496
10497      if (_.options.accessibility === true) {
10498        _.$dots.off('keydown.slick', _.keyHandler);
10499      }
10500    }
10501
10502    _.$slider.off('focus.slick blur.slick');
10503
10504    if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
10505      _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
10506      _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
10507
10508      if (_.options.accessibility === true) {
10509        _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
10510        _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
10511      }
10512    }
10513
10514    _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
10515
10516    _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
10517
10518    _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
10519
10520    _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
10521
10522    _.$list.off('click.slick', _.clickHandler);
10523
10524    $(document).off(_.visibilityChange, _.visibility);
10525
10526    _.cleanUpSlideEvents();
10527
10528    if (_.options.accessibility === true) {
10529      _.$list.off('keydown.slick', _.keyHandler);
10530    }
10531
10532    if (_.options.focusOnSelect === true) {
10533      $(_.$slideTrack).children().off('click.slick', _.selectHandler);
10534    }
10535
10536    $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
10537    $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
10538    $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
10539    $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
10540  };
10541
10542  Slick.prototype.cleanUpSlideEvents = function () {
10543    var _ = this;
10544
10545    _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
10546
10547    _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
10548  };
10549
10550  Slick.prototype.cleanUpRows = function () {
10551    var _ = this,
10552        originalSlides;
10553
10554    if (_.options.rows > 0) {
10555      originalSlides = _.$slides.children().children();
10556      originalSlides.removeAttr('style');
10557
10558      _.$slider.empty().append(originalSlides);
10559    }
10560  };
10561
10562  Slick.prototype.clickHandler = function (event) {
10563    var _ = this;
10564
10565    if (_.shouldClick === false) {
10566      event.stopImmediatePropagation();
10567      event.stopPropagation();
10568      event.preventDefault();
10569    }
10570  };
10571
10572  Slick.prototype.destroy = function (refresh) {
10573    var _ = this;
10574
10575    _.autoPlayClear();
10576
10577    _.touchObject = {};
10578
10579    _.cleanUpEvents();
10580
10581    $('.slick-cloned', _.$slider).detach();
10582
10583    if (_.$dots) {
10584      _.$dots.remove();
10585    }
10586
10587    if (_.$prevArrow && _.$prevArrow.length) {
10588      _.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', '');
10589
10590      if (_.htmlExpr.test(_.options.prevArrow)) {
10591        _.$prevArrow.remove();
10592      }
10593    }
10594
10595    if (_.$nextArrow && _.$nextArrow.length) {
10596      _.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', '');
10597
10598      if (_.htmlExpr.test(_.options.nextArrow)) {
10599        _.$nextArrow.remove();
10600      }
10601    }
10602
10603    if (_.$slides) {
10604      _.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function () {
10605        $(this).attr('style', $(this).data('originalStyling'));
10606      });
10607
10608      _.$slideTrack.children(this.options.slide).detach();
10609
10610      _.$slideTrack.detach();
10611
10612      _.$list.detach();
10613
10614      _.$slider.append(_.$slides);
10615    }
10616
10617    _.cleanUpRows();
10618
10619    _.$slider.removeClass('slick-slider');
10620
10621    _.$slider.removeClass('slick-initialized');
10622
10623    _.$slider.removeClass('slick-dotted');
10624
10625    _.unslicked = true;
10626
10627    if (!refresh) {
10628      _.$slider.trigger('destroy', [_]);
10629    }
10630  };
10631
10632  Slick.prototype.disableTransition = function (slide) {
10633    var _ = this,
10634        transition = {};
10635
10636    transition[_.transitionType] = '';
10637
10638    if (_.options.fade === false) {
10639      _.$slideTrack.css(transition);
10640    } else {
10641      _.$slides.eq(slide).css(transition);
10642    }
10643  };
10644
10645  Slick.prototype.fadeSlide = function (slideIndex, callback) {
10646    var _ = this;
10647
10648    if (_.cssTransitions === false) {
10649      _.$slides.eq(slideIndex).css({
10650        zIndex: _.options.zIndex
10651      });
10652
10653      _.$slides.eq(slideIndex).animate({
10654        opacity: 1
10655      }, _.options.speed, _.options.easing, callback);
10656    } else {
10657      _.applyTransition(slideIndex);
10658
10659      _.$slides.eq(slideIndex).css({
10660        opacity: 1,
10661        zIndex: _.options.zIndex
10662      });
10663
10664      if (callback) {
10665        setTimeout(function () {
10666          _.disableTransition(slideIndex);
10667
10668          callback.call();
10669        }, _.options.speed);
10670      }
10671    }
10672  };
10673
10674  Slick.prototype.fadeSlideOut = function (slideIndex) {
10675    var _ = this;
10676
10677    if (_.cssTransitions === false) {
10678      _.$slides.eq(slideIndex).animate({
10679        opacity: 0,
10680        zIndex: _.options.zIndex - 2
10681      }, _.options.speed, _.options.easing);
10682    } else {
10683      _.applyTransition(slideIndex);
10684
10685      _.$slides.eq(slideIndex).css({
10686        opacity: 0,
10687        zIndex: _.options.zIndex - 2
10688      });
10689    }
10690  };
10691
10692  Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {
10693    var _ = this;
10694
10695    if (filter !== null) {
10696      _.$slidesCache = _.$slides;
10697
10698      _.unload();
10699
10700      _.$slideTrack.children(this.options.slide).detach();
10701
10702      _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
10703
10704      _.reinit();
10705    }
10706  };
10707
10708  Slick.prototype.focusHandler = function () {
10709    var _ = this;
10710
10711    _.$slider.off('focus.slick blur.slick').on('focus.slick blur.slick', '*', function (event) {
10712      event.stopImmediatePropagation();
10713      var $sf = $(this);
10714      setTimeout(function () {
10715        if (_.options.pauseOnFocus) {
10716          _.focussed = $sf.is(':focus');
10717
10718          _.autoPlay();
10719        }
10720      }, 0);
10721    });
10722  };
10723
10724  Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {
10725    var _ = this;
10726
10727    return _.currentSlide;
10728  };
10729
10730  Slick.prototype.getDotCount = function () {
10731    var _ = this;
10732
10733    var breakPoint = 0;
10734    var counter = 0;
10735    var pagerQty = 0;
10736
10737    if (_.options.infinite === true) {
10738      if (_.slideCount <= _.options.slidesToShow) {
10739        ++pagerQty;
10740      } else {
10741        while (breakPoint < _.slideCount) {
10742          ++pagerQty;
10743          breakPoint = counter + _.options.slidesToScroll;
10744          counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
10745        }
10746      }
10747    } else if (_.options.centerMode === true) {
10748      pagerQty = _.slideCount;
10749    } else if (!_.options.asNavFor) {
10750      pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
10751    } else {
10752      while (breakPoint < _.slideCount) {
10753        ++pagerQty;
10754        breakPoint = counter + _.options.slidesToScroll;
10755        counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
10756      }
10757    }
10758
10759    return pagerQty - 1;
10760  };
10761
10762  Slick.prototype.getLeft = function (slideIndex) {
10763    var _ = this,
10764        targetLeft,
10765        verticalHeight,
10766        verticalOffset = 0,
10767        targetSlide,
10768        coef;
10769
10770    _.slideOffset = 0;
10771    verticalHeight = _.$slides.first().outerHeight(true);
10772
10773    if (_.options.infinite === true) {
10774      if (_.slideCount > _.options.slidesToShow) {
10775        _.slideOffset = _.slideWidth * _.options.slidesToShow * -1;
10776        coef = -1;
10777
10778        if (_.options.vertical === true && _.options.centerMode === true) {
10779          if (_.options.slidesToShow === 2) {
10780            coef = -1.5;
10781          } else if (_.options.slidesToShow === 1) {
10782            coef = -2;
10783          }
10784        }
10785
10786        verticalOffset = verticalHeight * _.options.slidesToShow * coef;
10787      }
10788
10789      if (_.slideCount % _.options.slidesToScroll !== 0) {
10790        if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
10791          if (slideIndex > _.slideCount) {
10792            _.slideOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth * -1;
10793            verticalOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight * -1;
10794          } else {
10795            _.slideOffset = _.slideCount % _.options.slidesToScroll * _.slideWidth * -1;
10796            verticalOffset = _.slideCount % _.options.slidesToScroll * verticalHeight * -1;
10797          }
10798        }
10799      }
10800    } else {
10801      if (slideIndex + _.options.slidesToShow > _.slideCount) {
10802        _.slideOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * _.slideWidth;
10803        verticalOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * verticalHeight;
10804      }
10805    }
10806
10807    if (_.slideCount <= _.options.slidesToShow) {
10808      _.slideOffset = 0;
10809      verticalOffset = 0;
10810    }
10811
10812    if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
10813      _.slideOffset = _.slideWidth * Math.floor(_.options.slidesToShow) / 2 - _.slideWidth * _.slideCount / 2;
10814    } else if (_.options.centerMode === true && _.options.infinite === true) {
10815      _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
10816    } else if (_.options.centerMode === true) {
10817      _.slideOffset = 0;
10818      _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
10819    }
10820
10821    if (_.options.vertical === false) {
10822      targetLeft = slideIndex * _.slideWidth * -1 + _.slideOffset;
10823    } else {
10824      targetLeft = slideIndex * verticalHeight * -1 + verticalOffset;
10825    }
10826
10827    if (_.options.variableWidth === true) {
10828      if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
10829        targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
10830      } else {
10831        targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
10832      }
10833
10834      if (_.options.rtl === true) {
10835        if (targetSlide[0]) {
10836          targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
10837        } else {
10838          targetLeft = 0;
10839        }
10840      } else {
10841        targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
10842      }
10843
10844      if (_.options.centerMode === true) {
10845        if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
10846          targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
10847        } else {
10848          targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
10849        }
10850
10851        if (_.options.rtl === true) {
10852          if (targetSlide[0]) {
10853            targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
10854          } else {
10855            targetLeft = 0;
10856          }
10857        } else {
10858          targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
10859        }
10860
10861        targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
10862      }
10863    }
10864
10865    return targetLeft;
10866  };
10867
10868  Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {
10869    var _ = this;
10870
10871    return _.options[option];
10872  };
10873
10874  Slick.prototype.getNavigableIndexes = function () {
10875    var _ = this,
10876        breakPoint = 0,
10877        counter = 0,
10878        indexes = [],
10879        max;
10880
10881    if (_.options.infinite === false) {
10882      max = _.slideCount;
10883    } else {
10884      breakPoint = _.options.slidesToScroll * -1;
10885      counter = _.options.slidesToScroll * -1;
10886      max = _.slideCount * 2;
10887    }
10888
10889    while (breakPoint < max) {
10890      indexes.push(breakPoint);
10891      breakPoint = counter + _.options.slidesToScroll;
10892      counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
10893    }
10894
10895    return indexes;
10896  };
10897
10898  Slick.prototype.getSlick = function () {
10899    return this;
10900  };
10901
10902  Slick.prototype.getSlideCount = function () {
10903    var _ = this,
10904        slidesTraversed,
10905        swipedSlide,
10906        centerOffset;
10907
10908    centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
10909
10910    if (_.options.swipeToSlide === true) {
10911      _.$slideTrack.find('.slick-slide').each(function (index, slide) {
10912        if (slide.offsetLeft - centerOffset + $(slide).outerWidth() / 2 > _.swipeLeft * -1) {
10913          swipedSlide = slide;
10914          return false;
10915        }
10916      });
10917
10918      slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
10919      return slidesTraversed;
10920    } else {
10921      return _.options.slidesToScroll;
10922    }
10923  };
10924
10925  Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {
10926    var _ = this;
10927
10928    _.changeSlide({
10929      data: {
10930        message: 'index',
10931        index: parseInt(slide)
10932      }
10933    }, dontAnimate);
10934  };
10935
10936  Slick.prototype.init = function (creation) {
10937    var _ = this;
10938
10939    if (!$(_.$slider).hasClass('slick-initialized')) {
10940      $(_.$slider).addClass('slick-initialized');
10941
10942      _.buildRows();
10943
10944      _.buildOut();
10945
10946      _.setProps();
10947
10948      _.startLoad();
10949
10950      _.loadSlider();
10951
10952      _.initializeEvents();
10953
10954      _.updateArrows();
10955
10956      _.updateDots();
10957
10958      _.checkResponsive(true);
10959
10960      _.focusHandler();
10961    }
10962
10963    if (creation) {
10964      _.$slider.trigger('init', [_]);
10965    }
10966
10967    if (_.options.accessibility === true) {
10968      _.initADA();
10969    }
10970
10971    if (_.options.autoplay) {
10972      _.paused = false;
10973
10974      _.autoPlay();
10975    }
10976  };
10977
10978  Slick.prototype.initADA = function () {
10979    var _ = this,
10980        numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
10981        tabControlIndexes = _.getNavigableIndexes().filter(function (val) {
10982      return val >= 0 && val < _.slideCount;
10983    });
10984
10985    _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
10986      'aria-hidden': 'true',
10987      'tabindex': '-1'
10988    }).find('a, input, button, select').attr({
10989      'tabindex': '-1'
10990    });
10991
10992    if (_.$dots !== null) {
10993      _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
10994        var slideControlIndex = tabControlIndexes.indexOf(i);
10995        $(this).attr({
10996          'role': 'tabpanel',
10997          'id': 'slick-slide' + _.instanceUid + i,
10998          'tabindex': -1
10999        });
11000
11001        if (slideControlIndex !== -1) {
11002          var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex;
11003
11004          if ($('#' + ariaButtonControl).length) {
11005            $(this).attr({
11006              'aria-describedby': ariaButtonControl
11007            });
11008          }
11009        }
11010      });
11011
11012      _.$dots.attr('role', 'tablist').find('li').each(function (i) {
11013        var mappedSlideIndex = tabControlIndexes[i];
11014        $(this).attr({
11015          'role': 'presentation'
11016        });
11017        $(this).find('button').first().attr({
11018          'role': 'tab',
11019          'id': 'slick-slide-control' + _.instanceUid + i,
11020          'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
11021          'aria-label': i + 1 + ' of ' + numDotGroups,
11022          'aria-selected': null,
11023          'tabindex': '-1'
11024        });
11025      }).eq(_.currentSlide).find('button').attr({
11026        'aria-selected': 'true',
11027        'tabindex': '0'
11028      }).end();
11029    }
11030
11031    for (var i = _.currentSlide, max = i + _.options.slidesToShow; i < max; i++) {
11032      if (_.options.focusOnChange) {
11033        _.$slides.eq(i).attr({
11034          'tabindex': '0'
11035        });
11036      } else {
11037        _.$slides.eq(i).removeAttr('tabindex');
11038      }
11039    }
11040
11041    _.activateADA();
11042  };
11043
11044  Slick.prototype.initArrowEvents = function () {
11045    var _ = this;
11046
11047    if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
11048      _.$prevArrow.off('click.slick').on('click.slick', {
11049        message: 'previous'
11050      }, _.changeSlide);
11051
11052      _.$nextArrow.off('click.slick').on('click.slick', {
11053        message: 'next'
11054      }, _.changeSlide);
11055
11056      if (_.options.accessibility === true) {
11057        _.$prevArrow.on('keydown.slick', _.keyHandler);
11058
11059        _.$nextArrow.on('keydown.slick', _.keyHandler);
11060      }
11061    }
11062  };
11063
11064  Slick.prototype.initDotEvents = function () {
11065    var _ = this;
11066
11067    if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
11068      $('li', _.$dots).on('click.slick', {
11069        message: 'index'
11070      }, _.changeSlide);
11071
11072      if (_.options.accessibility === true) {
11073        _.$dots.on('keydown.slick', _.keyHandler);
11074      }
11075    }
11076
11077    if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
11078      $('li', _.$dots).on('mouseenter.slick', $.proxy(_.interrupt, _, true)).on('mouseleave.slick', $.proxy(_.interrupt, _, false));
11079    }
11080  };
11081
11082  Slick.prototype.initSlideEvents = function () {
11083    var _ = this;
11084
11085    if (_.options.pauseOnHover) {
11086      _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
11087
11088      _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
11089    }
11090  };
11091
11092  Slick.prototype.initializeEvents = function () {
11093    var _ = this;
11094
11095    _.initArrowEvents();
11096
11097    _.initDotEvents();
11098
11099    _.initSlideEvents();
11100
11101    _.$list.on('touchstart.slick mousedown.slick', {
11102      action: 'start'
11103    }, _.swipeHandler);
11104
11105    _.$list.on('touchmove.slick mousemove.slick', {
11106      action: 'move'
11107    }, _.swipeHandler);
11108
11109    _.$list.on('touchend.slick mouseup.slick', {
11110      action: 'end'
11111    }, _.swipeHandler);
11112
11113    _.$list.on('touchcancel.slick mouseleave.slick', {
11114      action: 'end'
11115    }, _.swipeHandler);
11116
11117    _.$list.on('click.slick', _.clickHandler);
11118
11119    $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
11120
11121    if (_.options.accessibility === true) {
11122      _.$list.on('keydown.slick', _.keyHandler);
11123    }
11124
11125    if (_.options.focusOnSelect === true) {
11126      $(_.$slideTrack).children().on('click.slick', _.selectHandler);
11127    }
11128
11129    $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
11130    $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
11131    $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
11132    $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
11133    $(_.setPosition);
11134  };
11135
11136  Slick.prototype.initUI = function () {
11137    var _ = this;
11138
11139    if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
11140      _.$prevArrow.show();
11141
11142      _.$nextArrow.show();
11143    }
11144
11145    if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
11146      _.$dots.show();
11147    }
11148  };
11149
11150  Slick.prototype.keyHandler = function (event) {
11151    var _ = this; //Dont slide if the cursor is inside the form fields and arrow keys are pressed
11152
11153
11154    if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
11155      if (event.keyCode === 37 && _.options.accessibility === true) {
11156        _.changeSlide({
11157          data: {
11158            message: _.options.rtl === true ? 'next' : 'previous'
11159          }
11160        });
11161      } else if (event.keyCode === 39 && _.options.accessibility === true) {
11162        _.changeSlide({
11163          data: {
11164            message: _.options.rtl === true ? 'previous' : 'next'
11165          }
11166        });
11167      }
11168    }
11169  };
11170
11171  Slick.prototype.lazyLoad = function () {
11172    var _ = this,
11173        loadRange,
11174        cloneRange,
11175        rangeStart,
11176        rangeEnd;
11177
11178    function loadImages(imagesScope) {
11179      $('img[data-lazy]', imagesScope).each(function () {
11180        var image = $(this),
11181            imageSource = $(this).attr('data-lazy'),
11182            imageSrcSet = $(this).attr('data-srcset'),
11183            imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
11184            imageToLoad = document.createElement('img');
11185
11186        imageToLoad.onload = function () {
11187          image.animate({
11188            opacity: 0
11189          }, 100, function () {
11190            if (imageSrcSet) {
11191              image.attr('srcset', imageSrcSet);
11192
11193              if (imageSizes) {
11194                image.attr('sizes', imageSizes);
11195              }
11196            }
11197
11198            image.attr('src', imageSource).animate({
11199              opacity: 1
11200            }, 200, function () {
11201              image.removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading');
11202            });
11203
11204            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
11205          });
11206        };
11207
11208        imageToLoad.onerror = function () {
11209          image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');
11210
11211          _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
11212        };
11213
11214        imageToLoad.src = imageSource;
11215      });
11216    }
11217
11218    if (_.options.centerMode === true) {
11219      if (_.options.infinite === true) {
11220        rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
11221        rangeEnd = rangeStart + _.options.slidesToShow + 2;
11222      } else {
11223        rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
11224        rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
11225      }
11226    } else {
11227      rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
11228      rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
11229
11230      if (_.options.fade === true) {
11231        if (rangeStart > 0) rangeStart--;
11232        if (rangeEnd <= _.slideCount) rangeEnd++;
11233      }
11234    }
11235
11236    loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
11237
11238    if (_.options.lazyLoad === 'anticipated') {
11239      var prevSlide = rangeStart - 1,
11240          nextSlide = rangeEnd,
11241          $slides = _.$slider.find('.slick-slide');
11242
11243      for (var i = 0; i < _.options.slidesToScroll; i++) {
11244        if (prevSlide < 0) prevSlide = _.slideCount - 1;
11245        loadRange = loadRange.add($slides.eq(prevSlide));
11246        loadRange = loadRange.add($slides.eq(nextSlide));
11247        prevSlide--;
11248        nextSlide++;
11249      }
11250    }
11251
11252    loadImages(loadRange);
11253
11254    if (_.slideCount <= _.options.slidesToShow) {
11255      cloneRange = _.$slider.find('.slick-slide');
11256      loadImages(cloneRange);
11257    } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
11258      cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
11259      loadImages(cloneRange);
11260    } else if (_.currentSlide === 0) {
11261      cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
11262      loadImages(cloneRange);
11263    }
11264  };
11265
11266  Slick.prototype.loadSlider = function () {
11267    var _ = this;
11268
11269    _.setPosition();
11270
11271    _.$slideTrack.css({
11272      opacity: 1
11273    });
11274
11275    _.$slider.removeClass('slick-loading');
11276
11277    _.initUI();
11278
11279    if (_.options.lazyLoad === 'progressive') {
11280      _.progressiveLazyLoad();
11281    }
11282  };
11283
11284  Slick.prototype.next = Slick.prototype.slickNext = function () {
11285    var _ = this;
11286
11287    _.changeSlide({
11288      data: {
11289        message: 'next'
11290      }
11291    });
11292  };
11293
11294  Slick.prototype.orientationChange = function () {
11295    var _ = this;
11296
11297    _.checkResponsive();
11298
11299    _.setPosition();
11300  };
11301
11302  Slick.prototype.pause = Slick.prototype.slickPause = function () {
11303    var _ = this;
11304
11305    _.autoPlayClear();
11306
11307    _.paused = true;
11308  };
11309
11310  Slick.prototype.play = Slick.prototype.slickPlay = function () {
11311    var _ = this;
11312
11313    _.autoPlay();
11314
11315    _.options.autoplay = true;
11316    _.paused = false;
11317    _.focussed = false;
11318    _.interrupted = false;
11319  };
11320
11321  Slick.prototype.postSlide = function (index) {
11322    var _ = this;
11323
11324    if (!_.unslicked) {
11325      _.$slider.trigger('afterChange', [_, index]);
11326
11327      _.animating = false;
11328
11329      if (_.slideCount > _.options.slidesToShow) {
11330        _.setPosition();
11331      }
11332
11333      _.swipeLeft = null;
11334
11335      if (_.options.autoplay) {
11336        _.autoPlay();
11337      }
11338
11339      if (_.options.accessibility === true) {
11340        _.initADA();
11341
11342        if (_.options.focusOnChange) {
11343          var $currentSlide = $(_.$slides.get(_.currentSlide));
11344          $currentSlide.attr('tabindex', 0).focus();
11345        }
11346      }
11347    }
11348  };
11349
11350  Slick.prototype.prev = Slick.prototype.slickPrev = function () {
11351    var _ = this;
11352
11353    _.changeSlide({
11354      data: {
11355        message: 'previous'
11356      }
11357    });
11358  };
11359
11360  Slick.prototype.preventDefault = function (event) {
11361    event.preventDefault();
11362  };
11363
11364  Slick.prototype.progressiveLazyLoad = function (tryCount) {
11365    tryCount = tryCount || 1;
11366
11367    var _ = this,
11368        $imgsToLoad = $('img[data-lazy]', _.$slider),
11369        image,
11370        imageSource,
11371        imageSrcSet,
11372        imageSizes,
11373        imageToLoad;
11374
11375    if ($imgsToLoad.length) {
11376      image = $imgsToLoad.first();
11377      imageSource = image.attr('data-lazy');
11378      imageSrcSet = image.attr('data-srcset');
11379      imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
11380      imageToLoad = document.createElement('img');
11381
11382      imageToLoad.onload = function () {
11383        if (imageSrcSet) {
11384          image.attr('srcset', imageSrcSet);
11385
11386          if (imageSizes) {
11387            image.attr('sizes', imageSizes);
11388          }
11389        }
11390
11391        image.attr('src', imageSource).removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading');
11392
11393        if (_.options.adaptiveHeight === true) {
11394          _.setPosition();
11395        }
11396
11397        _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
11398
11399        _.progressiveLazyLoad();
11400      };
11401
11402      imageToLoad.onerror = function () {
11403        if (tryCount < 3) {
11404          /**
11405           * try to load the image 3 times,
11406           * leave a slight delay so we don't get
11407           * servers blocking the request.
11408           */
11409          setTimeout(function () {
11410            _.progressiveLazyLoad(tryCount + 1);
11411          }, 500);
11412        } else {
11413          image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');
11414
11415          _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
11416
11417          _.progressiveLazyLoad();
11418        }
11419      };
11420
11421      imageToLoad.src = imageSource;
11422    } else {
11423      _.$slider.trigger('allImagesLoaded', [_]);
11424    }
11425  };
11426
11427  Slick.prototype.refresh = function (initializing) {
11428    var _ = this,
11429        currentSlide,
11430        lastVisibleIndex;
11431
11432    lastVisibleIndex = _.slideCount - _.options.slidesToShow; // in non-infinite sliders, we don't want to go past the
11433    // last visible index.
11434
11435    if (!_.options.infinite && _.currentSlide > lastVisibleIndex) {
11436      _.currentSlide = lastVisibleIndex;
11437    } // if less slides than to show, go to start.
11438
11439
11440    if (_.slideCount <= _.options.slidesToShow) {
11441      _.currentSlide = 0;
11442    }
11443
11444    currentSlide = _.currentSlide;
11445
11446    _.destroy(true);
11447
11448    $.extend(_, _.initials, {
11449      currentSlide: currentSlide
11450    });
11451
11452    _.init();
11453
11454    if (!initializing) {
11455      _.changeSlide({
11456        data: {
11457          message: 'index',
11458          index: currentSlide
11459        }
11460      }, false);
11461    }
11462  };
11463
11464  Slick.prototype.registerBreakpoints = function () {
11465    var _ = this,
11466        breakpoint,
11467        currentBreakpoint,
11468        l,
11469        responsiveSettings = _.options.responsive || null;
11470
11471    if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {
11472      _.respondTo = _.options.respondTo || 'window';
11473
11474      for (breakpoint in responsiveSettings) {
11475        l = _.breakpoints.length - 1;
11476
11477        if (responsiveSettings.hasOwnProperty(breakpoint)) {
11478          currentBreakpoint = responsiveSettings[breakpoint].breakpoint; // loop through the breakpoints and cut out any existing
11479          // ones with the same breakpoint number, we don't want dupes.
11480
11481          while (l >= 0) {
11482            if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
11483              _.breakpoints.splice(l, 1);
11484            }
11485
11486            l--;
11487          }
11488
11489          _.breakpoints.push(currentBreakpoint);
11490
11491          _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
11492        }
11493      }
11494
11495      _.breakpoints.sort(function (a, b) {
11496        return _.options.mobileFirst ? a - b : b - a;
11497      });
11498    }
11499  };
11500
11501  Slick.prototype.reinit = function () {
11502    var _ = this;
11503
11504    _.$slides = _.$slideTrack.children(_.options.slide).addClass('slick-slide');
11505    _.slideCount = _.$slides.length;
11506
11507    if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
11508      _.currentSlide = _.currentSlide - _.options.slidesToScroll;
11509    }
11510
11511    if (_.slideCount <= _.options.slidesToShow) {
11512      _.currentSlide = 0;
11513    }
11514
11515    _.registerBreakpoints();
11516
11517    _.setProps();
11518
11519    _.setupInfinite();
11520
11521    _.buildArrows();
11522
11523    _.updateArrows();
11524
11525    _.initArrowEvents();
11526
11527    _.buildDots();
11528
11529    _.updateDots();
11530
11531    _.initDotEvents();
11532
11533    _.cleanUpSlideEvents();
11534
11535    _.initSlideEvents();
11536
11537    _.checkResponsive(false, true);
11538
11539    if (_.options.focusOnSelect === true) {
11540      $(_.$slideTrack).children().on('click.slick', _.selectHandler);
11541    }
11542
11543    _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
11544
11545    _.setPosition();
11546
11547    _.focusHandler();
11548
11549    _.paused = !_.options.autoplay;
11550
11551    _.autoPlay();
11552
11553    _.$slider.trigger('reInit', [_]);
11554  };
11555
11556  Slick.prototype.resize = function () {
11557    var _ = this;
11558
11559    if ($(window).width() !== _.windowWidth) {
11560      clearTimeout(_.windowDelay);
11561      _.windowDelay = window.setTimeout(function () {
11562        _.windowWidth = $(window).width();
11563
11564        _.checkResponsive();
11565
11566        if (!_.unslicked) {
11567          _.setPosition();
11568        }
11569      }, 50);
11570    }
11571  };
11572
11573  Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {
11574    var _ = this;
11575
11576    if (typeof index === 'boolean') {
11577      removeBefore = index;
11578      index = removeBefore === true ? 0 : _.slideCount - 1;
11579    } else {
11580      index = removeBefore === true ? --index : index;
11581    }
11582
11583    if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
11584      return false;
11585    }
11586
11587    _.unload();
11588
11589    if (removeAll === true) {
11590      _.$slideTrack.children().remove();
11591    } else {
11592      _.$slideTrack.children(this.options.slide).eq(index).remove();
11593    }
11594
11595    _.$slides = _.$slideTrack.children(this.options.slide);
11596
11597    _.$slideTrack.children(this.options.slide).detach();
11598
11599    _.$slideTrack.append(_.$slides);
11600
11601    _.$slidesCache = _.$slides;
11602
11603    _.reinit();
11604  };
11605
11606  Slick.prototype.setCSS = function (position) {
11607    var _ = this,
11608        positionProps = {},
11609        x,
11610        y;
11611
11612    if (_.options.rtl === true) {
11613      position = -position;
11614    }
11615
11616    x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
11617    y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
11618    positionProps[_.positionProp] = position;
11619
11620    if (_.transformsEnabled === false) {
11621      _.$slideTrack.css(positionProps);
11622    } else {
11623      positionProps = {};
11624
11625      if (_.cssTransitions === false) {
11626        positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
11627
11628        _.$slideTrack.css(positionProps);
11629      } else {
11630        positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
11631
11632        _.$slideTrack.css(positionProps);
11633      }
11634    }
11635  };
11636
11637  Slick.prototype.setDimensions = function () {
11638    var _ = this;
11639
11640    if (_.options.vertical === false) {
11641      if (_.options.centerMode === true) {
11642        _.$list.css({
11643          padding: '0px ' + _.options.centerPadding
11644        });
11645      }
11646    } else {
11647      _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
11648
11649      if (_.options.centerMode === true) {
11650        _.$list.css({
11651          padding: _.options.centerPadding + ' 0px'
11652        });
11653      }
11654    }
11655
11656    _.listWidth = _.$list.width();
11657    _.listHeight = _.$list.height();
11658
11659    if (_.options.vertical === false && _.options.variableWidth === false) {
11660      _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
11661
11662      _.$slideTrack.width(Math.ceil(_.slideWidth * _.$slideTrack.children('.slick-slide').length));
11663    } else if (_.options.variableWidth === true) {
11664      _.$slideTrack.width(5000 * _.slideCount);
11665    } else {
11666      _.slideWidth = Math.ceil(_.listWidth);
11667
11668      _.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length));
11669    }
11670
11671    var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
11672
11673    if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
11674  };
11675
11676  Slick.prototype.setFade = function () {
11677    var _ = this,
11678        targetLeft;
11679
11680    _.$slides.each(function (index, element) {
11681      targetLeft = _.slideWidth * index * -1;
11682
11683      if (_.options.rtl === true) {
11684        $(element).css({
11685          position: 'relative',
11686          right: targetLeft,
11687          top: 0,
11688          zIndex: _.options.zIndex - 2,
11689          opacity: 0
11690        });
11691      } else {
11692        $(element).css({
11693          position: 'relative',
11694          left: targetLeft,
11695          top: 0,
11696          zIndex: _.options.zIndex - 2,
11697          opacity: 0
11698        });
11699      }
11700    });
11701
11702    _.$slides.eq(_.currentSlide).css({
11703      zIndex: _.options.zIndex - 1,
11704      opacity: 1
11705    });
11706  };
11707
11708  Slick.prototype.setHeight = function () {
11709    var _ = this;
11710
11711    if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
11712      var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
11713
11714      _.$list.css('height', targetHeight);
11715    }
11716  };
11717
11718  Slick.prototype.setOption = Slick.prototype.slickSetOption = function () {
11719    /**
11720     * accepts arguments in format of:
11721     *
11722     *  - for changing a single option's value:
11723     *     .slick("setOption", option, value, refresh )
11724     *
11725     *  - for changing a set of responsive options:
11726     *     .slick("setOption", 'responsive', [{}, ...], refresh )
11727     *
11728     *  - for updating multiple values at once (not responsive)
11729     *     .slick("setOption", { 'option': value, ... }, refresh )
11730     */
11731    var _ = this,
11732        l,
11733        item,
11734        option,
11735        value,
11736        refresh = false,
11737        type;
11738
11739    if ($.type(arguments[0]) === 'object') {
11740      option = arguments[0];
11741      refresh = arguments[1];
11742      type = 'multiple';
11743    } else if ($.type(arguments[0]) === 'string') {
11744      option = arguments[0];
11745      value = arguments[1];
11746      refresh = arguments[2];
11747
11748      if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {
11749        type = 'responsive';
11750      } else if (typeof arguments[1] !== 'undefined') {
11751        type = 'single';
11752      }
11753    }
11754
11755    if (type === 'single') {
11756      _.options[option] = value;
11757    } else if (type === 'multiple') {
11758      $.each(option, function (opt, val) {
11759        _.options[opt] = val;
11760      });
11761    } else if (type === 'responsive') {
11762      for (item in value) {
11763        if ($.type(_.options.responsive) !== 'array') {
11764          _.options.responsive = [value[item]];
11765        } else {
11766          l = _.options.responsive.length - 1; // loop through the responsive object and splice out duplicates.
11767
11768          while (l >= 0) {
11769            if (_.options.responsive[l].breakpoint === value[item].breakpoint) {
11770              _.options.responsive.splice(l, 1);
11771            }
11772
11773            l--;
11774          }
11775
11776          _.options.responsive.push(value[item]);
11777        }
11778      }
11779    }
11780
11781    if (refresh) {
11782      _.unload();
11783
11784      _.reinit();
11785    }
11786  };
11787
11788  Slick.prototype.setPosition = function () {
11789    var _ = this;
11790
11791    _.setDimensions();
11792
11793    _.setHeight();
11794
11795    if (_.options.fade === false) {
11796      _.setCSS(_.getLeft(_.currentSlide));
11797    } else {
11798      _.setFade();
11799    }
11800
11801    _.$slider.trigger('setPosition', [_]);
11802  };
11803
11804  Slick.prototype.setProps = function () {
11805    var _ = this,
11806        bodyStyle = document.body.style;
11807
11808    _.positionProp = _.options.vertical === true ? 'top' : 'left';
11809
11810    if (_.positionProp === 'top') {
11811      _.$slider.addClass('slick-vertical');
11812    } else {
11813      _.$slider.removeClass('slick-vertical');
11814    }
11815
11816    if (bodyStyle.WebkitTransition !== undefined || bodyStyle.MozTransition !== undefined || bodyStyle.msTransition !== undefined) {
11817      if (_.options.useCSS === true) {
11818        _.cssTransitions = true;
11819      }
11820    }
11821
11822    if (_.options.fade) {
11823      if (typeof _.options.zIndex === 'number') {
11824        if (_.options.zIndex < 3) {
11825          _.options.zIndex = 3;
11826        }
11827      } else {
11828        _.options.zIndex = _.defaults.zIndex;
11829      }
11830    }
11831
11832    if (bodyStyle.OTransform !== undefined) {
11833      _.animType = 'OTransform';
11834      _.transformType = '-o-transform';
11835      _.transitionType = 'OTransition';
11836      if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
11837    }
11838
11839    if (bodyStyle.MozTransform !== undefined) {
11840      _.animType = 'MozTransform';
11841      _.transformType = '-moz-transform';
11842      _.transitionType = 'MozTransition';
11843      if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
11844    }
11845
11846    if (bodyStyle.webkitTransform !== undefined) {
11847      _.animType = 'webkitTransform';
11848      _.transformType = '-webkit-transform';
11849      _.transitionType = 'webkitTransition';
11850      if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
11851    }
11852
11853    if (bodyStyle.msTransform !== undefined) {
11854      _.animType = 'msTransform';
11855      _.transformType = '-ms-transform';
11856      _.transitionType = 'msTransition';
11857      if (bodyStyle.msTransform === undefined) _.animType = false;
11858    }
11859
11860    if (bodyStyle.transform !== undefined && _.animType !== false) {
11861      _.animType = 'transform';
11862      _.transformType = 'transform';
11863      _.transitionType = 'transition';
11864    }
11865
11866    _.transformsEnabled = _.options.useTransform && _.animType !== null && _.animType !== false;
11867  };
11868
11869  Slick.prototype.setSlideClasses = function (index) {
11870    var _ = this,
11871        centerOffset,
11872        allSlides,
11873        indexOffset,
11874        remainder;
11875
11876    allSlides = _.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden', 'true');
11877
11878    _.$slides.eq(index).addClass('slick-current');
11879
11880    if (_.options.centerMode === true) {
11881      var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
11882      centerOffset = Math.floor(_.options.slidesToShow / 2);
11883
11884      if (_.options.infinite === true) {
11885        if (index >= centerOffset && index <= _.slideCount - 1 - centerOffset) {
11886          _.$slides.slice(index - centerOffset + evenCoef, index + centerOffset + 1).addClass('slick-active').attr('aria-hidden', 'false');
11887        } else {
11888          indexOffset = _.options.slidesToShow + index;
11889          allSlides.slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2).addClass('slick-active').attr('aria-hidden', 'false');
11890        }
11891
11892        if (index === 0) {
11893          allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center');
11894        } else if (index === _.slideCount - 1) {
11895          allSlides.eq(_.options.slidesToShow).addClass('slick-center');
11896        }
11897      }
11898
11899      _.$slides.eq(index).addClass('slick-center');
11900    } else {
11901      if (index >= 0 && index <= _.slideCount - _.options.slidesToShow) {
11902        _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');
11903      } else if (allSlides.length <= _.options.slidesToShow) {
11904        allSlides.addClass('slick-active').attr('aria-hidden', 'false');
11905      } else {
11906        remainder = _.slideCount % _.options.slidesToShow;
11907        indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
11908
11909        if (_.options.slidesToShow == _.options.slidesToScroll && _.slideCount - index < _.options.slidesToShow) {
11910          allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass('slick-active').attr('aria-hidden', 'false');
11911        } else {
11912          allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');
11913        }
11914      }
11915    }
11916
11917    if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
11918      _.lazyLoad();
11919    }
11920  };
11921
11922  Slick.prototype.setupInfinite = function () {
11923    var _ = this,
11924        i,
11925        slideIndex,
11926        infiniteCount;
11927
11928    if (_.options.fade === true) {
11929      _.options.centerMode = false;
11930    }
11931
11932    if (_.options.infinite === true && _.options.fade === false) {
11933      slideIndex = null;
11934
11935      if (_.slideCount > _.options.slidesToShow) {
11936        if (_.options.centerMode === true) {
11937          infiniteCount = _.options.slidesToShow + 1;
11938        } else {
11939          infiniteCount = _.options.slidesToShow;
11940        }
11941
11942        for (i = _.slideCount; i > _.slideCount - infiniteCount; i -= 1) {
11943          slideIndex = i - 1;
11944          $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex - _.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned');
11945        }
11946
11947        for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
11948          slideIndex = i;
11949          $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex + _.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned');
11950        }
11951
11952        _.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
11953          $(this).attr('id', '');
11954        });
11955      }
11956    }
11957  };
11958
11959  Slick.prototype.interrupt = function (toggle) {
11960    var _ = this;
11961
11962    if (!toggle) {
11963      _.autoPlay();
11964    }
11965
11966    _.interrupted = toggle;
11967  };
11968
11969  Slick.prototype.selectHandler = function (event) {
11970    var _ = this;
11971
11972    var targetElement = $(event.target).is('.slick-slide') ? $(event.target) : $(event.target).parents('.slick-slide');
11973    var index = parseInt(targetElement.attr('data-slick-index'));
11974    if (!index) index = 0;
11975
11976    if (_.slideCount <= _.options.slidesToShow) {
11977      _.slideHandler(index, false, true);
11978
11979      return;
11980    }
11981
11982    _.slideHandler(index);
11983  };
11984
11985  Slick.prototype.slideHandler = function (index, sync, dontAnimate) {
11986    var targetSlide,
11987        animSlide,
11988        oldSlide,
11989        slideLeft,
11990        targetLeft = null,
11991        _ = this,
11992        navTarget;
11993
11994    sync = sync || false;
11995
11996    if (_.animating === true && _.options.waitForAnimate === true) {
11997      return;
11998    }
11999
12000    if (_.options.fade === true && _.currentSlide === index) {
12001      return;
12002    }
12003
12004    if (sync === false) {
12005      _.asNavFor(index);
12006    }
12007
12008    targetSlide = index;
12009    targetLeft = _.getLeft(targetSlide);
12010    slideLeft = _.getLeft(_.currentSlide);
12011    _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
12012
12013    if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
12014      if (_.options.fade === false) {
12015        targetSlide = _.currentSlide;
12016
12017        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
12018          _.animateSlide(slideLeft, function () {
12019            _.postSlide(targetSlide);
12020          });
12021        } else {
12022          _.postSlide(targetSlide);
12023        }
12024      }
12025
12026      return;
12027    } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > _.slideCount - _.options.slidesToScroll)) {
12028      if (_.options.fade === false) {
12029        targetSlide = _.currentSlide;
12030
12031        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
12032          _.animateSlide(slideLeft, function () {
12033            _.postSlide(targetSlide);
12034          });
12035        } else {
12036          _.postSlide(targetSlide);
12037        }
12038      }
12039
12040      return;
12041    }
12042
12043    if (_.options.autoplay) {
12044      clearInterval(_.autoPlayTimer);
12045    }
12046
12047    if (targetSlide < 0) {
12048      if (_.slideCount % _.options.slidesToScroll !== 0) {
12049        animSlide = _.slideCount - _.slideCount % _.options.slidesToScroll;
12050      } else {
12051        animSlide = _.slideCount + targetSlide;
12052      }
12053    } else if (targetSlide >= _.slideCount) {
12054      if (_.slideCount % _.options.slidesToScroll !== 0) {
12055        animSlide = 0;
12056      } else {
12057        animSlide = targetSlide - _.slideCount;
12058      }
12059    } else {
12060      animSlide = targetSlide;
12061    }
12062
12063    _.animating = true;
12064
12065    _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
12066
12067    oldSlide = _.currentSlide;
12068    _.currentSlide = animSlide;
12069
12070    _.setSlideClasses(_.currentSlide);
12071
12072    if (_.options.asNavFor) {
12073      navTarget = _.getNavTarget();
12074      navTarget = navTarget.slick('getSlick');
12075
12076      if (navTarget.slideCount <= navTarget.options.slidesToShow) {
12077        navTarget.setSlideClasses(_.currentSlide);
12078      }
12079    }
12080
12081    _.updateDots();
12082
12083    _.updateArrows();
12084
12085    if (_.options.fade === true) {
12086      if (dontAnimate !== true) {
12087        _.fadeSlideOut(oldSlide);
12088
12089        _.fadeSlide(animSlide, function () {
12090          _.postSlide(animSlide);
12091        });
12092      } else {
12093        _.postSlide(animSlide);
12094      }
12095
12096      _.animateHeight();
12097
12098      return;
12099    }
12100
12101    if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
12102      _.animateSlide(targetLeft, function () {
12103        _.postSlide(animSlide);
12104      });
12105    } else {
12106      _.postSlide(animSlide);
12107    }
12108  };
12109
12110  Slick.prototype.startLoad = function () {
12111    var _ = this;
12112
12113    if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
12114      _.$prevArrow.hide();
12115
12116      _.$nextArrow.hide();
12117    }
12118
12119    if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
12120      _.$dots.hide();
12121    }
12122
12123    _.$slider.addClass('slick-loading');
12124  };
12125
12126  Slick.prototype.swipeDirection = function () {
12127    var xDist,
12128        yDist,
12129        r,
12130        swipeAngle,
12131        _ = this;
12132
12133    xDist = _.touchObject.startX - _.touchObject.curX;
12134    yDist = _.touchObject.startY - _.touchObject.curY;
12135    r = Math.atan2(yDist, xDist);
12136    swipeAngle = Math.round(r * 180 / Math.PI);
12137
12138    if (swipeAngle < 0) {
12139      swipeAngle = 360 - Math.abs(swipeAngle);
12140    }
12141
12142    if (swipeAngle <= 45 && swipeAngle >= 0) {
12143      return _.options.rtl === false ? 'left' : 'right';
12144    }
12145
12146    if (swipeAngle <= 360 && swipeAngle >= 315) {
12147      return _.options.rtl === false ? 'left' : 'right';
12148    }
12149
12150    if (swipeAngle >= 135 && swipeAngle <= 225) {
12151      return _.options.rtl === false ? 'right' : 'left';
12152    }
12153
12154    if (_.options.verticalSwiping === true) {
12155      if (swipeAngle >= 35 && swipeAngle <= 135) {
12156        return 'down';
12157      } else {
12158        return 'up';
12159      }
12160    }
12161
12162    return 'vertical';
12163  };
12164
12165  Slick.prototype.swipeEnd = function (event) {
12166    var _ = this,
12167        slideCount,
12168        direction;
12169
12170    _.dragging = false;
12171    _.swiping = false;
12172
12173    if (_.scrolling) {
12174      _.scrolling = false;
12175      return false;
12176    }
12177
12178    _.interrupted = false;
12179    _.shouldClick = _.touchObject.swipeLength > 10 ? false : true;
12180
12181    if (_.touchObject.curX === undefined) {
12182      return false;
12183    }
12184
12185    if (_.touchObject.edgeHit === true) {
12186      _.$slider.trigger('edge', [_, _.swipeDirection()]);
12187    }
12188
12189    if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
12190      direction = _.swipeDirection();
12191
12192      switch (direction) {
12193        case 'left':
12194        case 'down':
12195          slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();
12196          _.currentDirection = 0;
12197          break;
12198
12199        case 'right':
12200        case 'up':
12201          slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();
12202          _.currentDirection = 1;
12203          break;
12204
12205        default:
12206      }
12207
12208      if (direction != 'vertical') {
12209        _.slideHandler(slideCount);
12210
12211        _.touchObject = {};
12212
12213        _.$slider.trigger('swipe', [_, direction]);
12214      }
12215    } else {
12216      if (_.touchObject.startX !== _.touchObject.curX) {
12217        _.slideHandler(_.currentSlide);
12218
12219        _.touchObject = {};
12220      }
12221    }
12222  };
12223
12224  Slick.prototype.swipeHandler = function (event) {
12225    var _ = this;
12226
12227    if (_.options.swipe === false || 'ontouchend' in document && _.options.swipe === false) {
12228      return;
12229    } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
12230      return;
12231    }
12232
12233    _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? event.originalEvent.touches.length : 1;
12234    _.touchObject.minSwipe = _.listWidth / _.options.touchThreshold;
12235
12236    if (_.options.verticalSwiping === true) {
12237      _.touchObject.minSwipe = _.listHeight / _.options.touchThreshold;
12238    }
12239
12240    switch (event.data.action) {
12241      case 'start':
12242        _.swipeStart(event);
12243
12244        break;
12245
12246      case 'move':
12247        _.swipeMove(event);
12248
12249        break;
12250
12251      case 'end':
12252        _.swipeEnd(event);
12253
12254        break;
12255    }
12256  };
12257
12258  Slick.prototype.swipeMove = function (event) {
12259    var _ = this,
12260        edgeWasHit = false,
12261        curLeft,
12262        swipeDirection,
12263        swipeLength,
12264        positionOffset,
12265        touches,
12266        verticalSwipeLength;
12267
12268    touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
12269
12270    if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
12271      return false;
12272    }
12273
12274    curLeft = _.getLeft(_.currentSlide);
12275    _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
12276    _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
12277    _.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
12278    verticalSwipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
12279
12280    if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
12281      _.scrolling = true;
12282      return false;
12283    }
12284
12285    if (_.options.verticalSwiping === true) {
12286      _.touchObject.swipeLength = verticalSwipeLength;
12287    }
12288
12289    swipeDirection = _.swipeDirection();
12290
12291    if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
12292      _.swiping = true;
12293      event.preventDefault();
12294    }
12295
12296    positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
12297
12298    if (_.options.verticalSwiping === true) {
12299      positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
12300    }
12301
12302    swipeLength = _.touchObject.swipeLength;
12303    _.touchObject.edgeHit = false;
12304
12305    if (_.options.infinite === false) {
12306      if (_.currentSlide === 0 && swipeDirection === 'right' || _.currentSlide >= _.getDotCount() && swipeDirection === 'left') {
12307        swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
12308        _.touchObject.edgeHit = true;
12309      }
12310    }
12311
12312    if (_.options.vertical === false) {
12313      _.swipeLeft = curLeft + swipeLength * positionOffset;
12314    } else {
12315      _.swipeLeft = curLeft + swipeLength * (_.$list.height() / _.listWidth) * positionOffset;
12316    }
12317
12318    if (_.options.verticalSwiping === true) {
12319      _.swipeLeft = curLeft + swipeLength * positionOffset;
12320    }
12321
12322    if (_.options.fade === true || _.options.touchMove === false) {
12323      return false;
12324    }
12325
12326    if (_.animating === true) {
12327      _.swipeLeft = null;
12328      return false;
12329    }
12330
12331    _.setCSS(_.swipeLeft);
12332  };
12333
12334  Slick.prototype.swipeStart = function (event) {
12335    var _ = this,
12336        touches;
12337
12338    _.interrupted = true;
12339
12340    if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
12341      _.touchObject = {};
12342      return false;
12343    }
12344
12345    if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
12346      touches = event.originalEvent.touches[0];
12347    }
12348
12349    _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
12350    _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
12351    _.dragging = true;
12352  };
12353
12354  Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {
12355    var _ = this;
12356
12357    if (_.$slidesCache !== null) {
12358      _.unload();
12359
12360      _.$slideTrack.children(this.options.slide).detach();
12361
12362      _.$slidesCache.appendTo(_.$slideTrack);
12363
12364      _.reinit();
12365    }
12366  };
12367
12368  Slick.prototype.unload = function () {
12369    var _ = this;
12370
12371    $('.slick-cloned', _.$slider).remove();
12372
12373    if (_.$dots) {
12374      _.$dots.remove();
12375    }
12376
12377    if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
12378      _.$prevArrow.remove();
12379    }
12380
12381    if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
12382      _.$nextArrow.remove();
12383    }
12384
12385    _.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden', 'true').css('width', '');
12386  };
12387
12388  Slick.prototype.unslick = function (fromBreakpoint) {
12389    var _ = this;
12390
12391    _.$slider.trigger('unslick', [_, fromBreakpoint]);
12392
12393    _.destroy();
12394  };
12395
12396  Slick.prototype.updateArrows = function () {
12397    var _ = this,
12398        centerOffset;
12399
12400    centerOffset = Math.floor(_.options.slidesToShow / 2);
12401
12402    if (_.options.arrows === true && _.slideCount > _.options.slidesToShow && !_.options.infinite) {
12403      _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
12404
12405      _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
12406
12407      if (_.currentSlide === 0) {
12408        _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
12409
12410        _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
12411      } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
12412        _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
12413
12414        _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
12415      } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
12416        _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
12417
12418        _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
12419      }
12420    }
12421  };
12422
12423  Slick.prototype.updateDots = function () {
12424    var _ = this;
12425
12426    if (_.$dots !== null) {
12427      _.$dots.find('li').removeClass('slick-active').end();
12428
12429      _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active');
12430    }
12431  };
12432
12433  Slick.prototype.visibility = function () {
12434    var _ = this;
12435
12436    if (_.options.autoplay) {
12437      if (document[_.hidden]) {
12438        _.interrupted = true;
12439      } else {
12440        _.interrupted = false;
12441      }
12442    }
12443  };
12444
12445  $.fn.slick = function () {
12446    var _ = this,
12447        opt = arguments[0],
12448        args = Array.prototype.slice.call(arguments, 1),
12449        l = _.length,
12450        i,
12451        ret;
12452
12453    for (i = 0; i < l; i++) {
12454      if (_typeof(opt) == 'object' || typeof opt == 'undefined') _[i].slick = new Slick(_[i], opt);else ret = _[i].slick[opt].apply(_[i].slick, args);
12455      if (typeof ret != 'undefined') return ret;
12456    }
12457
12458    return _;
12459  };
12460});
12461
12462/***/ }),
12463
vendor: 9,204 bytes, lines 12464-12847
12464/***/ "./node_modules/slideout/index.js":
12465/*!****************************************!*\
12466  !*** ./node_modules/slideout/index.js ***!
12467  \****************************************/
12468/*! no static exports found */
12469/***/ (function(module, exports, __webpack_require__) {
12470
12471"use strict";
12472
12473/**
12474 * Module dependencies
12475 */
12476
12477var decouple = __webpack_require__(/*! decouple */ "./node_modules/decouple/index.js");
12478
12479var Emitter = __webpack_require__(/*! emitter */ "./node_modules/emitter/dist/index.js");
12480/**
12481 * Privates
12482 */
12483
12484
12485var scrollTimeout;
12486var scrolling = false;
12487var doc = window.document;
12488var html = doc.documentElement;
12489var msPointerSupported = window.navigator.msPointerEnabled;
12490var touch = {
12491  'start': msPointerSupported ? 'MSPointerDown' : 'touchstart',
12492  'move': msPointerSupported ? 'MSPointerMove' : 'touchmove',
12493  'end': msPointerSupported ? 'MSPointerUp' : 'touchend'
12494};
12495
12496var prefix = function prefix() {
12497  var regex = /^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/;
12498  var styleDeclaration = doc.getElementsByTagName('script')[0].style;
12499
12500  for (var prop in styleDeclaration) {
12501    if (regex.test(prop)) {
12502      return '-' + prop.match(regex)[0].toLowerCase() + '-';
12503    }
12504  } // Nothing found so far? Webkit does not enumerate over the CSS properties of the style object.
12505  // However (prop in style) returns the correct value, so we'll have to test for
12506  // the precence of a specific property
12507
12508
12509  if ('WebkitOpacity' in styleDeclaration) {
12510    return '-webkit-';
12511  }
12512
12513  if ('KhtmlOpacity' in styleDeclaration) {
12514    return '-khtml-';
12515  }
12516
12517  return '';
12518}();
12519
12520function extend(destination, from) {
12521  for (var prop in from) {
12522    if (from[prop]) {
12523      destination[prop] = from[prop];
12524    }
12525  }
12526
12527  return destination;
12528}
12529
12530function inherits(child, uber) {
12531  child.prototype = extend(child.prototype || {}, uber.prototype);
12532}
12533
12534function hasIgnoredElements(el) {
12535  while (el.parentNode) {
12536    if (el.getAttribute('data-slideout-ignore') !== null) {
12537      return el;
12538    }
12539
12540    el = el.parentNode;
12541  }
12542
12543  return null;
12544}
12545/**
12546 * Slideout constructor
12547 */
12548
12549
12550function Slideout(options) {
12551  options = options || {}; // Sets default values
12552
12553  this._startOffsetX = 0;
12554  this._currentOffsetX = 0;
12555  this._opening = false;
12556  this._moved = false;
12557  this._opened = false;
12558  this._preventOpen = false;
12559  this._touch = options.touch === undefined ? true : options.touch && true;
12560  this._side = options.side || 'left'; // Sets panel
12561
12562  this.panel = options.panel;
12563  this.menu = options.menu; // Sets  classnames
12564
12565  if (!this.panel.classList.contains('slideout-panel')) {
12566    this.panel.classList.add('slideout-panel');
12567  }
12568
12569  if (!this.panel.classList.contains('slideout-panel-' + this._side)) {
12570    this.panel.classList.add('slideout-panel-' + this._side);
12571  }
12572
12573  if (!this.menu.classList.contains('slideout-menu')) {
12574    this.menu.classList.add('slideout-menu');
12575  }
12576
12577  if (!this.menu.classList.contains('slideout-menu-' + this._side)) {
12578    this.menu.classList.add('slideout-menu-' + this._side);
12579  } // Sets options
12580
12581
12582  this._fx = options.fx || 'ease';
12583  this._duration = parseInt(options.duration, 10) || 300;
12584  this._tolerance = parseInt(options.tolerance, 10) || 70;
12585  this._padding = this._translateTo = parseInt(options.padding, 10) || 256;
12586  this._orientation = this._side === 'right' ? -1 : 1;
12587  this._translateTo *= this._orientation; // Init touch events
12588
12589  if (this._touch) {
12590    this._initTouchEvents();
12591  }
12592}
12593/**
12594 * Inherits from Emitter
12595 */
12596
12597
12598inherits(Slideout, Emitter);
12599/**
12600 * Opens the slideout menu.
12601 */
12602
12603Slideout.prototype.open = function () {
12604  var self = this;
12605  this.emit('beforeopen');
12606
12607  if (!html.classList.contains('slideout-open')) {
12608    html.classList.add('slideout-open');
12609  }
12610
12611  this._setTransition();
12612
12613  this._translateXTo(this._translateTo);
12614
12615  this._opened = true;
12616  setTimeout(function () {
12617    self.panel.style.transition = self.panel.style['-webkit-transition'] = '';
12618    self.emit('open');
12619  }, this._duration + 50);
12620  return this;
12621};
12622/**
12623 * Closes slideout menu.
12624 */
12625
12626
12627Slideout.prototype.close = function () {
12628  var self = this;
12629
12630  if (!this.isOpen() && !this._opening) {
12631    return this;
12632  }
12633
12634  this.emit('beforeclose');
12635
12636  this._setTransition();
12637
12638  this._translateXTo(0);
12639
12640  this._opened = false;
12641  setTimeout(function () {
12642    html.classList.remove('slideout-open');
12643    self.panel.style.transition = self.panel.style['-webkit-transition'] = self.panel.style[prefix + 'transform'] = self.panel.style.transform = '';
12644    self.emit('close');
12645  }, this._duration + 50);
12646  return this;
12647};
12648/**
12649 * Toggles (open/close) slideout menu.
12650 */
12651
12652
12653Slideout.prototype.toggle = function () {
12654  return this.isOpen() ? this.close() : this.open();
12655};
12656/**
12657 * Returns true if the slideout is currently open, and false if it is closed.
12658 */
12659
12660
12661Slideout.prototype.isOpen = function () {
12662  return this._opened;
12663};
12664/**
12665 * Translates panel and updates currentOffset with a given X point
12666 */
12667
12668
12669Slideout.prototype._translateXTo = function (translateX) {
12670  this._currentOffsetX = translateX;
12671  this.panel.style[prefix + 'transform'] = this.panel.style.transform = 'translateX(' + translateX + 'px)';
12672  return this;
12673};
12674/**
12675 * Set transition properties
12676 */
12677
12678
12679Slideout.prototype._setTransition = function () {
12680  this.panel.style[prefix + 'transition'] = this.panel.style.transition = prefix + 'transform ' + this._duration + 'ms ' + this._fx;
12681  return this;
12682};
12683/**
12684 * Initializes touch event
12685 */
12686
12687
12688Slideout.prototype._initTouchEvents = function () {
12689  var self = this;
12690  /**
12691   * Decouple scroll event
12692   */
12693
12694  this._onScrollFn = decouple(doc, 'scroll', function () {
12695    if (!self._moved) {
12696      clearTimeout(scrollTimeout);
12697      scrolling = true;
12698      scrollTimeout = setTimeout(function () {
12699        scrolling = false;
12700      }, 250);
12701    }
12702  });
12703  /**
12704   * Prevents touchmove event if slideout is moving
12705   */
12706
12707  this._preventMove = function (eve) {
12708    if (self._moved) {
12709      eve.preventDefault();
12710    }
12711  };
12712
12713  doc.addEventListener(touch.move, this._preventMove);
12714  /**
12715   * Resets values on touchstart
12716   */
12717
12718  this._resetTouchFn = function (eve) {
12719    if (typeof eve.touches === 'undefined') {
12720      return;
12721    }
12722
12723    self._moved = false;
12724    self._opening = false;
12725    self._startOffsetX = eve.touches[0].pageX;
12726    self._preventOpen = !self._touch || !self.isOpen() && self.menu.clientWidth !== 0;
12727  };
12728
12729  this.panel.addEventListener(touch.start, this._resetTouchFn);
12730  /**
12731   * Resets values on touchcancel
12732   */
12733
12734  this._onTouchCancelFn = function () {
12735    self._moved = false;
12736    self._opening = false;
12737  };
12738
12739  this.panel.addEventListener('touchcancel', this._onTouchCancelFn);
12740  /**
12741   * Toggles slideout on touchend
12742   */
12743
12744  this._onTouchEndFn = function () {
12745    if (self._moved) {
12746      self.emit('translateend');
12747      self._opening && Math.abs(self._currentOffsetX) > self._tolerance ? self.open() : self.close();
12748    }
12749
12750    self._moved = false;
12751  };
12752
12753  this.panel.addEventListener(touch.end, this._onTouchEndFn);
12754  /**
12755   * Translates panel on touchmove
12756   */
12757
12758  this._onTouchMoveFn = function (eve) {
12759    if (scrolling || self._preventOpen || typeof eve.touches === 'undefined' || hasIgnoredElements(eve.target)) {
12760      return;
12761    }
12762
12763    var dif_x = eve.touches[0].clientX - self._startOffsetX;
12764    var translateX = self._currentOffsetX = dif_x;
12765
12766    if (Math.abs(translateX) > self._padding) {
12767      return;
12768    }
12769
12770    if (Math.abs(dif_x) > 20) {
12771      self._opening = true;
12772      var oriented_dif_x = dif_x * self._orientation;
12773
12774      if (self._opened && oriented_dif_x > 0 || !self._opened && oriented_dif_x < 0) {
12775        return;
12776      }
12777
12778      if (!self._moved) {
12779        self.emit('translatestart');
12780      }
12781
12782      if (oriented_dif_x <= 0) {
12783        translateX = dif_x + self._padding * self._orientation;
12784        self._opening = false;
12785      }
12786
12787      if (!(self._moved && html.classList.contains('slideout-open'))) {
12788        html.classList.add('slideout-open');
12789      }
12790
12791      self.panel.style[prefix + 'transform'] = self.panel.style.transform = 'translateX(' + translateX + 'px)';
12792      self.emit('translate', translateX);
12793      self._moved = true;
12794    }
12795  };
12796
12797  this.panel.addEventListener(touch.move, this._onTouchMoveFn);
12798  return this;
12799};
12800/**
12801 * Enable opening the slideout via touch events.
12802 */
12803
12804
12805Slideout.prototype.enableTouch = function () {
12806  this._touch = true;
12807  return this;
12808};
12809/**
12810 * Disable opening the slideout via touch events.
12811 */
12812
12813
12814Slideout.prototype.disableTouch = function () {
12815  this._touch = false;
12816  return this;
12817};
12818/**
12819 * Destroy an instance of slideout.
12820 */
12821
12822
12823Slideout.prototype.destroy = function () {
12824  // Close before clean
12825  this.close(); // Remove event listeners
12826
12827  doc.removeEventListener(touch.move, this._preventMove);
12828  this.panel.removeEventListener(touch.start, this._resetTouchFn);
12829  this.panel.removeEventListener('touchcancel', this._onTouchCancelFn);
12830  this.panel.removeEventListener(touch.end, this._onTouchEndFn);
12831  this.panel.removeEventListener(touch.move, this._onTouchMoveFn);
12832  doc.removeEventListener('scroll', this._onScrollFn); // Remove methods
12833
12834  this.open = this.close = function () {}; // Return the instance so it can be easily dereferenced
12835
12836
12837  return this;
12838};
12839/**
12840 * Expose Slideout
12841 */
12842
12843
12844module.exports = Slideout;
12845
12846/***/ }),
12847
vendor: 804 bytes, lines 12848-12881
12848/***/ "./node_modules/webpack/buildin/module.js":
12849/*!***********************************!*\
12850  !*** (webpack)/buildin/module.js ***!
12851  \***********************************/
12852/*! no static exports found */
12853/***/ (function(module, exports) {
12854
12855module.exports = function (module) {
12856  if (!module.webpackPolyfill) {
12857    module.deprecate = function () {};
12858
12859    module.paths = []; // module.parent = undefined by default
12860
12861    if (!module.children) module.children = [];
12862    Object.defineProperty(module, "loaded", {
12863      enumerable: true,
12864      get: function get() {
12865        return module.l;
12866      }
12867    });
12868    Object.defineProperty(module, "id", {
12869      enumerable: true,
12870      get: function get() {
12871        return module.i;
12872      }
12873    });
12874    module.webpackPolyfill = 1;
12875  }
12876
12877  return module;
12878};
12879
12880/***/ }),
12881
12882/***/ "./src/index.js":
12883/*!**********************!*\
12884  !*** ./src/index.js ***!
12885  \**********************/
12886/*! no exports provided */
12887/***/ (function(module, __webpack_exports__, __webpack_require__) {
12888
12889"use strict";
12890__webpack_require__.r(__webpack_exports__);
12891/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
12892/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
12893/* harmony import */ var _util_Router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/Router */ "./src/util/Router.js");
12894/* harmony import */ var _js_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./js/common */ "./src/js/common.js");
12895
12896
12897
12898/**
12899 * Populate Router instance with DOM routes
12900 * @type {Router} routes - An instance of our router
12901 */
12902
12903var routes = new _util_Router__WEBPACK_IMPORTED_MODULE_1__["default"]({
12904  /** All pages */
12905  common: _js_common__WEBPACK_IMPORTED_MODULE_2__["default"]
12906});
12907/** Load Events */
12908
12909jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () {
12910  return routes.loadEvents();
12911});
12912
12913/***/ }),
12914
12915/***/ "./src/js/common.js":
12916/*!**************************!*\
12917  !*** ./src/js/common.js ***!
12918  \**************************/
12919/*! exports provided: default */
12920/***/ (function(module, __webpack_exports__, __webpack_require__) {
12921
12922"use strict";
12923__webpack_require__.r(__webpack_exports__);
12924/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var slideout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! slideout */ "./node_modules/slideout/index.js");
12925/* harmony import */ var slideout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(slideout__WEBPACK_IMPORTED_MODULE_0__);
12926/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! slick-carousel */ "./node_modules/slick-carousel/slick/slick.js");
12927/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(slick_carousel__WEBPACK_IMPORTED_MODULE_1__);
12928
12929
12930/* harmony default export */ __webpack_exports__["default"] = ({
12931  init: function init() {
12932    $(document).ready(function () {
12933      var slideout = new slideout__WEBPACK_IMPORTED_MODULE_0___default.a({
12934        panel: document.getElementById('panel'),
12935        menu: document.getElementById('menu'),
12936        padding: 256,
12937        tolerance: 70
12938      });
12939      document.querySelector('.hamburger-icon').addEventListener('click', function () {
12940        slideout.toggle();
12941      });
12942      document.querySelector('.close').addEventListener('click', function () {
12943        slideout.toggle();
12944      });
12945      $('.mobile_menu .nav-drop').slideUp();
12946      $('.mobile_menu .has-child').click(function (e) {
12947        e.preventDefault();
12948
12949        if ($(this).hasClass('is-active')) {} else {
12950          $('.mobile_menu .has-child').removeClass('is-active');
12951          $(this).addClass('is-active');
12952          $('.mobile_menu .nav-drop').slideUp();
12953          var child = $(this).next('.nav-drop');
12954          console.log(child);
12955          $(child).slideDown();
12956        }
12957      });
12958      $('#cases_form').submit(function () {
12959        console.log('Submitted');
12960
12961        if ($('#athlete_name').val() == '') {
12962          $('#athlete_name').prop('disabled', true);
12963        }
12964
12965        if ($('#athlete_sport').val() == '') {
12966          $('#athlete_sport').prop('disabled', true);
12967        }
12968
12969        if ($('#drug_found').val() == '') {
12970          $('#drug_found').prop('disabled', true);
12971        }
12972      });
12973      $('.clear_button').click(function (e) {
12974        e.preventDefault();
12975        $('#cases_form').trigger('reset');
12976        $('#cases_form').trigger('submit');
12977      });
12978
12979      function getUrlParameter(name) {
12980        name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
12981        var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
12982        var results = regex.exec(location.search);
12983        return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
12984      }
12985
12986      $('#athlete_name').val(getUrlParameter('athlete_name'));
12987      $('#athlete_sport').val(getUrlParameter('athlete_sport'));
12988      $('#drug_found').val(getUrlParameter('drug_found'));
12989      $('.drop_button').click(function (e) {
12990        e.preventDefault();
12991        $(this).toggleClass('is-active');
12992        var target = $(this).data('id');
12993        $('#' + target).toggle();
12994      });
12995      $('.accordion_section .accordion__title').click(function () {
12996        var content = $(this).next('.accordion__content');
12997        $(content).slideToggle();
12998        $(this).toggleClass('is-active');
12999      });
13000      $('.steps__title').on('click', function () {
13001        var target = $(this).data('for');
13002        $('.steps__content').hide();
13003        $('#' + target).show();
13004        $('.steps__title').removeClass('is_active');
13005        $(this).addClass('is_active');
13006      });
13007      $('.searchicon').click(function () {
13008        $('.searchform input').fadeToggle();
13009        console.log('Search Clicked');
13010      });
13011      $('.partner-slider').slick({
13012        dots: true,
13013        autoplay: true,
13014        autoplaySpeed: 5000,
13015        speed: 300,
13016        infinite: true,
13017        arrows: true,
13018        nextArrow: '<button type="button" role="button" aria-label="Next" style="color:#333333; font-size:20px;" class="slick-next default"><i class="far fa-chevron-right"></i></button>',
13019        prevArrow: '<button type="button" role="button" aria-label="Previous" style="color:#333333; font-size:20px;" class="slick-prev default"><i class="far fa-chevron-left"></i></button>',
13020        slidesToScroll: 1,
13021        slidesToShow: 5,
13022        swipe: true,
13023        draggable: true,
13024        touchMove: true,
13025        pauseOnHover: true,
13026        pauseOnFocus: false,
13027        responsive: [{
13028          breakpoint: 1026,
13029          settings: {
13030            slidesToShow: 5,
13031            slidesToScroll: 1
13032          }
13033        }, {
13034          breakpoint: 1025,
13035          settings: {
13036            slidesToShow: 3,
13037            slidesToScroll: 1
13038          }
13039        }, {
13040          breakpoint: 760,
13041          settings: {
13042            slidesToShow: 2,
13043            slidesToScroll: 1
13044          }
13045        }],
13046        pauseOnDotsHover: true
13047      });
13048    });
13049
13050    function initMap($el) {
13051      // Find marker elements within map.
13052      var $markers = $el.find('.marker'); // Create gerenic map.
13053
13054      var mapArgs = {
13055        zoom: $el.data('zoom') || 16,
13056        mapTypeId: google.maps.MapTypeId.ROADMAP
13057      };
13058      var map = new google.maps.Map($el[0], mapArgs); // Add markers.
13059
13060      map.markers = [];
13061      $markers.each(function () {
13062        initMarker($(this), map);
13063      }); // Center map based on markers.
13064
13065      centerMap(map); // Return map instance.
13066
13067      return map;
13068    }
13069
13070    function initMarker($marker, map) {
13071      // Get position from marker.
13072      var lat = $marker.data('lat');
13073      var lng = $marker.data('lng');
13074      var latLng = {
13075        lat: parseFloat(lat),
13076        lng: parseFloat(lng)
13077      }; // Create marker instance.
13078
13079      var marker = new google.maps.Marker({
13080        position: latLng,
13081        map: map
13082      }); // Append to reference for later use.
13083
13084      map.markers.push(marker); // If marker contains HTML, add it to an infoWindow.
13085
13086      if ($marker.html()) {
13087        // Create info window.
13088        var infowindow = new google.maps.InfoWindow({
13089          content: $marker.html()
13090        }); // Show info window when marker is clicked.
13091
13092        google.maps.event.addListener(marker, 'click', function () {
13093          infowindow.open(map, marker);
13094        });
13095      }
13096    }
13097    /**
13098     * centerMap
13099     *
13100     * Centers the map showing all markers in view.
13101     *
13102     * @date    22/10/19
13103     * @since   5.8.6
13104     *
13105     * @param   object The map instance.
13106     * @return  void
13107     */
13108
13109
13110    function centerMap(map) {
13111      // Create map boundaries from all map markers.
13112      var bounds = new google.maps.LatLngBounds();
13113      map.markers.forEach(function (marker) {
13114        bounds.extend({
13115          lat: marker.position.lat(),
13116          lng: marker.position.lng()
13117        });
13118      }); // Case: Single marker.
13119
13120      if (map.markers.length == 1) {
13121        map.setCenter(bounds.getCenter()); // Case: Multiple markers.
13122      } else {
13123        map.fitBounds(bounds);
13124      }
13125    } // Render maps on page load.
13126
13127
13128    $(document).ready(function () {
13129      $('.acf-map').each(function () {
13130        var map = initMap($(this));
13131      });
13132    });
13133  },
13134  finalize: function finalize() {}
13135});
13136/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))
13137
13138/***/ }),
13139
13140/***/ "./src/util/Router.js":
13141/*!****************************!*\
13142  !*** ./src/util/Router.js ***!
13143  \****************************/
13144/*! exports provided: default */
13145/***/ (function(module, __webpack_exports__, __webpack_require__) {
13146
13147"use strict";
13148__webpack_require__.r(__webpack_exports__);
13149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Router; });
13150/* harmony import */ var _camelCase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./camelCase */ "./src/util/camelCase.js");
13151function _classCallCheck(instance, Constructor) {
13152  if (!(instance instanceof Constructor)) {
13153    throw new TypeError("Cannot call a class as a function");
13154  }
13155}
13156
13157function _defineProperties(target, props) {
13158  for (var i = 0; i < props.length; i++) {
13159    var descriptor = props[i];
13160    descriptor.enumerable = descriptor.enumerable || false;
13161    descriptor.configurable = true;
13162    if ("value" in descriptor) descriptor.writable = true;
13163    Object.defineProperty(target, descriptor.key, descriptor);
13164  }
13165}
13166
13167function _createClass(Constructor, protoProps, staticProps) {
13168  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
13169  if (staticProps) _defineProperties(Constructor, staticProps);
13170  Object.defineProperty(Constructor, "prototype", {
13171    writable: false
13172  });
13173  return Constructor;
13174}
13175/* ========================================================================
13176 * DOM-based Routing
13177 * Based on http://goo.gl/EUTi53 by Paul Irish
13178 *
13179 * Only fires on body classes that match. If a body class contains a dash,
13180 * replace the dash with an underscore when adding it to the object below.
13181 * ======================================================================== */
13182
13183
13184 // The routing fires all common scripts, followed by the page specific scripts.
13185// Add additional events for more control over timing e.g. a finalize event
13186
13187var Router = /*#__PURE__*/function () {
13188  function Router(routes) {
13189    _classCallCheck(this, Router);
13190
13191    this.routes = routes;
13192  }
13193
13194  _createClass(Router, [{
13195    key: "fire",
13196    value: function fire(route) {
13197      var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'init';
13198      var args = arguments.length > 2 ? arguments[2] : undefined;
13199      var fire = route !== '' && this.routes[route] && typeof this.routes[route][fn] === 'function';
13200
13201      if (fire) {
13202        this.routes[route][fn](args);
13203      }
13204    }
13205  }, {
13206    key: "loadEvents",
13207    value: function loadEvents() {
13208      var _this = this; // Fire common init JS
13209
13210
13211      this.fire('common'); // Fire page-specific init JS, and then finalize JS
13212
13213      document.body.className.toLowerCase().replace(/-/g, '_').split(/\s+/).map(_camelCase__WEBPACK_IMPORTED_MODULE_0__["default"]).forEach(function (className) {
13214        _this.fire(className);
13215
13216        _this.fire(className, 'finalize');
13217      }); // Fire common finalize JS
13218
13219      this.fire('common', 'finalize');
13220    }
13221  }]);
13222
13223  return Router;
13224}();
13225
13226
13227
13228/***/ }),
13229
13230/***/ "./src/util/camelCase.js":
13231/*!*******************************!*\
13232  !*** ./src/util/camelCase.js ***!
13233  \*******************************/
13234/*! exports provided: default */
13235/***/ (function(module, __webpack_exports__, __webpack_require__) {
13236
13237"use strict";
13238__webpack_require__.r(__webpack_exports__);
13239// the most terrible camelizer on the internet, guaranteed!
13240/* harmony default export */ __webpack_exports__["default"] = (function (str) {
13241  return "".concat(str.charAt(0).toLowerCase()).concat(str.replace(/[\W_]/g, '|').split('|').map(function (part) {
13242    return "".concat(part.charAt(0).toUpperCase()).concat(part.slice(1));
13243  }).join('').slice(1));
13244});
13245
13246/***/ })
13246
13247
13248/******/ });
13249//# sourceMappingURL=main.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.